Skip to content

Commit

Permalink
(xmlsec-nss) Ensure NSS algorithms are initialized (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsh123 authored Jan 13, 2024
1 parent 6ec8dd4 commit 356fdcf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/nss/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,16 @@ xmlSecCryptoGetFunctions_nss(void) {

static void
xmlSecNssUpdateAvailableCryptoTransforms(xmlSecCryptoDLFunctionsPtr functions) {
SECStatus rv;
xmlSecAssert(functions != NULL);

/* in theory NSS should be already initialized but just in case */
rv = SECOID_Init();
if (rv != SECSuccess) {
xmlSecNssError("SECOID_Init", NULL);
return;
}

/******************************* AES ********************************/
/* cbc */
if (xmlSecNssCryptoCheckAlgorithm(SEC_OID_AES_128_CBC) == 0) {
Expand Down

0 comments on commit 356fdcf

Please sign in to comment.