Skip to content

Commit

Permalink
splellign
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Thornton <[email protected]>
  • Loading branch information
zeripath committed Dec 12, 2020
1 parent 56ec015 commit 701fbbd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func sessionHandler(session ssh.Session) {
}

func publicKeyHandler(ctx ssh.Context, key ssh.PublicKey) bool {
if log.IsDebug() { // <- FingerprintSHA256 is kinda expensive so only calculate it if neccesary
if log.IsDebug() { // <- FingerprintSHA256 is kinda expensive so only calculate it if necessary
log.Debug("Handle Public Key: Fingerprint: %s from %s", gossh.FingerprintSHA256(key), ctx.RemoteAddr())
}

Expand All @@ -146,7 +146,7 @@ func publicKeyHandler(ctx ssh.Context, key ssh.PublicKey) bool {

// check if we have a certificate
if cert, ok := key.(*gossh.Certificate); ok {
if log.IsDebug() { // <- FingerprintSHA256 is kinda expensive so only calculate it if neccesary
if log.IsDebug() { // <- FingerprintSHA256 is kinda expensive so only calculate it if necessary
log.Debug("Handle Certificate: %s Fingerprint: %s is a certificate", ctx.RemoteAddr(), gossh.FingerprintSHA256(key))
}

Expand Down Expand Up @@ -200,7 +200,7 @@ func publicKeyHandler(ctx ssh.Context, key ssh.PublicKey) bool {
return false
}

if log.IsDebug() { // <- FingerprintSHA256 is kinda expensive so only calculate it if neccesary
if log.IsDebug() { // <- FingerprintSHA256 is kinda expensive so only calculate it if necessary
log.Debug("Successfully authenticated: %s Certificate Fingerprint: %s Principal: %s", ctx.RemoteAddr(), gossh.FingerprintSHA256(key), principal)
}
ctx.SetValue(giteaKeyID, pkey.ID)
Expand Down Expand Up @@ -232,7 +232,7 @@ func publicKeyHandler(ctx ssh.Context, key ssh.PublicKey) bool {
return false
}

if log.IsDebug() { // <- FingerprintSHA256 is kinda expensive so only calculate it if neccesary
if log.IsDebug() { // <- FingerprintSHA256 is kinda expensive so only calculate it if necessary
log.Debug("Successfully authenticated: %s Public Key Fingerprint: %s", ctx.RemoteAddr(), gossh.FingerprintSHA256(key))
}
ctx.SetValue(giteaKeyID, pkey.ID)
Expand Down

0 comments on commit 701fbbd

Please sign in to comment.