C# Class Gurux.DLMS.Objects.GXDLMSSecuritySetup

Inheritance: GXDLMSObject, IGXDLMSBase
Mostra file Open project: Gurux/Gurux.DLMS.Net

Private Properties

Property Type Description
GetSecurityValue int
GetSertificates byte[]
IGXDLMSBase byte[]
IGXDLMSBase int
IGXDLMSBase int[]
IGXDLMSBase object
IGXDLMSBase string[]
UpdateSertificates void

Public Methods

Method Description
Activate ( Gurux.DLMS.GXDLMSClient client, Gurux security ) : byte[][]

Activates and strengthens the security policy.

ExportCertificateByEntity ( Gurux.DLMS.GXDLMSClient client, CertificateEntity entity, CertificateType type, byte systemTitle ) : byte[][]

Exports an X.509 v3 certificate from the server using entity information.

ExportCertificateBySerial ( Gurux.DLMS.GXDLMSClient client, byte serialNumber, byte issuer ) : byte[][]

Exports an X.509 v3 certificate from the server using serial information.

GXDLMSSecuritySetup ( ) : System

Constructor.

GXDLMSSecuritySetup ( string ln ) : System

Constructor.

GXDLMSSecuritySetup ( string ln, ushort sn ) : System

Constructor.

GenerateCertificate ( Gurux.DLMS.GXDLMSClient client, CertificateType type ) : byte[][]

Ask Server sends the Certificate Signing Request (CSR) data.

GenerateKeyPair ( Gurux.DLMS.GXDLMSClient client, CertificateType type ) : byte[][]

Generates an asymmetric key pair as required by the security suite.

GetDataType ( int index ) : DataType
GetValues ( ) : object[]
GlobalKeyTransfer ( Gurux.DLMS.GXDLMSClient client, byte kek, byte[]>.List list ) : byte[][]

Updates one or more global keys.

IGXDLMSBase ( GXDLMSSettings settings, ValueEventArgs e ) : void
Import ( Gurux.DLMS.GXDLMSClient client, CngKey key ) : byte[][]

Imports an X.509 v3 certificate of a public key.

ImportCertificate ( Gurux.DLMS.GXDLMSClient client, byte key ) : byte[][]

Imports an X.509 v3 certificate of a public key.

RemoveCertificateByEntity ( Gurux.DLMS.GXDLMSClient client, CertificateEntity entity, CertificateType type, byte systemTitle ) : byte[][]

Removes X.509 v3 certificate from the server using entity.

RemoveCertificateBySerial ( Gurux.DLMS.GXDLMSClient client, byte serialNumber, byte issuer ) : byte[][]

Removes X.509 v3 certificate from the server using serial number.

keyAgreement ( GXDLMSClient client, byte[]>.List list ) : byte[][]

Agree on one or more symmetric keys using the key agreement algorithm.

Private Methods

Method Description
GetSecurityValue ( Gurux security ) : int

Get security enum as integer value.

GetSertificates ( ) : byte[]

Get sertificates as byte buffer.

IGXDLMSBase ( GXDLMSSettings settings, ValueEventArgs e ) : byte[]
IGXDLMSBase ( ) : int
IGXDLMSBase ( ) : int[]
IGXDLMSBase ( GXDLMSSettings settings, ValueEventArgs e ) : object
IGXDLMSBase ( ) : string[]
UpdateSertificates ( object list ) : void

Method Details

Activate() public method

Activates and strengthens the security policy.
public Activate ( Gurux.DLMS.GXDLMSClient client, Gurux security ) : byte[][]
client Gurux.DLMS.GXDLMSClient DLMS client that is used to generate action.
security Gurux New security level.
return byte[][]

ExportCertificateByEntity() public method

Exports an X.509 v3 certificate from the server using entity information.
public ExportCertificateByEntity ( Gurux.DLMS.GXDLMSClient client, CertificateEntity entity, CertificateType type, byte systemTitle ) : byte[][]
client Gurux.DLMS.GXDLMSClient DLMS client that is used to generate action.
entity CertificateEntity Certificate entity.
type CertificateType Certificate type.
systemTitle byte System title.
return byte[][]

