Documentation
¶
Overview ¶
Package pcsc provides purego-based Go bindings for the macOS PCSC framework.
Apple documentation: https://developer.apple.com/documentation/pcsc
Index ¶
- func MSCBeginTransaction(pConnection *MSCTokenConnection) uint32
- func MSCCancelEventWait() uint32
- func MSCChangePIN(pConnection *MSCTokenConnection, pinNum uint8, pOldPinCode *uint8, ...) uint32
- func MSCClearReset(pConnection *MSCTokenConnection) uint8
- func MSCComputeCrypt(pConnection *MSCTokenConnection, cryptInit *MSCCryptInit, pInputData *uint8, ...) uint32
- func MSCCreateObject(pConnection *MSCTokenConnection, objectID string, objectSize uint32, ...) uint32
- func MSCCreatePIN(pConnection *MSCTokenConnection, pinNum uint8, pinAttempts uint8, ...) uint32
- func MSCDeleteObject(pConnection *MSCTokenConnection, objectID string, zeroFlag uint8) uint32
- func MSCEndTransaction(pConnection *MSCTokenConnection, endAction uint32) uint32
- func MSCEstablishConnection(tokenStruct *MSCTokenInfo, sharingMode uint32, applicationName *uint8, ...) uint32
- func MSCExportKey(pConnection *MSCTokenConnection, keyNum uint8, pKeyBlob *uint8, ...) uint32
- func MSCExtAuthenticate(pConnection *MSCTokenConnection, keyNum uint8, cipherMode uint8, ...) uint32
- func MSCExtendedFeature(pConnection *MSCTokenConnection, extFeature uint32, outData *uint8, ...) uint32
- func MSCGenerateKeys(pConnection *MSCTokenConnection, prvKeyNum uint8, pubKeyNum uint8, ...) uint32
- func MSCGetCapabilities(pConnection *MSCTokenConnection, tag uint32, value *uint8, length *uint32) uint32
- func MSCGetChallenge(pConnection *MSCTokenConnection, pSeed *uint8, seedSize uint16, ...) uint32
- func MSCGetKeyAttributes(pConnection *MSCTokenConnection, keyNumber uint8, pKeyInfo *MSCKeyInfo) uint32
- func MSCGetObjectAttributes(pConnection *MSCTokenConnection, objectID string, pObjectInfo *MSCObjectInfo) uint32
- func MSCGetStatus(pConnection *MSCTokenConnection, pStatusInfo *MSCStatusInfo) uint32
- func MSCImportKey(pConnection *MSCTokenConnection, keyNum uint8, pKeyACL *MSCKeyACL, ...) uint32
- func MSCIsTokenChanged(pConnection *MSCTokenConnection) uint8
- func MSCIsTokenKnown(pConnection *MSCTokenConnection) uint8
- func MSCIsTokenMoved(pConnection *MSCTokenConnection) uint8
- func MSCIsTokenReset(pConnection *MSCTokenConnection) uint8
- func MSCListKeys(pConnection *MSCTokenConnection, seqOption uint8, pKeyInfo *MSCKeyInfo) uint32
- func MSCListObjects(pConnection *MSCTokenConnection, seqOption uint8, pObjectInfo *MSCObjectInfo) uint32
- func MSCListPINs(pConnection *MSCTokenConnection, pPinBitMask *uint16) uint32
- func MSCListTokens(listScope uint32, tokenArray *MSCTokenInfo, arrayLength *uint32) uint32
- func MSCLogoutAll(pConnection *MSCTokenConnection) uint32
- func MSCReadAllocateObject(pConnection *MSCTokenConnection, objectID string, pOutputData **uint8, ...) uint32
- func MSCReadObject(pConnection *MSCTokenConnection, objectID string, offset uint32, ...) uint32
- func MSCReleaseConnection(pConnection *MSCTokenConnection, endAction uint32) uint32
- func MSCUnblockPIN(pConnection *MSCTokenConnection, pinNum uint8, pUnblockCode *uint8, ...) uint32
- func MSCVerifyPIN(pConnection *MSCTokenConnection, pinNum uint8, pPinCode *uint8, ...) uint32
- func MSCWaitForTokenEvent(tokenArray *MSCTokenInfo, arraySize uint32, timeoutValue uint32) uint32
- func MSCWriteFramework(pConnection *MSCTokenConnection, pInitParams *MSCInitTokenParams) uint32
- func MSCWriteObject(pConnection *MSCTokenConnection, objectID string, offset uint32, ...) uint32
- func MscError(errorCode uint) string
- func PcscStringifyError(err int32) string
- func SCardBeginTransaction(hCard int32) int32
- func SCardCancel(hContext int32) int32
- func SCardCancelTransaction(hCard int32) int32
- func SCardConnect(hContext int32, szReader string, dwShareMode uint32, ...) int32
- func SCardControl(hCard int32, pbSendBuffer unsafe.Pointer, cbSendLength uint32, ...) int32
- func SCardControl132(hCard int32, dwControlCode uint32, pbSendBuffer unsafe.Pointer, ...) int32
- func SCardDisconnect(hCard int32, dwDisposition uint32) int32
- func SCardEndTransaction(hCard int32, dwDisposition uint32) int32
- func SCardEstablishContext(dwScope uint32, pvReserved1 unsafe.Pointer, pvReserved2 unsafe.Pointer, ...) int32
- func SCardGetAttrib(hCard int32, dwAttrId uint32, pbAttr *uint8, pcbAttrLen *uint32) int32
- func SCardGetStatusChange(hContext int32, dwTimeout uint32, rgReaderStates *SCARD_READERSTATE_A, ...) int32
- func SCardIsValidContext(hContext int32) int32
- func SCardListReaderGroups(hContext int32, mszGroups string, pcchGroups *uint32) int32
- func SCardListReaders(hContext int32, mszGroups string, mszReaders string, pcchReaders *uint32) int32
- func SCardReconnect(hCard int32, dwShareMode uint32, dwPreferredProtocols uint32, ...) int32
- func SCardReleaseContext(hContext int32) int32
- func SCardSetAttrib(hCard int32, dwAttrId uint32, pbAttr *uint8, cbAttrLen uint32) int32
- func SCardSetTimeout(hContext int32, dwTimeout uint32) int32
- func SCardStatus(hCard int32, mszReaderNames string, pcchReaderLen *uint32, pdwState *uint32, ...) int32
- func SCardTransmit(hCard int32, pioSendPci *SCARD_IO_REQUEST, pbSendBuffer *uint8, ...) int32
- func SCardUnload()
- func SymbolAvailable(symbol string) bool
- type CFDyLibPointers
- type LPCFDyLibPointers
- type LPSCARD_IO_REQUEST
- type MSCCertACL
- type MSCCryptInit
- type MSCEventWaitInfo
- type MSCGenKeyParams
- type MSCInitTokenParams
- type MSCKeyACL
- type MSCKeyInfo
- type MSCKeyPolicy
- type MSCLPCertACL
- type MSCLPCryptInit
- type MSCLPEventWaitInfo
- type MSCLPGenKeyParams
- type MSCLPInitTokenParams
- type MSCLPKeyACL
- type MSCLPKeyInfo
- type MSCLPKeyPolicy
- type MSCLPObjectACL
- type MSCLPObjectInfo
- type MSCLPStatusInfo
- type MSCLPTokenConnection
- type MSCLPTokenInfo
- type MSCObjectACL
- type MSCObjectInfo
- type MSCStatusInfo
- type MSCTokenConnection
- type MSCTokenInfo
- type PSCARD_IO_REQUEST
- type SCARDIOREQUEST
- type SCARD_IO_REQUEST
- type SCARD_READERSTATE_A
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MSCBeginTransaction ¶
func MSCBeginTransaction(pConnection *MSCTokenConnection) uint32
func MSCCancelEventWait ¶
func MSCCancelEventWait() uint32
func MSCChangePIN ¶
func MSCClearReset ¶
func MSCClearReset(pConnection *MSCTokenConnection) uint8
func MSCComputeCrypt ¶
func MSCComputeCrypt(pConnection *MSCTokenConnection, cryptInit *MSCCryptInit, pInputData *uint8, inputDataSize uint32, pOutputData *uint8, outputDataSize *uint32) uint32
func MSCCreateObject ¶
func MSCCreateObject(pConnection *MSCTokenConnection, objectID string, objectSize uint32, pObjectACL *MSCObjectACL) uint32
func MSCCreatePIN ¶
func MSCDeleteObject ¶
func MSCDeleteObject(pConnection *MSCTokenConnection, objectID string, zeroFlag uint8) uint32
func MSCEndTransaction ¶
func MSCEndTransaction(pConnection *MSCTokenConnection, endAction uint32) uint32
func MSCEstablishConnection ¶
func MSCEstablishConnection(tokenStruct *MSCTokenInfo, sharingMode uint32, applicationName *uint8, nameSize uint32, pConnection *MSCTokenConnection) uint32
func MSCExportKey ¶
func MSCExtAuthenticate ¶
func MSCExtendedFeature ¶
func MSCGenerateKeys ¶
func MSCGenerateKeys(pConnection *MSCTokenConnection, prvKeyNum uint8, pubKeyNum uint8, pParams *MSCGenKeyParams) uint32
func MSCGetCapabilities ¶
func MSCGetCapabilities(pConnection *MSCTokenConnection, tag uint32, value *uint8, length *uint32) uint32
func MSCGetChallenge ¶
func MSCGetKeyAttributes ¶
func MSCGetKeyAttributes(pConnection *MSCTokenConnection, keyNumber uint8, pKeyInfo *MSCKeyInfo) uint32
func MSCGetObjectAttributes ¶
func MSCGetObjectAttributes(pConnection *MSCTokenConnection, objectID string, pObjectInfo *MSCObjectInfo) uint32
func MSCGetStatus ¶
func MSCGetStatus(pConnection *MSCTokenConnection, pStatusInfo *MSCStatusInfo) uint32
func MSCImportKey ¶
func MSCImportKey(pConnection *MSCTokenConnection, keyNum uint8, pKeyACL *MSCKeyACL, pKeyBlob *uint8, keyBlobSize uint32, keyPolicy *MSCKeyPolicy, pAddParams unsafe.Pointer, addParamsSize uint8) uint32
func MSCIsTokenChanged ¶
func MSCIsTokenChanged(pConnection *MSCTokenConnection) uint8
func MSCIsTokenKnown ¶
func MSCIsTokenKnown(pConnection *MSCTokenConnection) uint8
func MSCIsTokenMoved ¶
func MSCIsTokenMoved(pConnection *MSCTokenConnection) uint8
func MSCIsTokenReset ¶
func MSCIsTokenReset(pConnection *MSCTokenConnection) uint8
func MSCListKeys ¶
func MSCListKeys(pConnection *MSCTokenConnection, seqOption uint8, pKeyInfo *MSCKeyInfo) uint32
func MSCListObjects ¶
func MSCListObjects(pConnection *MSCTokenConnection, seqOption uint8, pObjectInfo *MSCObjectInfo) uint32
func MSCListPINs ¶
func MSCListPINs(pConnection *MSCTokenConnection, pPinBitMask *uint16) uint32
func MSCListTokens ¶
func MSCListTokens(listScope uint32, tokenArray *MSCTokenInfo, arrayLength *uint32) uint32
func MSCLogoutAll ¶
func MSCLogoutAll(pConnection *MSCTokenConnection) uint32
func MSCReadAllocateObject ¶
func MSCReadObject ¶
func MSCReleaseConnection ¶
func MSCReleaseConnection(pConnection *MSCTokenConnection, endAction uint32) uint32
func MSCUnblockPIN ¶
func MSCUnblockPIN(pConnection *MSCTokenConnection, pinNum uint8, pUnblockCode *uint8, unblockCodeSize uint32) uint32
func MSCVerifyPIN ¶
func MSCVerifyPIN(pConnection *MSCTokenConnection, pinNum uint8, pPinCode *uint8, pinCodeSize uint32) uint32
func MSCWaitForTokenEvent ¶
func MSCWaitForTokenEvent(tokenArray *MSCTokenInfo, arraySize uint32, timeoutValue uint32) uint32
func MSCWriteFramework ¶
func MSCWriteFramework(pConnection *MSCTokenConnection, pInitParams *MSCInitTokenParams) uint32
func MSCWriteObject ¶
func PcscStringifyError ¶
C function: pcsc_stringify_error
func SCardBeginTransaction ¶
func SCardCancel ¶
func SCardCancelTransaction ¶
func SCardConnect ¶
func SCardControl ¶
func SCardControl132 ¶
func SCardDisconnect ¶
func SCardEndTransaction ¶
func SCardEstablishContext ¶
func SCardGetAttrib ¶
func SCardGetStatusChange ¶
func SCardGetStatusChange(hContext int32, dwTimeout uint32, rgReaderStates *SCARD_READERSTATE_A, cReaders uint32) int32
func SCardIsValidContext ¶
func SCardListReaderGroups ¶
func SCardListReaders ¶
func SCardReconnect ¶
func SCardReleaseContext ¶
func SCardSetAttrib ¶
func SCardSetTimeout ¶
func SCardStatus ¶
func SCardTransmit ¶
func SCardTransmit(hCard int32, pioSendPci *SCARD_IO_REQUEST, pbSendBuffer *uint8, cbSendLength uint32, pioRecvPci *SCARDIOREQUEST, pbRecvBuffer *uint8, pcbRecvLength *uint32) int32
func SCardUnload ¶
func SCardUnload()
func SymbolAvailable ¶
SymbolAvailable reports whether the named C symbol was bound when the library loaded. Calling a generated wrapper whose symbol is unavailable dereferences a nil function variable and panics.
Types ¶
type CFDyLibPointers ¶
type CFDyLibPointers struct {
PvfWriteFramework unsafe.Pointer
PvfInitializePlugin unsafe.Pointer
PvfIdentifyToken unsafe.Pointer
PvfFinalizePlugin unsafe.Pointer
PvfGetStatus unsafe.Pointer
PvfGetCapabilities unsafe.Pointer
PvfExtendedFeature unsafe.Pointer
PvfGenerateKeys unsafe.Pointer
PvfImportKey unsafe.Pointer
PvfExportKey unsafe.Pointer
PvfComputeCrypt unsafe.Pointer
PvfExtAuthenticate unsafe.Pointer
PvfListKeys unsafe.Pointer
PvfCreatePIN unsafe.Pointer
PvfVerifyPIN unsafe.Pointer
PvfChangePIN unsafe.Pointer
PvfUnblockPIN unsafe.Pointer
PvfListPINs unsafe.Pointer
PvfCreateObject unsafe.Pointer
PvfDeleteObject unsafe.Pointer
PvfWriteObject unsafe.Pointer
PvfReadObject unsafe.Pointer
PvfListObjects unsafe.Pointer
PvfLogoutAll unsafe.Pointer
PvfGetChallenge unsafe.Pointer
}
type LPCFDyLibPointers ¶
type LPCFDyLibPointers = *CFDyLibPointers
LPCFDyLibPointers is an opaque pointer to CFDyLibPointers (C typedef LPCFDyLibPointers).
type LPSCARD_IO_REQUEST ¶
type LPSCARD_IO_REQUEST = *SCARDIOREQUEST
LPSCARD_IO_REQUEST is an opaque pointer to _SCARD_IO_REQUEST (C typedef LPSCARD_IO_REQUEST).
type MSCCertACL ¶
type MSCCertACL = MSCObjectACL
MSCCertACL is an alias for MSCObjectACL (C typedef MSCCertACL).
type MSCCryptInit ¶
type MSCEventWaitInfo ¶
type MSCGenKeyParams ¶
type MSCGenKeyParams struct {
AlgoType uint8
KeySize uint16
PrivateKeyACL MSCKeyACL
PublicKeyACL MSCKeyACL
PrivateKeyPolicy MSCKeyPolicy
PublicKeyPolicy MSCKeyPolicy
KeyGenOptions uint8
POptParams *uint8
OptParamsSize uint32
}
type MSCInitTokenParams ¶
type MSCInitTokenParams struct {
TransportKey [264]uint8
TransportKeyLen uint32
TransportBehavior uint8
ObjectMemory uint32
NewTransportKey [264]uint8
NewTransportKeyLen uint32
DefaultCHV [264]uint8
DefaultCHVLen uint32
DefaultCHVTries uint8
DefaultCHVUnblock [264]uint8
DefaultCHVUnblockSize uint32
DefaultCHVUnblockTries uint8
CreateObjectACL uint16
CreateKeysACL uint16
CreatePINsACL uint16
MaxNumberKeys uint8
MaxNumberPINs uint8
MaxNumberObjects uint16
}
type MSCKeyInfo ¶
type MSCKeyPolicy ¶
type MSCLPCertACL ¶
type MSCLPCertACL = *MSCObjectACL
MSCLPCertACL is an opaque pointer to MSCObjectACL (C typedef MSCLPCertACL).
type MSCLPCryptInit ¶
type MSCLPCryptInit = *MSCCryptInit
MSCLPCryptInit is an opaque pointer to MSCCryptInit (C typedef MSCLPCryptInit).
type MSCLPEventWaitInfo ¶
type MSCLPEventWaitInfo = *MSCEventWaitInfo
MSCLPEventWaitInfo is an opaque pointer to MSCEventWaitInfo (C typedef MSCLPEventWaitInfo).
type MSCLPGenKeyParams ¶
type MSCLPGenKeyParams = *MSCGenKeyParams
MSCLPGenKeyParams is an opaque pointer to MSCGenKeyParams (C typedef MSCLPGenKeyParams).
type MSCLPInitTokenParams ¶
type MSCLPInitTokenParams = *MSCInitTokenParams
MSCLPInitTokenParams is an opaque pointer to MSCInitTokenParams (C typedef MSCLPInitTokenParams).
type MSCLPKeyACL ¶
type MSCLPKeyACL = *MSCKeyACL
MSCLPKeyACL is an opaque pointer to MSCKeyACL (C typedef MSCLPKeyACL).
type MSCLPKeyInfo ¶
type MSCLPKeyInfo = *MSCKeyInfo
MSCLPKeyInfo is an opaque pointer to MSCKeyInfo (C typedef MSCLPKeyInfo).
type MSCLPKeyPolicy ¶
type MSCLPKeyPolicy = *MSCKeyPolicy
MSCLPKeyPolicy is an opaque pointer to MSCKeyPolicy (C typedef MSCLPKeyPolicy).
type MSCLPObjectACL ¶
type MSCLPObjectACL = *MSCObjectACL
MSCLPObjectACL is an opaque pointer to MSCObjectACL (C typedef MSCLPObjectACL).
type MSCLPObjectInfo ¶
type MSCLPObjectInfo = *MSCObjectInfo
MSCLPObjectInfo is an opaque pointer to MSCObjectInfo (C typedef MSCLPObjectInfo).
type MSCLPStatusInfo ¶
type MSCLPStatusInfo = *MSCStatusInfo
MSCLPStatusInfo is an opaque pointer to MSCStatusInfo (C typedef MSCLPStatusInfo).
type MSCLPTokenConnection ¶
type MSCLPTokenConnection = *MSCTokenConnection
MSCLPTokenConnection is an opaque pointer to MSCTokenConnection (C typedef MSCLPTokenConnection).
type MSCLPTokenInfo ¶
type MSCLPTokenInfo = *MSCTokenInfo
MSCLPTokenInfo is an opaque pointer to MSCTokenInfo (C typedef MSCLPTokenInfo).
type MSCObjectACL ¶
type MSCObjectInfo ¶
type MSCObjectInfo struct {
ObjectID [16]int8
ObjectSize uint32
ObjectACL MSCObjectACL
}
type MSCStatusInfo ¶
type MSCTokenConnection ¶
type MSCTokenConnection struct {
HContext int32
HCard int32
IoType *SCARDIOREQUEST
PMac [128]uint8
MacSize uint32
TokenLibHandle unsafe.Pointer
LibPointers CFDyLibPointers
TokenInfo MSCTokenInfo
LoggedIDs uint8
RwCallback unsafe.Pointer
}
type MSCTokenInfo ¶
type PSCARD_IO_REQUEST ¶
type PSCARD_IO_REQUEST = *SCARDIOREQUEST
PSCARD_IO_REQUEST is an opaque pointer to _SCARD_IO_REQUEST (C typedef PSCARD_IO_REQUEST).
type SCARDIOREQUEST ¶
Protocol Control Information (PCI) C struct: _SCARD_IO_REQUEST
type SCARD_IO_REQUEST ¶
type SCARD_IO_REQUEST = SCARDIOREQUEST
SCARD_IO_REQUEST is an alias for _SCARD_IO_REQUEST (C typedef SCARD_IO_REQUEST).
func G_rgSCardRawPci ¶
func G_rgSCardRawPci() SCARD_IO_REQUEST
func G_rgSCardT0Pci ¶
func G_rgSCardT0Pci() SCARD_IO_REQUEST
func G_rgSCardT1Pci ¶
func G_rgSCardT1Pci() SCARD_IO_REQUEST