Compare commits
	
		
			2 Commits
		
	
	
		
			OpenSSL_1_
			...
			OpenSSL_0_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					ca1b56f3d0 | ||
| 
						 | 
					9beaae61ec | 
							
								
								
									
										25
									
								
								CHANGES
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								CHANGES
									
									
									
									
									
								
							@@ -2,31 +2,6 @@
 | 
			
		||||
 OpenSSL CHANGES
 | 
			
		||||
 _______________
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.6 and 0.9.7  [xx XXX 2000]
 | 
			
		||||
 | 
			
		||||
  *) Fix for bug in DirectoryString mask setting. Add support for
 | 
			
		||||
     X509_NAME_print_ex() in 'req' and X509_print_ex() function
 | 
			
		||||
     to allow certificate printing to more controllable, additional
 | 
			
		||||
     'certopt' option to 'x509' to allow new printing options to be
 | 
			
		||||
     set.
 | 
			
		||||
     [Steve Henson]
 | 
			
		||||
 | 
			
		||||
  *) Clean old EAY MD5 hack from e_os.h.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
  *) Fix SSL_CTX_set_read_ahead macro to actually use its argument.
 | 
			
		||||
 | 
			
		||||
     Copy SSL_CTX's read_ahead flag to SSL object directly in SSL_new
 | 
			
		||||
     and not in SSL_clear because the latter is also used by the
 | 
			
		||||
     accept/connect functions; previously, the settings made by
 | 
			
		||||
     SSL_set_read_ahead would be lost during the handshake.
 | 
			
		||||
     [Bodo Moeller; problems reported by Anders Gertz <gertz@epact.se>]     
 | 
			
		||||
 | 
			
		||||
  *) Correct util/mkdef.pl to be selective about disabled algorithms.
 | 
			
		||||
     Previously, it would create entries for disableed algorithms no
 | 
			
		||||
     matter what.
 | 
			
		||||
     [Richard Levitte]
 | 
			
		||||
 | 
			
		||||
 Changes between 0.9.5a and 0.9.6  [24 Sep 2000]
 | 
			
		||||
 | 
			
		||||
  *) In ssl23_get_client_hello, generate an error message when faced
 | 
			
		||||
 
 | 
			
		||||
