public errors
This commit is contained in:
parent
5016331872
commit
ca5c049bc7
|
@ -1,4 +1,4 @@
|
|||
enum CardError: Error {
|
||||
public enum CardError: Error {
|
||||
case wrongPIN(retryCounter: Int)
|
||||
case unrecoverableSignature
|
||||
case invalidState
|
||||
|
|
|
@ -6,6 +6,7 @@ public class KeycardCommandSet {
|
|||
let secureChannel: SecureChannel
|
||||
public var info: ApplicationInfo?
|
||||
public var pairing: Pairing? { get { secureChannel.pairing } set { secureChannel.pairing = newValue }}
|
||||
public var isSecureChannelOpen: Bool { return secureChannel.open }
|
||||
|
||||
public init(cardChannel: CardChannel) {
|
||||
self.cardChannel = cardChannel
|
||||
|
|
|
@ -7,4 +7,9 @@ public enum StatusWord: UInt16, Error {
|
|||
case conditionsOfUseNotSatisfied = 0x6985
|
||||
case wrongPINMask = 0x63C0
|
||||
case unknownError = 0x6F00
|
||||
case pairingIndexInvalid = 0x6A86
|
||||
case dataInvalid = 0x6A80
|
||||
case allPairingSlotsTaken = 0x6A84
|
||||
case alreadyInitialized = 0x6D00
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue