Permalink
Browse files

An other client info bugfix, release 1.1.2

  • Loading branch information...
szilu authored and Szilard Hajba committed Feb 27, 2009
1 parent 4a05e94 commit 72e00347ea6549e9c2e67b64280426d8d14efd31
Showing with 13 additions and 6 deletions.
  1. +6 −1 ChangeLog
  2. +1 −1 Makefile.global
  3. +6 −4 ssl_proxy.c
View
@@ -1,4 +1,9 @@
2009-02-27 13:43:34
2009-02-27 15:03:46 Szilard Hajba <szilu@symbion.hu>
* An other client info bugfix
* Release 1.1.2
2009-02-27 13:43:34 Szilard Hajba <szilu@symbion.hu>
* Client info bugfixes
* Release 1.1.1
View
@@ -2,7 +2,7 @@ PREFIX = /usr
MAJOR_VERSION = 1
MINOR_VERSION = 1
MICRO_VERSION = 1
MICRO_VERSION = 2
VERSION = ${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
View
@@ -311,6 +311,7 @@ int conn_ssl_accept(Conn *conn) {
debug("SSL_accept: disconnected.");
SSL_free(conn->ssl_conn);
close(conn->server_sock);
conn->server_sock=conn->client_sock=0;
conn->stat=cs_disconnected;
return -1;
/*
@@ -337,6 +338,7 @@ int conn_ssl_accept(Conn *conn) {
plog(LOG_ERR, "socket()", strerror(errno));
SSL_free(conn->ssl_conn);
close(conn->server_sock);
conn->server_sock=conn->client_sock=0;
conn->stat=cs_disconnected;
return -1;
}
@@ -579,19 +581,19 @@ perror("connecting()");
X509 *cert;
X509_NAME *xn=NULL;
char peer_cn[256]="";
getpeername(conn->server_sock,
getpeername(cn->server_sock,
(struct sockaddr *)&client_addr,
&client_addr_len);
cert=SSL_get_peer_certificate(conn->ssl_conn);
cert=SSL_get_peer_certificate(cn->ssl_conn);
if (cert) {
xn=X509_get_subject_name(cert);
X509_NAME_get_text_by_NID(xn, NID_commonName, peer_cn, 256);
}
conn->csbuf_e+=snprintf(conn->csbuf_b, cs_buflen,
cn->csbuf_e+=snprintf(cn->csbuf_b, cs_buflen,
"#@ip=%s port=%d%s%s%s\r\n",
inet_ntoa(client_addr.sin_addr),
htons(client_addr.sin_port), xn?" cn='":"", peer_cn, xn?"'":"");
debug("INFO: %s", conn->csbuf);
debug("INFO: %p %d %s", cn, cn->server_sock, cn->csbuf);
}
}
break;

0 comments on commit 72e0034

Please sign in to comment.