seansammut Posted November 21, 2009 Share Posted November 21, 2009 Hi there, I am currently using Openssl to ecrypt data using assymetric encryption although I am having some problems. <?php $config = array("config" => "C:/wamp/bin/apache/Apache2.2.11/conf/openssl.cnf"); $res=openssl_pkey_new($config); // Get private key openssl_pkey_export($res, $privatekey); $publickey=openssl_pkey_get_details($res); $publickey=$publickey["key"]; ?> In the above code I am having problems with the primary key. The public key works and when I use var dump i get a result although with pkey_export all I get is a NULL and the function returns a false. Can you hep me in identifying what's causing the problem? Many thanks, Sean Sammut Link to comment https://forums.phpfreaks.com/topic/182426-openssl-pkey-problem/ Share on other sites More sharing options...
seansammut Posted November 21, 2009 Author Share Posted November 21, 2009 I am quite sure that openssl is configured as it should as I encrypted data using the public key, although I cannot get the private key. I really would appreciate your help. Link to comment https://forums.phpfreaks.com/topic/182426-openssl-pkey-problem/#findComment-962724 Share on other sites More sharing options...
seansammut Posted November 21, 2009 Author Share Posted November 21, 2009 No one can help? Link to comment https://forums.phpfreaks.com/topic/182426-openssl-pkey-problem/#findComment-962833 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.