mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
cleanup: client cert decoding is not required
Signed-off-by: Praveen M <m.praveen@ibm.com>
(cherry picked from commit 29f1fbeb84
)
This commit is contained in:
parent
a3a10855da
commit
2ccb57a1cc
@ -18,7 +18,6 @@ package kms
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
@ -106,19 +105,11 @@ func initAzureKeyVaultKMS(args ProviderInitArgs) (EncryptionKMS, error) {
|
||||
return nil, fmt.Errorf("failed to get secrets for %T, %w", kms, err)
|
||||
}
|
||||
|
||||
var encodedClientCertificate string
|
||||
err = setConfigString(&encodedClientCertificate, secrets, azureClientCertificate)
|
||||
err = setConfigString(&kms.clientCertificate, secrets, azureClientCertificate)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
clientCertificate, err := base64.StdEncoding.DecodeString(encodedClientCertificate)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to decode client certificate: %w", err)
|
||||
}
|
||||
|
||||
kms.clientCertificate = string(clientCertificate)
|
||||
|
||||
return kms, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user