PHP Classes

Undefined variable: pkeyCreated in ..RSA key creation failed..

Recommend this page to a friend!

      Encryption Helper  >  All threads  >  Undefined variable: pkeyCreated in...  >  (Un) Subscribe thread alerts  
Subject:Undefined variable: pkeyCreated in...
Summary:Undefined variable: pkeyCreated in ..RSA key creation failed..
Messages:5
Author:Tauhidul Alam
Date:2018-01-28 14:21:39
 

  1. Undefined variable: pkeyCreated in...   Reply   Report abuse  
Picture of Tauhidul Alam Tauhidul Alam - 2018-01-28 14:21:39
I need to encrypt form data before sending it to server.

I found a nice solution form:

phpclasses.org/blog/package/9912/po ...

I downloading it and put at my home folder /hdesk/

but after run it from url https://localhost/cryptopost/test.php

it shows the below error:

Notice: Undefined variable: pkeyCreated in C:\xampp\htdocs\hdesk\cryptopost\Cryptopost.class.php on line 53
RSA key creation failed

Please give advice and solution.

  2. Re: Undefined variable: pkeyCreated in...   Reply   Report abuse  
Picture of Tauhidul Alam Tauhidul Alam - 2018-01-28 15:25:43 - In reply to message 1 from Tauhidul Alam
I am using xampp

Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/5.6.28

not working for at any browser.

I've tried to set configuration
c:>set OPENSSL_CONF=C:\xampp\htdocs\hdesk\cryptopost\openssl.cnf

but ho hope.

it always shows:

Notice: Undefined variable: pkeyCreated in C:\xampp\htdocs\hdesk\cryptopost\Cryptopost.class.php on line 53
RSA key creation failed

  3. Re: Undefined variable: pkeyCreated in...   Reply   Report abuse  
Picture of Michael Cummings Michael Cummings - 2018-02-12 16:12:18 - In reply to message 2 from Tauhidul Alam
Sorry haven't tried to help you yet but I'm a full-time student right now and it's mid-term testing time I'll try to look at your problem later this week or maybe on the weekend.

  4. Re: Undefined variable: pkeyCreated in...   Reply   Report abuse  
Picture of Mladen Hosni Mladen Hosni - 2019-08-18 20:05:20 - In reply to message 2 from Tauhidul Alam
When I'm using full path:
$crypto = new EncryptPost(1024, 'C:/xampp/htdocs/cryptopost/openssl.cnf');

everything works OK.

  5. Re: Undefined variable: pkeyCreated in...   Reply   Report abuse  
Picture of Mladen Hosni Mladen Hosni - 2019-08-18 20:07:02 - In reply to message 2 from Tauhidul Alam
For further debugging use:

$pkey = openssl_pkey_new($config);
if(false === $pkey) {
echo openssl_error_string();
die;
}