SophiaFramework UNIVERSE 5.3 |
#include <SFBCertParse.h.hpp>
class SFBCertParse : public SFBParameters1;
SFMTYPEDEFWRAPPER(SFBCertParse)
BREW 2.0 | BREW 2.1 | BREW 3.1 | BREW 4.0 |
---|---|---|---|
X | X | X | O |
Public Functions | |
---|---|
Void |
Find(
SFBxOptsSmpConstRef opts
, CertDataIssuerAndSerial const * IssuerAndSerial
, SInt32Ptr certXOpt
, SInt32Ptr certIndex
) This function searches collections of certificates by subject, issuer and/or serial number
|
SFCError |
GetBasic(
CertDataBasic * basic
) Get basic and small fields in a certificate
|
SFCError |
GetBasicEfficiently(
CertDataBasic * basic
) Get basic and small fields in a certificate except TrustOverrideID.
|
SFCError |
GetField(
SInt32 id
, UInt08ConstHandle field
, SInt32Ptr len
) This function gets a field out of an X.509 certificate.
|
SFCError |
GetFieldPart(
CertDataPartRequest const * req
, CertDataCertPart * part
) This function gets individual X.509 v3 extensions or parts out of the subject or issuer DN.
|
SFCError |
GetPubKeyParameters(
SFBParametersPtr param
) This function gets the public key out of the certificate
|
SFCError |
GetStruct(
SInt32 id
, VoidPtr pStruct
, SInt32 size
) Get a structure or data blob from a parsed certificate.
|
SFCError |
GetStruct(
SInt32 id
, SFXBufferPtr buf
) Get a structure or data blob from a parsed certificate.
|
static SFBCertParseSmp |
NewInstance(
SFCErrorPtr exception = null
) Create a new SFBCertParse instance.
|
static SFBCertParseSmp |
NewInstance(
AEECLSID id
, SFCErrorPtr exception = null
) Create a new SFBCertParse instance.
|
Void |
SetASN1OIDMap(
ASN1OIDMap const * map
) Add additional mapping from OID to ASN1OIDs
|
SFCError |
SetCert(
UInt08ConstPtr certificate
, SInt32 len
) Set the certificate to be parsed
|
SFCError |
SetCertByOpt(
SFBxOptsSmpConstRef opts
, SInt32 id
, SInt32 index
) Set the certificate with an SFBxOpt containing the cert.
|
SFCError |
SetParam(
SInt32 id
, VoidConstPtr data
, UInt32 length
)
(inherits from SFBParameters1)
This method sets a parameter value.
|
SFCError |
SetParam(
SInt32 id
, SFXBufferConstRef data
)
(inherits from SFBParameters1)
This method sets a parameter value.
|
SFCError |
SetParam(
SInt32 id
, SFXAnsiStringConstRef data
)
(inherits from SFBParameters1)
This method sets a parameter value.
|
[ public ] Void Find( SFBxOptsSmpConstRef opts // opts to search or NULL CertDataIssuerAndSerial const * IssuerAndSerial // Issuer and/or serial number to search for SInt32Ptr certXOpt // xOpt type (cert type) of cert found SInt32Ptr certIndex // index of cert found );
The xOpt type and index returned are valid only until options (certs) are added to or removed from the collection.
The search can be by issuer, by serial number or both. To not search by issuer or serial, set the associated pointer in pstIssuerAndSerial to NULL.
The options searched include any sub IxOpts objects that have been added as XOPT_DEFAULTS. First options of type/id CERTDATAOPT_ROOT_CERTS are searched, then CERTDATAOPT_BRANCH_CERTS and finally CERTDATAOPT_LEAF_CERT.
If the search is successful the certificate found is set as the one being parsed. This overrides any cert set by ICertParse_SetCert() or ICertParse_SetCertByOpt().
[ public ] SFCError GetBasic( CertDataBasic * basic // Place to put fields retrieved. Caller supplies the storage );
The year handling in the dates conforms to RFC 2549/3280. Four digit years in GeneralizedTime are handled. Two digit years in UTCTime less than 50 are consider 2000 and above; years greater than or equal to 50 are mapped from 1950 up to 1999.
[ public ] SFCError GetBasicEfficiently( CertDataBasic * basic // place to put fields retrieved. Caller supplies the storage );
[ public ] SFCError GetField( SInt32 id // ID UInt08ConstHandle field // Place to put pointer to field SInt32Ptr len // Place to put length of field );
This allows fetching most of the fields in a certificate. In most cases the part is unparsed. For example the ASN.1 DER encoding of the date, subject or key is returned unparsed. The serial number is parsed and just the actual serial number is returned.
[ public ] SFCError GetFieldPart( CertDataPartRequest const * req // The description of the request CertDataCertPart * part // Filled in with the response. );
While certificate extensions and subject and issuer parts aren't semantically related, they are similar enough in structure that this same function is used to get them.
[ public ] SFCError GetPubKeyParameters( SFBParametersPtr param // Place to store the public key parameters );
[ public ] SFCError GetStruct( SInt32 id // Identifies which structure to fetch VoidPtr pStruct // Pointer to memory into which struct is copied SInt32 size // Size of the block of memory pointed to by pStruct );
[ public ] SFCError GetStruct( SInt32 id // Identifies which structure to fetch SFXBufferPtr buf // Pointer to memory into which struct is copied );
Returns data about a certificate by copying it into the buffer or structure provided by the caller. The parameter nStructID identifies what is copied. This contrasts to SFBCertParse::GetField which returns a pointer to the certificate stored internally and thereby has a more complicated and limited lifetime.
[ public, static ] SFBCertParseSmp NewInstance( SFCErrorPtr exception = null // Error );
[ public, static ] SFBCertParseSmp NewInstance( AEECLSID id // Class ID SFCErrorPtr exception = null // Error );
[ public ] Void SetASN1OIDMap( ASN1OIDMap const * map // The translation map );
This adds to the map for this instance of ICertParse.
[ public ] SFCError SetCert( UInt08ConstPtr certificate // Pointer to a DER encoded X.509 certificate SInt32 len // Length of the buffer pointed to by certificate );
Sets the certificate to be parsed.
[ public ] SFCError SetCertByOpt( SFBxOptsSmpConstRef opts // An object with SFBxOpts interface to search for certs SInt32 id // The option ID to search for (usually the cert type) SInt32 index // The index or instance of the cert to set for parsing );
Sets the certificate to be parsed.
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |