Skip to content

Commit

Permalink
Merge branch 'main' into extmu-ml-dsa
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemas authored Jan 16, 2025
2 parents 195779c + 5276f78 commit 75ccaf5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions crypto/evp_extra/p_pqdsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ static int pkey_pqdsa_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) {
static int pkey_pqdsa_sign_generic(EVP_PKEY_CTX *ctx, uint8_t *sig,
size_t *sig_len, const uint8_t *message,
size_t message_len, int sign_digest) {
GUARD_PTR(sig_len);

PQDSA_PKEY_CTX *dctx = ctx->data;
const PQDSA *pqdsa = dctx->pqdsa;
if (pqdsa == NULL) {
Expand All @@ -71,10 +73,8 @@ static int pkey_pqdsa_sign_generic(EVP_PKEY_CTX *ctx, uint8_t *sig,

// Caller is getting parameter values.
if (sig == NULL) {
if (sig_len != NULL) {
*sig_len = pqdsa->signature_len;
return 1;
}
*sig_len = pqdsa->signature_len;
return 1;
}

if (*sig_len != pqdsa->signature_len) {
Expand Down
2 changes: 1 addition & 1 deletion crypto/pkcs8/pkcs8_x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, const char *pass,
int pass_len_in, const uint8_t *salt, size_t salt_len,
int iterations, PKCS8_PRIV_KEY_INFO *p8inf) {
size_t pass_len;
if (pass_len_in == -1 && pass != NULL) {
if (pass_len_in < 0 && pass != NULL) {
pass_len = strlen(pass);
} else {
pass_len = (size_t)pass_len_in;
Expand Down

0 comments on commit 75ccaf5

Please sign in to comment.