Skip to content

Instantly share code, notes, and snippets.

@prof3ssorSt3v3
Created October 27, 2017 20:04
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save prof3ssorSt3v3/a9677c00c11e4607dce6c200dc3a0473 to your computer and use it in GitHub Desktop.
Save prof3ssorSt3v3/a9677c00c11e4607dce6c200dc3a0473 to your computer and use it in GitHub Desktop.
[req]
default_bits= 2048
prompt= no
default_md= sha256
distinguished_name = dn
[dn]
C = CA
ST = ON
L = Ottawa
O = End Point
OU = Testing Domain
emailAddress = yourname@yourdomain.com
CN = localhost
@hqbefree
Copy link

:-( Not working
#create the private key for the certificate (server.key)
openssl req -new -sha256 -nodes -out server.csr -newkey rsa:2048 -keyout server.key -config <(cat server.csr.cnf)

#generate server.crt
openssl x509 -req -in server.csr -CA ~/ssl/rootCA.perm -CAkey ~/ssl/rootCA.key -CAcreateserial -out server.crt -days 500 -sha256 -extfile v3.ext

unable to find 'distinguished_name' in config
problems making Certificate Request
140735668134856:error:0E06D06C:configuration file routines:NCONF_get_string:no value:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.50.3/libressl/crypto/conf/conf_lib.c:323:group=req name=distinguished_name
PRIVAT-MBP:~ internet$ openssl x509 -req -in server.csr -CA /ssl/rootCA.perm -CAkey /ssl/rootCA.key -CAcreateserial -out server.crt -days 500 -sha256 -extfile v3.ext
error loading the config file 'v3.ext'
PRIVAT-MBP:
internet$ openssl x509 -text -in server.crt -noout
Error opening Certificate server.crt
140735668134856:error:02001002:system library:fopen:No such file or directory:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.50.3/libressl/crypto/bio/bss_file.c:255:fopen('server.crt', 'r')
140735668134856:error:20074002:BIO routines:FILE_CTRL:system lib:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.50.3/libressl/crypto/bio/bss_file.c:257:
unable to load certificate
PRIVAT-MBP:
internet$

@ddddeano
Copy link

:-( Not working
#create the private key for the certificate (server.key)
openssl req -new -sha256 -nodes -out server.csr -newkey rsa:2048 -keyout server.key -config <(cat server.csr.cnf)

#generate server.crt
openssl x509 -req -in server.csr -CA ~/ssl/rootCA.perm -CAkey ~/ssl/rootCA.key -CAcreateserial -out server.crt -days 500 -sha256 -extfile v3.ext

unable to find 'distinguished_name' in config
problems making Certificate Request
140735668134856:error:0E06D06C:configuration file routines:NCONF_get_string:no value:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.50.3/libressl/crypto/conf/conf_lib.c:323:group=req name=distinguished_name
PRIVAT-MBP:~ internet$ openssl x509 -req -in server.csr -CA /ssl/rootCA.perm -CAkey /ssl/rootCA.key -CAcreateserial -out server.crt -days 500 -sha256 -extfile v3.ext error loading the config file 'v3.ext' PRIVAT-MBP: internet$ openssl x509 -text -in server.crt -noout Error opening Certificate server.crt 140735668134856:error:02001002:system library:fopen:No such file or directory:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.50.3/libressl/crypto/bio/bss_file.c:255:fopen('server.crt', 'r') 140735668134856:error:20074002:BIO routines:FILE_CTRL:system lib:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.50.3/libressl/crypto/bio/bss_file.c:257: unable to load certificate PRIVAT-MBP: internet$

Did you find a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment