Class EbicsSecurityMediumSeccos
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
Properties
CanChangePIN
Indicates whether the PIN can be changed.
public bool CanChangePIN { get; }
Property Value
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
IsClass2
public bool IsClass2 { get; }
Property Value
LastError
public EbicsSecurityMediumErrorCode LastError { get; }
Property Value
SecurityMedium
public string SecurityMedium { get; }
Property Value
SecurityMediumID
public string SecurityMediumID { get; }
Property Value
SecurityMediumType
public EbicsSecurityMediumType SecurityMediumType { get; }
Property Value
State
public EbicsSecurityMediumState State { get; }
Property Value
SupportedSecurityCodes
public EbicsSecurityCode SupportedSecurityCodes { get; }
Property Value
Methods
Authenticate(string)
public bool Authenticate(string sPIN)
Parameters
sPIN
stringThe CSA-PIN of the SECCOS card. If
null
, then this will try a secure authentication at the card reader PIN pad.
Returns
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
- See Also
ChangePIN(string, string)
Changes the CSA-PIN.
public bool ChangePIN(string sOldPIN, string sNewPIN)
Parameters
sOldPIN
stringThe 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
stringThe new CSA-PIN. This must not be
null
. This must have a length between six and eight digits.
Returns
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
ChangePINSecure()
Changes the CSA-PIN by using the PIN pad of a class 2 card reader.
public bool ChangePINSecure()
Returns
- See Also
ChangeSignaturePIN(string, string)
Changes the Signature-PIN.
public bool ChangeSignaturePIN(string sOldPIN, string sNewPIN)
Parameters
sOldPIN
stringThe 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
stringThe 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
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
ChangeSignaturePINSecure()
public bool ChangeSignaturePINSecure()
Returns
Create(string, string)
Not supported by smart cards and therefore returns always false.
public bool Create(string sSecurityMediaID, string sPIN)
Parameters
Returns
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
GetSecurityOperations(EbicsContact)
public IEbicsSecurityOperations GetSecurityOperations(EbicsContact aContact)
Parameters
aContact
EbicsContact
Returns
Release()
public void Release()
Select(string)
public bool Select(string sSecurityMediaID)
Parameters
sSecurityMediaID
string
Returns
SetSignaturePIN(string)
Provide the Signature-PIN for accessing the digital signature key.
public void SetSignaturePIN(string sPIN)
Parameters
sPIN
stringThe 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.