@@ -170,7 +170,7 @@ func (s *hvaultRemoteService) Decrypt(ctx context.Context, uid string, req *serv
170170 if v , ok := req .Annotations [annotationKey ]; ! ok || string (v ) != "1" {
171171 return nil , fmt .Errorf ("/!\\ invalid version in annotations" )
172172 }
173- return s .decrypt (ctx , req .Ciphertext )
173+ return s .decrypt (ctx , [] byte ( req .Ciphertext ) )
174174}
175175
176176func (s * hvaultRemoteService ) decrypt (ctx context.Context , ciphertext []byte ) ([]byte , error ) {
@@ -230,7 +230,7 @@ func (s *hvaultRemoteService) Health(ctx context.Context) error {
230230 zap .L ().Error ("Health: encrypt failed: " + err .Error ())
231231 return err
232232 }
233- dec , err := s .decrypt (ctx , [] byte ( enc ) )
233+ dec , err := s .decrypt (ctx , enc )
234234 if err != nil {
235235 return errors .New ("Health: decrypt failed: " + err .Error ())
236236 }
@@ -362,13 +362,10 @@ func retryVaultOp[T any](s *hvaultRemoteService, ctx context.Context, amount int
362362 if err != nil {
363363 if strings .Contains (err .Error (), "invalid token" ) {
364364 // re-login
365- authInfo , err := s .Client .Auth ().Login (ctx , s .ClientAuthMethod )
365+ _ , err := s .Client .Auth ().Login (ctx , s .ClientAuthMethod )
366366 if err != nil {
367367 zap .L ().Error ("Error: Could not relogin: " + err .Error ())
368368 }
369- if authInfo == nil {
370- zap .L ().Error ("Error: Relogin received empty auth info" )
371- }
372369 // relogin OK
373370 } // other error that cannot be solved by relogin: try calling f() again
374371 } else {
0 commit comments