Skip to content

Commit

Permalink
fix casting
Browse files Browse the repository at this point in the history
  • Loading branch information
feventura committed Mar 12, 2024
1 parent 2950737 commit 045c411
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions oqsprov/oqsprov_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ OQSX_KEY *oqsx_key_from_x509pubkey(const X509_PUBKEY *xpk, OSSL_LIB_CTX *libctx,
}
oqsx = oqsx_key_op(palg, p, plen, KEY_OP_PUBLIC, libctx, propq);
if (get_keytype(OBJ_obj2nid(palg->algorithm)) == KEY_TYPE_CMP_SIG)
OPENSSL_clear_free((void *)p, plen);
OPENSSL_clear_free((unsigned char *)p, plen);
return oqsx;
}

Expand Down Expand Up @@ -1284,7 +1284,7 @@ OQSX_KEY *oqsx_key_from_pkcs8(const PKCS8_PRIV_KEY_INFO *p8inf,
if (get_keytype(OBJ_obj2nid(palg->algorithm)) != KEY_TYPE_CMP_SIG) {
ASN1_OCTET_STRING_free(oct);
} else {
OPENSSL_clear_free((void *)p,
OPENSSL_clear_free((unsigned char *)p,
plen); // for COMPOSITE p include both privkey
}
return oqsx;
Expand Down

0 comments on commit 045c411

Please sign in to comment.