@@ -280,8 +280,8 @@ my %table=(
 | 
			
		||||
#
 | 
			
		||||
#					<appro@fy.chalmers.se>
 | 
			
		||||
#
 | 
			
		||||
"linux-alpha-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:asm/alpha.o:dlfcn:linux-shared:-fPIC",
 | 
			
		||||
"linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:asm/alpha.o:dlfcn:linux-shared:-fPIC",
 | 
			
		||||
"linux-alpha-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:asm/alpha.o::",
 | 
			
		||||
"linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:asm/alpha.o::",
 | 
			
		||||
"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:asm/alpha.o::",
 | 
			
		||||
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:asm/alpha.o::",
 | 
			
		||||
 | 
			
		||||
@@ -719,10 +719,6 @@ if ($shared_cflag ne "")
 | 
			
		||||
		$shared_mark2 = ".shlib.";
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
else
 | 
			
		||||
	{
 | 
			
		||||
	$no_shared = 1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#my ($bn1)=split(/\s+/,$bn_obj);
 | 
			
		||||
#$bn1 = "" unless defined $bn1;
 | 
			
		||||
 
 | 
			
		||||
@@ -462,8 +462,7 @@ install: all install_docs
 | 
			
		||||
		if [ -f "$$i" ]; then \
 | 
			
		||||
		(       echo installing $$i; \
 | 
			
		||||
			cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
 | 
			
		||||
			(echo $$i | grep '\\.a$$' > /dev/null 2>&1) \
 | 
			
		||||
			&& $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
 | 
			
		||||
			$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
 | 
			
		||||
			chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
 | 
			
		||||
		fi \
 | 
			
		||||
	done
 | 
			
		||||
@@ -474,19 +473,19 @@ install_docs:
 | 
			
		||||
		$(INSTALL_PREFIX)$(MANDIR)/man3 \
 | 
			
		||||
		$(INSTALL_PREFIX)$(MANDIR)/man5 \
 | 
			
		||||
		$(INSTALL_PREFIX)$(MANDIR)/man7
 | 
			
		||||
	@echo installing man 1 and man 5
 | 
			
		||||
	@for i in doc/apps/*.pod; do \
 | 
			
		||||
		fn=`basename $$i .pod`; \
 | 
			
		||||
		sec=`[ "$$fn" = "config" ] && echo 5 || echo 1`; \
 | 
			
		||||
		echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
 | 
			
		||||
		(cd `dirname $$i`; \
 | 
			
		||||
		$(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
 | 
			
		||||
			 --release=$(VERSION) `basename $$i`) \
 | 
			
		||||
			>  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
 | 
			
		||||
	done
 | 
			
		||||
	@echo installing man 3 and man 7
 | 
			
		||||
	@for i in doc/crypto/*.pod doc/ssl/*.pod; do \
 | 
			
		||||
		fn=`basename $$i .pod`; \
 | 
			
		||||
		sec=`[ "$$fn" = "des_modes" ] && echo 7 || echo 3`; \
 | 
			
		||||
		echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
 | 
			
		||||
		(cd `dirname $$i`; \
 | 
			
		||||
		$(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
 | 
			
		||||
			--release=$(VERSION) `basename $$i`) \
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								README
									
									
									
									
									
								
							@@ -1,5 +1,5 @@
 | 
			
		||||
 | 
			
		||||
 OpenSSL 0.9.7-dev 24 Sep 2000
 | 
			
		||||
 OpenSSL 0.9.6 24 Sep 2000
 | 
			
		||||
 | 
			
		||||
 Copyright (c) 1998-2000 The OpenSSL Project
 | 
			
		||||
 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								STATUS
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								STATUS
									
									
									
									
									
								
							@@ -1,10 +1,9 @@
 | 
			
		||||
 | 
			
		||||
  OpenSSL STATUS                           Last modified at
 | 
			
		||||
  ______________                           $Date: 2000/09/24 17:31:36 $
 | 
			
		||||
  ______________                           $Date: 2000/09/24 15:42:34 $
 | 
			
		||||
 | 
			
		||||
  DEVELOPMENT STATE
 | 
			
		||||
 | 
			
		||||
    o  OpenSSL 0.9.7:  Under development...
 | 
			
		||||
    o  OpenSSL 0.9.6:  Released on September 24th, 2000
 | 
			
		||||
    o  OpenSSL 0.9.5a: Released on April      1st, 2000
 | 
			
		||||
    o  OpenSSL 0.9.5:  Released on February  28th, 2000
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										57
									
								
								apps/apps.c
									
									
									
									
									
								
							
							
						
						
									
										57
									
								
								apps/apps.c
									
									
									
									
									
								
							@@ -74,14 +74,6 @@
 | 
			
		||||
#  include "bss_file.c"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
	char *name;
 | 
			
		||||
	unsigned long flag;
 | 
			
		||||
	unsigned long mask;
 | 
			
		||||
} NAME_EX_TBL;
 | 
			
		||||
 | 
			
		||||
static int set_table_opts(unsigned long *flags, const char *arg, const NAME_EX_TBL *in_tbl);
 | 
			
		||||
 | 
			
		||||
int app_init(long mesgwin);
 | 
			
		||||
#ifdef undef /* never finished - probably never will be :-) */
 | 
			
		||||
int args_from_file(char *file, int *argc, char **argv[])
 | 
			
		||||
@@ -702,43 +694,16 @@ end:
 | 
			
		||||
	return(othercerts);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define X509V3_EXT_UNKNOWN_MASK		(0xfL << 16)
 | 
			
		||||
/* Return error for unknown extensions */
 | 
			
		||||
#define X509V3_EXT_DEFAULT		0
 | 
			
		||||
/* Print error for unknown extensions */
 | 
			
		||||
#define X509V3_EXT_ERROR_UNKNOWN	(1L << 16)
 | 
			
		||||
/* ASN1 parse unknown extensions */
 | 
			
		||||
#define X509V3_EXT_PARSE_UNKNOWN	(2L << 16)
 | 
			
		||||
/* BIO_dump unknown extensions */
 | 
			
		||||
#define X509V3_EXT_DUMP_UNKNOWN		(3L << 16)
 | 
			
		||||
 | 
			
		||||
int set_cert_ex(unsigned long *flags, const char *arg)
 | 
			
		||||
{
 | 
			
		||||
	static const NAME_EX_TBL cert_tbl[] = {
 | 
			
		||||
		{ "compatible", X509_FLAG_COMPAT, 0xffffffffl},
 | 
			
		||||
		{ "no_header", X509_FLAG_NO_HEADER, 0},
 | 
			
		||||
		{ "no_version", X509_FLAG_NO_VERSION, 0},
 | 
			
		||||
		{ "no_serial", X509_FLAG_NO_SERIAL, 0},
 | 
			
		||||
		{ "no_signame", X509_FLAG_NO_SIGNAME, 0},
 | 
			
		||||
		{ "no_validity", X509_FLAG_NO_VALIDITY, 0},
 | 
			
		||||
		{ "no_subject", X509_FLAG_NO_SUBJECT, 0},
 | 
			
		||||
		{ "no_pubkey", X509_FLAG_NO_PUBKEY, 0},
 | 
			
		||||
		{ "no_extensions", X509_FLAG_NO_EXTENSIONS, 0},
 | 
			
		||||
		{ "no_sigdump", X509_FLAG_NO_SIGDUMP, 0},
 | 
			
		||||
		{ "no_aux", X509_FLAG_NO_AUX, 0},
 | 
			
		||||
		{ "ext_default", X509V3_EXT_DEFAULT, X509V3_EXT_UNKNOWN_MASK},
 | 
			
		||||
		{ "ext_error", X509V3_EXT_ERROR_UNKNOWN, X509V3_EXT_UNKNOWN_MASK},
 | 
			
		||||
		{ "ext_parse", X509V3_EXT_PARSE_UNKNOWN, X509V3_EXT_UNKNOWN_MASK},
 | 
			
		||||
		{ "ext_dump", X509V3_EXT_DUMP_UNKNOWN, X509V3_EXT_UNKNOWN_MASK},
 | 
			
		||||
		{ NULL, 0, 0}
 | 
			
		||||
	};
 | 
			
		||||
	return set_table_opts(flags, arg, cert_tbl);
 | 
			
		||||
}
 | 
			
		||||
typedef struct {
 | 
			
		||||
	char *name;
 | 
			
		||||
	unsigned long flag;
 | 
			
		||||
	unsigned long mask;
 | 
			
		||||
} NAME_EX_TBL;
 | 
			
		||||
 | 
			
		||||
int set_name_ex(unsigned long *flags, const char *arg)
 | 
			
		||||
{
 | 
			
		||||
	static const NAME_EX_TBL ex_tbl[] = {
 | 
			
		||||
	char c;
 | 
			
		||||
	const NAME_EX_TBL *ptbl, ex_tbl[] = {
 | 
			
		||||
		{ "esc_2253", ASN1_STRFLGS_ESC_2253, 0},
 | 
			
		||||
		{ "esc_ctrl", ASN1_STRFLGS_ESC_CTRL, 0},
 | 
			
		||||
		{ "esc_msb", ASN1_STRFLGS_ESC_MSB, 0},
 | 
			
		||||
@@ -766,13 +731,7 @@ int set_name_ex(unsigned long *flags, const char *arg)
 | 
			
		||||
		{ "multiline", XN_FLAG_MULTILINE, 0xffffffffL},
 | 
			
		||||
		{ NULL, 0, 0}
 | 
			
		||||
	};
 | 
			
		||||
	return set_table_opts(flags, arg, ex_tbl);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int set_table_opts(unsigned long *flags, const char *arg, const NAME_EX_TBL *in_tbl)
 | 
			
		||||
{
 | 
			
		||||
	char c;
 | 
			
		||||
	const NAME_EX_TBL *ptbl;
 | 
			
		||||
	c = arg[0];
 | 
			
		||||
 | 
			
		||||
	if(c == '-') {
 | 
			
		||||
@@ -783,7 +742,7 @@ static int set_table_opts(unsigned long *flags, const char *arg, const NAME_EX_T
 | 
			
		||||
		arg++;
 | 
			
		||||
	} else c = 1;
 | 
			
		||||
 | 
			
		||||
	for(ptbl = in_tbl; ptbl->name; ptbl++) {
 | 
			
		||||
	for(ptbl = ex_tbl; ptbl->name; ptbl++) {
 | 
			
		||||
		if(!strcmp(arg, ptbl->name)) {
 | 
			
		||||
			*flags &= ~ptbl->mask;
 | 
			
		||||
			if(c) *flags |= ptbl->flag;
 | 
			
		||||
 
 | 
			
		||||
@@ -147,7 +147,6 @@ int chopup_args(ARGS *arg,char *buf, int *argc, char **argv[]);
 | 
			
		||||
int dump_cert_text(BIO *out, X509 *x);
 | 
			
		||||
void print_name(BIO *out, char *title, X509_NAME *nm, unsigned long lflags);
 | 
			
		||||
#endif
 | 
			
		||||
int set_cert_ex(unsigned long *flags, const char *arg);
 | 
			
		||||
int set_name_ex(unsigned long *flags, const char *arg);
 | 
			
		||||
int app_passwd(BIO *err, char *arg1, char *arg2, char **pass1, char **pass2);
 | 
			
		||||
int add_oid_section(BIO *err, LHASH *conf);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										20
									
								
								apps/req.c
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								apps/req.c
									
									
									
									
									
								
							@@ -143,7 +143,6 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
#ifndef NO_DSA
 | 
			
		||||
	DSA *dsa_params=NULL;
 | 
			
		||||
#endif
 | 
			
		||||
	unsigned long nmflag = 0;
 | 
			
		||||
	int ex=1,x509=0,days=30;
 | 
			
		||||
	X509 *x509ss=NULL;
 | 
			
		||||
	X509_REQ *req=NULL;
 | 
			
		||||
@@ -151,7 +150,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	int i,badops=0,newreq=0,newkey= -1,pkey_type=0;
 | 
			
		||||
	BIO *in=NULL,*out=NULL;
 | 
			
		||||
	int informat,outformat,verify=0,noout=0,text=0,keyform=FORMAT_PEM;
 | 
			
		||||
	int nodes=0,kludge=0,newhdr=0,subject=0;
 | 
			
		||||
	int nodes=0,kludge=0,newhdr=0;
 | 
			
		||||
	char *infile,*outfile,*prog,*keyfile=NULL,*template=NULL,*keyout=NULL;
 | 
			
		||||
	char *extensions = NULL;
 | 
			
		||||
	char *req_exts = NULL;
 | 
			
		||||
@@ -323,13 +322,6 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			nodes=1;
 | 
			
		||||
		else if (strcmp(*argv,"-noout") == 0)
 | 
			
		||||
			noout=1;
 | 
			
		||||
		else if (strcmp(*argv,"-nameopt") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			if (!set_name_ex(&nmflag, *(++argv))) goto bad;
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-subject") == 0)
 | 
			
		||||
			subject=1;
 | 
			
		||||
		else if (strcmp(*argv,"-text") == 0)
 | 
			
		||||
			text=1;
 | 
			
		||||
		else if (strcmp(*argv,"-x509") == 0)
 | 
			
		||||
@@ -811,7 +803,7 @@ loop:
 | 
			
		||||
			BIO_printf(bio_err,"verify OK\n");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (noout && !text && !modulus && !subject)
 | 
			
		||||
	if (noout && !text && !modulus)
 | 
			
		||||
		{
 | 
			
		||||
		ex=0;
 | 
			
		||||
		goto end;
 | 
			
		||||
@@ -848,14 +840,6 @@ loop:
 | 
			
		||||
			X509_REQ_print(out,req);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if(subject) 
 | 
			
		||||
		{
 | 
			
		||||
		if(x509)
 | 
			
		||||
			print_name(out, "subject=", X509_get_subject_name(x509ss), nmflag);
 | 
			
		||||
		else
 | 
			
		||||
			print_name(out, "subject=", X509_REQ_get_subject_name(req), nmflag);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (modulus)
 | 
			
		||||
		{
 | 
			
		||||
		EVP_PKEY *pubkey;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								apps/x509.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								apps/x509.c
									
									
									
									
									
								
							@@ -129,7 +129,6 @@ static char *x509_usage[]={
 | 
			
		||||
" -extensions     - section from config file with X509V3 extensions to add\n",
 | 
			
		||||
" -clrext         - delete extensions before signing and input certificate\n",
 | 
			
		||||
" -nameopt arg    - various certificate name options\n",
 | 
			
		||||
" -certopt arg    - various certificate text options\n",
 | 
			
		||||
NULL
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -175,7 +174,7 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
	char *extsect = NULL, *extfile = NULL, *passin = NULL, *passargin = NULL;
 | 
			
		||||
	int need_rand = 0;
 | 
			
		||||
	int checkend=0,checkoffset=0;
 | 
			
		||||
	unsigned long nmflag = 0, certflag = 0;
 | 
			
		||||
	unsigned long nmflag = 0;
 | 
			
		||||
 | 
			
		||||
	reqfile=0;
 | 
			
		||||
 | 
			
		||||
@@ -327,11 +326,6 @@ int MAIN(int argc, char **argv)
 | 
			
		||||
			alias= *(++argv);
 | 
			
		||||
			trustout = 1;
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-certopt") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
			if (!set_cert_ex(&certflag, *(++argv))) goto bad;
 | 
			
		||||
			}
 | 
			
		||||
		else if (strcmp(*argv,"-nameopt") == 0)
 | 
			
		||||
			{
 | 
			
		||||
			if (--argc < 1) goto bad;
 | 
			
		||||
@@ -780,7 +774,7 @@ bad:
 | 
			
		||||
				}
 | 
			
		||||
			else if (text == i)
 | 
			
		||||
				{
 | 
			
		||||
				X509_print_ex(out,x,nmflag, certflag);
 | 
			
		||||
				X509_print(out,x);
 | 
			
		||||
				}
 | 
			
		||||
			else if (startdate == i)
 | 
			
		||||
				{
 | 
			
		||||
 
 | 
			
		||||
@@ -90,8 +90,7 @@ links:
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
libs:
 | 
			
		||||
 
 | 
			
		||||
@@ -75,8 +75,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -491,24 +491,12 @@ static int do_name_ex(char_io *io_ch, void *arg, X509_NAME *n,
 | 
			
		||||
 | 
			
		||||
int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags)
 | 
			
		||||
{
 | 
			
		||||
	if(flags == XN_FLAG_COMPAT)
 | 
			
		||||
		return X509_NAME_print(out, nm, indent);
 | 
			
		||||
	return do_name_ex(send_bio_chars, out, nm, indent, flags);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags)
 | 
			
		||||
{
 | 
			
		||||
	if(flags == XN_FLAG_COMPAT)
 | 
			
		||||
		{
 | 
			
		||||
		BIO *btmp;
 | 
			
		||||
		int ret;
 | 
			
		||||
		btmp = BIO_new_fp(fp, BIO_NOCLOSE);
 | 
			
		||||
		if(!btmp) return -1;
 | 
			
		||||
		ret = X509_NAME_print(btmp, nm, indent);
 | 
			
		||||
		BIO_free(btmp);
 | 
			
		||||
		return ret;
 | 
			
		||||
		}
 | 
			
		||||
	return do_name_ex(send_fp_chars, fp, nm, indent, flags);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -133,7 +133,7 @@ ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in,
 | 
			
		||||
	if(tbl) {
 | 
			
		||||
		mask = tbl->mask;
 | 
			
		||||
		if(!(tbl->flags & STABLE_NO_MASK)) mask &= global_mask;
 | 
			
		||||
		ret = ASN1_mbstring_ncopy(out, in, inlen, inform, mask,
 | 
			
		||||
		ret = ASN1_mbstring_ncopy(out, in, inlen, inform, tbl->mask,
 | 
			
		||||
					tbl->minsize, tbl->maxsize);
 | 
			
		||||
	} else ret = ASN1_mbstring_copy(out, in, inlen, inform, DIRSTRING_TYPE & global_mask);
 | 
			
		||||
	if(ret <= 0) return NULL;
 | 
			
		||||
 
 | 
			
		||||
@@ -72,11 +72,6 @@
 | 
			
		||||
 | 
			
		||||
#ifndef NO_FP_API
 | 
			
		||||
int X509_print_fp(FILE *fp, X509 *x)
 | 
			
		||||
	{
 | 
			
		||||
	return X509_print_ex_fp(fp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
int X509_print_ex_fp(FILE *fp, X509 *x, unsigned long nmflag, unsigned long cflag)
 | 
			
		||||
        {
 | 
			
		||||
        BIO *b;
 | 
			
		||||
        int ret;
 | 
			
		||||
@@ -87,23 +82,17 @@ int X509_print_ex_fp(FILE *fp, X509 *x, unsigned long nmflag, unsigned long cfla
 | 
			
		||||
                return(0);
 | 
			
		||||
		}
 | 
			
		||||
        BIO_set_fp(b,fp,BIO_NOCLOSE);
 | 
			
		||||
        ret=X509_print_ex(b, x, nmflag, cflag);
 | 
			
		||||
        ret=X509_print(b, x);
 | 
			
		||||
        BIO_free(b);
 | 
			
		||||
        return(ret);
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int X509_print(BIO *bp, X509 *x)
 | 
			
		||||
{
 | 
			
		||||
	return X509_print_ex(bp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag)
 | 
			
		||||
	{
 | 
			
		||||
	long l;
 | 
			
		||||
	int ret=0,i,j,n;
 | 
			
		||||
	char *m=NULL,*s, mlch = ' ';
 | 
			
		||||
	int nmindent = 0;
 | 
			
		||||
	char *m=NULL,*s;
 | 
			
		||||
	X509_CINF *ci;
 | 
			
		||||
	ASN1_INTEGER *bs;
 | 
			
		||||
	EVP_PKEY *pkey=NULL;
 | 
			
		||||
@@ -111,127 +100,89 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag)
 | 
			
		||||
	X509_EXTENSION *ex;
 | 
			
		||||
	ASN1_STRING *str=NULL;
 | 
			
		||||
 | 
			
		||||
	if((nmflags & XN_FLAG_SEP_MASK) == XN_FLAG_SEP_MULTILINE) {
 | 
			
		||||
			mlch = '\n';
 | 
			
		||||
			nmindent = 16;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if(nmflags == X509_FLAG_COMPAT)
 | 
			
		||||
		nmindent = 16;
 | 
			
		||||
 | 
			
		||||
	ci=x->cert_info;
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_HEADER))
 | 
			
		||||
		{
 | 
			
		||||
		if (BIO_write(bp,"Certificate:\n",13) <= 0) goto err;
 | 
			
		||||
		if (BIO_write(bp,"    Data:\n",10) <= 0) goto err;
 | 
			
		||||
		}
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_VERSION))
 | 
			
		||||
		{
 | 
			
		||||
		l=X509_get_version(x);
 | 
			
		||||
		if (BIO_printf(bp,"%8sVersion: %lu (0x%lx)\n","",l+1,l) <= 0) goto err;
 | 
			
		||||
		}
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_SERIAL))
 | 
			
		||||
		{
 | 
			
		||||
	if (BIO_write(bp,"Certificate:\n",13) <= 0) goto err;
 | 
			
		||||
	if (BIO_write(bp,"    Data:\n",10) <= 0) goto err;
 | 
			
		||||
	l=X509_get_version(x);
 | 
			
		||||
	if (BIO_printf(bp,"%8sVersion: %lu (0x%lx)\n","",l+1,l) <= 0) goto err;
 | 
			
		||||
	if (BIO_write(bp,"        Serial Number:",22) <= 0) goto err;
 | 
			
		||||
 | 
			
		||||
		if (BIO_write(bp,"        Serial Number:",22) <= 0) goto err;
 | 
			
		||||
 | 
			
		||||
		bs=X509_get_serialNumber(x);
 | 
			
		||||
		if (bs->length <= 4)
 | 
			
		||||
	bs=X509_get_serialNumber(x);
 | 
			
		||||
	if (bs->length <= 4)
 | 
			
		||||
		{
 | 
			
		||||
		l=ASN1_INTEGER_get(bs);
 | 
			
		||||
		if (l < 0)
 | 
			
		||||
			{
 | 
			
		||||
			l=ASN1_INTEGER_get(bs);
 | 
			
		||||
			if (l < 0)
 | 
			
		||||
				{
 | 
			
		||||
				l= -l;
 | 
			
		||||
				neg="-";
 | 
			
		||||
				}
 | 
			
		||||
			else
 | 
			
		||||
				neg="";
 | 
			
		||||
			if (BIO_printf(bp," %s%lu (%s0x%lx)\n",neg,l,neg,l) <= 0)
 | 
			
		||||
			l= -l;
 | 
			
		||||
			neg="-";
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			neg="";
 | 
			
		||||
		if (BIO_printf(bp," %s%lu (%s0x%lx)\n",neg,l,neg,l) <= 0)
 | 
			
		||||
			goto err;
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
		{
 | 
			
		||||
		neg=(bs->type == V_ASN1_NEG_INTEGER)?" (Negative)":"";
 | 
			
		||||
		if (BIO_printf(bp,"\n%12s%s","",neg) <= 0) goto err;
 | 
			
		||||
 | 
			
		||||
		for (i=0; i<bs->length; i++)
 | 
			
		||||
			{
 | 
			
		||||
			if (BIO_printf(bp,"%02x%c",bs->data[i],
 | 
			
		||||
				((i+1 == bs->length)?'\n':':')) <= 0)
 | 
			
		||||
				goto err;
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
			{
 | 
			
		||||
			neg=(bs->type == V_ASN1_NEG_INTEGER)?" (Negative)":"";
 | 
			
		||||
			if (BIO_printf(bp,"\n%12s%s","",neg) <= 0) goto err;
 | 
			
		||||
 | 
			
		||||
			for (i=0; i<bs->length; i++)
 | 
			
		||||
				{
 | 
			
		||||
				if (BIO_printf(bp,"%02x%c",bs->data[i],
 | 
			
		||||
					((i+1 == bs->length)?'\n':':')) <= 0)
 | 
			
		||||
					goto err;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_SIGNAME))
 | 
			
		||||
		{
 | 
			
		||||
		i=OBJ_obj2nid(ci->signature->algorithm);
 | 
			
		||||
		if (BIO_printf(bp,"%8sSignature Algorithm: %s\n","",
 | 
			
		||||
			(i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)) <= 0)
 | 
			
		||||
			goto err;
 | 
			
		||||
		}
 | 
			
		||||
	i=OBJ_obj2nid(ci->signature->algorithm);
 | 
			
		||||
	if (BIO_printf(bp,"%8sSignature Algorithm: %s\n","",
 | 
			
		||||
		(i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)) <= 0)
 | 
			
		||||
		goto err;
 | 
			
		||||
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_ISSUER))
 | 
			
		||||
		{
 | 
			
		||||
		if (BIO_printf(bp,"        Issuer:%c",mlch) <= 0) goto err;
 | 
			
		||||
		if (!X509_NAME_print_ex(bp,X509_get_issuer_name(x),nmindent, nmflags)) goto err;
 | 
			
		||||
		}
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_VALIDITY))
 | 
			
		||||
		{
 | 
			
		||||
		if (BIO_write(bp,"\n        Validity\n",18) <= 0) goto err;
 | 
			
		||||
		if (BIO_write(bp,"            Not Before: ",24) <= 0) goto err;
 | 
			
		||||
		if (!ASN1_TIME_print(bp,X509_get_notBefore(x))) goto err;
 | 
			
		||||
		if (BIO_write(bp,"\n            Not After : ",25) <= 0) goto err;
 | 
			
		||||
		if (!ASN1_TIME_print(bp,X509_get_notAfter(x))) goto err;
 | 
			
		||||
		if (BIO_write(bp,"\n",1) <= 0) goto err;
 | 
			
		||||
		}
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_SUBJECT))
 | 
			
		||||
		{
 | 
			
		||||
		if (BIO_printf(bp,"        Subject:%c",mlch) <= 0) goto err;
 | 
			
		||||
		if (!X509_NAME_print_ex(bp,X509_get_subject_name(x),nmindent, nmflags)) goto err;
 | 
			
		||||
		}
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_PUBKEY))
 | 
			
		||||
		{
 | 
			
		||||
		if (BIO_write(bp,"\n        Subject Public Key Info:\n",34) <= 0)
 | 
			
		||||
			goto err;
 | 
			
		||||
		i=OBJ_obj2nid(ci->key->algor->algorithm);
 | 
			
		||||
		if (BIO_printf(bp,"%12sPublic Key Algorithm: %s\n","",
 | 
			
		||||
			(i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)) <= 0) goto err;
 | 
			
		||||
	if (BIO_write(bp,"        Issuer: ",16) <= 0) goto err;
 | 
			
		||||
	if (!X509_NAME_print(bp,X509_get_issuer_name(x),16)) goto err;
 | 
			
		||||
	if (BIO_write(bp,"\n        Validity\n",18) <= 0) goto err;
 | 
			
		||||
	if (BIO_write(bp,"            Not Before: ",24) <= 0) goto err;
 | 
			
		||||
	if (!ASN1_TIME_print(bp,X509_get_notBefore(x))) goto err;
 | 
			
		||||
	if (BIO_write(bp,"\n            Not After : ",25) <= 0) goto err;
 | 
			
		||||
	if (!ASN1_TIME_print(bp,X509_get_notAfter(x))) goto err;
 | 
			
		||||
	if (BIO_write(bp,"\n        Subject: ",18) <= 0) goto err;
 | 
			
		||||
	if (!X509_NAME_print(bp,X509_get_subject_name(x),16)) goto err;
 | 
			
		||||
	if (BIO_write(bp,"\n        Subject Public Key Info:\n",34) <= 0)
 | 
			
		||||
		goto err;
 | 
			
		||||
	i=OBJ_obj2nid(ci->key->algor->algorithm);
 | 
			
		||||
	if (BIO_printf(bp,"%12sPublic Key Algorithm: %s\n","",
 | 
			
		||||
		(i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)) <= 0) goto err;
 | 
			
		||||
 | 
			
		||||
		pkey=X509_get_pubkey(x);
 | 
			
		||||
		if (pkey == NULL)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bp,"%12sUnable to load Public Key\n","");
 | 
			
		||||
			ERR_print_errors(bp);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
	pkey=X509_get_pubkey(x);
 | 
			
		||||
	if (pkey == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bp,"%12sUnable to load Public Key\n","");
 | 
			
		||||
		ERR_print_errors(bp);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
#ifndef NO_RSA
 | 
			
		||||
		if (pkey->type == EVP_PKEY_RSA)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bp,"%12sRSA Public Key: (%d bit)\n","",
 | 
			
		||||
			BN_num_bits(pkey->pkey.rsa->n));
 | 
			
		||||
			RSA_print(bp,pkey->pkey.rsa,16);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
	if (pkey->type == EVP_PKEY_RSA)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bp,"%12sRSA Public Key: (%d bit)\n","",
 | 
			
		||||
		BN_num_bits(pkey->pkey.rsa->n));
 | 
			
		||||
		RSA_print(bp,pkey->pkey.rsa,16);
 | 
			
		||||
		}
 | 
			
		||||
	else
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_DSA
 | 
			
		||||
		if (pkey->type == EVP_PKEY_DSA)
 | 
			
		||||
			{
 | 
			
		||||
			BIO_printf(bp,"%12sDSA Public Key:\n","");
 | 
			
		||||
			DSA_print(bp,pkey->pkey.dsa,16);
 | 
			
		||||
			}
 | 
			
		||||
		else
 | 
			
		||||
#endif
 | 
			
		||||
			BIO_printf(bp,"%12sUnknown Public Key:\n","");
 | 
			
		||||
 | 
			
		||||
		EVP_PKEY_free(pkey);
 | 
			
		||||
	if (pkey->type == EVP_PKEY_DSA)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bp,"%12sDSA Public Key:\n","");
 | 
			
		||||
		DSA_print(bp,pkey->pkey.dsa,16);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if (cflag & X509_FLAG_NO_EXTENSIONS)
 | 
			
		||||
		n = 0;
 | 
			
		||||
	else
 | 
			
		||||
		n=X509_get_ext_count(x);
 | 
			
		||||
#endif
 | 
			
		||||
		BIO_printf(bp,"%12sUnknown Public Key:\n","");
 | 
			
		||||
 | 
			
		||||
	EVP_PKEY_free(pkey);
 | 
			
		||||
 | 
			
		||||
	n=X509_get_ext_count(x);
 | 
			
		||||
	if (n > 0)
 | 
			
		||||
		{
 | 
			
		||||
		BIO_printf(bp,"%8sX509v3 extensions:\n","");
 | 
			
		||||
@@ -245,7 +196,7 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag)
 | 
			
		||||
			j=X509_EXTENSION_get_critical(ex);
 | 
			
		||||
			if (BIO_printf(bp,": %s\n",j?"critical":"","") <= 0)
 | 
			
		||||
				goto err;
 | 
			
		||||
			if(!X509V3_EXT_print(bp, ex, cflag, 16))
 | 
			
		||||
			if(!X509V3_EXT_print(bp, ex, 0, 16))
 | 
			
		||||
				{
 | 
			
		||||
				BIO_printf(bp, "%16s", "");
 | 
			
		||||
				M_ASN1_OCTET_STRING_print(bp,ex->value);
 | 
			
		||||
@@ -254,27 +205,21 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_SIGDUMP))
 | 
			
		||||
		{
 | 
			
		||||
		i=OBJ_obj2nid(x->sig_alg->algorithm);
 | 
			
		||||
		if (BIO_printf(bp,"%4sSignature Algorithm: %s","",
 | 
			
		||||
			(i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)) <= 0) goto err;
 | 
			
		||||
	i=OBJ_obj2nid(x->sig_alg->algorithm);
 | 
			
		||||
	if (BIO_printf(bp,"%4sSignature Algorithm: %s","",
 | 
			
		||||
		(i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)) <= 0) goto err;
 | 
			
		||||
 | 
			
		||||
		n=x->signature->length;
 | 
			
		||||
		s=(char *)x->signature->data;
 | 
			
		||||
		for (i=0; i<n; i++)
 | 
			
		||||
			{
 | 
			
		||||
			if ((i%18) == 0)
 | 
			
		||||
				if (BIO_write(bp,"\n        ",9) <= 0) goto err;
 | 
			
		||||
			if (BIO_printf(bp,"%02x%s",(unsigned char)s[i],
 | 
			
		||||
				((i+1) == n)?"":":") <= 0) goto err;
 | 
			
		||||
			}
 | 
			
		||||
		if (BIO_write(bp,"\n",1) != 1) goto err;
 | 
			
		||||
		}
 | 
			
		||||
	if(!(cflag & X509_FLAG_NO_AUX))
 | 
			
		||||
	n=x->signature->length;
 | 
			
		||||
	s=(char *)x->signature->data;
 | 
			
		||||
	for (i=0; i<n; i++)
 | 
			
		||||
		{
 | 
			
		||||
		if (!X509_CERT_AUX_print(bp, x->aux, 0)) goto err;
 | 
			
		||||
		if ((i%18) == 0)
 | 
			
		||||
			if (BIO_write(bp,"\n        ",9) <= 0) goto err;
 | 
			
		||||
		if (BIO_printf(bp,"%02x%s",(unsigned char)s[i],
 | 
			
		||||
			((i+1) == n)?"":":") <= 0) goto err;
 | 
			
		||||
		}
 | 
			
		||||
	if (BIO_write(bp,"\n",1) != 1) goto err;
 | 
			
		||||
	if (!X509_CERT_AUX_print(bp, x->aux, 0)) goto err;
 | 
			
		||||
	ret=1;
 | 
			
		||||
err:
 | 
			
		||||
	if (str != NULL) ASN1_STRING_free(str);
 | 
			
		||||
 
 | 
			
		||||
@@ -44,8 +44,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
# elf
 | 
			
		||||
 
 | 
			
		||||
@@ -49,8 +49,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -113,8 +113,8 @@ int BIO_get_host_ip(const char *str, unsigned char *ip)
 | 
			
		||||
 | 
			
		||||
	/* At this point, we have something that is most probably correct
 | 
			
		||||
	   in some way, so let's init the socket. */
 | 
			
		||||
	if (BIO_sock_init() != 1)
 | 
			
		||||
		return 0; /* don't generate another error code here */
 | 
			
		||||
	if (!BIO_sock_init())
 | 
			
		||||
		return(0); /* don't generate another error code here */
 | 
			
		||||
 | 
			
		||||
	/* If the string actually contained an IP address, we need not do
 | 
			
		||||
	   anything more */
 | 
			
		||||
@@ -527,7 +527,7 @@ int BIO_get_accept_socket(char *host, int bind_mode)
 | 
			
		||||
	unsigned long l;
 | 
			
		||||
	int err_num;
 | 
			
		||||
 | 
			
		||||
	if (BIO_sock_init() != 1) return(INVALID_SOCKET);
 | 
			
		||||
	if (!BIO_sock_init()) return(INVALID_SOCKET);
 | 
			
		||||
 | 
			
		||||
	if ((str=BUF_strdup(host)) == NULL) return(INVALID_SOCKET);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -68,8 +68,7 @@ bnbug: bnbug.c ../../libcrypto.a top
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
# elf
 | 
			
		||||
 
 | 
			
		||||
@@ -1611,7 +1611,7 @@ bn_mul_comba4
 | 
			
		||||
	.IMPORT	$global$,DATA
 | 
			
		||||
	.SPACE	$TEXT$
 | 
			
		||||
	.SUBSPA	$CODE$
 | 
			
		||||
	.SUBSPA	$LIT$,ACCESS=0x2c
 | 
			
		||||
	.SUBSPA	$LIT$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=16
 | 
			
		||||
C$7
 | 
			
		||||
	.ALIGN	8
 | 
			
		||||
	.STRINGZ	"Division would overflow (%d)\n"
 | 
			
		||||
 
 | 
			
		||||
@@ -1598,7 +1598,7 @@ bn_mul_comba4
 | 
			
		||||
	.IMPORT	$global$,DATA
 | 
			
		||||
	.SPACE	$TEXT$
 | 
			
		||||
	.SUBSPA	$CODE$
 | 
			
		||||
	.SUBSPA	$LIT$,ACCESS=0x2c
 | 
			
		||||
	.SUBSPA	$LIT$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=16
 | 
			
		||||
C$4
 | 
			
		||||
	.ALIGN	8
 | 
			
		||||
	.STRINGZ	"Division would overflow (%d)\n"
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -47,8 +47,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
# elf
 | 
			
		||||
 
 | 
			
		||||
@@ -42,8 +42,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -40,8 +40,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -57,8 +57,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
des: des.o cbc3_enc.o lib
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -41,8 +41,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -41,8 +41,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -206,35 +206,40 @@ void ERR_load_DSO_strings(void);
 | 
			
		||||
/* Function codes. */
 | 
			
		||||
#define DSO_F_DLFCN_BIND_FUNC				 100
 | 
			
		||||
#define DSO_F_DLFCN_BIND_VAR				 101
 | 
			
		||||
#define DSO_F_DLFCN_LOAD				 102
 | 
			
		||||
#define DSO_F_DLFCN_UNLOAD				 103
 | 
			
		||||
#define DSO_F_DL_BIND_FUNC				 104
 | 
			
		||||
#define DSO_F_DL_BIND_VAR				 105
 | 
			
		||||
#define DSO_F_DL_LOAD					 106
 | 
			
		||||
#define DSO_F_DL_UNLOAD					 107
 | 
			
		||||
#define DSO_F_DSO_BIND_FUNC				 108
 | 
			
		||||
#define DSO_F_DSO_BIND_VAR				 109
 | 
			
		||||
#define DSO_F_DSO_CTRL					 110
 | 
			
		||||
#define DSO_F_DSO_FREE					 111
 | 
			
		||||
#define DSO_F_DSO_LOAD					 112
 | 
			
		||||
#define DSO_F_DSO_NEW_METHOD				 113
 | 
			
		||||
#define DSO_F_DSO_UP					 114
 | 
			
		||||
#define DSO_F_VMS_BIND_VAR				 115
 | 
			
		||||
#define DSO_F_VMS_LOAD					 116
 | 
			
		||||
#define DSO_F_VMS_UNLOAD				 117
 | 
			
		||||
#define DSO_F_WIN32_BIND_FUNC				 118
 | 
			
		||||
#define DSO_F_WIN32_BIND_VAR				 119
 | 
			
		||||
#define DSO_F_DLFCN_CTRL				 102
 | 
			
		||||
#define DSO_F_DLFCN_LOAD				 103
 | 
			
		||||
#define DSO_F_DLFCN_UNLOAD				 104
 | 
			
		||||
#define DSO_F_DL_BIND_FUNC				 105
 | 
			
		||||
#define DSO_F_DL_BIND_VAR				 106
 | 
			
		||||
#define DSO_F_DL_CTRL					 107
 | 
			
		||||
#define DSO_F_DL_LOAD					 108
 | 
			
		||||
#define DSO_F_DL_UNLOAD					 109
 | 
			
		||||
#define DSO_F_DSO_BIND_FUNC				 110
 | 
			
		||||
#define DSO_F_DSO_BIND_VAR				 111
 | 
			
		||||
#define DSO_F_DSO_CTRL					 112
 | 
			
		||||
#define DSO_F_DSO_FREE					 113
 | 
			
		||||
#define DSO_F_DSO_LOAD					 114
 | 
			
		||||
#define DSO_F_DSO_NEW_METHOD				 115
 | 
			
		||||
#define DSO_F_DSO_UP					 116
 | 
			
		||||
#define DSO_F_VMS_BIND_VAR				 122
 | 
			
		||||
#define DSO_F_VMS_CTRL					 123
 | 
			
		||||
#define DSO_F_VMS_LOAD					 124
 | 
			
		||||
#define DSO_F_VMS_UNLOAD				 125
 | 
			
		||||
#define DSO_F_WIN32_BIND_FUNC				 117
 | 
			
		||||
#define DSO_F_WIN32_BIND_VAR				 118
 | 
			
		||||
#define DSO_F_WIN32_CTRL				 119
 | 
			
		||||
#define DSO_F_WIN32_LOAD				 120
 | 
			
		||||
#define DSO_F_WIN32_UNLOAD				 121
 | 
			
		||||
 | 
			
		||||
/* Reason codes. */
 | 
			
		||||
#define DSO_R_CTRL_FAILED				 100
 | 
			
		||||
#define DSO_R_FILENAME_TOO_BIG				 101
 | 
			
		||||
#define DSO_R_FINISH_FAILED				 102
 | 
			
		||||
#define DSO_R_LOAD_FAILED				 103
 | 
			
		||||
#define DSO_R_NULL_HANDLE				 104
 | 
			
		||||
#define DSO_R_STACK_ERROR				 105
 | 
			
		||||
#define DSO_R_SYM_FAILURE				 106
 | 
			
		||||
#define DSO_R_FILENAME_TOO_BIG				 109
 | 
			
		||||
#define DSO_R_FINISH_FAILED				 101
 | 
			
		||||
#define DSO_R_LOAD_FAILED				 102
 | 
			
		||||
#define DSO_R_NULL_HANDLE				 103
 | 
			
		||||
#define DSO_R_STACK_ERROR				 104
 | 
			
		||||
#define DSO_R_SYM_FAILURE				 105
 | 
			
		||||
#define DSO_R_UNKNOWN_COMMAND				 106
 | 
			
		||||
#define DSO_R_UNLOAD_FAILED				 107
 | 
			
		||||
#define DSO_R_UNSUPPORTED				 108
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -81,8 +81,8 @@ static int dl_unbind_var(DSO *dso, char *symname, void *symptr);
 | 
			
		||||
static int dl_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr);
 | 
			
		||||
static int dl_init(DSO *dso);
 | 
			
		||||
static int dl_finish(DSO *dso);
 | 
			
		||||
static int dl_ctrl(DSO *dso, int cmd, long larg, void *parg);
 | 
			
		||||
#endif
 | 
			
		||||
static int dl_ctrl(DSO *dso, int cmd, long larg, void *parg);
 | 
			
		||||
 | 
			
		||||
static DSO_METHOD dso_meth_dl = {
 | 
			
		||||
	"OpenSSL 'dl' shared library method",
 | 
			
		||||
@@ -95,7 +95,7 @@ static DSO_METHOD dso_meth_dl = {
 | 
			
		||||
	NULL, /* unbind_var */
 | 
			
		||||
	NULL, /* unbind_func */
 | 
			
		||||
#endif
 | 
			
		||||
	NULL, /* ctrl */
 | 
			
		||||
	dl_ctrl,
 | 
			
		||||
	NULL, /* init */
 | 
			
		||||
	NULL  /* finish */
 | 
			
		||||
	};
 | 
			
		||||
@@ -224,4 +224,28 @@ static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname)
 | 
			
		||||
	return((DSO_FUNC_TYPE)sym);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static int dl_ctrl(DSO *dso, int cmd, long larg, void *parg)
 | 
			
		||||
	{
 | 
			
		||||
	if(dso == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		DSOerr(DSO_F_DL_CTRL,ERR_R_PASSED_NULL_PARAMETER);
 | 
			
		||||
		return(-1);
 | 
			
		||||
		}
 | 
			
		||||
	switch(cmd)
 | 
			
		||||
		{
 | 
			
		||||
	case DSO_CTRL_GET_FLAGS:
 | 
			
		||||
		return dso->flags;
 | 
			
		||||
	case DSO_CTRL_SET_FLAGS:
 | 
			
		||||
		dso->flags = (int)larg;
 | 
			
		||||
		return(0);
 | 
			
		||||
	case DSO_CTRL_OR_FLAGS:
 | 
			
		||||
		dso->flags |= (int)larg;
 | 
			
		||||
		return(0);
 | 
			
		||||
	default:
 | 
			
		||||
		break;
 | 
			
		||||
		}
 | 
			
		||||
	DSOerr(DSO_F_DL_CTRL,DSO_R_UNKNOWN_COMMAND);
 | 
			
		||||
	return(-1);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#endif /* DSO_DL */
 | 
			
		||||
 
 | 
			
		||||
@@ -82,8 +82,8 @@ static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname);
 | 
			
		||||
static int dlfcn_unbind(DSO *dso, char *symname, void *symptr);
 | 
			
		||||
static int dlfcn_init(DSO *dso);
 | 
			
		||||
static int dlfcn_finish(DSO *dso);
 | 
			
		||||
static long dlfcn_ctrl(DSO *dso, int cmd, long larg, void *parg);
 | 
			
		||||
#endif
 | 
			
		||||
static long dlfcn_ctrl(DSO *dso, int cmd, long larg, void *parg);
 | 
			
		||||
 | 
			
		||||
static DSO_METHOD dso_meth_dlfcn = {
 | 
			
		||||
	"OpenSSL 'dlfcn' shared library method",
 | 
			
		||||
@@ -96,7 +96,7 @@ static DSO_METHOD dso_meth_dlfcn = {
 | 
			
		||||
	NULL, /* unbind_var */
 | 
			
		||||
	NULL, /* unbind_func */
 | 
			
		||||
#endif
 | 
			
		||||
	NULL, /* ctrl */
 | 
			
		||||
	dlfcn_ctrl,
 | 
			
		||||
	NULL, /* init */
 | 
			
		||||
	NULL  /* finish */
 | 
			
		||||
	};
 | 
			
		||||
@@ -249,4 +249,28 @@ static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname)
 | 
			
		||||
	return(sym);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static long dlfcn_ctrl(DSO *dso, int cmd, long larg, void *parg)
 | 
			
		||||
	{
 | 
			
		||||
	if(dso == NULL)
 | 
			
		||||
		{
 | 
			
		||||
		DSOerr(DSO_F_DLFCN_CTRL,ERR_R_PASSED_NULL_PARAMETER);
 | 
			
		||||
		return(-1);
 | 
			
		||||
		}
 | 
			
		||||
	switch(cmd)
 | 
			
		||||
		{
 | 
			
		||||
	case DSO_CTRL_GET_FLAGS:
 | 
			
		||||
		return dso->flags;
 | 
			
		||||
	case DSO_CTRL_SET_FLAGS:
 | 
			
		||||
		dso->flags = (int)larg;
 | 
			
		||||
		return(0);
 | 
			
		||||
	case DSO_CTRL_OR_FLAGS:
 | 
			
		||||
		dso->flags |= (int)larg;
 | 
			
		||||
		return(0);
 | 
			
		||||
	default:
 | 
			
		||||
		break;
 | 
			
		||||
		}
 | 
			
		||||
	DSOerr(DSO_F_DLFCN_CTRL,DSO_R_UNKNOWN_COMMAND);
 | 
			
		||||
	return(-1);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#endif /* DSO_DLFCN */
 | 
			
		||||
 
 | 
			
		||||
@@ -68,10 +68,12 @@ static ERR_STRING_DATA DSO_str_functs[]=
 | 
			
		||||
	{
 | 
			
		||||
{ERR_PACK(0,DSO_F_DLFCN_BIND_FUNC,0),	"DLFCN_BIND_FUNC"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_DLFCN_BIND_VAR,0),	"DLFCN_BIND_VAR"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_DLFCN_CTRL,0),	"DLFCN_CTRL"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_DLFCN_LOAD,0),	"DLFCN_LOAD"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_DLFCN_UNLOAD,0),	"DLFCN_UNLOAD"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_DL_BIND_FUNC,0),	"DL_BIND_FUNC"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_DL_BIND_VAR,0),	"DL_BIND_VAR"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_DL_CTRL,0),	"DL_CTRL"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_DL_LOAD,0),	"DL_LOAD"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_DL_UNLOAD,0),	"DL_UNLOAD"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_DSO_BIND_FUNC,0),	"DSO_bind_func"},
 | 
			
		||||
@@ -82,10 +84,12 @@ static ERR_STRING_DATA DSO_str_functs[]=
 | 
			
		||||
{ERR_PACK(0,DSO_F_DSO_NEW_METHOD,0),	"DSO_new_method"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_DSO_UP,0),	"DSO_up"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_VMS_BIND_VAR,0),	"VMS_BIND_VAR"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_VMS_CTRL,0),	"VMS_CTRL"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_VMS_LOAD,0),	"VMS_LOAD"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_VMS_UNLOAD,0),	"VMS_UNLOAD"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_WIN32_BIND_FUNC,0),	"WIN32_BIND_FUNC"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_WIN32_BIND_VAR,0),	"WIN32_BIND_VAR"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_WIN32_CTRL,0),	"WIN32_CTRL"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_WIN32_LOAD,0),	"WIN32_LOAD"},
 | 
			
		||||
{ERR_PACK(0,DSO_F_WIN32_UNLOAD,0),	"WIN32_UNLOAD"},
 | 
			
		||||
{0,NULL}
 | 
			
		||||
@@ -100,6 +104,7 @@ static ERR_STRING_DATA DSO_str_reasons[]=
 | 
			
		||||
{DSO_R_NULL_HANDLE                       ,"a null shared library handle was used"},
 | 
			
		||||
{DSO_R_STACK_ERROR                       ,"the meth_data stack is corrupt"},
 | 
			
		||||
{DSO_R_SYM_FAILURE                       ,"could not bind to the requested symbol name"},
 | 
			
		||||
{DSO_R_UNKNOWN_COMMAND                   ,"unknown control command"},
 | 
			
		||||
{DSO_R_UNLOAD_FAILED                     ,"could not unload the shared library"},
 | 
			
		||||
{DSO_R_UNSUPPORTED                       ,"functionality not supported"},
 | 
			
		||||
{0,NULL}
 | 
			
		||||
 
 | 
			
		||||
