Install a key pair on Edge- Public Key generation error

Not applicable

Hi, I'm getting the following error while generating a public key. What is the resolution for this error?

$ edgemicro cert install -o swapnaadusu07 -e test -u swapna.adusu07@xxx.com

org admin password:

Error Response:

[Error: Invalid openssl exit code: 1 % openssl req -new -sha256 -subj /CN=localhost -key C:\Users\SADUSU~1\AppData\Lo cal\Temp\8ad3fe37dc983311407d0dce50107b90748b9c39 Unable to load config info from /usr/local/ssl/openssl.cnf ] 'Error: Invalid openssl exit code: 1\n% openssl req -new -sha256 -subj /CN=loc alhost -key C:\\Users\\SADUSU~1\\AppData\\Local\\Temp\\8ad3fe37dc983311407d0dce5 0107b90748b9c39\nUnable to load config info from /usr/local/ssl/openssl.cnf\r\n\ n at done (c:\\Users\\sadusumilli\\Github\\apigee-edge-micro-1.0.1\\edgemicro -cli\\node_modules\\pem\\lib\\pem.js:866:30)\n at ChildProcess.<anonymous> (c :\\Users\\sadusumilli\\Github\\apigee-edge-micro-1.0.1\\edgemicro-cli\\node_modu les\\pem\\lib\\pem.js:883:13)\n at ChildProcess.emit (events.js:110:17)\n at maybeClose (child_process.js:1015:16)\n at Process.ChildProcess._handle.on exit (child_process.js:1087:5)'

Thanks in Advance.

0 10 673
10 REPLIES 10

prabhat
Participant V

Looks like we are making some assumption about where files are found on system which works for *nix but does not work for Windows or something in your setup. Some other customers have it working on Windows.

We probably would have to push a fix but in mean time can you try as suggested http://stackoverflow.com/questions/14459078/unable-to-load-config-info-from-usr-local-ssl-openssl-cn...

@prabhat Thanks. ok. I have tried all he things in the above link but not working fine.

Please let us know when it is fixed and also steps to work on windows. Thanks!

Not applicable

The key pair generation system relies on Open SSL. It looks like you have openssl installed on your system, but it's unable to run it... possibly because it's misconfigured (see the err message about loading the config).

Basically, you'll probably need to set the OPENSSL_CONF environment variable to something like this: C:\OpenSSL-Win32\bin\openssl.cfg

Please see this for more information: http://stackoverflow.com/questions/14459078/unable-to-load-config-info-from-usr-local-ssl-openssl-cn...

@Scott Ganyo Thanks for the response. I'm able to create the openssl certificate successfully in my system with the commands available in the above link. But the below command has to work to install the certificate on edge. This command still giving the above error message only. Please advise. Thanks!

Command:

edgemicro cert install o <org> e <env> u jdoe@example.com

If you are able to run it from the command line, it would definitely seem to be an environment issue. Have you tried setting the OPENSSL_CONF environment variable globally? Rebooting your system?

@Scott GanyoThank you. yes I tried with OPENSSL_CONF environment variable globally and also rebooting the system.

Hmm. This is very strange since we've had other customers on Windows be able to generate their keys. What is your Windows environment?

@Scott Ganyo. It is Windows 7 64-bit operating system. All other users tried on trail org or paid org? Please confirm it should work fine on trail org also. Thanks!

Steps are documented and attached the same. Thanks!steps-to-install-cert-on-edge.zip

openssl.zip@Alex Toombs I have attached the openssl.cfg file.