Skip to content

Commit

Permalink
* src/ne_socket.c (ne_sock_cipher): Fix non-SSL build.
Browse files Browse the repository at this point in the history
  • Loading branch information
notroj committed Feb 6, 2008
1 parent 369a9e7 commit 31d2d1a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ne_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1629,18 +1629,19 @@ int ne_sock_sessid(ne_socket *sock, unsigned char *buf, size_t *buflen)

char *ne_sock_cipher(ne_socket *sock)
{
if (sock->ssl) {
#ifdef NE_HAVE_SSL
if (sock->ssl) {
#ifdef HAVE_OPENSSL
const char *name = SSL_get_cipher(sock->ssl);
return ne_strdup(name);
#elif defined(HAVE_GNUTLS)
const char *name = gnutls_cipher_get_name(gnutls_cipher_get(sock->ssl));
return ne_strdup(name);
#endif
#endif /* NE_HAVE_SSL */
}
else {
else
#endif /* NE_HAVE_SSL */
{
return NULL;
}
}
Expand Down

0 comments on commit 31d2d1a

Please sign in to comment.