internal/age: add some docs and polish API

This commit is contained in:
Filippo Valsorda
2020-05-18 02:53:37 -04:00
parent 085466567a
commit 6782356e45
6 changed files with 57 additions and 7 deletions
+2 -2
View File
@@ -38,8 +38,8 @@ func main() {
if fi, err := out.Stat(); err == nil {
if fi.Mode().IsRegular() && fi.Mode().Perm()&0004 != 0 {
fmt.Fprintf(os.Stderr, "Warning: writing to a world-readable file.\n")
fmt.Fprintf(os.Stderr, "Consider setting the umask to 066 and trying again.\n")
fmt.Fprintf(os.Stderr, "Warning: writing to a world-readable file.\n"+
"Consider setting the umask to 066 and trying again.\n")
}
}
+1 -1
View File
@@ -84,7 +84,7 @@ func sshFingerprint(pk ssh.PublicKey) string {
return format.EncodeToString(h[:4])
}
func (i *EncryptedSSHIdentity) Matches(block *format.Recipient) error {
func (i *EncryptedSSHIdentity) Match(block *format.Recipient) error {
if block.Type != i.Type() {
return age.ErrIncorrectIdentity
}