EVP_PKEY_set1_RSA(3) OpenSSL EVP_PKEY_set1_RSA(3) NNAAMMEE EVP_PKEY_set1_RSA, EVP_PKEY_set1_DSA, EVP_PKEY_set1_DH, EVP_PKEY_set1_EC_KEY, EVP_PKEY_get1_RSA, EVP_PKEY_get1_DSA, EVP_PKEY_get1_DH, EVP_PKEY_get1_EC_KEY, EVP_PKEY_assign_RSA, EVP_PKEY_assign_DSA, EVP_PKEY_assign_DH, EVP_PKEY_assign_EC_KEY, EVP_PKEY_type - EVP_PKEY assignment functions. SSYYNNOOPPSSIISS #include int EVP_PKEY_set1_RSA(EVP_PKEY *pkey,RSA *key); int EVP_PKEY_set1_DSA(EVP_PKEY *pkey,DSA *key); int EVP_PKEY_set1_DH(EVP_PKEY *pkey,DH *key); int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey,EC_KEY *key); RSA *EVP_PKEY_get1_RSA(EVP_PKEY *pkey); DSA *EVP_PKEY_get1_DSA(EVP_PKEY *pkey); DH *EVP_PKEY_get1_DH(EVP_PKEY *pkey); EC_KEY *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey); int EVP_PKEY_assign_RSA(EVP_PKEY *pkey,RSA *key); int EVP_PKEY_assign_DSA(EVP_PKEY *pkey,DSA *key); int EVP_PKEY_assign_DH(EVP_PKEY *pkey,DH *key); int EVP_PKEY_assign_EC_KEY(EVP_PKEY *pkey,EC_KEY *key); int EVP_PKEY_type(int type); DDEESSCCRRIIPPTTIIOONN _E_V_P___P_K_E_Y___s_e_t_1___R_S_A_(_), _E_V_P___P_K_E_Y___s_e_t_1___D_S_A_(_), _E_V_P___P_K_E_Y___s_e_t_1___D_H_(_) and _E_V_P___P_K_E_Y___s_e_t_1___E_C___K_E_Y_(_) set the key referenced by ppkkeeyy to kkeeyy. _E_V_P___P_K_E_Y___g_e_t_1___R_S_A_(_), _E_V_P___P_K_E_Y___g_e_t_1___D_S_A_(_), _E_V_P___P_K_E_Y___g_e_t_1___D_H_(_) and _E_V_P___P_K_E_Y___g_e_t_1___E_C___K_E_Y_(_) return the referenced key in ppkkeeyy or NNUULLLL if the key is not of the correct type. _E_V_P___P_K_E_Y___a_s_s_i_g_n___R_S_A_(_), _E_V_P___P_K_E_Y___a_s_s_i_g_n___D_S_A_(_), _E_V_P___P_K_E_Y___a_s_s_i_g_n___D_H_(_) and _E_V_P___P_K_E_Y___a_s_s_i_g_n___E_C___K_E_Y_(_) also set the referenced key to kkeeyy however these use the supplied kkeeyy internally and so kkeeyy will be freed when the parent ppkkeeyy is freed. _E_V_P___P_K_E_Y___t_y_p_e_(_) returns the type of key corresponding to the value ttyyppee. The type of a key can be obtained with EVP_PKEY_type(pkey->type). The return value will be EVP_PKEY_RSA, EVP_PKEY_DSA, EVP_PKEY_DH or EVP_PKEY_EC for the corresponding key types or NID_undef if the key type is unassigned. NNOOTTEESS In accordance with the OpenSSL naming convention the key obtained from or assigned to the ppkkeeyy using the 11 functions must be freed as well as ppkkeeyy. _E_V_P___P_K_E_Y___a_s_s_i_g_n___R_S_A_(_), _E_V_P___P_K_E_Y___a_s_s_i_g_n___D_S_A_(_), _E_V_P___P_K_E_Y___a_s_s_i_g_n___D_H_(_) and _E_V_P___P_K_E_Y___a_s_s_i_g_n___E_C___K_E_Y_(_) are implemented as macros. RREETTUURRNN VVAALLUUEESS _E_V_P___P_K_E_Y___s_e_t_1___R_S_A_(_), _E_V_P___P_K_E_Y___s_e_t_1___D_S_A_(_), _E_V_P___P_K_E_Y___s_e_t_1___D_H_(_) and _E_V_P___P_K_E_Y___s_e_t_1___E_C___K_E_Y_(_) return 1 for success or 0 for failure. _E_V_P___P_K_E_Y___g_e_t_1___R_S_A_(_), _E_V_P___P_K_E_Y___g_e_t_1___D_S_A_(_), _E_V_P___P_K_E_Y___g_e_t_1___D_H_(_) and _E_V_P___P_K_E_Y___g_e_t_1___E_C___K_E_Y_(_) return the referenced key or NNUULLLL if an error occurred. _E_V_P___P_K_E_Y___a_s_s_i_g_n___R_S_A_(_), _E_V_P___P_K_E_Y___a_s_s_i_g_n___D_S_A_(_), _E_V_P___P_K_E_Y___a_s_s_i_g_n___D_H_(_) and _E_V_P___P_K_E_Y___a_s_s_i_g_n___E_C___K_E_Y_(_) return 1 for success and 0 for failure. SSEEEE AALLSSOO _E_V_P___P_K_E_Y___n_e_w(3) HHIISSTTOORRYY TBA 1.0.1u 2016-09-22 EVP_PKEY_set1_RSA(3)