ExportCertificateBySerial() public method

Exports an X.509 v3 certificate from the server using serial information.
public ExportCertificateBySerial ( Gurux.DLMS.GXDLMSClient client, byte serialNumber, byte issuer ) : byte[][]
client Gurux.DLMS.GXDLMSClient DLMS client that is used to generate action.
serialNumber byte Serial number.
issuer byte Issuer
return byte[][]

GXDLMSSecuritySetup() public method

Constructor.
public GXDLMSSecuritySetup ( ) : System
return System

GXDLMSSecuritySetup() public method

Constructor.
public GXDLMSSecuritySetup ( string ln ) : System
ln string Logical Name of the object.
return System

GXDLMSSecuritySetup() public method

Constructor.
public GXDLMSSecuritySetup ( string ln, ushort sn ) : System
ln string Logical Name of the object.
sn ushort Short Name of the object.
return System

GenerateCertificate() public method

Ask Server sends the Certificate Signing Request (CSR) data.
public GenerateCertificate ( Gurux.DLMS.GXDLMSClient client, CertificateType type ) : byte[][]
client Gurux.DLMS.GXDLMSClient DLMS client that is used to generate action.
type CertificateType identifies the key pair for which the certificate will be requested.
return byte[][]

GenerateKeyPair() public method

Generates an asymmetric key pair as required by the security suite.
public GenerateKeyPair ( Gurux.DLMS.GXDLMSClient client, CertificateType type ) : byte[][]
client Gurux.DLMS.GXDLMSClient DLMS client that is used to generate action.
type CertificateType New certificate type.
return byte[][]

GetDataType() public method

public GetDataType ( int index ) : DataType
index int
return DataType

GetValues() public method

public GetValues ( ) : object[]
return object[]

GlobalKeyTransfer() public method

Updates one or more global keys.
public GlobalKeyTransfer ( Gurux.DLMS.GXDLMSClient client, byte kek, byte[]>.List list ) : byte[][]
client Gurux.DLMS.GXDLMSClient DLMS client that is used to generate action.
kek byte Master key, also known as Key Encrypting Key.
list byte[]>.List List of Global key types and keys.
return byte[][]

IGXDLMSBase() public method

public IGXDLMSBase ( GXDLMSSettings settings, ValueEventArgs e ) : void
settings Gurux.DLMS.GXDLMSSettings
e Gurux.DLMS.ValueEventArgs
return void

Import() public method

Imports an X.509 v3 certificate of a public key.
public Import ( Gurux.DLMS.GXDLMSClient client, CngKey key ) : byte[][]
client Gurux.DLMS.GXDLMSClient DLMS client that is used to generate action.
key CngKey Public key.
return byte[][]

ImportCertificate() public method

Imports an X.509 v3 certificate of a public key.
public ImportCertificate ( Gurux.DLMS.GXDLMSClient client, byte key ) : byte[][]
client Gurux.DLMS.GXDLMSClient DLMS client that is used to generate action.
key byte Public key.
return byte[][]

RemoveCertificateByEntity() public method

Removes X.509 v3 certificate from the server using entity.
public RemoveCertificateByEntity ( Gurux.DLMS.GXDLMSClient client, CertificateEntity entity, CertificateType type, byte systemTitle ) : byte[][]
client Gurux.DLMS.GXDLMSClient DLMS client that is used to generate action.
entity CertificateEntity Certificate entity type.
type CertificateType Certificate type.
systemTitle byte System title.
return byte[][]

RemoveCertificateBySerial() public method

Removes X.509 v3 certificate from the server using serial number.
public RemoveCertificateBySerial ( Gurux.DLMS.GXDLMSClient client, byte serialNumber, byte issuer ) : byte[][]
client Gurux.DLMS.GXDLMSClient DLMS client that is used to generate action.
serialNumber byte Serial number.
issuer byte Issuer.
return byte[][]

keyAgreement() public method

Agree on one or more symmetric keys using the key agreement algorithm.
public keyAgreement ( GXDLMSClient client, byte[]>.List list ) : byte[][]
client GXDLMSClient DLMS client that is used to generate action.
list byte[]>.List List of keys.
return byte[][]