Commit c518ade1 authored by Ben Laurie's avatar Ben Laurie
Browse files

Clean up EVP macros, rename DES EDE3 modes correctly, temporary support for

OpenBSD /dev/crypto (this will be revamped later when the appropriate machinery
is available).
parent acdf4afb
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -12,6 +12,13 @@
         *) applies to 0.9.6a/0.9.6b and 0.9.7
         +) applies to 0.9.7 only

  +) Cleanup of EVP macros.
     [Ben Laurie]

  +) Change historical references to {NID,SN,LN}_des_ede and ede3 to add the
     correct _ecb suffix.
     [Ben Laurie]

  +) Add initial OCSP responder support to ocsp application. The
     revocation information is handled using the text based index
     use by the ca application. The responder can either handle
+1 −0
Original line number Diff line number Diff line
@@ -133,6 +133,7 @@ my %table=(
"purify",	"purify gcc:-g -DPURIFY -Wall::(unknown)::-lsocket -lnsl::::",
"debug",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror::(unknown)::-lefence::::",
"debug-ben",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o",
"debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
"debug-ben-debug",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::::",
"debug-ben-strict",	"gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::",
"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
+2 −2
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ LIBSRC= encode.c digest.c evp_enc.c evp_key.c \
	p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \
	bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c \
	c_all.c c_allc.c c_alld.c evp_lib.c bio_ok.c \
	evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c
	evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c openbsd_hw.c

LIBOBJ=	encode.o digest.o evp_enc.o evp_key.o \
	e_des.o e_bf.o e_idea.o e_des3.o \
@@ -43,7 +43,7 @@ LIBOBJ= encode.o digest.o evp_enc.o evp_key.o \
	p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \
	bio_md.o bio_b64.o bio_enc.o evp_err.o e_null.o \
	c_all.o c_allc.o c_alld.o evp_lib.o bio_ok.o \
	evp_pkey.o evp_pbe.o p5_crpt.o p5_crpt2.o
	evp_pkey.o evp_pbe.o p5_crpt.o p5_crpt2.o openbsd_hw.o

SRC= $(LIBSRC)

+4 −0
Original line number Diff line number Diff line
@@ -82,7 +82,11 @@ void OpenSSL_add_all_ciphers(void)
	EVP_add_cipher_alias(SN_des_cbc,"DES");
	EVP_add_cipher_alias(SN_des_cbc,"des");
	EVP_add_cipher(EVP_des_ede_cbc());
# ifdef OPENSSL_OPENBSD_DEV_CRYPTO
	EVP_add_cipher(EVP_dev_crypto_des_ede3_cbc());
# else
	EVP_add_cipher(EVP_des_ede3_cbc());
# endif
	EVP_add_cipher_alias(SN_des_ede3_cbc,"DES3");
	EVP_add_cipher_alias(SN_des_ede3_cbc,"des3");

+0 −3
Original line number Diff line number Diff line
@@ -119,15 +119,12 @@ static int des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
	return 1;
}

#define NID_des_ede_ecb NID_des_ede

BLOCK_CIPHER_defs(des_ede, des_ede, NID_des_ede, 8, 16, 8,
			0, des_ede_init_key, NULL, 
			EVP_CIPHER_set_asn1_iv,
			EVP_CIPHER_get_asn1_iv,
			NULL)

#define NID_des_ede3_ecb NID_des_ede3
#define des_ede3_cfb_cipher des_ede_cfb_cipher
#define des_ede3_ofb_cipher des_ede_ofb_cipher
#define des_ede3_cbc_cipher des_ede_cbc_cipher
Loading