Subsections


Certificate search functions

These functions allow searching for a certificate in a storage. Certificates can be looked for by several arguments: ID, domain, distinguished name etc.

Functions that may return more than one certificate for a given query will return lists (pointers to GSList), so the API user must be aware of this. These lists contain storage IDs of certificates, which can be used to get the storage sequential number and/or the certificate itself. The lists must be released by the user with g_slist_free().

Revisit the Introduction (section 1) to learn about UIDs and storage IDs that are used in this Section.

CST_search_by_subj_name

GSList* CST_search_by_subj_name (CST * st, X509_NAME * subject_name)

Search certificate by subject name
Parameters

Returns

Errors

CST_search_by_email

GSList* CST_search_by_email (CST * st, const char * email)

Search certificate by email
Parameters

Returns

Errors

CST_search_by_domain_name

GSList* CST_search_by_domain_name (CST * st, const char * domain_name)

Search certificate by domain name
Parameters

Returns

Errors

CST_search_by_serial

GSList* CST_search_by_serial (CST * st, const char * serial)

Search certificate by serial number.
Parameters

Returns

Errors

CST_search_by_fingerprint

GSList* CST_search_by_fingerprint (CST * st, const char * fingerprint)

Search certificate by email
Parameters

Returns

Errors

CST_search_issuer

cst_t_seqnum CST_search_issuer (CST * st, X509 * cert)

Search issuer of given certificate
Parameters

Returns

Errors

CST_search_by_folder_and_purpose

GSList* CST_search_by_folder_and_purpose (CST * st, const cst_t_cert_folder folder, const cst_t_cert_purpose purpose)

Get all trusted certificates for given purpose in selected folder. For example, all CA certificates for WLAN.
Parameters

Returns

Errors

CST_search_by_folder

GSList* CST_search_by_folder (CST * st, const cst_t_cert_folder folder)

Get all certificates by folder e.g. if requested folder is CST_FOLDER_CA then return all CA certificates.
Parameters

Returns

Errors

CST_all_expired

GSList* CST_all_expired (CST * st )

Get all expired certificates. WARNING: still not implemented.
Parameters

Returns

Errors

CST_all_revoked

GSList* CST_all_revoked (CST * st)

Get all revoked certificates. WARNING: still not implemented.
Parameters

Returns

Errors

CST_search_by_purpose

GSList* CST_search_by_purpose (CST * st, const cst_t_cert_purpose purpose)

Get all trusted certificates that fill the given purpose bitmap. Only the certificates that fit for all purposes required will be returned. If you want all certificates, pass CST_PURPOSE_NONE (zero).
Parameters

Returns

Errors

CST_search_by_UID

cst_t_seqnum CST_search_by_UID (CST * st, X509_NAME * issuer, ASN1_INTEGER * serial)

Get certificate storage ID (int) by UID (issuer + serial)
Parameters

Returns

Errors

CST_search_by_X509

cst_t_seqnum CST_search_by_X509 (CST * st, X509 * xcert)

Get certificate ID (int) by openssl X509 certificate
Parameters

Returns

Errors

Elvis Pfutzenreuter 2006-02-17