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