mirror of
https://github.com/jeremyd/ergo.git
synced 2026-05-11 14:41:15 -07:00
fix #733
This commit is contained in:
@@ -1439,6 +1439,13 @@ func (ac *AccountCredentials) SetPassphrase(passphrase string, bcryptCost uint)
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (ac *AccountCredentials) AddCertfp(certfp string) (err error) {
|
func (ac *AccountCredentials) AddCertfp(certfp string) (err error) {
|
||||||
|
// XXX we require that certfp is already normalized (rather than normalize here
|
||||||
|
// and pass back the normalized version as an additional return parameter);
|
||||||
|
// this is just a final sanity check:
|
||||||
|
if len(certfp) != 64 {
|
||||||
|
return utils.ErrInvalidCertfp
|
||||||
|
}
|
||||||
|
|
||||||
for _, current := range ac.Certfps {
|
for _, current := range ac.Certfps {
|
||||||
if certfp == current {
|
if certfp == current {
|
||||||
return errNoop
|
return errNoop
|
||||||
|
|||||||
Reference in New Issue
Block a user