RSA BSAFE Micro Edition Suite

Streamlined security for mobile and embedded devices

Search  Print

cert_sm.h File Reference

This file contains the definitions and macros that are used to implement the SSL-C ME certificate Application Programming Interface (API) that makes direct calls to TC_X509 functions.

#include "stack.h"
#include "x509tc.h"

Go to the source code of this file.

Defines

#define SSLCERT_DIGEST_TYPE_MD2
 Identifies the MD2 digest type in the certificate signature.

#define SSLCERT_DIGEST_TYPE_MD5
 Identifies the MD5 digest type in the certificate signature.

#define SSLCERT_DIGEST_TYPE_SHA1
 Identifies the SHA1 digest type in the certificate signature.

#define SSLCERT_TIME_NOTBEFORE
 Identifies the notBefore time in the certificate.

#define SSLCERT_TIME_NOTAFTER
 Identifies the notAfter time in the certificate.

#define SSLCERT_dup
 Creates a duplicate of the given SSLCERT certificate and returns the duplicate. More...


Typedefs

typedef TC_X509 SSLCERT
 SSLCERT is an opaque data type used to store certificate information.

typedef TC_X509_NAME SSLCERT_NAME
 SSLCERT_NAME is an opaque data type used to store certificate name information.

typedef TC_X509_NAME_ENTRY SSLCERT_NAME_ENTRY
 SSLCERT_NAME_ENTRY is an opaque data type used to store certificate name entry information.

typedef EVP_PKEY SSLCERT_PKEY
 SSLCERT_PKEY is an opaque data type used to store private key data. More...

typedef void SSLCERT_STORE_CTX
 SSLCERT_STORE_CTX is an opaque data type that holds the certificate store information that is passed to the certificate verification routine.

typedef void SSLCERT_STORE
 SSLCERT_STORE is an opaque data type that holds the SSL certificates and Certificate Revocation Lists (CRLs).


Functions

SSLCERTSSLCERT_new (void)
 Creates a new certificate structure. More...

void SSLCERT_free (SSLCERT *cert)
 Frees a certificate structure. More...

int SSLCERT_verify (SSLCERT *cert, SSLCERT_PKEY *pkey)
 Verifies that the signature of a certificate is correct by generating a hash of the certificate data and comparing it to the hash retrieved from the signature data using the Certification Authority's (CA) public key. More...

int SSLCERT_to_binary (SSLCERT *cert, unsigned char **pp)
 Generates Distinguished Encoding Rules (DER) encoded data from a certificate structure. More...

SSLCERTSSLCERT_from_binary (SSLCERT **pcert, unsigned char **pp, long length)
 Creates an certificate structure from the specified binary data in ASN.1 format indicated by pp with a length specified by length. More...

void SSLCERT_reference_inc (SSLCERT *cert)
 Increments the reference count for the specified certificate structure cert. More...

int SSLCERT_get_signature_type (SSLCERT *cert)
 Returns a numeric type for a certificate signature type.

int SSLCERT_get_signature_digest_type (SSLCERT *cert)
 Returns a numeric type for digest type of a certificate signature.

int SSLCERT_get_signature_data (SSLCERT *cert, unsigned long *len, unsigned char **data)
 Returns the Signature field as raw data. More...

int SSLCERT_get_version (SSLCERT *cert)
 Returns a numeric type for certificate version.

char * SSLCERT_get_version_string (SSLCERT *cert)
 Returns a string type for certificate version.

int SSLCERT_subject_name_cmp (SSLCERT *cert1, SSLCERT *cert2)
 Compares the subject names of a pair of certificates in order to sort them. More...

SSLCERT_NAMESSLCERT_get_issuer_name (SSLCERT *cert)
 Returns the X.509 name of a certificate issuer. More...

SSLCERT_NAMESSLCERT_get_subject_name (SSLCERT *cert)
 Returns the X.509 name of a certificate subject. More...

SSLCERT_PKEYSSLCERT_get_pubkey (SSLCERT *cert)
 Returns the public key information of a certificate. More...

int SSLCERT_check_private_key (SSLCERT *cert, SSLCERT_PKEY *pkey)
 Checks that the certificate was signed with the private key. More...

SSLCERT_NAMESSLCERT_NAME_new (void)
 Creates an X.509 name structure. More...

void SSLCERT_NAME_free (SSLCERT_NAME *xn)
 Removes all allocated memory for the SSLCERT_NAME structure xn including all SSLCERT_NAME_ENTRY structures contained in the SSLCERT_NAME structure. More...

SSLCERT_NAMESSLCERT_NAME_dup (SSLCERT_NAME *xn)
 Duplicates the SSLCERT_NAME structure specified by xn. More...

unsigned long SSLCERT_NAME_hash (SSLCERT_NAME *xname)
 Generates a hash of the SSLCERT_NAME structure xname. More...

int SSLCERT_NAME_cmp (SSLCERT_NAME *xn1, SSLCERT_NAME *xn2)
 Compares a pair of X.509 name structures in order to sort them. More...

SSLCERT_NAMESSLCERT_NAME_from_binary (SSLCERT_NAME **xn, unsigned char **pp, long length)
 Creates an SSLCERT_NAME structure from the specified binary ASN.1 encoded data. More...

int SSLCERT_NAME_to_binary (SSLCERT_NAME *xn, unsigned char **pp)
 Creates ASN.1 encoded binary data from the specified SSLCERT_NAME structure and places the binary output in pp. More...

char * SSLCERT_NAME_oneline (SSLCERT_NAME *xn, char *buf, int len)
 Returns string representation of SSLCERT_NAME xn. More...

int SSLCERT_NAME_get_entry_count (SSLCERT_NAME *xn)
 Returns the number of SSLCERT_NAME_ENTRY items in the SSLCERT_NAME structure xn. More...

SSLCERT_NAME_ENTRYSSLCERT_NAME_get_entry (SSLCERT_NAME *xn, int loc)
 Returns the specified SSLCERT_NAME_ENTRY from the SSLCERT_NAME structure xn. More...

 SSLCERT_NAME_ENTRY_get_oid_info (SSLCERT_NAME_ENTRY *cne, unsigned int *oidtype, unsigned char **oidpp, long *oidlen)
 Returns the Object Identifier (OID) information of the specified SSLCERT_NAME_ENTRY structure. More...

 SSLCERT_NAME_ENTRY_get_data_info (SSLCERT_NAME_ENTRY *cne, unsigned int *datatype, unsigned char **datapp, long *datalen)
 Returns the data component for the specified SSLCERT_NAME_ENTRY structure. More...

SSLCERT_PKEYSSLCERT_PKEY_new (void)
 Creates an SSLCERT asymmetric key structure. More...

void SSLCERT_PKEY_free (SSLCERT_PKEY *pkey)
 Frees an SSLCERT asymmetric key structure. More...

SSLCERT_PKEYSSLCERT_PKEY_from_PUBKEY_binary (int type, SSLCERT_PKEY **ppkey, unsigned char **pp, long length)
 Creates an SSLCERT asymmetric key structure from ASN.1 encoded public key data. More...

void SSLCERT_PKEY_reference_inc (SSLCERT_PKEY *pkey)
 Increments the reference count of the SSLCERT asymmetric key structure. More...

SSLCERT_PKEYSSLCERT_PKEY_from_binary (int type, SSLCERT_PKEY **pkey, unsigned char **pp, long length)
 Creates a new SSLCERT_PKEY structure from the private key component of the binary data specified by pkey. More...

SSLCERT_PKEYSSLCERT_PKEY_to_binary (EVP_PKEY *ppkey, unsigned char **pp)
 Creates ASN.1 binary key data from the specified EVP_PKEY structure. More...

SSLCERT_PKEYSSLCERT_PKEY_to_PUBKEY_binary (EVP_PKEY *ppkey, unsigned char **pp)
 Creates ASN.1 binary public key data from the specified EVP_PKEY structure. More...

int SSLCERT_get_serialNumber_info (SSLCERT *cert, unsigned int *type, unsigned char **pp, long *length)
 Returns the ASN.1 information for the certificate's serial number. More...

int SSLCERT_get_serialNumber_int (SSLCERT *cert, unsigned long *snump)
 Returns the serial number of the certificate as an integer. More...

int SSLCERT_get_notAfter (SSLCERT *cert, unsigned int *type, unsigned char **pp, long *length)
 Returns the ASN.1 data information about the NotAfter field of a certificate. More...

int SSLCERT_get_notBefore (SSLCERT *cert, unsigned int *type, unsigned char **pp, long *length)
 Returns the ASN.1 data information about the NotBefore field of a certificate. More...

int SSLCERT_NAME_get_info (SSLCERT_NAME *xn, unsigned char **pp, long *length)
 Returns the ASN.1 data from an X.509 name structure. More...

int SSLCERT_NAME_ENTRY_get_info (SSLCERT_NAME_ENTRY *cne, unsigned int *oidtype, unsigned char **oidpp, long *oidlen, unsigned int *datatype, unsigned char **datapp, long *datalen)
 Returns the Object Identifier (OID) and data information for an X.509 name entry. More...

int SSLCERT_get_TBSCertificate_data (SSLCERT *cert, unsigned long *len, unsigned char **data)
 Returns the TBSCertificate data. More...

int SSLCERT_get_validity_seconds (SSLCERT *cert, unsigned int id, unsigned long *pseconds)
 Returns the Certificate validity time in seconds. More...

int SSLCERT_get_basic_constraints_int (SSLCERT *cert, unsigned int *crit, unsigned long *constraints, int *is_ca)
 Returns the Basic Constraints value as an integer. More...

int SSLCERT_get_key_usage_int (SSLCERT *cert, unsigned int *crit, unsigned long *usage)
 Returns the Key Usage field as an integer. More...

int SSLCERT_get_crl_distribution_points (SSLCERT *cert, int index, int what, unsigned int *crit, unsigned long *len, unsigned char **data)
 Returns the CRL Distribution Points contents. More...

char* R_CDECL SSLCERT_OID_to_string (unsigned char *data, long len, int flag)
 Returns a string representation of a Distinguished Name (DN) Object Identifier (OID) value. More...

int R_CDECL SSLCERT_fingerprint (SSLCERT *cert, unsigned char *buf, unsigned int *plen)
 Returns the fingerprint of an X.509 certificate created using a digest function. More...

int R_CDECL SSLCERT_compare_ASN1_time (int time_encoding, unsigned char *cert_time, unsigned int now_time, int *result)
 Compares the ASN.1 time data information field of a certificate with the present time. More...


Typedef Documentation

typedef EVP_PKEY SSLCERT_PKEY
 

SSLCERT_PKEY is an opaque data type used to store private key data. It is used during client and server side authentication during an SSL handshake. /if MES

note.gif
The structure will require conversion if you wish to use it with the R_PKEY data structure./endif


Copyright (c) 1999-2005 RSA Security Inc. All rights reserved. 072-001001-2100-001-000 - 2.1