prexer $ cat /proc/version Linux version 4.18.0-25-generic (buildd@lcy01-amd64-025) (gcc version 8.3.0 (Ubuntu 8.3.0-6ubuntu1~18.10.1)) #26-Ubuntu SMP Mon Jun 24 09:32:08 UTC 2019
openssl工具版本信息:
1 2
prexer $ openssl version OpenSSL 1.1.1 11 Sep 2018
python3版本信息:
1 2
prexer $ python3 --version Python 3.8.5
docker版本信息:
1 2
prexer $ docker --version Docker version 18.09.7, build 2d0083d
prexer $ sudo openssl genrsa -des3 -out ca-key.pem Generating RSA private key, 2048 bit long modulus (2 primes) ...................................................................+++++ ......................+++++ e is 65537 (0x010001) Enter pass phrase for ca-key.pem: Verifying - Enter pass phrase for ca-key.pem:
prexer $ sudo openssl req -new -x509 -days 365 -key ca-key.pem -out ca.pem Enter pass phrase for ca-key.pem: Can't load /home/wei/.rnd into RNG 140197562365120:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/home/wei/.rnd You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]: State or Province Name (full name) [Some-State]: Locality Name (eg, city) []: Organization Name (eg, company) [Internet Widgits Pty Ltd]: Organizational Unit Name (eg, section) []: Common Name (e.g. server FQDN or YOUR name) []:prexer.gitee.io Email Address []:
prexer $ sudo openssl genrsa -des3 -out server-key.pem Generating RSA private key, 2048 bit long modulus (2 primes) .........+++++ .............................................+++++ e is 65537 (0x010001) Enter pass phrase for server-key.pem: Verifying - Enter pass phrase for server-key.pem:
prexer $ sudo openssl req -new -key server-key.pem -out server.csr Enter pass phrase for server-key.pem: Can't load /home/wei/.rnd into RNG 139737719624896:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/home/wei/.rnd You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]: State or Province Name (full name) [Some-State]: Locality Name (eg, city) []: Organization Name (eg, company) [Internet Widgits Pty Ltd]: Organizational Unit Name (eg, section) []: Common Name (e.g. server FQDN or YOUR name) []:* Email Address []:
Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
prexer $ sudo openssl genrsa -des3 -out client-key.pem Generating RSA private key, 2048 bit long modulus (2 primes) .............+++++ ...................................+++++ e is 65537 (0x010001) Enter pass phrase for client-key.pem: Verifying - Enter pass phrase for client-key.pem:
prexer $ sudo openssl req -new -key client-key.pem -out client.csr Enter pass phrase for client-key.pem: Can't load /home/wei/.rnd into RNG 140471898436800:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/home/wei/.rnd You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]: State or Province Name (full name) [Some-State]: Locality Name (eg, city) []: Organization Name (eg, company) [Internet Widgits Pty Ltd]: Organizational Unit Name (eg, section) []: Common Name (e.g. server FQDN or YOUR name) []: Email Address []:
Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []: