mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-06 10:21:05 +02:00
ssh: remove padding chars from base64 fingerprint (#5698)
Use RawStdEncoding to compute the base64 fingerprint as part of SSH session IDs. This is mostly just so that we can use the go `ssh.FingerprintSHA256` function in tests (which uses RawStdEncoding) to assert on session ID strings
This commit is contained in:
parent
b2a86913b4
commit
4683685737
2 changed files with 6 additions and 6 deletions
|
@ -351,7 +351,7 @@ func sessionIDFromFingerprint(sha256fingerprint []byte) (string, error) {
|
|||
if len(sha256fingerprint) != sha256.Size {
|
||||
return "", errInvalidFingerprint
|
||||
}
|
||||
return "sshkey-SHA256:" + base64.StdEncoding.EncodeToString(sha256fingerprint), nil
|
||||
return "sshkey-SHA256:" + base64.RawStdEncoding.EncodeToString(sha256fingerprint), nil
|
||||
}
|
||||
|
||||
var errPublicKeyAllowNil = errors.New("expected PublicKeyAllow message not to be nil")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue