feature: Gets signing server and client infrastructure working.
This commit is contained in:
parent
a5e479cc0c
commit
e527413faf
13 changed files with 865 additions and 62 deletions
|
@ -13,14 +13,24 @@ type BismuthServer struct {
|
|||
// Private key to use for transmission
|
||||
PrivateKey *crypto.Key
|
||||
|
||||
// GopenPGP instance
|
||||
pgp *crypto.PGPHandle
|
||||
|
||||
// Algorithm to use for encryption (currently XChaCha20Poly1305 is the only option)
|
||||
SymmetricEncryptionAlgorithm int
|
||||
// Servers that are signing this server. If none, this server becomes self-signed
|
||||
// in the clients eyes
|
||||
// in the clients eyes.
|
||||
SigningServers []string
|
||||
// Domains that the certificate is authorized to use. This will be checked by the
|
||||
// signing servers.
|
||||
TrustedDomains []string
|
||||
|
||||
// Called after a successful handshake & connection.
|
||||
HandleConnection func(conn net.Conn) error
|
||||
HandleConnection func(conn net.Conn, metadata *ClientMetadata) error
|
||||
}
|
||||
|
||||
// Metadata from the client that may be helpful for the server to have.
|
||||
type ClientMetadata struct {
|
||||
// Client's public key
|
||||
ClientPublicKey *crypto.Key
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue