From daa3cd26f4b76b9a5dd50de4b87a2f6faf55caeb Mon Sep 17 00:00:00 2001 From: "wtc%google.com" Date: Fri, 8 Apr 2011 05:37:44 +0000 Subject: [PATCH] Bug 635778: Rename SSL_ConfigSecureServerWithChainOpt to SSL_ConfigSecureServerWithCertChain. List the certChainOpt argument immediately after the cert argument. Improve comments. Modified Files: ssl.def ssl.h sslsecur.c git-svn-id: svn://10.0.0.236/trunk@262164 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/nss/lib/ssl/ssl.def | 2 +- mozilla/security/nss/lib/ssl/ssl.h | 11 ++++++----- mozilla/security/nss/lib/ssl/sslsecur.c | 10 +++++----- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/mozilla/security/nss/lib/ssl/ssl.def b/mozilla/security/nss/lib/ssl/ssl.def index 8b040d22a35..e2b9005d965 100644 --- a/mozilla/security/nss/lib/ssl/ssl.def +++ b/mozilla/security/nss/lib/ssl/ssl.def @@ -154,7 +154,7 @@ SSL_SNISocketConfigHook; ;+}; ;+NSS_3.12.10 { # NSS 3.12.10 release ;+ global: -SSL_ConfigSecureServerWithChainOpt; +SSL_ConfigSecureServerWithCertChain; ;+ local: ;+*; ;+}; diff --git a/mozilla/security/nss/lib/ssl/ssl.h b/mozilla/security/nss/lib/ssl/ssl.h index 485404cae88..09699d72c65 100644 --- a/mozilla/security/nss/lib/ssl/ssl.h +++ b/mozilla/security/nss/lib/ssl/ssl.h @@ -36,7 +36,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: ssl.h,v 1.40 2011-03-10 04:29:04 alexei.volkov.bugs%sun.com Exp $ */ +/* $Id: ssl.h,v 1.41 2011-04-08 05:37:44 wtc%google.com Exp $ */ #ifndef __ssl_h_ #define __ssl_h_ @@ -373,12 +373,13 @@ SSL_IMPORT SECStatus SSL_ConfigSecureServer( SECKEYPrivateKey *key, SSLKEAType kea); /* -** Allows SSL socket configuration with caller certificate chain. +** Allows SSL socket configuration with caller-supplied certificate chain. +** If certChainOpt is NULL, tries to find one. */ SSL_IMPORT SECStatus -SSL_ConfigSecureServerWithChainOpt(PRFileDesc *fd, CERTCertificate *cert, - SECKEYPrivateKey *key, SSLKEAType kea, - const CERTCertificateList *certChainOpt); +SSL_ConfigSecureServerWithCertChain(PRFileDesc *fd, CERTCertificate *cert, + const CERTCertificateList *certChainOpt, + SECKEYPrivateKey *key, SSLKEAType kea); /* ** Configure a secure server's session-id cache. Define the maximum number diff --git a/mozilla/security/nss/lib/ssl/sslsecur.c b/mozilla/security/nss/lib/ssl/sslsecur.c index e788f28122f..e4eb135aada 100644 --- a/mozilla/security/nss/lib/ssl/sslsecur.c +++ b/mozilla/security/nss/lib/ssl/sslsecur.c @@ -37,7 +37,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: sslsecur.c,v 1.48 2011-03-10 04:29:04 alexei.volkov.bugs%sun.com Exp $ */ +/* $Id: sslsecur.c,v 1.49 2011-04-08 05:37:44 wtc%google.com Exp $ */ #include "cert.h" #include "secitem.h" #include "keyhi.h" @@ -757,13 +757,13 @@ SSL_ConfigSecureServer(PRFileDesc *fd, CERTCertificate *cert, SECKEYPrivateKey *key, SSL3KEAType kea) { - return SSL_ConfigSecureServerWithChainOpt(fd, cert, key, kea, NULL); + return SSL_ConfigSecureServerWithCertChain(fd, cert, NULL, key, kea); } SECStatus -SSL_ConfigSecureServerWithChainOpt(PRFileDesc *fd, CERTCertificate *cert, - SECKEYPrivateKey *key, SSL3KEAType kea, - const CERTCertificateList *certChainOpt) +SSL_ConfigSecureServerWithCertChain(PRFileDesc *fd, CERTCertificate *cert, + const CERTCertificateList *certChainOpt, + SECKEYPrivateKey *key, SSL3KEAType kea) { sslSocket *ss; SECKEYPublicKey *pubKey = NULL;