diff options
author | Kai Engert <kaie@kuix.de> | 2015-03-17 00:03:08 +0100 |
---|---|---|
committer | Kai Engert <kaie@kuix.de> | 2015-03-17 00:03:08 +0100 |
commit | 4fb7a4e9fab803d95ec7f8d0a2cb219305d7cab5 (patch) | |
tree | eef18e03b72fbf13237e790a24d263c25052590d | |
parent | 584161c955938e242b78b9e41fe3446913479a09 (diff) | |
download | nss-hg-4fb7a4e9fab803d95ec7f8d0a2cb219305d7cab5.tar.gz |
Bug 1117897, don't export, but rather remove CERT_FindCertURLExtension, r=rrelyeaNSS_3_18_RC2
-rw-r--r-- | lib/certdb/cert.h | 5 | ||||
-rw-r--r-- | lib/certdb/certv3.c | 66 | ||||
-rw-r--r-- | lib/nss/nss.def | 1 |
3 files changed, 0 insertions, 72 deletions
diff --git a/lib/certdb/cert.h b/lib/certdb/cert.h index 02caa8250..6e0bdb089 100644 --- a/lib/certdb/cert.h +++ b/lib/certdb/cert.h @@ -932,11 +932,6 @@ extern char * CERT_FindNSStringExtension (CERTCertificate *cert, int oidtag); extern SECStatus CERT_FindCertExtensionByOID (CERTCertificate *cert, SECItem *oid, SECItem *value); -/* Find a URL extension in the cert. -** The caller must free the result string using PORT_Free. -*/ -extern char *CERT_FindCertURLExtension (CERTCertificate *cert, SECOidTag tag); - /* Returns the decoded value of the authKeyID extension. ** Note that this uses passed in the arena to allocate storage for the result */ diff --git a/lib/certdb/certv3.c b/lib/certdb/certv3.c index fdf3d5f38..1735b5e44 100644 --- a/lib/certdb/certv3.c +++ b/lib/certdb/certv3.c @@ -43,72 +43,6 @@ CERT_StartCertExtensions(CERTCertificate *cert) return (cert_StartExtensions ((void *)cert, cert->arena, SetExts)); } -/* find a URL extension in the cert - */ -char * -CERT_FindCertURLExtension(CERTCertificate *cert, SECOidTag tag) -{ - SECStatus rv; - SECItem urlitem = {siBuffer,0}; - SECItem urlstringitem = {siBuffer,0}; - PLArenaPool *arena = NULL; - char *urlstring = NULL; - char *str; - int len; - - if (!cert) { - PORT_SetError(SEC_ERROR_INVALID_ARGS); - return NULL; - } - - arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); - if ( ! arena ) { - goto loser; - } - - rv = cert_FindExtension(cert->extensions, tag, &urlitem); - if ( rv != SECSuccess ) { - goto loser; - } - - rv = SEC_QuickDERDecodeItem(arena, &urlstringitem, - SEC_ASN1_GET(SEC_IA5StringTemplate), &urlitem); - - if ( rv != SECSuccess ) { - goto loser; - } - - len = urlstringitem.len + 1; - - str = urlstring = (char *)PORT_Alloc(len); - if ( urlstring == NULL ) { - goto loser; - } - - /* copy the URL */ - PORT_Memcpy(str, urlstringitem.data, urlstringitem.len); - str += urlstringitem.len; - - *str = '\0'; - goto done; - -loser: - if ( urlstring ) { - PORT_Free(urlstring); - } - - urlstring = NULL; -done: - if ( arena ) { - PORT_FreeArena(arena, PR_FALSE); - } - if ( urlitem.data ) { - PORT_Free(urlitem.data); - } - - return(urlstring); -} - /* * get the value of the Netscape Certificate Type Extension */ diff --git a/lib/nss/nss.def b/lib/nss/nss.def index 794e932e7..abe0604f5 100644 --- a/lib/nss/nss.def +++ b/lib/nss/nss.def @@ -1065,7 +1065,6 @@ PK11_PrivDecrypt; ;+NSS_3.18 { # NSS 3.18 release ;+ global: __PK11_SetCertificateNickname; -CERT_FindCertURLExtension; SEC_CheckCrlTimes; SEC_GetCrlTimes; ;+ local: |