net-snmp 5.7
snmp_openssl.h
00001 /*
00002  * Header file for the OpenSSL Wrapper
00003  */
00004 
00005 #ifndef SNMP_OPENSSL_H
00006 #define SNMP_OPENSSL_H
00007 
00008 #ifdef __cplusplus
00009 extern          "C" {
00010 #endif
00011 
00012     void netsnmp_init_openssl(void);
00013 
00014     /*
00015      * cert fields
00016      */
00017     void netsnmp_openssl_cert_dump_names(X509 *ocert);
00018     void netsnmp_openssl_cert_dump_extensions(X509 *ocert);
00019 
00020     char *netsnmp_openssl_cert_get_commonName(X509 *, char **buf, int *len);
00021     char *netsnmp_openssl_cert_get_subjectName(X509 *, char **buf, int *len);
00022     char *netsnmp_openssl_cert_get_fingerprint(X509 *ocert, int alg);
00023     int netsnmp_openssl_cert_get_hash_type(X509 *ocert);
00024 
00025     int netsnmp_openssl_cert_issued_by(X509 *issuer, X509 *cert);
00026 
00027     char *netsnmp_openssl_extract_secname(netsnmp_cert_map *cert_map,
00028                                           netsnmp_cert_map *peer_cert);
00029 
00030     char *netsnmp_openssl_cert_get_subjectAltName(X509 *, char **buf, int *len);
00031 
00032     /*
00033      * ssl cert chains
00034      */
00035     netsnmp_container *netsnmp_openssl_get_cert_chain(SSL *ssl);
00036 
00037     /*
00038      * misc
00039      */
00040     void netsnmp_openssl_err_log(const char *prefix);
00041     void netsnmp_openssl_null_checks(SSL *ssl, int *nullAuth, int *nullCipher);
00042 
00043 #ifdef __cplusplus
00044 }
00045 #endif
00046 #endif                          /* SNMP_OPENSSL_H */