CPKIFNSSCredential Class Reference

#include <PKIFNSSCredential.h>

Inheritance diagram for CPKIFNSSCredential:

Inheritance graph
[legend]
Collaboration diagram for CPKIFNSSCredential:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFNSSCredential class provides a NSS implementation of the CPKIFCredential interface. This class provides access to stored key material for purposes of digital signature generation and data decryption using asymmetric key material. This class is not used by applications and may only be instantiated internally by PKIF classes. The constructor is declared private. Only compatible instantiations of CPKIFNSS can create CPKIFNSSCredential objects.

TSP-enforcing: No

Definition at line 26 of file PKIFNSSCredential.h.


Public Member Functions

 CPKIFNSSCredential (SECKEYPrivateKey *key, SECItem *derCert)
virtual ~CPKIFNSSCredential ()
virtual void SetPassword (unsigned char *password, int len)
CPKIFCertificatePtr GetCertificate () const

Friends

class CPKIFNSS

Constructor & Destructor Documentation

CPKIFNSSCredential::CPKIFNSSCredential ( SECKEYPrivateKey *  key,
SECItem *  derCert 
)

Interface: Subsystem

This function creates CPKIFNSSCredential objects.

Returns:
None
Exceptions:
CPKIFCryptoException(PKIFNSS_COPYKEY_FAILED) 
Parameters:
key  [in] A pointer to SECKEYPrivateKey structure
derCert  [in] A pointre to SECItem structure

Definition at line 38 of file PKIFNSSCredential.cpp.

References btoa(), LOG_STRING_DEBUG, CPKIFCredential::m_id, CPKIFCredential::m_name, PKIFNSS_COPYKEY_FAILED, RAISE_CRYPTO_EXCEPTION, and TOOLKIT_CRYPTO_NSSCRED.

CPKIFNSSCredential::~CPKIFNSSCredential ( void   )  [virtual]

Interface: Subsystem

This function destroys CPKIFNSSCredential objects. This function overwrites the memory associated with passwords specificed via PKIFZero.

Returns:
None

Definition at line 76 of file PKIFNSSCredential.cpp.

References LOG_STRING_DEBUG, PKIFDelete(), PKIFZero(), and TOOLKIT_CRYPTO_NSSCRED.


Member Function Documentation

void CPKIFNSSCredential::SetPassword ( unsigned char *  password,
int  len 
) [virtual]

Interface: Subsystem

This function is used to specify a password that can be used to access the associated credential.

Credential-level passwords are not implemented for NSS. (They don't make sense for NSS)

Returns:
None
Exceptions:
CPKIFCryptoException(COMMON_NOT_IMPLEMENTED) 
Parameters:
password  [in] Pointer to a buffer containing a password
len  [in] Integer indicating the length of the password stored in the buffer passed via the password parameter

Implements CPKIFCredential.

Definition at line 101 of file PKIFNSSCredential.cpp.

References COMMON_NOT_IMPLEMENTED, LOG_STRING_DEBUG, RAISE_CRYPTO_EXCEPTION, and TOOLKIT_CRYPTO_NSSCRED.

CPKIFCertificatePtr CPKIFNSSCredential::GetCertificate (  )  const [virtual]

Interface: Subsystem

This function returns a smart pointer to a CPKIFCertificate object containing the public key certificate that corresponds with the key material associated with the credential object. If the credential object is empty or no public key certificate is available, NULL is returned.

Returns:
None

Implements CPKIFCredential.

Definition at line 122 of file PKIFNSSCredential.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_CRYPTO_NSSCRED.


Friends And Related Function Documentation

friend class CPKIFNSS [friend]

Definition at line 28 of file PKIFNSSCredential.h.


The documentation for this class was generated from the following files:

Generated on Mon Nov 15 11:20:28 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6