Remove outdated legacy crypto options

Many options for supporting optimizations for legacy crypto on legacy
platforms have been removed.  This simplifies the source code and
does not really penalize anyone.
        DES_PTR (always on)
        DES_RISC1, DES_RISC2 (always off)
        DES_INT (always 'unsigned int')
        DES_UNROLL (always on)
        BF_PTR (always on) BF_PTR2 (removed)
        MD2_CHAR, MD2_LONG (always 'unsigned char')
        IDEA_SHORT, IDEA_LONG (always 'unsigned int')
        RC2_SHORT, RC2_LONG (always 'unsigned int')
        RC4_LONG (only int and char (for assembler) are supported)
        RC4_CHUNK (always long), RC_CHUNK_LL (removed)
        RC4_INDEX (always on)
And also make D_ENCRYPT macro more clear (@appro)

This is done in consultation with Andy.

Reviewed-by: Andy Polyakov <appro@openssl.org>
This commit is contained in:
Rich Salz
2016-01-27 18:43:25 -05:00
committed by Rich Salz
parent 8ed40b83ec
commit 3e9e810f2e
31 changed files with 138 additions and 1152 deletions

View File

@@ -58,14 +58,13 @@
#ifndef HEADER_NEW_DES_H
# define HEADER_NEW_DES_H
# include <openssl/e_os2.h> /* OPENSSL_EXTERN, OPENSSL_NO_DES, DES_LONG
* (via openssl/opensslconf.h */
# include <openssl/e_os2.h>
# ifdef OPENSSL_NO_DES
# error DES is disabled.
# endif
# define DES_LONG OSSL_DES_LONG
typedef unsigned int DES_LONG;
# ifdef OPENSSL_BUILD_SHLIBCRYPTO
# undef OPENSSL_EXTERN

View File

@@ -58,12 +58,14 @@
#ifndef HEADER_IDEA_H
# define HEADER_IDEA_H
# include <openssl/opensslconf.h>/* IDEA_INT, OPENSSL_NO_IDEA */
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_IDEA
# error IDEA is disabled.
# endif
typedef unsigned int IDEA_INT;
# define IDEA_ENCRYPT 1
# define IDEA_DECRYPT 0

View File

@@ -58,12 +58,14 @@
#ifndef HEADER_MD2_H
# define HEADER_MD2_H
# include <openssl/opensslconf.h>/* OPENSSL_NO_MD2, MD2_INT */
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_MD2
# error MD2 is disabled.
# endif
# include <stddef.h>
typdef unsigned char MD2_INT;
# define MD2_DIGEST_LENGTH 16
# define MD2_BLOCK 16

View File

@@ -151,8 +151,6 @@ extern "C" {
* The following are cipher-specific, but are part of the public API.
*/
#define OSSL_DES_LONG {- $config{des_int} -}
#if !defined(OPENSSL_SYS_UEFI)
{- $config{bn_ll} ? "#define" : "#undef" -} BN_LLONG
@@ -162,9 +160,6 @@ extern "C" {
{- $config{b32} ? "#define" : "#undef" -} THIRTY_TWO_BIT
#endif
# define RC2_INT {- $config{rc2_int} -}
# define IDEA_INT {- $config{idea_int} -}
# define MD2_INT {- $config{md2_int} -}
# define RC4_INT {- $config{rc4_int} -}
#ifdef __cplusplus

View File

@@ -58,11 +58,13 @@
#ifndef HEADER_RC2_H
# define HEADER_RC2_H
# include <openssl/opensslconf.h>/* OPENSSL_NO_RC2, RC2_INT */
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_RC2
# error RC2 is disabled.
# endif
typedef unsigned int RC2_INT;
# define RC2_ENCRYPT 1
# define RC2_DECRYPT 0