@@ -297,22 +297,6 @@ long DSO_ctrl(DSO *dso, int cmd, long larg, void *parg)
 | 
			
		||||
		DSOerr(DSO_F_DSO_CTRL,ERR_R_PASSED_NULL_PARAMETER);
 | 
			
		||||
		return(-1);
 | 
			
		||||
		}
 | 
			
		||||
	/* We should intercept certain generic commands and only pass control
 | 
			
		||||
	 * to the method-specific ctrl() function if it's something we don't
 | 
			
		||||
	 * handle. */
 | 
			
		||||
	switch(cmd)
 | 
			
		||||
		{
 | 
			
		||||
	case DSO_CTRL_GET_FLAGS:
 | 
			
		||||
		return dso->flags;
 | 
			
		||||
	case DSO_CTRL_SET_FLAGS:
 | 
			
		||||
		dso->flags = (int)larg;
 | 
			
		||||
		return(0);
 | 
			
		||||
	case DSO_CTRL_OR_FLAGS:
 | 
			
		||||
		dso->flags |= (int)larg;
 | 
			
		||||
		return(0);
 | 
			
		||||
	default:
 | 
			
		||||
		break;
 | 
			
		||||
		}
 | 
			
		||||
	if((dso->meth == NULL) || (dso->meth->dso_ctrl == NULL))
 | 
			
		||||
		{
 | 
			
		||||
		DSOerr(DSO_F_DSO_CTRL,DSO_R_UNSUPPORTED);
 | 
			
		||||
 
 | 
			
		||||
@@ -87,8 +87,8 @@ static int vms_unbind_var(DSO *dso, char *symname, void *symptr);
 | 
			
		||||
static int vms_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr);
 | 
			
		||||
