X509Certificate2Collection.TryExportCertificatePems Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to export the public X.509 certificates, encoded as PEM.
public:
bool TryExportCertificatePems(Span<char> destination, [Runtime::InteropServices::Out] int % charsWritten);
public bool TryExportCertificatePems (Span<char> destination, out int charsWritten);
member this.TryExportCertificatePems : Span<char> * int -> bool
Public Function TryExportCertificatePems (destination As Span(Of Char), ByRef charsWritten As Integer) As Boolean
Parameters
- charsWritten
- Int32
When this method returns, the total number of characters written to destination
.
Returns
true
if destination
was large enough to receive the encoded PEMs; otherwise, false
.
Exceptions
A certificate is corrupt, in an invalid state, or could not be exported to PEM.
Remarks
A PEM-encoded X.509 certificate collection will contain certificates
where each certificate begins with -----BEGIN CERTIFICATE-----
and ends with -----END CERTIFICATE-----
, with the base64 encoded DER
contents of the certificate between the PEM boundaries. Each certificate is
separated by a single line-feed character.
Certificates are encoded according to the IETF RFC 7468 "strict" encoding rules.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기