Skip to content

Commit

Permalink
correcting rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Ventura <[email protected]>
  • Loading branch information
feventura committed Mar 16, 2024
1 parent 5c04304 commit 82bd7c9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
2 changes: 1 addition & 1 deletion oqsprov/oqs_sig.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
29 changes: 0 additions & 29 deletions oqsprov/oqsprov_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 82bd7c9

Please sign in to comment.