static int vms_init(DSO *dso);
 | 
			
		||||
static int vms_finish(DSO *dso);
 | 
			
		||||
static long vms_ctrl(DSO *dso, int cmd, long larg, void *parg);
 | 
			
		||||
#endif
 | 
			
		||||
static long vms_ctrl(DSO *dso, int cmd, long larg, void *parg);
 | 
			
		||||
 | 
			
		||||
static DSO_METHOD dso_meth_vms = {
 | 
			
		||||
	"OpenSSL 'VMS' shared library method",
 | 
			
		||||
@@ -101,7 +101,7 @@ static DSO_METHOD dso_meth_vms = {
 | 
			
		||||
	NULL, /* unbind_var */
 | 
			
		||||
	NULL, /* unbind_func */
 | 
			
		||||
#endif
 | 
			
		||||
	NULL, /* ctrl */
 | 
			
		||||
	vms_ctrl,
 | 
			
		||||
	NULL, /* init */
 | 
			
		||||
	NULL  /* finish */
 | 
			
		||||
	};
 | 
			
		||||
@@ -344,4 +344,28 @@ static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname)
 | 
			
		||||
	return sym;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static long vms_ctrl(DSO *dso, int cmd, long larg, void *parg)
 | 
			
		||||
        {
 | 
			
		||||
        if(dso == NULL)
 | 
			
		||||
                {
 | 
			
		||||
                DSOerr(DSO_F_VMS_CTRL,ERR_R_PASSED_NULL_PARAMETER);
 | 
			
		||||
                return(-1);
 | 
			
		||||
                }
 | 
			
		||||
        switch(cmd)
 | 
			
		||||
                {
 | 
			
		||||
        case DSO_CTRL_GET_FLAGS:
 | 
			
		||||
                return dso->flags;
 | 
			
		||||
        case DSO_CTRL_SET_FLAGS:
 | 
			
		||||
                dso->flags = (int)larg;
 | 
			
		||||
                return(0);
 | 
			
		||||
        case DSO_CTRL_OR_FLAGS:
 | 
			
		||||
                dso->flags |= (int)larg;
 | 
			
		||||
                return(0);
 | 
			
		||||
        default:
 | 
			
		||||
                break;
 | 
			
		||||
                }
 | 
			
		||||
        DSOerr(DSO_F_VMS_CTRL,DSO_R_UNKNOWN_COMMAND);
 | 
			
		||||
        return(-1);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
#endif /* VMS */
 | 
			
		||||
 
 | 
			
		||||
@@ -80,8 +80,8 @@ static int win32_unbind_var(DSO *dso, char *symname, void *symptr);
 | 
			
		||||
static int win32_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr);
 | 
			
		||||
static int win32_init(DSO *dso);
 | 
			
		||||
static int win32_finish(DSO *dso);
 | 
			
		||||
static long win32_ctrl(DSO *dso, int cmd, long larg, void *parg);
 | 
			
		||||
#endif
 | 
			
		||||
static long win32_ctrl(DSO *dso, int cmd, long larg, void *parg);
 | 
			
		||||
 | 
			
		||||
static DSO_METHOD dso_meth_win32 = {
 | 
			
		||||
	"OpenSSL 'win32' shared library method",
 | 
			
		||||
@@ -94,7 +94,7 @@ static DSO_METHOD dso_meth_win32 = {
 | 
			
		||||
	NULL, /* unbind_var */
 | 
			
		||||
	NULL, /* unbind_func */
 | 
			
		||||
#endif
 | 
			
		||||
	NULL, /* ctrl */
 | 
			
		||||
	win32_ctrl,
 | 
			
		||||
	NULL, /* init */
 | 
			
		||||
	NULL  /* finish */
 | 
			
		||||
	};
 | 
			
		||||
@@ -246,4 +246,28 @@ static DSO_FUNC_TYPE win32_bind_func(DSO *dso, const char *symname)
 | 
			
		||||
	return((DSO_FUNC_TYPE)sym);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
static long win32_ctrl(DSO *dso, int cmd, long larg, void *parg)
 | 
			
		||||
        {
 | 
			
		||||
        if(dso == NULL)
 | 
			
		||||
                {
 | 
			
		||||
                DSOerr(DSO_F_WIN32_CTRL,ERR_R_PASSED_NULL_PARAMETER);
 | 
			
		||||
                return(-1);
 | 
			
		||||
                }
 | 
			
		||||
        switch(cmd)
 | 
			
		||||
                {
 | 
			
		||||
        case DSO_CTRL_GET_FLAGS:
 | 
			
		||||
                return dso->flags;
 | 
			
		||||
        case DSO_CTRL_SET_FLAGS:
 | 
			
		||||
                dso->flags = (int)larg;
 | 
			
		||||
                return(0);
 | 
			
		||||
        case DSO_CTRL_OR_FLAGS:
 | 
			
		||||
                dso->flags |= (int)larg;
 | 
			
		||||
                return(0);
 | 
			
		||||
        default:
 | 
			
		||||
                break;
 | 
			
		||||
                }
 | 
			
		||||
        DSOerr(DSO_F_WIN32_CTRL,DSO_R_UNKNOWN_COMMAND);
 | 
			
		||||
        return(-1);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
#endif /* WIN32 */
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -58,8 +58,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -463,20 +463,12 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
 | 
			
		||||
		ASN1_TYPE *param, EVP_CIPHER *cipher,
 | 
			
		||||
                EVP_MD *md, int en_de);
 | 
			
		||||
 | 
			
		||||
#ifndef NO_RSA
 | 
			
		||||
#define EVP_PKEY_assign_RSA(pkey,rsa) EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\
 | 
			
		||||
					(char *)(rsa))
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef NO_DSA
 | 
			
		||||
#define EVP_PKEY_assign_DSA(pkey,dsa) EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\
 | 
			
		||||
					(char *)(dsa))
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef NO_DH
 | 
			
		||||
#define EVP_PKEY_assign_DH(pkey,dh) EVP_PKEY_assign((pkey),EVP_PKEY_DH,\
 | 
			
		||||
					(char *)(dh))
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* Add some extra combinations */
 | 
			
		||||
#define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a))
 | 
			
		||||
@@ -620,29 +612,17 @@ void BIO_set_cipher(BIO *b,const EVP_CIPHER *c,unsigned char *k,
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
EVP_MD *EVP_md_null(void);
 | 
			
		||||
#ifndef NO_MD2
 | 
			
		||||
EVP_MD *EVP_md2(void);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_MD4
 | 
			
		||||
EVP_MD *EVP_md4(void);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_MD5
 | 
			
		||||
EVP_MD *EVP_md5(void);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_SHA
 | 
			
		||||
EVP_MD *EVP_sha(void);
 | 
			
		||||
EVP_MD *EVP_sha1(void);
 | 
			
		||||
EVP_MD *EVP_dss(void);
 | 
			
		||||
EVP_MD *EVP_dss1(void);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_MDC2
 | 
			
		||||
EVP_MD *EVP_mdc2(void);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_RIPEMD
 | 
			
		||||
EVP_MD *EVP_ripemd160(void);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
EVP_CIPHER *EVP_enc_null(void);		/* does nothing :-) */
 | 
			
		||||
#ifndef NO_DES
 | 
			
		||||
EVP_CIPHER *EVP_des_ecb(void);
 | 
			
		||||
EVP_CIPHER *EVP_des_ede(void);
 | 
			
		||||
EVP_CIPHER *EVP_des_ede3(void);
 | 
			
		||||
@@ -656,43 +636,31 @@ EVP_CIPHER *EVP_des_cbc(void);
 | 
			
		||||
EVP_CIPHER *EVP_des_ede_cbc(void);
 | 
			
		||||
EVP_CIPHER *EVP_des_ede3_cbc(void);
 | 
			
		||||
EVP_CIPHER *EVP_desx_cbc(void);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_RC4
 | 
			
		||||
EVP_CIPHER *EVP_rc4(void);
 | 
			
		||||
EVP_CIPHER *EVP_rc4_40(void);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_IDEA
 | 
			
		||||
EVP_CIPHER *EVP_idea_ecb(void);
 | 
			
		||||
EVP_CIPHER *EVP_idea_cfb(void);
 | 
			
		||||
EVP_CIPHER *EVP_idea_ofb(void);
 | 
			
		||||
EVP_CIPHER *EVP_idea_cbc(void);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_RC2
 | 
			
		||||
EVP_CIPHER *EVP_rc2_ecb(void);
 | 
			
		||||
EVP_CIPHER *EVP_rc2_cbc(void);
 | 
			
		||||
EVP_CIPHER *EVP_rc2_40_cbc(void);
 | 
			
		||||
EVP_CIPHER *EVP_rc2_64_cbc(void);
 | 
			
		||||
EVP_CIPHER *EVP_rc2_cfb(void);
 | 
			
		||||
EVP_CIPHER *EVP_rc2_ofb(void);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_BF
 | 
			
		||||
EVP_CIPHER *EVP_bf_ecb(void);
 | 
			
		||||
EVP_CIPHER *EVP_bf_cbc(void);
 | 
			
		||||
EVP_CIPHER *EVP_bf_cfb(void);
 | 
			
		||||
EVP_CIPHER *EVP_bf_ofb(void);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_CAST
 | 
			
		||||
EVP_CIPHER *EVP_cast5_ecb(void);
 | 
			
		||||
EVP_CIPHER *EVP_cast5_cbc(void);
 | 
			
		||||
EVP_CIPHER *EVP_cast5_cfb(void);
 | 
			
		||||
EVP_CIPHER *EVP_cast5_ofb(void);
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef NO_RC5
 | 
			
		||||
EVP_CIPHER *EVP_rc5_32_12_16_cbc(void);
 | 
			
		||||
EVP_CIPHER *EVP_rc5_32_12_16_ecb(void);
 | 
			
		||||
EVP_CIPHER *EVP_rc5_32_12_16_cfb(void);
 | 
			
		||||
EVP_CIPHER *EVP_rc5_32_12_16_ofb(void);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
void OpenSSL_add_all_algorithms(void);
 | 
			
		||||
void OpenSSL_add_all_ciphers(void);
 | 
			
		||||
void OpenSSL_add_all_digests(void);
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -40,8 +40,7 @@ all:    lib
 | 
			
		||||
 | 
			
		||||
lib:    $(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -50,8 +50,7 @@ all:    lib
 | 
			
		||||
 | 
			
		||||
lib:    $(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
# elf
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,7 @@ all:	obj_dat.h lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -25,8 +25,8 @@
 | 
			
		||||
 * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
 | 
			
		||||
 *  major minor fix final patch/beta)
 | 
			
		||||
 */
 | 
			
		||||
#define OPENSSL_VERSION_NUMBER	0x00907000L
 | 
			
		||||
#define OPENSSL_VERSION_TEXT	"OpenSSL 0.9.7-dev 24 Sep 2000"
 | 
			
		||||
#define OPENSSL_VERSION_NUMBER	0x0090600fL
 | 
			
		||||
#define OPENSSL_VERSION_TEXT	"OpenSSL 0.9.6 24 Sep 2000"
 | 
			
		||||
#define OPENSSL_VERSION_PTEXT	" part of " OPENSSL_VERSION_TEXT
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -40,8 +40,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -45,8 +45,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -58,8 +58,7 @@ verify: verify.o example.o lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -47,8 +47,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
# elf
 | 
			
		||||
 
 | 
			
		||||
@@ -44,8 +44,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
# elf
 | 
			
		||||
 
 | 
			
		||||
@@ -42,8 +42,7 @@ all:    lib
 | 
			
		||||
 | 
			
		||||
lib:    $(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
# elf
 | 
			
		||||
 
 | 
			
		||||
@@ -41,8 +41,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -42,8 +42,7 @@ all:    lib
 | 
			
		||||
 | 
			
		||||
lib:    $(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
# elf
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -49,8 +49,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -320,21 +320,6 @@ DECLARE_STACK_OF(X509_TRUST)
 | 
			
		||||
#define X509_TRUST_REJECTED	2
 | 
			
		||||
#define X509_TRUST_UNTRUSTED	3
 | 
			
		||||
 | 
			
		||||
/* Flags for X509_print_ex() */
 | 
			
		||||
 | 
			
		||||
#define	X509_FLAG_COMPAT		0
 | 
			
		||||
#define	X509_FLAG_NO_HEADER		1L
 | 
			
		||||
#define	X509_FLAG_NO_VERSION		(1L << 1)
 | 
			
		||||
#define	X509_FLAG_NO_SERIAL		(1L << 2)
 | 
			
		||||
#define	X509_FLAG_NO_SIGNAME		(1L << 3)
 | 
			
		||||
#define	X509_FLAG_NO_ISSUER		(1L << 4)
 | 
			
		||||
#define	X509_FLAG_NO_VALIDITY		(1L << 5)
 | 
			
		||||
#define	X509_FLAG_NO_SUBJECT		(1L << 6)
 | 
			
		||||
#define	X509_FLAG_NO_PUBKEY		(1L << 7)
 | 
			
		||||
#define	X509_FLAG_NO_EXTENSIONS		(1L << 8)
 | 
			
		||||
#define	X509_FLAG_NO_SIGDUMP		(1L << 9)
 | 
			
		||||
#define	X509_FLAG_NO_AUX		(1L << 10)
 | 
			
		||||
 | 
			
		||||
/* Flags specific to X509_NAME_print_ex() */	
 | 
			
		||||
 | 
			
		||||
/* The field separator information */
 | 
			
		||||
@@ -1049,7 +1034,6 @@ unsigned long	X509_NAME_hash(X509_NAME *x);
 | 
			
		||||
 | 
			
		||||
int		X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
 | 
			
		||||
#ifndef NO_FP_API
 | 
			
		||||
int		X509_print_ex_fp(FILE *bp,X509 *x, unsigned long nmflag, unsigned long cflag);
 | 
			
		||||
int		X509_print_fp(FILE *bp,X509 *x);
 | 
			
		||||
int		X509_CRL_print_fp(FILE *bp,X509_CRL *x);
 | 
			
		||||
int		X509_REQ_print_fp(FILE *bp,X509_REQ *req);
 | 
			
		||||
@@ -1059,7 +1043,6 @@ int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long fla
 | 
			
		||||
#ifndef NO_BIO
 | 
			
		||||
int		X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
 | 
			
		||||
int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags);
 | 
			
		||||
int		X509_print_ex(BIO *bp,X509 *x, unsigned long nmflag, unsigned long cflag);
 | 
			
		||||
int		X509_print(BIO *bp,X509 *x);
 | 
			
		||||
int		X509_CERT_AUX_print(BIO *bp,X509_CERT_AUX *x, int indent);
 | 
			
		||||
int		X509_CRL_print(BIO *bp,X509_CRL *x);
 | 
			
		||||
 
 | 
			
		||||
@@ -43,8 +43,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -64,8 +64,6 @@
 | 
			
		||||
 | 
			
		||||
/* Extension printing routines */
 | 
			
		||||
 | 
			
		||||
static int unknown_ext_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent, int supported);
 | 
			
		||||
 | 
			
		||||
/* Print out a name+value stack */
 | 
			
		||||
 | 
			
		||||
void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, int ml)
 | 
			
		||||
@@ -98,18 +96,16 @@ void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, int ml)
 | 
			
		||||
 | 
			
		||||
/* Main routine: print out a general extension */
 | 
			
		||||
 | 
			
		||||
int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent)
 | 
			
		||||
int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, int flag, int indent)
 | 
			
		||||
{
 | 
			
		||||
	char *ext_str = NULL, *value = NULL;
 | 
			
		||||
	unsigned char *p;
 | 
			
		||||
	X509V3_EXT_METHOD *method;	
 | 
			
		||||
	STACK_OF(CONF_VALUE) *nval = NULL;
 | 
			
		||||
	int ok = 1;
 | 
			
		||||
	if(!(method = X509V3_EXT_get(ext)))
 | 
			
		||||
		return unknown_ext_print(out, ext, flag, indent, 0);
 | 
			
		||||
	if(!(method = X509V3_EXT_get(ext))) return 0;
 | 
			
		||||
	p = ext->value->data;
 | 
			
		||||
	if(!(ext_str = method->d2i(NULL, &p, ext->value->length)))
 | 
			
		||||
		return unknown_ext_print(out, ext, flag, indent, 1);
 | 
			
		||||
	if(!(ext_str = method->d2i(NULL, &p, ext->value->length))) return 0;
 | 
			
		||||
	if(method->i2s) {
 | 
			
		||||
		if(!(value = method->i2s(method, ext_str))) {
 | 
			
		||||
			ok = 0;
 | 
			
		||||
@@ -142,32 +138,6 @@ int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int inde
 | 
			
		||||
		return ok;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int unknown_ext_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent, int supported)
 | 
			
		||||
{
 | 
			
		||||
	switch(flag & X509V3_EXT_UNKNOWN_MASK) {
 | 
			
		||||
 | 
			
		||||
		case X509V3_EXT_DEFAULT:
 | 
			
		||||
		return 0;
 | 
			
		||||
 | 
			
		||||
		case X509V3_EXT_ERROR_UNKNOWN:
 | 
			
		||||
		if(supported)
 | 
			
		||||
			BIO_printf(out, "%*s<Parse Error>", indent, "");
 | 
			
		||||
		else
 | 
			
		||||
			BIO_printf(out, "%*s<Not Supported>", indent, "");
 | 
			
		||||
		return 1;
 | 
			
		||||
 | 
			
		||||
		case X509V3_EXT_PARSE_UNKNOWN:
 | 
			
		||||
			return ASN1_parse_dump(out,
 | 
			
		||||
				ext->value->data, ext->value->length, indent, -1);
 | 
			
		||||
		case X509V3_EXT_DUMP_UNKNOWN:
 | 
			
		||||
			return BIO_dump_indent(out, (char *)ext->value->data, ext->value->length, indent);
 | 
			
		||||
 | 
			
		||||
		default:
 | 
			
		||||
		return 1;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
#ifndef NO_FP_API
 | 
			
		||||
int X509V3_EXT_print_fp(FILE *fp, X509_EXTENSION *ext, int flag, int indent)
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -352,18 +352,6 @@ typedef struct x509_purpose_st {
 | 
			
		||||
#define X509_PURPOSE_MIN		1
 | 
			
		||||
#define X509_PURPOSE_MAX		7
 | 
			
		||||
 | 
			
		||||
/* Flags for X509V3_EXT_print() */
 | 
			
		||||
 | 
			
		||||
#define X509V3_EXT_UNKNOWN_MASK		(0xfL << 16)
 | 
			
		||||
/* Return error for unknown extensions */
 | 
			
		||||
#define X509V3_EXT_DEFAULT		0
 | 
			
		||||
/* Print error for unknown extensions */
 | 
			
		||||
#define X509V3_EXT_ERROR_UNKNOWN	(1L << 16)
 | 
			
		||||
/* ASN1 parse unknown extensions */
 | 
			
		||||
#define X509V3_EXT_PARSE_UNKNOWN	(2L << 16)
 | 
			
		||||
/* BIO_dump unknown extensions */
 | 
			
		||||
#define X509V3_EXT_DUMP_UNKNOWN		(3L << 16)
 | 
			
		||||
 | 
			
		||||
DECLARE_STACK_OF(X509_PURPOSE)
 | 
			
		||||
 | 
			
		||||
void ERR_load_X509V3_strings(void);
 | 
			
		||||
@@ -540,7 +528,7 @@ int name_cmp(const char *name, const char *cmp);
 | 
			
		||||
 | 
			
		||||
void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent,
 | 
			
		||||
								 int ml);
 | 
			
		||||
int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent);
 | 
			
		||||
int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, int flag, int indent);
 | 
			
		||||
int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent);
 | 
			
		||||
 | 
			
		||||
int X509_check_purpose(X509 *x, int id, int ca);
 | 
			
		||||
 
 | 
			
		||||
@@ -345,7 +345,7 @@ the MIT Kerberos library.
 | 
			
		||||
 | 
			
		||||
=head1 SEE ALSO
 | 
			
		||||
 | 
			
		||||
crypt(3), L<des_modes(7)|des_modes(7)>, L<evp(3)|evp(3)>, L<rand(3)|rand(3)>
 | 
			
		||||
crypt(3), L<des_modes(3)|des_modes(3)>, L<evp(3)|evp(3)>, L<rand(3)|rand(3)>
 | 
			
		||||
 | 
			
		||||
=head1 HISTORY
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,7 @@ evp - high-level cryptographic functions
 | 
			
		||||
 | 
			
		||||
=head1 DESCRIPTION
 | 
			
		||||
 | 
			
		||||
The EVP library provides a high-level interface to cryptographic
 | 
			
		||||
The EVP library provided a high-level interface to cryptographic
 | 
			
		||||
functions.
 | 
			
		||||
 | 
			
		||||
B<EVP_Seal>I<...> and B<EVP_Open>I<...> provide public key encryption
 | 
			
		||||
 
 | 
			
		||||
@@ -1,93 +0,0 @@
 | 
			
		||||
=pod
 | 
			
		||||
 | 
			
		||||
=head1 NAME
 | 
			
		||||
 | 
			
		||||
SSL_CTX_load_verify_locations - set default locations for trusted CA
 | 
			
		||||
certificates
 | 
			
		||||
 | 
			
		||||
=head1 SYNOPSIS
 | 
			
		||||
 | 
			
		||||
 #include <openssl/ssl.h>
 | 
			
		||||
 | 
			
		||||
 int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
 | 
			
		||||
                                   const char *CApath);
 | 
			
		||||
 | 
			
		||||
=head1 DESCRIPTION
 | 
			
		||||
 | 
			
		||||
SSL_CTX_load_verify_locations() specifies the locations for B<ctx>, at
 | 
			
		||||
which CA certificates for verification purposes are located. The certificates
 | 
			
		||||
available via B<CAfile> and B<CApath> are trusted.
 | 
			
		||||
 | 
			
		||||
=head1 NOTES
 | 
			
		||||
 | 
			
		||||
If B<CAfile> is not NULL, it points to a file of CA certificates in PEM
 | 
			
		||||
format. The file can contain several CA certificates identified by
 | 
			
		||||
 | 
			
		||||
 -----BEGIN CERTIFICATE-----
 | 
			
		||||
 ... (CA certificate in base64 encoding) ...
 | 
			
		||||
 -----END CERTIFICATE-----
 | 
			
		||||
 | 
			
		||||
sequences. Before, between, and after the certificates text is allowed
 | 
			
		||||
which can be used e.g. for descriptions of the certificates.
 | 
			
		||||
 | 
			
		||||
The B<CAfile> is processed on execution of the SSL_CTX_load_verify_locations()
 | 
			
		||||
function.
 | 
			
		||||
 | 
			
		||||
If on an TLS/SSL server no special setting is perfomed using *client_CA_list()
 | 
			
		||||
functions, the certificates contained in B<CAfile> are listed to the client
 | 
			
		||||
as available CAs during the TLS/SSL handshake.
 | 
			
		||||
 | 
			
		||||
If B<CApath> is not NULL, it points to a directory containing CA certificates
 | 
			
		||||
in PEM format. The files each contain one CA certificate. The files are
 | 
			
		||||
looked up by the CA subject name hash value, which must hence be available.
 | 
			
		||||
Use the B<c_rehash> utility to create the necessary links.
 | 
			
		||||
 | 
			
		||||
The certificates in B<CAfile> are only looked up when required, e.g. when
 | 
			
		||||
building the certificate chain or when actually performing the verification
 | 
			
		||||
of a peer certificate.
 | 
			
		||||
 | 
			
		||||
On a server, the certificates in B<CApath> are not listed as available
 | 
			
		||||
CA certificates to a client during a TLS/SSL handshake.
 | 
			
		||||
 | 
			
		||||
=head1 EXAMPLES
 | 
			
		||||
 | 
			
		||||
Generate a CA certificate file with descriptive text from the CA certificates
 | 
			
		||||
ca1.pem ca2.pem ca3.pem:
 | 
			
		||||
 | 
			
		||||
 #!/bin/sh
 | 
			
		||||
 rm CAfile.pem
 | 
			
		||||
 for i in ca1.pem ca2.pem ca3.pem ; do
 | 
			
		||||
   openssl x509 -in $i -text >> CAfile.pem
 | 
			
		||||
 done
 | 
			
		||||
 | 
			
		||||
Prepare the directory /some/where/certs containing several CA certificates
 | 
			
		||||
for use as B<CApath>:
 | 
			
		||||
 | 
			
		||||
 cd /some/where/certs
 | 
			
		||||
 c_rehash .
 | 
			
		||||
 | 
			
		||||
=head1 RETURN VALUES
 | 
			
		||||
 | 
			
		||||
The following return values can occur:
 | 
			
		||||
 | 
			
		||||
=over 4
 | 
			
		||||
 | 
			
		||||
=item 0
 | 
			
		||||
 | 
			
		||||
The operation failed because B<CAfile> and B<CApath> are NULL or the
 | 
			
		||||
processing at one of the locations specified failed. Check the error
 | 
			
		||||
stack to find out the reason.
 | 
			
		||||
 | 
			
		||||
=item 1
 | 
			
		||||
 | 
			
		||||
The operation succeeded.
 | 
			
		||||
 | 
			
		||||
=back
 | 
			
		||||
 | 
			
		||||
=head1 SEE ALSO
 | 
			
		||||
 | 
			
		||||
L<ssl(3)|ssl(3)>,
 | 
			
		||||
L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>,
 | 
			
		||||
L<SSL_get_client_CA_list(3)|SSL_get_client_CA_list(3)>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
@@ -1,90 +0,0 @@
 | 
			
		||||
=pod
 | 
			
		||||
 | 
			
		||||
=head1 NAME
 | 
			
		||||
 | 
			
		||||
SSL_CTX_set_client_CA_list, SSL_set_client_CA_list, SSL_CTX_add_client_CA,
 | 
			
		||||
SSL_add_client_CA - set list of CAs sent to the client when requesting a
 | 
			
		||||
client certificate
 | 
			
		||||
 | 
			
		||||
=head1 SYNOPSIS
 | 
			
		||||
 | 
			
		||||
 #include <openssl/ssl.h>
 | 
			
		||||
 
 | 
			
		||||
 void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *list);
 | 
			
		||||
 void SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *list);
 | 
			
		||||
 int SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *cacert);
 | 
			
		||||
 int SSL_add_client_CA(SSL *ssl, X509 *cacert);
 | 
			
		||||
 | 
			
		||||
=head1 DESCRIPTION
 | 
			
		||||
 | 
			
		||||
SSL_CTX_set_client_CA_list() sets the B<list> of CAs sent to the client when
 | 
			
		||||
requesting a client certificate for B<ctx>.
 | 
			
		||||
 | 
			
		||||
SSL_set_client_CA_list() sets the B<list> of CAs sent to the client when
 | 
			
		||||
requesting a client certificate for the chosen B<ssl>, overriding the
 | 
			
		||||
setting valid for B<ssl>'s SSL_CTX object.
 | 
			
		||||
 | 
			
		||||
SSL_CTX_add_client_CA() adds the CA name extracted from B<cacert> to the
 | 
			
		||||
list of CAs sent to the client when requesting a client certificate for
 | 
			
		||||
B<ctx>.
 | 
			
		||||
 | 
			
		||||
SSL_add_client_CA() adds the CA name extracted from B<cacert> to the
 | 
			
		||||
list of CAs sent to the client when requesting a client certificate for
 | 
			
		||||
the chosen B<ssl>, overriding the setting valid for B<ssl>'s SSL_CTX object.
 | 
			
		||||
 | 
			
		||||
=head1 NOTES
 | 
			
		||||
 | 
			
		||||
When a TLS/SSL server requests a client certificate (see
 | 
			
		||||
B<SSL_CTX_set_verify_options()>), it sends a list of CAs, for which
 | 
			
		||||
it will accept certificates, to the client. If no special list is provided,
 | 
			
		||||
the CAs available using the B<CAfile> option in
 | 
			
		||||
L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>
 | 
			
		||||
are sent.
 | 
			
		||||
 | 
			
		||||
This list can be explicitely set using the SSL_CTX_set_client_CA_list() for
 | 
			
		||||
B<ctx> and SSL_set_client_CA_list() for the specific B<ssl>. The list
 | 
			
		||||
specified overrides the previous setting. The CAs listed do not become
 | 
			
		||||
trusted (B<list> only contains the names, not the complete certificates); use
 | 
			
		||||
L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)> 
 | 
			
		||||
to additionally load them for verification.
 | 
			
		||||
 | 
			
		||||
SSL_CTX_add_client_CA() and SSL_add_client_CA() can be used to add additional
 | 
			
		||||
items the list of client CAs. If no list was specified before using
 | 
			
		||||
SSL_CTX_set_client_CA_list() or SSL_set_client_CA_list(), a new client
 | 
			
		||||
CA list for B<ctx> or B<ssl> (as appropriate) is opened. The CAs implicitly
 | 
			
		||||
specified using
 | 
			
		||||
L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>
 | 
			
		||||
are no longer used automatically.
 | 
			
		||||
 | 
			
		||||
These functions are only useful for TLS/SSL servers.
 | 
			
		||||
 | 
			
		||||
=head1 RETURN VALUES
 | 
			
		||||
 | 
			
		||||
SSL_CTX_set_client_CA_list() and SSL_set_client_CA_list() do not return
 | 
			
		||||
diagnostic information.
 | 
			
		||||
 | 
			
		||||
SSL_CTX_add_client_CA() and SSL_add_client_CA() have the following return
 | 
			
		||||
values:
 | 
			
		||||
 | 
			
		||||
=over 4
 | 
			
		||||
 | 
			
		||||
=item 1
 | 
			
		||||
 | 
			
		||||
The operation succeeded.
 | 
			
		||||
 | 
			
		||||
=item 0
 | 
			
		||||
 | 
			
		||||
A failure while manipulating the STACK_OF(X509_NAME) object occured or
 | 
			
		||||
the X509_NAME could not be extracted from B<cacert>. Check the error stack
 | 
			
		||||
to find out the reason.
 | 
			
		||||
 | 
			
		||||
=back
 | 
			
		||||
 | 
			
		||||
=head1 SEE ALSO
 | 
			
		||||
 | 
			
		||||
L<ssl(3)|ssl(3)>,
 | 
			
		||||
L<SSL_get_client_CA_list(3)|SSL_get_client_CA_list(3)>,
 | 
			
		||||
L<SSL_load_client_CA_file(3)|SSL_load_client_CA_file(3)>
 | 
			
		||||
L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
@@ -54,7 +54,7 @@ The TLS/SSL handshake was not successful but was shut down controlled and
 | 
			
		||||
by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the
 | 
			
		||||
return value B<ret> to find out the reason.
 | 
			
		||||
 | 
			
		||||
=item E<lt>0
 | 
			
		||||
=item -1
 | 
			
		||||
 | 
			
		||||
The TLS/SSL handshake was not successful because a fatal error occurred either
 | 
			
		||||
at the protocol level or a connection failure occurred. The shutdown was
 | 
			
		||||
 
 | 
			
		||||
@@ -51,7 +51,7 @@ The TLS/SSL handshake was not successful but was shut down controlled and
 | 
			
		||||
by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the
 | 
			
		||||
return value B<ret> to find out the reason.
 | 
			
		||||
 | 
			
		||||
=item E<lt>0
 | 
			
		||||
=item -1
 | 
			
		||||
 | 
			
		||||
The TLS/SSL handshake was not successful, because a fatal error occurred either
 | 
			
		||||
at the protocol level or a connection failure occurred. The shutdown was
 | 
			
		||||
 
 | 
			
		||||
@@ -1,52 +0,0 @@
 | 
			
		||||
=pod
 | 
			
		||||
 | 
			
		||||
=head1 NAME
 | 
			
		||||
 | 
			
		||||
SSL_get_client_CA_list, SSL_CTX_get_client_CA_list - get list of client CAs
 | 
			
		||||
 | 
			
		||||
=head1 SYNOPSIS
 | 
			
		||||
 | 
			
		||||
 #include <openssl/ssl.h>
 | 
			
		||||
 | 
			
		||||
 STACK_OF(X509_NAME) *SSL_get_client_CA_list(SSL *s);
 | 
			
		||||
 STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(SSL_CTX *ctx); 
 | 
			
		||||
 | 
			
		||||
=head1 DESCRIPTION
 | 
			
		||||
 | 
			
		||||
SSL_CTX_get_client_CA_list() returns the list of client CAs explicitely set for
 | 
			
		||||
B<ctx> using L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>.
 | 
			
		||||
 | 
			
		||||
SSL_get_client_CA_list() returns the list of client CAs explicitely
 | 
			
		||||
set for B<ssl> using SSL_set_client_CA_list() or B<ssl>'s SSL_CTX object with
 | 
			
		||||
L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>, when in
 | 
			
		||||
server mode. In client mode, SSL_get_client_CA_list returns the list of
 | 
			
		||||
client CAs sent from the server, if any.
 | 
			
		||||
 | 
			
		||||
=head1 RETURN VALUES
 | 
			
		||||
 | 
			
		||||
SSL_CTX_set_client_CA_list() and SSL_set_client_CA_list() do not return
 | 
			
		||||
diagnostic information.
 | 
			
		||||
 | 
			
		||||
SSL_CTX_add_client_CA() and SSL_add_client_CA() have the following return
 | 
			
		||||
values:
 | 
			
		||||
 | 
			
		||||
=over 4
 | 
			
		||||
 | 
			
		||||
=item STACK_OF(X509_NAMES)
 | 
			
		||||
 | 
			
		||||
List of CA names explicitely set (for B<ctx> or in server mode) or send
 | 
			
		||||
by the server (client mode).
 | 
			
		||||
 | 
			
		||||
=item NULL
 | 
			
		||||
 | 
			
		||||
No client CA list was explicitely set (for B<ctx> or in server mode) or
 | 
			
		||||
the server did not send a list of CAs (client mode).
 | 
			
		||||
 | 
			
		||||
=back
 | 
			
		||||
 | 
			
		||||
=head1 SEE ALSO
 | 
			
		||||
 | 
			
		||||
L<ssl(3)|ssl(3)>,
 | 
			
		||||
L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
@@ -1,62 +0,0 @@
 | 
			
		||||
=pod
 | 
			
		||||
 | 
			
		||||
=head1 NAME
 | 
			
		||||
 | 
			
		||||
SSL_load_client_CA_file - load certificate names from file
 | 
			
		||||
 | 
			
		||||
=head1 SYNOPSIS
 | 
			
		||||
 | 
			
		||||
 #include <openssl/ssl.h>
 | 
			
		||||
 | 
			
		||||
 STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
 | 
			
		||||
 | 
			
		||||
=head1 DESCRIPTION
 | 
			
		||||
 | 
			
		||||
SSL_load_client_CA_file() reads certificates from B<file> and returns
 | 
			
		||||
a STACK_OF(X509_NAME) with the subject names found.
 | 
			
		||||
 | 
			
		||||
=head1 NOTES
 | 
			
		||||
 | 
			
		||||
SSL_load_client_CA_file() reads a file of PEM formatted certificates and
 | 
			
		||||
extracts the X509_NAMES of the certificates found. While the name suggests
 | 
			
		||||
the specific usage as support function for
 | 
			
		||||
L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>,
 | 
			
		||||
it is not limited to CA certificates.
 | 
			
		||||
 | 
			
		||||
=head1 EXAMPLES
 | 
			
		||||
 | 
			
		||||
Load names of CAs from file and use it as a client CA list:
 | 
			
		||||
 | 
			
		||||
 SSL_CTX *ctx;
 | 
			
		||||
 STACK_OF(X509_NAME) *cert_names;
 | 
			
		||||
 | 
			
		||||
 ... 
 | 
			
		||||
 cert_names = SSL_load_client_CA_file("/path/to/CAfile.pem");
 | 
			
		||||
 if (cert_names != NULL)
 | 
			
		||||
   SSL_CTX_set_client_CA_list(ctx, cert_names);
 | 
			
		||||
 else
 | 
			
		||||
   error_handling();
 | 
			
		||||
 ...
 | 
			
		||||
 | 
			
		||||
=head1 RETURN VALUES
 | 
			
		||||
 | 
			
		||||
The following return values can occur:
 | 
			
		||||
 | 
			
		||||
=over 4
 | 
			
		||||
 | 
			
		||||
=item NULL
 | 
			
		||||
 | 
			
		||||
The operation failed, check out the error stack for the reason.
 | 
			
		||||
 | 
			
		||||
=item Pointer to STACK_OF(X509_NAME)
 | 
			
		||||
 | 
			
		||||
Pointer to the subject names of the successfully read certificates.
 | 
			
		||||
 | 
			
		||||
=back
 | 
			
		||||
 | 
			
		||||
=head1 SEE ALSO
 | 
			
		||||
 | 
			
		||||
L<ssl(3)|ssl(3)>,
 | 
			
		||||
L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
@@ -25,19 +25,6 @@ L<SSL_read(3)|SSL_read(3)>.
 | 
			
		||||
 | 
			
		||||
The number of bytes pending is returned.
 | 
			
		||||
 | 
			
		||||
=head1 BUGS
 | 
			
		||||
 | 
			
		||||
SSL_pending() takes into account only bytes from the TLS/SSL record
 | 
			
		||||
that is currently being processed (if any).  If the B<SSL> object's
 | 
			
		||||
I<read_ahead> flag is set, additional protocol bytes may have been
 | 
			
		||||
read containing more TLS/SSL records; these are ignored by
 | 
			
		||||
SSL_pending().
 | 
			
		||||
 | 
			
		||||
SSL_pending() does not check if the record type of pending data is
 | 
			
		||||
application data.
 | 
			
		||||
 | 
			
		||||
=head1 SEE ALSO
 | 
			
		||||
 | 
			
		||||
L<SSL_read(3)|SSL_read(3)>, L<ssl(3)|ssl(3)>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 
 | 
			
		||||
@@ -61,7 +61,7 @@ The read operation was not successful, probably because no data was
 | 
			
		||||
available. Call SSL_get_error() with the return value B<ret> to find out,
 | 
			
		||||
whether an error occurred.
 | 
			
		||||
 | 
			
		||||
=item E<lt>0
 | 
			
		||||
=item -1
 | 
			
		||||
 | 
			
		||||
The read operation was not successful, because either an error occurred
 | 
			
		||||
or action must be taken by the calling process. Call SSL_get_error() with the
 | 
			
		||||
 
 | 
			
		||||
@@ -60,7 +60,7 @@ bytes actually written to the TLS/SSL connection.
 | 
			
		||||
The write operation was not successful. Call SSL_get_error() with the return
 | 
			
		||||
value B<ret> to find out, whether an error occurred.
 | 
			
		||||
 | 
			
		||||
=item E<lt>0
 | 
			
		||||
=item -1
 | 
			
		||||
 | 
			
		||||
