Bug 1117897, don't export, but rather remove CERT_FindCertURLExtension, r=rrelyea
--- a/lib/certdb/cert.h
+++ b/lib/certdb/cert.h
@@ -927,21 +927,16 @@ extern SECStatus CERT_FindCertExtension
extern SECStatus CERT_FindNSCertTypeExtension
(CERTCertificate *cert, SECItem *value);
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
*/
extern CERTAuthKeyID * CERT_FindAuthKeyIDExten (PLArenaPool *arena,CERTCertificate *cert);
/* Returns the decoded value of the basicConstraint extension.
*/
extern SECStatus CERT_FindBasicConstraintExten
--- a/lib/certdb/certv3.c
+++ b/lib/certdb/certv3.c
@@ -38,82 +38,16 @@ SetExts(void *object, CERTCertExtension
}
void *
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
*/
SECStatus
CERT_FindNSCertTypeExtension(CERTCertificate *cert, SECItem *retItem)
{
return (CERT_FindBitStringExtension
--- a/lib/nss/nss.def
+++ b/lib/nss/nss.def
@@ -1060,14 +1060,13 @@ CERT_GetGeneralNameTypeFromString;
PK11_PubEncrypt;
PK11_PrivDecrypt;
;+ local:
;+ *;
;+};
;+NSS_3.18 { # NSS 3.18 release
;+ global:
__PK11_SetCertificateNickname;
-CERT_FindCertURLExtension;
SEC_CheckCrlTimes;
SEC_GetCrlTimes;
;+ local:
;+ *;
;+};