summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/apps/s_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/apps/s_server.c')
-rw-r--r--src/lib/libssl/src/apps/s_server.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/lib/libssl/src/apps/s_server.c b/src/lib/libssl/src/apps/s_server.c
index ff4ab6ef28..5157aae4d1 100644
--- a/src/lib/libssl/src/apps/s_server.c
+++ b/src/lib/libssl/src/apps/s_server.c
@@ -140,6 +140,10 @@ typedef unsigned int u_int;
140#include <openssl/rand.h> 140#include <openssl/rand.h>
141#include "s_apps.h" 141#include "s_apps.h"
142 142
143#ifdef OPENSSL_SYS_WINDOWS
144#include <conio.h>
145#endif
146
143#ifdef OPENSSL_SYS_WINCE 147#ifdef OPENSSL_SYS_WINCE
144/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */ 148/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
145#ifdef fileno 149#ifdef fileno
@@ -913,7 +917,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
913 unsigned long l; 917 unsigned long l;
914 SSL *con=NULL; 918 SSL *con=NULL;
915 BIO *sbio; 919 BIO *sbio;
916#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) 920#ifdef OPENSSL_SYS_WINDOWS
917 struct timeval tv; 921 struct timeval tv;
918#endif 922#endif
919 923
@@ -987,7 +991,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
987 if (!read_from_sslcon) 991 if (!read_from_sslcon)
988 { 992 {
989 FD_ZERO(&readfds); 993 FD_ZERO(&readfds);
990#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS) 994#ifndef OPENSSL_SYS_WINDOWS
991 FD_SET(fileno(stdin),&readfds); 995 FD_SET(fileno(stdin),&readfds);
992#endif 996#endif
993 FD_SET(s,&readfds); 997 FD_SET(s,&readfds);
@@ -997,8 +1001,8 @@ static int sv_body(char *hostname, int s, unsigned char *context)
997 * the compiler: if you do have a cast then you can either 1001 * the compiler: if you do have a cast then you can either
998 * go for (int *) or (void *). 1002 * go for (int *) or (void *).
999 */ 1003 */
1000#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) 1004#ifdef OPENSSL_SYS_WINDOWS
1001 /* Under DOS (non-djgpp) and Windows we can't select on stdin: only 1005 /* Under Windows we can't select on stdin: only
1002 * on sockets. As a workaround we timeout the select every 1006 * on sockets. As a workaround we timeout the select every
1003 * second and check for any keypress. In a proper Windows 1007 * second and check for any keypress. In a proper Windows
1004 * application we wouldn't do this because it is inefficient. 1008 * application we wouldn't do this because it is inefficient.
@@ -1259,13 +1263,7 @@ static int init_ssl_connection(SSL *con)
1259 if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) & 1263 if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) &
1260 TLS1_FLAGS_TLS_PADDING_BUG) 1264 TLS1_FLAGS_TLS_PADDING_BUG)
1261 BIO_printf(bio_s_out,"Peer has incorrect TLSv1 block padding\n"); 1265 BIO_printf(bio_s_out,"Peer has incorrect TLSv1 block padding\n");
1262#ifndef OPENSSL_NO_KRB5 1266
1263 if (con->kssl_ctx->client_princ != NULL)
1264 {
1265 BIO_printf(bio_s_out,"Kerberos peer principal is %s\n",
1266 con->kssl_ctx->client_princ);
1267 }
1268#endif /* OPENSSL_NO_KRB5 */
1269 return(1); 1267 return(1);
1270 } 1268 }
1271 1269