473,396 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

openssl_pkey_new()

Has anyone had any luck with this function on any platform? Or have
any insight?

I'm hoping to use the OpenSSL module to encrypt data in a database (no
https or certification stuff necessary). (public key on server...
private key all nice n secure...)

I've been able to work with the example keys that came with the
distrobution just fine but have been unable generate my own..

<?php
$privkey = openssl_pkey_new();
while ( ($e = openssl_error_string()) !== false )
debug($e);
?>

On NT this outputs:
outputs:
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value

On Solaris, I get:
Warning: openssl_pkey_new() [function.openssl-pkey-new]: unable to
load random state; not enough random data!
Jul 17 '05 #1
1 5373
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brad Kent wrote:
Has anyone had any luck with this function on any platform? Or have
any insight?

I'm hoping to use the OpenSSL module to encrypt data in a database (no
https or certification stuff necessary). (public key on server...
private key all nice n secure...)


[snip]

Just wondering - how can the private key by "nice n secure" if a script
running on a web-server can access/use it?

Fred Emmott
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAml7Sima0zti2BQgRAoleAJ93vIK4AmZcNB66uThlQ+ 7Pyion3ACfeDaX
7c1dIDZFDELSHPG60IWBHns=
=ICi+
-----END PGP SIGNATURE-----
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tetedeiench | last post by:
Hi ! I am currently changing the server for my website, and i make a heavy use of openssl functions. Both servers use PHP4.3.3 with OpenSSL 0.9.6i. I was actually testing with this code,...
0
by: Brad Kent | last post by:
I need a little shove in the right direction. I've got the openSSL extension successfully installed for PHP http://www.php.net/manual/en/ref.openssl.php But I'm not having any luck using it. ...
4
by: Chuck Anderson | last post by:
I use apache, Php and MySql on my Windows XP machine at home. I have been doing so successfully now for a long time. However, I am now trying to use fopen to open secure URLs (https) and having...
1
by: xer | last post by:
I want to generate ssl certificate (with public key) and private key. My code: $ssl_configargs = array( "digest_alg" => "sha1", "private_key_bits" => 2048, "private_key_type" =>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.