mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
use Debian's default root certificate location
as suggested here: http://archives.seul.org/libevent/users/Feb-2013/msg00034.html although curl's acinclude.m4 reveals many other possibilities: dnl /etc/ssl/certs/ca-certificates.crt Debian systems dnl /etc/pki/tls/certs/ca-bundle.crt Redhat and Mandriva dnl /usr/share/ssl/certs/ca-bundle.crt old(er) Redhat dnl /usr/local/share/certs/ca-root.crt FreeBSD dnl /etc/ssl/cert.pem OpenBSD dnl /etc/ssl/certs/ (ca path) SUSE And none of these cover Windows :(
This commit is contained in:
parent
5754d96a6e
commit
aacd674c94
@ -182,6 +182,14 @@ main(int argc, char **argv)
|
||||
if (!ssl_ctx)
|
||||
die_openssl("SSL_CTX_new");
|
||||
|
||||
/* Attempt to use the system's trusted root certificates.
|
||||
* (This path is only valid for Debian-based systems.) */
|
||||
if (1 != SSL_CTX_load_verify_locations(ssl_ctx,
|
||||
"/etc/ssl/certs/ca-certificates.crt",
|
||||
NULL))
|
||||
die_openssl("SSL_CTX_load_verify_locations");
|
||||
SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_PEER, NULL);
|
||||
|
||||
// Create event base
|
||||
base = event_base_new();
|
||||
if (!base) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user