Still FAILED build of OpenSSL branch master with options -d --strict-warnings no-sock

2020-05-13 Thread OpenSSL run-checker
Platform and configuration command:

$ uname -a
Linux run 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 
x86_64 x86_64 GNU/Linux
$ CC=clang ../openssl/config -d --strict-warnings no-sock

Commit log since last time:

f523ca6661 Replace misleading error message when loading PEM
914db66d23 CORE: Attach the provider context to the provider late
fdaad3f1b3 Fix some misunderstandings in our providers' main modules
b0f3c59408 CORE: Fix the signature of OSSL_provider_query_operation_fn
b2952366dd Fix d2i_PrivateKey_ex() to work as documented
885a2a399d Fix CHANGES.md issues reported by markdownlint

Build log ended with (last 100 lines):

rm -f *.ld
rm -f doc/html/man1/CA.pl.html doc/html/man1/openssl-asn1parse.html 
doc/html/man1/openssl-ca.html doc/html/man1/openssl-ciphers.html 
doc/html/man1/openssl-cmds.html doc/html/man1/openssl-cms.html 
doc/html/man1/openssl-crl.html doc/html/man1/openssl-crl2pkcs7.html 
doc/html/man1/openssl-dgst.html doc/html/man1/openssl-dhparam.html 
doc/html/man1/openssl-dsa.html doc/html/man1/openssl-dsaparam.html 
doc/html/man1/openssl-ec.html doc/html/man1/openssl-ecparam.html 
doc/html/man1/openssl-enc.html doc/html/man1/openssl-engine.html 
doc/html/man1/openssl-errstr.html doc/html/man1/openssl-fipsinstall.html 
doc/html/man1/openssl-gendsa.html doc/html/man1/openssl-genpkey.html 
doc/html/man1/openssl-genrsa.html doc/html/man1/openssl-info.html 
doc/html/man1/openssl-kdf.html doc/html/man1/openssl-list.html 
doc/html/man1/openssl-mac.html doc/html/man1/openssl-nseq.html 
doc/html/man1/openssl-ocsp.html doc/html/man1/openssl-passwd.html 
doc/html/man1/openssl-pkcs12.html doc/html/man1/openssl-pkcs7.html doc
 /html/man1/openssl-pkcs8.html doc/html/man1/openssl-pkey.html 
doc/html/man1/openssl-pkeyparam.html doc/html/man1/openssl-pkeyutl.html 
doc/html/man1/openssl-prime.html doc/html/man1/openssl-provider.html 
doc/html/man1/openssl-rand.html doc/html/man1/openssl-rehash.html 
doc/html/man1/openssl-req.html doc/html/man1/openssl-rsa.html 
doc/html/man1/openssl-rsautl.html doc/html/man1/openssl-s_client.html 
doc/html/man1/openssl-s_server.html doc/html/man1/openssl-s_time.html 
doc/html/man1/openssl-sess_id.html doc/html/man1/openssl-smime.html 
doc/html/man1/openssl-speed.html doc/html/man1/openssl-spkac.html 
doc/html/man1/openssl-srp.html doc/html/man1/openssl-storeutl.html 
doc/html/man1/openssl-ts.html doc/html/man1/openssl-verify.html 
doc/html/man1/openssl-version.html doc/html/man1/openssl-x509.html 
doc/html/man1/openssl.html doc/html/man1/tsget.html 
doc/html/man3/ADMISSIONS.html doc/html/man3/ASN1_INTEGER_get_int64.html 
doc/html/man3/ASN1_ITEM_lookup.html doc/html/man3/ASN1_OBJECT_new.html
  doc/html/man3/ASN1_STRING_TABLE_add.html 
