Small cleanup (util/mkdef.pl, crypto/bio/bss_log.c, include/openssl/ocsp.h)
authorRichard Levitte <levitte@openssl.org>
Sat, 29 Sep 2018 23:59:11 +0000 (01:59 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 4 Oct 2018 07:59:23 +0000 (09:59 +0200)
BIO_s_log() is declared for everyone, so should return NULL when not
actually implemented.  Also, it had explicit platform limitations in
util/mkdef.pl that didn't correspond to what was actually in code.
While at it, a few other hard coded things that have lost their
relevance were removed.

include/openssl/ocsp.h had a few duplicate declarations.

Reviewed-by: Paul Yang <yang.yang@baishancloud.com>
(Merged from https://github.com/openssl/openssl/pull/7331)

(cherry picked from commit 7e09c5eaa57295f87453286ffe25277c2f2bc73f)

crypto/bio/bss_log.c
include/openssl/ocsp.h
util/libcrypto.num
util/mkdef.pl

index 4719a5e66a68979da823992556352271b4e7c92e..f090e8214bb0208f8880cf53595b6b06a2a3f4e1 100644 (file)
@@ -404,4 +404,9 @@ static void xcloselog(BIO *bp)
 
 # endif                         /* Unix */
 
+#else                           /* NO_SYSLOG */
+const BIO_METHOD *BIO_s_log(void)
+{
+    return NULL;
+}
 #endif                          /* NO_SYSLOG */
index fd172fbf1d509b75adc37bfba94acdfd4a410438..aa432f14377b06d06a7bc9f8442b9fc9972ad51d 100644 (file)
@@ -92,7 +92,6 @@ typedef struct ocsp_resp_bytes_st OCSP_RESPBYTES;
 #  define V_OCSP_RESPID_KEY  1
 
 DEFINE_STACK_OF(OCSP_RESPID)
-DECLARE_ASN1_FUNCTIONS(OCSP_RESPID)
 
 typedef struct ocsp_revoked_info_st OCSP_REVOKEDINFO;
 
@@ -159,8 +158,6 @@ int OCSP_REQ_CTX_i2d(OCSP_REQ_CTX *rctx, const ASN1_ITEM *it,
 int OCSP_REQ_CTX_nbio_d2i(OCSP_REQ_CTX *rctx, ASN1_VALUE **pval,
                           const ASN1_ITEM *it);
 BIO *OCSP_REQ_CTX_get0_mem_bio(OCSP_REQ_CTX *rctx);
-int OCSP_REQ_CTX_i2d(OCSP_REQ_CTX *rctx, const ASN1_ITEM *it,
-                     ASN1_VALUE *val);
 int OCSP_REQ_CTX_http(OCSP_REQ_CTX *rctx, const char *op, const char *path);
 int OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, OCSP_REQUEST *req);
 int OCSP_REQ_CTX_add1_header(OCSP_REQ_CTX *rctx,
index c0fe79d71a3480b1168c4d9c776d83ad6e1ea6d5..2390fa03627c2f360a691c22cb39def66be7d057 100644 (file)
@@ -282,7 +282,7 @@ TS_REQ_free                             282 1_1_0   EXIST::FUNCTION:TS
 PEM_read_DHparams                       283    1_1_0   EXIST::FUNCTION:DH,STDIO
 RSA_private_decrypt                     284    1_1_0   EXIST::FUNCTION:RSA
 X509V3_EXT_get_nid                      285    1_1_0   EXIST::FUNCTION:
-BIO_s_log                               286    1_1_0   EXIST:!WIN32,!macintosh:FUNCTION:
+BIO_s_log                               286    1_1_0   EXIST::FUNCTION:
 EC_POINT_set_to_infinity                287    1_1_0   EXIST::FUNCTION:EC
 EVP_des_ede_ofb                         288    1_1_0   EXIST::FUNCTION:DES
 ECDH_KDF_X9_62                          289    1_1_0   EXIST::FUNCTION:EC
index 823cb664d0ae6449de1eb69ea202a255270b7bda..3626dcdcb1fdfbd3089b73e62edec4414d71a212 100755 (executable)
@@ -978,16 +978,6 @@ sub do_defs
                }
        }
 
-       # Prune the returned symbols
-
-        delete $syms{"bn_dump1"};
-       $platform{"BIO_s_log"} .= ",!WIN32,!macintosh";
-
-       $platform{"PEM_read_NS_CERT_SEQ"} = "VMS";
-       $platform{"PEM_write_NS_CERT_SEQ"} = "VMS";
-       $platform{"PEM_read_P8_PRIV_KEY_INFO"} = "VMS";
-       $platform{"PEM_write_P8_PRIV_KEY_INFO"} = "VMS";
-
        # Info we know about
 
        push @ret, map { $_."\\".&info_string($_,"EXIST",