瀏覽代碼

Resolves: bug 479202
Bug Description: Acceptance test: mmrepl {accept,chainonupdate} : slapd dumps core during accept_cleanup()
Reviewed by: nkinder (Thanks!)
Fix Description: Have to call ldapssl_set_option(ld, SSL_NO_CACHE, PR_TRUE) after setting up the connection for client auth
Platforms tested: RHEL5
Flag Day: no
Doc impact: no

Rich Megginson 17 年之前
父節點
當前提交
2969601f66
共有 1 個文件被更改,包括 9 次插入9 次删除
  1. 9 9
      ldap/servers/slapd/ssl.c

+ 9 - 9
ldap/servers/slapd/ssl.c

@@ -1159,15 +1159,6 @@ slapd_SSL_client_auth (LDAP* ld)
 
     /* Free config data */
 
-	/* We cannot allow NSS to cache outgoing client auth connections -
-	   each client auth connection must have it's own non-shared SSL
-	   connection to the peer so that it will go through the
-	   entire handshake protocol every time including the use of its
-	   own unique client cert - see bug 605457
-	*/
-
-	ldapssl_set_option(ld, SSL_NO_CACHE, PR_TRUE);
-
 #ifndef _WIN32
     StdPinObj = (SVRCOREStdPinObj *)SVRCORE_GetRegisteredPinObj();
     err =  SVRCORE_StdPinGetPin( &pw, StdPinObj, token );
@@ -1188,6 +1179,15 @@ slapd_SSL_client_auth (LDAP* ld)
 				SLAPI_COMPONENT_NAME_NSPR " error %d - %s)",
 			    SERVER_KEY_NAME, cert_name, rc, 
 			    errorCode, slapd_pr_strerror(errorCode));
+	} else {
+	    /* We cannot allow NSS to cache outgoing client auth connections -
+	       each client auth connection must have it's own non-shared SSL
+	       connection to the peer so that it will go through the
+	       entire handshake protocol every time including the use of its
+	       own unique client cert - see bug 605457
+	    */
+
+	    ldapssl_set_option(ld, SSL_NO_CACHE, PR_TRUE);
 	}
     }