Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-13732

Enhancement for QSslKey to enable key generation - currently only loading from PEM or DER format is supported.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • P3: Somewhat important
    • Some future release
    • 4.6.3
    • Network: SSL
    • None
    • Qt 4.6.3
      OpenSuSE 11.2

    Description

      Was looking to be able to generate QSslKey s when I needed to - but the function was not available.

      The attached patch - adds 2 static methods to the base class to enable key generation for DSA and RSA keys.

      static QSslKey *generateRSAkey(quint32 numbits, quint64 exponent, QSsl::KeyType privPub);
      static QSslKey *generateDSAkey(quint32 numbits, QSsl::KeyType privPub );

      This enables the following type of code to get new keys generated;

      QSslKey *s = QSslKey::generateDSAkey(1024, QSsl::PublicKey);

      This generates 1024 bit public key.
      The parameters to the statics could be adjusted to give more flexible key generation - but this is a start.

      The patch was generated using Qt 4.6.3.
      Files touched in the patch:
      src/network/ssl/qsslsocket_openssl_symbols_p.h
      src/network/ssl/qsslsocket_openssl_symbols_p.cpp
      src/network/qsslkey_p.h
      src/network/qsslkey.h
      src/network/qsslkey.cpp

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            dlissimore Darren Lissimore
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes