@@ -236,28 +236,41 @@ OPENSSL_EXPORT const RSA_METHOD *RSA_get_method(const RSA *rsa);
236
236
// RSA_meth_free frees the memory associated with |meth|
237
237
OPENSSL_EXPORT void RSA_meth_free (RSA_METHOD * meth );
238
238
239
+ // RSA_METHOD setters
239
240
// The following functions set the corresponding fields on |meth|. Returns one
240
241
// on success and zero on failure.
242
+
243
+ // RSA_meth_set_init sets |init| on |meth|.
241
244
OPENSSL_EXPORT int RSA_meth_set_init (RSA_METHOD * meth , int (* init ) (RSA * rsa ));
242
245
246
+ // RSA_meth_set_finish sets |finish| on |meth|. The |finish| function
247
+ // is called in |RSA_free| before freeing the key.
243
248
OPENSSL_EXPORT int RSA_meth_set_finish (RSA_METHOD * meth ,
244
249
int (* finish ) (RSA * rsa ));
245
250
251
+ // RSA_meth_set_priv_dec sets |priv_dec| on |meth|. The |priv_dec| function
252
+ // should return the number of bytes written to the object |to| or -1 for error.
246
253
OPENSSL_EXPORT int RSA_meth_set_priv_dec (RSA_METHOD * meth ,
247
254
int (* priv_dec ) (int max_out , const uint8_t * from ,
248
255
uint8_t * to , RSA * rsa ,
249
256
int padding ));
250
257
258
+ // RSA_meth_set_priv_enc sets |priv_enc| on |meth|. The |priv_enc| function
259
+ // should return the number of bytes written to the object |to| or -1 for error.
251
260
OPENSSL_EXPORT int RSA_meth_set_priv_enc (RSA_METHOD * meth ,
252
261
int (* priv_enc ) (int max_out , const uint8_t * from ,
253
262
uint8_t * to , RSA * rsa ,
254
263
int padding ));
255
264
265
+ // RSA_meth_set_pub_dec sets |pub_dec| on |meth|. The |pub_dec| function
266
+ // should return the number of bytes written to the object |to| or -1 for error.
256
267
OPENSSL_EXPORT int RSA_meth_set_pub_dec (RSA_METHOD * meth ,
257
268
int (* pub_dec ) (int max_out , const uint8_t * from ,
258
269
uint8_t * to , RSA * rsa ,
259
270
int padding ));
260
271
272
+ // RSA_meth_set_pub_enc sets |pub_enc| on |meth|. The |pub_enc| function
273
+ // should return the number of bytes written to the object |to| or -1 for error.
261
274
OPENSSL_EXPORT int RSA_meth_set_pub_enc (RSA_METHOD * meth ,
262
275
int (* pub_enc ) (int max_out , const uint8_t * from ,
263
276
uint8_t * to , RSA * rsa ,
0 commit comments