Go to the documentation of this file.
29 #include "../crypto/internal.h"
30 #include "../crypto/test/file_test.h"
31 #include "../crypto/test/test_util.h"
43 std::vector<uint8_t>
msg;
44 if (!qx || !qy || !
key ||
48 qx.get(), qy.get(),
nullptr) ||
49 !t->GetBytes(&
msg,
"Msg")) {
57 t->PrintLine(
"Bad input length.");
67 bssl::UniquePtr<ECDSA_SIG> sig(
ECDSA_do_sign(digest, digest_len,
key.get()));
76 std::vector<uint8_t> qx_bytes(degree_len), qy_bytes(degree_len);
77 std::vector<uint8_t> r_bytes(order_len), s_bytes(order_len);
85 printf(
"%sQx = %s\r\nQy = %s\r\nR = %s\r\nS = %s\r\n\r\n",
102 fprintf(
stderr,
"usage: %s (SigGen|SigGenComponent) <test file>\n",
108 if (strcmp(argv[1],
"SigGen") == 0) {
110 }
else if (strcmp(argv[1],
"SigGenComponent") == 0) {
113 fprintf(
stderr,
"Unknown test type: %s\n", argv[1]);
119 opts.callback = test_func;
#define EC_GROUP_get0_order
#define EC_KEY_new_by_curve_name
const EVP_MD * GetDigestFromInstruction(FileTest *t)
int FileTestMain(FileTestFunc run_test, void *arg, const char *path)
#define EC_KEY_generate_key_fips
_Use_decl_annotations_ int __cdecl printf(const char *_Format,...)
#define EC_KEY_get0_group
static bool TestECDSA2SigGenComponent(FileTest *t, void *arg)
#define EC_POINT_get_affine_coordinates_GFp
def c_str(s, encoding='ascii')
int GetECGroupNIDFromInstruction(FileTest *t, const char **out_str)
std::string EncodeHex(bssl::Span< const uint8_t > in)
static void * OPENSSL_memcpy(void *dst, const void *src, size_t n)
#define EC_KEY_get0_public_key
void EchoComment(const std::string &comment)
int cavp_ecdsa2_siggen_test_main(int argc, char **argv)
#define EC_GROUP_get_degree
static bool TestECDSA2SigGenImpl(FileTest *t, bool is_component)
static bool TestECDSA2SigGen(FileTest *t, void *arg)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:52