The read operation was not successful, because either an error occurred
 | 
			
		||||
or action must be taken by the calling process. Call SSL_get_error() with the
 | 
			
		||||
 
 | 
			
		||||
@@ -625,21 +625,15 @@ connection defined in the B<SSL> structure.
 | 
			
		||||
 | 
			
		||||
L<openssl(1)|openssl(1)>, L<crypto(3)|crypto(3)>,
 | 
			
		||||
L<SSL_accept(3)|SSL_accept(3)>, L<SSL_clear(3)|SSL_clear(3)>,
 | 
			
		||||
L<SSL_connect(3)|SSL_connect(3)>,
 | 
			
		||||
L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>
 | 
			
		||||
L<SSL_CTX_new(3)|SSL_CTX_new(3)>,
 | 
			
		||||
L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>
 | 
			
		||||
L<SSL_connect(3)|SSL_connect(3)>, L<SSL_CTX_new(3)|SSL_CTX_new(3)>,
 | 
			
		||||
L<SSL_CTX_set_ssl_version(3)|SSL_CTX_set_ssl_version(3)>,
 | 
			
		||||
L<SSL_get_ciphers(3)|SSL_get_ciphers(3)>,
 | 
			
		||||
L<SSL_get_client_CA_list(3)|SSL_get_client_CA_list(3)>,
 | 
			
		||||
L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_get_fd(3)|SSL_get_fd(3)>,
 | 
			
		||||
L<SSL_get_peer_cert_chain(3)|SSL_get_peer_cert_chain(3)>,
 | 
			
		||||
L<SSL_get_rbio(3)|SSL_get_rbio(3)>,
 | 
			
		||||
L<SSL_get_session(3)|SSL_get_session(3)>,
 | 
			
		||||
L<SSL_get_verify_result(3)|SSL_get_verify_result(3)>,
 | 
			
		||||
L<SSL_library_init(3)|SSL_library_init(3)>,
 | 
			
		||||
L<SSL_load_client_CA_file(3)|SSL_load_client_CA_file(3)>,
 | 
			
		||||
L<SSL_new(3)|SSL_new(3)>,
 | 
			
		||||
L<SSL_library_init(3)|SSL_library_init(3)>, L<SSL_new(3)|SSL_new(3)>,
 | 
			
		||||
L<SSL_read(3)|SSL_read(3)>, L<SSL_set_bio(3)|SSL_set_bio(3)>,
 | 
			
		||||
L<SSL_set_fd(3)|SSL_set_fd(3)>, L<SSL_pending(3)|SSL_pending(3)>,
 | 
			
		||||
L<SSL_set_session(3)|SSL_set_session(3)>,
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								e_os.h
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								e_os.h
									
									
									
									
									
								
							@@ -355,14 +355,12 @@ extern HINSTANCE _hInstance;
 | 
			
		||||
#    if defined(VMS) && !defined(__DECC)
 | 
			
		||||
#      include <socket.h>
 | 
			
		||||
#      include <in.h>
 | 
			
		||||
#      include <inet.h>
 | 
			
		||||
#    else
 | 
			
		||||
#      include <sys/socket.h>
 | 
			
		||||
#      ifdef FILIO_H
 | 
			
		||||
#        include <sys/filio.h> /* Added for FIONBIO under unixware */
 | 
			
		||||
#      endif
 | 
			
		||||
#      include <netinet/in.h>
 | 
			
		||||
#      include <arpa/inet.h>
 | 
			
		||||
#    endif
 | 
			
		||||
 | 
			
		||||
#    if defined(NeXT) || defined(_NEXT_SOURCE)
 | 
			
		||||
@@ -450,6 +448,19 @@ extern char *sys_errlist[]; extern int sys_nerr;
 | 
			
		||||
#define IRIX_CC_BUG	/* CDS++ up to V2.0Bsomething suffered from the same bug.*/
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef NO_MD2
 | 
			
		||||
#define MD2_Init MD2Init
 | 
			
		||||
#define MD2_Update MD2Update
 | 
			
		||||
#define MD2_Final MD2Final
 | 
			
		||||
#define MD2_DIGEST_LENGTH 16
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef NO_MD5
 | 
			
		||||
#define MD5_Init MD5Init 
 | 
			
		||||
#define MD5_Update MD5Update
 | 
			
		||||
#define MD5_Final MD5Final
 | 
			
		||||
#define MD5_DIGEST_LENGTH 16
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef  __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
@echo off
 | 
			
		||||
@echo=off
 | 
			
		||||
 | 
			
		||||
set test=..\ms
 | 
			
		||||
set opath=%PATH%
 | 
			
		||||
 
 | 
			
		||||
@@ -94,7 +94,7 @@ perl util/perlpath.pl /usr/bin/perl
 | 
			
		||||
./Configure %{CONFIG_FLAGS} --openssldir=%{openssldir} linux-ppc shared
 | 
			
		||||
%endif
 | 
			
		||||
%ifarch alpha
 | 
			
		||||
./Configure %{CONFIG_FLAGS} --openssldir=%{openssldir} linux-alpha-gcc shared
 | 
			
		||||
./Configure %{CONFIG_FLAGS} --openssldir=%{openssldir} linux-alpha shared
 | 
			
		||||
%endif
 | 
			
		||||
LD_LIBRARY_PATH=`pwd` make
 | 
			
		||||
LD_LIBRARY_PATH=`pwd` make rehash
 | 
			
		||||
 
 | 
			
		||||
@@ -39,8 +39,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -55,8 +55,7 @@ all:	lib
 | 
			
		||||
 | 
			
		||||
lib:	$(LIBOBJ)
 | 
			
		||||
	$(AR) $(LIB) $(LIBOBJ)
 | 
			
		||||
	@echo You may get an error following this line.  Please ignore.
 | 
			
		||||
	- $(RANLIB) $(LIB)
 | 
			
		||||
	$(RANLIB) $(LIB)
 | 
			
		||||
	@touch lib
 | 
			
		||||
 | 
			
		||||
files:
 | 
			
		||||
 
 | 
			
		||||
@@ -1178,7 +1178,7 @@ int SSL_get_ex_data_X509_STORE_CTX_idx(void );
 | 
			
		||||
#define SSL_CTX_get_read_ahead(ctx) \
 | 
			
		||||
	SSL_CTX_ctrl(ctx,SSL_CTRL_GET_READ_AHEAD,0,NULL)
 | 
			
		||||
#define SSL_CTX_set_read_ahead(ctx,m) \
 | 
			
		||||
	SSL_CTX_ctrl(ctx,SSL_CTRL_SET_READ_AHEAD,m,NULL)
 | 
			
		||||
	SSL_CTX_ctrl(ctx,SSL_CTRL_SET_READ_AHEAD,0,NULL)
 | 
			
		||||
 | 
			
		||||
     /* NB: the keylength is only applicable when is_export is true */
 | 
			
		||||
#ifndef NO_RSA
 | 
			
		||||
 
 | 
			
		||||
@@ -119,9 +119,7 @@ int SSL_clear(SSL *s)
 | 
			
		||||
	s->client_version=s->version;
 | 
			
		||||
	s->rwstate=SSL_NOTHING;
 | 
			
		||||
	s->rstate=SSL_ST_READ_HEADER;
 | 
			
		||||
#if 0
 | 
			
		||||
	s->read_ahead=s->ctx->read_ahead;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	if (s->init_buf != NULL)
 | 
			
		||||
		{
 | 
			
		||||
@@ -231,7 +229,6 @@ SSL *SSL_new(SSL_CTX *ctx)
 | 
			
		||||
	s->server=(ctx->method->ssl_accept == ssl_undefined_function)?0:1;
 | 
			
		||||
	s->options=ctx->options;
 | 
			
		||||
	s->mode=ctx->mode;
 | 
			
		||||
	s->read_ahead=ctx->read_ahead; /* used to happen in SSL_clear */
 | 
			
		||||
	SSL_clear(s);
 | 
			
		||||
 | 
			
		||||
	CRYPTO_new_ex_data(ssl_meth,s,&s->ex_data);
 | 
			
		||||
 
 | 
			
		||||
@@ -301,8 +301,8 @@ EVP_des_ede_cfb                         308	EXIST::FUNCTION:DES
 | 
			
		||||
EVP_des_ede_ofb                         309	EXIST::FUNCTION:DES
 | 
			
		||||
EVP_des_ofb                             310	EXIST::FUNCTION:DES
 | 
			
		||||
EVP_desx_cbc                            311	EXIST::FUNCTION:DES
 | 
			
		||||
EVP_dss                                 312	EXIST::FUNCTION:DSA,SHA
 | 
			
		||||
EVP_dss1                                313	EXIST::FUNCTION:DSA,SHA
 | 
			
		||||
EVP_dss                                 312	EXIST::FUNCTION:DSA
 | 
			
		||||
EVP_dss1                                313	EXIST::FUNCTION:DSA
 | 
			
		||||
EVP_enc_null                            314	EXIST::FUNCTION:
 | 
			
		||||
EVP_get_cipherbyname                    315	EXIST::FUNCTION:
 | 
			
		||||
EVP_get_digestbyname                    316	EXIST::FUNCTION:
 | 
			
		||||
@@ -926,7 +926,7 @@ PKCS7_add_signature                     938	EXIST::FUNCTION:
 | 
			
		||||
PKCS7_cert_from_signer_info             939	EXIST::FUNCTION:
 | 
			
		||||
PKCS7_get_signer_info                   940	EXIST::FUNCTION:
 | 
			
		||||
EVP_delete_alias                        941	NOEXIST::FUNCTION:
 | 
			
		||||
EVP_mdc2                                942	EXIST::FUNCTION:MDC2
 | 
			
		||||
EVP_mdc2                                942	EXIST::FUNCTION:
 | 
			
		||||
PEM_read_bio_RSAPublicKey               943	EXIST::FUNCTION:RSA
 | 
			
		||||
PEM_write_bio_RSAPublicKey              944	EXIST::FUNCTION:RSA
 | 
			
		||||
d2i_RSAPublicKey_bio                    945	EXIST::FUNCTION:RSA
 | 
			
		||||
 
 | 
			
		||||
@@ -119,7 +119,7 @@ foreach (@ARGV, split(/ /, $options))
 | 
			
		||||
	elsif (/^no-rc4$/)      { $no_rc4=1; }
 | 
			
		||||
	elsif (/^no-rc5$/)      { $no_rc5=1; }
 | 
			
		||||
	elsif (/^no-idea$/)     { $no_idea=1; }
 | 
			
		||||
	elsif (/^no-des$/)      { $no_des=1; $no_mdc2=1; }
 | 
			
		||||
	elsif (/^no-des$/)      { $no_des=1; }
 | 
			
		||||
	elsif (/^no-bf$/)       { $no_bf=1; }
 | 
			
		||||
	elsif (/^no-cast$/)     { $no_cast=1; }
 | 
			
		||||
	elsif (/^no-md2$/)      { $no_md2=1; }
 | 
			
		||||
@@ -704,8 +704,7 @@ EOF
 | 
			
		||||
		} else {
 | 
			
		||||
			(my $n, my $i) = split /\\/, $nums{$s};
 | 
			
		||||
			my %pf = ();
 | 
			
		||||
			my @p = split(/,/, ($i =~ /^[^:]*:([^:]*):/,$1));
 | 
			
		||||
			my @a = split(/,/, ($i =~ /^[^:]*:[^:]*:[^:]*:([^:]*)/,$1));
 | 
			
		||||
			my @p = split(/,/, ($i =~ /^.*?:(.*?):/,$1));
 | 
			
		||||
			# @p_purged must contain hardware platforms only
 | 
			
		||||
			my @p_purged = ();
 | 
			
		||||
			foreach $ptmp (@p) {
 | 
			
		||||
@@ -727,26 +726,7 @@ EOF
 | 
			
		||||
				|| (!$negatives
 | 
			
		||||
				    && ($rsaref || !grep(/^RSAREF$/,@p)))
 | 
			
		||||
				|| ($negatives
 | 
			
		||||
				    && (!$rsaref || !grep(/^!RSAREF$/,@p))))
 | 
			
		||||
			    && (!@a || (!$no_rc2 || !grep(/^RC2$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_rc4 || !grep(/^RC4$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_rc5 || !grep(/^RC5$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_idea || !grep(/^IDEA$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_des || !grep(/^DES$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_bf || !grep(/^BF$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_cast || !grep(/^CAST$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_md2 || !grep(/^MD2$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_md4 || !grep(/^MD4$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_md5 || !grep(/^MD5$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_sha || !grep(/^SHA$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_ripemd || !grep(/^RIPEMD$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_mdc2 || !grep(/^MDC2$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_rsa || !grep(/^RSA$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_dsa || !grep(/^DSA$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_dh || !grep(/^DH$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_hmac || !grep(/^HMAC$/,@a)))
 | 
			
		||||
			    && (!@a || (!$no_fp_api || !grep(/^FP_API$/,@a)))
 | 
			
		||||
			    ) {
 | 
			
		||||
				    && (!$rsaref || !grep(/^!RSAREF$/,@p))))) {
 | 
			
		||||
				printf OUT "    %s%-40s@%d\n",($W32)?"":"_",$s,$n;
 | 
			
		||||
#			} else {
 | 
			
		||||
#				print STDERR "DEBUG: \"$sym\" (@p):",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user