-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.5.1
-
Component/s: Networking, Security
-
Labels:None
-
Environment:Amazon Linux EC2, amazon linux build for 2.5.1
-
ALL
I'm currently testing the x.509 authentication feature. I'm unable to start up mongod via
mongod --dpath <path> --logpath <logpath> --fork --sslOnNormalPorts --sslPEMKeyFile <path to sslCertificate and key PEM file> --sslCAFile <path to root CA PEM file>
The error that I'm receiving is as follows:
Tue Aug 13 04:25:10.373 ERROR: cannot read PEM key file: /home/ec2-user/mongodb.pem error:0906D06C:PEM routines:PEM_read_bio:no start line
I've attached the PEM files. The PEM files were generated with the following commands and configurations (openssl.cnf is attached).
Root CA Key/Cert:
sudo openssl req -new -x509 -days 365 -nodes -out mongodbCA.crt -keyout mongodbCA.key
Client Pem:
sudo openssl req -newkey rsa:1024 -nodes -sha1 -keyout mongodb.key -keyform PEM -out mongodb.req -outform PEM
sudo openssl ca -in mongodb.req -out mongodb.pem