|  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
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
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-30 18:53 UTC]
-Package: Feature/Change Request +Package: OpenSSL related
 [2017-11-13 10:27 UTC]
-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]
There's $publicKey = openssl_pkey_get_details($res)["key"];
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Mar 02 21:01:24 2021 UTC