doc/html/man3/ASN1_STRING_length.html doc/html/man3/ASN1_STRING_new.html 
doc/html/man3/ASN1_STRING_print_ex.html doc/html/man3/ASN1_TIME_set.html 
doc/html/man3/ASN1_TYPE_get.html doc/html/man3/ASN1_generate_nconf.html 
doc/html/man3/ASYNC_WAIT_CTX_new.html doc/html/man3/ASYNC_start_job.html 
doc/html/man3/BF_encrypt.html doc/html/man3/BIO_ADDR.html 
doc/html/man3/BIO_ADDRINFO.html doc/html/man3/BIO_connect.html 
doc/html/man3/BIO_ctrl.html doc/html/man3/BIO_f_base64.html 
doc/html/man3/BIO_f_buffer.html doc/html/man3/BIO_f_cipher.html 
doc/html/man3/BIO_f_md.html doc/html/man3/BIO_f_null.html 
doc/html/man3/BIO_f_prefix.html doc/html/man3/BIO_f_ssl.html 
doc/html/man3/BIO_find_type.html doc/html/man3/BIO_get_data.html 
doc/html/man3/BIO_get_ex_new_index.html doc/html/man3/BIO_meth_new.html 
doc/html/man3/BIO_new.html doc/html/man3/BIO_new_CMS.html 
doc/html/man3/BIO_parse_hostserv.html doc/html/man3/BIO_printf.html 
doc/html/man3/BIO_push.html doc/html/
 man3/BIO_read.html doc/html/man3/BIO_s_accept.html 
doc/html/man3/BIO_s_bio.html doc/html/man3/BIO_s_connect.html 
doc/html/man3/BIO_s_fd.html doc/html/man3/BIO_s_file.html 
doc/html/man3/BIO_s_mem.html doc/html/man3/BIO_s_null.html 
doc/html/man3/BIO_s_socket.html doc/html/man3/BIO_set_callback.html 
doc/html/man3/BIO_should_retry.html doc/html/man3/BIO_socket_wait.html 
doc/html/man3/BN_BLINDING_new.html doc/html/man3/BN_CTX_new.html 
doc/html/man3/BN_CTX_start.html doc/html/man3/BN_add.html 
doc/html/man3/BN_add_word.html doc/html/man3/BN_bn2bin.html 
doc/html/man3/BN_cmp.html doc/html/man3/BN_copy.html 
doc/html/man3/BN_generate_prime.html doc/html/man3/BN_mod_inverse.html 
doc/html/man3/BN_mod_mul_montgomery.html 
doc/html/man3/BN_mod_mul_reciprocal.html doc/html/man3/BN_new.html 
doc/html/man3/BN_num_bytes.html doc/html/man3/BN_rand.html 
doc/html/man3/BN_security_bits.html doc/html/man3/BN_set_bit.html 
doc/html/man3/BN_swap.html doc/html/man3/BN_zero.html 
doc/html/man3/BUF_MEM_new.html doc
 /html/man3/CMS_EnvelopedData_create.html doc/html/man3/CMS_add0_cert.html 
doc/html/man3/CMS_add1_recipient_cert.html doc/html/man3/CMS_add1_signer.html 
doc/html/man3/CMS_compress.html doc/html/man3/CMS_decrypt.html 
doc/html/man3/CMS_encrypt.html 

Still FAILED build of OpenSSL branch master with options -d --strict-warnings no-posix-io

2020-05-13 Thread OpenSSL run-checker
Platform and configuration command:

$ uname -a
Linux run 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 
x86_64 x86_64 GNU/Linux
$ CC=clang ../openssl/config -d --strict-warnings no-posix-io

Commit log since last time:

f523ca6661 Replace misleading error message when loading PEM
914db66d23 CORE: Attach the provider context to the provider late
fdaad3f1b3 Fix some misunderstandings in our providers' main modules
b0f3c59408 CORE: Fix the signature of OSSL_provider_query_operation_fn
b2952366dd Fix d2i_PrivateKey_ex() to work as documented
885a2a399d Fix CHANGES.md issues reported by markdownlint

Build log ended with (last 100 lines):

