In this tutorial im going to solve this erorr openssl_pkey_export(): cannot get key from parameter 1, this error is coming when try to generate public and private key.
![](https://www.devopsfreelancer.com/blog/wp-content/uploads/2023/05/image-41-1024x394.png)
Error :- openssl_pkey_export(): cannot get key from parameter 1
Solution :-
First go to control panel and open -> View Advance system settings
![](https://www.devopsfreelancer.com/blog/wp-content/uploads/2023/05/image-43-1024x458.png)
Open Environments variables.
![](https://www.devopsfreelancer.com/blog/wp-content/uploads/2023/05/image-44-1024x493.png)
Copy variable name -> OPENSSL_CONF
Next go to xampp and copy below code
C:\xampp\apache\conf\openssl.cnf
![](https://www.devopsfreelancer.com/blog/wp-content/uploads/2023/05/image-45-1024x576.png)
Next restart your system. Hopefully your problem has been resolved.