MCPcopy Create free account
hub / github.com/KDE/kdevelop / contextSslServerTrustPrompt

Method contextSslServerTrustPrompt

plugins/subversion/svninternaljobbase.cpp:221–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221svn::ContextListener::SslServerTrustAnswer SvnInternalJobBase::contextSslServerTrustPrompt(
222 const svn::ContextListener::SslServerTrustData& data,
223 apr_uint32_t& acceptedFailures )
224{
225
226 std::string host = data.hostname;
227 std::string print = data.fingerprint;
228 std::string from = data.validFrom;
229 std::string until = data.validUntil;
230 std::string issue = data.issuerDName;
231 std::string realm = data.realm;
232 acceptedFailures = data.failures;
233 QStringList failures;
234 if( data.failures & SVN_AUTH_SSL_NOTYETVALID )
235 {
236 failures << i18n("Certificate is not yet valid.");
237 }
238 if( data.failures & SVN_AUTH_SSL_EXPIRED )
239 {
240 failures << i18n("Certificate has expired.");
241 }
242 if( data.failures & SVN_AUTH_SSL_CNMISMATCH )
243 {
244 failures << i18n("Certificate's CN (hostname) doesn't match the remote hostname.");
245 }
246 if( data.failures & SVN_AUTH_SSL_UNKNOWNCA )
247 {
248 failures << i18n("Certificate authority is unknown.");
249 }
250 if( data.failures & SVN_AUTH_SSL_NOTYETVALID )
251 {
252 failures << i18n("Other unknown error.");
253 }
254 emit needSslServerTrust( failures,
255 QString::fromUtf8( host.c_str() ),
256 QString::fromUtf8( print.c_str() ),
257 QString::fromUtf8( from.c_str() ),
258 QString::fromUtf8( until.c_str() ),
259 QString::fromUtf8( issue.c_str() ),
260 QString::fromUtf8( realm.c_str() ) );
261 m_guiSemaphore.acquire(1);
262 QMutexLocker l(&m_mutex);
263 return m_trustAnswer;
264}
265
266bool SvnInternalJobBase::contextSslClientCertPrompt( std::string& cert )
267{

Callers 1

Calls 1

c_strMethod · 0.45

Tested by

no test coverage detected