diff options
author | Wan-Teh Chang <wtc@google.com> | 2014-01-10 15:34:54 -0800 |
---|---|---|
committer | Wan-Teh Chang <wtc@google.com> | 2014-01-10 15:34:54 -0800 |
commit | f1bc4954a09f2d2a34812b501aa4a6e7980fca5e (patch) | |
tree | 4efebbce9509a032cdf60477e11486334db51a1e | |
parent | 562721f8b5a39174582e9f1a9d5d5efa62e0fde2 (diff) | |
download | nss-hg-f1bc4954a09f2d2a34812b501aa4a6e7980fca5e.tar.gz |
Bug 957727: Fix incorrect parentheses around the key object attribute
checks for CKK_NSS_JPAKE_ROUND1 in sftk_handlePrivateKeyObject. Fix a
missing break statement in NSC_GenerateKey. r=briansmith.
-rw-r--r-- | lib/softoken/pkcs11.c | 4 | ||||
-rw-r--r-- | lib/softoken/pkcs11c.c | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/softoken/pkcs11.c b/lib/softoken/pkcs11.c index 50a0109c2..db0ead409 100644 --- a/lib/softoken/pkcs11.c +++ b/lib/softoken/pkcs11.c @@ -1103,9 +1103,9 @@ sftk_handlePrivateKeyObject(SFTKSession *session,SFTKObject *object,CK_KEY_TYPE break; #endif /* NSS_ENABLE_ECC */ case CKK_NSS_JPAKE_ROUND1: - if (!sftk_hasAttribute(object, CKA_PRIME || + if (!sftk_hasAttribute(object, CKA_PRIME) || !sftk_hasAttribute(object, CKA_SUBPRIME) || - !sftk_hasAttribute(object, CKA_BASE))) { + !sftk_hasAttribute(object, CKA_BASE)) { return CKR_TEMPLATE_INCOMPLETE; } /* fall through */ diff --git a/lib/softoken/pkcs11c.c b/lib/softoken/pkcs11c.c index 8093dca7a..d50f9dc03 100644 --- a/lib/softoken/pkcs11c.c +++ b/lib/softoken/pkcs11c.c @@ -3906,6 +3906,7 @@ jpake1: } if (sftk_isTrue(key, CKA_TOKEN)) { crv = CKR_TEMPLATE_INCONSISTENT; + break; } crv = CKR_OK; break; |