Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
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 -newca but that doesn't seem to work.

share|improve this question
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):

share|improve this answer

Your Answer


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.