diff options
author | Marcin Cieślak <saper@saper.info> | 2022-04-04 16:53:24 +0000 |
---|---|---|
committer | Marcin Cieślak <saper@saper.info> | 2022-04-04 16:53:24 +0000 |
commit | d2ed187a78f8f4ba1759c45825389bc40fcf2a05 (patch) | |
tree | 9dfebde324602d428cc4c360922353198247eb56 /lib | |
parent | 99edc1108d4fba6cf5c62c48cc2b2434893eb4f1 (diff) | |
download | nss-hg-d2ed187a78f8f4ba1759c45825389bc40fcf2a05.tar.gz |
Bug 1760813 - Make SEC_PKCS12EnableCipher succeed r=rrelyea
Differential Revision: https://phabricator.services.mozilla.com/D142247
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pkcs12/p12plcy.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/pkcs12/p12plcy.c b/lib/pkcs12/p12plcy.c index 394e07be5..5c1754dce 100644 --- a/lib/pkcs12/p12plcy.c +++ b/lib/pkcs12/p12plcy.c @@ -85,17 +85,12 @@ SECStatus SEC_PKCS12EnableCipher(long which, int on) { int i; - SECStatus rv; PRUint32 set = on ? NSS_USE_ALG_IN_PKCS12 : 0; PRUint32 clear = on ? 0 : NSS_USE_ALG_IN_PKCS12; for (i = 0; pkcs12SuiteMaps[i].suite != 0L; i++) { if (pkcs12SuiteMaps[i].suite == (unsigned long)which) { - rv = NSS_SetAlgorithmPolicy(pkcs12SuiteMaps[i].algTag, set, clear); - /* could fail if the policy has been locked */ - if (rv != SECSuccess) { - return rv; - } + return NSS_SetAlgorithmPolicy(pkcs12SuiteMaps[i].algTag, set, clear); } } PORT_SetError(SEC_ERROR_INVALID_ALGORITHM); |