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:
No. I am developing a project using the openssl functions in the PHP. These certificates, that I generate, aren“t to use as web certificate. I will use this certificate to prove that a user submited a file for me, for example. It's a aplication very unusual. Condensing, before generate a certificate, I have to generate a request certificate, ok? I do this using openssl_csr_new function. I only want to know how I can read a certificate request. To read the certificate(.PEM) I use the openssl_X509_parse, how I showed in my last comment, but I also need to read the certificate request. How can I read it? Is there a openssl_????_parse to read a certificate request? Thanks! Previous Comments: ------------------------------------------------------------------------ [2006-10-03 01:02:47] [EMAIL PROTECTED] By request, do you mean from an url? like https://example.com? ------------------------------------------------------------------------ [2006-10-03 00:54:21] bassijunior at yahoo dot com dot br 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!! ------------------------------------------------------------------------ [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