EVP_PKEY_get_default_digest(3) OpenSSL EVP_PKEY_get_default_digest(3) NNAAMMEE EVP_PKEY_get_default_digest_nid - get default signature digest SSYYNNOOPPSSIISS #include int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid); DDEESSCCRRIIPPTTIIOONN The _E_V_P___P_K_E_Y___g_e_t___d_e_f_a_u_l_t___d_i_g_e_s_t___n_i_d_(_) function sets ppnniidd to the default message digest NID for the public key signature operations associated with key ppkkeeyy. NNOOTTEESS For all current standard OpenSSL public key algorithms SHA1 is returned. RREETTUURRNN VVAALLUUEESS The _E_V_P___P_K_E_Y___g_e_t___d_e_f_a_u_l_t___d_i_g_e_s_t___n_i_d_(_) function returns 1 if the message digest is advisory (that is other digests can be used) and 2 if it is mandatory (other digests can not be used). It returns 0 or a negative value for failure. In particular a return value of -2 indicates the operation is not supported by the public key algorithm. SSEEEE AALLSSOO _E_V_P___P_K_E_Y___C_T_X___n_e_w(3), _E_V_P___P_K_E_Y___s_i_g_n(3), _E_V_P___P_K_E_Y___v_e_r_i_f_y(3), _E_V_P___P_K_E_Y___v_e_r_i_f_y___r_e_c_o_v_e_r(3), HHIISSTTOORRYY This function was first added to OpenSSL 1.0.0. 1.0.2u 2019-12-20 EVP_PKEY_get_default_digest(3)