feature: Adds signing validation support to the client.

This commit is contained in:
imterah 2024-10-25 11:59:16 -04:00
parent 86ad3e174f
commit 00a57443d4
Signed by: imterah
GPG key ID: 8FA7DD57BA6CEA37
6 changed files with 242 additions and 80 deletions

View file

@ -40,7 +40,7 @@ func (bismuth BismuthServer) decryptMessage(aead cipher.AEAD, encMsg []byte) ([]
// Initializes a Bismuth server.
//
// Both `pubKey` and `privKey` are armored PGP public and private keys respectively.
func NewBismuthServer(pubKey string, privKey string, signServers []string, encryptionAlgo int) (*BismuthServer, error) {
func New(pubKey string, privKey string, signServers []string, trustedDomains []string, encryptionAlgo int) (*BismuthServer, error) {
publicKey, err := crypto.NewKeyFromArmored(pubKey)
if err != nil {
@ -59,6 +59,7 @@ func NewBismuthServer(pubKey string, privKey string, signServers []string, encry
PublicKey: publicKey,
PrivateKey: privateKey,
SigningServers: signServers,
TrustedDomains: trustedDomains,
SymmetricEncryptionAlgorithm: encryptionAlgo,
pgp: pgp,
}