diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7f92aacd1ae26b5eff5c0ea46e2a704cdd4c6f7..ab80ae61e70457708d1a49fe9c9a7ca2e46bcdd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -247,7 +247,7 @@ jobs: run: | case "${{ matrix.library.name }}" in "openssl") - url="https://openssl.org/source${{ matrix.library.dl-path }}/openssl-${{ matrix.library.version }}.tar.gz" + url="https://www.openssl.org/source${{ matrix.library.dl-path }}/openssl-${{ matrix.library.version }}.tar.gz" tar_flags="--strip-components=1" ;; "libressl") diff --git a/openssl/src/pkey.rs b/openssl/src/pkey.rs index 8f0b5bdf707e614b8559f7cf493aa0010196c07d..42f40cec370017f97ddca919f6b3e9304dd05dc4 100644 --- a/openssl/src/pkey.rs +++ b/openssl/src/pkey.rs @@ -747,12 +747,22 @@ impl PKey { } impl PKey { - from_pem! { + private_key_from_pem! { /// Decodes a PEM-encoded SubjectPublicKeyInfo structure. /// /// The input should have a header of `-----BEGIN PUBLIC KEY-----`. #[corresponds(PEM_read_bio_PUBKEY)] public_key_from_pem, + + /// Decodes a PEM-encoded SubjectPublicKeyInfo structure. + #[corresponds(PEM_read_bio_PUBKEY)] + public_key_from_pem_passphrase, + + /// Decodes a PEM-encoded SubjectPublicKeyInfo structure. + /// + /// The callback should fill the password into the provided buffer and return its length. + #[corresponds(PEM_read_bio_PrivateKey)] + public_key_from_pem_callback, PKey, ffi::PEM_read_bio_PUBKEY }