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

Unified Diff: net/third_party/nss/ssl/sslsecur.c

Issue 6804032: Add TLS-SRP (RFC 5054) support Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: remove "httpsv" scheme, minor NSS/OpenSSL changes Created 9 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
« no previous file with comments | « net/third_party/nss/ssl/sslproto.h ('k') | net/third_party/nss/ssl/sslsock.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/third_party/nss/ssl/sslsecur.c
diff --git a/net/third_party/nss/ssl/sslsecur.c b/net/third_party/nss/ssl/sslsecur.c
index 49a81bc4e2f96aa25ac1db4bd875e198c792cbfe..fe1465daee2d6eb909dbe78a517b48efa4f19f84 100644
--- a/net/third_party/nss/ssl/sslsecur.c
+++ b/net/third_party/nss/ssl/sslsecur.c
@@ -902,6 +902,14 @@ ssl_CopySecurityInfo(sslSocket *ss, sslSocket *os)
if (os->sec.rcvSecret.data && !ss->sec.rcvSecret.data)
goto loser;
+ SECITEM_CopyItem(0, ss->sec.userName, os->sec.userName);
+ if (os->sec.userName->data && !ss->sec.userName->data)
+ goto loser;
+ SECITEM_CopyItem(0, ss->sec.userPasswd, os->sec.userPasswd);
+ if (os->sec.userPasswd->data && !ss->sec.userPasswd->data)
+ goto loser;
+
+
/* XXX following code is wrong if either cx != 0 */
PORT_Assert(os->sec.readcx == 0);
PORT_Assert(os->sec.writecx == 0);
@@ -983,6 +991,15 @@ ssl_DestroySecurityInfo(sslSecurityInfo *sec)
{
ssl_ResetSecurityInfo(sec, PR_FALSE);
+ if (sec->userName) {
+ SECITEM_FreeItem(sec->userName, PR_TRUE);
+ sec->userName = NULL;
+ }
+ if (sec->userPasswd) {
+ SECITEM_FreeItem(sec->userPasswd, PR_TRUE);
+ sec->userPasswd = NULL;
+ }
+
PORT_ZFree(sec->writeBuf.buf, sec->writeBuf.space);
sec->writeBuf.buf = 0;
« no previous file with comments | « net/third_party/nss/ssl/sslproto.h ('k') | net/third_party/nss/ssl/sslsock.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698