mirror of https://github.com/docker/docs.git
				
				
				
			update yubikeystore keys cache when adding
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
This commit is contained in:
		
							parent
							
								
									beca50909d
								
							
						
					
					
						commit
						705587b0b5
					
				|  | @ -514,7 +514,14 @@ func (s *YubiKeyStore) AddKey(keyID, role string, privKey data.PrivateKey) error | |||
| 		return err | ||||
| 	} | ||||
| 	logrus.Debugf("Using yubikey slot %v", slot) | ||||
| 	return addECDSAKey(ctx, session, privKey, slot, s.passRetriever, role) | ||||
| 	err = addECDSAKey(ctx, session, privKey, slot, s.passRetriever, role) | ||||
| 	if err == nil { | ||||
| 		s.keys[privKey.ID()] = yubiSlot{ | ||||
| 			role:   role, | ||||
| 			slotID: slot, | ||||
| 		} | ||||
| 	} | ||||
| 	return err | ||||
| } | ||||
| 
 | ||||
| func (s *YubiKeyStore) GetKey(keyID string) (data.PrivateKey, string, error) { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue