CPKIFQuery Class Reference

#include <Query.h>

Inheritance diagram for CPKIFQuery:

Inheritance graph
[legend]
Collaboration diagram for CPKIFQuery:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFQuery class provides an interface to SCVP query object.
Query ::= SEQUENCE
{
	queriedCerts            CertReferences,
	checks                  CertChecks,
	-- Note: tag [0] not used --
	wantBack            [1] WantBack OPTIONAL,
	validationPolicy        ValidationPolicy,
	responseFlags           ResponseFlags OPTIONAL,
	serverContextInfo   [2] OCTET STRING OPTIONAL,
	validationTime      [3] GeneralizedTime OPTIONAL,
	intermediateCerts   [4] CertBundle OPTIONAL,
	revInfos            [5] RevocationInfos OPTIONAL,
	producedAt          [6] GeneralizedTime OPTIONAL,
	queryExtensions     [7] Extensions OPTIONAL 
}

TSP-enforcing: No

Definition at line 59 of file Query.h.


Public Member Functions

 CPKIFQuery ()
 CPKIFQuery (const CPKIFBufferPtr &query)
virtual ~CPKIFQuery (void)
void SetValidationPolicy (CPKIFValidationPolicyPtr &validationPolicy)
const CPKIFValidationPolicyPtr GetValidationPolicy () const
void SetChecks (CPKIFOIDListPtr &checks)
void GetChecks (CPKIFOIDListPtr &checks) const
void SetCertRef (CPKIFCertReferencesPtr &certRefs)
void GetCertRef (CPKIFCertReferencesPtr &certRefs) const
void SetWantBack (CPKIFOIDListPtr &wantBack)
void GetWantBack (CPKIFOIDListPtr &wantBack) const
void SetValidationTime (CPKIFTimePtr &validationTime)
const CPKIFTimePtr GetValidationTime () const
void SetProducedAt (CPKIFTimePtr &producedAt)
const CPKIFTimePtr GetProducedAt () const
void SetRevInfos (CPKIFRevocationInfoListPtr &revInfos)
void GetRevInfos (CPKIFRevocationInfoListPtr &revInfos) const
void SetResponseFlags (CPKIFResponseFlagsPtr &responseFlags)
const CPKIFResponseFlagsPtr GetResponseFlags () const
void SetServerContextInfo (CPKIFBufferPtr &serverContextInfo)
const CPKIFBufferPtr GetServerContextInfo () const
void SetCertBundle (CPKIFCertificateListPtr &bundle)
void GetCertBundle (CPKIFCertificateListPtr &bundle) const
void AddToCertBundle (CPKIFCertificatePtr &cert)
bool ExtensionsPresent () const
template<class T>
boost::shared_ptr< T > GetExtension ()
void GetExtensionByOID (const CPKIFOID &oid, CPKIFX509ExtensionPtr &ref)
void GetEncodedExtensions (CPKIFBufferPtr &buf)
bool AreThereAnyUnprocessedCriticalExtensions ()

Constructor & Destructor Documentation

CPKIFQuery::CPKIFQuery (  ) 

Interface: External

This function is used to create and initialize CPKIFQuery object.

Returns:
None

Definition at line 168 of file Query.cpp.

References g_id_svp_defaultValPolicy, LOG_STRING_DEBUG, and TOOLKIT_SCVP_ASN.

CPKIFQuery::CPKIFQuery ( const CPKIFBufferPtr &  name  ) 

Interface: External

This constructor is internally invoked; it will throw a std::bad_alloc exception if allocation of memory fails or ASN.1 decoding errors if the extension cannot be parsed.

Returns:
None
Exceptions:
std::bad_alloc 
Parameters:
name  [in] A reference to a smart pointer to CPKIFBuffer object containing der encoded query

Definition at line 191 of file Query.cpp.

References CACASNWRAPPER_CREATE, COMMON_INVALID_INPUT, CPKIFTime, and TOOLKIT_SCVP_ASN.

CPKIFQuery::~CPKIFQuery ( void   )  [virtual]

Interface: External

This function destroys instances of CPKIFQuery.

Returns:
None

Definition at line 344 of file Query.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_SCVP_ASN.


Member Function Documentation

void CPKIFQuery::SetValidationPolicy ( CPKIFValidationPolicyPtr &  validationPolicy  ) 

Interface: External

This function sets validation policy for CPKIFQuery object

Returns:
The response flags
Parameters:
validationPolicy  [in] Reference to a smart pointer to a CPKIFValidationPolicy object containing validation policy

Definition at line 554 of file Query.cpp.

const CPKIFValidationPolicyPtr CPKIFQuery::GetValidationPolicy (  )  const

Interface: External

This function returns a validation policy for CPKIFQuery object

Returns:
Smart pointer to CPKIFValidationPolicy object containing the validation policy associated with this CPKIFQuery object

Definition at line 567 of file Query.cpp.

void CPKIFQuery::SetChecks ( CPKIFOIDListPtr &  checks  ) 

Interface: External

This function is used to set the checks that SCVP clinet wants the SCVP server to perform. The checks are represent by object identifiers

Returns:
None
Parameters:
checks  [in or out] Reference to a smart pointer to a CPKIFOIDList object containing a list of object identifiers

Definition at line 580 of file Query.cpp.

void CPKIFQuery::GetChecks ( CPKIFOIDListPtr &  checks  )  const

Interface: External

This function is used to retrieve the checks that SCVP clinet wants the SCVP server to perform.

Returns:
None
Parameters:
checks  [out] Reference to a smart pointer to a CPKIOIDList object. This parameter conatins a list of oids that represent checks that SCVP client wants the server to perform.

Definition at line 594 of file Query.cpp.

void CPKIFQuery::SetCertRef ( CPKIFCertReferencesPtr &  certRefs  ) 

Interface: External

This function sets the list of cert references for CPKIFQuery object. At this time there is no support for attribute certificates.

Returns:
None
Parameters:
certRefs  [in] Smart pointer to CPKIFCertReferences object which will contain the list of TAs

Definition at line 642 of file Query.cpp.

void CPKIFQuery::GetCertRef ( CPKIFCertReferencesPtr &  certRefs  )  const

Interface: External

This function retrives a list of cert references from CPKIFQuery object

Returns:
None
Parameters:
certRefs  [in/out] Smart pointer to CPKIFCertReferences object which will contain the list of TAs

Definition at line 655 of file Query.cpp.

void CPKIFQuery::SetWantBack ( CPKIFOIDListPtr &  wantBack  ) 

Interface: External

This function is used to set want back item of SCVP query. WantBack item describes any information the SCVP client wants from the SCVP server for the certificates(s) in the queriedCerts item in addition to the results of the checks specified in certCecks.

Returns:
None
Parameters:
wantBack  [in] Reference to a smart pointer to a CPKIFOIDList object containing a list of object identifiers

Definition at line 611 of file Query.cpp.

void CPKIFQuery::GetWantBack ( CPKIFOIDListPtr &  wantBack  )  const

Interface: External

This function is used to retrieve the set of policies that comprise the initial policy set used for path validation operations. For the SetInitialPolicySet function, the initPolSet parameter should contain the policies that comprise the initial policy set to use during path validation operations.

Returns:
None
Parameters:
wantBack  [out] Reference to a smart pointer to a CPKIOIDList object.

Definition at line 627 of file Query.cpp.

void CPKIFQuery::SetValidationTime ( CPKIFTimePtr &  validationTime  ) 

Interface: External

This function is used to set an indicator that is used to set validation time

Returns:
None
Parameters:
validationTime  [in] Reference to a smart pointer to a CPKIFTimePtr object containing validation time

Definition at line 442 of file Query.cpp.

const CPKIFTimePtr CPKIFQuery::GetValidationTime (  )  const

Interface: External

This function is used to get the validation time

Returns:
The validation time

Definition at line 455 of file Query.cpp.

void CPKIFQuery::SetProducedAt ( CPKIFTimePtr &  producedAt  ) 

Interface: External

This function is used to set produced at time

Returns:
None
Parameters:
producedAt  [in] Reference to a smart pointer to a CPKIFTimePtr object containing produced at time

Definition at line 466 of file Query.cpp.

const CPKIFTimePtr CPKIFQuery::GetProducedAt (  )  const

Interface: External

This function is used to get the produced at time

Returns:
The produced at time

Definition at line 479 of file Query.cpp.

void CPKIFQuery::SetRevInfos ( CPKIFRevocationInfoListPtr &  revInfos  ) 

Interface: External

This function is used to set revocation infos item of SCVP query. Revocation infos item specifies revocation information such as CRLs, delta CRLs, and OCSP responses. The purpose of this item is to provide revocation info to which the server might not have access to.

Returns:
None
Parameters:
revInfos  [in] Smart pointer to CPKIFRevocationInfoList object which contains a list of rev infos

Definition at line 696 of file Query.cpp.

void CPKIFQuery::GetRevInfos ( CPKIFRevocationInfoListPtr &  revInfos  )  const

Interface: External

This function is used to get revocation infos item of SCVP query. Revocation infos item specifies revocation information such as CRLs, delta CRLs, and OCSP responses. The purpose of this item is to provide revocation info to which the server might not have access to.

Returns:
None
Parameters:
revInfos  [out] Smart pointer to CPKIFRevocationInfoList object which will contains a list of rev infos

Definition at line 711 of file Query.cpp.

void CPKIFQuery::SetResponseFlags ( CPKIFResponseFlagsPtr &  responseFlags  ) 

Interface: External

This function is used to set ResponseFlags

Returns:
None
Parameters:
responseFlags  [in] Reference to a smart pointer to a CPKIFTimePtr object containing response flags

Definition at line 530 of file Query.cpp.

const CPKIFResponseFlagsPtr CPKIFQuery::GetResponseFlags (  )  const

Interface: External

This function is used to get response flags

Returns:
The response flags

Definition at line 543 of file Query.cpp.

void CPKIFQuery::SetServerContextInfo ( CPKIFBufferPtr &  serverContextInfo  ) 

Interface: External

This function sets the server context information for CPKIFQuery object.

Returns:
None
Parameters:
serverContextInfo  [in] Smart pointer to CPKIFBuffer object which will contain the server context information

Definition at line 669 of file Query.cpp.

const CPKIFBufferPtr CPKIFQuery::GetServerContextInfo (  )  const

Interface: External

This function retrives server context information for CPKIFQuery object.

Returns:
Smart pointer to CPKIFBuffer object containing server context information

Definition at line 682 of file Query.cpp.

void CPKIFQuery::SetCertBundle ( CPKIFCertificateListPtr &  intermidiateCerts  ) 

Interface: External

This function is used to set certificate bundle

Returns:
None
Parameters:
intermidiateCerts  [in] Reference to a smart pointer to a CPKIFCertificateListPtr object containing a list of certificates

Definition at line 490 of file Query.cpp.

void CPKIFQuery::GetCertBundle ( CPKIFCertificateListPtr &  intermidiateCerts  )  const

Interface: External

This function is used to get the certificate bundle

Returns:
The certificate bundle containing the CA certificates
Parameters:
intermidiateCerts  [out] Reference to a smart pointer to a CPKIFCertificateListPtr object containing a list of certificates

Definition at line 504 of file Query.cpp.

void CPKIFQuery::AddToCertBundle ( CPKIFCertificatePtr &  cert  ) 

Interface: External

This function is used to add certificates to the the certificate bundle

Returns:
None

Definition at line 519 of file Query.cpp.

bool CPKIFQuery::ExtensionsPresent (  )  const

Interface: External

This function returns true if CPKIFQuery contained extensions.

Return values:
True if a CPKIFQuery contained extensions
False if a CPKIFQuery did not contain extensions

Definition at line 425 of file Query.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_SCVP_ASN.

template<class T>
boost::shared_ptr<T> CPKIFQuery::GetExtension (  )  [inline]

this function should be used to retrieve extensions in a type-safe manner you pass a type as a param and the function returns a default smart pointer to that type Interface: External

This function is used to retrieve an extension from an IPKIFHasExtensions object. It takes the type of extension sought by an application as a template parameter and returns a smart pointer to that type (containing a NULL pointer if the extension was not found).

Returns:
A smart pointer to the appropriate extension

Reimplemented from IPKIFHasExtensions.

void CPKIFQuery::GetExtensionByOID ( const CPKIFOID oid,
CPKIFX509ExtensionPtr &  ref 
) [virtual]

Interface: External

This function retrives the extension identified by CPKIFOID object

Returns:
None
Parameters:
oid  [in] Identifies the extension sought
ref  [out] The extension (if present).

Implements IPKIFHasExtensions.

Definition at line 396 of file Query.cpp.

void CPKIFQuery::GetEncodedExtensions ( CPKIFBufferPtr &  buf  )  [virtual]

Interface: External

This function returns a smart pointer to CPKIFBuffer object which will contain the encoded extensions

Returns:
A smart pointer to CPKIFBuffer object which will contain the encoded extensions
Parameters:
buf  [out] A reference to a smart pointer to CPKIFBuffer object which will contain the encoded extensions

Implements IPKIFHasExtensions.

Definition at line 362 of file Query.cpp.

References CACASNWRAPPER_CREATE, and data.

bool CPKIFQuery::AreThereAnyUnprocessedCriticalExtensions (  ) 

Interface: External

This function determines if a Query object holds any unprocessed critical extensions.

Returns:
Returns true if there are any critical extensions present in the Query object.

Definition at line 725 of file Query.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_OCSP_ASN.


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

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