rm -f *.ld
rm -f doc/html/man1/CA.pl.html doc/html/man1/openssl-asn1parse.html 
doc/html/man1/openssl-ca.html doc/html/man1/openssl-ciphers.html 
doc/html/man1/openssl-cmds.html doc/html/man1/openssl-cms.html 
doc/html/man1/openssl-crl.html doc/html/man1/openssl-crl2pkcs7.html 
doc/html/man1/openssl-dgst.html doc/html/man1/openssl-dhparam.html 
doc/html/man1/openssl-dsa.html doc/html/man1/openssl-dsaparam.html 
doc/html/man1/openssl-ec.html doc/html/man1/openssl-ecparam.html 
doc/html/man1/openssl-enc.html doc/html/man1/openssl-engine.html 
doc/html/man1/openssl-errstr.html doc/html/man1/openssl-fipsinstall.html 
doc/html/man1/openssl-gendsa.html doc/html/man1/openssl-genpkey.html 
doc/html/man1/openssl-genrsa.html doc/html/man1/openssl-info.html 
doc/html/man1/openssl-kdf.html doc/html/man1/openssl-list.html 
doc/html/man1/openssl-mac.html doc/html/man1/openssl-nseq.html 
doc/html/man1/openssl-ocsp.html doc/html/man1/openssl-passwd.html 
doc/html/man1/openssl-pkcs12.html doc/html/man1/openssl-pkcs7.html doc
 /html/man1/openssl-pkcs8.html doc/html/man1/openssl-pkey.html 
doc/html/man1/openssl-pkeyparam.html doc/html/man1/openssl-pkeyutl.html 
doc/html/man1/openssl-prime.html doc/html/man1/openssl-provider.html 
doc/html/man1/openssl-rand.html doc/html/man1/openssl-rehash.html 
doc/html/man1/openssl-req.html doc/html/man1/openssl-rsa.html 
doc/html/man1/openssl-rsautl.html doc/html/man1/openssl-s_client.html 
doc/html/man1/openssl-s_server.html doc/html/man1/openssl-s_time.html 
doc/html/man1/openssl-sess_id.html doc/html/man1/openssl-smime.html 
doc/html/man1/openssl-speed.html doc/html/man1/openssl-spkac.html 
doc/html/man1/openssl-srp.html doc/html/man1/openssl-storeutl.html 
doc/html/man1/openssl-ts.html doc/html/man1/openssl-verify.html 
doc/html/man1/openssl-version.html doc/html/man1/openssl-x509.html 
doc/html/man1/openssl.html doc/html/man1/tsget.html 
doc/html/man3/ADMISSIONS.html doc/html/man3/ASN1_INTEGER_get_int64.html 
doc/html/man3/ASN1_ITEM_lookup.html doc/html/man3/ASN1_OBJECT_new.html
  doc/html/man3/ASN1_STRING_TABLE_add.html 
doc/html/man3/ASN1_STRING_length.html doc/html/man3/ASN1_STRING_new.html 
doc/html/man3/ASN1_STRING_print_ex.html doc/html/man3/ASN1_TIME_set.html 
doc/html/man3/ASN1_TYPE_get.html doc/html/man3/ASN1_generate_nconf.html 
doc/html/man3/ASYNC_WAIT_CTX_new.html doc/html/man3/ASYNC_start_job.html 
doc/html/man3/BF_encrypt.html doc/html/man3/BIO_ADDR.html 
doc/html/man3/BIO_ADDRINFO.html doc/html/man3/BIO_connect.html 
doc/html/man3/BIO_ctrl.html doc/html/man3/BIO_f_base64.html 
doc/html/man3/BIO_f_buffer.html doc/html/man3/BIO_f_cipher.html 
doc/html/man3/BIO_f_md.html doc/html/man3/BIO_f_null.html 
doc/html/man3/BIO_f_prefix.html doc/html/man3/BIO_f_ssl.html 
doc/html/man3/BIO_find_type.html doc/html/man3/BIO_get_data.html 
doc/html/man3/BIO_get_ex_new_index.html doc/html/man3/BIO_meth_new.html 
doc/html/man3/BIO_new.html doc/html/man3/BIO_new_CMS.html 
doc/html/man3/BIO_parse_hostserv.html doc/html/man3/BIO_printf.html 
doc/html/man3/BIO_push.html doc/html/
 man3/BIO_read.html doc/html/man3/BIO_s_accept.html 
