Index: net/third_party/nss/ssl/ssl3con.c |
diff --git a/net/third_party/nss/ssl/ssl3con.c b/net/third_party/nss/ssl/ssl3con.c |
index 89c98eace8786bcf452dd9f1091c6aa5af4eefb2..861d434968c9140bfdf6b760ed5b78d397d3e37d 100644 |
--- a/net/third_party/nss/ssl/ssl3con.c |
+++ b/net/third_party/nss/ssl/ssl3con.c |
@@ -6946,7 +6946,8 @@ ssl3_HandleServerKeyExchange(sslSocket *ss, SSL3Opaque *b, PRUint32 length) |
if (rv != SECSuccess) { |
goto loser; /* malformed. */ |
} |
- if (dh_p.len < 512/8) { |
+ if (dh_p.len < 1024/8 || |
+ (dh_p.len == 1024/8 && (dh_p.data[0] & 0x80) == 0)) { |
errCode = SSL_ERROR_WEAK_SERVER_EPHEMERAL_DH_KEY; |
goto alert_loser; |
} |