Class Pkcs12

    Definition

    Namespace:
    Tizen.Security.SecureRepository
    Assembly:
    Tizen.Security.SecureRepository.dll

    Represents PKCS#12 contents.

    public class Pkcs12
    Inheritance
    object
    Pkcs12
    Remarks

    It has a private key or its certificate or all members of a chain of trust.

    Constructors

    View Source

    Pkcs12(Key, Certificate, IEnumerable<Certificate>)

    Initializes an instance of Pkcs12 class with a private key, its corresponding certificate and CA's certificate chain.

    Declaration
    public Pkcs12(Key privateKey, Certificate certificate, IEnumerable<Certificate> caChain)
    Parameters
    Type Name Description
    Key privateKey

    Private key.

    Certificate certificate

    Certificate corresponding to the private key.

    System.Collections.Generic.IEnumerable<T><Certificate> caChain

    Certificate chain of CA (Certificate Authority) that issued the certificate.

    Remarks

    It has a private key or its certificate or all members of a chain of trust.

    View Source

    Pkcs12(Key)

    Initializes an instance of Pkcs12 class with a private key.

    Declaration
    public Pkcs12(Key privateKey)
    Parameters
    Type Name Description
    Key privateKey

    A private key.

    Remarks

    It has a private key or its certificate or all members of a chain of trust.

    Properties

    View Source

    CaChain

    Gets and sets a certificate chain.

    Declaration
    public IEnumerable<Certificate> CaChain { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<T><Certificate>

    Certificate chain of CA (Certificate Authority) that issued the certificate.

    Remarks

    It has a private key or its certificate or all members of a chain of trust.

    View Source

    Certificate

    Gets and sets a certificate.

    Declaration
    public Certificate Certificate { get; set; }
    Property Value
    Type Description
    Certificate

    Certificate corresponding to the private key.

    Remarks

    It has a private key or its certificate or all members of a chain of trust.

    View Source

    PrivateKey

    Gets and sets private key.

    Declaration
    public Key PrivateKey { get; set; }
    Property Value
    Type Description
    Key

    Private key.

    Remarks

    It has a private key or its certificate or all members of a chain of trust.

    Methods

    View Source

    Load(string, string)

    Loads Pkcs12 from the given PKCS#12 file path.

    Declaration
    public static Pkcs12 Load(string filePath, string filePassword)
    Parameters
    Type Name Description
    string filePath

    Path of the PKCS12 file to be loaded.

    string filePassword

    Passphrase used to decrypt the PCKS12 file.

    Returns
    Type Description
    Pkcs12

    Pkcs12 class instance.

    Remarks

    If the PKCS12 file is not encrypted, passphrase can be null.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when filePath is null.

    System.InvalidOperationException

    Thrown when there's no existing file on filePath. Thrown when there are not sufficient permissions to access the file. Thrown when file has an invalid PKCS12 format. Thrown when file cannot be extracted with provided filePassword.

    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX