Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Cannot provide a certificate with no key Qt 5.7 on iOS

    Mobile and Embedded
    1
    1
    593
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Marek last edited by

      Hi all,

      I can't load key for certificate on Qt 5.7
      I'm testing on mac OS Sierra, iOS Simulator, Xcode 8.1

      I have an app that uses Qt 5.4.1 with custom openssl compiled for iOS.
      Now I'm trying to switch to Qt 5.7 and to ssl API provided by iOS (so my life would be easier on AppStore)

      Old setup with compiled Qt 5.4.1 and openssl linked works
      New setup with Qt 5.7 installed from unified installer - doesn't work - can't load ssl key.

      socket-setPrivateKey(QString(":/path/to/key.key"),QSsl::Rsa,QSsl::Pem,QByteArray("pass"));
      

      works but then if I check

      QSslKey key=socket->privateKey();
      qDebug()<<"key is null:"<<key.isNull();
      

      key is null: true
      So certificate can't be loaded and I got error: "Cannot provide a certificate with no key"

      I'm using the same piece of code with Qt 5.7 on Andoid and Linux, so it looks like just the problem on iOS

      Best Regards
      Marek

      1 Reply Last reply Reply Quote 0
      • First post
        Last post