Skip to content

Commit

Permalink
bugfix changes
Browse files Browse the repository at this point in the history
  • Loading branch information
feventura committed Dec 13, 2023
1 parent ba0562f commit e311212
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion oqsprov/oqs_prov.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void oqsx_freeprovctx(PROV_OQS_CTX *ctx);
#endif

/* helper structure for classic key components in hybrid keys.
* Actual tables in oqsprov_keys.ce
* Actual tables in oqsprov_keys.c
*/
struct oqsx_evp_info_st {
int keytype;
Expand Down
6 changes: 5 additions & 1 deletion oqsprov/oqsprov.c
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,11 @@ int get_composite_idx(int idx)
for (i = 0; i <= 7; i++) { // 7 dots in composite OID
token = strtok_r(NULL, ".", &s);
}
i = atoi(token);
if (token != NULL) {
i = atoi(token);
} else {
i = -1;
}
OPENSSL_free(first_token);
return i;
}
Expand Down
6 changes: 4 additions & 2 deletions oqsprov/oqsprov_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,12 @@ EVP_PKEY *setECParams(EVP_PKEY *eck, int nid)
return d2i_KeyParams(EVP_PKEY_EC, &eck, &params, sizeof(bp384params));
case NID_ED25519:
params = ed25519params;
return d2i_KeyParams(EVP_PKEY_EC, &eck, &params, sizeof(ed25519params));
return d2i_KeyParams(EVP_PKEY_ED25519, &eck, &params,
sizeof(ed25519params));
case NID_ED448:
params = ed448params;
return d2i_KeyParams(EVP_PKEY_EC, &eck, &params, sizeof(ed448params));
return d2i_KeyParams(EVP_PKEY_ED448, &eck, &params,
sizeof(ed448params));
default:
return NULL;
}
Expand Down

0 comments on commit e311212

Please sign in to comment.