xtls

package
v1.8.2-0...-f7776fc Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: GPL-2.0, GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package xtls complements standard package crypto/tls with NEO-specific bits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigForP2P

func ConfigForP2P(ca, cert, key string) (_ *tls.Config, err error)

ConfigForP2P builds tls.Config for peer-to-peer internetworking.

When two peers connect, they authenticate each other by verifying that peer's certificate is signed by CA, which should be common to all peers.

Arguments provide paths to files:

- ca - path to CA certificate - cert - path to node certificate - key - path to node private key

Returned TLS config is interoperable with NEO/py - see: https://lab.nexedi.com/nexedi/neoppod/blob/v1.12-61-gc1c26894/neo/lib/app.py#L74-90

Types

This section is empty.

Jump to

Keyboard shortcuts

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