Commit d0308923 authored by Matt Caswell's avatar Matt Caswell
Browse files

Add a legacy provider and put MD2 in it

parent dc46e3dd
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -374,6 +374,7 @@ my @disablables = (
    "fuzz-afl",
    "gost",
    "idea",
    "legacy",
    "makedepend",
    "md2",
    "md4",
@@ -513,7 +514,7 @@ my @disable_cascades = (
    # or modules.
    "pic"               => [ "shared", "module" ],

    "module"            => [ "fips" ],
    "module"            => [ "fips", "legacy" ],

    "engine"            => [ grep /eng$/, @disablables ],
    "hw"                => [ "padlockeng" ],
@@ -532,6 +533,7 @@ my @disable_cascades = (
    sub { !$disabled{"msan"} } => [ "asm" ],

    sub { $disabled{cmac}; } => [ "siv" ],
    "legacy"                 => [ "md2" ],
    );

# Avoid protocol support holes.  Also disable all versions below N, if version
@@ -1226,7 +1228,7 @@ foreach my $what (sort keys %disabled) {

    if (!grep { $what eq $_ } ( 'buildtest-c++', 'fips', 'threads', 'shared',
                                'module', 'pic', 'dynamic-engine', 'makedepend',
                                'zlib-dynamic', 'zlib', 'sse2' )) {
                                'zlib-dynamic', 'zlib', 'sse2', 'legacy' )) {
        (my $WHAT = uc $what) =~ s|-|_|g;
        my $skipdir = $what;

+4 −0
Original line number Diff line number Diff line
@@ -409,6 +409,10 @@
                   available if the GOST algorithms are also available through
                   loading an externally supplied engine.

  no-legacy
                   Don't build the legacy provider. Disabling this also disables
                   the legacy algorithms: MD2 (already disabled by default).

  no-makedepend
                   Don't generate dependencies.

+1 −0
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
    if (type->prov == NULL) {
        switch(type->type) {
        case NID_sha256:
        case NID_md2:
            break;
        default:
            goto legacy;
+1 −0
Original line number Diff line number Diff line
@@ -523,6 +523,7 @@ int ossl_property_parse_init(void)
{
    static const char *const predefined_names[] = {
        "default",      /* Being provided by the default built-in provider */
        "legacy",       /* Provided by the legacy provider */
        "provider",     /* Name of provider (default, fips) */
        "version",      /* Version number of this provider */
        "fips",         /* FIPS supporting provider */
+11 −0
Original line number Diff line number Diff line
@@ -10,3 +10,14 @@ IF[{- !$disabled{fips} -}]
  INCLUDE[fips]=.. ../include ../crypto/include
  DEFINE[fips]=FIPS_MODE
ENDIF

IF[{- !$disabled{legacy} -}]
  SUBDIRS=legacy
  MODULES=legacy
  IF[{- defined $target{shared_defflag} -}]
    SOURCE[legacy]=legacy.ld
    GENERATE[legacy.ld]=../util/providers.num
  ENDIF
  INCLUDE[legacy]=.. ../include ../crypto/include
  DEPEND[legacy]=../libcrypto
ENDIF
Loading