IP*Works! 2016 .NET Edition
IP*Works! 2016 .NET Edition
Questions / Feedback?

SaveCertificate Method

Saves the current certificate to a file.

Syntax

[VB.NET]
Public Sub SaveCertificate(ByVal FileName As String)
[C#]
public void SaveCertificate(string fileName);

Remarks

This method will save the current certificate to a file. The certificate is saved in base64 (PEM) format to the file specified by FileName. If the file exists, it is overwritten.

Note: This does not include the private key. To export a certificate with the private key, use ExportCertificate.

By default when SaveCertificate is called the certificate will be written in a PEM format. The format may be changed by setting CertificateOutputFormat to one of the following values:

"PEM" (default) A PEM formatted public certificate. Example:
-----BEGIN CERTIFICATE-----
MIIBkTCB+6ADAgECAgEBMA0GCSqGSIb3DQEBBQUAMA4xDDAKBgNVBAMTAzEwMDAgFw0wNzAx
...
Pg49SpQ+HcUibIpum2O0hmnySH7BPGfXD8Lu
-----END CERTIFICATE-----
"SSH2PublicKey" A SSH2 formated public key. Example:
---- BEGIN SSH2 PUBLIC KEY ----
AAAAB3NzaC1yc2EAAAADAQABAAAAgQD5/STHUd7YkN1JyoyYnUvCf+Fyx1+ZleBJxvwDcm3y
...
6bVPTODELil1PVWJDlfdwoLZZKY2ACFHzxBqaOlYv1rbd2JIYAuqGca2ow==
---- END SSH2 PUBLIC KEY ----
"OpenSSHPublicKey" An OpenSSH formatted public key. Example:
ssh-rsa AAAAB3NzaC1y...
"P7B" A P7B file.
"JWK"A JWK that contains a public key.
"XML" A XML file containing the public certificate. Example:
<X509Data><X509Certificate>MIIBkTCB+6ADAgECAgEBMA0GCSqGSIb3DQEBBQUAMA4xDDAKBgNVBAMTAzEwMDAgFw0wNzAx
...
Pg49SpQ+HcUibIpum2O0hmnySH7BPGfXD8Lu</X509Certificate></X509Data>

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