Search the Community
Showing results for tags 'ssl certificates'.
-
I am working on below things: Generate CSR(Certificate Signing Request) Upload SSL Certificates To generate SSL certificate I am using something like: $privkey = openssl_pkey_new(); $csr = openssl_csr_new($dn, $privkey); $sscert = openssl_csr_sign($csr, null, $privkey, $days); openssl_csr_export($csr, $csrout); openssl_pkey_export($privkey, $pkeyout, $_POST['password']); openssl_pkey_export_to_file($privkey, "<path/to/store/server.key>"); openssl_csr_export_to_file($csr, "/tmp/".<domain-name>.".csr"); Now using CSR request, I am able to generate <domain-name.cer>,<DigitalCert.cer>. Now once I upload this(.cer) certificates, I need to verify those certificates. Reason: Someone generated these certificates on say "a.com" and tries to upload on "b.com". this should not happen, so I want to validate the uploaded SSL certificates. In PHP, we have $ok = openssl_verify($data, $signature, $pubkeyid); but i am not able to get what things would be treated as $data, $signature and $pubkeyid based on the above certificate generation process. Please help me on this. Sample code will be really appreciated Eagerly waiting for the reply . Thanks, Viren Ajmera
- 1 reply
-
- verify ssl
- ssl certificates
-
(and 2 more)
Tagged with:
-
Need suggestion on reading ssl certificates through php
skyracer85 posted a topic in PHP Coding Help
Hi Members, In our company everyone having a ssl certificate in browser, which has details about the employee number. I need to build a php application, it has to be automatically logged in based on the certificate. Can you please guide me how can i read those certificates for automatic login of my php page. Regards, Rajesh