开发者

How do I load a X509 Certificate Request in PHP?

开发者 https://www.devze.com 2023-04-11 10:30 出处:网络
openssl_csr_export is able to take a request and export 开发者_如何学JAVAit as a string, but where is the opposite function which takes in the request and returns the resource?Using phpseclib a pure P

openssl_csr_export is able to take a request and export 开发者_如何学JAVAit as a string, but where is the opposite function which takes in the request and returns the resource?


Using phpseclib a pure PHP CSR encoder / decoder:

<?php
include('File/X509.php');

$x509 = new File_X509();
print_r($x509->loadCSR('...'));
?>


You can't do the opposite and there really shouldn't be any need to do it anyway - all you can do with a CSR resource is either to sign it or export it but no editing.

To sign a CSR you can use the exported string value, no need to use CSR resource for that.

0

精彩评论

暂无评论...
验证码 换一张
取 消