All Projects → nicolas314 → 2cca

nicolas314 / 2cca

Licence: MIT license
2-cent Certification Authority

Programming Languages

c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to 2cca

Data-Structures-and-Algorithms
This repository contains data structure programs and solutions [ in C++] of a problem using different techniques like Dynamic Programming , Greedy Algorithms , Divide and Conquer , Backtracking etc.
Stars: ✭ 31 (+14.81%)
Mutual labels:  hacktoberfest2020
Sketch2Color-anime-translation
Given a simple anime line-art sketch the model outputs a decent colored anime image using Conditional-Generative Adversarial Networks (C-GANs) concept.
Stars: ✭ 90 (+233.33%)
Mutual labels:  hacktoberfest2020
challenges-back-end
Repositório referente à desafios de Back End da womakerscode
Stars: ✭ 68 (+151.85%)
Mutual labels:  hacktoberfest2020
FinalYear-Project-Ideas
Instead of just adding your name and email, why not create a list of project ideas?
Stars: ✭ 429 (+1488.89%)
Mutual labels:  hacktoberfest2020
kubetools
Kubetools - Curated List of Kubernetes Tools
Stars: ✭ 674 (+2396.3%)
Mutual labels:  hacktoberfest2020
flutter simple shopify
No description or website provided.
Stars: ✭ 83 (+207.41%)
Mutual labels:  hacktoberfest2020
kossiitkgp.github.io
Website of KOSS
Stars: ✭ 29 (+7.41%)
Mutual labels:  hacktoberfest2020
robotframework-seleniumtestability
Extension for SeleniumLibrary that provides manual and automatic waiting for asyncronous events like fetch, xhr, etc.
Stars: ✭ 34 (+25.93%)
Mutual labels:  hacktoberfest2020
flutter-simple-url-preview
Simple url preview package for flutter
Stars: ✭ 30 (+11.11%)
Mutual labels:  hacktoberfest2020
My-Digital-CV
My Digital CV is Interactive Virtual Resume Template which provides basic functionality to develop your own Digital Resume/CV
Stars: ✭ 18 (-33.33%)
Mutual labels:  hacktoberfest2020
camunda-external-task-client-python3
Camunda External Task Client in Python
Stars: ✭ 43 (+59.26%)
Mutual labels:  hacktoberfest2020
awesome-ufma
Uma lista de provas das disciplinas ministradas na Universidade Federal do Maranhão.
Stars: ✭ 63 (+133.33%)
Mutual labels:  hacktoberfest2020
locus-android
An Awesome Kotlin Location library to retrieve location merely in 3 lines of code
Stars: ✭ 280 (+937.04%)
Mutual labels:  hacktoberfest2020
getfem
Mirror of GetFEM repository
Stars: ✭ 23 (-14.81%)
Mutual labels:  hacktoberfest2020
Leetcoding-Challenge
This repository contains Leetcode Challenge Submissions.
Stars: ✭ 26 (-3.7%)
Mutual labels:  hacktoberfest2020
GrowGreen
Grow Green Web App allows users worldwide to create awareness about the environment and do their bit by contributing.
Stars: ✭ 51 (+88.89%)
Mutual labels:  hacktoberfest2020
desktop-app-ui
Official IVPN Desktop app (legacy version)
Stars: ✭ 23 (-14.81%)
Mutual labels:  openvpn
lovelace-light-soft-ui-theme
🎨 Home Assistant soft UI light theme, with help from @JuanMTech, @thomasloven, and @N-l1.
Stars: ✭ 59 (+118.52%)
Mutual labels:  hacktoberfest2020
SquirrelJME
SquirrelJME is a Java ME 8 Virtual Machine for embedded and Internet of Things devices. It has the ultimate goal of being 99.9% compatible with the Java ME standard.
Stars: ✭ 148 (+448.15%)
Mutual labels:  hacktoberfest2020
Hacktoberfest
Hacktoberfest 2020 Beginner's Friendly Repository
Stars: ✭ 46 (+70.37%)
Mutual labels:  hacktoberfest2020

2cca

2-cent Certification Authority

This Python script is meant to replace the easy-rsa scripts found in default installations for OpenVPN. For some reason, it was easier for me to write this tool than to try and understand easy-rsa. Shortest path wins.

Since OpenSSL decided to wreak havoc by mutating their API starting with version 1.1, I decided to stop supporting the C version (May 2017) and will continue supporting the Python version instead.

To avoid any dependency on wrapper libraries, this script uses the openssl command directly, producing temporary configuration files and showing what commands are being executed.

Both versions are MIT-licensed.

Usage:

2cca root
    Create a root CA
    You need to give it a name with CN=NAME
    You may also want to specify:
    - An organization:  O=Bozzos
    - An organization unit: OU=Clowns
    - Some geographical data:
      Country: C=UK
      Locality: L=Cambridge
      State or Province: ST=Cambridgeshire
    - A duration in days -- start validity date is now.
      days=365
    - A key size for an RSA key:
      rsa=4096
    - The name of an elliptic curve instead of RSA:
      ecc=prime256v1

    Example:
    2cca root CN=RootCA O=Bozzos OU=Clowns C=UK L=Cambridge days=365 rsa=4096

2cca sub
    Create a Subordinate CA (optional)
    Same options as above. In addition, you also need to specify which CA
    will sign this new certificate with CA=NAME, like:

    2cca sub CA=RootCA CN=MySubCA O=Bozzos days=364 rsa=4096

2cca server
    Create a server certificate, useful for an OpenVPN server.
    Same options as above. Do not forget to specify the signing CA.

2cca client
    Create a client certificate, useful for an OpenVPN client.
    Same options as above. Do not forget to specify the signing CA.

2cca web
    Create a web server certificate. For this kind of certificate you also
    want to provide Subject Alternative Names using alt=NAME, possibly
    multiple times, like:

    2cca www CA=RootCA CN=www.example.com alt=www.example.com alt=example.com

2cca signcsr
    Sign a Certificate Signing Request, and create a server certificate.
    Specify the CSR file with CSR=myrequest.csr, provide the CN, and do not
    forget to specify the signing CA.

    2cca signcsr CA=RootCA CN=www.example.com CSR=www_example_com.csr

If you want to have spaces inside values, use double quotes around options:
    2cca root "CN=My Root CA" "O=Bozzos Inc."

2cca generates one identity per request. An identity is made of:

  • A certificate (.crt)
  • A private key (.key) The file names are whatever you used for CN (Common Name). In the above example you will obtain Root.crt and Root.key in the current directory.

NB: All options names are case-insensitive, i.e. CA=RootCA is the same as ca=RootCA

Examples

Create a root named RootCA, organisation is ACME, located in Cambridge UK, use a 2048-bit RSA key (default):

    2cca root O=ACME C=UK L=Cambridge CN=RootCA
    -> Generates RootCA.crt and RootCA.key in the current dir

Create a server located in Paris FR, use a 2048-bit RSA key, sign it with the root CA you just created:

    2cca server ca=RootCA C=FR L=Paris CN=openvpn-server
    -> Generates openvpn-server.crt and openvpn-server.key

Create a client named Marco located in Torino IT:

    2cca client ca=RootCA C=IT L=Torino CN=Marco
    -> Generates Marco.crt and Marco.key

Create a PKCS#12 (PFX) file:

    $ read -s CA_P12_PASSWORD  # 1
    $ export CA_P12_PASSWORD  # 2
    $ 2cca p12 cn=example.org

Line 1, 2 above is optional, just make sure that the CA_P12_PASSWORD environment variable has a password set before invoking 2cca.

Security (and lack thereof)

This is not meant to be a PKI, this is meant as a replacement to distribute keys to clients who want to connect to an OpenVPN server and easily maintain them. The keys are stored unprotected on the local file system.

openssl commands are executed using 'system' so don't use any untrusted user inputs when calling this script. This is meant to be executed by a single person on a preferrably air-gapped machine when generating keys for groups of people who need VPN access.

TODO

  • email is not handled yet
  • Need to add CRL display and revocation
  • Need to add fancy display of all existing certs and their status

-- nicolas314 - 2017-May

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].