Bug 1261676 - Bustage fix, a=bustage
authorMartin Thomson <martin.thomson@gmail.com>
Tue, 10 May 2016 11:34:01 +1000
changeset 12151 58d4353a26460df0415e35d10984902d8f4bb099
parent 12150 39dd42b2a73184ea3e10067e066d0106e13eafc8
child 12152 6e306ca11104b659a5e5c24c40d7b8c4b51ba35e
push id1204
push usermartin.thomson@gmail.com
push dateTue, 10 May 2016 01:38:01 +0000
reviewersbustage
bugs1261676
Bug 1261676 - Bustage fix, a=bustage
lib/ssl/ssl3con.c
lib/ssl/tls13con.h
--- a/lib/ssl/ssl3con.c
+++ b/lib/ssl/ssl3con.c
@@ -998,17 +998,17 @@ tls13_PskSuiteEnabled(sslSocket *ss)
 {
     int i;
     const ssl3CipherSuiteDef *cipher_def;
 
     for (i = 0; i < ssl_V3_SUITES_IMPLEMENTED; ++i) {
         ssl3CipherSuiteCfg *suite = &ss->cipherSuites[i];
 
         cipher_def = ssl_LookupCipherSuiteDef(suite->cipher_suite);
-        if (authType == kea_defs[cipher_def->key_exchange_alg].authKeyType &&
+        if (ssl_auth_psk == kea_defs[cipher_def->key_exchange_alg].authKeyType &&
             config_match(suite, ss->ssl3.policy, PR_TRUE, &ss->vrange, ss)) {
             return PR_TRUE;
         }
     }
     return PR_FALSE;
 }
 
 /*
--- a/lib/ssl/tls13con.h
+++ b/lib/ssl/tls13con.h
@@ -38,16 +38,17 @@ PRBool tls13_InHsState(sslSocket *ss, ..
 
 SSLHashType tls13_GetHash(sslSocket *ss);
 CK_MECHANISM_TYPE tls13_GetHkdfMechanism(sslSocket *ss);
 void tls13_FatalError(sslSocket *ss, PRErrorCode prError,
                       SSL3AlertDescription desc);
 SECStatus tls13_SetupClientHello(sslSocket *ss);
 PRBool tls13_AllowPskCipher(const sslSocket *ss,
                             const ssl3CipherSuiteDef *cipher_def);
+PRBool tls13_PskSuiteEnabled(sslSocket *ss);
 SECStatus tls13_HandleClientHelloPart2(sslSocket *ss,
                                        const SECItem *suites,
                                        sslSessionID *sid);
 SECStatus tls13_HandleServerHelloPart2(sslSocket *ss);
 SECStatus tls13_HandlePostHelloHandshakeMessage(sslSocket *ss, SSL3Opaque *b,
                                                 PRUint32 length,
                                                 SSL3Hashes *hashesPtr);
 SECStatus tls13_HandleClientKeyShare(sslSocket *ss);