Commit 984d6c60 authored by David Woodhouse's avatar David Woodhouse Committed by Rich Salz
Browse files

Fix no-stdio build



Much related/similar work also done by
Ivan Nestlerode <ivan.nestlerode@sonos.com>

   +Replace FILE BIO's with dummy ops that fail.
   +Include <stdio.h> for sscanf() even with no-stdio (since the declaration
    is there). We rely on sscanf() to parse the OPENSSL_ia32cap environment
    variable, since it can be larger than a 'long'. And we don't rely on the
    availability of strtoull().
   +Remove OPENSSL_stderr(); not used.
   +Make OPENSSL_showfatal() do nothing (currently without stdio there's
    nothing we can do).
   +Remove file-based functionality from ssl/. The function
    prototypes were already gone, but not the functions themselves.
   +Remove unviable conf functionality via SYS_UEFI
   +Add fallback definition of BUFSIZ.
   +Remove functions taking FILE * from header files.
   +Add missing DECLARE_PEM_write_fp_const
   +Disable X509_LOOKUP_hash_dir(). X509_LOOKUP_file() was already compiled out,
    so remove its prototype.
   +Use OPENSSL_showfatal() in CRYPTO_destroy_dynlockid().
   +Eliminate SRP_VBASE_init() and supporting functions. Users will need to
    build the verifier manually instead.
   +Eliminate compiler warning for unused do_pk8pkey_fp().
   +Disable TEST_ENG_OPENSSL_PKEY.
   +Disable GOST engine as is uses [f]printf all over the place.
   +Eliminate compiler warning for unused send_fp_chars().

Signed-off-by: default avatarRich Salz <rsalz@akamai.com>
Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
parent 57ebe748
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -9,7 +9,9 @@
     though the change is mostly in the more lenient direction, and
     legacy behaviour is preserved as much as possible.
     [Emilia Käsper]

  *) Fix no-stdio build.
    [ David Woodhouse <David.Woodhouse@intel.com> and also
      Ivan Nestlerode <ivan.nestlerode@sonos.com> ]
  *) New testing framework
     The testing framework has been largely rewritten and is now using
     perl and the perl modules Test::Harness and an extended variant of
+1 −1
Original line number Diff line number Diff line
@@ -1086,7 +1086,7 @@ if (defined($disabled{"md5"}) || defined($disabled{"sha"})


if (defined($disabled{"ec"}) || defined($disabled{"dsa"})
    || defined($disabled{"dh"}))
    || defined($disabled{"dh"}) || defined($disabled{"stdio"}))
	{
	$disabled{"gost"} = "forced";
	}
+5 −3
Original line number Diff line number Diff line
@@ -668,14 +668,16 @@ tasn_typ.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
tasn_typ.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
tasn_typ.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
tasn_typ.o: ../../include/openssl/symhacks.h tasn_typ.c
tasn_utl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
tasn_utl.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
tasn_utl.o: ../../e_os.h ../../include/openssl/asn1.h
tasn_utl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
tasn_utl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
tasn_utl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
tasn_utl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
tasn_utl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
tasn_utl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
tasn_utl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
tasn_utl.o: ../../include/openssl/symhacks.h asn1_locl.h tasn_utl.c
tasn_utl.o: ../../include/openssl/symhacks.h ../include/internal/cryptlib.h
tasn_utl.o: asn1_locl.h tasn_utl.c
x_algor.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
x_algor.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
x_algor.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
+2 −0
Original line number Diff line number Diff line
@@ -92,6 +92,7 @@ static int send_bio_chars(void *arg, const void *buf, int len)
    return 1;
}

#ifndef OPENSSL_NO_STDIO
static int send_fp_chars(void *arg, const void *buf, int len)
{
    if (!arg)
@@ -100,6 +101,7 @@ static int send_fp_chars(void *arg, const void *buf, int len)
        return 0;
    return 1;
}
#endif

typedef int char_io (void *arg, const void *buf, int len);

+1 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@

#include <stddef.h>
#include <string.h>
#include <internal/cryptlib.h>
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
#include <openssl/objects.h>
Loading