mirror of
https://github.com/hashicorp/vault.git
synced 2026-06-09 08:55:13 -04:00
Minor fixes from vet
This commit is contained in:
parent
25d029f219
commit
7ff623706e
2 changed files with 4 additions and 4 deletions
|
|
@ -33,6 +33,7 @@ func GetHexFormatted(buf []byte, sep string) string {
|
|||
return ret.String()
|
||||
}
|
||||
|
||||
// ParseHexFormatted returns the raw bytes from a formatted hex string
|
||||
func ParseHexFormatted(in, sep string) []byte {
|
||||
var ret bytes.Buffer
|
||||
var err error
|
||||
|
|
@ -41,9 +42,8 @@ func ParseHexFormatted(in, sep string) []byte {
|
|||
for _, inByte := range inBytes {
|
||||
if inBits, err = strconv.ParseInt(inByte, 16, 8); err != nil {
|
||||
return nil
|
||||
} else {
|
||||
ret.WriteByte(byte(inBits))
|
||||
}
|
||||
ret.WriteByte(byte(inBits))
|
||||
}
|
||||
return ret.Bytes()
|
||||
}
|
||||
|
|
@ -109,8 +109,6 @@ func ParsePEMBundle(pemBundle string) (*ParsedCertBundle, error) {
|
|||
return nil, errutil.UserError{Err: "empty pem bundle"}
|
||||
}
|
||||
|
||||
pemBundle = pemBundle
|
||||
|
||||
pemBytes := []byte(pemBundle)
|
||||
var pemBlock *pem.Block
|
||||
parsedBundle := &ParsedCertBundle{}
|
||||
|
|
|
|||
|
|
@ -316,6 +316,8 @@ func (p *ParsedCertBundle) Verify() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// GetCertificatePath returns a slice of certificates making up a path, pulled
|
||||
// from the parsed cert bundle
|
||||
func (p *ParsedCertBundle) GetCertificatePath() []*CertBlock {
|
||||
var certPath []*CertBlock
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue