Class EbicsSecurityMediumSeccos

Namespace
Subsembly.EBICS
Assembly
Subsembly.EBICS.SmartCard.dll
public class EbicsSecurityMediumSeccos : IEbicsSecurityMedium, IEbicsSecurityOperations, IEbicsSecurityMediumClass2, IEbicsSecurityMediumSignaturePin
Inheritance
EbicsSecurityMediumSeccos
Implements
Inherited Members

Remarks

Generally an IEbicsSecurityMedium implementation only supports a single authentication PIN. SECCOS smart cards, however, have two different PINs for authentication and digital signatures. The digital signature PIN can be provided to this implementation through the special method SetSignaturePIN(string). If this isn't done, then the implementation will attempt a secure PIN entry, if possible.

Fields

CLASSNAME

public const string CLASSNAME = "Subsembly.EBICS.EbicsSecurityMediumSeccos"

Field Value

string

Properties

CanChangePIN

Indicates whether the PIN can be changed.

public bool CanChangePIN { get; }

Property Value

bool

Remarks

This property is always true.

Only changing the CSA-PIN of a SECCOS smart card is supported by the SECCOS ChangePIN(string, string) implementation. Changing the Signatur-PIN is supported by the special ChangeSignaturePIN(string, string) method.

HaveSignaturePIN

public bool HaveSignaturePIN { get; }

Property Value

bool

IsClass2

public bool IsClass2 { get; }

Property Value

bool

LastError

public EbicsSecurityMediumErrorCode LastError { get; }

Property Value

EbicsSecurityMediumErrorCode

SecurityMedium

public string SecurityMedium { get; }

Property Value

string

SecurityMediumID

public string SecurityMediumID { get; }

Property Value

string

SecurityMediumType

public EbicsSecurityMediumType SecurityMediumType { get; }

Property Value

EbicsSecurityMediumType

State

public EbicsSecurityMediumState State { get; }

Property Value

EbicsSecurityMediumState

SupportedSecurityCodes

public EbicsSecurityCode SupportedSecurityCodes { get; }

Property Value

EbicsSecurityCode

Methods

Authenticate(string)

public bool Authenticate(string sPIN)

Parameters

sPIN string

The CSA-PIN of the SECCOS card. If null, then this will try a secure authentication at the card reader PIN pad.

Returns

bool

Remarks

If a digital signature shall be done, then it may be necessary to provide the digital signature PIN through SetSignaturePIN(string) in addition to the CSA-PIN.

AuthenticateSecure()

public bool AuthenticateSecure()

Returns

bool
See Also

ChangePIN(string, string)

Changes the CSA-PIN.

public bool ChangePIN(string sOldPIN, string sNewPIN)

Parameters

sOldPIN string

The old CSA-PIN or the Transport-CSA-PIN. This must not be null. The given PIN must have a length between four and eight digits.

sNewPIN string

The new CSA-PIN. This must not be null. This must have a length between six and eight digits.

Returns

bool

Remarks

A SECCOS smart card has two different PINs, the CSA-PIN and the Signature-PIN. The method Authenticate(string) expects the CSA-PIN and therefore this method also changes the CSA-PIN. In order to change the Signature-PIN the special method ChangeSignaturePIN(string, string) is provided.

When this method returns the the security medium is still in the Selected state.

Exceptions

ArgumentNullException

One of the parameters was null.

ArgumentException

One of the given PINs has an inappropriate length.

InvalidOperationException

The current State was not Selected

ChangePINSecure()

Changes the CSA-PIN by using the PIN pad of a class 2 card reader.

public bool ChangePINSecure()

Returns

bool
See Also

ChangeSignaturePIN(string, string)

Changes the Signature-PIN.

public bool ChangeSignaturePIN(string sOldPIN, string sNewPIN)

Parameters

sOldPIN string

The current Signature PIN to be changed. This can be the initial five digit Transport PIN or a real PIN. The length of this PIN must be from four to twelve digits. A Transport PIN has five digits.

sNewPIN string

The new Signature PIN to use. The length of this PIN must be from six to twelve digits. A PIN length of six digits is recommended.

Returns

bool

Remarks

When this method returns the the security medium is still in the Selected state.

Exceptions

ArgumentNullException

Either parameter was null.

ArgumentException

The length of either PIN was not within the requirements.

InvalidOperationException

The current State was not Selected

ChangeSignaturePINSecure()

public bool ChangeSignaturePINSecure()

Returns

bool

Create(string, string)

Not supported by smart cards and therefore returns always false.

public bool Create(string sSecurityMediaID, string sPIN)

Parameters

sSecurityMediaID string
sPIN string

Returns

bool

Detect()

Detect SECCOS card in any connected card reader.

public static string Detect()

Returns

string

The card ID that must be passed to Select(string), if a SECCOS card was found. Or null if no card was found.

Remarks

If a SECCOS card is found then its unique card ID is returned. If no SECCOS card is found, then null is returned. If multiple SECCOS cards are available, then this method returns the first one that is found.

GetPasswordInfo()

public EbicsPasswordInfo GetPasswordInfo()

Returns

EbicsPasswordInfo

GetSecurityOperations(EbicsContact)

public IEbicsSecurityOperations GetSecurityOperations(EbicsContact aContact)

Parameters

aContact EbicsContact

Returns

IEbicsSecurityOperations

Release()

public void Release()

Select(string)

public bool Select(string sSecurityMediaID)

Parameters

sSecurityMediaID string

Returns

bool

SetSignaturePIN(string)

Provide the Signature-PIN for accessing the digital signature key.

public void SetSignaturePIN(string sPIN)

Parameters

sPIN string

The PIN that shall be used when access to the digital signature key is required. If the value null is set, then a secure PIN entry is attempted instead.

Remarks

By default the digital signature PIN is not set, thus a secure PIN entry is attempted, whenever access to the digital signature key is required. By setting a PIN through this method, it is possible to provide a PIN for card readers that do not support a secure PIN entry.