[Qt-interest] Adding key generation functionality to QSslKey - any ideas?

Darren Lissimore darren.lissimore at gmail.com
Wed Aug 25 17:23:17 CEST 2010


Hello all;

I would like to add Key generation methods to the QSslKey class to
enable generation of keys instead of just reading them in from
QByteArrays or QIOdevices.
For this I would use the following OpenSSL function - and the DSA equivalent:

 RSA *RSA_generate_key(int num, unsigned long e,
    void (*callback)(int,int,void *), void *cb_arg);

My problem is trying to come up with the best method to do it.

QSslKey has the handle() method - but what I need is the ability to
set the internall  RSA * or DSA * structures within the QSslKey class.
The OpenSSL key generation functions return a pointer to the setup RSA
or DSA structures with the new key in it.
I was hoping to subclass - and add the key generation methods but the
data is private.

Ideally I would like to come up with a class that does not require a
patch to Qt.

Any ideas?

Darren
-----------------------------------------------------------
D. Lissimore
http://www.darrenlissimore.com
Skype: darrenlissimore
-----------------------------------------------------------
This communication is intended for the use of the recipient to which
it is addressed, and may contain confidential, personal, and or
privileged information. Please contact the sender immediately if you
are not the intended recipient of this communication, and do not copy,
distribute, or take action relying on it. Any communication received
in error, or subsequent reply, should be deleted or destroyed.



More information about the Qt-interest-old mailing list