IP*Works! 2016 Xamarin Edition
IP*Works! 2016 Xamarin Edition
Questions / Feedback?

ExportCertificate Method

Saves the current certificate to a file.

Syntax

[VB.NET]
Public Sub ExportCertificate(ByVal CertFile As String, ByVal Password As String)
[C#]
public void ExportCertificate(string certFile, string password);

Remarks

This method will save the current certificate to a file. The current certificate and its private key are saved to the file specified by CertFile in the specified format. The file contents are protected by Password.

By default when ExportCertificate is called the certificate will be written as a PFX file. The format of the exported certificate may be changed by setting ExportFormat to one of the following values:

"PFX" or "PKCS12" (default) A PFX file (PKCS12).
"PEM" or "PKCS1" A PEM formatted PKCS1 private key file. Example:
-----BEGIN RSA PRIVATE KEY-----
MIICWwIBAAKBgQD5/STHUd7YkN1JyoyYnUvCf+Fyx1+ZleBJxvwDcm3yaZ98bvry
...
91y8ydb3mQ9l1hZudo2sj8tHnvEgph0r7B8hMM6Qaw==
-----END RSA PRIVATE KEY-----
"PKCS8" A PEM formatted PKCS8 private key file. Example:
-----BEGIN PRIVATE KEY-----
MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAPn9JMdR3tiQ3UnK
...
HSvsHyEwzpBr
-----END PRIVATE KEY-----

Note: On Linux/Unix the PFX/PKCS12 format is not supported. On Unix/Linux the default format is "PEM".

Note: ExportCertificate is not support on macOS.

If CertFile is empty the certificate will be exported to a string accessible via the ExportedCert configuration setting.

NOTE: This functionality is not available in Xamarin.

NOTE: This method has a corresponding asynchronous version (ExportCertificateAsync) for use in the Xamarin environment.

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
IP*Works! 2016 Xamarin Edition - Version 16.0 [Build 6621]