php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #26435 No possibility to export public key in PEM format
Submitted: 2003-11-27 07:32 UTC Modified: 2017-11-13 10:27 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: joco at irckecel dot hu Assigned: kelunik (profile)
Status: Closed Package: OpenSSL related
PHP Version: 4.3.4 OS: Linux
Private report: No CVE-ID: None
 [2003-11-27 07:32 UTC] joco at irckecel dot hu
Description:
------------
there is a way to export private keys into strings, but there isn't a way to do the same with public keys. it seems like a workaround that i should create a certificate and sign it, and it's the only way openssl_pkey_get_public works. isn't there a standard way to export only public keys in PEM format?

i know openssl_sign is experimental, but maybe this helps: it only outputs binary data, maybe there's again a standard way to make base64-like signatures.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-30 18:53 UTC] cmb@php.net
-Package: Feature/Change Request +Package: OpenSSL related
 [2017-11-13 10:27 UTC] kelunik@php.net
-Summary: openssl improvements again +Summary: No possibility to export public key in PEM format -Status: Open +Status: Closed -Assigned To: +Assigned To: kelunik
 [2017-11-13 10:27 UTC] kelunik@php.net
There's $publicKey = openssl_pkey_get_details($res)["key"];
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Nov 24 13:01:23 2020 UTC