Skip to content
Snippets Groups Projects

Resolve "Make private key to be persisted just in PEM format"

2 files
+ 21
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -75,7 +75,9 @@ func (s *KeyStorageServerImpl) GenerateCertificate(ctx context.Context, in *api.
func generateCertificate(publicKeyBytes []byte, caCertFilePath string, caPrivateKeyFilePath string,
certificateData *api.GenerateCertificateRequest_CertificateData) ([]byte, error) {
publicKey, err := x509.ParsePKIXPublicKey(publicKeyBytes)
publicKeyPemBlock, _ := pem.Decode(publicKeyBytes)
publicKey, err := x509.ParsePKIXPublicKey(publicKeyPemBlock.Bytes)
if err != nil {
return nil, err
}
Loading