personium / ansible

Ansible files to set up a Personium unit.
Apache License 2.0
12 stars 15 forks source link

Is `-outform DER` correct in generating RSA key? #142

Closed yoh1496 closed 3 years ago

yoh1496 commented 4 years ago

When I set up my new Unit, I look this guide for generating Self-Signed Unit certificate. https://github.com/personium/ansible/blob/develop/How_to_generate_Self-signed_Unit_Certificate.md

It tells me to use below command to generate RSA key.

openssl genrsa -out unit.key 2048 -outform DER

But, in my environment, -outform DER was treated as Extra arguments and the command is failed.

$ openssl version
OpenSSL 1.1.1  11 Sep 2018

$ openssl genrsa -out unit.key 2048 -outform DER
Extra arguments given.
genrsa: Use -help for summary.

Certainly, it seems that openssl-genrsa does not have an option -outform. https://www.openssl.org/docs/man1.1.1/man1/openssl-genrsa.html

In addition, the file specified by io.personium.core.x509.key is expected to be a PEM file. https://github.com/personium/personium-core/blob/develop/src/main/resources/personium-unit-config-default.properties#L125

I think -outform DER is useless or incorrect option. So, how about removing -outform DER option from the guide?