diff options
author | cvs2hg <devnull@localhost> | 2000-10-07 00:56:26 +0000 |
---|---|---|
committer | cvs2hg <devnull@localhost> | 2000-10-07 00:56:26 +0000 |
commit | e6166a827961d0724a9987172c551ce2a91acca1 (patch) | |
tree | 13f3b4972a886ccbd940862a92ddf6492d5c1dc1 | |
parent | e4265f0632863765bc1b4fa4055708bd1531cfa4 (diff) | |
download | nss-hg-Netscape_20001027_SECURITY_MAC_RELEASE.tar.gz |
fixup commit for tag 'Netscape_20001027_SECURITY_MAC_RELEASE'Netscape_20001027_SECURITY_MAC_RELEASE
12 files changed, 0 insertions, 1173 deletions
diff --git a/security/nss/lib/pkix/src/RDNSequence/AppendRelativeDistinguishedName.c b/security/nss/lib/pkix/src/RDNSequence/AppendRelativeDistinguishedName.c deleted file mode 100644 index 4e0d0d018..000000000 --- a/security/nss/lib/pkix/src/RDNSequence/AppendRelativeDistinguishedName.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$"; -#endif /* DEBUG */ - -#ifndef PKIX_H -#include "pkix.h" -#endif /* PKIX_H */ - -/* - * NSSPKIXRDNSequence_AppendRelativeDistinguishedName - * - * -- fgmr comments -- - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE - * NSS_ERROR_INVALID_PKIX_RDN - * NSS_ERROR_NO_MEMORY - * - * Return value: - * PR_SUCCESS upon success - * PR_FAILURE upon failure - */ - -NSS_IMPLEMENT PRStatus -NSSPKIXRDNSequence_AppendRelativeDistinguishedName -( - NSSPKIXRDNSequence *rdnseq, - NSSPKIXRelativeDistinguishedName *rdn -) -{ - nss_ClearErrorStack(); - -#ifdef DEBUG - if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) { - return PR_FAILURE; - } - - if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_verifyPointer(rdn) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - - return nssPKIXRDNSequence_AppendRelativeDistinguishedName(rdnseq, rdn); -} diff --git a/security/nss/lib/pkix/src/RDNSequence/GetRelativeDistinguishedNameCount.c b/security/nss/lib/pkix/src/RDNSequence/GetRelativeDistinguishedNameCount.c deleted file mode 100644 index 05b5e89b4..000000000 --- a/security/nss/lib/pkix/src/RDNSequence/GetRelativeDistinguishedNameCount.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$"; -#endif /* DEBUG */ - -#ifndef PKIX_H -#include "pkix.h" -#endif /* PKIX_H */ - -/* - * NSSPKIXRDNSequence_GetRelativeDistinguishedNameCount - * - * -- fgmr comments -- - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE - * NSS_ERROR_VALUE_OUT_OF_RANGE - * - * Return value: - * Nonnegative integer upon success - * -1 upon failure. - */ - -NSS_IMPLEMENT PRInt32 -NSSPKIXRDNSequence_GetRelativeDistinguishedNameCount -( - NSSPKIXRDNSequence *rdnseq -) -{ - nss_ClearErrorStack(); - -#ifdef DEBUG - if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) { - return -1; - } -#endif /* DEBUG */ - - return nssPKIXRDNSequence_GetRelativeDistinguishedNameCount(rdnseq); -} diff --git a/security/nss/lib/pkix/src/RDNSequence/InsertRelativeDistinguishedName.c b/security/nss/lib/pkix/src/RDNSequence/InsertRelativeDistinguishedName.c deleted file mode 100644 index 433c2a315..000000000 --- a/security/nss/lib/pkix/src/RDNSequence/InsertRelativeDistinguishedName.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$"; -#endif /* DEBUG */ - -#ifndef PKIX_H -#include "pkix.h" -#endif /* PKIX_H */ - -/* - * NSSPKIXRDNSequence_InsertRelativeDistinguishedName - * - * -- fgmr comments -- - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE - * NSS_ERROR_VALUE_OUT_OF_RANGE - * NSS_ERROR_INVALID_PKIX_RDN - * NSS_ERROR_NO_MEMORY - * - * Return value: - * PR_SUCCESS upon success - * PR_FAILURE upon failure - */ - -NSS_IMPLEMENT PRStatus -NSSPKIXRDNSequence_InsertRelativeDistinguishedName -( - NSSPKIXRDNSequence *rdnseq, - PRInt32 i, - NSSPKIXRelativeDistinguishedName *rdn -) -{ - nss_ClearErrorStack(); - -#ifdef DEBUG - if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) { - return PR_FAILURE; - } - - if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_verifyPointer(rdn) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - - return nssPKIXRDNSequence_InsertRelativeDistinguishedName(rdnseq, i, rdn); -} diff --git a/security/nss/lib/pkix/src/RDNSequence/PAppendRelativeDistinguishedName.c b/security/nss/lib/pkix/src/RDNSequence/PAppendRelativeDistinguishedName.c deleted file mode 100644 index 9d1ea4875..000000000 --- a/security/nss/lib/pkix/src/RDNSequence/PAppendRelativeDistinguishedName.c +++ /dev/null @@ -1,105 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$"; -#endif /* DEBUG */ - -#ifndef PKIX_H -#include "pkix.h" -#endif /* PKIX_H */ - -/* - * nssPKIXRDNSequence_AppendRelativeDistinguishedName - * - * -- fgmr comments -- - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE - * NSS_ERROR_INVALID_PKIX_RDN - * NSS_ERROR_NO_MEMORY - * - * Return value: - * PR_SUCCESS upon success - * PR_FAILURE upon failure - */ - -NSS_IMPLEMENT PRStatus -nssPKIXRDNSequence_AppendRelativeDistinguishedName -( - NSSPKIXRDNSequence *rdnseq, - NSSPKIXRelativeDistinguishedName *rdn -) -{ - NSSPKIXRelativeDistinguishedName **na; - NSSPKIXRelativeDistinguishedName *dup; - -#ifdef NSSDEBUG - if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) { - return PR_FAILURE; - } - - if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_verifyPointer(rdn) ) { - return PR_FAILURE; - } -#endif /* NSSDEBUG */ - - if( 0 == rdnseq->count ) { - nss_pkix_RDNSequence_Count(rdnseq); - } - -#ifdef PEDANTIC - if( 0 == rdnseq->count ) { - nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE); - return (NSSPKIXRelativeDistinguishedName *)NULL; - } -#endif /* PEDANTIC */ - - na = (NSSPKIXRelativeDistinguishedName **) - nss_ZRealloc(rdnseq->rdns, ((rdnseq->count+2) * - sizeof(NSSPKIXRelativeDistinguishedName *))); - if( (NSSPKIXRelativeDistinguishedName **)NULL == na ) { - return (NSSPKIXRelativeDistinguishedName *)NULL; - } - - rdnseq->rdns = na; - - dup = nssPKIXRelativeDistinguishedName_Duplicate(rdn, rdnseq->arena); - if( (NSSPKIXRelativeDistinguishedName *)NULL == dup ) { - return (NSSPKIXRelativeDistinguishedName *)NULL; - } - - na[ rdnseq->count++ ] = dup; - - return nss_pkix_RDNSequence_Clear(rdnseq); -} diff --git a/security/nss/lib/pkix/src/RDNSequence/PFindRelativeDistinguishedName.c b/security/nss/lib/pkix/src/RDNSequence/PFindRelativeDistinguishedName.c deleted file mode 100644 index 8064b9636..000000000 --- a/security/nss/lib/pkix/src/RDNSequence/PFindRelativeDistinguishedName.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$"; -#endif /* DEBUG */ - -#ifndef PKIX_H -#include "pkix.h" -#endif /* PKIX_H */ - -/* - * nssPKIXRDNSequence_FindRelativeDistinguishedName - * - * -- fgmr comments -- - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE - * NSS_ERROR_INVALID_PKIX_RDN - * NSS_ERROR_NOT_FOUND - * NSS_ERROR_VALUE_OUT_OF_RANGE - * - * Return value: - * The index of the specified attribute value upon success - * -1 upon failure. - */ - -NSS_IMPLEMENT PRInt32 -nssPKIXRDNSequence_FindRelativeDistinguishedName -( - NSSPKIXRDNSequence *rdnseq, - NSSPKIXRelativeDistinguishedName *rdn -) -{ - PRUint32 i; - NSSPKIXRelativeDistinguishedName **a; - -#ifdef NSSDEBUG - if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) { - return PR_FAILURE; - } - - if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_verifyPointer(rdn) ) { - return PR_FAILURE; - } -#endif /* NSSDEBUG */ - - for( i = 0, a = rdnseq->rdns; *a; a++, (i > 0x7fffffff) || i++ ) { - if( PR_TRUE == nssPKIXRelativeDistinguishedName_Equal(*a, rdn) ) { - if( i > 0x7fffffff ) { - nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE); - return -1; - } - return (PRInt32)i; - } - } - - nss_SetError(NSS_ERROR_NOT_FOUND); - return -1; -} diff --git a/security/nss/lib/pkix/src/RDNSequence/PGetRelativeDistinguishedNameCount.c b/security/nss/lib/pkix/src/RDNSequence/PGetRelativeDistinguishedNameCount.c deleted file mode 100644 index a01077db1..000000000 --- a/security/nss/lib/pkix/src/RDNSequence/PGetRelativeDistinguishedNameCount.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$"; -#endif /* DEBUG */ - -#ifndef PKIX_H -#include "pkix.h" -#endif /* PKIX_H */ - -/* - * nssPKIXRDNSequence_GetRelativeDistinguishedNameCount - * - * -- fgmr comments -- - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE - * NSS_ERROR_VALUE_OUT_OF_RANGE - * - * Return value: - * Nonnegative integer upon success - * -1 upon failure. - */ - -NSS_IMPLEMENT PRInt32 -nssPKIXRDNSequence_GetRelativeDistinguishedNameCount -( - NSSPKIXRDNSequence *rdnseq -) -{ -#ifdef NSSDEBUG - if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) { - return -1; - } -#endif /* NSSDEBUG */ - - if( 0 == rdnseq->count ) { - nss_pkix_RDNSequence_Count(rdnseq); - } - -#ifdef PEDANTIC - if( 0 == rdnseq->count ) { - nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE); - return -1; - } -#endif /* PEDANTIC */ - - if( rdnseq->count > 0x7fffffff ) { - nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE); - return -1; - } - - return (PRInt32)(rdnseq->count); -} diff --git a/security/nss/lib/pkix/src/RDNSequence/PGetRelativeDistinguishedNames.c b/security/nss/lib/pkix/src/RDNSequence/PGetRelativeDistinguishedNames.c deleted file mode 100644 index 115480dfd..000000000 --- a/security/nss/lib/pkix/src/RDNSequence/PGetRelativeDistinguishedNames.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$"; -#endif /* DEBUG */ - -#ifndef PKIX_H -#include "pkix.h" -#endif /* PKIX_H */ - -/* - * nssPKIXRDNSequence_GetRelativeDistinguishedNames - * - * This routine returns all of the relative distinguished names in the - * specified RDN Sequence. {...} If the array is allocated, or if the - * specified one has extra space, the array will be null-terminated. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE - * NSS_ERROR_INVALID_ARENA - * NSS_ERROR_NO_MEMORY - * NSS_ERROR_ARRAY_TOO_SMALL - * - * Return value: - * A valid pointer to an array of NSSPKIXRelativeDistinguishedName - * pointers upon success - * NULL upon failure. - */ - -NSS_IMPLEMENT NSSPKIXRelativeDistinguishedName ** -nssPKIXRDNSequence_GetRelativeDistinguishedNames -( - NSSPKIXRDNSequence *rdnseq, - NSSPKIXRelativeDistinguishedName *rvOpt[], - PRInt32 limit, - NSSArena *arenaOpt -) -{ - NSSPKIXRelativeDistinguishedName **rv = (NSSPKIXRelativeDistinguishedName **)NULL; - PRUint32 i; - -#ifdef NSSDEBUG - if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) { - return (NSSPKIXRelativeDistinguishedName **)NULL; - } - - if( (NSSArena *)NULL != arenaOpt ) { - if( PR_SUCCESS != nssArena_verifyOpt(attribute) ) { - return (NSSPKIXRelativeDistinguishedName **)NULL; - } - } -#endif /* NSSDEBUG */ - - if( 0 == rdnseq->count ) { - nss_pkix_RDNSequence_Count(rdnseq); - } - -#ifdef PEDANTIC - if( 0 == rdnseq->count ) { - nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE); - return (NSSPKIXRelativeDistinguishedName **)NULL; - } -#endif /* PEDANTIC */ - - if( (limit < rdnseq->count) && - !((0 == limit) && ((NSSPKIXRelativeDistinguishedName **)NULL == rvOpt)) ) { - nss_SetError(NSS_ERROR_ARRAY_TOO_SMALL); - return (NSSPKIXRelativeDistinguishedName **)NULL; - } - - limit = rdnseq->count; - if( (NSSPKIXRelativeDistinguishedName **)NULL == rvOpt ) { - rv = nss_ZNEWARRAY(arenaOpt, NSSPKIXRelativeDistinguishedName *, limit); - if( (NSSPKIXRelativeDistinguishedName **)NULL == rv ) { - return (NSSPKIXRelativeDistinguishedName **)NULL; - } - } else { - rv = rvOpt; - } - - for( i = 0; i < limit; i++ ) { - rv[i] = nssPKIXRelativedistinguishedName_Duplicate(rdnseq->rdns[i], arenaOpt); - if( (NSSPKIXRelativeDistinguishedName *)NULL == rv[i] ) { - goto loser; - } - } - - return rv; - - loser: - for( i = 0; i < limit; i++ ) { - NSSPKIXRelativeDistinguishedName *x = rv[i]; - if( (NSSPKIXRelativeDistinguishedName *)NULL == x ) { - break; - } - (void)nssPKIXRelativeDistinguishedName_Destroy(x); - } - - if( rv != rvOpt ) { - nss_ZFreeIf(rv); - } - - return (NSSPKIXRelativeDistinguishedName **)NULL; -} diff --git a/security/nss/lib/pkix/src/RDNSequence/PInsertRelativeDistinguishedName.c b/security/nss/lib/pkix/src/RDNSequence/PInsertRelativeDistinguishedName.c deleted file mode 100644 index 213866694..000000000 --- a/security/nss/lib/pkix/src/RDNSequence/PInsertRelativeDistinguishedName.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$"; -#endif /* DEBUG */ - -#ifndef PKIX_H -#include "pkix.h" -#endif /* PKIX_H */ - -/* - * nssPKIXRDNSequence_InsertRelativeDistinguishedName - * - * -- fgmr comments -- - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE - * NSS_ERROR_INVALID_PKIX_RDN - * NSS_ERROR_NO_MEMORY - * - * Return value: - * PR_SUCCESS upon success - * PR_FAILURE upon failure - */ - -NSS_IMPLEMENT PRStatus -nssPKIXRDNSequence_InsertRelativeDistinguishedName -( - NSSPKIXRDNSequence *rdnseq, - PRInt32 i, - NSSPKIXRelativeDistinguishedName *rdn -) -{ - NSSPKIXRelativeDistinguishedName **na; - NSSPKIXRelativeDistinguishedName *dup; - PRInt32 c; - -#ifdef NSSDEBUG - if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) { - return PR_FAILURE; - } - - if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_verifyPointer(rdn) ) { - return PR_FAILURE; - } -#endif /* NSSDEBUG */ - - if( 0 == rdnseq->count ) { - nss_pkix_RDNSequence_Count(rdnseq); - } - -#ifdef PEDANTIC - if( 0 == rdnseq->count ) { - nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE); - return (NSSPKIXRelativeDistinguishedName *)NULL; - } -#endif /* PEDANTIC */ - - if( (i < 0) || (i >= rdnseq->count) ) { - nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE); - return (NSSPKIXRelativeDistinguishedName *)NULL; - } - - na = (NSSPKIXRelativeDistinguishedName **) - nss_ZRealloc(rdnseq->rdns, ((rdnseq->count+2) * - sizeof(NSSPKIXRelativeDistinguishedName *))); - if( (NSSPKIXRelativeDistinguishedName **)NULL == na ) { - return (NSSPKIXRelativeDistinguishedName *)NULL; - } - - rdnseq->rdns = na; - - dup = nssPKIXRelativeDistinguishedName_Duplicate(rdn, rdnseq->arena); - if( (NSSPKIXRelativeDistinguishedName *)NULL == dup ) { - return (NSSPKIXRelativeDistinguishedName *)NULL; - } - - for( c = rdnseq->count; c > i; c-- ) { - na[ c ] = na[ c-1 ]; - } - - na[ i ] = dup; - rdnseq->count++; - - return nss_pkix_RDNSequence_Clear(rdnseq); -} diff --git a/security/nss/lib/pkix/src/RDNSequence/PRemoveRelativeDistinguishedName.c b/security/nss/lib/pkix/src/RDNSequence/PRemoveRelativeDistinguishedName.c deleted file mode 100644 index 447620c77..000000000 --- a/security/nss/lib/pkix/src/RDNSequence/PRemoveRelativeDistinguishedName.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$"; -#endif /* DEBUG */ - -#ifndef PKIX_H -#include "pkix.h" -#endif /* PKIX_H */ - -/* - * nssPKIXRDNSequence_RemoveRelativeDistinguishedName - * - * -- fgmr comments -- - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE - * NSS_ERROR_VALUE_OUT_OF_RANGE - * - * Return value: - * PR_SUCCESS upon success - * PR_FAILURE upon failure - */ - -NSS_IMPLEMENT PRStatus -nssPKIXRDNSequence_RemoveRelativeDistinguishedName -( - NSSPKIXRDNSequence *rdnseq, - PRInt32 i -) -{ - NSSPKIXRelativeDistinguishedName **na; - PRInt32 c; - -#ifdef NSSDEBUG - if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) { - return PR_FAILURE; - } -#endif /* NSSDEBUG */ - - if( 0 == rdnseq->count ) { - nss_pkix_RDNSequence_Count(rdnseq); - } - -#ifdef PEDANTIC - if( 0 == rdnseq->count ) { - nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE); - return (NSSPKIXRelativeDistinguishedName *)NULL; - } -#endif /* PEDANTIC */ - - if( (i < 0) || (i >= rdnseq->count) ) { - nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE); - return (NSSPKIXRelativeDistinguishedName *)NULL; - } - - nssPKIXRelativeDistinguishedName_Destroy(rdnseq->rdns[i]); - - rdnseq->rdns[i] = rdnseq->rdns[ rdnseq->count ]; - rdnseq->rdns[ rdnseq->count ] = (NSSPKIXRelativeDistinguishedName *)NULL; - rdnseq->count--; - - na = (NSSPKIXRelativeDistinguishedName **) - nss_ZRealloc(rdnseq->rdns, ((rdnseq->count) * - sizeof(NSSPKIXRelativeDistinguishedName *))); - if( (NSSPKIXRelativeDistinguishedName **)NULL == na ) { - return (NSSPKIXRelativeDistinguishedName *)NULL; - } - - rdnseq->rdns = na; - - return nss_pkix_RDNSequence_Clear(rdnseq); -} diff --git a/security/nss/lib/pkix/src/RDNSequence/PSetRelativeDistinguishedNames.c b/security/nss/lib/pkix/src/RDNSequence/PSetRelativeDistinguishedNames.c deleted file mode 100644 index b0320a4b7..000000000 --- a/security/nss/lib/pkix/src/RDNSequence/PSetRelativeDistinguishedNames.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$"; -#endif /* DEBUG */ - -#ifndef PKIX_H -#include "pkix.h" -#endif /* PKIX_H */ - -/* - * nssPKIXRDNSequence_SetRelativeDistinguishedNames - * - * -- fgmr comments -- - * If the array pointer itself is null, the set is considered empty. - * If the count is zero but the pointer nonnull, the array will be - * assumed to be null-terminated. - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE - * NSS_ERROR_INVALID_PKIX_RDN - * - * Return value: - * PR_SUCCESS upon success - * PR_FAILURE upon failure - */ - -NSS_IMPLEMENT PRStatus -nssPKIXRDNSequence_SetRelativeDistinguishedNames -( - NSSPKIXRDNSequence *rdnseq, - NSSPKIXRelativeDistinguishedName *rdns[], - PRInt32 countOpt -) -{ - NSSPKIXRelativeDistinguishedName **ip; - NSSPKIXRelativeDistinguishedName **newarray; - PRUint32 i; - nssArenaMark *mark; - -#ifdef NSSDEBUG - if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) { - return PR_FAILURE; - } - - if( (NSSPKIXRelativeDistinguishedName **)NULL == rdns ) { - nss_SetError(NSS_ERROR_INVALID_POINTER); - return PR_FAILURE; - } - - { - PRUint32 i, count; - - if( 0 == countOpt ) { - for( i = 0; i < 0x80000000; i++ ) { - if( (NSSPKIXRelativeDistinguishedName *)NULL == rdns[i] ) { - break; - } - } - -#ifdef PEDANTIC - if( 0x80000000 == i ) { - nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE); - return PR_FAILURE; - } -#endif /* PEDANTIC */ - - count = (PRUint32)i; - } else { - if( countOpt < 0 ) { - nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE); - return PR_FAILURE; - } - - count = (PRUint32)countOpt; - } - - for( i = 0; i < count; i++ ) { - if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_verifyPointer(rdns[i]) ) { - return PR_FAILURE; - } - } - } -#endif /* NSSDEBUG */ - - mark = nssArena_Mark(rdnseq->mark); - if( (nssArenaMark *)NULL == mark ) { - return PR_FAILURE; - } - - newarray = nss_ZNEWARRAY(rdnseq->arena, NSSPKIXRelativeDistinguishedName *, countOpt); - if( (NSSPKIXRelativeDistinguishedName **)NULL == newarray ) { - goto loser; - } - - for( i = 0; i < countOpt; i++ ) { - newarray[i] = nssPKIXRelativeDistinguishedName_Duplicate(rdns[i], rdnseq->arena); - if( (NSSPKIXRelativeDistinguishedName *)NULL == newarray[i] ) { - goto loser; - } - } - - for( i = 0; i < rdnseq->count; i++ ) { - if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_Destroy(rdnseq->rdns[i]) ) { - goto loser; - } - } - - nss_ZFreeIf(rdnseq->rdns); - - rdnseq->count = countOpt; - rdnseq->rdns = newarray; - - (void)nss_pkix_RDNSequence_Clear(rdnseq); - - return nssArena_Unmark(rdnseq->arena, mark); - - loser: - (void)nssArena_Release(a->arena, mark); - return PR_FAILURE; -} - diff --git a/security/nss/lib/pkix/src/RDNSequence/RemoveRelativeDistinguishedName.c b/security/nss/lib/pkix/src/RDNSequence/RemoveRelativeDistinguishedName.c deleted file mode 100644 index 141ab7f37..000000000 --- a/security/nss/lib/pkix/src/RDNSequence/RemoveRelativeDistinguishedName.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$"; -#endif /* DEBUG */ - -#ifndef PKIX_H -#include "pkix.h" -#endif /* PKIX_H */ - -/* - * NSSPKIXRDNSequence_RemoveRelativeDistinguishedName - * - * -- fgmr comments -- - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE - * NSS_ERROR_VALUE_OUT_OF_RANGE - * - * Return value: - * PR_SUCCESS upon success - * PR_FAILURE upon failure - */ - -NSS_IMPLEMENT PRStatus -NSSPKIXRDNSequence_RemoveRelativeDistinguishedName -( - NSSPKIXRDNSequence *rdnseq, - PRInt32 i -) -{ - nss_ClearErrorStack(); - -#ifdef DEBUG - if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) { - return PR_FAILURE; - } -#endif /* DEBUG */ - - return nssPKIXRDNSequence_RemoveRelativeDistinguishedName(rdnseq, i); -} diff --git a/security/nss/lib/pkix/src/RelativeDistinguishedName/PGetAttributeTypeAndValueCount.c b/security/nss/lib/pkix/src/RelativeDistinguishedName/PGetAttributeTypeAndValueCount.c deleted file mode 100644 index df8e1b48e..000000000 --- a/security/nss/lib/pkix/src/RelativeDistinguishedName/PGetAttributeTypeAndValueCount.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1994-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#ifdef DEBUG -static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$"; -#endif /* DEBUG */ - -#ifndef PKIX_H -#include "pkix.h" -#endif /* PKIX_H */ - -/* - * nssPKIXRelativeDistinguishedName_GetAttributeTypeAndValueCount - * - * -- fgmr comments -- - * - * The error may be one of the following values: - * NSS_ERROR_INVALID_PKIX_RDN - * NSS_ERROR_VALUE_OUT_OF_RANGE - * - * Return value: - * Nonnegative integer upon success - * -1 upon failure. - */ - -NSS_IMPLEMENT PRInt32 -nssPKIXRelativeDistinguishedName_GetAttributeTypeAndValueCount -( - NSSPKIXRelativeDistinguishedName *rdn -) -{ -#ifdef NSSDEBUG - if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_verifyPointer(rdn) ) { - return -1; - } -#endif /* NSSDEBUG */ - - if( 0 == rdn->count ) { - nss_pkix_RelativeDistinguishedName_Count(rdn); - } - -#ifdef PEDANTIC - if( 0 == rdn->count ) { - nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE); - return -1; - } -#endif /* PEDANTIC */ - - if( rdn->count > 0x7fffffff ) { - nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE); - return -1; - } - - return (PRInt32)(rdn->count); -} |