Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom sertificate processing (need advanced example?) #6

Open
DarkHobbit opened this issue Dec 3, 2017 · 1 comment
Open

Custom sertificate processing (need advanced example?) #6

DarkHobbit opened this issue Dec 3, 2017 · 1 comment

Comments

@DarkHobbit
Copy link

QWebDavLib contains signal checkSslCertifcate(), and QWebdav::sslErrors() contains next comment:
// user has to check the SSL certificate and has to accept manually
For example, I got next SSL errors (Qt 4.8.7, Fedora 23):
"The host name did not match any of the valid hosts for this certificate"
"The certificate is self-signed, and untrusted"
(I'm using WebDAV on Bitnami Ownclowd development virtual machine, and self-signed certificate is normal in this situation. WebDAV access without SSL (via HTTP/port 80) also works correctly for this server from QWebDavLib.)
How I can accept certificate? QWebdav::sslErrors() don't pass QNetworkReply* into checkSslCertifcate(), and after signal processing reply->abort() will be called anyway.
According qwebdav.h, QWebdav::acceptSslCertificate() can solve this problem, but where it must be called? In checkSslCertifcate() processing slot? It not work for me.
Can you add second, more advanced exapmle, illustrating manual certificate accepting?
Thanks.

@DarkHobbit
Copy link
Author

DarkHobbit commented Dec 14, 2017

@Addition...
I got a working code with it, I again called setConnectionSettings() (with found digests) and listDirectory(), after error and finished processing. I successfully read addressbook from ownCloud Contacts via CardDAV (CardDAV based on WebDAV) using qwebdavlib in this code:
https://github.com/DarkHobbit/doublecontact/blob/master/core/formats/network/carddavformat.cpp
But my example is very complex, and, possibly, contains some excess things. It's very interesting to get simple working sample from library's author.
Thanks for your useful library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant