mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-07 21:44:51 +00:00
Thu Feb 12 12:02:48 CST 2009 Jarod Neuner <janeuner@networkharbor.com>
* tport_tls: add/fix some tls init logging git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11964 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
5cb1f54133
commit
96e65ddec3
@ -1 +1 @@
|
|||||||
Thu Feb 12 15:29:22 CST 2009
|
Thu Feb 12 15:29:54 CST 2009
|
||||||
|
@ -271,7 +271,7 @@ int tls_init_context(tls_t *tls, tls_issues_t const *ti)
|
|||||||
if (ti->configured > 0) {
|
if (ti->configured > 0) {
|
||||||
SU_DEBUG_1(("%s: invalid local certificate: %s\n",
|
SU_DEBUG_1(("%s: invalid local certificate: %s\n",
|
||||||
"tls_init_context", ti->cert));
|
"tls_init_context", ti->cert));
|
||||||
tls_log_errors(1, "tls_init_context", 0);
|
tls_log_errors(3, "tls_init_context", 0);
|
||||||
#if require_client_certificate
|
#if require_client_certificate
|
||||||
errno = EIO;
|
errno = EIO;
|
||||||
return -1;
|
return -1;
|
||||||
@ -283,7 +283,9 @@ int tls_init_context(tls_t *tls, tls_issues_t const *ti)
|
|||||||
ti->key,
|
ti->key,
|
||||||
SSL_FILETYPE_PEM)) {
|
SSL_FILETYPE_PEM)) {
|
||||||
if (ti->configured > 0) {
|
if (ti->configured > 0) {
|
||||||
tls_log_errors(1, "tls_init_context", 0);
|
SU_DEBUG_1(("%s: invalid private key: %s\n",
|
||||||
|
"tls_init_context", ti->key));
|
||||||
|
tls_log_errors(3, "tls_init_context(key)", 0);
|
||||||
#if require_client_certificate
|
#if require_client_certificate
|
||||||
errno = EIO;
|
errno = EIO;
|
||||||
return -1;
|
return -1;
|
||||||
@ -305,8 +307,10 @@ int tls_init_context(tls_t *tls, tls_issues_t const *ti)
|
|||||||
if (!SSL_CTX_load_verify_locations(tls->ctx,
|
if (!SSL_CTX_load_verify_locations(tls->ctx,
|
||||||
ti->CAfile,
|
ti->CAfile,
|
||||||
ti->CApath)) {
|
ti->CApath)) {
|
||||||
|
SU_DEBUG_1(("%s: error loading CA list: %s\n",
|
||||||
|
"tls_init_context", ti->CAfile));
|
||||||
if (ti->configured > 0)
|
if (ti->configured > 0)
|
||||||
tls_log_errors(1, "tls_init_context", 0);
|
tls_log_errors(3, "tls_init_context(CA)", 0);
|
||||||
errno = EIO;
|
errno = EIO;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -328,7 +332,7 @@ int tls_init_context(tls_t *tls, tls_issues_t const *ti)
|
|||||||
|
|
||||||
if (!SSL_CTX_set_cipher_list(tls->ctx, ti->cipher)) {
|
if (!SSL_CTX_set_cipher_list(tls->ctx, ti->cipher)) {
|
||||||
SU_DEBUG_1(("%s: error setting cipher list\n", "tls_init_context"));
|
SU_DEBUG_1(("%s: error setting cipher list\n", "tls_init_context"));
|
||||||
tls_log_errors(1, "tls_init_context", 0);
|
tls_log_errors(3, "tls_init_context", 0);
|
||||||
errno = EIO;
|
errno = EIO;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -222,13 +222,21 @@ static int tport_tls_init_master(tport_primary_t *pri,
|
|||||||
su_home_zap(autohome);
|
su_home_zap(autohome);
|
||||||
|
|
||||||
if (!tlspri->tlspri_master) {
|
if (!tlspri->tlspri_master) {
|
||||||
|
/*
|
||||||
if (!path || ti.configured) {
|
if (!path || ti.configured) {
|
||||||
SU_DEBUG_1(("tls_init_master: %s\n", strerror(errno)));
|
SU_DEBUG_1(("tls_init_master: %s\n", strerror(errno)));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SU_DEBUG_5(("tls_init_master: %s\n", strerror(errno)));
|
SU_DEBUG_5(("tls_init_master: %s\n", strerror(errno)));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return *return_culprit = "tls_init_master", -1;
|
return *return_culprit = "tls_init_master", -1;
|
||||||
|
} else {
|
||||||
|
char buf[TPORT_HOSTPORTSIZE];
|
||||||
|
su_sockaddr_t *sa = ai ? (void *)(ai->ai_addr) : NULL;
|
||||||
|
if (sa && tport_hostport(buf, sizeof(buf), sa, 2))
|
||||||
|
SU_DEBUG_5(("%s(%p): tls context initialized for %s\n", \
|
||||||
|
__func__, (void *)pri, buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tls_subjects)
|
if (tls_subjects)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user