Method | Description | |
---|---|---|
Create ( byte encodedData, bool useCache ) : |
Creates a certificate from a buffer with DER encoded certificate.
|
|
CreateCertificate ( string storeType, string storePath, string applicationUri, string applicationName, string subjectName = null, IList |
Creates a self signed application instance certificate.
|
|
CreateCertificate ( string storeType, string storePath, string password, string applicationUri, string applicationName, string subjectName, IList |
Creates a self signed application instance certificate.
|
|
CreateCertificateFromPKCS12 ( byte rawData, string password ) : X509Certificate2 |
Creates a certificate from a PKCS #12 store with a private key.
|
|
Load ( X509Certificate2 certificate, bool ensurePrivateKeyAccessible ) : X509Certificate2 |
Loads the cached version of a certificate. This function is necessary because all private keys used for cryptography operations must be in a key conatiner. Private keys stored in a PFX file have no key conatiner by default. |
Method | Description | |
---|---|---|
SetSuitableDefaults ( string &applicationUri, string &applicationName, string &subjectName, IList |
Sets the parameters to suitable defaults.
|
public static Create ( byte encodedData, bool useCache ) : |
||
encodedData | byte | The encoded data. |
useCache | bool | if set to |
return |
public static CreateCertificate ( string storeType, string storePath, string applicationUri, string applicationName, string subjectName = null, IList |
||
storeType | string | Type of certificate store (Directory) |
storePath | string | The store path (syntax depends on storeType). |
applicationUri | string | The application uri (created if not specified). |
applicationName | string | Name of the application (optional if subjectName is specified). |
subjectName | string | The subject used to create the certificate (optional if applicationName is specified). |
serverDomainNames | IList |
|
keySize | ushort | Size of the key (1024, 2048 or 4096). |
lifetimeInMonths | ushort | The lifetime of the key in months. |
hashSizeInBits | ushort | The hash size in bits. |
return | X509Certificate2 |
public static CreateCertificate ( string storeType, string storePath, string password, string applicationUri, string applicationName, string subjectName, IList |
||
storeType | string | Type of certificate store (Directory) |
storePath | string | The store path (syntax depends on storeType). |
password | string | The password to use to protect the certificate. |
applicationUri | string | The application uri (created if not specified). |
applicationName | string | Name of the application (optional if subjectName is specified). |
subjectName | string | The subject used to create the certificate (optional if applicationName is specified). |
domainNames | IList |
The domain names that can be used to access the server machine (defaults to local computer name if not specified). |
keySize | ushort | Size of the key (1024, 2048 or 4096). |
startTime | DateTime | The start time. |
lifetimeInMonths | ushort | The lifetime of the key in months. |
hashSizeInBits | ushort | The hash size in bits. |
isCA | bool | if set to |
issuerCAKeyCert | X509Certificate2 | The CA cert with the CA private key. |
return | X509Certificate2 |
public static CreateCertificateFromPKCS12 ( byte rawData, string password ) : X509Certificate2 | ||
rawData | byte | The raw PKCS #12 store data. |
password | string | The password to use to access the store. |
return | X509Certificate2 |
public static Load ( X509Certificate2 certificate, bool ensurePrivateKeyAccessible ) : X509Certificate2 | ||
certificate | X509Certificate2 | The certificate to load. |
ensurePrivateKeyAccessible | bool | If true a key conatiner is created for a certificate that must be deleted by calling Cleanup. |
return | X509Certificate2 |