sookyboo
-
Posts
4 -
Joined
-
Last visited
Never
Posts posted by sookyboo
-
-
it does, I can display the file's content with an echo.
-
I have a .cer file (generated from a jsp server I think).
I need to extract it's public key and use the public key to encrypt a value...
I get these errors:
Warning: openssl_x509_read() [function.openssl-x509-read]: supplied parameter cannot be coerced into an X509 certificate! in /public_html/test/cert.php on line 26
Warning: openssl_x509_free() expects parameter 1 to be resource, string given in /public_html/test/cert.php on line 34
$fp = fopen("/home/x.cer", "r");
$cert = fread($fp, 8192);
fclose($fp);
openssl_x509_read( $cert);
$data = openssl_x509_parse($cert);
print_r($data);
openssl_x509_free( $cert );
Any ideas what is wrong...
Starting to get frustrated...
Thanks in advance
-
Anyone know how to convert this java code to php?
// Take the signature passed, a signed hexadecimal value and
// and convert to a byte array in 2's compliment, big-endian.
// We wrap in a try-catch in case the signature is not a signed
// hexadecimal number
byte[] barray = new BigInteger(signature,16).toByteArray();
Thanks in advance
Convert Java Code to PHP: Convert signed hex value to big-endian binary?
in PHP Coding Help
Posted
thanks I tried:
base_convert($hex, 16, 2);
The binary value is shorter than the hex value though... so... I am npt sure if its right...
I can only test if it really is the right value after I encrypt it, which I am also having trouble with
Thanks very much for the help though
http://www.phpfreaks.com/forums/index.php?topic=168552.new;topicseen#new