doc/html/man3/BIO_s_bio.html doc/html/man3/BIO_s_connect.html 
doc/html/man3/BIO_s_fd.html doc/html/man3/BIO_s_file.html 
doc/html/man3/BIO_s_mem.html doc/html/man3/BIO_s_null.html 
doc/html/man3/BIO_s_socket.html doc/html/man3/BIO_set_callback.html 
doc/html/man3/BIO_should_retry.html doc/html/man3/BIO_socket_wait.html 
doc/html/man3/BN_BLINDING_new.html doc/html/man3/BN_CTX_new.html 
doc/html/man3/BN_CTX_start.html doc/html/man3/BN_add.html 
doc/html/man3/BN_add_word.html doc/html/man3/BN_bn2bin.html 
doc/html/man3/BN_cmp.html doc/html/man3/BN_copy.html 
doc/html/man3/BN_generate_prime.html doc/html/man3/BN_mod_inverse.html 
doc/html/man3/BN_mod_mul_montgomery.html 
doc/html/man3/BN_mod_mul_reciprocal.html doc/html/man3/BN_new.html 
doc/html/man3/BN_num_bytes.html doc/html/man3/BN_rand.html 
doc/html/man3/BN_security_bits.html doc/html/man3/BN_set_bit.html 
doc/html/man3/BN_swap.html doc/html/man3/BN_zero.html 
doc/html/man3/BUF_MEM_new.html doc
 /html/man3/CMS_EnvelopedData_create.html doc/html/man3/CMS_add0_cert.html 
doc/html/man3/CMS_add1_recipient_cert.html doc/html/man3/CMS_add1_signer.html 
doc/html/man3/CMS_compress.html doc/html/man3/CMS_decrypt.html 
doc/html/man3/CMS_encrypt.html 

[openssl] master update

2020-05-13 Thread Richard Levitte
The branch master has been updated
   via  f55838f34dd5c65420662f7eacf6c6ffd7f261a2 (commit)
   via  bac4bffbfbfaf2d16d248e8bc32023d1d2d48d10 (commit)
   via  6ab6ecfd6d2d659326f427dceb1b65ae1b4b012b (commit)
  from  78906fff4a6cfd5857045df770b47ae9ebcf0766 (commit)


- Log -
commit f55838f34dd5c65420662f7eacf6c6ffd7f261a2
Author: Richard Levitte 
Date:   Fri Oct 12 16:56:44 2018 +0200

OSSL_STORE: Make the 'file' scheme loader handle MSBLOB and PVK files

This involves exposing two pvkfmt.c functions, but only internally.

