WebDAV: workaround for YaHoo SSL connection

Yahoo requests a client certificate as part of setting up the SSL
connection. Without such a certificate, gnutls aborts setting up
the connection.

As a workaround this patch reads "client.p12" in the current
directory and uses that as certificate. Cannot be the final
solution - replace by dynamically generated certificate or use
ne_ssl_provide_clicert(), with empty list of certificates?
This commit is contained in:
Patrick Ohly 2010-11-09 14:10:11 +01:00
parent 6eafb77a6a
commit 098613e342

View file

@ -136,6 +136,16 @@ Session::Session(const boost::shared_ptr<Settings> &settings) :
m_uri.m_port);
ne_set_server_auth(m_session, getCredentials, this);
ne_ssl_set_verify(m_session, sslVerify, this);
// hack for Yahoo: need a client certificate
ne_ssl_client_cert *cert = ne_ssl_clicert_read("client.p12");
SE_LOG_DEBUG(NULL, NULL, "client cert is %s", ne_ssl_clicert_encrypted(cert) ? "encrypted" : "unencrypted");
if (ne_ssl_clicert_encrypted(cert)) {
if (ne_ssl_clicert_decrypt(cert, "meego")) {
SE_LOG_DEBUG(NULL, NULL, "decryption failed");
}
}
ne_ssl_set_clicert(m_session, cert);
}
Session::~Session()