aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-03-17 07:02:04 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-03-17 07:02:04 +0800
commita9df5de4af55791e4d4aeb3533bcc715e28c1512 (patch)
tree0b9faa4b152a9c3589226000c9e4fb01620f3225 /camel/providers
parent13afe783505cb99b902ec4b29c46fb14ec8006f0 (diff)
downloadgsoc2013-evolution-a9df5de4af55791e4d4aeb3533bcc715e28c1512.tar
gsoc2013-evolution-a9df5de4af55791e4d4aeb3533bcc715e28c1512.tar.gz
gsoc2013-evolution-a9df5de4af55791e4d4aeb3533bcc715e28c1512.tar.bz2
gsoc2013-evolution-a9df5de4af55791e4d4aeb3533bcc715e28c1512.tar.lz
gsoc2013-evolution-a9df5de4af55791e4d4aeb3533bcc715e28c1512.tar.xz
gsoc2013-evolution-a9df5de4af55791e4d4aeb3533bcc715e28c1512.tar.zst
gsoc2013-evolution-a9df5de4af55791e4d4aeb3533bcc715e28c1512.zip
Print info about the issuer of the certificate.
2001-03-16 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the issuer of the certificate. * providers/smtp/camel-smtp-transport.c (smtp_connect): Use camel_tcp_stream_get_socket(). * camel-tcp-stream-openssl.c (stream_get_socket): Implemented. * camel-tcp-stream-ssl.c (stream_get_socket): Implemented. * camel-tcp-stream-raw.c (stream_get_socket): Implemented. * camel-tcp-stream.c (camel_tcp_stream_get_socket): New function. svn path=/trunk/; revision=8764
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 93d0447c2f..9d60891f04 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -253,17 +253,19 @@ smtp_connect (CamelService *service, CamelException *ex)
addrlen = sizeof (transport->localaddr);
#ifdef HAVE_NSS
if (use_ssl) {
+ PRFileDesc *sockfd = camel_tcp_stream_get_socket (CAMEL_TCP_STREAM (tcp_stream));
PRNetAddr addr;
char hname[1024];
- PR_GetSockName (CAMEL_TCP_STREAM_SSL (tcp_stream)->sockfd, &addr);
+ PR_GetSockName (sockfd, &addr);
memset (hname, 0, sizeof (hname));
PR_NetAddrToString (&addr, hname, 1023);
inet_aton (hname, (struct in_addr *)&transport->localaddr.sin_addr);
} else {
- getsockname (CAMEL_TCP_STREAM_RAW (tcp_stream)->sockfd,
- (struct sockaddr *)&transport->localaddr, &addrlen);
+ int sockfd = GPOINTER_TO_INT (camel_tcp_stream_get_socket (CAMEL_TCP_STREAM (tcp_stream)));
+
+ getsockname (sockfd, (struct sockaddr *)&transport->localaddr, &addrlen);
}
#else
getsockname (CAMEL_TCP_STREAM_RAW (tcp_stream)->sockfd,