eid-viewer
eid-viewer library
certhelpers.h
Go to the documentation of this file.
1 #ifndef EID_VWR_CERT_HELPERS_H
2 #define EID_VWR_CERT_HELPERS_H
3 
18 #include <openssl/x509.h>
19 #include <eid-viewer/macros.h>
20 
21 enum cert_columns
22 {
23  CERT_COL_LABEL,
24  CERT_COL_IMAGE,
25  CERT_COL_VALIDFROM,
26  CERT_COL_VALIDFROM_PAST,
27  CERT_COL_VALIDTO,
28  CERT_COL_VALIDTO_FUTURE,
29  CERT_COL_USE,
30  CERT_COL_VALIDITY,
31  CERT_COL_DESC,
32  CERT_COL_DATA,
33  CERT_COL_NCOLS
34 };
35 
40 {
43 };
44 
54 DllExport char *eid_vwr_get_use_flags(const char *label, X509 * cert);
55 
66 DllExport char *eid_vwr_detail_cert(const char *label, X509 * cert);
67 
78 DllExport char *eid_vwr_describe_cert(const char *label, X509 * cert);
79 
88 DllExport void eid_vwr_dumpcert(int fd, const void *derdata, int len,
89  enum dump_type how);
92 #endif
DllExport char * eid_vwr_describe_cert(const char *label, X509 *cert)
Get a useful label for the certificate.
Definition: certhelpers.c:95
dump_type
Definition: certhelpers.h:39
DllExport void eid_vwr_dumpcert(int fd, const void *derdata, int len, enum dump_type how)
Write the given certificate to a file descriptor.
Definition: certhelpers.c:200
Dump in PEM format.
Definition: certhelpers.h:42
DllExport char * eid_vwr_detail_cert(const char *label, X509 *cert)
Get a printable version of the certificate&#39;s distinguished name (DN).
Definition: certhelpers.c:58
DllExport char * eid_vwr_get_use_flags(const char *label, X509 *cert)
Get the X.509v3 Key Usage field of the given certificate.
Definition: certhelpers.c:28
Dump using ASN.1 Distinguished Encoding Rules (DER)
Definition: certhelpers.h:41