125 static int pk11_RSA_init(RSA *rsa); |
125 static int pk11_RSA_init(RSA *rsa); |
126 static int pk11_RSA_finish(RSA *rsa); |
126 static int pk11_RSA_finish(RSA *rsa); |
127 static int pk11_RSA_sign(int type, const unsigned char *m, unsigned int m_len, |
127 static int pk11_RSA_sign(int type, const unsigned char *m, unsigned int m_len, |
128 unsigned char *sigret, unsigned int *siglen, const RSA *rsa); |
128 unsigned char *sigret, unsigned int *siglen, const RSA *rsa); |
129 static int pk11_RSA_verify(int dtype, const unsigned char *m, |
129 static int pk11_RSA_verify(int dtype, const unsigned char *m, |
130 unsigned int m_len, unsigned char *sigbuf, unsigned int siglen, |
130 unsigned int m_len, const unsigned char *sigbuf, unsigned int siglen, |
131 const RSA *rsa); |
131 const RSA *rsa); |
132 EVP_PKEY *pk11_load_privkey(ENGINE*, const char *privkey_id, |
132 EVP_PKEY *pk11_load_privkey(ENGINE*, const char *privkey_id, |
133 UI_METHOD *ui_method, void *callback_data); |
133 UI_METHOD *ui_method, void *callback_data); |
134 EVP_PKEY *pk11_load_pubkey(ENGINE*, const char *pubkey_id, |
134 EVP_PKEY *pk11_load_pubkey(ENGINE*, const char *pubkey_id, |
135 UI_METHOD *ui_method, void *callback_data); |
135 UI_METHOD *ui_method, void *callback_data); |
1101 pk11_return_session(sp, OP_RSA); |
1101 pk11_return_session(sp, OP_RSA); |
1102 return (ret); |
1102 return (ret); |
1103 } |
1103 } |
1104 |
1104 |
1105 static int pk11_RSA_verify(int type, const unsigned char *m, |
1105 static int pk11_RSA_verify(int type, const unsigned char *m, |
1106 unsigned int m_len, unsigned char *sigbuf, unsigned int siglen, |
1106 unsigned int m_len, const unsigned char *sigbuf, unsigned int siglen, |
1107 const RSA *rsa) |
1107 const RSA *rsa) |
1108 { |
1108 { |
1109 X509_SIG sig; |
1109 X509_SIG sig; |
1110 ASN1_TYPE parameter; |
1110 ASN1_TYPE parameter; |
1111 int i, j; |
1111 int i, j; |
1195 { |
1195 { |
1196 PK11err_add_data(PK11_F_RSA_VERIFY, PK11_R_VERIFYINIT, |
1196 PK11err_add_data(PK11_F_RSA_VERIFY, PK11_R_VERIFYINIT, |
1197 rv); |
1197 rv); |
1198 goto err; |
1198 goto err; |
1199 } |
1199 } |
1200 rv = pFuncList->C_Verify(sp->session, s, i, sigbuf, |
1200 rv = pFuncList->C_Verify(sp->session, s, i, |
1201 (CK_ULONG)siglen); |
1201 (CK_BYTE_PTR)sigbuf, (CK_ULONG)siglen); |
1202 |
1202 |
1203 if (rv != CKR_OK) |
1203 if (rv != CKR_OK) |
1204 { |
1204 { |
1205 PK11err_add_data(PK11_F_RSA_VERIFY, PK11_R_VERIFY, rv); |
1205 PK11err_add_data(PK11_F_RSA_VERIFY, PK11_R_VERIFY, rv); |
1206 goto err; |
1206 goto err; |