X509_verify_cert(3) OpenSSL X509_verify_cert(3) NNAAMMEE X509_verify_cert - discover and verify X509 certificte chain SSYYNNOOPPSSIISS #include int X509_verify_cert(X509_STORE_CTX *ctx); DDEESSCCRRIIPPTTIIOONN The _X_5_0_9___v_e_r_i_f_y___c_e_r_t_(_) function attempts to discover and validate a certificate chain based on parameters in ccttxx. A complete description of the process is contained in the _v_e_r_i_f_y(1) manual page. RREETTUURRNN VVAALLUUEESS If a complete chain can be built and validated this function returns 1, otherwise it return zero, in exceptional circumstances it can also return a negative code. If the function fails additional error information can be obtained by examining ccttxx using, for example _X_5_0_9___S_T_O_R_E___C_T_X___g_e_t___e_r_r_o_r_(_). NNOOTTEESS Applications rarely call this function directly but it is used by OpenSSL internally for certificate validation, in both the S/MIME and SSL/TLS code. A negative return value from _X_5_0_9___v_e_r_i_f_y___c_e_r_t_(_) can occur if it is invoked incorrectly, such as with no certificate set in ccttxx, or when it is called twice in succession without reinitialising ccttxx for the second call. A negative return value can also happen due to internal resource problems or if a retry operation is requested during internal lookups (which never happens with standard lookup methods). Applications must check for <= 0 return value on error. BBUUGGSS This function uses the header xx550099..hh as opposed to most chain verifica- tion functiosn which use xx550099__vvffyy..hh. SSEEEE AALLSSOO _X_5_0_9___S_T_O_R_E___C_T_X___g_e_t___e_r_r_o_r(3) HHIISSTTOORRYY _X_5_0_9___v_e_r_i_f_y___c_e_r_t_(_) is available in all versions of SSLeay and OpenSSL. 1.0.2u 2019-12-20 X509_verify_cert(3)