CPKIFCAPICredential2 Class Reference

#include <PKIFCAPICredential2.h>

Inheritance diagram for CPKIFCAPICredential2:

Inheritance graph
[legend]
Collaboration diagram for CPKIFCAPICredential2:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFCAPICredential2 class provides a CAPI-specific 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 CPKIFCAPI2 can create CPKIFCAPICredential2 objects.

TSP-enforcing: No

Definition at line 31 of file PKIFCAPICredential2.h.


Public Member Functions

virtual ~CPKIFCAPICredential2 (void)
void SetPassword (unsigned char *password, int len)
CPKIFCertificatePtr GetCertificate () const
bool ProviderInfoMatches (const char *provider, int provType) const

Friends

class CPKIFCAPI2
class CPKIFCNGCAPI
struct CPKIFCAPI2Impl
struct CPKIFCNGCAPIImpl

Constructor & Destructor Documentation

CPKIFCAPICredential2::~CPKIFCAPICredential2 ( void   )  [virtual]

Interface: Subsystem

This function destroys CPKIFCAPICredential2 objects. This function overwrites the memory associated with passwords specificed via SetPassword.

Returns:
None

Definition at line 67 of file PKIFCAPICredential2.cpp.

References LOG_STRING_DEBUG, PKIFDelete(), and TOOLKIT_CRYPTO_CAPICRED.


Member Function Documentation

void CPKIFCAPICredential2::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. This function will not work with all CAPI CSPs. Some do not implement the interface required to specify a password programmatically.

If the password parameter is NULL or if the len parameter is 0, any previously set passwords are deleted.

Returns:
None
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 135 of file PKIFCAPICredential2.cpp.

References LOG_STRING_DEBUG, PKIFDelete(), PKIFNew(), and TOOLKIT_CRYPTO_CAPICRED.

CPKIFCertificatePtr CPKIFCAPICredential2::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.

This function will throw an exception if the certificate associated with the credential cannot be parsed.

Returns:
None

Implements CPKIFCredential.

Definition at line 102 of file PKIFCAPICredential2.cpp.

References LOG_STRING_DEBUG, m_cacCert, and TOOLKIT_CRYPTO_CAPICRED.

bool CPKIFCAPICredential2::ProviderInfoMatches ( const char *  provider,
int  provType 
) const

Interface: Subsystem

This function is used internally to compare credential objects with crypto-related colleagues. Applications do not use this function

Returns:
This function returns true if provider info matches, false otherwise
Parameters:
provider  [in] Pointer to a NULL-terminated string identifying the provider to compare
provType  [in] Integer indicating the type of provider to compare

Definition at line 241 of file PKIFCAPICredential2.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_CRYPTO_CAPICRED.

Referenced by CPKIFCNGCAPI::OwnsKey(), and CPKIFCAPI2::OwnsKey().


Friends And Related Function Documentation

friend class CPKIFCAPI2 [friend]

Definition at line 33 of file PKIFCAPICredential2.h.

friend class CPKIFCNGCAPI [friend]

Definition at line 34 of file PKIFCAPICredential2.h.

friend struct CPKIFCAPI2Impl [friend]

Definition at line 35 of file PKIFCAPICredential2.h.

friend struct CPKIFCNGCAPIImpl [friend]

Definition at line 36 of file PKIFCAPICredential2.h.


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

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