Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
openssl genrsa -out server.key 1024
openssl req -new -key server.key -out lawson.csr
openssl ca -out lawson.pem -infiles server.csr

I'm trying to generate key's and crt's for postfix, but every time when I want to do the certifaction authority part it gives me this error :

Using configuration from /usr/lib/ssl/openssl.cnf
Error opening CA private key ./demoCA/private/cakey.pem
29899:error:02001002:system library:fopen:No such file or directory:bss_file.c:356:fopen('./demoCA/private/cakey.pem','r')
29899:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:358:

I've tried using CA.sh -newca but that doesn't seem to work.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Do you have a CA key generated already? If not, you might want to generate one.

share|improve this answer

Did you add a serial for your CA (it's just a counter that increments each time you sign with CA): http://bookmarks.honewatson.com/2008/05/08/error-opening-ca-private-key-democaprivatecakeypem/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.