diff options
author | relyea%netscape.com <devnull@localhost> | 2001-03-29 06:28:21 +0000 |
---|---|---|
committer | relyea%netscape.com <devnull@localhost> | 2001-03-29 06:28:21 +0000 |
commit | 1b2c3aec2c43c3050d0008b93008bd2d318a10b1 (patch) | |
tree | 23ed7d0140a091f75e13ddfb81128ec4c4d34438 | |
parent | 7343b1835a3c6f1225c97dfdba13b6d8138291b8 (diff) | |
download | nss-hg-1b2c3aec2c43c3050d0008b93008bd2d318a10b1.tar.gz |
Sigh, try to get reasonable error messages back to the application. in this
case bad password.
-rw-r--r-- | security/nss/lib/pkcs12/p12d.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/security/nss/lib/pkcs12/p12d.c b/security/nss/lib/pkcs12/p12d.c index f822a7778..9abae13c8 100644 --- a/security/nss/lib/pkcs12/p12d.c +++ b/security/nss/lib/pkcs12/p12d.c @@ -703,6 +703,9 @@ sec_pkcs12_decoder_safe_contents_callback(void *arg, const char *buf, /* update the decoder */ rv = SEC_ASN1DecoderUpdate(safeContentsCtx->safeContentsDcx, buf, len); if(rv != SECSuccess) { + /* if we fail while trying to decode a 'safe', it's probably because + * we didn't have the correct password. */ + PORT_SetError(SEC_ERROR_BAD_PASSWORD); p12dcx->errorValue = SEC_ERROR_PKCS12_CORRUPT_PFX_STRUCTURE; goto loser; } |