1

所以我在 Orion Context Broker Server 实例中实现了 rush,每当我尝试使用以下命令启动 contextBroker 时:

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

,我收到以下错误:

 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'

我使用以下命令生成了我的私钥,我不知道它是否正确:

openssl genrsa -des3 -out privkey.pem 2048

我使用以下命令生成了我的证书:

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

我做错了什么吗?

4

1 回答 1

0

您必须使用绝对路径名,即:

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

已在CLI 命令文档中添加了一条注释以使其更清晰。

此外,您可能会发现以下关于如何生成所需文件的脚本很有用:

...
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
于 2014-11-28T17:27:32.390 回答