Code Monkey home page Code Monkey logo

sslcert-cli's Introduction

sslcert-cli

Tag License

sslcert-cli is a command line tool that create SSL certificate files such as a private key, CSR, and CRT.

Usage

sslcert-cli 1.1.0

Create SSL certificate files such as a private key, CSR, and CRT.

Usage:
    sslcert-cli [-f] [-o OUTPUT_DIR] [-l KEY_BIT_LENGTH] [-p KEY_PASS_PHRASE] [-s SUBJECT] [-S] [-A SUBJECT_ALT_NAMES] [-D EXPIRE_DAYS] -n FQDN
    sslcert-cli -c FQDN_CSR_FILE
    sslcert-cli -c FQDN_CRT_FILE

Default options:
    -o Output directory (default: FQDN/YYYY-MM-DD/)
    -l Key bit length (default: 2048)
    -d Expiration date of self-signed certificate file (default: 365)

Examples:
    Create private key and CSR files:
        sslcert-cli -n example.org

    Create private key with pass phrase and CSR files:
        KEY_PASS_PHRASE=$(read -s -p "KEY_PASS_PHRASE: " KEY_PASS_PHRASE; echo ${KEY_PASS_PHRASE})
        sslcert-cli -p "${KEY_PASS_PHRASE}" -n example.org

    Create private key and CSR files with a specified request subject:
        sslcert-cli -n example.org \
          -s "/C=JP/ST=Tokyo/L=Shinjuku-ku/O=Example Corporation/OU=Example Group/CN=example.org/[email protected]"

    Create private key and CSR files in a specific output directory:
        sslcert-cli -o /path/to/output/ -n example.org

    Create private key and CSR files in a specific output directory with overwrite:
        sslcert-cli -o /path/to/output/ -n example.org -f

    Create private key, CSR and self-signed CRT files with an expiration date of 3650 days:
        sslcert-cli -n example.org
          -s "/C=JP/ST=Tokyo/L=Shinjuku-ku/O=Example Corporation/OU=Example Group/CN=example.org/[email protected]" \
          -S -A "*.example.org,example.com" \
          -D 3650

    Check CSR file:
        sslcert-cli -c example.org.csr

    Check CRT file:
        sslcert-cli -c example.org.crt

Server configuration examples:
    Apache:
        SSLCertificateFile /path/to/example.org.crt
        SSLCertificateKeyFile /path/to/example.org.key
        SSLCertificateChainFile /path/to/example.org.ca.crt

    nginx:
        ssl_certificate /path/to/example.org.crt;
        ssl_certificate_key /path/to/example.org.key;

License

MIT

Author

Jun Futagawa (jfut)

sslcert-cli's People

Contributors

jfut avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

sslcert-cli's Issues

No -s option does not work when -S option is used

$ ./sslcert-cli -n example.org -S
# Generate rand file: example.org/2023-10-14/tmp.io44ypKqQG
Enter pass phrase for new private key:
# Generate new private key: example.org/2023-10-14/example.org-pass.key
Generating RSA private key, 2048 bit long modulus (2 primes)
..............................................................................+++++
.................+++++
e is 65537 (0x010001)
# Unlock private key file: example.org/2023-10-14/example.org.key
writing RSA key
# Generate CSR file: example.org/2023-10-14/example.org.csr
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) [XX]:JP
State or Province Name (full name) []:
Locality Name (eg, city) [Default City]:
Organization Name (eg, company) [Default Company Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:example.com
Email Address []:

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
# Generate CA private key and CRT files: example.org/2023-10-14/example.org.ca.crt
name is expected to be in the format /type0=value0/type1=value1/type2=... where characters may be escaped by \. This name is not in that format: ''
problems making Certificate Request

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.