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

This commit is contained in:
Marc Wäckerlin
2011-04-26 11:59:13 +00:00
parent 8330279064
commit d721914752
2 changed files with 3 additions and 0 deletions

View File

@@ -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
} }

View File

@@ -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;
} }