From 3a8c2f07150c30185f58bf66713288d5a6fbeb0e Mon Sep 17 00:00:00 2001 From: "jpierre%netscape.com" Date: Wed, 6 Mar 2002 21:41:35 +0000 Subject: Fix for 129201 - allow parameter string to be retrieved in a PKCS#11 module built on top of ckfw --- security/nss/lib/ckfw/instance.c | 41 ++++++++++++++++++++++++++++++++++++++++ security/nss/lib/ckfw/nssckfw.h | 11 +++++++++++ 2 files changed, 52 insertions(+) (limited to 'security/nss/lib/ckfw') diff --git a/security/nss/lib/ckfw/instance.c b/security/nss/lib/ckfw/instance.c index 02a73e224..42b8b11ab 100644 --- a/security/nss/lib/ckfw/instance.c +++ b/security/nss/lib/ckfw/instance.c @@ -58,6 +58,7 @@ static const char CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$"; * NSSCKFWInstance_MayCreatePthreads * NSSCKFWInstance_CreateMutex * NSSCKFWInstance_GetConfigurationData + * NSSCKFWInstance_GetInitArgs * * -- implement public accessors -- * nssCKFWInstance_GetMDInstance @@ -65,6 +66,7 @@ static const char CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$"; * nssCKFWInstance_MayCreatePthreads * nssCKFWInstance_CreateMutex * nssCKFWInstance_GetConfigurationData + * nssCKFWInstance_GetInitArgs * * -- private accessors -- * nssCKFWInstance_CreateSessionHandle @@ -520,6 +522,25 @@ nssCKFWInstance_GetConfigurationData return fwInstance->configurationData; } +/* + * nssCKFWInstance_GetInitArgs + * + */ +CK_C_INITIALIZE_ARGS_PTR +nssCKFWInstance_GetInitArgs +( + NSSCKFWInstance *fwInstance +) +{ +#ifdef NSSDEBUG + if( CKR_OK != nssCKFWInstance_verifyPointer(fwInstance) ) { + return (CK_C_INITIALIZE_ARGS_PTR)NULL; + } +#endif /* NSSDEBUG */ + + return fwInstance->pInitArgs; +} + /* * nssCKFWInstance_CreateSessionHandle * @@ -1304,3 +1325,23 @@ NSSCKFWInstance_GetConfigurationData return nssCKFWInstance_GetConfigurationData(fwInstance); } + +/* + * NSSCKFWInstance_GetInitArgs + * + */ +NSS_IMPLEMENT CK_C_INITIALIZE_ARGS_PTR +NSSCKFWInstance_GetInitArgs +( + NSSCKFWInstance *fwInstance +) +{ +#ifdef DEBUG + if( CKR_OK != nssCKFWInstance_verifyPointer(fwInstance) ) { + return (CK_C_INITIALIZE_ARGS_PTR)NULL; + } +#endif /* DEBUG */ + + return nssCKFWInstance_GetInitArgs(fwInstance); +} + diff --git a/security/nss/lib/ckfw/nssckfw.h b/security/nss/lib/ckfw/nssckfw.h index ce16f2b7b..769427ab6 100644 --- a/security/nss/lib/ckfw/nssckfw.h +++ b/security/nss/lib/ckfw/nssckfw.h @@ -125,6 +125,17 @@ NSSCKFWInstance_GetConfigurationData NSSCKFWInstance *fwInstance ); +/* + * NSSCKFWInstance_GetInitArgs + * + */ + +NSS_EXTERN CK_C_INITIALIZE_ARGS_PTR +NSSCKFWInstance_GetInitArgs +( + NSSCKFWInstance *fwInstance +); + /* * NSSCKFWSlot * -- cgit v1.2.1