On the issue of PHP public key cryptography
I am going to use PHP's own SSL function to complete the cryptographic work of the public key. However, when accessing this test.php file, the Web page will always load, and IE will prompt the page not to display. Please look at the big God, is not my code is wrong, or what other problems. Because the PHP editor does not have an error, I suspect that it is my Apache server configuration problem.
The code is as follows:
Rsa
$source = "Test";
echo "
". $source."
";
$FP =fopen ("Ca.crt", "R");//ca.crt is X509 certificate file
$pub _key=fread ($fp, 8192);
Fclose ($FP);
Openssl_get_publickey ($pub _key);
Openssl_public_encrypt ($source, $crypttext, $pub _key);
echo "String crypted: $crypttext";
?>
------Solution--------------------
CA.CRT and test.php in the same directory?
Try the absolute catalogue.
------Solution--------------------
What about under Firefox? Did you open the error prompt?