Minor build fixes
This commit is contained in:
parent
b3e6e67cac
commit
0bf075d49d
19 changed files with 40 additions and 39 deletions
|
|
@ -11,7 +11,7 @@ import (
|
|||
// "net/url"
|
||||
"strings"
|
||||
|
||||
//"gitlab.com/ProtonMail/go-pm-crypto/armor"
|
||||
//"github.com/ProtonMail/go-pm-crypto/armor"
|
||||
"golang.org/x/crypto/openpgp"
|
||||
"golang.org/x/crypto/openpgp/packet"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -12,16 +12,14 @@ import (
|
|||
"time"
|
||||
|
||||
"golang.org/x/crypto/openpgp"
|
||||
"golang.org/x/crypto/openpgp/armor"
|
||||
//"golang.org/x/crypto/openpgp/armor"
|
||||
pgperrors "golang.org/x/crypto/openpgp/errors"
|
||||
"golang.org/x/crypto/openpgp/packet"
|
||||
|
||||
"gitlab.com/ProtonMail/go-pm-crypto/crypto"
|
||||
armorUtils "github.com/ProtonMail/go-pm-crypto/armor"
|
||||
"github.com/ProtonMail/go-pm-crypto/crypto"
|
||||
)
|
||||
|
||||
// Armored type for PGP encrypted messages.
|
||||
const pgpMessageType = "PGP MESSAGE"
|
||||
|
||||
// A keypair contains a private key and a public key.
|
||||
type pmKeyObject struct {
|
||||
ID string
|
||||
|
|
@ -188,7 +186,7 @@ func (w *armorEncryptWriter) Close() (err error) {
|
|||
|
||||
// EncryptArmored encrypts and armors data to the keyring's owner.
|
||||
func (kr *KeyRing) EncryptArmored(w io.Writer, sign *KeyRing) (wc io.WriteCloser, err error) {
|
||||
aw, err := armor.Encode(w, pgpMessageType, nil)
|
||||
aw, err := armorUtils.ArmorWithTypeBuffered(w, armorUtils.MESSAGE_HEADER)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
@ -367,7 +365,7 @@ func (kr *KeyRing) DecryptArmored(r io.Reader) (decrypted io.Reader, signed *Sig
|
|||
return
|
||||
}
|
||||
|
||||
if block.Type != pgpMessageType {
|
||||
if block.Type != armorUtils.MESSAGE_HEADER {
|
||||
err = errors.New("pmapi: not an armored PGP message")
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue