Bug 1073867, Part 3: Reject DSS end-entity certificates, r=mmc

--HG--
extra : rebase_source : 76546b57aade1a15b394a2e53d8c12d62906dcac
This commit is contained in:
Brian Smith 2014-12-24 00:51:52 -08:00
parent 0dac548a3e
commit 257741f645

View File

@ -59,18 +59,18 @@ CheckPublicKeySize(Input subjectPublicKeyInfo, unsigned int minimumNonECCBits,
case ecKey:
// TODO(bug 1077790): We should check which curve.
return Success;
case dsaKey: // fall through
case rsaKey:
if (SECKEY_PublicKeyStrengthInBits(publicKey.get()) < minimumNonECCBits) {
return Result::ERROR_INADEQUATE_KEY_SIZE;
}
break;
case nullKey:
case fortezzaKey:
case dhKey:
case keaKey:
case rsaPssKey:
case rsaOaepKey:
case dsaKey: // fall through
case nullKey: // fall through
case fortezzaKey: // fall through
case dhKey: // fall through
case keaKey: // fall through
case rsaPssKey: // fall through
case rsaOaepKey: // fall through
default:
return Result::ERROR_UNSUPPORTED_KEYALG;
}