mirror of
https://github.com/pion/webrtc.git
synced 2025-10-05 23:26:58 +08:00
Update CertificateFromPEM to support OpenSSL
Update CertificateFromPEM to be a loop over the PEM blocks. This allows decoding the private key before decoding the certificate. Tries to parse the certificate block directly but if that errors, then it also tries to base64 decode the certificate block. Fixes #3042
This commit is contained in:
@@ -275,7 +275,9 @@ var (
|
||||
errICETransportNotInNew = errors.New("ICETransport can only be called in ICETransportStateNew")
|
||||
errICETransportClosed = errors.New("ICETransport closed")
|
||||
|
||||
errCertificatePEMFormatError = errors.New("bad Certificate PEM format")
|
||||
errCertificatePEMMultipleCert = errors.New("failed parsing certificate, more than 1 CERTIFICATE block in pems")
|
||||
errCertificatePEMMultiplePriv = errors.New("failed parsing certificate, more than 1 PRIVATE KEY block in pems")
|
||||
errCertificatePEMMissing = errors.New("failed parsing certificate, pems must contain both a CERTIFICATE block and a PRIVATE KEY block") // nolint: lll
|
||||
|
||||
errRTPTooShort = errors.New("not long enough to be a RTP Packet")
|
||||
|
||||
|
Reference in New Issue
Block a user