mirror of
https://github.com/sonertari/SSLproxy
synced 2024-11-16 06:12:44 +00:00
Explicitly initialize OpenSSL with SSL proxy specs
Make sure we always initialize OpenSSL explicitly, even if there are no certificates or keys loaded or generated. Previously, OpenSSL would only have been initialized if the configuration actually uses certificates or keys, which is not always the case, e.g. with -t pointing to an empty directory. Issue: #92 Reported by: xelalexv
This commit is contained in:
parent
dd0d3238ca
commit
95d4a9bc35
5
main.c
5
main.c
@ -696,6 +696,11 @@ main(int argc, char *argv[])
|
||||
spec->natsocket = nat_getsocketcb(spec->natengine);
|
||||
}
|
||||
if (opts_has_ssl_spec(opts)) {
|
||||
if (ssl_init() == -1) {
|
||||
fprintf(stderr, "%s: failed to initialize OpenSSL.\n",
|
||||
argv0);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if ((opts->cacrt || !opts->tgcrtdir) && !opts->cakey) {
|
||||
fprintf(stderr, "%s: no CA key specified (-k).\n",
|
||||
argv0);
|
||||
|
Loading…
Reference in New Issue
Block a user