/// <summary> /// Get sertificates as byte buffer. /// </summary> /// <returns></returns> private byte[] GetSertificates() { GXByteBuffer bb = new GXByteBuffer(); bb.SetUInt8((byte)DataType.Array); GXCommon.SetObjectCount(Certificates.Count, bb); foreach (GXDLMSCertificateInfo it in Certificates) { bb.SetUInt8((byte)DataType.Structure); GXCommon.SetObjectCount(6, bb); bb.SetUInt8((byte)DataType.Enum); bb.SetUInt8((byte)it.Entity); bb.SetUInt8((byte)DataType.Enum); bb.SetUInt8((byte)it.Type); GXCommon.AddString(it.SerialNumber, bb); GXCommon.AddString(it.Issuer, bb); GXCommon.AddString(it.Subject, bb); GXCommon.AddString(it.SubjectAltName, bb); } return(bb.Array()); }