Reviewed-by: David von Oheimb 
(Merged from https://github.com/openssl/openssl/pull/11756)

commit bac4bffbfbfaf2d16d248e8bc32023d1d2d48d10
Author: Richard Levitte 
Date:   Fri Oct 12 16:52:15 2018 +0200

OSSL_STORE: Better information when prompting for pass phrases

The prompt includes the URI, to make it clear which object needs a
pass phrase.

Reviewed-by: David von Oheimb 
(Merged from https://github.com/openssl/openssl/pull/11756)

commit 6ab6ecfd6d2d659326f427dceb1b65ae1b4b012b
Author: Richard Levitte 
Date:   Fri Oct 12 16:46:41 2018 +0200

OSSL_STORE: Make it possible to attach an OSSL_STORE to an opened BIO

This capability existed internally, and is now made public.

Reviewed-by: David von Oheimb 
(Merged from https://github.com/openssl/openssl/pull/11756)

---

Summary of changes:
 crypto/err/openssl.txt|   9 +-
 crypto/include/internal/pem_int.h |  23 +++
 crypto/pem/pem_pkey.c |  19 ++-
 crypto/pem/pvkfmt.c   |  39 ++---
 crypto/store/loader_file.c| 296 ++
 crypto/store/store_err.c  |   2 +-
 crypto/store/store_lib.c  |  44 ++
 crypto/store/store_local.h|  11 +-
 crypto/store/store_register.c |   7 +
 doc/man3/OSSL_STORE_LOADER.pod|  29 +++-
 doc/man3/OSSL_STORE_attach.pod|  45 ++
 include/openssl/store.h   |  28 
 include/openssl/storeerr.h|   8 +-
 util/libcrypto.num|   2 +
 util/other.syms   |   1 +
 15 files changed, 389 insertions(+), 174 deletions(-)
 create mode 100644 crypto/include/internal/pem_int.h
 create mode 100644 doc/man3/OSSL_STORE_attach.pod

diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt
index 133a935b0f..9fa051f5c3 100644
--- a/crypto/err/openssl.txt
+++ b/crypto/err/openssl.txt
@@ -948,6 +948,7 @@ OCSP_F_OCSP_MATCH_ISSUERID:109:ocsp_match_issuerid
 OCSP_F_OCSP_REQUEST_SIGN:110:OCSP_request_sign
 OCSP_F_OCSP_REQUEST_VERIFY:116:OCSP_request_verify
 OCSP_F_OCSP_RESPONSE_GET1_BASIC:111:OCSP_response_get1_basic
+OSSL_STORE_F_FILE_ATTACH:128:
 OSSL_STORE_F_FILE_CTRL:129:file_ctrl
 OSSL_STORE_F_FILE_FIND:138:file_find
 OSSL_STORE_F_FILE_GET_PASS:118:file_get_pass
@@ -955,10 +956,8 @@ OSSL_STORE_F_FILE_LOAD:119:file_load
 OSSL_STORE_F_FILE_LOAD_TRY_DECODE:124:file_load_try_decode
 OSSL_STORE_F_FILE_NAME_TO_URI:126:file_name_to_uri
 OSSL_STORE_F_FILE_OPEN:120:file_open
-OSSL_STORE_F_OSSL_STORE_ATTACH_PEM_BIO:127:ossl_store_attach_pem_bio
+OSSL_STORE_F_OSSL_STORE_ATTACH:127:
 OSSL_STORE_F_OSSL_STORE_EXPECT:130:OSSL_STORE_expect
-OSSL_STORE_F_OSSL_STORE_FILE_ATTACH_PEM_BIO_INT:128:\
-   ossl_store_file_attach_pem_bio_int
 OSSL_STORE_F_OSSL_STORE_FIND:131:OSSL_STORE_find
 OSSL_STORE_F_OSSL_STORE_GET0_LOADER_INT:100:ossl_store_get0_loader_int
 OSSL_STORE_F_OSSL_STORE_INFO_GET1_CERT:101:OSSL_STORE_INFO_get1_CERT
@@ -1001,12 +1000,12 @@ 
PEM_F_D2I_PKCS8PRIVATEKEY_BIO:120:d2i_PKCS8PrivateKey_bio
 PEM_F_D2I_PKCS8PRIVATEKEY_FP:121:d2i_PKCS8PrivateKey_fp
 PEM_F_DO_B2I:132:do_b2i
 PEM_F_DO_B2I_BIO:133:do_b2i_bio
-PEM_F_DO_BLOB_HEADER:134:do_blob_header
+PEM_F_OSSL_DO_BLOB_HEADER:134:ossl_do_blob_header
 PEM_F_DO_I2B:146:do_i2b
 PEM_F_DO_PK8PKEY:126:do_pk8pkey
 PEM_F_DO_PK8PKEY_FP:125:do_pk8pkey_fp
 PEM_F_DO_PVK_BODY:135:do_PVK_body
-PEM_F_DO_PVK_HEADER:136:do_PVK_header
+PEM_F_OSSL_DO_PVK_HEADER:136:ossl_do_PVK_header
 PEM_F_GET_HEADER_AND_DATA:143:get_header_and_data
 PEM_F_GET_NAME:144:get_name
 PEM_F_I2B_PVK:137:i2b_PVK
diff --git a/crypto/include/internal/pem_int.h 
b/crypto/include/internal/pem_int.h
new file mode 100644
index 00..e065ac75a5
--- /dev/null
+++ b/crypto/include/internal/pem_int.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the OpenSSL license (the "License").  You may not use
+ * this file except in compliance with the License.  You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
+#ifndef HEADER_PEM_INT_H
+# define HEADER_PEM_INT_H
+
+# include 
+
+/* Found in crypto/pem/pvkfmt.c */
+int ossl_do_blob_header(const unsigned char **in, unsigned int length,
+

[openssl] master update

2020-05-13 Thread Matt Caswell
The branch master has been updated
   via  78906fff4a6cfd5857045df770b47ae9ebcf0766 (commit)
   via  05aa8790ac1ef2bb39c15ae241a591704664039c (commit)
  from  484c24c8d7318cc36f9b3c2b7b55cf5ac91619ca (commit)


- Log -
commit 78906fff4a6cfd5857045df770b47ae9ebcf0766
Author: Richard Levitte 
Date:   Tue May 12 09:02:25 2020 +0200

PROV: Adapt all our providers to use the new PROV_CTX structure

Reviewed-by: Matt Caswell 
(Merged from https://github.com/openssl/openssl/pull/11803)

commit 05aa8790ac1ef2bb39c15ae241a591704664039c
Author: Richard Levitte 
Date:   Tue May 12 08:46:23 2020 +0200

PROV: Add a proper provider context structure for OpenSSL providers

The provider context structure is made to include the following information:

- The core provider handle (first argument to the provider init
  function).  This handle is meant to be used in all upcalls that need
  it.

- A library context, used for any libcrypto calls that need it, done in
  the provider itself.

Regarding the library context, that's generally only needed if the
provider makes any libcrypto calls, i.e. is linked with libcrypto.  That
happens to be the case for all OpenSSL providers, but is applicable for
other providers that use libcrypto internally as well.

The normal thing to do for a provider init function is to create its own
library context.  For a provider that's meant to become a dynamically
loadable module, this is what MUST be done.
However, we do not do that in the default provider; it uses the library
context associated with the core provider handle instead.  This is
permissible, although generally discouraged, as long as the provider in
question is guaranteed to be built-in, into libcrypto or into the
application that uses it.

Reviewed-by: Matt Caswell 
(Merged from https://github.com/openssl/openssl/pull/11803)

---

Summary of changes:
 crypto/property/build.info   |  1 +
 providers/common/build.info  |  2 +-
 providers/common/include/prov/provider_ctx.h | 18 ++-
 providers/common/provider_ctx.c  | 48 
 providers/defltprov.c| 19 +--
 providers/fips/fipsprov.c| 38 +++---
 providers/legacyprov.c   | 24 ++
 7 files changed, 128 insertions(+), 22 deletions(-)
 create mode 100644 providers/common/provider_ctx.c

diff --git a/crypto/property/build.info b/crypto/property/build.info
index bfa1f0602f..56f26760c6 100644
--- a/crypto/property/build.info
+++ b/crypto/property/build.info
@@ -2,3 +2,4 @@ LIBS=../../libcrypto
 $COMMON=property_string.c property_parse.c property.c defn_cache.c
 SOURCE[../../libcrypto]=$COMMON property_err.c
 SOURCE[../../providers/libfips.a]=$COMMON
+SOURCE[../../providers/liblegacy.a]=$COMMON
diff --git a/providers/common/build.info b/providers/common/build.info
index b6495d343a..c49b090227 100644
--- a/providers/common/build.info
+++ b/providers/common/build.info
@@ -1,6 +1,6 @@
 SUBDIRS=der
 
-SOURCE[../libcommon.a]=provider_err.c bio_prov.c
+SOURCE[../libcommon.a]=provider_err.c bio_prov.c provider_ctx.c
 $FIPSCOMMON=provider_util.c
 SOURCE[../libnonfips.a]=$FIPSCOMMON nid_to_name.c
 SOURCE[../libfips.a]=$FIPSCOMMON
diff --git a/providers/common/include/prov/provider_ctx.h 
b/providers/common/include/prov/provider_ctx.h
index 365667d19e..0984f13635 100644
--- a/providers/common/include/prov/provider_ctx.h
+++ b/providers/common/include/prov/provider_ctx.h
@@ -7,8 +7,24 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include 
+#include 
+
+typedef struct prov_ctx_st {
+const OSSL_PROVIDER *provider;
+OPENSSL_CTX *libctx; /* For all provider modules */
+} PROV_CTX;
+
 /*
  * To be used anywhere the library context needs to be passed, such as to
  * fetching functions.
  */
-#define PROV_LIBRARY_CONTEXT_OF(provctx)(provctx)
+#define PROV_LIBRARY_CONTEXT_OF(provctx)\
+PROV_CTX_get0_library_context((provctx))
+
+PROV_CTX *PROV_CTX_new(void);
+void PROV_CTX_free(PROV_CTX *ctx);
+void PROV_CTX_set0_library_context(PROV_CTX *ctx, OPENSSL_CTX *libctx);
+void PROV_CTX_set0_provider(PROV_CTX *ctx, const OSSL_PROVIDER *libctx);
+OPENSSL_CTX *PROV_CTX_get0_library_context(PROV_CTX *ctx);
+const OSSL_PROVIDER *PROV_CTX_get0_provider(PROV_CTX *ctx);
diff --git a/providers/common/provider_ctx.c b/providers/common/provider_ctx.c
new file mode 100644
index 00..66c7c74890
--- /dev/null
+++ b/providers/common/provider_ctx.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (the "License").  You may not use
+ * this file except in 

[openssl] master update

2020-05-13 Thread Richard Levitte
The branch master has been updated
   via  484c24c8d7318cc36f9b3c2b7b55cf5ac91619ca (commit)
  from  dd63f9bbfc95931e4f41558fbc7a2ffb68b0eef0 (commit)


- Log -
commit 484c24c8d7318cc36f9b3c2b7b55cf5ac91619ca
Author: Richard Levitte 
Date:   Mon May 11 11:40:33 2020 +0200

Remove explicit dependency on configdata.pm when processing .in files

For those files, the dependence on configdata.pm is automatic, adding
it explicitly only results in having that dependency twice.

Fixes #11786

Reviewed-by: Tomas Mraz 
(Merged from https://github.com/openssl/openssl/pull/11790)

---

Summary of changes:
 crypto/build.info | 1 -
 doc/build.info| 1 -
 2 files changed, 2 deletions(-)

diff --git a/crypto/build.info b/crypto/build.info
index 3537bbcc26..83625029c0 100644
--- a/crypto/build.info
+++ b/crypto/build.info
@@ -94,7 +94,6 @@ DEFINE[../providers/libcommon.a]=$UTIL_DEFINE
 DEPEND[info.o]=buildinf.h
 DEPEND[cversion.o]=buildinf.h
 GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" 
"$(PLATFORM)"
-DEPEND[buildinf.h]=../configdata.pm
 
 GENERATE[uplink-x86.s]=../ms/uplink-x86.pl
 GENERATE[uplink-x86_64.s]=../ms/uplink-x86_64.pl
diff --git a/doc/build.info b/doc/build.info
index 47728fed56..83da34ee29 100644
--- a/doc/build.info
+++ b/doc/build.info
@@ -56,7 +56,6 @@ DEPEND[$manfile]=$podfile
 GENERATE[$manfile]=$podfile
 _
  $OUT .= << "_" if $podinfile;
-DEPEND[$podfile]=$podinfile ../configdata.pm
 GENERATE[$podfile]=$podinfile
 _
  }


[openssl] master update

2020-05-13 Thread kaduk
The branch master has been updated
   via  dd63f9bbfc95931e4f41558fbc7a2ffb68b0eef0 (commit)
  from  7ef43790617cb08b4bb4141df716dfb37385fe5c (commit)


- Log -
commit dd63f9bbfc95931e4f41558fbc7a2ffb68b0eef0
Author: Benjamin Kaduk 
Date:   Mon May 11 09:29:24 2020 -0700

Fix FreeBSD build with --strict-warnings

apps/lib/http_server.c needs to include string.h in order to get a prototype
for strerror().

Reviewed-by: Shane Lontis 
(Merged from https://github.com/openssl/openssl/pull/11797)

---

Summary of changes:
 apps/lib/http_server.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/apps/lib/http_server.c b/apps/lib/http_server.c
index 6db11f4150..2b5c9f5dcd 100644
--- a/apps/lib/http_server.c
+++ b/apps/lib/http_server.c
@@ -17,6 +17,7 @@
 # define _POSIX_C_SOURCE 2
 #endif
 
+#include 
 #include 
 #include "http_server.h"
 #include "internal/sockets.h"


Still FAILED build of OpenSSL branch master with options -d --strict-warnings no-dgram

2020-05-13 Thread OpenSSL run-checker
Platform and configuration command:

$ uname -a
Linux run 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 
x86_64 x86_64 GNU/Linux
$ CC=clang ../openssl/config -d --strict-warnings no-dgram

Commit log since last time:

f523ca6661 Replace misleading error message when loading PEM
914db66d23 CORE: Attach the provider context to the provider late
fdaad3f1b3 Fix some misunderstandings in our providers' main modules
b0f3c59408 CORE: Fix the signature of OSSL_provider_query_operation_fn
b2952366dd Fix d2i_PrivateKey_ex() to work as documented
885a2a399d Fix CHANGES.md issues reported by markdownlint

Build log ended with (last 100 lines):

65-test_cmp_server.t ... ok
65-test_cmp_status.t ... ok
65-test_cmp_vfy.t .. ok
70-test_asyncio.t .. ok
70-test_bad_dtls.t . skipped: DTLSv1 is not supported by this 
OpenSSL build
70-test_clienthello.t .. ok
70-test_comp.t . ok
70-test_key_share.t  ok
70-test_packet.t ... ok
70-test_recordlen.t  ok
70-test_renegotiation.t  ok
70-test_servername.t ... ok
70-test_sslcbcpadding.t  ok
70-test_sslcertstatus.t  ok
70-test_sslextension.t . ok
70-test_sslmessages.t .. ok
70-test_sslrecords.t ... ok
70-test_sslsessiontick.t ... ok
70-test_sslsigalgs.t ... ok
70-test_sslsignature.t . ok
70-test_sslskewith0p.t . ok
70-test_sslversions.t .. ok
70-test_sslvertol.t  ok
70-test_tls13alerts.t .. ok
70-test_tls13cookie.t .. ok
70-test_tls13downgrade.t ... ok
70-test_tls13hrr.t . ok
70-test_tls13kexmodes.t  ok
70-test_tls13messages.t  ok
70-test_tls13psk.t . ok
70-test_tlsextms.t . ok
70-test_verify_extra.t . ok
70-test_wpacket.t .. ok
71-test_ssl_ctx.t .. ok
80-test_ca.t ... ok
80-test_cipherbytes.t .. ok
80-test_cipherlist.t ... ok
80-test_ciphername.t ... ok
80-test_cms.t .. ok
80-test_cmsapi.t ... ok
80-test_ct.t ... ok
80-test_dane.t . ok
80-test_dtls.t . skipped: No DTLS protocols are supported 
by this OpenSSL build
80-test_dtls_mtu.t . skipped: test_dtls_mtu needs DTLS and PSK 
support enabled
80-test_dtlsv1listen.t . ok
80-test_http.t . ok
80-test_ocsp.t . ok
80-test_pkcs12.t ... ok
80-test_ssl_new.t .. 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/31 subtests 
80-test_ssl_old.t .. ok
80-test_ssl_test_ctx.t . ok
80-test_sslcorrupt.t ... ok
80-test_tsa.t .. ok
80-test_x509aux.t .. ok
90-test_asn1_time.t  ok
90-test_async.t  ok
90-test_bio_enc.t .. ok
90-test_bio_memleak.t .. ok
90-test_constant_time.t  ok
90-test_fatalerr.t . ok
90-test_gmdiff.t ... ok
90-test_gost.t . ok
90-test_ige.t .. ok
90-test_includes.t . ok
90-test_memleak.t .. ok
90-test_overhead.t . ok
90-test_secmem.t ... ok
90-test_shlibload.t  ok
90-test_srp.t .. ok
90-test_sslapi.t ... ok
90-test_sslbuffers.t ... ok
90-test_sslprovider.t .. ok
90-test_store.t  ok
90-test_sysdefault.t ... ok
90-test_threads.t .. ok
90-test_time_offset.t .. ok
90-test_tls13ccs.t . ok
90-test_tls13encryption.t .. ok
90-test_tls13secrets.t . ok
90-test_v3name.t ... ok
95-test_external_boringssl.t ... skipped: No external tests in this 
configuration
95-test_external_krb5.t  skipped: No external tests in this 
configuration
95-test_external_pyca.t  skipped: No external tests in this 
configuration
99-test_ecstress.t . ok
99-test_fuzz.t . ok

Test Summary Report
---
80-test_ssl_new.t(Wstat: 256 Tests: 31 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
Files=197, Tests=1987, 661 wallclock secs ( 8.66 usr  1.53 sys + 615.87 cusr 
42.62 csys = 668.68 CPU)
Result: FAIL
Makefile:3050: recipe for target '_tests' failed
make[1]: *** [_tests] Error 1
make[1]: Leaving directory '/home/openssl/run-checker/no-dgram'
Makefile:3048: recipe for target 'tests' failed
make: *** [tests] Error 2