MCPcopy Create free account
hub / github.com/SIPp/sipp / sip_tls_verify_callback

Function sip_tls_verify_callback

src/sslsocket.cpp:203–224  ·  view source on GitHub ↗

Certificate Verification Callback FACILITY *************/

Source from the content-addressed store, hash-verified

201
202/****** Certificate Verification Callback FACILITY *************/
203static int sip_tls_verify_callback(int ok , X509_STORE_CTX *store)
204{
205 char data[512];
206 int err, depth;
207 X509 *cert;
208
209 if (!ok) {
210 cert = X509_STORE_CTX_get_current_cert(store);
211 err = X509_STORE_CTX_get_error(store);
212 depth = X509_STORE_CTX_get_error_depth(store);
213
214 X509_NAME_oneline(X509_get_issuer_name(cert),
215 data, 512);
216 WARNING("TLS verification error for issuer: '%s'\n", data);
217 X509_NAME_oneline(X509_get_subject_name(cert),
218 data, 512);
219 WARNING("TLS verification error for subject: '%s'\n", data);
220 WARNING("verify error:num=%d:%s:depth=%d\n", err,
221 X509_verify_cert_error_string(err), depth);
222 }
223 return ok;
224}
225
226/*********** Load the CRL's into SSL_CTX **********************/
227static int sip_tls_load_crls(SSL_CTX* ctx , const char* crlfile)

Callers

nothing calls this directly

Calls 1

WARNINGFunction · 0.85

Tested by

no test coverage detected