#include
int RSA_sign(int type, const unsigned char *m, unsigned int m_len,
unsigned char *sigret, unsigned int *siglen, RSA *rsa);
int RSA_verify(int type, const unsigned char *m, unsigned int m_len,
unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
ttyyppee denotes the message digest algorithm that was used to generate mm. It usually is one of NNIIDD__sshhaa11, NNIIDD__rriippeemmdd116600 and NNIIDD__mmdd55; see _o_b_j_e_c_t_s(3) for details. If ttyyppee is NNIIDD__mmdd55__sshhaa11, an SSL signature (MD5 and SHA1 message digests with PKCS #1 padding and no algorithm identifier) is created.
_R_S_A___v_e_r_i_f_y_(_) verifies that the signature ssiiggbbuuff of size ssiigglleenn matches a given message digest mm of size mm__lleenn. ttyyppee denotes the message digest algorithm that was used to generate the signature. rrssaa is the signer's public key.
The error codes can be obtained by _E_R_R___g_e_t___e_r_r_o_r(3).