[openssl-commits] [openssl] master update
kaduk at mit.edu
kaduk at mit.edu
Thu Jul 27 19:32:38 UTC 2017
The branch master has been updated
via d3b58b953c25b781bb4582a174dbe1e8ac68cfa3 (commit)
via 7af42628c1f2864cd73659245742baabdb1a449f (commit)
via 1fb2993d9e3db38c7c681ea3eecaad458e956f80 (commit)
via baa77e075538b3d849b5120b3b60f0caca15a803 (commit)
from 354ab3653c0f9a218d91d4e5679c738896253d26 (commit)
- Log -----------------------------------------------------------------
commit d3b58b953c25b781bb4582a174dbe1e8ac68cfa3
Author: Benjamin Kaduk <bkaduk at akamai.com>
Date: Wed Jul 5 11:51:45 2017 -0500
Remove trailing whitespace from store-related man pages
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3860)
commit 7af42628c1f2864cd73659245742baabdb1a449f
Author: Benjamin Kaduk <bkaduk at akamai.com>
Date: Fri Jun 30 13:25:20 2017 -0500
Improve style
Spaces around operators.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3860)
commit 1fb2993d9e3db38c7c681ea3eecaad458e956f80
Author: Benjamin Kaduk <bkaduk at akamai.com>
Date: Thu Jun 29 15:12:18 2017 -0500
Catch up to the removal of OSSL_STORE_open_file()
Remove references to it in documentation.
Unfortunately, it is too late to renumber symbols in libcrypto.num
and avoid the NOEXIST entry there.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3860)
commit baa77e075538b3d849b5120b3b60f0caca15a803
Author: Benjamin Kaduk <bkaduk at akamai.com>
Date: Thu Jun 29 13:59:10 2017 -0500
Fixups for STORE commit
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3860)
-----------------------------------------------------------------------
Summary of changes:
crypto/store/loader_file.c | 4 ++--
crypto/store/store_lib.c | 3 +--
crypto/store/store_register.c | 2 +-
doc/man3/OSSL_STORE_INFO.pod | 12 ++++++------
doc/man3/OSSL_STORE_open.pod | 20 ++++----------------
doc/man7/ossl_store.pod | 6 +-----
include/openssl/store.h | 3 +--
7 files changed, 16 insertions(+), 34 deletions(-)
diff --git a/crypto/store/loader_file.c b/crypto/store/loader_file.c
index 7cb1457..ca15065 100644
--- a/crypto/store/loader_file.c
+++ b/crypto/store/loader_file.c
@@ -864,8 +864,8 @@ static OSSL_STORE_LOADER_CTX *file_open(const OSSL_STORE_LOADER *loader,
}
ctx->_.file.file = BIO_push(buff, ctx->_.file.file);
- if (BIO_buffer_peek(ctx->_.file.file, peekbuf, sizeof(peekbuf)-1) > 0) {
- peekbuf[sizeof(peekbuf)-1] = '\0';
+ if (BIO_buffer_peek(ctx->_.file.file, peekbuf, sizeof(peekbuf) - 1) > 0) {
+ peekbuf[sizeof(peekbuf) - 1] = '\0';
if (strstr(peekbuf, "-----BEGIN ") != NULL)
ctx->type = is_pem;
}
diff --git a/crypto/store/store_lib.c b/crypto/store/store_lib.c
index 9dc3a70..b982e9c 100644
--- a/crypto/store/store_lib.c
+++ b/crypto/store/store_lib.c
@@ -154,8 +154,7 @@ int OSSL_STORE_close(OSSL_STORE_CTX *ctx)
/*
* Functions to generate OSSL_STORE_INFOs, one function for each type we
- * support having in them. Along with each of them, one macro that
- * can be used to determine what types are supported.
+ * support having in them as well as a generic constructor.
*
* In all cases, ownership of the object is transfered to the OSSL_STORE_INFO
* and will therefore be freed when the OSSL_STORE_INFO is freed.
diff --git a/crypto/store/store_register.c b/crypto/store/store_register.c
index b366b19..6af7144 100644
--- a/crypto/store/store_register.c
+++ b/crypto/store/store_register.c
@@ -149,7 +149,7 @@ int ossl_store_register_loader_int(OSSL_STORE_LOADER *loader)
if (*scheme != '\0') {
OSSL_STOREerr(OSSL_STORE_F_OSSL_STORE_REGISTER_LOADER_INT,
OSSL_STORE_R_INVALID_SCHEME);
- ERR_add_error_data(4, "scheme=", loader->scheme);
+ ERR_add_error_data(2, "scheme=", loader->scheme);
return 0;
}
diff --git a/doc/man3/OSSL_STORE_INFO.pod b/doc/man3/OSSL_STORE_INFO.pod
index 1b0f233..a1822f1 100644
--- a/doc/man3/OSSL_STORE_INFO.pod
+++ b/doc/man3/OSSL_STORE_INFO.pod
@@ -8,10 +8,10 @@ OSSL_STORE_INFO_get0_PKEY, OSSL_STORE_INFO_get0_CERT, OSSL_STORE_INFO_get0_CRL,
OSSL_STORE_INFO_get1_NAME, OSSL_STORE_INFO_get1_NAME_description,
OSSL_STORE_INFO_get1_PARAMS, OSSL_STORE_INFO_get1_PKEY,
OSSL_STORE_INFO_get1_CERT,
-OSSL_STORE_INFO_get1_CRL, OSSL_STORE_INFO_type_string, OSSL_STORE_INFO_free,
+OSSL_STORE_INFO_get1_CRL, OSSL_STORE_INFO_type_string, OSSL_STORE_INFO_free,
OSSL_STORE_INFO_new_NAME, OSSL_STORE_INFO_set0_NAME_description,
OSSL_STORE_INFO_new_PARAMS, OSSL_STORE_INFO_new_PKEY, OSSL_STORE_INFO_new_CERT,
-OSSL_STORE_INFO_new_CRL - Functions to manipulate OSSL_STORE_INFO objects
+OSSL_STORE_INFO_new_CRL - Functions to manipulate OSSL_STORE_INFO objects
=head1 SYNOPSIS
@@ -117,10 +117,10 @@ used by the application to get the objects in that file.
This can be applied to all schemes that can somehow support a listing
of object URIs.
-For C<file:> URIs that are used without the explicit scheme, or paths
-given to L<OSSL_STORE_open_file(3)>, the returned name will be the path of
-each object, so if C</foo/bar> was given and that path has the file
-C<cookie.pem>, the name C</foo/bar/cookie.pem> will be returned.
+For C<file:> URIs that are used without the explicit scheme, the
+returned name will be the path of each object, so if C</foo/bar> was
+given and that path has the file C<cookie.pem>, the name
+C</foo/bar/cookie.pem> will be returned.
At the discretion of the loader that was used to get these names, an
extra description may be attached as well.
diff --git a/doc/man3/OSSL_STORE_open.pod b/doc/man3/OSSL_STORE_open.pod
index 1a2626c..0bc6d5c 100644
--- a/doc/man3/OSSL_STORE_open.pod
+++ b/doc/man3/OSSL_STORE_open.pod
@@ -99,26 +99,14 @@ OSSL_STORE_register_loader().
=head1 NOTES
-When unsure whether a given string contains a simple file or directory
-reference, or if it's a full blown URI, the question is how to figure
-that out.
-One way is to try OSSL_STORE_open_file() and if that fails, try
-OSSL_STORE_open().
-The other way is the other way around.
-Either way you choose, there are corner cases,
-F<file:/foo/bar/cookie.txt> might very will be a simple file reference
-on a system that supports the notion of volumes.
-
-This manual won't tell you which way is better, that's up to each
-application developer to decide on their own.
-However, there are some tools that can be used together with
+A string without a scheme prefix (that is, a non-URI string) is
+implicitly interpreted as using the F<file:> scheme.
+
+There are some tools that can be used together with
OSSL_STORE_open() to determine if any failure is caused by an unparsable
URI, or if it's a different error (such as memory allocation
failures); if the URI was parsable but the scheme unregistered, the
top error will have the reason C<OSSL_STORE_R_UNREGISTERED_SCHEME>.
-If you decide to use OSSL_STORE_open() with OSSL_STORE_open_file() as a
-fallback, those reasons can be good tools to decide if the fallback
-should be taken or not.
=head1 RETURN VALUES
diff --git a/doc/man7/ossl_store.pod b/doc/man7/ossl_store.pod
index 59cfc7c..71cb27d 100644
--- a/doc/man7/ossl_store.pod
+++ b/doc/man7/ossl_store.pod
@@ -59,16 +59,12 @@ only).
=head2 A generic call
- /*
- * There is also a OSSL_STORE_open_file() that can be used for file paths
- * that can't be represented as URIs, such as Windows backslashes
- */
OSSL_STORE_CTX *ctx = OSSL_STORE_open("file:/foo/bar/data.pem");
/*
* OSSL_STORE_eof() simulates file semantics for any repository to signal
* that no more data can be expected
- */
+ */
while (!OSSL_STORE_eof(ctx)) {
OSSL_STORE_INFO *info = OSSL_STORE_load(ctx);
diff --git a/include/openssl/store.h b/include/openssl/store.h
index c6948f2..43cf203 100644
--- a/include/openssl/store.h
+++ b/include/openssl/store.h
@@ -114,8 +114,7 @@ int OSSL_STORE_close(OSSL_STORE_CTX *ctx);
/*
* Functions to generate OSSL_STORE_INFOs, one function for each type we
- * support having in them. Along with each of them, one macro that
- * can be used to determine what types are supported.
+ * support having in them, as well as a generic constructor.
*
* In all cases, ownership of the object is transfered to the OSSL_STORE_INFO
* and will therefore be freed when the OSSL_STORE_INFO is freed.
More information about the openssl-commits
mailing list