diff --git a/oqsprov/oqs_sig.c b/oqsprov/oqs_sig.c index edf68b7e..ba7e56bf 100644 --- a/oqsprov/oqs_sig.c +++ b/oqsprov/oqs_sig.c @@ -277,7 +277,7 @@ static int oqs_sig_sign(void *vpoqs_sigctx, unsigned char *sig, size_t *siglen, EVP_PKEY *cmp_key_classic = NULL; EVP_PKEY *evpkey = oqsxkey->classical_pkey; EVP_PKEY_CTX *classical_ctx_sign = NULL; - + OQS_SIG_PRINTF2("OQS SIG provider: sign called for %ld bytes\n", tbslen); int is_hybrid = (oqsxkey->keytype == KEY_TYPE_HYB_SIG); diff --git a/oqsprov/oqsprov_keys.c b/oqsprov/oqsprov_keys.c index 9decf3b8..23e95267 100644 --- a/oqsprov/oqsprov_keys.c +++ b/oqsprov/oqsprov_keys.c @@ -1044,11 +1044,6 @@ static int oqsx_key_recreate_classickey(OQSX_KEY *key, oqsx_key_op_t op) } #endif } -<<<<<<< HEAD - } else { - key->cmp_classical_pkey[key->numkeys - 1] = NULL; -======= ->>>>>>> 314b0f870e031f0bb0fc7a1c1a83a6441f0d595d } } } @@ -1335,10 +1330,7 @@ OQSX_KEY *oqsx_key_new(OSSL_LIB_CTX *libctx, char *oqs_name, char *tls_name, ret->comp_privkey = OPENSSL_malloc(sizeof(void *)); ret->comp_pubkey = OPENSSL_malloc(sizeof(void *)); ON_ERR_GOTO(!ret->comp_privkey || !ret->comp_pubkey, err); -<<<<<<< HEAD -======= ret->oqsx_provider_ctx.oqsx_evp_ctx = NULL; ->>>>>>> 314b0f870e031f0bb0fc7a1c1a83a6441f0d595d ret->oqsx_provider_ctx.oqsx_qs_ctx.sig = OQS_SIG_new(oqs_name); if (!ret->oqsx_provider_ctx.oqsx_qs_ctx.sig) { fprintf( @@ -1378,10 +1370,7 @@ OQSX_KEY *oqsx_key_new(OSSL_LIB_CTX *libctx, char *oqs_name, char *tls_name, ret->comp_privkey = OPENSSL_malloc(sizeof(void *)); ret->comp_pubkey = OPENSSL_malloc(sizeof(void *)); ON_ERR_GOTO(!ret->comp_privkey || !ret->comp_pubkey, err); -<<<<<<< HEAD -======= ret->oqsx_provider_ctx.oqsx_evp_ctx = NULL; ->>>>>>> 314b0f870e031f0bb0fc7a1c1a83a6441f0d595d ret->oqsx_provider_ctx.oqsx_qs_ctx.kem = OQS_KEM_new(oqs_name); if (!ret->oqsx_provider_ctx.oqsx_qs_ctx.kem) { fprintf( @@ -1580,15 +1569,9 @@ void oqsx_key_free(OQSX_KEY *key) OQS_KEM_free(key->oqsx_provider_ctx.oqsx_qs_ctx.kem); else if (key->keytype == KEY_TYPE_ECP_HYB_KEM || key->keytype == KEY_TYPE_ECX_HYB_KEM) { -<<<<<<< HEAD - OQS_KEM_free(key->oqsx_provider_ctx[0].oqsx_qs_ctx.kem); - } else - OQS_SIG_free(key->oqsx_provider_ctx[0].oqsx_qs_ctx.sig); -======= OQS_KEM_free(key->oqsx_provider_ctx.oqsx_qs_ctx.kem); } else OQS_SIG_free(key->oqsx_provider_ctx.oqsx_qs_ctx.sig); ->>>>>>> 314b0f870e031f0bb0fc7a1c1a83a6441f0d595d EVP_PKEY_free(key->classical_pkey); if (key->oqsx_provider_ctx.oqsx_evp_ctx) { EVP_PKEY_CTX_free(key->oqsx_provider_ctx.oqsx_evp_ctx->ctx); @@ -1629,11 +1612,7 @@ int oqsx_key_allocate_keymaterial(OQSX_KEY *key, int include_private) aux = SIZE_OF_UINT32; if (!key->privkey && include_private) { -<<<<<<< HEAD - key->privkey = OPENSSL_secure_zalloc(key->privkeylen); -======= key->privkey = OPENSSL_secure_zalloc(key->privkeylen + aux); ->>>>>>> 314b0f870e031f0bb0fc7a1c1a83a6441f0d595d ON_ERR_SET_GOTO(!key->privkey, ret, 1, err_alloc); } if (!key->pubkey && !include_private) { @@ -1747,12 +1726,8 @@ static EVP_PKEY *oqsx_key_gen_evp_key(OQSX_EVP_CTX *ctx, unsigned char *pubkey, } ON_ERR_SET_GOTO(ret2 <= 0, ret, -1, errhyb); } -<<<<<<< HEAD - * / ret2 = EVP_PKEY_keygen(kgctx, &pkey); -======= ret2 = EVP_PKEY_keygen(kgctx, &pkey); ->>>>>>> 314b0f870e031f0bb0fc7a1c1a83a6441f0d595d ON_ERR_SET_GOTO(ret2 <= 0, ret, -2, errhyb); if (ctx->evp_info->raw_key_support) { @@ -1834,11 +1809,7 @@ int oqsx_key_gen(OQSX_KEY *key) || key->keytype == KEY_TYPE_ECX_HYB_KEM || key->keytype == KEY_TYPE_HYB_SIG) { pkey = oqsx_key_gen_evp_key(key->oqsx_provider_ctx.oqsx_evp_ctx, -<<<<<<< HEAD - key->pubkey, key->privkey); -======= key->pubkey, key->privkey, 1); ->>>>>>> 314b0f870e031f0bb0fc7a1c1a83a6441f0d595d ON_ERR_GOTO(pkey == NULL, err_gen); ret = !oqsx_key_set_composites(key); ON_ERR_GOTO(ret, err_gen);