Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #827 - passhprase typos #867

Merged
merged 1 commit into from
Sep 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/publish_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Example:
cmd.Flag.String("gpg-key", "", "GPG key ID to use when signing the release")
cmd.Flag.Var(&keyRingsFlag{}, "keyring", "GPG keyring to use (instead of default)")
cmd.Flag.String("secret-keyring", "", "GPG secret keyring to use (instead of default)")
cmd.Flag.String("passphrase", "", "GPG passhprase for the key (warning: could be insecure)")
cmd.Flag.String("passphrase-file", "", "GPG passhprase-file for the key (warning: could be insecure)")
cmd.Flag.String("passphrase", "", "GPG passphrase for the key (warning: could be insecure)")
cmd.Flag.String("passphrase-file", "", "GPG passphrase-file for the key (warning: could be insecure)")
cmd.Flag.Bool("batch", false, "run GPG with detached tty")
cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG")
cmd.Flag.Bool("skip-contents", false, "don't generate Contents indexes")
Expand Down
4 changes: 2 additions & 2 deletions cmd/publish_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ Example:
cmd.Flag.String("gpg-key", "", "GPG key ID to use when signing the release")
cmd.Flag.Var(&keyRingsFlag{}, "keyring", "GPG keyring to use (instead of default)")
cmd.Flag.String("secret-keyring", "", "GPG secret keyring to use (instead of default)")
cmd.Flag.String("passphrase", "", "GPG passhprase for the key (warning: could be insecure)")
cmd.Flag.String("passphrase-file", "", "GPG passhprase-file for the key (warning: could be insecure)")
cmd.Flag.String("passphrase", "", "GPG passphrase for the key (warning: could be insecure)")
cmd.Flag.String("passphrase-file", "", "GPG passphrase-file for the key (warning: could be insecure)")
cmd.Flag.Bool("batch", false, "run GPG with detached tty")
cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG")
cmd.Flag.Bool("skip-contents", false, "don't generate Contents indexes")
Expand Down
4 changes: 2 additions & 2 deletions cmd/publish_switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ This command would switch published repository (with one component) named ppa/wh
cmd.Flag.String("gpg-key", "", "GPG key ID to use when signing the release")
cmd.Flag.Var(&keyRingsFlag{}, "keyring", "GPG keyring to use (instead of default)")
cmd.Flag.String("secret-keyring", "", "GPG secret keyring to use (instead of default)")
cmd.Flag.String("passphrase", "", "GPG passhprase for the key (warning: could be insecure)")
cmd.Flag.String("passphrase-file", "", "GPG passhprase-file for the key (warning: could be insecure)")
cmd.Flag.String("passphrase", "", "GPG passphrase for the key (warning: could be insecure)")
cmd.Flag.String("passphrase-file", "", "GPG passphrase-file for the key (warning: could be insecure)")
cmd.Flag.Bool("batch", false, "run GPG with detached tty")
cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG")
cmd.Flag.Bool("skip-contents", false, "don't generate Contents indexes")
Expand Down
4 changes: 2 additions & 2 deletions cmd/publish_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ Example:
cmd.Flag.String("gpg-key", "", "GPG key ID to use when signing the release")
cmd.Flag.Var(&keyRingsFlag{}, "keyring", "GPG keyring to use (instead of default)")
cmd.Flag.String("secret-keyring", "", "GPG secret keyring to use (instead of default)")
cmd.Flag.String("passphrase", "", "GPG passhprase for the key (warning: could be insecure)")
cmd.Flag.String("passphrase-file", "", "GPG passhprase-file for the key (warning: could be insecure)")
cmd.Flag.String("passphrase", "", "GPG passphrase for the key (warning: could be insecure)")
cmd.Flag.String("passphrase-file", "", "GPG passphrase-file for the key (warning: could be insecure)")
cmd.Flag.Bool("batch", false, "run GPG with detached tty")
cmd.Flag.Bool("skip-signing", false, "don't sign Release files with GPG")
cmd.Flag.Bool("skip-contents", false, "don't generate Contents indexes")
Expand Down
4 changes: 2 additions & 2 deletions completion.d/_aptly
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,8 @@ local keyring="*-keyring=[gpg keyring to use when verifying Release file (could
"-force-overwrite=[overwrite files in package pool in case of mismatch]:$bool"
"-gpg-key=[GPG key ID to use when signing the release]:gpg key id:$gpg_keys"
"-keyring=[GPG keyring to use (instead of default)]:keyring file:_files -g '*.gpg'"
"-passphrase=[GPG passhprase for the key (warning: could be insecure)]:passphrase: "
"-passphrase-file=[GPG passhprase−file for the key (warning: could be insecure)]:passphrase file:_files"
"-passphrase=[GPG passphrase for the key (warning: could be insecure)]:passphrase: "
"-passphrase-file=[GPG passphrase−file for the key (warning: could be insecure)]:passphrase file:_files"
"-secret-keyring=[GPG secret keyring to use (instead of default)]:secret-keyring:_files"
"-skip-contents=[don’t generate Contents indexes]:$bool"
"-skip-signing=[don’t sign Release files with GPG]:$bool"
Expand Down
17 changes: 8 additions & 9 deletions man/aptly.1
Original file line number Diff line number Diff line change
Expand Up @@ -1431,11 +1431,11 @@ origin name to publish
.
.TP
\-\fBpassphrase\fR=
GPG passhprase for the key (warning: could be insecure)
GPG passphrase for the key (warning: could be insecure)
.
.TP
\-\fBpassphrase\-file\fR=
GPG passhprase\-file for the key (warning: could be insecure)
GPG passphrase\-file for the key (warning: could be insecure)
.
.TP
\-\fBsecret\-keyring\fR=
Expand Down Expand Up @@ -1530,11 +1530,11 @@ overwrite origin name to publish
.
.TP
\-\fBpassphrase\fR=
GPG passhprase for the key (warning: could be insecure)
GPG passphrase for the key (warning: could be insecure)
.
.TP
\-\fBpassphrase\-file\fR=
GPG passhprase\-file for the key (warning: could be insecure)
GPG passphrase\-file for the key (warning: could be insecure)
.
.TP
\-\fBsecret\-keyring\fR=
Expand Down Expand Up @@ -1608,11 +1608,11 @@ GPG keyring to use (instead of default)
.
.TP
\-\fBpassphrase\fR=
GPG passhprase for the key (warning: could be insecure)
GPG passphrase for the key (warning: could be insecure)
.
.TP
\-\fBpassphrase\-file\fR=
GPG passhprase\-file for the key (warning: could be insecure)
GPG passphrase\-file for the key (warning: could be insecure)
.
.TP
\-\fBsecret\-keyring\fR=
Expand Down Expand Up @@ -1673,11 +1673,11 @@ GPG keyring to use (instead of default)
.
.TP
\-\fBpassphrase\fR=
GPG passhprase for the key (warning: could be insecure)
GPG passphrase for the key (warning: could be insecure)
.
.TP
\-\fBpassphrase\-file\fR=
GPG passhprase\-file for the key (warning: could be insecure)
GPG passphrase\-file for the key (warning: could be insecure)
.
.TP
\-\fBsecret\-keyring\fR=
Expand Down Expand Up @@ -2062,4 +2062,3 @@ William Manley (https://github\.com/wmanley)
Shengjing Zhu (https://github\.com/zhsj)
.
.IP "" 0

2 changes: 1 addition & 1 deletion pgp/gnupg.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (g *GpgSigner) SetKeyRing(keyring, secretKeyring string) {
g.keyring, g.secretKeyring = keyring, secretKeyring
}

// SetPassphrase sets passhprase params
// SetPassphrase sets passphrase params
func (g *GpgSigner) SetPassphrase(passphrase, passphraseFile string) {
g.passphrase, g.passphraseFile = passphrase, passphraseFile
}
Expand Down
8 changes: 4 additions & 4 deletions pgp/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var (

// Internal errors
var (
errWrongPasshprase = errors.New("unable to decrypt the key, passphrase is wrong")
errWrongPassphrase = errors.New("unable to decrypt the key, passphrase is wrong")
)

// GoSigner is implementation of Signer interface using Go internal OpenPGP library
Expand Down Expand Up @@ -60,7 +60,7 @@ func (g *GoSigner) SetKeyRing(keyring, secretKeyring string) {
g.keyringFile, g.secretKeyringFile = keyring, secretKeyring
}

// SetPassphrase sets passhprase params
// SetPassphrase sets passphrase params
func (g *GoSigner) SetPassphrase(passphrase, passphraseFile string) {
g.passphrase, g.passphraseFile = passphrase, passphraseFile
}
Expand Down Expand Up @@ -182,7 +182,7 @@ func (g *GoSigner) Init() error {
g.passphrase = string(bytePassphrase)

err = g.decryptKey()
if err == nil || err != errWrongPasshprase {
if err == nil || err != errWrongPassphrase {
break
}

Expand All @@ -209,7 +209,7 @@ func (g *GoSigner) decryptKey() error {

if e, ok := err.(openpgp_errors.StructuralError); ok {
if string(e) == "private key checksum failure" {
return errWrongPasshprase
return errWrongPassphrase
}
}

Expand Down