PKCS#12 import and export example.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ImportExportPKCS12
{
class Program
{
static void Main(string[] args)
{
string address = "10.0.0.1";
string user = "usuario";
string pass = "password";
string keyId = "lab";
string certId = "lab_cert";
string p12Password = "12345678";
din.
ImportPKCS12(@"c:\tmp\lab.pfx", p12Password, keyId, certId,
true);
byte[] pkcs12 = din.
ExportPKCS12(keyId, certId, p12Password);
string impKeyId = "imp";
string impCertId = "imp_cert";
din
.ImportPKCS12(pkcs12, p12Password, impKeyId, impCertId,
true);
}
}
}
API class for accessing HSM functionalities Dinamo. In this class you can program using...
Definition DinamoClient.cs:93
byte[] ExportPKCS12(string KeyId, string CertId, string Secret)
Exports an HSM key and certificate in PKCS#12 format.
Definition DinamoClient.cs:2850
Int32 ImportPKCS12(string FilePath, string Password, string KeyId, string CertId, bool Exportable)
Definition DinamoClient.cs:2713
void Connect(string User, string Password)
Establishes an encrypted connection to the HSM using the load balance settings.
Definition DinamoClient.cs:562
void Disconnect(bool flagClose)
Terminates the connection to the HSM.
Definition DinamoClient.cs:814
Namespace denoting a set of functions for accessing the HSM Dinamo and their respective exceptions.
Definition DinamoClient.cs:12
Definition DinamoClient.cs:12