Use NSS_IMPLEMENT in code files for consistency.

Implement some basic certificate routines.
Define some of the PKI types.
Implement some trust domain routines, but only for testing purposes.
Allow for building as shared library.
This commit is contained in:
mcgreer%netscape.com 2001-09-13 22:16:22 +00:00
Родитель 9fc3829457
Коммит aadc955508
13 изменённых файлов: 929 добавлений и 229 удалений

Просмотреть файл

@ -32,14 +32,14 @@
*/
#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: asymmkey.c,v $ $Revision: 1.1 $ $Date: 2001-07-19 20:41:36 $ $Name: $";
static const char CVS_ID[] = "@(#) $RCSfile: asymmkey.c,v $ $Revision: 1.2 $ $Date: 2001-09-13 22:16:20 $ $Name: $";
#endif /* DEBUG */
#ifndef NSSPKI_H
#include "nsspki.h"
#endif /* NSSPKI_H */
PRStatus
NSS_IMPLEMENT PRStatus
NSSPrivateKey_Destroy
(
NSSPrivateKey *vk
@ -49,7 +49,7 @@ NSSPrivateKey_Destroy
return PR_FAILURE;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSPrivateKey_DeleteStoredObject
(
NSSPrivateKey *vk,
@ -60,7 +60,7 @@ NSSPrivateKey_DeleteStoredObject
return PR_FAILURE;
}
PRUint32
NSS_IMPLEMENT PRUint32
NSSPrivateKey_GetSignatureLength
(
NSSPrivateKey *vk
@ -70,7 +70,7 @@ NSSPrivateKey_GetSignatureLength
return -1;
}
PRUint32
NSS_IMPLEMENT PRUint32
NSSPrivateKey_GetPrivateModulusLength
(
NSSPrivateKey *vk
@ -80,7 +80,7 @@ NSSPrivateKey_GetPrivateModulusLength
return -1;
}
PRBool
NSS_IMPLEMENT PRBool
NSSPrivateKey_IsStillPresent
(
NSSPrivateKey *vk,
@ -91,7 +91,7 @@ NSSPrivateKey_IsStillPresent
return PR_FALSE;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSPrivateKey_Encode
(
NSSPrivateKey *vk,
@ -106,7 +106,7 @@ NSSPrivateKey_Encode
return NULL;
}
NSSTrustDomain *
NSS_IMPLEMENT NSSTrustDomain *
NSSPrivateKey_GetTrustDomain
(
NSSPrivateKey *vk,
@ -117,7 +117,7 @@ NSSPrivateKey_GetTrustDomain
return NULL;
}
NSSToken *
NSS_IMPLEMENT NSSToken *
NSSPrivateKey_GetToken
(
NSSPrivateKey *vk
@ -127,7 +127,7 @@ NSSPrivateKey_GetToken
return NULL;
}
NSSSlot *
NSS_IMPLEMENT NSSSlot *
NSSPrivateKey_GetSlot
(
NSSPrivateKey *vk
@ -137,7 +137,7 @@ NSSPrivateKey_GetSlot
return NULL;
}
NSSModule *
NSS_IMPLEMENT NSSModule *
NSSPrivateKey_GetModule
(
NSSPrivateKey *vk
@ -147,7 +147,7 @@ NSSPrivateKey_GetModule
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSPrivateKey_Decrypt
(
NSSPrivateKey *vk,
@ -162,7 +162,7 @@ NSSPrivateKey_Decrypt
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSPrivateKey_Sign
(
NSSPrivateKey *vk,
@ -177,7 +177,7 @@ NSSPrivateKey_Sign
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSPrivateKey_SignRecover
(
NSSPrivateKey *vk,
@ -192,7 +192,7 @@ NSSPrivateKey_SignRecover
return NULL;
}
NSSSymmetricKey *
NSS_IMPLEMENT NSSSymmetricKey *
NSSPrivateKey_UnwrapSymmetricKey
(
NSSPrivateKey *vk,
@ -205,7 +205,7 @@ NSSPrivateKey_UnwrapSymmetricKey
return NULL;
}
NSSSymmetricKey *
NSS_IMPLEMENT NSSSymmetricKey *
NSSPrivateKey_DeriveSymmetricKey
(
NSSPrivateKey *vk,
@ -221,7 +221,7 @@ NSSPrivateKey_DeriveSymmetricKey
return NULL;
}
NSSPublicKey *
NSS_IMPLEMENT NSSPublicKey *
NSSPrivateKey_FindPublicKey
(
NSSPrivateKey *vk
@ -232,7 +232,7 @@ NSSPrivateKey_FindPublicKey
return NULL;
}
NSSCryptoContext *
NSS_IMPLEMENT NSSCryptoContext *
NSSPrivateKey_CreateCryptoContext
(
NSSPrivateKey *vk,
@ -244,7 +244,7 @@ NSSPrivateKey_CreateCryptoContext
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSPrivateKey_FindCertificates
(
NSSPrivateKey *vk,
@ -257,7 +257,7 @@ NSSPrivateKey_FindCertificates
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSPrivateKey_FindBestCertificate
(
NSSPrivateKey *vk,
@ -270,7 +270,7 @@ NSSPrivateKey_FindBestCertificate
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSPublicKey_Destroy
(
NSSPublicKey *bk
@ -280,7 +280,7 @@ NSSPublicKey_Destroy
return PR_FAILURE;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSPublicKey_DeleteStoredObject
(
NSSPublicKey *bk,
@ -291,7 +291,7 @@ NSSPublicKey_DeleteStoredObject
return PR_FAILURE;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSPublicKey_Encode
(
NSSPublicKey *bk,
@ -305,7 +305,7 @@ NSSPublicKey_Encode
return NULL;
}
NSSTrustDomain *
NSS_IMPLEMENT NSSTrustDomain *
NSSPublicKey_GetTrustDomain
(
NSSPublicKey *bk,
@ -316,7 +316,7 @@ NSSPublicKey_GetTrustDomain
return NULL;
}
NSSToken *
NSS_IMPLEMENT NSSToken *
NSSPublicKey_GetToken
(
NSSPublicKey *bk,
@ -327,7 +327,7 @@ NSSPublicKey_GetToken
return NULL;
}
NSSSlot *
NSS_IMPLEMENT NSSSlot *
NSSPublicKey_GetSlot
(
NSSPublicKey *bk,
@ -338,7 +338,7 @@ NSSPublicKey_GetSlot
return NULL;
}
NSSModule *
NSS_IMPLEMENT NSSModule *
NSSPublicKey_GetModule
(
NSSPublicKey *bk,
@ -349,7 +349,7 @@ NSSPublicKey_GetModule
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSPublicKey_Encrypt
(
NSSPublicKey *bk,
@ -364,7 +364,7 @@ NSSPublicKey_Encrypt
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSPublicKey_Verify
(
NSSPublicKey *bk,
@ -378,7 +378,7 @@ NSSPublicKey_Verify
return PR_FAILURE;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSPublicKey_VerifyRecover
(
NSSPublicKey *bk,
@ -393,7 +393,7 @@ NSSPublicKey_VerifyRecover
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSPublicKey_WrapSymmetricKey
(
NSSPublicKey *bk,
@ -408,7 +408,7 @@ NSSPublicKey_WrapSymmetricKey
return NULL;
}
NSSCryptoContext *
NSS_IMPLEMENT NSSCryptoContext *
NSSPublicKey_CreateCryptoContext
(
NSSPublicKey *bk,
@ -420,7 +420,7 @@ NSSPublicKey_CreateCryptoContext
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSPublicKey_FindCertificates
(
NSSPublicKey *bk,
@ -433,7 +433,7 @@ NSSPublicKey_FindCertificates
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSPublicKey_FindBestCertificate
(
NSSPublicKey *bk,
@ -446,7 +446,7 @@ NSSPublicKey_FindBestCertificate
return NULL;
}
NSSPrivateKey *
NSS_IMPLEMENT NSSPrivateKey *
NSSPublicKey_FindPrivateKey
(
NSSPublicKey *bk,

Просмотреть файл

@ -32,24 +32,126 @@
*/
#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: certificate.c,v $ $Revision: 1.1 $ $Date: 2001-07-19 20:41:36 $ $Name: $";
static const char CVS_ID[] = "@(#) $RCSfile: certificate.c,v $ $Revision: 1.2 $ $Date: 2001-09-13 22:16:21 $ $Name: $";
#endif /* DEBUG */
#ifndef NSSPKI_H
#include "nsspki.h"
#endif /* NSSPKI_H */
PRStatus
#ifndef PKIT_H
#include "pkit.h"
#endif /* PKIT_H */
#ifndef CKHELPER_H
#include "ckhelper.h"
#endif /* CKHELPER_H */
/* I assume the following accessors into cert fields will be needed.
* We need to be able to return basic cert info, however, these are
* really PKCS#11 fields, so maybe not these in particular (mcgreer)
*/
NSS_IMPLEMENT NSSUTF8 *
NSSCertificate_GetLabel
(
NSSCertificate *c
)
{
NSSUTF8 *rvStr;
rvStr = nssUTF8_Create(NULL, nssStringType_PrintableString,
c->label.data, c->label.size);
return rvStr;
}
NSS_IMPLEMENT NSSItem *
NSSCertificate_GetID
(
NSSCertificate *c
)
{
return &c->id;
}
/* NSS needs access to this function, but does anyone else? */
static NSSCertificate *
NSSCertificate_Create
(
/* blah blah blah */
)
{
NSSArena *arena;
NSSCertificate *rvCert;
arena = NSSArena_Create();
if(!arena) {
return (NSSCertificate *)NULL;
}
rvCert = nss_ZNEW(arena, NSSCertificate);
if (!rvCert) {
goto loser;
}
rvCert->refCount = 1;
rvCert->arena = arena;
return rvCert;
loser:
if (arena) {
nssArena_Destroy(arena);
}
return (NSSCertificate *)NULL;
}
/* Create a certificate from an object handle. */
NSS_IMPLEMENT NSSCertificate *
NSSCertificate_CreateFromHandle
(
CK_OBJECT_HANDLE object,
NSSSlot *slot
)
{
NSSCertificate *rvCert;
PRStatus nssrv;
CK_ULONG template_size;
CK_ATTRIBUTE cert_template[] = {
{ CKA_ID, NULL, 0 },
{ CKA_VALUE, NULL, 0 },
{ CKA_LABEL, NULL, 0 },
};
template_size = sizeof(cert_template) / sizeof(cert_template[0]);
rvCert = NSSCertificate_Create();
if (!rvCert) {
return (NSSCertificate *)NULL;
}
rvCert->handle = object;
rvCert->slot = slot;
nssrv = NSSCKObject_GetAttributes(object, cert_template, template_size,
rvCert->arena, rvCert->slot);
if (nssrv) {
/* okay, but if failed because one of the attributes could not be
* found, do it gracefully (i.e., catch the error).
*/
goto loser;
}
NSS_CK_ATTRIBUTE_TO_ITEM(&cert_template[0], &rvCert->id);
NSS_CK_ATTRIBUTE_TO_ITEM(&cert_template[1], &rvCert->der);
NSS_CK_ATTRIBUTE_TO_ITEM(&cert_template[2], &rvCert->label);
return rvCert;
loser:
NSSCertificate_Destroy(rvCert);
return (NSSCertificate *)NULL;
}
NSS_IMPLEMENT PRStatus
NSSCertificate_Destroy
(
NSSCertificate *c
)
{
nss_SetError(NSS_ERROR_NOT_FOUND);
return PR_FAILURE;
if (--c->refCount == 0) {
return NSSArena_Destroy(c->arena);
}
return PR_SUCCESS;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCertificate_DeleteStoredObject
(
NSSCertificate *c,
@ -60,7 +162,7 @@ NSSCertificate_DeleteStoredObject
return PR_FAILURE;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCertificate_Validate
(
NSSCertificate *c,
@ -73,7 +175,7 @@ NSSCertificate_Validate
return PR_FAILURE;
}
void ** /* void *[] */
NSS_IMPLEMENT void ** /* void *[] */
NSSCertificate_ValidateCompletely
(
NSSCertificate *c,
@ -89,7 +191,7 @@ NSSCertificate_ValidateCompletely
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCertificate_ValidateAndDiscoverUsagesAndPolicies
(
NSSCertificate *c,
@ -107,7 +209,7 @@ NSSCertificate_ValidateAndDiscoverUsagesAndPolicies
return PR_FAILURE;
}
NSSDER *
NSS_IMPLEMENT NSSDER *
NSSCertificate_Encode
(
NSSCertificate *c,
@ -119,7 +221,7 @@ NSSCertificate_Encode
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSCertificate_BuildChain
(
NSSCertificate *c,
@ -135,7 +237,7 @@ NSSCertificate_BuildChain
return NULL;
}
NSSTrustDomain *
NSS_IMPLEMENT NSSTrustDomain *
NSSCertificate_GetTrustDomain
(
NSSCertificate *c
@ -145,7 +247,7 @@ NSSCertificate_GetTrustDomain
return NULL;
}
NSSToken *
NSS_IMPLEMENT NSSToken *
NSSCertificate_GetToken
(
NSSCertificate *c,
@ -156,7 +258,7 @@ NSSCertificate_GetToken
return NULL;
}
NSSSlot *
NSS_IMPLEMENT NSSSlot *
NSSCertificate_GetSlot
(
NSSCertificate *c,
@ -167,7 +269,7 @@ NSSCertificate_GetSlot
return NULL;
}
NSSModule *
NSS_IMPLEMENT NSSModule *
NSSCertificate_GetModule
(
NSSCertificate *c,
@ -178,7 +280,7 @@ NSSCertificate_GetModule
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCertificate_Encrypt
(
NSSCertificate *c,
@ -196,7 +298,7 @@ NSSCertificate_Encrypt
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCertificate_Verify
(
NSSCertificate *c,
@ -213,7 +315,7 @@ NSSCertificate_Verify
return PR_FAILURE;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCertificate_VerifyRecover
(
NSSCertificate *c,
@ -231,7 +333,7 @@ NSSCertificate_VerifyRecover
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCertificate_WrapSymmetricKey
(
NSSCertificate *c,
@ -249,7 +351,7 @@ NSSCertificate_WrapSymmetricKey
return NULL;
}
NSSCryptoContext *
NSS_IMPLEMENT NSSCryptoContext *
NSSCertificate_CreateCryptoContext
(
NSSCertificate *c,
@ -264,7 +366,7 @@ NSSCertificate_CreateCryptoContext
return NULL;
}
NSSPublicKey *
NSS_IMPLEMENT NSSPublicKey *
NSSCertificate_GetPublicKey
(
NSSCertificate *c
@ -274,7 +376,7 @@ NSSCertificate_GetPublicKey
return NULL;
}
NSSPrivateKey *
NSS_IMPLEMENT NSSPrivateKey *
NSSCertificate_FindPrivateKey
(
NSSCertificate *c,
@ -285,7 +387,7 @@ NSSCertificate_FindPrivateKey
return NULL;
}
PRBool
NSS_IMPLEMENT PRBool
NSSCertificate_IsPrivateKeyAvailable
(
NSSCertificate *c,
@ -297,7 +399,7 @@ NSSCertificate_IsPrivateKeyAvailable
return PR_FALSE;
}
PRBool
NSS_IMPLEMENT PRBool
NSSUserCertificate_IsStillPresent
(
NSSUserCertificate *uc,
@ -308,7 +410,7 @@ NSSUserCertificate_IsStillPresent
return PR_FALSE;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSUserCertificate_Decrypt
(
NSSUserCertificate *uc,
@ -326,7 +428,7 @@ NSSUserCertificate_Decrypt
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSUserCertificate_Sign
(
NSSUserCertificate *uc,
@ -344,7 +446,7 @@ NSSUserCertificate_Sign
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSUserCertificate_SignRecover
(
NSSUserCertificate *uc,
@ -362,7 +464,7 @@ NSSUserCertificate_SignRecover
return NULL;
}
NSSSymmetricKey *
NSS_IMPLEMENT NSSSymmetricKey *
NSSUserCertificate_UnwrapSymmetricKey
(
NSSUserCertificate *uc,
@ -380,7 +482,7 @@ NSSUserCertificate_UnwrapSymmetricKey
return NULL;
}
NSSSymmetricKey *
NSS_IMPLEMENT NSSSymmetricKey *
NSSUserCertificate_DeriveSymmetricKey
(
NSSUserCertificate *uc, /* provides private key */

Просмотреть файл

@ -1,4 +1,4 @@
#
#
# 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
@ -30,8 +30,125 @@
# may use your version of this file under either the MPL or the
# GPL.
#
CONFIG_CVS_ID = "@(#) $RCSfile: config.mk,v $ $Revision: 1.1 $ $Date: 2001-07-19 20:41:36 $ $Name: $"
#CONFIG_CVS_ID = "@(#) $RCSfile: config.mk,v $ $Revision: 1.2 $ $Date: 2001-09-13 22:16:21 $ $Name: $"
ifdef BUILD_IDG
DEFINES += -DNSSDEBUG
endif
#
# Override TARGETS variable so that only static libraries
# are specifed as dependencies within rules.mk.
#
#TARGETS = $(LIBRARY)
#SHARED_LIBRARY =
#IMPORT_LIBRARY =
#PROGRAM =
# can't do this in manifest.mn because OS_ARCH isn't defined there.
ifeq ($(OS_ARCH), WINNT)
# don't want the 32 in the shared library name
SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll
IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).lib
DLLFLAGS += -DEF:nsspki.def
RES = $(OBJDIR)/nsspki.res
RESNAME = nsspki.rc
# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
SHARED_LIBRARY_LIBS = \
$(DIST)/lib/nssb.lib \
$(DIST)/lib/nssdev.lib \
$(DIST)/lib/nsspki.lib \
$(NULL)
SHARED_LIBRARY_DIRS = \
../base \
../dev \
$(NULL)
EXTRA_LIBS += \
$(NULL)
EXTRA_SHARED_LIBS += \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)nspr4.lib \
$(NULL)
# $(PROGRAM) has NO explicit dependencies on $(OS_LIBS)
#OS_LIBS += \
# wsock32.lib \
# winmm.lib \
# $(NULL)
else
# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
SHARED_LIBRARY_LIBS = \
$(DIST)/lib/libnssb.$(LIB_SUFFIX) \
$(DIST)/lib/libnssdev.$(LIB_SUFFIX) \
$(DIST)/lib/libnsspki.$(LIB_SUFFIX) \
$(NULL)
EXTRA_LIBS += \
$(NULL)
SHARED_LIBRARY_DIRS = \
../base \
../dev \
$(NULL)
# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
EXTRA_SHARED_LIBS += \
-L$(DIST)/lib/ \
-lplc4 \
-lplds4 \
-lnspr4 \
$(NULL)
endif
ifeq ($(OS_ARCH),SunOS)
MAPFILE = $(OBJDIR)/nsspkimap.sun
ALL_TRASH += $(MAPFILE)
MKSHLIB += -M $(MAPFILE)
ifndef USE_64
ifeq ($(CPU_ARCH),sparc)
# The -R '$ORIGIN' linker option instructs libnss3.so to search for its
# dependencies (libfreebl_*.so) in the same directory where it resides.
MKSHLIB += -R '$$ORIGIN'
endif
endif
endif
ifeq ($(OS_ARCH),AIX)
MAPFILE = $(OBJDIR)/nsspkimap.aix
ALL_TRASH += $(MAPFILE)
EXPORT_RULES = -bexport:$(MAPFILE)
endif
ifeq ($(OS_ARCH),HP-UX)
MAPFILE = $(OBJDIR)/nsspkimap.hp
ALL_TRASH += $(MAPFILE)
MKSHLIB += -c $(MAPFILE)
endif
ifeq ($(OS_ARCH), OSF1)
MAPFILE = $(OBJDIR)/nsspkimap.osf
ALL_TRASH += $(MAPFILE)
MKSHLIB += -hidden -input $(MAPFILE)
endif
ifeq ($(OS_ARCH),Linux)
MAPFILE = $(OBJDIR)/nsspkimap.linux
ALL_TRASH += $(MAPFILE)
MKSHLIB += -Wl,--version-script,$(MAPFILE)
endif

Просмотреть файл

@ -32,14 +32,14 @@
*/
#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: cryptocontext.c,v $ $Revision: 1.1 $ $Date: 2001-07-19 20:41:37 $ $Name: $";
static const char CVS_ID[] = "@(#) $RCSfile: cryptocontext.c,v $ $Revision: 1.2 $ $Date: 2001-09-13 22:16:21 $ $Name: $";
#endif /* DEBUG */
#ifndef NSSPKI_H
#include "nsspki.h"
#endif /* NSSPKI_H */
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_Destroy
(
NSSCryptoContext *td
@ -49,7 +49,7 @@ NSSCryptoContext_Destroy
return PR_FAILURE;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_SetDefaultCallback
(
NSSCryptoContext *td,
@ -61,7 +61,7 @@ NSSCryptoContext_SetDefaultCallback
return PR_FAILURE;
}
NSSCallback *
NSS_IMPLEMENT NSSCallback *
NSSCryptoContext_GetDefaultCallback
(
NSSCryptoContext *td,
@ -72,7 +72,7 @@ NSSCryptoContext_GetDefaultCallback
return NULL;
}
NSSTrustDomain *
NSS_IMPLEMENT NSSTrustDomain *
NSSCryptoContext_GetTrustDomain
(
NSSCryptoContext *td
@ -82,7 +82,7 @@ NSSCryptoContext_GetTrustDomain
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_ImportCertificate
(
NSSCryptoContext *cc,
@ -93,7 +93,7 @@ NSSCryptoContext_ImportCertificate
return PR_FAILURE;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSCryptoContext_ImportPKIXCertificate
(
NSSCryptoContext *cc,
@ -104,7 +104,7 @@ NSSCryptoContext_ImportPKIXCertificate
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSCryptoContext_ImportEncodedCertificate
(
NSSCryptoContext *cc,
@ -115,7 +115,7 @@ NSSCryptoContext_ImportEncodedCertificate
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_ImportEncodedPKIXCertificateChain
(
NSSCryptoContext *cc,
@ -126,7 +126,7 @@ NSSCryptoContext_ImportEncodedPKIXCertificateChain
return PR_FAILURE;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSCryptoContext_FindBestCertificateByNickname
(
NSSCryptoContext *cc,
@ -140,7 +140,7 @@ NSSCryptoContext_FindBestCertificateByNickname
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSCryptoContext_FindCertificatesByNickname
(
NSSCryptoContext *cc,
@ -154,7 +154,7 @@ NSSCryptoContext_FindCertificatesByNickname
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSCryptoContext_FindCertificateByIssuerAndSerialNumber
(
NSSCryptoContext *cc,
@ -166,7 +166,7 @@ NSSCryptoContext_FindCertificateByIssuerAndSerialNumber
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSCryptoContext_FindBestCertificateBySubject
(
NSSCryptoContext *cc,
@ -180,7 +180,7 @@ NSSCryptoContext_FindBestCertificateBySubject
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSCryptoContext_FindCertificatesBySubject
(
NSSCryptoContext *cc,
@ -194,7 +194,7 @@ NSSCryptoContext_FindCertificatesBySubject
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSCryptoContext_FindBestCertificateByNameComponents
(
NSSCryptoContext *cc,
@ -208,7 +208,7 @@ NSSCryptoContext_FindBestCertificateByNameComponents
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSCryptoContext_FindCertificatesByNameComponents
(
NSSCryptoContext *cc,
@ -222,7 +222,7 @@ NSSCryptoContext_FindCertificatesByNameComponents
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSCryptoContext_FindCertificateByEncodedCertificate
(
NSSCryptoContext *cc,
@ -233,7 +233,7 @@ NSSCryptoContext_FindCertificateByEncodedCertificate
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSCryptoContext_FindBestCertificateByEmail
(
NSSCryptoContext *cc,
@ -244,7 +244,7 @@ NSSCryptoContext_FindBestCertificateByEmail
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSCryptoContext_FindCertificatesByEmail
(
NSSCryptoContext *cc,
@ -258,7 +258,7 @@ NSSCryptoContext_FindCertificatesByEmail
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSCryptoContext_FindCertificateByOCSPHash
(
NSSCryptoContext *cc,
@ -269,7 +269,7 @@ NSSCryptoContext_FindCertificateByOCSPHash
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSCryptoContext_FindBestUserCertificate
(
NSSCryptoContext *cc,
@ -282,7 +282,7 @@ NSSCryptoContext_FindBestUserCertificate
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSCryptoContext_FindUserCertificates
(
NSSCryptoContext *cc,
@ -298,7 +298,7 @@ NSSCryptoContext_FindUserCertificates
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSCryptoContext_FindBestUserCertificateForSSLClientAuth
(
NSSCryptoContext *cc,
@ -313,7 +313,7 @@ NSSCryptoContext_FindBestUserCertificateForSSLClientAuth
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSCryptoContext_FindUserCertificatesForSSLClientAuth
(
NSSCryptoContext *cc,
@ -331,7 +331,7 @@ NSSCryptoContext_FindUserCertificatesForSSLClientAuth
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSCryptoContext_FindBestUserCertificateForEmailSigning
(
NSSCryptoContext *cc,
@ -346,7 +346,7 @@ NSSCryptoContext_FindBestUserCertificateForEmailSigning
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSCryptoContext_FindUserCertificatesForEmailSigning
(
NSSCryptoContext *cc,
@ -364,7 +364,7 @@ NSSCryptoContext_FindUserCertificatesForEmailSigning
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_GenerateKeyPair
(
NSSCryptoContext *cc,
@ -380,7 +380,7 @@ NSSCryptoContext_GenerateKeyPair
return PR_FAILURE;
}
NSSSymmetricKey *
NSS_IMPLEMENT NSSSymmetricKey *
NSSCryptoContext_GenerateSymmetricKey
(
NSSCryptoContext *cc,
@ -394,7 +394,7 @@ NSSCryptoContext_GenerateSymmetricKey
return NULL;
}
NSSSymmetricKey *
NSS_IMPLEMENT NSSSymmetricKey *
NSSCryptoContext_GenerateSymmetricKeyFromPassword
(
NSSCryptoContext *cc,
@ -408,7 +408,7 @@ NSSCryptoContext_GenerateSymmetricKeyFromPassword
return NULL;
}
NSSSymmetricKey *
NSS_IMPLEMENT NSSSymmetricKey *
NSSCryptoContext_FindSymmetricKeyByAlgorithmAndKeyID
(
NSSCryptoContext *cc,
@ -421,7 +421,7 @@ NSSCryptoContext_FindSymmetricKeyByAlgorithmAndKeyID
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_Decrypt
(
NSSCryptoContext *cc,
@ -436,7 +436,7 @@ NSSCryptoContext_Decrypt
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_BeginDecrypt
(
NSSCryptoContext *cc,
@ -448,7 +448,7 @@ NSSCryptoContext_BeginDecrypt
return PR_FAILURE;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_ContinueDecrypt
(
NSSCryptoContext *cc,
@ -461,7 +461,7 @@ NSSCryptoContext_ContinueDecrypt
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_FinishDecrypt
(
NSSCryptoContext *cc,
@ -473,7 +473,7 @@ NSSCryptoContext_FinishDecrypt
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_Sign
(
NSSCryptoContext *cc,
@ -488,7 +488,7 @@ NSSCryptoContext_Sign
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_BeginSign
(
NSSCryptoContext *cc,
@ -500,7 +500,7 @@ NSSCryptoContext_BeginSign
return PR_FAILURE;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_ContinueSign
(
NSSCryptoContext *cc,
@ -511,7 +511,7 @@ NSSCryptoContext_ContinueSign
return PR_FAILURE;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_FinishSign
(
NSSCryptoContext *cc,
@ -523,7 +523,7 @@ NSSCryptoContext_FinishSign
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_SignRecover
(
NSSCryptoContext *cc,
@ -538,7 +538,7 @@ NSSCryptoContext_SignRecover
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_BeginSignRecover
(
NSSCryptoContext *cc,
@ -550,7 +550,7 @@ NSSCryptoContext_BeginSignRecover
return PR_FAILURE;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_ContinueSignRecover
(
NSSCryptoContext *cc,
@ -563,7 +563,7 @@ NSSCryptoContext_ContinueSignRecover
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_FinishSignRecover
(
NSSCryptoContext *cc,
@ -575,7 +575,7 @@ NSSCryptoContext_FinishSignRecover
return NULL;
}
NSSSymmetricKey *
NSS_IMPLEMENT NSSSymmetricKey *
NSSCryptoContext_UnwrapSymmetricKey
(
NSSCryptoContext *cc,
@ -588,7 +588,7 @@ NSSCryptoContext_UnwrapSymmetricKey
return NULL;
}
NSSSymmetricKey *
NSS_IMPLEMENT NSSSymmetricKey *
NSSCryptoContext_DeriveSymmetricKey
(
NSSCryptoContext *cc,
@ -604,7 +604,7 @@ NSSCryptoContext_DeriveSymmetricKey
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_Encrypt
(
NSSCryptoContext *cc,
@ -619,7 +619,7 @@ NSSCryptoContext_Encrypt
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_BeginEncrypt
(
NSSCryptoContext *cc,
@ -631,7 +631,7 @@ NSSCryptoContext_BeginEncrypt
return PR_FAILURE;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_ContinueEncrypt
(
NSSCryptoContext *cc,
@ -644,7 +644,7 @@ NSSCryptoContext_ContinueEncrypt
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_FinishEncrypt
(
NSSCryptoContext *cc,
@ -656,7 +656,7 @@ NSSCryptoContext_FinishEncrypt
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_Verify
(
NSSCryptoContext *cc,
@ -670,7 +670,7 @@ NSSCryptoContext_Verify
return PR_FAILURE;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_BeginVerify
(
NSSCryptoContext *cc,
@ -683,7 +683,7 @@ NSSCryptoContext_BeginVerify
return PR_FAILURE;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_ContinueVerify
(
NSSCryptoContext *cc,
@ -694,7 +694,7 @@ NSSCryptoContext_ContinueVerify
return PR_FAILURE;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_FinishVerify
(
NSSCryptoContext *cc
@ -704,7 +704,7 @@ NSSCryptoContext_FinishVerify
return PR_FAILURE;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_VerifyRecover
(
NSSCryptoContext *cc,
@ -719,7 +719,7 @@ NSSCryptoContext_VerifyRecover
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_BeginVerifyRecover
(
NSSCryptoContext *cc,
@ -731,7 +731,7 @@ NSSCryptoContext_BeginVerifyRecover
return PR_FAILURE;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_ContinueVerifyRecover
(
NSSCryptoContext *cc,
@ -744,7 +744,7 @@ NSSCryptoContext_ContinueVerifyRecover
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_FinishVerifyRecover
(
NSSCryptoContext *cc,
@ -756,7 +756,7 @@ NSSCryptoContext_FinishVerifyRecover
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_WrapSymmetricKey
(
NSSCryptoContext *cc,
@ -771,7 +771,7 @@ NSSCryptoContext_WrapSymmetricKey
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_Digest
(
NSSCryptoContext *cc,
@ -786,7 +786,7 @@ NSSCryptoContext_Digest
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_BeginDigest
(
NSSCryptoContext *cc,
@ -798,7 +798,7 @@ NSSCryptoContext_BeginDigest
return PR_FAILURE;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSCryptoContext_ContinueDigest
(
NSSCryptoContext *cc,
@ -810,7 +810,7 @@ NSSCryptoContext_ContinueDigest
return PR_FAILURE;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSCryptoContext_FinishDigest
(
NSSCryptoContext *cc,
@ -822,7 +822,7 @@ NSSCryptoContext_FinishDigest
return NULL;
}
NSSCryptoContext *
NSS_IMPLEMENT NSSCryptoContext *
NSSCryptoContext_Clone
(
NSSCryptoContext *cc

Просмотреть файл

@ -30,11 +30,13 @@
# may use your version of this file under either the MPL or the
# GPL.
#
MANIFEST_CVS_ID = "@(#) $RCSfile: manifest.mn,v $ $Revision: 1.1 $ $Date: 2001-07-19 20:41:37 $ $Name: $"
MANIFEST_CVS_ID = "@(#) $RCSfile: manifest.mn,v $ $Revision: 1.2 $ $Date: 2001-09-13 22:16:21 $ $Name: $"
CORE_DEPTH = ../../..
PRIVATE_EXPORTS = \
pki.h \
pkit.h \
$(NULL)
EXPORTS = \
@ -55,3 +57,4 @@ CSRCS = \
REQUIRES = security nspr
LIBRARY_NAME = nsspki
LIBRARY_VERSION = 3

Просмотреть файл

@ -0,0 +1,249 @@
;+#
;+# 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) 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.
;+#
;+# OK, this file is meant to support SUN, LINUX, AIX and WINDOWS
;+# 1. For all unix platforms, the string ";-" means "remove this line"
;+# 2. For all unix platforms, the string " DATA " will be removed from any
;+# line on which it occurs.
;+# 3. Lines containing ";+" will have ";+" removed on SUN and LINUX.
;+# On AIX, lines containing ";+" will be removed.
;+# 4. For all unix platforms, the string ";;" will thave the ";;" removed.
;+# 5. For all unix platforms, after the above processing has taken place,
;+# all characters after the first ";" on the line will be removed.
;+# And for AIX, the first ";" will also be removed.
;+# This file is passed directly to windows. Since ';' is a comment, all UNIX
;+# directives are hidden behind ";", ";+", and ";-"
;+#
;+#
;+# This file contains the complete Stan API to date. Functions that are
;+# not yet implemented are commented out.
;+
;+NSS_3.4 { # NSS 3.4 release
;+ global:
LIBRARY nsspki3 ;-
EXPORTS ;-
NSSArena_Create
NSSArena_Destroy
NSS_GetError
NSS_GetErrorStack
;NSSCertificate_Destroy;
;NSSCertificate_DeleteStoredObject;
;NSSCertificate_Validate;
;NSSCertificate_ValidateCompletely;
;NSSCertificate_ValidateAndDiscoverUsagesAndPolicies;
;NSSCertificate_Encode;
;NSSCertificate_BuildChain;
;NSSCertificate_GetTrustDomain;
;NSSCertificate_GetToken;
;NSSCertificate_GetSlot;
;NSSCertificate_GetModule;
;NSSCertificate_Encrypt;
;NSSCertificate_Verify;
;NSSCertificate_VerifyRecover;
;NSSCertificate_WrapSymmetricKey;
;NSSCertificate_CreateCryptoContext;
;NSSCertificate_GetPublicKey;
;NSSCertificate_FindPrivateKey;
;NSSCertificate_IsPrivateKeyAvailable;
;NSSUserCertificate_IsStillPresent;
;NSSUserCertificate_Decrypt;
;NSSUserCertificate_Sign;
;NSSUserCertificate_SignRecover;
;NSSUserCertificate_UnwrapSymmetricKey;
;NSSUserCertificate_DeriveSymmetricKey;
;NSSPrivateKey_Destroy;
;NSSPrivateKey_DeleteStoredObject;
;NSSPrivateKey_GetSignatureLength;
;NSSPrivateKey_GetPrivateModulusLength;
;NSSPrivateKey_IsStillPresent;
;NSSPrivateKey_Encode;
;NSSPrivateKey_GetTrustDomain;
;NSSPrivateKey_GetToken;
;NSSPrivateKey_GetSlot;
;NSSPrivateKey_GetModule;
;NSSPrivateKey_Decrypt;
;NSSPrivateKey_Sign;
;NSSPrivateKey_SignRecover;
;NSSPrivateKey_UnwrapSymmetricKey;
;NSSPrivateKey_DeriveSymmetricKey;
;NSSPrivateKey_FindPublicKey;
;NSSPrivateKey_CreateCryptoContext;
;NSSPrivateKey_FindCertificates;
;NSSPrivateKey_FindBestCertificate;
;NSSPublicKey_Destroy;
;NSSPublicKey_DeleteStoredObject;
;NSSPublicKey_Encode;
;NSSPublicKey_GetTrustDomain;
;NSSPublicKey_GetToken;
;NSSPublicKey_GetSlot;
;NSSPublicKey_GetModule;
;NSSPublicKey_Encrypt;
;NSSPublicKey_Verify;
;NSSPublicKey_VerifyRecover;
;NSSPublicKey_WrapSymmetricKey;
;NSSPublicKey_CreateCryptoContext;
;NSSPublicKey_FindCertificates;
;NSSPublicKey_FindBestCertificate;
;NSSPublicKey_FindPrivateKey;
;NSSSymmetricKey_Destroy;
;NSSSymmetricKey_DeleteStoredObject;
;NSSSymmetricKey_GetKeyLength;
;NSSSymmetricKey_GetKeyStrength;
;NSSSymmetricKey_IsStillPresent;
;NSSSymmetricKey_GetTrustDomain;
;NSSSymmetricKey_GetToken;
;NSSSymmetricKey_GetSlot;
;NSSSymmetricKey_GetModule;
;NSSSymmetricKey_Encrypt;
;NSSSymmetricKey_Decrypt;
;NSSSymmetricKey_Sign;
;NSSSymmetricKey_SignRecover;
;NSSSymmetricKey_Verify;
;NSSSymmetricKey_VerifyRecover;
;NSSSymmetricKey_WrapSymmetricKey;
;NSSSymmetricKey_WrapPrivateKey;
;NSSSymmetricKey_UnwrapSymmetricKey;
;NSSSymmetricKey_UnwrapPrivateKey;
;NSSSymmetricKey_DeriveSymmetricKey;
;NSSSymmetricKey_CreateCryptoContext;
NSSTrustDomain_Create;
;NSSTrustDomain_Destroy;
;NSSTrustDomain_SetDefaultCallback;
;NSSTrustDomain_GetDefaultCallback;
NSSTrustDomain_LoadModule;
;NSSTrustDomain_DisableToken;
;NSSTrustDomain_EnableToken;
;NSSTrustDomain_IsTokenEnabled;
;NSSTrustDomain_FindSlotByName;
;NSSTrustDomain_FindTokenByName;
;NSSTrustDomain_FindTokenBySlotName;
;NSSTrustDomain_FindTokenForAlgorithm;
;NSSTrustDomain_FindBestTokenForAlgorithms;
;NSSTrustDomain_Login;
;NSSTrustDomain_Logout;
;NSSTrustDomain_ImportCertificate;
;NSSTrustDomain_ImportPKIXCertificate;
;NSSTrustDomain_ImportEncodedCertificate;
;NSSTrustDomain_ImportEncodedCertificateChain;
;NSSTrustDomain_ImportEncodedPrivateKey;
;NSSTrustDomain_ImportEncodedPublicKey;
;NSSTrustDomain_FindBestCertificateByNickname;
;NSSTrustDomain_FindCertificatesByNickname
;NSSTrustDomain_FindCertificateByIssuerAndSerialNumber;
;NSSTrustDomain_FindBestCertificateBySubject;
;NSSTrustDomain_FindCertificatesBySubject;
;NSSTrustDomain_FindBestCertificateByNameComponents;
;NSSTrustDomain_FindCertificatesByNameComponents;
;NSSTrustDomain_FindCertificateByEncodedCertificate;
;NSSTrustDomain_FindCertificateByEmail;
;NSSTrustDomain_FindCertificatesByEmail;
;NSSTrustDomain_FindCertificateByOCSPHash;
;NSSTrustDomain_FindBestUserCertificate;
;NSSTrustDomain_FindUserCertificates;
;NSSTrustDomain_FindBestUserCertificateForSSLClientAuth;
;NSSTrustDomain_FindUserCertificatesForSSLClientAuth;
;NSSTrustDomain_FindBestUserCertificateForEmailSigning;
;NSSTrustDomain_FindUserCertificatesForEmailSigning;
;NSSTrustDomain_GenerateKeyPair;
;NSSTrustDomain_GenerateSymmetricKey;
;NSSTrustDomain_GenerateSymmetricKeyFromPassword;
;NSSTrustDomain_FindSymmetricKeyByAlgorithmAndKeyID;
;NSSTrustDomain_CreateCryptoContext;
;NSSTrustDomain_CreateCryptoContextForAlgorithm;
;NSSTrustDomain_CreateCryptoContextForAlgorithmAndParameters;
;NSSCryptoContext_Destroy;
;NSSCryptoContext_SetDefaultCallback;
;NSSCryptoContext_GetDefaultCallback;
;NSSCryptoContext_GetTrustDomain;
;NSSCryptoContext_ImportCertificate;
;NSSCryptoContext_ImportPKIXCertificate;
;NSSCryptoContext_ImportEncodedCertificate;
;NSSCryptoContext_ImportEncodedPKIXCertificateChain;
;NSSCryptoContext_FindBestCertificateByNickname;
;NSSCryptoContext_FindCertificatesByNickname;
;NSSCryptoContext_FindCertificateByIssuerAndSerialNumber;
;NSSCryptoContext_FindBestCertificateBySubject;
;NSSCryptoContext_FindCertificatesBySubject;
;NSSCryptoContext_FindBestCertificateByNameComponents;
;NSSCryptoContext_FindCertificatesByNameComponents;
;NSSCryptoContext_FindCertificateByEncodedCertificate;
;NSSCryptoContext_FindBestCertificateByEmail;
;NSSCryptoContext_FindCertificatesByEmail;
;NSSCryptoContext_FindCertificateByOCSPHash;
;NSSCryptoContext_FindBestUserCertificate;
;NSSCryptoContext_FindUserCertificates;
;NSSCryptoContext_FindBestUserCertificateForSSLClientAuth;
;NSSCryptoContext_FindUserCertificatesForSSLClientAuth;
;NSSCryptoContext_FindBestUserCertificateForEmailSigning;
;NSSCryptoContext_FindUserCertificatesForEmailSigning;
;NSSCryptoContext_GenerateKeyPair;
;NSSCryptoContext_GenerateSymmetricKey;
;NSSCryptoContext_GenerateSymmetricKeyFromPassword;
;NSSCryptoContext_FindSymmetricKeyByAlgorithmAndKeyID;
;NSSCryptoContext_Decrypt;
;NSSCryptoContext_BeginDecrypt;
;NSSCryptoContext_ContinueDecrypt;
;NSSCryptoContext_FinishDecrypt;
;NSSCryptoContext_Sign;
;NSSCryptoContext_BeginSign;
;NSSCryptoContext_ContinueSign;
;NSSCryptoContext_FinishSign;
;NSSCryptoContext_SignRecover;
;NSSCryptoContext_BeginSignRecover;
;NSSCryptoContext_ContinueSignRecover;
;NSSCryptoContext_FinishSignRecover;
;NSSCryptoContext_UnwrapSymmetricKey;
;NSSCryptoContext_DeriveSymmetricKey;
;NSSCryptoContext_Encrypt;
;NSSCryptoContext_BeginEncrypt;
;NSSCryptoContext_ContinueEncrypt;
;NSSCryptoContext_FinishEncrypt;
;NSSCryptoContext_Verify;
;NSSCryptoContext_BeginVerify;
;NSSCryptoContext_ContinueVerify;
;NSSCryptoContext_FinishVerify;
;NSSCryptoContext_VerifyRecover;
;NSSCryptoContext_BeginVerifyRecover;
;NSSCryptoContext_ContinueVerifyRecover;
;NSSCryptoContext_FinishVerifyRecover;
;NSSCryptoContext_WrapSymmetricKey;
;NSSCryptoContext_Digest;
;NSSCryptoContext_BeginDigest;
;NSSCryptoContext_ContinueDigest;
;NSSCryptoContext_FinishDigest;
;NSSCryptoContext_Clone;
;+ local:
NSSTrustDomain_TraverseCertificates;
NSSCertificate_GetID;
NSSCertificate_GetLabel;
;+ *;
;+};

Просмотреть файл

@ -35,7 +35,7 @@
#define NSSPKI_H
#ifdef DEBUG
static const char NSSPKI_CVS_ID[] = "@(#) $RCSfile: nsspki.h,v $ $Revision: 1.2 $ $Date: 2001-07-19 20:41:38 $ $Name: $";
static const char NSSPKI_CVS_ID[] = "@(#) $RCSfile: nsspki.h,v $ $Revision: 1.3 $ $Date: 2001-09-13 22:16:21 $ $Name: $";
#endif /* DEBUG */
/*
@ -44,13 +44,17 @@ static const char NSSPKI_CVS_ID[] = "@(#) $RCSfile: nsspki.h,v $ $Revision: 1.2
* This file prototypes the methods of the top-level PKI objects.
*/
#ifndef DEVT_H
#include "devt.h"
#endif /* DEVT_H */
#ifndef NSSPKIT_H
#include "nsspkit.h"
#endif /* NSSPKIT_H */
#ifndef NSSPKI1_H
#include "nsspki1.h"
#endif /* NSSPKIT_H */
#endif /* NSSPKI1_H */
#ifndef BASE_H
#include "base.h"
@ -1455,6 +1459,7 @@ NSSTrustDomain_GetDefaultCallback
NSS_EXTERN PRStatus
NSSTrustDomain_LoadModule
(
NSSTrustDomain *td,
NSSUTF8 *moduleOpt,
NSSUTF8 *uriOpt,
NSSUTF8 *opaqueOpt,
@ -1867,16 +1872,20 @@ NSSTrustDomain_FindCertificateByOCSPHash
* discourage traversal. Thus for now, this is commented out.
* If it's needed, let's look at the situation more closely to
* find out what the actual requirements are.
*
*
* NSS_EXTERN PRStatus *
* NSSTrustDomain_TraverseCertificates
* (
* NSSTrustDomain *td,
* PRStatus (*callback)(NSSCertificate *c, void *arg),
* void *arg
* );
*/
/* For now, adding this function. This may only be for debugging
* purposes.
* Perhaps some equivalent function, on a specified token, will be
* needed in a "friend" header file?
*/
NSS_EXTERN PRStatus *
NSSTrustDomain_TraverseCertificates
(
NSSTrustDomain *td,
PRStatus (*callback)(NSSCertificate *c, void *arg),
void *arg
);
/*
* NSSTrustDomain_FindBestUserCertificate
@ -2162,7 +2171,7 @@ NSSTrustDomain_CreateCryptoContextForAlgorithmAndParameters
NSS_EXTERN PRStatus
NSSCryptoContext_Destroy
(
NSSCryptoContext *td
NSSCryptoContext *cc
);
/* establishing a default callback */
@ -2175,7 +2184,7 @@ NSSCryptoContext_Destroy
NSS_EXTERN PRStatus
NSSCryptoContext_SetDefaultCallback
(
NSSCryptoContext *td,
NSSCryptoContext *cc,
NSSCallback *newCallback,
NSSCallback **oldCallbackOpt
);
@ -2188,7 +2197,7 @@ NSSCryptoContext_SetDefaultCallback
NSS_EXTERN NSSCallback *
NSSCryptoContext_GetDefaultCallback
(
NSSCryptoContext *td,
NSSCryptoContext *cc,
PRStatus *statusOpt
);
@ -2200,7 +2209,7 @@ NSSCryptoContext_GetDefaultCallback
NSS_EXTERN NSSTrustDomain *
NSSCryptoContext_GetTrustDomain
(
NSSCryptoContext *td
NSSCryptoContext *cc
);
/* AddModule, etc: should we allow "temporary" changes here? */

Просмотреть файл

Просмотреть файл

@ -35,7 +35,7 @@
#define NSSPKIT_H
#ifdef DEBUG
static const char NSSPKIT_CVS_ID[] = "@(#) $RCSfile: nsspkit.h,v $ $Revision: 1.2 $ $Date: 2001-07-19 20:41:38 $ $Name: $";
static const char NSSPKIT_CVS_ID[] = "@(#) $RCSfile: nsspkit.h,v $ $Revision: 1.3 $ $Date: 2001-09-13 22:16:22 $ $Name: $";
#endif /* DEBUG */
/*
@ -160,7 +160,6 @@ typedef struct NSSTrustDomainStr NSSTrustDomain;
* learned.
*/
struct NSSCryptoContextStr;
typedef struct NSSCryptoContextStr NSSCryptoContext;
/*
@ -184,6 +183,9 @@ typedef struct NSSCryptoContextStr NSSCryptoContext;
struct NSSTimeStr;
typedef struct NSSTimeStr NSSTime;
struct NSSTrustStr;
typedef struct NSSTrustStr NSSTrust;
/*
* NSSUsage
*
@ -233,16 +235,6 @@ typedef struct NSSAlgorithmAndParametersStr NSSAlgorithmAndParameters;
struct NSSCallbackStr;
typedef struct NSSCallbackStr NSSCallback;
/*
* NSSModule and NSSSlot -- placeholders for the PKCS#11 types
*/
struct NSSModuleStr;
typedef struct NSSModuleStr NSSModule;
struct NSSSlotStr;
typedef struct NSSSlotStr NSSSlot;
typedef PRUint32 NSSOperations;
/* 1) Do we want these to be preprocessor definitions or constants? */
/* 2) What is the correct and complete list? */
@ -256,8 +248,6 @@ typedef PRUint32 NSSOperations;
#define NSSOperations_VERIFY 0x0040
#define NSSOperations_VERIFY_RECOVER 0x0080
/* Presumably, this doesn't belong here. But for now... */
typedef struct NSSTokenStr NSSToken;
struct NSSPKIXCertificateStr;
PR_END_EXTERN_C

Просмотреть файл

@ -0,0 +1,64 @@
/*
* 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.
*/
#ifndef PKI_H
#define PKI_H
#ifdef DEBUG
static const char PKI_CVS_ID[] = "@(#) $RCSfile: pki.h,v $ $Revision: 1.1 $ $Date: 2001-09-13 22:16:22 $ $Name: $";
#endif /* DEBUG */
PR_BEGIN_EXTERN_C
NSS_EXTERN NSSCertificate *
NSSCertificate_CreateFromHandle
(
CK_OBJECT_HANDLE object,
NSSSlot *slot
);
NSS_EXTERN NSSUTF8 *
NSSCertificate_GetLabel
(
NSSCertificate *c
);
NSS_EXTERN NSSItem *
NSSCertificate_GetID
(
NSSCertificate *c
);
PR_END_EXTERN_C
#endif /* PKI_H */

123
security/nss/lib/pki/pkit.h Normal file
Просмотреть файл

@ -0,0 +1,123 @@
/*
* 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.
*/
#ifndef PKIT_H
#define PKIT_H
#ifdef DEBUG
static const char PKIT_CVS_ID[] = "@(#) $RCSfile: pkit.h,v $ $Revision: 1.1 $ $Date: 2001-09-13 22:16:22 $ $Name: $";
#endif /* DEBUG */
/*
* pkit.h
*
* This file contains definitions for the types of the top-level PKI objects.
*/
#ifndef NSSBASET_H
#include "nssbaset.h"
#endif /* NSSBASET_H */
#ifndef NSSCKT_H
#include "nssckt.h"
#endif /* NSSCKT_H */
#ifndef NSSPKIT_H
#include "nsspkit.h"
#endif /* NSSPKIT_H */
#ifndef DEVT_H
#include "devt.h"
#endif /* DEVT_H */
PR_BEGIN_EXTERN_C
#define NSSPTR_ADD_REF(p) ((p)->refCount++)
struct NSSCertificateStr
{
PRInt32 refCount;
NSSArena *arena;
/*NSSDecodedCert certData;*/
NSSItem id;
NSSItem der;
NSSItem label;
CK_OBJECT_HANDLE handle;
NSSSlot *slot;
NSSTrustDomain *trustDomain;
NSSCryptoContext *cryptoContext;
NSSTrust *trust;
};
struct NSSPrivateKeyStr;
struct NSSPublicKeyStr;
struct NSSSymmetricKeyStr;
struct NSSTrustDomainStr {
PRInt32 refCount;
NSSArena *arena;
NSSModule *module; /* XXX NSSList *modules; */
/* (list not defined yet) */
};
struct NSSCryptoContextStr
{
PRInt32 refCount;
NSSArena *arena;
CK_SESSION_HANDLE session;
void *epv;
NSSTrustDomain *trustDomain;
NSSCallback *defaultCallback;
NSSCertificate **certificates;
PRInt32 numCertificates;
};
struct NSSTimeStr;
struct NSSTrustStr;
struct NSSUsageStr;
struct NSSPoliciesStr;
struct NSSAlgorithmAndParametersStr;
struct NSSCallbackStr;
struct NSSPKIXCertificateStr;
PR_END_EXTERN_C
#endif /* PKIT_H */

Просмотреть файл

@ -32,14 +32,14 @@
*/
#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: symmkey.c,v $ $Revision: 1.1 $ $Date: 2001-07-19 20:41:38 $ $Name: $";
static const char CVS_ID[] = "@(#) $RCSfile: symmkey.c,v $ $Revision: 1.2 $ $Date: 2001-09-13 22:16:22 $ $Name: $";
#endif /* DEBUG */
#ifndef NSSPKI_H
#include "nsspki.h"
#endif /* NSSPKI_H */
PRStatus
NSS_IMPLEMENT PRStatus
NSSSymmetricKey_Destroy
(
NSSSymmetricKey *mk
@ -49,7 +49,7 @@ NSSSymmetricKey_Destroy
return PR_FAILURE;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSSymmetricKey_DeleteStoredObject
(
NSSSymmetricKey *mk,
@ -60,7 +60,7 @@ NSSSymmetricKey_DeleteStoredObject
return PR_FAILURE;
}
PRUint32
NSS_IMPLEMENT PRUint32
NSSSymmetricKey_GetKeyLength
(
NSSSymmetricKey *mk
@ -70,7 +70,7 @@ NSSSymmetricKey_GetKeyLength
return -1;
}
PRUint32
NSS_IMPLEMENT PRUint32
NSSSymmetricKey_GetKeyStrength
(
NSSSymmetricKey *mk
@ -80,7 +80,7 @@ NSSSymmetricKey_GetKeyStrength
return -1;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSSymmetricKey_IsStillPresent
(
NSSSymmetricKey *mk
@ -90,7 +90,7 @@ NSSSymmetricKey_IsStillPresent
return PR_FAILURE;
}
NSSTrustDomain *
NSS_IMPLEMENT NSSTrustDomain *
NSSSymmetricKey_GetTrustDomain
(
NSSSymmetricKey *mk,
@ -101,7 +101,7 @@ NSSSymmetricKey_GetTrustDomain
return NULL;
}
NSSToken *
NSS_IMPLEMENT NSSToken *
NSSSymmetricKey_GetToken
(
NSSSymmetricKey *mk,
@ -112,7 +112,7 @@ NSSSymmetricKey_GetToken
return NULL;
}
NSSSlot *
NSS_IMPLEMENT NSSSlot *
NSSSymmetricKey_GetSlot
(
NSSSymmetricKey *mk,
@ -123,7 +123,7 @@ NSSSymmetricKey_GetSlot
return NULL;
}
NSSModule *
NSS_IMPLEMENT NSSModule *
NSSSymmetricKey_GetModule
(
NSSSymmetricKey *mk,
@ -134,7 +134,7 @@ NSSSymmetricKey_GetModule
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSSymmetricKey_Encrypt
(
NSSSymmetricKey *mk,
@ -149,7 +149,7 @@ NSSSymmetricKey_Encrypt
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSSymmetricKey_Decrypt
(
NSSSymmetricKey *mk,
@ -164,7 +164,7 @@ NSSSymmetricKey_Decrypt
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSSymmetricKey_Sign
(
NSSSymmetricKey *mk,
@ -179,7 +179,7 @@ NSSSymmetricKey_Sign
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSSymmetricKey_SignRecover
(
NSSSymmetricKey *mk,
@ -194,7 +194,7 @@ NSSSymmetricKey_SignRecover
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSSymmetricKey_Verify
(
NSSSymmetricKey *mk,
@ -208,7 +208,7 @@ NSSSymmetricKey_Verify
return PR_FAILURE;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSSymmetricKey_VerifyRecover
(
NSSSymmetricKey *mk,
@ -223,7 +223,7 @@ NSSSymmetricKey_VerifyRecover
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSSymmetricKey_WrapSymmetricKey
(
NSSSymmetricKey *wrappingKey,
@ -238,7 +238,7 @@ NSSSymmetricKey_WrapSymmetricKey
return NULL;
}
NSSItem *
NSS_IMPLEMENT NSSItem *
NSSSymmetricKey_WrapPrivateKey
(
NSSSymmetricKey *wrappingKey,
@ -253,7 +253,7 @@ NSSSymmetricKey_WrapPrivateKey
return NULL;
}
NSSSymmetricKey *
NSS_IMPLEMENT NSSSymmetricKey *
NSSSymmetricKey_UnwrapSymmetricKey
(
NSSSymmetricKey *wrappingKey,
@ -269,7 +269,7 @@ NSSSymmetricKey_UnwrapSymmetricKey
return NULL;
}
NSSPrivateKey *
NSS_IMPLEMENT NSSPrivateKey *
NSSSymmetricKey_UnwrapPrivateKey
(
NSSSymmetricKey *wrappingKey,
@ -287,7 +287,7 @@ NSSSymmetricKey_UnwrapPrivateKey
return NULL;
}
NSSSymmetricKey *
NSS_IMPLEMENT NSSSymmetricKey *
NSSSymmetricKey_DeriveSymmetricKey
(
NSSSymmetricKey *originalKey,
@ -302,7 +302,7 @@ NSSSymmetricKey_DeriveSymmetricKey
return NULL;
}
NSSCryptoContext *
NSS_IMPLEMENT NSSCryptoContext *
NSSSymmetricKey_CreateCryptoContext
(
NSSSymmetricKey *mk,

Просмотреть файл

@ -32,14 +32,22 @@
*/
#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: trustdomain.c,v $ $Revision: 1.1 $ $Date: 2001-07-19 20:41:38 $ $Name: $";
static const char CVS_ID[] = "@(#) $RCSfile: trustdomain.c,v $ $Revision: 1.2 $ $Date: 2001-09-13 22:16:22 $ $Name: $";
#endif /* DEBUG */
#ifndef NSSPKI_H
#include "nsspki.h"
#endif /* NSSPKI_H */
NSSTrustDomain *
#ifndef PKIT_H
#include "pkit.h"
#endif /* PKIT_H */
#ifndef DEV_H
#include "dev.h"
#endif /* DEV_H */
NSS_IMPLEMENT NSSTrustDomain *
NSSTrustDomain_Create
(
NSSUTF8 *moduleOpt,
@ -48,11 +56,22 @@ NSSTrustDomain_Create
void *reserved
)
{
nss_SetError(NSS_ERROR_NOT_FOUND);
return NULL;
NSSArena *arena;
NSSTrustDomain *rvTD;
arena = NSSArena_Create();
if(!arena) {
return (NSSTrustDomain *)NULL;
}
rvTD = nss_ZNEW(arena, NSSTrustDomain);
if (!rvTD) {
nssArena_Destroy(arena);
return (NSSTrustDomain *)NULL;
}
rvTD->arena = arena;
return rvTD;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSTrustDomain_Destroy
(
NSSTrustDomain *td
@ -62,7 +81,7 @@ NSSTrustDomain_Destroy
return PR_FAILURE;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSTrustDomain_SetDefaultCallback
(
NSSTrustDomain *td,
@ -74,7 +93,7 @@ NSSTrustDomain_SetDefaultCallback
return PR_FAILURE;
}
NSSCallback *
NSS_IMPLEMENT NSSCallback *
NSSTrustDomain_GetDefaultCallback
(
NSSTrustDomain *td,
@ -85,20 +104,32 @@ NSSTrustDomain_GetDefaultCallback
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSTrustDomain_LoadModule
(
NSSTrustDomain *td,
NSSUTF8 *moduleOpt,
NSSUTF8 *uriOpt,
NSSUTF8 *opaqueOpt,
void *reserved
)
{
nss_SetError(NSS_ERROR_NOT_FOUND);
return PR_FAILURE;
NSSModule *module;
/* This is really just here for testing. I don't presume that it is
* correct. Therefore, I won't comment further.
*/
if (moduleOpt) {
module = NSSModule_Create(moduleOpt, uriOpt, opaqueOpt, reserved);
NSSModule_Load(module);
td->module = module;
#ifdef DEBUG
NSSModule_Debug(td->module);
#endif
}
return PR_SUCCESS;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSTrustDomain_DisableToken
(
NSSTrustDomain *td,
@ -110,7 +141,7 @@ NSSTrustDomain_DisableToken
return PR_FAILURE;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSTrustDomain_EnableToken
(
NSSTrustDomain *td,
@ -121,7 +152,7 @@ NSSTrustDomain_EnableToken
return PR_FAILURE;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSTrustDomain_IsTokenEnabled
(
NSSTrustDomain *td,
@ -133,7 +164,7 @@ NSSTrustDomain_IsTokenEnabled
return PR_FAILURE;
}
NSSSlot *
NSS_IMPLEMENT NSSSlot *
NSSTrustDomain_FindSlotByName
(
NSSTrustDomain *td,
@ -144,7 +175,7 @@ NSSTrustDomain_FindSlotByName
return NULL;
}
NSSToken *
NSS_IMPLEMENT NSSToken *
NSSTrustDomain_FindTokenByName
(
NSSTrustDomain *td,
@ -155,7 +186,7 @@ NSSTrustDomain_FindTokenByName
return NULL;
}
NSSToken *
NSS_IMPLEMENT NSSToken *
NSSTrustDomain_FindTokenBySlotName
(
NSSTrustDomain *td,
@ -166,7 +197,7 @@ NSSTrustDomain_FindTokenBySlotName
return NULL;
}
NSSToken *
NSS_IMPLEMENT NSSToken *
NSSTrustDomain_FindTokenForAlgorithm
(
NSSTrustDomain *td,
@ -177,7 +208,7 @@ NSSTrustDomain_FindTokenForAlgorithm
return NULL;
}
NSSToken *
NSS_IMPLEMENT NSSToken *
NSSTrustDomain_FindBestTokenForAlgorithms
(
NSSTrustDomain *td,
@ -189,7 +220,7 @@ NSSTrustDomain_FindBestTokenForAlgorithms
return NULL;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSTrustDomain_Login
(
NSSTrustDomain *td,
@ -200,7 +231,7 @@ NSSTrustDomain_Login
return PR_FAILURE;
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSTrustDomain_Logout
(
NSSTrustDomain *td
@ -210,7 +241,7 @@ NSSTrustDomain_Logout
return PR_FAILURE;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSTrustDomain_ImportCertificate
(
NSSTrustDomain *td,
@ -221,7 +252,7 @@ NSSTrustDomain_ImportCertificate
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSTrustDomain_ImportPKIXCertificate
(
NSSTrustDomain *td,
@ -233,7 +264,7 @@ NSSTrustDomain_ImportPKIXCertificate
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSTrustDomain_ImportEncodedCertificate
(
NSSTrustDomain *td,
@ -244,7 +275,7 @@ NSSTrustDomain_ImportEncodedCertificate
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSTrustDomain_ImportEncodedCertificateChain
(
NSSTrustDomain *td,
@ -258,7 +289,7 @@ NSSTrustDomain_ImportEncodedCertificateChain
return NULL;
}
NSSPrivateKey *
NSS_IMPLEMENT NSSPrivateKey *
NSSTrustDomain_ImportEncodedPrivateKey
(
NSSTrustDomain *td,
@ -272,7 +303,7 @@ NSSTrustDomain_ImportEncodedPrivateKey
return NULL;
}
NSSPublicKey *
NSS_IMPLEMENT NSSPublicKey *
NSSTrustDomain_ImportEncodedPublicKey
(
NSSTrustDomain *td,
@ -283,7 +314,7 @@ NSSTrustDomain_ImportEncodedPublicKey
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSTrustDomain_FindBestCertificateByNickname
(
NSSTrustDomain *td,
@ -297,7 +328,7 @@ NSSTrustDomain_FindBestCertificateByNickname
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSTrustDomain_FindCertificatesByNickname
(
NSSTrustDomain *td,
@ -311,7 +342,7 @@ NSSTrustDomain_FindCertificatesByNickname
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSTrustDomain_FindCertificateByIssuerAndSerialNumber
(
NSSTrustDomain *td,
@ -323,7 +354,7 @@ NSSTrustDomain_FindCertificateByIssuerAndSerialNumber
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSTrustDomain_FindBestCertificateBySubject
(
NSSTrustDomain *td,
@ -337,7 +368,7 @@ NSSTrustDomain_FindBestCertificateBySubject
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSTrustDomain_FindCertificatesBySubject
(
NSSTrustDomain *td,
@ -351,7 +382,7 @@ NSSTrustDomain_FindCertificatesBySubject
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSTrustDomain_FindBestCertificateByNameComponents
(
NSSTrustDomain *td,
@ -365,7 +396,7 @@ NSSTrustDomain_FindBestCertificateByNameComponents
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSTrustDomain_FindCertificatesByNameComponents
(
NSSTrustDomain *td,
@ -379,7 +410,7 @@ NSSTrustDomain_FindCertificatesByNameComponents
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSTrustDomain_FindCertificateByEncodedCertificate
(
NSSTrustDomain *td,
@ -390,7 +421,7 @@ NSSTrustDomain_FindCertificateByEncodedCertificate
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSTrustDomain_FindCertificateByEmail
(
NSSTrustDomain *td,
@ -404,7 +435,7 @@ NSSTrustDomain_FindCertificateByEmail
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSTrustDomain_FindCertificatesByEmail
(
NSSTrustDomain *td,
@ -418,7 +449,7 @@ NSSTrustDomain_FindCertificatesByEmail
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSTrustDomain_FindCertificateByOCSPHash
(
NSSTrustDomain *td,
@ -429,7 +460,7 @@ NSSTrustDomain_FindCertificateByOCSPHash
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSTrustDomain_FindBestUserCertificate
(
NSSTrustDomain *td,
@ -442,7 +473,7 @@ NSSTrustDomain_FindBestUserCertificate
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSTrustDomain_FindUserCertificates
(
NSSTrustDomain *td,
@ -458,7 +489,7 @@ NSSTrustDomain_FindUserCertificates
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSTrustDomain_FindBestUserCertificateForSSLClientAuth
(
NSSTrustDomain *td,
@ -473,7 +504,7 @@ NSSTrustDomain_FindBestUserCertificateForSSLClientAuth
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSTrustDomain_FindUserCertificatesForSSLClientAuth
(
NSSTrustDomain *td,
@ -491,7 +522,7 @@ NSSTrustDomain_FindUserCertificatesForSSLClientAuth
return NULL;
}
NSSCertificate *
NSS_IMPLEMENT NSSCertificate *
NSSTrustDomain_FindBestUserCertificateForEmailSigning
(
NSSTrustDomain *td,
@ -506,7 +537,7 @@ NSSTrustDomain_FindBestUserCertificateForEmailSigning
return NULL;
}
NSSCertificate **
NSS_IMPLEMENT NSSCertificate **
NSSTrustDomain_FindUserCertificatesForEmailSigning
(
NSSTrustDomain *td,
@ -523,8 +554,20 @@ NSSTrustDomain_FindUserCertificatesForEmailSigning
nss_SetError(NSS_ERROR_NOT_FOUND);
return NULL;
}
NSS_IMPLEMENT PRStatus *
NSSTrustDomain_TraverseCertificates
(
NSSTrustDomain *td,
PRStatus (*callback)(NSSCertificate *c, void *arg),
void *arg
)
{
/* Do module->slot->token, or just slotarray->tokens? */
return NSSModule_TraverseCertificates(td->module, callback, arg);
}
PRStatus
NSS_IMPLEMENT PRStatus
NSSTrustDomain_GenerateKeyPair
(
NSSTrustDomain *td,
@ -540,7 +583,7 @@ NSSTrustDomain_GenerateKeyPair
return PR_FAILURE;
}
NSSSymmetricKey *
NSS_IMPLEMENT NSSSymmetricKey *
NSSTrustDomain_GenerateSymmetricKey
(
NSSTrustDomain *td,
@ -554,7 +597,7 @@ NSSTrustDomain_GenerateSymmetricKey
return NULL;
}
NSSSymmetricKey *
NSS_IMPLEMENT NSSSymmetricKey *
NSSTrustDomain_GenerateSymmetricKeyFromPassword
(
NSSTrustDomain *td,
@ -568,7 +611,7 @@ NSSTrustDomain_GenerateSymmetricKeyFromPassword
return NULL;
}
NSSSymmetricKey *
NSS_IMPLEMENT NSSSymmetricKey *
NSSTrustDomain_FindSymmetricKeyByAlgorithmAndKeyID
(
NSSTrustDomain *td,
@ -581,7 +624,7 @@ NSSTrustDomain_FindSymmetricKeyByAlgorithmAndKeyID
return NULL;
}
NSSCryptoContext *
NSS_IMPLEMENT NSSCryptoContext *
NSSTrustDomain_CreateCryptoContext
(
NSSTrustDomain *td,
@ -592,7 +635,7 @@ NSSTrustDomain_CreateCryptoContext
return NULL;
}
NSSCryptoContext *
NSS_IMPLEMENT NSSCryptoContext *
NSSTrustDomain_CreateCryptoContextForAlgorithm
(
NSSTrustDomain *td,
@ -603,7 +646,7 @@ NSSTrustDomain_CreateCryptoContextForAlgorithm
return NULL;
}
NSSCryptoContext *
NSS_IMPLEMENT NSSCryptoContext *
NSSTrustDomain_CreateCryptoContextForAlgorithmAndParameters
(
NSSTrustDomain *td,