ID: 38937 User updated by: bassijunior at yahoo dot com dot br Reported By: bassijunior at yahoo dot com dot br -Status: Feedback +Status: Open Bug Type: Feature/Change Request Operating System: Windows XP PHP Version: 5.1.6 New Comment:
For example, with a openssl_X509_parse function() I can print the certificate. But I need to do this with a request created by openssl_csr_new() function. I oopen the certificate and I print this: <?php . . . $cert = "$pwd\\demoCA\\user_cert_signed.pem"; $fp = fopen ($cert, "rb", 1); if($fp===false) { echo "Erro abrindo arquivo"; exit; } $conteudo = addslashes(fread ($fp, filesize($cert))); //$cert_dados = file_get_contents($cert); $nome=openssl_x509_parse($conteudo); print_r($nome["subject"]["CN"]); print_r($nome["subject"]["C"]); print_r($nome["subject"]["ST"]); print_r($nome["subject"]["L"]); . . . ?> I want to do this with request too, and not only with a certificate. Thanks!! Previous Comments: ------------------------------------------------------------------------ [2006-10-03 00:17:03] [EMAIL PROTECTED] What are you trying to do? Parse a peer certicate? ------------------------------------------------------------------------ [2006-10-02 23:21:05] bassijunior at yahoo dot com dot br Hi, Some news about that????? Nobody answers me... Thanks!! ------------------------------------------------------------------------ [2006-09-23 20:12:18] bassijunior at yahoo dot com dot br Description: ------------ I need to open a certificate request like one array, like I did with the X.509 certificate. To verify a X.509 certificate I use openssl_x509_parse( mixed x509cert [, bool shortnames]). And about the certificate request? I want to do the same that i did with certificate.How Can read it? Is there any function to do that? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38937&edit=1