struct stat randstat;
int i;
- SSLeay_add_ssl_algorithms();
SSL_load_error_strings();
+ SSLeay_add_ssl_algorithms();
#ifdef SSL_ENABLE
if (stat("/dev/random", &randstat) &&
return(-1);
}
- SSL_CTX_set_options(_ctx[sock], SSL_OP_ALL);
-
if (certck) {
SSL_CTX_set_verify(_ctx[sock], SSL_VERIFY_PEER, SSL_ck_verify_callback);
} else {
SSL_use_RSAPrivateKey_file(_ssl_context[sock], mykey, SSL_FILETYPE_PEM);
}
- if (SSL_set_fd(_ssl_context[sock], sock) == 0
- || SSL_connect(_ssl_context[sock]) < 1) {
+ SSL_set_fd(_ssl_context[sock], sock);
+
+ if(SSL_connect(_ssl_context[sock]) < 1) {
ERR_print_errors_fp(stderr);
SSL_CTX_free(_ctx[sock]);
_ctx[sock] = NULL;
/* either nuke the file or write updated last-seen IDs */
if (!idcount && !scratchlist)
{
- if (outlevel >= O_DEBUG) {
- if (access(idfile, F_OK) == 0)
- report(stdout, GT_("Deleting fetchids file.\n"));
- }
+ if (outlevel >= O_DEBUG)
+ report(stdout, GT_("Deleting fetchids file.\n"));
if (unlink(idfile) && errno != ENOENT)
report(stderr, GT_("Error deleting %s: %s\n"), idfile, strerror(errno));
} else {