Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: net/third_party/nss/patches/getrequestedclientcerttypes.patch

Issue 1882433002: Removing NSS files and USE_OPENSSL flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/third_party/nss/patches/getrequestedclientcerttypes.patch
diff --git a/net/third_party/nss/patches/getrequestedclientcerttypes.patch b/net/third_party/nss/patches/getrequestedclientcerttypes.patch
deleted file mode 100644
index d19c2280bf5b073837f973b7aceb50a286c179ab..0000000000000000000000000000000000000000
--- a/net/third_party/nss/patches/getrequestedclientcerttypes.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h
-index e905aab..9e57220 100644
---- a/lib/ssl/ssl.h
-+++ b/lib/ssl/ssl.h
-@@ -896,6 +896,17 @@ SSL_IMPORT SECStatus SSL_ReHandshakeWithTimeout(PRFileDesc *fd,
- PRBool flushCache,
- PRIntervalTime timeout);
-
-+/* Returns a SECItem containing the certificate_types field of the
-+** CertificateRequest message. Each byte of the data is a TLS
-+** ClientCertificateType value, and they are ordered from most preferred to
-+** least. This function should only be called from the
-+** SSL_GetClientAuthDataHook callback, and will return NULL if called at any
-+** other time. The returned value is valid only until the callback returns, and
-+** should not be freed.
-+*/
-+SSL_IMPORT const SECItem *
-+SSL_GetRequestedClientCertificateTypes(PRFileDesc *fd);
-+
- #ifdef SSL_DEPRECATED_FUNCTION
- /* deprecated!
- ** For the server, request a new handshake. For the client, begin a new
-diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c
-index b8d4784..784f59b 100644
---- a/lib/ssl/ssl3con.c
-+++ b/lib/ssl/ssl3con.c
-@@ -7674,6 +7674,9 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length)
- if (rv != SECSuccess)
- goto loser; /* malformed, alert has been sent */
-
-+ PORT_Assert(!ss->requestedCertTypes);
-+ ss->requestedCertTypes = &cert_types;
-+
- if (isTLS12) {
- rv = ssl3_ConsumeHandshakeVariable(ss, &algorithms, 2, &b, &length);
- if (rv != SECSuccess)
-@@ -7723,6 +7726,7 @@ loser:
- PORT_SetError(errCode);
- rv = SECFailure;
- done:
-+ ss->requestedCertTypes = NULL;
- if (arena != NULL)
- PORT_FreeArena(arena, PR_FALSE);
- return rv;
-diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h
-index 10361a0..5f0e6c9 100644
---- a/lib/ssl/sslimpl.h
-+++ b/lib/ssl/sslimpl.h
-@@ -1296,6 +1296,10 @@ struct sslSocketStr {
- unsigned int sizeCipherSpecs;
- const unsigned char *preferredCipher;
-
-+ /* TLS ClientCertificateTypes requested during HandleCertificateRequest. */
-+ /* Will be NULL at all other times. */
-+ const SECItem *requestedCertTypes;
-+
- ssl3KeyPair *stepDownKeyPair; /* RSA step down keys */
-
- const ssl3DHParams *dheParams; /* DHE param */
-diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c
-index 601df2a..7f97b14 100644
---- a/lib/ssl/sslsock.c
-+++ b/lib/ssl/sslsock.c
-@@ -2496,6 +2496,21 @@ SSL_HandshakeResumedSession(PRFileDesc *fd, PRBool *handshake_resumed)
- return SECSuccess;
- }
-
-+const SECItem *
-+SSL_GetRequestedClientCertificateTypes(PRFileDesc *fd)
-+{
-+ sslSocket *ss = ssl_FindSocket(fd);
-+
-+ if (!ss) {
-+ SSL_DBG(("%d: SSL[%d]: bad socket in "
-+ "SSL_GetRequestedClientCertificateTypes",
-+ SSL_GETPID(), fd));
-+ return NULL;
-+ }
-+
-+ return ss->requestedCertTypes;
-+}
-+
- /************************************************************************/
- /* The following functions are the TOP LEVEL SSL functions.
- ** They all get called through the NSPRIOMethods table below.
-@@ -3610,6 +3625,7 @@ ssl_NewSocket(PRBool makeLocks, SSLProtocolVariant protocolVariant)
- sc->serverKeyBits = 0;
- ss->certStatusArray[i] = NULL;
- }
-+ ss->requestedCertTypes = NULL;
- ss->stepDownKeyPair = NULL;
-
- ss->dheParams = NULL;
« no previous file with comments | « net/third_party/nss/patches/didhandshakeresume.patch ('k') | net/third_party/nss/patches/ignorechangecipherspec.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698