Qt getting client certificates from OS certificate store.
Another exhausting problem for me. I tried to find way how to get clients certificates from OS with Qt API. I was unable to find any references from google.
I have certificate issued for client and I will use it to authenticate client. I need to find way to get that from OS store. Windows stores them in its own structure(personal) look at Microsoft store description , in unix based OSes they are located under /etc/ca...
I'm using Qt 4.7 , OS: windows, MAC Language is: C++
Thanks Best Regards Taron Sargsyan
And what have you tried already? What do you need help on exactly?
I have not tried this myself, but you should be able to access certificates in the store using windows API's. Did you have a look at that?
Not for now,
I'm trying to find some cross-platform solution, I hope that Qt has solution for this. Qt can get all CA certificates of OS(QList QSslConfiguration::caCertificates ()) so I supposed that it will be able also to get clients personal certificates.
My application should run on Windows, MACOSX and Linux so handling each case separately will complicate things.
What I'm exactly trying to do is:
I'm opening QWebView and loading https://xxx.xx.xx which requires from client to pass p12 certificate.
All browsers displaying list of clients certificates and asking to choose one for use. QWebView doesn't handling this case.
maybe there are way to tell QWebView to handle this case ?
PPL please give me some tips...
Is there any qt implementation for windows http://msdn.microsoft.com/en-us/library/aa380252(v=vs.85).aspx#certificate_store_functions API and MACOSX http://developer.apple.com/library/mac/#documentation/Security/Reference/keychainservices/Reference/reference.html#//apple_ref/doc/uid/TP30000898 services ????
this is urgent!
Thanks in advance
There is no such API yet, you will have to write your own solution.
If you want to - and are legally allowed to - you might put your solution onto the wiki.
Thanks for answer.
OK I managed to compile WINAPI libs with headers with QT and also able to get client certificates.
please check code below :
@ PQNetworkAccessManager* manager=new PQNetworkAccessManager(&app);
QNetworkRequest* request=new QNetworkRequest();
PQNetworkAccessManager is class which extended from QNetworkAccessManager and just ignoring ssl errors.
My problem now is that seems that client certificate not reaching server.
Any help will be appreciated
Thanks in advance
maybe need rebuild qt with openssl。but openssl need provide certificate private key,so smarkcard(usbkey) maybe not supported.