-1

I am not familiar with java and learning python, when I read this code:

(X509Certificate) CertificateFactory.getInstance("X.509").generateCertificate(new ByteArrayInputStream(bArr));

Where bArr is byte[]

I wonder if python could get the same result. And if so, could you give me one specific example? Thanks for your instruction.

svarog
  • 9,477
  • 4
  • 61
  • 77
Ethel Stample
  • 25
  • 1
  • 3

1 Answers1

0

You can use cryptography to work with X.509 certificates.

The Java example you provided creates an instance of certificate Java object from stream of bytes. For similar functionality to load certificates you can look here

Also, check answers to these questions on StackOverflow:

Dharman
  • 30,962
  • 25
  • 85
  • 135
Sergei
  • 536
  • 1
  • 4
  • 17