Używam SharpSVN i dodajemy folder do subversion. Wtedy staram się go popełnić i otrzymuję ten wyjątek:SharpSVN - weryfikacja certyfikatu serwera nie powiodła się
SharpSvn.SvnRepositoryIOException: OPTIONS of 'https://sth.com/svn/blah/Documents': Server certificate verification failed: certificate has expired, certificate issued for a different hostname, issuer is not trusted
O ile widzę tutaj: Server certificate verification failed
..To Wydaje się, że muszę użyć opcji --trust-server-cert
, ale don” t zobacz to gdziekolwiek w argumentach SvnCommitArgs
.
Ponadto, znalazłem to: How do I use a custom Certificate Authority in SharpSvn without installing the certificate
..where widzę tak:
client.Configuration.SetOption(...)
Ale nie wiem jakie ustawienia muszę zapewnić, aby zobowiązać się bez problemów.
Czy ktoś zrobił coś podobnego?
EDIT: Próbowałem również w ten sposób:
client.Authentication.SslServerTrustHandlers += new EventHandler<SharpSvn.Security.SvnSslServerTrustEventArgs>(Authentication_SslServerTrustHandlers);
void Authentication_SslServerTrustHandlers(object sender, SharpSvn.Security.SvnSslServerTrustEventArgs e)
{
// Accept ceritificate here?
}
Ale ja nie rozumiem, co mam czynić, wewnątrz uchwytu, aby zaakceptować certyfikat ... :(
Upewnij się też, w drugi argument "E" i sprawdź. Pozwala to na * wszystkie * certyfikaty SSL (również wygasły, unieważniono itp.) –