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

Unified Diff: nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c

Issue 133273035: Update third_party/nss to 3.15.5 Beta 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 6 years, 11 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 | « nss/lib/libpkix/pkix/top/pkix_validate.c ('k') | nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c
===================================================================
--- nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c (revision 245298)
+++ nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c (working copy)
@@ -136,6 +136,8 @@
* non-NULL.
* "domainName"
* Address of a string pointing to a server name. Must be non-NULL.
+ * An empty string (which means no <host> is given in the LDAP URL) is
+ * not supported.
* "pClient"
* Address at which the returned LDAPClient is stored. Must be non-NULL.
* "plContext"
@@ -160,6 +162,17 @@
PKIX_ENTER(AIAMGR, "pkix_pl_AiaMgr_FindLDAPClient");
PKIX_NULLCHECK_THREE(aiaMgr, domainName, pClient);
+ /*
+ * An LDAP URL may not have a <host> part, for example,
+ * ldap:///o=University%20of%20Michigan,c=US
+ * PKIX_PL_LdapDefaultClient doesn't know how to discover the default
+ * LDAP server, so we don't support this kind of LDAP URL.
+ */
+ if (*domainName == '\0') {
+ /* Simulate a PKIX_PL_LdapDefaultClient_CreateByName failure. */
+ PKIX_ERROR(PKIX_LDAPDEFAULTCLIENTCREATEBYNAMEFAILED);
+ }
+
/* create PKIX_PL_String from domain name */
PKIX_CHECK(PKIX_PL_String_Create
(PKIX_ESCASCII, domainName, 0, &domainString, plContext),
« no previous file with comments | « nss/lib/libpkix/pkix/top/pkix_validate.c ('k') | nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698