keygen element should not support < 2048 RSA key lengths
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Nov 2016 21:20:20 +0000 (21:20 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Nov 2016 21:20:20 +0000 (21:20 +0000)
commit497d0c1d3662edd0f477adff4d6b99a2f2b9539b
treea475df1b313921fc44b8305fb6c3c41df1cb9ab7
parent72ab6e96f4f9ba7a677d440e0880dfe9a0379bca
keygen element should not support < 2048 RSA key lengths
https://bugs.webkit.org/show_bug.cgi?id=164874
<rdar://problem/22618141>

Reviewed by Dean Jackson.

Source/WebCore:

Remove the two insecure RSA choices (512-bit and 1024-bit) so that users
do not accidentally select a bad key length.

Tested by fast/html/keygen.html

* platform/LocalizedStrings.cpp:
(WebCore::keygenMenuItem512): Deleted.
(WebCore::keygenMenuItem1024): Deleted.
* platform/LocalizedStrings.h:
* platform/mac/SSLKeyGeneratorMac.mm:
(WebCore::signedPublicKeyAndChallengeString): ASSERT on bad key size.
(WebCore::getSupportedKeySizes): Remove bad key sizes.
(WebCore::signedPublicKeyAndChallengeString): Ditto.
* platform/win/SSLKeyGeneratorWin.cpp:
(WebCore::WebCore::getSupportedKeySizes): Ditto.

LayoutTests:

* platform/mac/fast/html/keygen-expected.txt:
* platform/mac-elcapitan/fast/html/keygen-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac-elcapitan/fast/html/keygen-expected.txt
LayoutTests/platform/mac/fast/html/keygen-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/LocalizedStrings.cpp
Source/WebCore/platform/LocalizedStrings.h
Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm
Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp