зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1025729: Update NSS to NSS_3_17_BETA1.
Also includes fixes for bug 836658, bug 1026148, bug 1028582, bug 920719.
This commit is contained in:
Родитель
4438cae9d2
Коммит
22a38b2f79
2
CLOBBER
2
CLOBBER
|
@ -22,4 +22,4 @@
|
|||
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
|
||||
# don't change CLOBBER for WebIDL changes any more.
|
||||
|
||||
Bug 1038799 - And be wary of your ccache too.
|
||||
Clobber to work around bug 959928.
|
||||
|
|
|
@ -1 +1 @@
|
|||
NSS_3_16_3_RTM
|
||||
NSS_3_17_BETA1
|
||||
|
|
|
@ -1,170 +1,170 @@
|
|||
<HTML>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (WinNT; U) [Netscape]">
|
||||
<META NAME="Author" CONTENT="Steve Parkinson">
|
||||
<TITLE>SSLTap - manual</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
|
||||
<H1>
|
||||
SSLTap Manual page</H1>
|
||||
|
||||
<H3>
|
||||
Summary</H3>
|
||||
A command-line proxy which is SSL-aware. It snoops on TCP connections,
|
||||
and displays the data going by, including SSL records and handshaking
|
||||
if the connection is SSL.
|
||||
<H3>
|
||||
Synopsis</H3>
|
||||
<TT>ssltap [-vhfsxl] [-p port] hostname:port</TT>
|
||||
|
||||
<P><TT> -v [prints version string]</TT>
|
||||
<BR><TT> -h [outputs hex instead
|
||||
of ASCII]</TT>
|
||||
<BR><TT> -f [turn on Fancy HTML
|
||||
coloring]</TT>
|
||||
<BR><TT> -s [turn on SSL decoding]</TT>
|
||||
<BR><TT> -x [turn on extra SSL
|
||||
hex dumps]</TT>
|
||||
<BR><TT> -p port [specify rendezvous port (default 1924)]</TT>
|
||||
<BR><TT> -l [loop - continue
|
||||
to wait for more connections]</TT>
|
||||
<H3>
|
||||
Description</H3>
|
||||
SSLTap opens a socket on a rendezvous port, and waits for an incoming connection
|
||||
(client side). Once this connection arrives, SSLTap makes another connection
|
||||
to hostname:port (server side). It passes any data sent by the client to
|
||||
the server, and vice versa. However, SSLTap will also display the data
|
||||
to the console. It can do this for plain HTTP connections, or any TCP protocol.
|
||||
However, SSLTap can also work with SSL streams, as detailed below.
|
||||
|
||||
<P>Let's assume your development machine is called 'intercept'. The simplest
|
||||
usage of SSLTap is to run the command <TT>'ssltap www.netscape.com:80'</TT>
|
||||
on intercept. The program will wait for an incoming connection on port
|
||||
1924. Next you would want to go to your browser, and enter the URL http://intercept:1924.
|
||||
The page retrieved by the browser will actually be gotten from the server
|
||||
at www.netscape.com, but will go via SSLTap.
|
||||
|
||||
<P>Data sent from the client to the server is surrounded by a '--> [ ]'
|
||||
symbol, and data sent from the server to the client, a '<---[
|
||||
]' symbol.
|
||||
|
||||
<P>You'll notice that the page retrieved with this example looks incomplete.
|
||||
This is because SSLTap by default closes down after the first connection
|
||||
is complete, so the browser is not able to load images. To make the SSLTap
|
||||
continue to accept connections, switch on looping mode with the -l option.
|
||||
|
||||
<P>You can change the default rendezvous port to something else with the
|
||||
-p option.
|
||||
|
||||
<P>The remaining options change the way the output is produced.
|
||||
|
||||
<P>The -f option prints 'fancy' output - in colored HTML. Data sent from
|
||||
the client to the server is in blue. The server's reply is in red. This
|
||||
is designed so you can load the output up into a browser. When used with
|
||||
looping mode, the different connections are separated with horizontal lines.
|
||||
|
||||
<P>-x will turn on HEX printing. Instead of being output as ascii, the
|
||||
data is shown as Hex, like this:
|
||||
<UL><TT><-- [</TT>
|
||||
<BR><TT> 0: 56 d5 16 3e a1 6b b1 4a 8f 67 c4 d7
|
||||
21 2f 6f dd | V..>.k.J.g..!/o.</TT>
|
||||
<BR><TT> 10: bb 22 c4 75 8c f4 ce 28 16 a6 20 aa
|
||||
fb 9a 59 a1 | .".u...(.. ...Y.</TT>
|
||||
<BR><TT> 20: 51 91 14 d2 fc 9f a7 ea 4d 9c f7 3a
|
||||
9d 83 62 4a | Q.......M..:..bJ</TT>
|
||||
<BR><TT>]</TT>
|
||||
<BR> </UL>
|
||||
|
||||
<H4>
|
||||
SSL Parse mode</H4>
|
||||
The following options deal with SSL connections.
|
||||
<UL>-s will turn on SSL parsing. (SSLTap doesn't automatically detect SSL
|
||||
sessions.)
|
||||
<BR>-x will turn on extra SSL hexdumps. Mostly, if SSL can decode the data,
|
||||
it doesn't display the hex.</UL>
|
||||
The following SSL3 Data structures are parsed: Handshake, ClientHello,
|
||||
ServerHello, CertificateChain, Certificate. In addition, SSL2 ClientHello,
|
||||
ServerHello, ClientMasterKey are also partly parsed. NO DECRYPTION IS PERFORMED
|
||||
ON THE DATA. SSLTAP CANNOT DECRYPT the data.
|
||||
|
||||
<P>If a certificate chain is detected, DER-encoded certificates will be
|
||||
saved into files in the current directory called 'cert.0x' where x is the
|
||||
sequence number of the certificate.
|
||||
<BR>
|
||||
<H3>
|
||||
Operation Hints</H3>
|
||||
Often, you'll find that the server certificate does not get transferred,
|
||||
or other parts of the handshake do not happen. This is because the browser
|
||||
is taking advantage of session-id-reuse (using the handshake results from
|
||||
a previous session). If you restart the browser, it'll clear the session
|
||||
id cache.
|
||||
|
||||
<P>If you run the ssltap on a different machine that the ssl server you're
|
||||
trying to connect to, the browser will complain that the host name you're
|
||||
trying to connect to is different to the certificate, but it will still
|
||||
let you connect, after showing you a dialog.
|
||||
<H3>
|
||||
Bugs</H3>
|
||||
Please contact <A HREF="mailto:ssltap-support@netscape.com">ssltap-support@netscape.com</A>
|
||||
for bug reports.
|
||||
<H3>
|
||||
History</H3>
|
||||
2.1 - First public release (March 1998)
|
||||
<BR>
|
||||
<H3>
|
||||
Other</H3>
|
||||
For reference, here is a table of some well-known port numbers:
|
||||
<BR>
|
||||
<TABLE BORDER=2 >
|
||||
<TR>
|
||||
<TD>HTTP</TD>
|
||||
|
||||
<TD>80</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>SMTP</TD>
|
||||
|
||||
<TD>25</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>HTTPS</TD>
|
||||
|
||||
<TD>443</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>FTP</TD>
|
||||
|
||||
<TD>21</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>IMAPS</TD>
|
||||
|
||||
<TD>993</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>NNTP</TD>
|
||||
|
||||
<TD>119</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>NNTPS</TD>
|
||||
|
||||
<TD>563</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<P>
|
||||
</BODY>
|
||||
</HTML>
|
||||
<HTML>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (WinNT; U) [Netscape]">
|
||||
<META NAME="Author" CONTENT="Steve Parkinson">
|
||||
<TITLE>SSLTap - manual</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
|
||||
<H1>
|
||||
SSLTap Manual page</H1>
|
||||
|
||||
<H3>
|
||||
Summary</H3>
|
||||
A command-line proxy which is SSL-aware. It snoops on TCP connections,
|
||||
and displays the data going by, including SSL records and handshaking
|
||||
if the connection is SSL.
|
||||
<H3>
|
||||
Synopsis</H3>
|
||||
<TT>ssltap [-vhfsxl] [-p port] hostname:port</TT>
|
||||
|
||||
<P><TT> -v [prints version string]</TT>
|
||||
<BR><TT> -h [outputs hex instead
|
||||
of ASCII]</TT>
|
||||
<BR><TT> -f [turn on Fancy HTML
|
||||
coloring]</TT>
|
||||
<BR><TT> -s [turn on SSL decoding]</TT>
|
||||
<BR><TT> -x [turn on extra SSL
|
||||
hex dumps]</TT>
|
||||
<BR><TT> -p port [specify rendezvous port (default 1924)]</TT>
|
||||
<BR><TT> -l [loop - continue
|
||||
to wait for more connections]</TT>
|
||||
<H3>
|
||||
Description</H3>
|
||||
SSLTap opens a socket on a rendezvous port, and waits for an incoming connection
|
||||
(client side). Once this connection arrives, SSLTap makes another connection
|
||||
to hostname:port (server side). It passes any data sent by the client to
|
||||
the server, and vice versa. However, SSLTap will also display the data
|
||||
to the console. It can do this for plain HTTP connections, or any TCP protocol.
|
||||
However, SSLTap can also work with SSL streams, as detailed below.
|
||||
|
||||
<P>Let's assume your development machine is called 'intercept'. The simplest
|
||||
usage of SSLTap is to run the command <TT>'ssltap www.netscape.com:80'</TT>
|
||||
on intercept. The program will wait for an incoming connection on port
|
||||
1924. Next you would want to go to your browser, and enter the URL http://intercept:1924.
|
||||
The page retrieved by the browser will actually be gotten from the server
|
||||
at www.netscape.com, but will go via SSLTap.
|
||||
|
||||
<P>Data sent from the client to the server is surrounded by a '--> [ ]'
|
||||
symbol, and data sent from the server to the client, a '<---[
|
||||
]' symbol.
|
||||
|
||||
<P>You'll notice that the page retrieved with this example looks incomplete.
|
||||
This is because SSLTap by default closes down after the first connection
|
||||
is complete, so the browser is not able to load images. To make the SSLTap
|
||||
continue to accept connections, switch on looping mode with the -l option.
|
||||
|
||||
<P>You can change the default rendezvous port to something else with the
|
||||
-p option.
|
||||
|
||||
<P>The remaining options change the way the output is produced.
|
||||
|
||||
<P>The -f option prints 'fancy' output - in colored HTML. Data sent from
|
||||
the client to the server is in blue. The server's reply is in red. This
|
||||
is designed so you can load the output up into a browser. When used with
|
||||
looping mode, the different connections are separated with horizontal lines.
|
||||
|
||||
<P>-x will turn on HEX printing. Instead of being output as ascii, the
|
||||
data is shown as Hex, like this:
|
||||
<UL><TT><-- [</TT>
|
||||
<BR><TT> 0: 56 d5 16 3e a1 6b b1 4a 8f 67 c4 d7
|
||||
21 2f 6f dd | V..>.k.J.g..!/o.</TT>
|
||||
<BR><TT> 10: bb 22 c4 75 8c f4 ce 28 16 a6 20 aa
|
||||
fb 9a 59 a1 | .".u...(.. ...Y.</TT>
|
||||
<BR><TT> 20: 51 91 14 d2 fc 9f a7 ea 4d 9c f7 3a
|
||||
9d 83 62 4a | Q.......M..:..bJ</TT>
|
||||
<BR><TT>]</TT>
|
||||
<BR> </UL>
|
||||
|
||||
<H4>
|
||||
SSL Parse mode</H4>
|
||||
The following options deal with SSL connections.
|
||||
<UL>-s will turn on SSL parsing. (SSLTap doesn't automatically detect SSL
|
||||
sessions.)
|
||||
<BR>-x will turn on extra SSL hexdumps. Mostly, if SSL can decode the data,
|
||||
it doesn't display the hex.</UL>
|
||||
The following SSL3 Data structures are parsed: Handshake, ClientHello,
|
||||
ServerHello, CertificateChain, Certificate. In addition, SSL2 ClientHello,
|
||||
ServerHello, ClientMasterKey are also partly parsed. NO DECRYPTION IS PERFORMED
|
||||
ON THE DATA. SSLTAP CANNOT DECRYPT the data.
|
||||
|
||||
<P>If a certificate chain is detected, DER-encoded certificates will be
|
||||
saved into files in the current directory called 'cert.0x' where x is the
|
||||
sequence number of the certificate.
|
||||
<BR>
|
||||
<H3>
|
||||
Operation Hints</H3>
|
||||
Often, you'll find that the server certificate does not get transferred,
|
||||
or other parts of the handshake do not happen. This is because the browser
|
||||
is taking advantage of session-id-reuse (using the handshake results from
|
||||
a previous session). If you restart the browser, it'll clear the session
|
||||
id cache.
|
||||
|
||||
<P>If you run the ssltap on a different machine that the ssl server you're
|
||||
trying to connect to, the browser will complain that the host name you're
|
||||
trying to connect to is different to the certificate, but it will still
|
||||
let you connect, after showing you a dialog.
|
||||
<H3>
|
||||
Bugs</H3>
|
||||
Please contact <A HREF="mailto:ssltap-support@netscape.com">ssltap-support@netscape.com</A>
|
||||
for bug reports.
|
||||
<H3>
|
||||
History</H3>
|
||||
2.1 - First public release (March 1998)
|
||||
<BR>
|
||||
<H3>
|
||||
Other</H3>
|
||||
For reference, here is a table of some well-known port numbers:
|
||||
<BR>
|
||||
<TABLE BORDER=2 >
|
||||
<TR>
|
||||
<TD>HTTP</TD>
|
||||
|
||||
<TD>80</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>SMTP</TD>
|
||||
|
||||
<TD>25</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>HTTPS</TD>
|
||||
|
||||
<TD>443</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>FTP</TD>
|
||||
|
||||
<TD>21</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>IMAPS</TD>
|
||||
|
||||
<TD>993</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>NNTP</TD>
|
||||
|
||||
<TD>119</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD>NNTPS</TD>
|
||||
|
||||
<TD>563</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<P>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
|
|
@ -44,6 +44,8 @@ else
|
|||
# VC10 (2010) is 16.00.30319.01, VC10SP1 is 16.00.40219.01.
|
||||
_MSC_VER_GE_10SP1 := $(shell expr $(_MSC_VER) \> 1600 \| \
|
||||
$(_MSC_VER) = 1600 \& $(_CC_RELEASE) \>= 40219)
|
||||
# VC11 (2012).
|
||||
_MSC_VER_GE_11 := $(shell expr $(_MSC_VER) \>= 1700)
|
||||
# VC12 (2013).
|
||||
_MSC_VER_GE_12 := $(shell expr $(_MSC_VER) \>= 1800)
|
||||
ifeq ($(_CC_VMAJOR),14)
|
||||
|
@ -177,6 +179,11 @@ ifneq ($(_MSC_VER),$(_MSC_VER_6))
|
|||
-we4015 -we4028 -we4033 -we4035 -we4045 -we4047 -we4053 -we4054 -we4063 \
|
||||
-we4064 -we4078 -we4087 -we4090 -we4098 -we4390 -we4551 -we4553 -we4715
|
||||
|
||||
# VS2012 defaults to -arch:SSE2. Use -arch:IA32 to avoid requiring SSE2.
|
||||
ifeq ($(_MSC_VER_GE_11),1)
|
||||
OS_CFLAGS += -arch:IA32
|
||||
endif
|
||||
|
||||
ifeq ($(_MSC_VER_GE_12),1)
|
||||
OS_CFLAGS += -FS
|
||||
endif
|
||||
|
|
|
@ -10,3 +10,4 @@
|
|||
*/
|
||||
|
||||
#error "Do not include this header file."
|
||||
|
||||
|
|
|
@ -1167,7 +1167,7 @@ CERT_DecodeNameConstraintsExtension(PLArenaPool *arena,
|
|||
/* returns addr of a NULL termainated array of pointers to CERTAuthInfoAccess */
|
||||
extern CERTAuthInfoAccess **
|
||||
CERT_DecodeAuthInfoAccessExtension(PLArenaPool *reqArena,
|
||||
SECItem *encodedExtension);
|
||||
const SECItem *encodedExtension);
|
||||
|
||||
extern CERTPrivKeyUsagePeriod *
|
||||
CERT_DecodePrivKeyUsagePeriodExtension(PLArenaPool *arena, SECItem *extnValue);
|
||||
|
|
|
@ -226,7 +226,7 @@ CERT_DecodeNameConstraintsExtension(PLArenaPool *arena,
|
|||
|
||||
CERTAuthInfoAccess **
|
||||
CERT_DecodeAuthInfoAccessExtension(PLArenaPool *reqArena,
|
||||
SECItem *encodedExtension)
|
||||
const SECItem *encodedExtension)
|
||||
{
|
||||
CERTAuthInfoAccess **info = NULL;
|
||||
SECStatus rv;
|
||||
|
|
|
@ -7863,13 +7863,13 @@ s_mp_sqr_comba_4 PROC
|
|||
mov rsi, rdx
|
||||
|
||||
push rbp
|
||||
push rbx
|
||||
sub rsp, 80
|
||||
mov r11, rsi
|
||||
xor esi, esi
|
||||
mov r10, rsi
|
||||
mov rbp, rsi
|
||||
mov r8, rsi
|
||||
push rbx
|
||||
mov rbx, rsi
|
||||
mov rcx, qword ptr [16+rdi]
|
||||
mov rdi, rsi
|
||||
|
|
|
@ -33,12 +33,12 @@
|
|||
* The format of the version string should be
|
||||
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <ECC>][ <Beta>]"
|
||||
*/
|
||||
#define NSS_VERSION "3.16.3" _NSS_ECC_STRING _NSS_CUSTOMIZED
|
||||
#define NSS_VERSION "3.17" _NSS_ECC_STRING _NSS_CUSTOMIZED " Beta"
|
||||
#define NSS_VMAJOR 3
|
||||
#define NSS_VMINOR 16
|
||||
#define NSS_VPATCH 3
|
||||
#define NSS_VMINOR 17
|
||||
#define NSS_VPATCH 0
|
||||
#define NSS_VBUILD 0
|
||||
#define NSS_BETA PR_FALSE
|
||||
#define NSS_BETA PR_TRUE
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
|
|
|
@ -982,12 +982,10 @@ PK11_ImportCert(PK11SlotInfo *slot, CERTCertificate *cert,
|
|||
*/
|
||||
nssPKIObject_AddInstance(&c->object, certobj);
|
||||
/* nssTrustDomain_AddCertsToCache may release a reference to 'c' and
|
||||
* replace 'c' by a different value. So we add a reference to 'c' to
|
||||
* replace 'c' with a different value. So we add a reference to 'c' to
|
||||
* prevent 'c' from being destroyed. */
|
||||
nssCertificate_AddRef(c);
|
||||
nssTrustDomain_AddCertsToCache(STAN_GetDefaultTrustDomain(), &c, 1);
|
||||
/* XXX should we pass the original value of 'c' to
|
||||
* STAN_ForceCERTCertificateUpdate? */
|
||||
(void)STAN_ForceCERTCertificateUpdate(c);
|
||||
nssCertificate_Destroy(c);
|
||||
SECITEM_FreeItem(keyID,PR_TRUE);
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
* The format of the version string should be
|
||||
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <ECC>][ <Beta>]"
|
||||
*/
|
||||
#define SOFTOKEN_VERSION "3.16.3" SOFTOKEN_ECC_STRING
|
||||
#define SOFTOKEN_VERSION "3.17" SOFTOKEN_ECC_STRING " Beta"
|
||||
#define SOFTOKEN_VMAJOR 3
|
||||
#define SOFTOKEN_VMINOR 16
|
||||
#define SOFTOKEN_VPATCH 3
|
||||
#define SOFTOKEN_VMINOR 17
|
||||
#define SOFTOKEN_VPATCH 0
|
||||
#define SOFTOKEN_VBUILD 0
|
||||
#define SOFTOKEN_BETA PR_FALSE
|
||||
#define SOFTOKEN_BETA PR_TRUE
|
||||
|
||||
#endif /* _SOFTKVER_H_ */
|
||||
|
|
|
@ -182,6 +182,12 @@ SSL_IMPORT PRFileDesc *DTLS_ImportFD(PRFileDesc *model, PRFileDesc *fd);
|
|||
*/
|
||||
#define SSL_ENABLE_ALPN 26
|
||||
|
||||
/* SSL_REUSE_SERVER_ECDHE_KEY controls whether the ECDHE server key is
|
||||
* reused for multiple handshakes or generated each time.
|
||||
* SSL_REUSE_SERVER_ECDHE_KEY is currently enabled by default.
|
||||
*/
|
||||
#define SSL_REUSE_SERVER_ECDHE_KEY 27
|
||||
|
||||
#ifdef SSL_DEPRECATED_FUNCTION
|
||||
/* Old deprecated function names */
|
||||
SSL_IMPORT SECStatus SSL_Enable(PRFileDesc *fd, int option, PRBool on);
|
||||
|
|
|
@ -505,28 +505,21 @@ ssl3_ECRegister(void)
|
|||
return (PRStatus)rv;
|
||||
}
|
||||
|
||||
/* CallOnce function, called once for each named curve. */
|
||||
static PRStatus
|
||||
ssl3_CreateECDHEphemeralKeyPair(void * arg)
|
||||
/* Create an ECDHE key pair for a given curve */
|
||||
static SECStatus
|
||||
ssl3_CreateECDHEphemeralKeyPair(ECName ec_curve, ssl3KeyPair** keyPair)
|
||||
{
|
||||
SECKEYPrivateKey * privKey = NULL;
|
||||
SECKEYPublicKey * pubKey = NULL;
|
||||
ssl3KeyPair * keyPair = NULL;
|
||||
ECName ec_curve = (ECName)arg;
|
||||
SECKEYECParams ecParams = { siBuffer, NULL, 0 };
|
||||
|
||||
PORT_Assert(gECDHEKeyPairs[ec_curve].pair == NULL);
|
||||
|
||||
/* ok, no one has generated a global key for this curve yet, do so */
|
||||
if (ssl3_ECName2Params(NULL, ec_curve, &ecParams) != SECSuccess) {
|
||||
gECDHEKeyPairs[ec_curve].error = PORT_GetError();
|
||||
return PR_FAILURE;
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
privKey = SECKEY_CreateECPrivateKey(&ecParams, &pubKey, NULL);
|
||||
SECITEM_FreeItem(&ecParams, PR_FALSE);
|
||||
|
||||
if (!privKey || !pubKey || !(keyPair = ssl3_NewKeyPair(privKey, pubKey))) {
|
||||
if (!privKey || !pubKey || !(*keyPair = ssl3_NewKeyPair(privKey, pubKey))) {
|
||||
if (privKey) {
|
||||
SECKEY_DestroyPrivateKey(privKey);
|
||||
}
|
||||
|
@ -534,6 +527,23 @@ ssl3_CreateECDHEphemeralKeyPair(void * arg)
|
|||
SECKEY_DestroyPublicKey(pubKey);
|
||||
}
|
||||
ssl_MapLowLevelError(SEC_ERROR_KEYGEN_FAIL);
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
return SECSuccess;
|
||||
}
|
||||
|
||||
/* CallOnce function, called once for each named curve. */
|
||||
static PRStatus
|
||||
ssl3_CreateECDHEphemeralKeyPairOnce(void * arg)
|
||||
{
|
||||
ECName ec_curve = (ECName)arg;
|
||||
ssl3KeyPair * keyPair = NULL;
|
||||
|
||||
PORT_Assert(gECDHEKeyPairs[ec_curve].pair == NULL);
|
||||
|
||||
/* ok, no one has generated a global key for this curve yet, do so */
|
||||
if (ssl3_CreateECDHEphemeralKeyPair(ec_curve, &keyPair) != SECSuccess) {
|
||||
gECDHEKeyPairs[ec_curve].error = PORT_GetError();
|
||||
return PR_FAILURE;
|
||||
}
|
||||
|
@ -566,7 +576,7 @@ ssl3_CreateECDHEphemeralKeys(sslSocket *ss, ECName ec_curve)
|
|||
return SECFailure;
|
||||
}
|
||||
status = PR_CallOnceWithArg(&gECDHEKeyPairs[ec_curve].once,
|
||||
ssl3_CreateECDHEphemeralKeyPair,
|
||||
ssl3_CreateECDHEphemeralKeyPairOnce,
|
||||
(void *)ec_curve);
|
||||
if (status != PR_SUCCESS) {
|
||||
PORT_SetError(gECDHEKeyPairs[ec_curve].error);
|
||||
|
@ -759,10 +769,16 @@ ssl3_SendECDHServerKeyExchange(
|
|||
if (curve == ec_noName) {
|
||||
goto loser;
|
||||
}
|
||||
rv = ssl3_CreateECDHEphemeralKeys(ss, curve);
|
||||
if (rv != SECSuccess) {
|
||||
goto loser; /* err set by AppendHandshake. */
|
||||
|
||||
if (ss->opt.reuseServerECDHEKey) {
|
||||
rv = ssl3_CreateECDHEphemeralKeys(ss, curve);
|
||||
} else {
|
||||
rv = ssl3_CreateECDHEphemeralKeyPair(curve, &ss->ephemeralECDHKeyPair);
|
||||
}
|
||||
if (rv != SECSuccess) {
|
||||
goto loser;
|
||||
}
|
||||
|
||||
ecdhePub = ss->ephemeralECDHKeyPair->pubKey;
|
||||
PORT_Assert(ecdhePub != NULL);
|
||||
if (!ecdhePub) {
|
||||
|
|
|
@ -428,7 +428,6 @@ ssl2_CreateMAC(sslSecurityInfo *sec, SECItem *readKey, SECItem *writeKey,
|
|||
int cipherChoice)
|
||||
{
|
||||
switch (cipherChoice) {
|
||||
|
||||
case SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5:
|
||||
case SSL_CK_RC2_128_CBC_WITH_MD5:
|
||||
case SSL_CK_RC4_128_EXPORT40_WITH_MD5:
|
||||
|
@ -436,8 +435,10 @@ ssl2_CreateMAC(sslSecurityInfo *sec, SECItem *readKey, SECItem *writeKey,
|
|||
case SSL_CK_DES_64_CBC_WITH_MD5:
|
||||
case SSL_CK_DES_192_EDE3_CBC_WITH_MD5:
|
||||
sec->hash = HASH_GetHashObject(HASH_AlgMD5);
|
||||
SECITEM_CopyItem(0, &sec->sendSecret, writeKey);
|
||||
SECITEM_CopyItem(0, &sec->rcvSecret, readKey);
|
||||
if (SECITEM_CopyItem(0, &sec->sendSecret, writeKey) ||
|
||||
SECITEM_CopyItem(0, &sec->rcvSecret, readKey)) {
|
||||
return SECFailure;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -326,6 +326,7 @@ typedef struct sslOptionsStr {
|
|||
unsigned int enableOCSPStapling : 1; /* 25 */
|
||||
unsigned int enableNPN : 1; /* 26 */
|
||||
unsigned int enableALPN : 1; /* 27 */
|
||||
unsigned int reuseServerECDHEKey : 1; /* 28 */
|
||||
} sslOptions;
|
||||
|
||||
typedef enum { sslHandshakingUndetermined = 0,
|
||||
|
|
|
@ -968,11 +968,9 @@ ssl_CopySecurityInfo(sslSocket *ss, sslSocket *os)
|
|||
ss->sec.hashcx = NULL;
|
||||
}
|
||||
|
||||
SECITEM_CopyItem(0, &ss->sec.sendSecret, &os->sec.sendSecret);
|
||||
if (os->sec.sendSecret.data && !ss->sec.sendSecret.data)
|
||||
if (SECITEM_CopyItem(0, &ss->sec.sendSecret, &os->sec.sendSecret))
|
||||
goto loser;
|
||||
SECITEM_CopyItem(0, &ss->sec.rcvSecret, &os->sec.rcvSecret);
|
||||
if (os->sec.rcvSecret.data && !ss->sec.rcvSecret.data)
|
||||
if (SECITEM_CopyItem(0, &ss->sec.rcvSecret, &os->sec.rcvSecret))
|
||||
goto loser;
|
||||
|
||||
/* XXX following code is wrong if either cx != 0 */
|
||||
|
|
|
@ -80,7 +80,8 @@ static sslOptions ssl_defaults = {
|
|||
PR_TRUE, /* cbcRandomIV */
|
||||
PR_FALSE, /* enableOCSPStapling */
|
||||
PR_TRUE, /* enableNPN */
|
||||
PR_FALSE /* enableALPN */
|
||||
PR_FALSE, /* enableALPN */
|
||||
PR_TRUE /* reuseServerECDHEKey */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -784,6 +785,10 @@ SSL_OptionSet(PRFileDesc *fd, PRInt32 which, PRBool on)
|
|||
ss->opt.enableALPN = on;
|
||||
break;
|
||||
|
||||
case SSL_REUSE_SERVER_ECDHE_KEY:
|
||||
ss->opt.reuseServerECDHEKey = on;
|
||||
break;
|
||||
|
||||
default:
|
||||
PORT_SetError(SEC_ERROR_INVALID_ARGS);
|
||||
rv = SECFailure;
|
||||
|
@ -856,6 +861,8 @@ SSL_OptionGet(PRFileDesc *fd, PRInt32 which, PRBool *pOn)
|
|||
case SSL_ENABLE_OCSP_STAPLING: on = ss->opt.enableOCSPStapling; break;
|
||||
case SSL_ENABLE_NPN: on = ss->opt.enableNPN; break;
|
||||
case SSL_ENABLE_ALPN: on = ss->opt.enableALPN; break;
|
||||
case SSL_REUSE_SERVER_ECDHE_KEY:
|
||||
on = ss->opt.reuseServerECDHEKey; break;
|
||||
|
||||
default:
|
||||
PORT_SetError(SEC_ERROR_INVALID_ARGS);
|
||||
|
@ -919,6 +926,9 @@ SSL_OptionGetDefault(PRInt32 which, PRBool *pOn)
|
|||
break;
|
||||
case SSL_ENABLE_NPN: on = ssl_defaults.enableNPN; break;
|
||||
case SSL_ENABLE_ALPN: on = ssl_defaults.enableALPN; break;
|
||||
case SSL_REUSE_SERVER_ECDHE_KEY:
|
||||
on = ssl_defaults.reuseServerECDHEKey;
|
||||
break;
|
||||
|
||||
default:
|
||||
PORT_SetError(SEC_ERROR_INVALID_ARGS);
|
||||
|
@ -1094,6 +1104,10 @@ SSL_OptionSetDefault(PRInt32 which, PRBool on)
|
|||
ssl_defaults.enableALPN = on;
|
||||
break;
|
||||
|
||||
case SSL_REUSE_SERVER_ECDHE_KEY:
|
||||
ssl_defaults.reuseServerECDHEKey = on;
|
||||
break;
|
||||
|
||||
default:
|
||||
PORT_SetError(SEC_ERROR_INVALID_ARGS);
|
||||
return SECFailure;
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
* The format of the version string should be
|
||||
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <Beta>]"
|
||||
*/
|
||||
#define NSSUTIL_VERSION "3.16.3"
|
||||
#define NSSUTIL_VERSION "3.17 Beta"
|
||||
#define NSSUTIL_VMAJOR 3
|
||||
#define NSSUTIL_VMINOR 16
|
||||
#define NSSUTIL_VPATCH 3
|
||||
#define NSSUTIL_VMINOR 17
|
||||
#define NSSUTIL_VPATCH 0
|
||||
#define NSSUTIL_VBUILD 0
|
||||
#define NSSUTIL_BETA PR_FALSE
|
||||
#define NSSUTIL_BETA PR_TRUE
|
||||
|
||||
SEC_BEGIN_PROTOS
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ scenario TrustAnchors
|
|||
db trustanchors
|
||||
|
||||
import NameConstraints.ca:x:CT,C,C
|
||||
import NameConstraints.ncca:x:CT,C,C
|
||||
# Name Constrained CA: Name constrained to permited DNSName ".example"
|
||||
import NameConstraints.ncca:x:CT,C,C
|
||||
import NameConstraints.dcisscopy:x:CT,C,C
|
||||
|
||||
# Intermediate 1: Name constrained to permited DNSName ".example"
|
||||
|
|
|
@ -456,7 +456,7 @@ y
|
|||
n
|
||||
CERTSCRIPT
|
||||
|
||||
#the following cert MUST not pass
|
||||
#the following cert MUST pass
|
||||
certutil -S -z noise -g 2048 -d . -n dcissallowed -s "CN=foo.example.fr,O=Foo,ST=CA,C=US" -t ,, -c dcisscopy -m 998901 -v 120 -1 -2 -5 <<CERTSCRIPT
|
||||
0
|
||||
2
|
||||
|
|
Загрузка…
Ссылка в новой задаче