Commit 70275537 authored by Richard Levitte's avatar Richard Levitte
Browse files

Recent changes from 0.9.7-stable

parent 445aa1c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -225,7 +225,7 @@
	$ md c:\openssl\lib
	$ md c:\openssl\include
	$ md c:\openssl\include\openssl
	$ copy /b inc32\*               c:\openssl\include\openssl
	$ copy /b inc32\openssl\*       c:\openssl\include\openssl
	$ copy /b out32dll\ssleay32.lib c:\openssl\lib
	$ copy /b out32dll\libeay32.lib c:\openssl\lib
	$ copy /b out32dll\ssleay32.dll c:\openssl\bin
+5 −6
Original line number Diff line number Diff line
@@ -235,7 +235,7 @@ int MAIN(int argc, char **argv)
			return (1);
		}
		if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken))) {
			BIO_printf(bio_err, "Error converting key\n", outfile);
			BIO_printf(bio_err, "Error converting key\n");
			ERR_print_errors(bio_err);
			return (1);
		}
@@ -259,8 +259,7 @@ int MAIN(int argc, char **argv)
			if (!(p8 = PKCS8_encrypt(pbe_nid, cipher,
					p8pass, strlen(p8pass),
					NULL, 0, iter, p8inf))) {
				BIO_printf(bio_err, "Error encrypting key\n",
								 outfile);
				BIO_printf(bio_err, "Error encrypting key\n");
				ERR_print_errors(bio_err);
				return (1);
			}
@@ -303,7 +302,7 @@ int MAIN(int argc, char **argv)
		}

		if (!p8) {
			BIO_printf (bio_err, "Error reading key\n", outfile);
			BIO_printf (bio_err, "Error reading key\n");
			ERR_print_errors(bio_err);
			return (1);
		}
@@ -317,13 +316,13 @@ int MAIN(int argc, char **argv)
	}

	if (!p8inf) {
		BIO_printf(bio_err, "Error decrypting key\n", outfile);
		BIO_printf(bio_err, "Error decrypting key\n");
		ERR_print_errors(bio_err);
		return (1);
	}

	if (!(pkey = EVP_PKCS82PKEY(p8inf))) {
		BIO_printf(bio_err, "Error converting key\n", outfile);
		BIO_printf(bio_err, "Error converting key\n");
		ERR_print_errors(bio_err);
		return (1);
	}
+8 −0
Original line number Diff line number Diff line
@@ -112,6 +112,14 @@
#include <sys/types.h>
#include <openssl/opensslconf.h>

#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
#include <conio.h>
#endif

#ifdef OPENSSL_SYS_MSDOS
#define _kbhit kbhit
#endif

#if defined(OPENSSL_SYS_VMS) && !defined(FD_SET)
/* VAX C does not defined fd_set and friends, but it's actually quite simple */
/* These definitions are borrowed from SOCKETSHR.	/Richard Levitte */
+7 −11
Original line number Diff line number Diff line
@@ -136,10 +136,6 @@ typedef unsigned int u_int;
#include <openssl/rand.h>
#include "s_apps.h"

#ifdef OPENSSL_SYS_WINDOWS
#include <conio.h>
#endif

#ifdef OPENSSL_SYS_WINCE
/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
#ifdef fileno
@@ -260,7 +256,7 @@ int MAIN(int argc, char **argv)
	char *engine_id=NULL;
	ENGINE *e=NULL;
#endif
#ifdef OPENSSL_SYS_WINDOWS
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
	struct timeval tv;
#endif

@@ -644,7 +640,7 @@ re_start:

		if (!ssl_pending)
			{
#ifndef OPENSSL_SYS_WINDOWS
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
			if (tty_on)
				{
				if (read_tty)  FD_SET(fileno(stdin),&readfds);
@@ -671,8 +667,8 @@ re_start:
			 * will choke the compiler: if you do have a cast then
			 * you can either go for (int *) or (void *).
			 */
#ifdef OPENSSL_SYS_WINDOWS
			/* Under Windows we make the assumption that we can
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
                        /* Under Windows/DOS we make the assumption that we can
			 * always write to the tty: therefore if we need to
			 * write to the tty we just fall through. Otherwise
			 * we timeout the select every second and see if there
@@ -686,7 +682,7 @@ re_start:
					tv.tv_usec = 0;
					i=select(width,(void *)&readfds,(void *)&writefds,
						 NULL,&tv);
#ifdef OPENSSL_SYS_WINCE
#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
					if(!i && (!_kbhit() || !read_tty) ) continue;
#else
					if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue;
@@ -855,8 +851,8 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
				}
			}

#ifdef OPENSSL_SYS_WINDOWS
#ifdef OPENSSL_SYS_WINCE
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
		else if (_kbhit())
#else
		else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
+11 −9
Original line number Diff line number Diff line
@@ -140,10 +140,6 @@ typedef unsigned int u_int;
#include <openssl/rand.h>
#include "s_apps.h"

#ifdef OPENSSL_SYS_WINDOWS
#include <conio.h>
#endif

#ifdef OPENSSL_SYS_WINCE
/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
#ifdef fileno
@@ -917,7 +913,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
	unsigned long l;
	SSL *con=NULL;
	BIO *sbio;
#ifdef OPENSSL_SYS_WINDOWS
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
	struct timeval tv;
#endif

@@ -991,7 +987,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
		if (!read_from_sslcon)
			{
			FD_ZERO(&readfds);
#ifndef OPENSSL_SYS_WINDOWS
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
			FD_SET(fileno(stdin),&readfds);
#endif
			FD_SET(s,&readfds);
@@ -1001,8 +997,8 @@ static int sv_body(char *hostname, int s, unsigned char *context)
			 * the compiler: if you do have a cast then you can either
			 * go for (int *) or (void *).
			 */
#ifdef OPENSSL_SYS_WINDOWS
			/* Under Windows we can't select on stdin: only
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
                        /* Under DOS (non-djgpp) and Windows we can't select on stdin: only
			 * on sockets. As a workaround we timeout the select every
			 * second and check for any keypress. In a proper Windows
			 * application we wouldn't do this because it is inefficient.
@@ -1263,7 +1259,13 @@ static int init_ssl_connection(SSL *con)
	if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) &
		TLS1_FLAGS_TLS_PADDING_BUG)
		BIO_printf(bio_s_out,"Peer has incorrect TLSv1 block padding\n");

#ifndef OPENSSL_NO_KRB5
	if (con->kssl_ctx->client_princ != NULL)
		{
		BIO_printf(bio_s_out,"Kerberos peer principal is %s\n",
			con->kssl_ctx->client_princ);
		}
#endif /* OPENSSL_NO_KRB5 */
	return(1);
	}

Loading