Getting the error "Error loading private server key"

So, I did the tide in the Orion Context Broker server instance and whenever I try to run contextBroker with the following command:

contextBroker -rush localhost:1234 -https -key privkey.pem -cert cert.csr 

I get the following error:

 E@18 :16:11 loadFile[1101]: error opening 'privkey.pem': No such file or directory X@18 :16:11 main[1258]: Error loading private server key from 'privkey.pem' 

I generated my private key with the following command, I do not know if this is correct:

 openssl genrsa -des3 -out privkey.pem 2048 

And I generated my certificate with the following command:

 openssl req -new -key privkey.pem -out cert.csr 

Am I doing something wrong?

+1
source share
1 answer

You must use absolute path names, i.e.:

 contextBroker -rush localhost:1234 -https -key /path/to/privkey.pem -cert /path/to/cert.csr 

In addition to consolidating console commands , a note has been added.

In addition, you can find the following script to create the necessary files:

 ... openssl genrsa -out "$keyFileName" 1024 > /dev/null 2>&1 openssl req -days 365 -out "$certFileName" -new -x509 -key "$keyFileName" -subj "$OPTIONS" > /dev/null 2>&1 
0
source

Source: https://habr.com/ru/post/1208178/


All Articles