• Stars
    star
    186
  • Rank 207,316 (Top 5 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 2 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cross platform, easy to use SSL/TLS toolset

Build Status Total Downloads Codecov branch Go Version Go Version
Gopher design by Tugay BALCI

GoSSL

GoSSL is a cross platform, easy to use SSL/TLS toolset written with Go and built with ❤️

Features

  • Generate RSA private and public key - key command
  • Generate x509 RSA Certificate Request (CSR) - cert command
  • Generate x509 RSA Root CA - cert command
  • Generate x509 RSA Certificate - cert command
  • Get information about an x509 RSA Certificate - info command
  • Verify a Certificate with a Root CA - verify command
  • Verify a URL with a Root CA - verify command
  • Generate SSH key pair - ssh command
  • Copy SSH public key to remote SSH server - ssh-copy command

Install

Executable binaries can be downloaded at Releases page according to user's operating system and architecture. After download, extract compressed files and start using GoSSL via terminal.

MacOS Homebrew Install

MacOS users can install GoSSL via Homebrew with the commands below.

brew tap yakuter/homebrew-tap
brew install gossl

Commands

version

version command displays the current version of GoSSL

gossl -v
gossl --version

help

help command displays default help and existing commands. It can also be used to get sub command helps.

gossl help
gossl help cert
...

key

key command generates RSA private key with provided bit size.

gossl key --help
gossl key --bits 2048
gossl key --bits 2048 --out private.key
gossl key --bits 2048 --out private.key --withpub

info

info displays information about x509 certificate. Thanks grantae for great certinfo tool which is used here. A file path or a valid URL is used to get details of the certificate.

gossl info cert.pem
gossl info --url google.com

cert

cert command generates x509 SSL/TLS Certificate Request (CSR), Root CA and Certificate with provided private key.

Help

gossl cert --help

Generate Certificate Request (CSR)

gossl cert \
    --key private.key \
    --out cert.csr \
    --days 365 \
    --serial 12345 \
    --isCSR

Generate Root CA

gossl cert \
    --key private.key \
    --out ca.pem \
    --days 365 \
    --serial 12345 \
    --isCA 

Generate Certificate

gossl cert \
    --key private.key \
    --out cert.pem \
    --days 365 \
    --serial 12345

verify

verify command verifies x509 certificate with provided root CA in PEM format.

gossl verify --help

// Verify certificate with root CA 
gossl verify --cafile ./testdata/ca-cert.pem --certfile ./testdata/server-cert.pem
gossl verify --cafile ./testdata/ca-cert.pem --certfile ./testdata/server-cert.pem --dns 127.0.0.1

// Verify URL with root CA
gossl verify --cafile testdata/ca-cert.pem --url https://127.0.0.1

ssh

ssh command generates SSH key pair with provided bit size just like ssh-keygen tool. These key pairs are used for automating logins, single sign-on, and for authenticating hosts.

gossl key --help
gossl key --bits 2048
gossl key --bits 2048 --out ./id_rsa
// output will be written to ./id_rsa and ./id_rsa_pub files

ssh-copy

ssh-copy connects remote SSH server, creates /home/user/.ssh directory and authorized_keys file in it and appends provided public key (eg, id_rsa.pub) to authorized_keys file just like ssh-copy-id tool.

gossl ssh-copy --help

// This command will use default SSH public key path as "USER_HOME_DIR/.ssh/id_rsa.pub"
gossl ssh-copy remoteUser@remoteIP

// This command will ask for password to connect SSH server
gossl ssh-copy --pubkey /home/user/.ssh/id_rsa.pub remoteUser@remoteIP

gossl ssh-copy --pubkey /home/user/.ssh/id_rsa.pub --password passw@rd123 remoteUser@remoteIP

TODO

  1. Add generate command for generating private key, root ca and x509 certificates in one command
  2. Add cert template format read from yaml file
  3. Add certificate converter command like DER to PEM etc.

More Repositories

1

ugin

UGin is an API boilerplate written in Go (Golang) with Gin Framework.
Go
224
star
2

go-concurrency

This repos has lots of Go concurrency, goroutine and channel usage and best practice examples
Go
142
star
3

go-interfaces

This repos has lots of Go interface usage and best practice examples
Go
116
star
4

go-developer-list

Turkish Go Developers
115
star
5

go-clean-code

Go
51
star
6

go-test-examples

Go Unit Test examples
Go
51
star
7

go-datatable

jQuery Datatable's serverside usage example with Golang
Go
38
star
8

go-channels-use-cases

Examples of golang channels use cases
Go
35
star
9

gol

Go implementation of Linux commands
Go
19
star
10

redis-vs-nats

This repo is prepared to test the performance of nats and redis in pubsub messaging
Go
19
star
11

rest-api-checklist

Go
17
star
12

gofind

Find all files and directories with pattern
Go
16
star
13

passwall-debian

The debian packager of PassWall.
Shell
16
star
14

agentgo

Hi! Agentgo is a tool for making remote command executions from server to client with golang, protocol buffers (protobuf) and grpc.
Go
16
star
15

optinator

Idiomatic way to fill structs with options logic
Go
13
star
16

golang-file-actions

Simple examples to show golang file actions
Go
9
star
17

go-buyuk-json-okuma

An example to show how to read large JSON files with JSON Data Streaming
Go
9
star
18

chanman

Chanman helps you to create queue channels and manage them gracefully.
Go
9
star
19

kudruk

Kudruk helps you to create queue channels and manage them gracefully.
Go
8
star
20

cert-generator

Self Signed SSL/TLS certificate generator script using openssl
Shell
7
star
21

go-dpi-packet

Go
7
star
22

go-grpc-protobuf

A simple example with documentation about using protocol buffers (protobuf) and grpc in golang
Go
6
star
23

panicer

panicer helps you to catch deferred panic handlers in goroutines
Go
6
star
24

yPhoneBook

Example PHP project using modern technologies Bootstrap, jQuery, AJAX and ezSQL
PHP
6
star
25

fogus

Focus app by blocking time wasting websites (work in progress)
Go
5
star
26

laravel-ajax-contact-form

An easy contact form example built with laravel and ajax (jquery)
PHP
5
star
27

flagopt

Command line based layout to parse arguments as options.
Go
5
star
28

jquery-slugify

jQuery Slugify with Turkish support
CSS
4
star
29

geekday

Go
4
star
30

sitemap-checker

4
star
31

golang-database-actions

A simple mini project to show usage of database with golang
Go
3
star
32

go-standard-library

A showcase for Go Standard Library
Go
3
star
33

go-network-programming

Go
3
star
34

builtinlogger

Go
2
star
35

tcell-firewall

This is an easy firewall draft
Go
2
star
36

react-native-test-project

JavaScript
2
star
37

kawaii

Go key value database as a bbolt wrapper
Go
2
star
38

httpgo

2
star
39

izmir-superpeer-json2go

Go
2
star
40

laravel-guestbook

An easy guestbook example to show usage of database actions in laravel with resource controller
PHP
2
star
41

go-concurrency-patterns

Golang concurrency pattern examples
2
star
42

matematik

Dört işlem paketi
Go
1
star
43

notebook

My personal notes about programming
1
star
44

woo-measurement-calculation

PHP
1
star
45

yakuter

1
star
46

centralog

Central logging server
HTML
1
star
47

yauthor-plugin

A wordpress plugin with WPBakery support to show posts of a category with author images
JavaScript
1
star
48

nsattrparser

The nsattrparser package provides a solution for extracting text from binary-encoded NSAttributedString data using golang.
Go
1
star
49

yGiris

PHP ile kendi yazmış olduğunuz yönetim panellerine güvenli bir şekilde girmek için kullanabileceğiniz AJAX (jQuery) ile güçlendirilmiş güzel görünümlü üye giriş formu
PHP
1
star
50

golang-for-loops

Simple examples to show usage of "for loops" in golang
Go
1
star