Bug 1078847 - GenerateAsymmetricKeyTask should allow generating key pairs where only the public key or the private key has any usages r=rbarnes

This commit is contained in:
Tim Taubert
2014-10-07 00:47:21 +02:00
parent 637b143fdd
commit a1fad13d55
2 changed files with 27 additions and 1 deletions

View File

@@ -2048,7 +2048,7 @@ public:
}
// If no usages ended up being allowed, DataError
if (!mKeyPair.mPrivateKey.get()->HasAnyUsage() ||
if (!mKeyPair.mPublicKey.get()->HasAnyUsage() &&
!mKeyPair.mPrivateKey.get()->HasAnyUsage()) {
mEarlyRv = NS_ERROR_DOM_DATA_ERR;
return;