mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-04 21:57:44 +03:00
Update deps
This commit is contained in:
parent
fcd9225121
commit
213695f651
19 changed files with 657 additions and 67 deletions
4
vendor/github.com/jedisct1/go-minisign/.travis.yml
generated
vendored
4
vendor/github.com/jedisct1/go-minisign/.travis.yml
generated
vendored
|
@ -1,4 +0,0 @@
|
|||
sudo: false
|
||||
language: go
|
||||
go:
|
||||
- 1.10.2
|
8
vendor/github.com/jedisct1/go-minisign/minisign.go
generated
vendored
8
vendor/github.com/jedisct1/go-minisign/minisign.go
generated
vendored
|
@ -45,18 +45,22 @@ func DecodePublicKey(in string) (PublicKey, error) {
|
|||
return NewPublicKey(lines[1])
|
||||
}
|
||||
|
||||
func trimCarriageReturn(input string) string {
|
||||
return strings.TrimRight(input, "\r")
|
||||
}
|
||||
|
||||
func DecodeSignature(in string) (Signature, error) {
|
||||
var signature Signature
|
||||
lines := strings.SplitN(in, "\n", 4)
|
||||
if len(lines) < 4 {
|
||||
return signature, errors.New("Incomplete encoded signature")
|
||||
}
|
||||
signature.UntrustedComment = lines[0]
|
||||
signature.UntrustedComment = trimCarriageReturn(lines[0])
|
||||
bin1, err := base64.StdEncoding.DecodeString(lines[1])
|
||||
if err != nil || len(bin1) != 74 {
|
||||
return signature, errors.New("Invalid encoded signature")
|
||||
}
|
||||
signature.TrustedComment = lines[2]
|
||||
signature.TrustedComment = trimCarriageReturn(lines[2])
|
||||
bin2, err := base64.StdEncoding.DecodeString(lines[3])
|
||||
if err != nil || len(bin2) != 64 {
|
||||
return signature, errors.New("Invalid encoded signature")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue