log rsa free, new -g option; refs #32

master
Marc Wäckerlin 14 years ago
parent 8330279064
commit d721914752
  1. 1
      swisssurfer/src/qmake.pro.in
  2. 2
      swisssurfer/src/smartcardauth.hxx

@ -10,6 +10,7 @@ macx {
CONFIG += x86 CONFIG += x86
} }
win32 { win32 {
QMAKE_CXXFLAGS += -gstabs+
QMAKE_LIBS += -lwinhttp -lgdi32 -lws2_32 QMAKE_LIBS += -lwinhttp -lgdi32 -lws2_32
CONFIG += console CONFIG += console
} }

@ -107,6 +107,7 @@ class CryptokiEngine: public openssl::Engine {
return *_cert; return *_cert;
} }
virtual EVP_PKEY* privkey(const char* id, UI_METHOD*, void*) { virtual EVP_PKEY* privkey(const char* id, UI_METHOD*, void*) {
OPENSSL_LOG("log");
EVP_PKEY* k(EVP_PKEY_new()); EVP_PKEY* k(EVP_PKEY_new());
RSA* r(RSA_new_method(_e)); RSA* r(RSA_new_method(_e));
r->n = BN_bin2bn((const unsigned char*)_modulus.data(), r->n = BN_bin2bn((const unsigned char*)_modulus.data(),
@ -116,6 +117,7 @@ class CryptokiEngine: public openssl::Engine {
// otherwise OpenSSL emulates sign/verify with encrypt/decrypt // otherwise OpenSSL emulates sign/verify with encrypt/decrypt
r->flags |= RSA_FLAG_SIGN_VER; r->flags |= RSA_FLAG_SIGN_VER;
EVP_PKEY_set1_RSA(k, r); EVP_PKEY_set1_RSA(k, r);
OPENSSL_LOG("RSA_free");
RSA_free(r); RSA_free(r);
return k; return k;
} }

Loading…
Cancel
Save