OSSL_STORE: Treat URIs as files first (with exceptions), then as full URIs
authorRichard Levitte <levitte@openssl.org>
Tue, 11 Jul 2017 09:54:00 +0000 (11:54 +0200)
committerRichard Levitte <levitte@openssl.org>
Sat, 15 Jul 2017 16:53:07 +0000 (18:53 +0200)
commitae9c39d83aa0f993e382cf913cb4fd84fc25d03d
treee8b8bab1a1e969773c9727b03e41734dfc0225c3
parentba476aa32c2de4c652f2fdb148981f7d1ea6cae1
OSSL_STORE: Treat URIs as files first (with exceptions), then as full URIs

To handle paths that contain devices (for example, C:/foo/bar.pem on
Windows), try to "open" the URI using the file scheme loader first,
and failing that, check if the device is really a scheme we know.

The "file" scheme does the same kind of thing to pick out the path
part of the URI.

An exception to this special treatment is if the URI has an authority
part (something that starts with "//" directly after what looks like a
scheme).  Such URIs will never be treated as plain file paths.

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3907)
crypto/store/loader_file.c
crypto/store/store_lib.c