RSA_new_method calls RSA_free, don't free RSA, keep memory leak; refs #82

master
Marc Wäckerlin 14 years ago
parent 4add551a10
commit 4c19009a0c
  1. 3
      swisssurfer/src/smartcardauth.hxx

@ -69,7 +69,8 @@ class CryptokiEngine: public QObject, public openssl::Engine {
RSA* rsa(0);
do {
rsa = ((RSA*)privkey.handle());
RSA_set_method(rsa, ENGINE_get_RSA(_e));
//! @todo call RSA_free(rsa); later, see #82
rsa = RSA_new_method(_e);
set(rsa->n, privateKey, CKA_MODULUS, "CKA_MODULUS");
set(rsa->e, privateKey, CKA_PUBLIC_EXPONENT, "CKA_PUBLIC_EXPONENT");
set(rsa->d, privateKey, CKA_PRIVATE_EXPONENT, "CKA_PRIVATE_EXPONENT");

Loading…
Cancel
Save