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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: joco at irckecel dot hu
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC