diff options
author | Martin Thomson <mt@lowentropy.net> | 2022-01-07 04:43:39 +0000 |
---|---|---|
committer | Martin Thomson <mt@lowentropy.net> | 2022-01-07 04:43:39 +0000 |
commit | cd158de5e84e4cb3671dfac59e444713a357b946 (patch) | |
tree | 2b21e50199d199c1216ef1e16aaf012a26c3941e /cmd/makepqg | |
parent | 1df5a8d88a8be739067f27c18902ef08585e8b33 (diff) | |
download | nss-hg-cd158de5e84e4cb3671dfac59e444713a357b946.tar.gz |
Bug 1747327 - check return on NSS_NoDB_Init and NSS_Shutdown, r=nss-reviewers,bbeurdouche
Differential Revision: https://phabricator.services.mozilla.com/D134573
Diffstat (limited to 'cmd/makepqg')
-rw-r--r-- | cmd/makepqg/makepqg.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/makepqg/makepqg.c b/cmd/makepqg/makepqg.c index 85f8218ff..043a236a8 100644 --- a/cmd/makepqg/makepqg.c +++ b/cmd/makepqg/makepqg.c @@ -295,7 +295,9 @@ main(int argc, char **argv) outFile = stdout; } - NSS_NoDB_Init(NULL); + if (NSS_NoDB_Init(NULL) != SECSuccess) { + return 1; + } if (keySizeInBits > 1024 || qSizeInBits != 0) { rv = PK11_PQG_ParamGenV2((unsigned)keySizeInBits, @@ -340,6 +342,9 @@ main(int argc, char **argv) PK11_PQG_DestroyParams(pqgParams); PK11_PQG_DestroyVerify(pqgVerify); + if (NSS_Shutdown() != SECSuccess) { + return 1; + } return 0; loser: |