tls

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: AGPL-3.0 Imports: 5 Imported by: 6

README

tls

The tls package handles common uses cases around TLS certificates.

Example Usage

package main

import (
        "log"

        "github.com/rddl-network/go-utils/tls"
)

func main() {
        _, err := tls.Get2WayTLSClient("./certs/")
        if err != nil {
                log.Fatalln(err)
        }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get2WayTLSClient

func Get2WayTLSClient(certsPath string) (client *http.Client, err error)

Get2WayTLSClient creates a Go HTTP client for TLS web client authentication.

func Get2WayTLSServer added in v0.2.0

func Get2WayTLSServer(caCertFile []byte) (tlsConfig *tls.Config)

Get2WayTLSServer creates a Go TLS server config for web client authentication.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL