How do I load a X509 Certificate Request in PHP?
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.
精彩评论