Skip to content

Instantly share code, notes, and snippets.

View natgra's full-sized avatar

Natalie Grasser natgra

View GitHub Profile
@natgra
natgra / create_wildcard_cert_using_config.md
Created February 10, 2022 10:16
How to create wildcard certificates using config files

How to create a self-signed certificate request for a domain and all its subdomains with OpenSSL.

The configuration file

The certificate.conf can be used to create a configuration for a certificate. Its content can look as follows:

[req]
default_bits = 2048
default_md = sha256
prompt = no                                   # configuration for openssl command to not prompt, it will take req_distinguished_name instead
distinguished_name = req_distinguished_name   # the information required to generate a self-signed certificate
@natgra
natgra / golang_check-struct.go
Created May 20, 2021 09:54
GoLang - Check if a (custom) struct is empty
// Learing GoLang - Check if a (custom) struct is empty
//
// Possible data type
// {
// "type": "music",
// "duration": 200,
// "musicData": {
// "title": "Sinfonie op. 2 Nr.4 F-dur 3.Satz Gavot Allegro",
// "album": null,
// "artist": "William Boyce",