Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains low-level binding for PKCS#11 C interface. Module is not intended to be used directly by user applications.
- _serialSession :: Int
- _rwSession :: Int
- type SlotId = CULong
- type ObjectHandle = CULong
- type Rv = CULong
- type CK_BBOOL = CUChar
- type CK_BYTE = CUChar
- type CK_FLAGS = CULong
- type GetFunctionListFunPtr = FunPtr (Ptr (Ptr ()) -> IO Rv)
- type NotifyFunPtr = FunPtr (CULong -> CULong -> Ptr () -> IO Rv)
- type SessionHandle = CULong
- type FunctionListPtr = Ptr ()
- type LibraryInfoPtr = Ptr LibraryInfo
- type SlotInfoPtr = Ptr SlotInfo
- type TokenInfoPtr = Ptr TokenInfo
- type SessionInfoPtr = Ptr SessionInfo
- type LlAttributePtr = Ptr LlAttribute
- type MechInfoPtr = Ptr MechInfo
- type MechPtr = Ptr Mech
- errSignatureInvalid :: CULong
- errBufferTooSmall :: CULong
- type GetFunctionListFun = Ptr FunctionListPtr -> IO CULong
- getFunctionList'_ :: GetFunctionListFunPtr -> GetFunctionListFun
- data Version = Version {
- versionMajor :: Int
- versionMinor :: Int
- data LibraryInfo = LibraryInfo {}
- data SlotInfo = SlotInfo {}
- data TokenInfo = TokenInfo {}
- data MechInfo = MechInfo {}
- data Mech = Mech {
- mechType :: MechType
- mechParamPtr :: Ptr ()
- mechParamSize :: Int
- data SessionInfo = SessionInfo {}
- initialize :: FunctionListPtr -> IO Rv
- getInfo' :: FunctionListPtr -> IO (Rv, LibraryInfo)
- getSlotList' :: FunctionListPtr -> Bool -> Ptr SlotId -> CULong -> IO (Rv, CULong)
- initToken' :: FunctionListPtr -> SlotId -> ByteString -> String -> IO Rv
- initPin' :: FunctionListPtr -> CULong -> ByteString -> IO Rv
- setPin' :: FunctionListPtr -> CULong -> ByteString -> ByteString -> IO Rv
- getSessionInfo' :: FunctionListPtr -> SessionHandle -> IO (Rv, SessionInfo)
- getSlotInfo' :: FunctionListPtr -> SlotId -> IO (Rv, SlotInfo)
- getTokenInfo' :: FunctionListPtr -> SlotId -> IO (Rv, TokenInfo)
- openSession' :: (Num b1, Num a3, Integral a2, Integral a1) => Ptr b2 -> a1 -> a2 -> IO (a3, b1)
- closeSession' :: FunctionListPtr -> SessionHandle -> IO Rv
- closeAllSessions' :: FunctionListPtr -> SlotId -> IO Rv
- finalize :: FunctionListPtr -> IO Rv
- findObjectsInit' :: FunctionListPtr -> SessionHandle -> LlAttributePtr -> CULong -> IO Rv
- findObjects' :: Num a => Ptr b -> SessionHandle -> Int -> IO (a, [ObjectHandle])
- findObjectsFinal' :: FunctionListPtr -> CULong -> IO Rv
- data UserType
- data SessionState
- getOperationState' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> IO (Rv, CULong)
- _login :: FunctionListPtr -> SessionHandle -> UserType -> ByteString -> IO Rv
- logout' :: FunctionListPtr -> SessionHandle -> IO Rv
- destroyObject' :: FunctionListPtr -> SessionHandle -> ObjectHandle -> IO Rv
- generateKey' :: FunctionListPtr -> SessionHandle -> Mech -> LlAttributePtr -> CULong -> IO (Rv, ObjectHandle)
- _generateKeyPair :: FunctionListPtr -> SessionHandle -> Mech -> [Attribute] -> [Attribute] -> IO (Rv, ObjectHandle, ObjectHandle)
- getMechanismList' :: FunctionListPtr -> SlotId -> Ptr CUChar -> CULong -> IO (Rv, CULong)
- _getMechanismInfo :: FunctionListPtr -> SlotId -> Int -> IO (Rv, MechInfo)
- rvToStr :: Rv -> String
- data ClassType
- data KeyTypeValue
- data AttributeType
- = ClassType
- | TokenType
- | PrivateType
- | LabelType
- | ApplicationType
- | ValueType
- | ObjectType
- | CertificateType
- | IssuerType
- | SerialNumberType
- | AcIssuerType
- | OwnerType
- | AttrTypesType
- | TrustedType
- | CertificateCategoryType
- | JavaMidpSecurityDomainType
- | UrlType
- | HashOfSubjectPublicKeyType
- | HashOfIssuerPublicKeyType
- | CheckValueType
- | KeyTypeType
- | SubjectType
- | IdType
- | SensitiveType
- | EncryptType
- | DecryptType
- | WrapType
- | UnwrapType
- | SignType
- | SignRecoverType
- | VerifyType
- | VerifyRecoverType
- | DeriveType
- | StartDateType
- | EndDataType
- | ModulusType
- | ModulusBitsType
- | PublicExponentType
- | PrivateExponentType
- | Prime1Type
- | Prime2Type
- | Exponent1Type
- | Exponent2Type
- | CoefficientType
- | PrimeType
- | SubPrimeType
- | BaseType
- | PrimeBitsType
- | SubPrimeBitsType
- | ValueBitsType
- | ValueLenType
- | ExtractableType
- | LocalType
- | NeverExtractableType
- | AlwaysSensitiveType
- | KeyGenMechanismType
- | ModifiableType
- | EcdsaParamsType
- | EcParamsType
- | EcPointType
- | SecondaryAuthType
- | AuthPinFlagsType
- | AlwaysAuthenticateType
- | WrapWithTrustedType
- | OtpFormatType
- | OtpLengthType
- | OtpTimeIntervalType
- | OtpUserFriendlyModeType
- | OtpChallengeRequirementType
- | OtpTimeRequirementType
- | OtpCounterRequirementType
- | OtpPinRequirementType
- | OtpUserIdentifierType
- | OtpServiceIdentifierType
- | OtpServiceLogoType
- | OtpServiceLogoTypeType
- | OtpCounterType
- | OtpTimeType
- | GostR3410ParamsType
- | GostR3411ParamsType
- | Gost28147ParamsType
- | HwFeatureTypeType
- | ResetOnInitType
- | HasResetType
- | PixelXType
- | PixelYType
- | ResolutionType
- | CharRowsType
- | CharColumnsType
- | ColorType
- | BitPerPixelType
- | CharSetsType
- | EncodingMethodsType
- | MimeTypesType
- | MechanismTypeType
- | RequiredCmsAttributesType
- | DefaultCmsAttributesType
- | SupportedCmsAttributesType
- | WrapTemplateType
- | UnwrapTemplateType
- | DeriveTemplateType
- | AllowedMechanismsType
- | VendorDefinedType
- data Attribute
- = Class ClassType
- | KeyType KeyTypeValue
- | Label String
- | Token Bool
- | Decrypt Bool
- | Sign Bool
- | ModulusBits Int
- | Modulus Integer
- | PublicExponent Integer
- | PrimeBits Int
- | Prime Integer
- | Base Integer
- | ValueLen Int
- | Value ByteString
- | Extractable Bool
- | EcParams ByteString
- | EcdsaParams ByteString
- | EcPoint ByteString
- data LlAttribute = LlAttribute {}
- _attrType :: Attribute -> AttributeType
- _valueSize :: Attribute -> Int
- _pokeValue :: Attribute -> Ptr () -> IO ()
- _pokeValues :: [Attribute] -> Ptr () -> IO ()
- _valuesSize :: [Attribute] -> Int
- _makeLowLevelAttrs :: [Attribute] -> Ptr () -> [LlAttribute]
- _withAttribs :: [Attribute] -> (Ptr LlAttribute -> IO a) -> IO a
- unroll :: Integer -> [Word8]
- _bigIntLen :: Integer -> Int
- _pokeBigInt :: Integer -> Ptr Word8 -> IO ()
- _peekBigInt :: Ptr () -> CULong -> IO Integer
- _llAttrToAttr :: LlAttribute -> IO Attribute
- deriveKey' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> LlAttributePtr -> CULong -> IO (Rv, ObjectHandle)
- createObject' :: FunctionListPtr -> SessionHandle -> LlAttributePtr -> CULong -> IO (Rv, ObjectHandle)
- copyObject' :: FunctionListPtr -> SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> IO (Rv, ObjectHandle)
- getObjectSize' :: FunctionListPtr -> SessionHandle -> ObjectHandle -> IO (Rv, CULong)
- _getAttr :: FunctionListPtr -> SessionHandle -> ObjectHandle -> AttributeType -> Ptr x -> IO ()
- getObjectAttr' :: FunctionListPtr -> SessionHandle -> ObjectHandle -> AttributeType -> IO Attribute
- setAttributeValue' :: FunctionListPtr -> SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> IO Rv
- data MechType
- = RsaPkcsKeyPairGen
- | RsaPkcs
- | Rsa9796
- | RsaX509
- | Md2RsaPkcs
- | Md5RsaPkcs
- | Sha1RsaPkcs
- | RipeMd128RsaPkcs
- | RipeMd160RsaPkcs
- | RsaPkcsOaep
- | RsaX931KeyPairGen
- | RsaX931
- | Sha1RsaX931
- | RsaPkcsPss
- | Sha1RsaPkcsPss
- | DsaKeyPairGen
- | Dsa
- | DsaSha1
- | DhPkcsKeyPairGen
- | DhPkcsDerive
- | X942DhKeyPairGen
- | X942DhDerive
- | X942DhHybridDerive
- | X942MqvDerive
- | Sha256RsaPkcs
- | Sha384RsaPkcs
- | Sha512RsaPkcs
- | Sha256RsaPkcsPss
- | Sha384RsaPkcsPss
- | Sha512RsaPkcsPss
- | Sha224RsaPkcs
- | Sha224RsaPkcsPss
- | Rc2KeyGen
- | Rc2Ecb
- | Rc2Cbc
- | Rc2Mac
- | Rc2MacGeneral
- | Rc2CbcPad
- | Rc4KeyGen
- | Rc4
- | DesKeyGen
- | DesEcb
- | DesCbc
- | DesMac
- | DesMacGeneral
- | DesCbcPad
- | Des2KeyGen
- | Des3KeyGen
- | Des3Ecb
- | Des3Cbc
- | Des3Mac
- | Des3MacGeneral
- | Des3CbcPad
- | CdmfKeyGen
- | CdmfEcb
- | CdmfCbc
- | CdmfMac
- | CdmfMacGeneral
- | CdmfCbcPad
- | DesOfb64
- | DesOfb8
- | DesCfb64
- | DesCfb8
- | Md2
- | Md2Hmac
- | Md2HmacGeneral
- | Md5
- | Md5Hmac
- | Md5HmacGeneral
- | Sha1
- | Sha1Hmac
- | Sha1HmacGeneral
- | RipeMd128
- | RipeMd128Hmac
- | RipeMd128HmacGeneral
- | Ripe160
- | Ripe160Hmac
- | Ripe160HmacGeneral
- | Sha256
- | Sha256Hmac
- | Sha256HmacGeneral
- | Sha224
- | Sha224Hmac
- | Sha224HmacGeneral
- | Sha384
- | Sha384Hmac
- | Sha384HmacGeneral
- | Sha512
- | Sha512Hmac
- | Sha512HmacGeneral
- | CastKeyGen
- | CastEcb
- | CastCbc
- | CastMac
- | CastMacGeneral
- | CastCbcPad
- | Cast3KeyGen
- | Cast3Ecb
- | Cast3Cbc
- | Cast3Mac
- | Cast3MacGeneral
- | Cast3CbcPad
- | Cast5KeyGen
- | Cast128KeyGen
- | Cast5Ecb
- | Cast128Ecb
- | Cast5Cbc
- | Cast128Cbc
- | Cast5Mac
- | Cast128Mac
- | Cast5MacGeneral
- | Cast128MacGeneral
- | Cast5CbcPad
- | Cast128CbcPad
- | Rc5KeyGen
- | Rc5Ecb
- | Rc5Cbc
- | Rc5Mac
- | Rc5MacGeneral
- | Rc5CbcPad
- | IdeaKeyGen
- | IdeaEcb
- | IdeaCbc
- | IdeaMac
- | IdeaMacGeneral
- | IdeaCbcPad
- | GeneralSecretKeyGen
- | ConcatenateBaseAndKey
- | ConcatenateBaseAndData
- | ConcatenateDataAndBase
- | XorBaseAndData
- | ExtractKeyFromKey
- | Ssl3PreMasterKeyGen
- | Ssl3MasterKeyDerive
- | Ssl3KeyAndMacDerive
- | Sha224KeyDerivation
- | PbeMd2DesCbc
- | PbeMd5DesCbc
- | PbeMd5CastCbc
- | PbeMd5Cast3Cbc
- | PbeMd5Cast5Cbc
- | PbeMd5Cast128Cbc
- | PbeSha1Cast5Cbc
- | PbeSha1Cast128Cbc
- | PbeSha1Rc4128
- | PbeSha1Rc440
- | PbeSha1Des3EdeCbc
- | PbeSha1Des2EdeCbc
- | PbeSha1Rc2128Cbc
- | PbeSha1Rc240Cbc
- | Pkcs5Pbkd2
- | PbaSha1WithSha1Hmac
- | EcdsaKeyPairGen
- | EcKeyPairGen
- | Ecdsa
- | EcdsaSha1
- | Ecdh1Derive
- | Ecdh1CofactorDerive
- | DcmqvDerive
- | JuniperKeyGen
- | JuniperEcb128
- | JuniperCbc128
- | JuniperCounter
- | JuniperShuffle
- | JuniperWrap
- | FastHash
- | AesKeyGen
- | AesEcb
- | AesCbc
- | AesMac
- | AesMacGeneral
- | AesCbcPad
- | AesCtr
- | AesGcm
- | AesCcm
- | AesKeyWrap
- | BlowfishKeyGen
- | AesKeyWrapPad
- | BlowfishCbc
- | TwoFishKeyGen
- | TwoFishCbc
- | DesEcbEncryptData
- | DesCbcEncryptData
- | Des3EcbEncryptData
- | Des3CbcEncryptData
- | AesEcbEncryptData
- | AesCbcEncryptData
- | DsaParameterGen
- | DhPkcsParameterGen
- | X9_42DhParameterGen
- | VendorDefined
- decryptInit' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> IO Rv
- decrypt' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO (Rv, CULong)
- encryptInit' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> IO Rv
- encrypt' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO (Rv, CULong)
- encryptUpdate' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO (Rv, CULong)
- encryptFinal' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> IO (Rv, CULong)
- digestInit' :: FunctionListPtr -> SessionHandle -> Mech -> IO Rv
- digest' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO (Rv, CULong)
- signInit' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> IO Rv
- sign' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO (Rv, CULong)
- signRecoverInit' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> IO Rv
- signRecover' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO (Rv, CULong)
- verifyInit' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> IO Rv
- verify' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO Rv
- unwrapKey' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> Ptr CUChar -> CULong -> LlAttributePtr -> CULong -> IO (Rv, ObjectHandle)
- wrapKey' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> ObjectHandle -> Ptr CUChar -> CULong -> IO (Rv, CULong)
- seedRandom' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> IO Rv
- generateRandom' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> IO Rv
- initialize'_ :: FunPtr (Ptr () -> IO Rv) -> Ptr () -> IO Rv
- getInfo''_ :: FunPtr (LibraryInfoPtr -> IO Rv) -> LibraryInfoPtr -> IO Rv
- getSlotList''_ :: FunPtr (CUChar -> Ptr SlotId -> Ptr CULong -> IO Rv) -> CUChar -> Ptr SlotId -> Ptr CULong -> IO Rv
- cK_FUNCTION_LISTc_InitToken :: FunPtr (SlotId -> Ptr CUChar -> CULong -> Ptr CUChar -> IO Rv) -> SlotId -> Ptr CUChar -> CULong -> Ptr CUChar -> IO Rv
- cK_FUNCTION_LISTc_InitPIN :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> IO Rv
- cK_FUNCTION_LISTc_SetPIN :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO Rv
- getSessionInfo''_ :: FunPtr (SessionHandle -> SessionInfoPtr -> IO Rv) -> SessionHandle -> SessionInfoPtr -> IO Rv
- getSlotInfo''_ :: FunPtr (SlotId -> SlotInfoPtr -> IO Rv) -> SlotId -> SlotInfoPtr -> IO Rv
- getTokenInfo''_ :: FunPtr (SlotId -> TokenInfoPtr -> IO Rv) -> SlotId -> TokenInfoPtr -> IO Rv
- cK_FUNCTION_LISTc_OpenSession :: FunPtr (SlotId -> CULong -> Ptr () -> FunPtr (SessionHandle -> CULong -> Ptr () -> IO Rv) -> Ptr SessionHandle -> IO Rv) -> SlotId -> CULong -> Ptr () -> FunPtr (SessionHandle -> CULong -> Ptr () -> IO Rv) -> Ptr SessionHandle -> IO Rv
- closeSession''_ :: FunPtr (SessionHandle -> IO Rv) -> SessionHandle -> IO Rv
- closeAllSessions''_ :: FunPtr (SlotId -> IO Rv) -> SlotId -> IO Rv
- finalize'_ :: FunPtr (Ptr () -> IO Rv) -> Ptr () -> IO Rv
- findObjectsInit''_ :: FunPtr (SessionHandle -> LlAttributePtr -> CULong -> IO Rv) -> SessionHandle -> LlAttributePtr -> CULong -> IO Rv
- cK_FUNCTION_LISTc_FindObjects :: FunPtr (SessionHandle -> Ptr ObjectHandle -> CULong -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr ObjectHandle -> CULong -> Ptr CULong -> IO Rv
- findObjectsFinal''_ :: FunPtr (SessionHandle -> IO Rv) -> SessionHandle -> IO Rv
- getOperationState''_ :: FunPtr (SessionHandle -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> Ptr CULong -> IO Rv
- cK_FUNCTION_LISTc_Login :: FunPtr (SessionHandle -> CULong -> Ptr CUChar -> CULong -> IO Rv) -> SessionHandle -> CULong -> Ptr CUChar -> CULong -> IO Rv
- logout''_ :: FunPtr (SessionHandle -> IO Rv) -> SessionHandle -> IO Rv
- destroyObject''_ :: FunPtr (SessionHandle -> ObjectHandle -> IO Rv) -> SessionHandle -> ObjectHandle -> IO Rv
- generateKey''_ :: FunPtr (SessionHandle -> MechPtr -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv
- cK_FUNCTION_LISTc_GenerateKeyPair :: FunPtr (SessionHandle -> MechPtr -> LlAttributePtr -> CULong -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> Ptr ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> LlAttributePtr -> CULong -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> Ptr ObjectHandle -> IO Rv
- getMechanismList''_ :: FunPtr (SlotId -> Ptr CULong -> Ptr CULong -> IO Rv) -> SlotId -> Ptr CULong -> Ptr CULong -> IO Rv
- _getMechanismInfo'_ :: FunPtr (SlotId -> CULong -> MechInfoPtr -> IO Rv) -> SlotId -> CULong -> MechInfoPtr -> IO Rv
- deriveKey''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv
- createObject''_ :: FunPtr (SessionHandle -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv) -> SessionHandle -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv
- copyObject''_ :: FunPtr (SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv) -> SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv
- getObjectSize''_ :: FunPtr (SessionHandle -> ObjectHandle -> Ptr CULong -> IO Rv) -> SessionHandle -> ObjectHandle -> Ptr CULong -> IO Rv
- cK_FUNCTION_LISTc_GetAttributeValue :: FunPtr (SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> IO Rv) -> SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> IO Rv
- setAttributeValue''_ :: FunPtr (SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> IO Rv) -> SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> IO Rv
- decryptInit''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> IO Rv
- decrypt''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv
- encryptInit''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> IO Rv
- encrypt''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv
- encryptUpdate''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv
- encryptFinal''_ :: FunPtr (SessionHandle -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> Ptr CULong -> IO Rv
- digestInit''_ :: FunPtr (SessionHandle -> MechPtr -> IO Rv) -> SessionHandle -> MechPtr -> IO Rv
- digest''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv
- signInit''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> IO Rv
- sign''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv
- signRecoverInit''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> IO Rv
- signRecover''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv
- verifyInit''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> IO Rv
- verify''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO Rv
- unwrapKey''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> Ptr CUChar -> CULong -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> Ptr CUChar -> CULong -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv
- wrapKey''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> ObjectHandle -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> ObjectHandle -> Ptr CUChar -> Ptr CULong -> IO Rv
- seedRandom''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> IO Rv
- generateRandom''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> IO Rv
Documentation
_serialSession :: Int Source #
_rwSession :: Int Source #
type ObjectHandle = CULong Source #
Used to reference an object
type SessionHandle = CULong Source #
type FunctionListPtr = Ptr () Source #
type LibraryInfoPtr = Ptr LibraryInfo Source #
type SlotInfoPtr = Ptr SlotInfo Source #
type TokenInfoPtr = Ptr TokenInfo Source #
type SessionInfoPtr = Ptr SessionInfo Source #
type LlAttributePtr = Ptr LlAttribute Source #
type MechInfoPtr = Ptr MechInfo Source #
type GetFunctionListFun = Ptr FunctionListPtr -> IO CULong Source #
Version | |
|
data LibraryInfo Source #
Represents general library information. Returned by getInfo
function.
LibraryInfo | |
|
SlotInfo | |
|
TokenInfo | |
|
Represent information about a mechanism. Returned by getMechanismInfo
function.
MechInfo | |
|
Represents mechanism with parameters to be used in cryptographic operation. Parameterless mechanism can be
created with simpleMech
function. Few example operations using this data structure are encrypt
, generateKey
.
Mech | |
|
data SessionInfo Source #
Represent session information. Returned by getSessionInfo
function.
SessionInfo | |
|
initialize :: FunctionListPtr -> IO Rv Source #
getInfo' :: FunctionListPtr -> IO (Rv, LibraryInfo) Source #
initToken' :: FunctionListPtr -> SlotId -> ByteString -> String -> IO Rv Source #
initPin' :: FunctionListPtr -> CULong -> ByteString -> IO Rv Source #
setPin' :: FunctionListPtr -> CULong -> ByteString -> ByteString -> IO Rv Source #
getSessionInfo' :: FunctionListPtr -> SessionHandle -> IO (Rv, SessionInfo) Source #
getSlotInfo' :: FunctionListPtr -> SlotId -> IO (Rv, SlotInfo) Source #
getTokenInfo' :: FunctionListPtr -> SlotId -> IO (Rv, TokenInfo) Source #
openSession' :: (Num b1, Num a3, Integral a2, Integral a1) => Ptr b2 -> a1 -> a2 -> IO (a3, b1) Source #
closeSession' :: FunctionListPtr -> SessionHandle -> IO Rv Source #
closeAllSessions' :: FunctionListPtr -> SlotId -> IO Rv Source #
findObjectsInit' :: FunctionListPtr -> SessionHandle -> LlAttributePtr -> CULong -> IO Rv Source #
findObjects' :: Num a => Ptr b -> SessionHandle -> Int -> IO (a, [ObjectHandle]) Source #
findObjectsFinal' :: FunctionListPtr -> CULong -> IO Rv Source #
data SessionState Source #
getOperationState' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> IO (Rv, CULong) Source #
_login :: FunctionListPtr -> SessionHandle -> UserType -> ByteString -> IO Rv Source #
logout' :: FunctionListPtr -> SessionHandle -> IO Rv Source #
destroyObject' :: FunctionListPtr -> SessionHandle -> ObjectHandle -> IO Rv Source #
generateKey' :: FunctionListPtr -> SessionHandle -> Mech -> LlAttributePtr -> CULong -> IO (Rv, ObjectHandle) Source #
_generateKeyPair :: FunctionListPtr -> SessionHandle -> Mech -> [Attribute] -> [Attribute] -> IO (Rv, ObjectHandle, ObjectHandle) Source #
_getMechanismInfo :: FunctionListPtr -> SlotId -> Int -> IO (Rv, MechInfo) Source #
data KeyTypeValue Source #
data AttributeType Source #
Represents an attribute of an object
Class ClassType | class of an object, e.g. |
KeyType KeyTypeValue | |
Label String | object's label |
Token Bool | whether object is stored on the token or is a temporary session object |
Decrypt Bool | allow/deny encryption function for an object |
Sign Bool | allow/deny signing function for an object |
ModulusBits Int | number of bits used by modulus, for example in RSA public key |
Modulus Integer | modulus value, used by RSA keys |
PublicExponent Integer | value of public exponent, used by RSA public keys |
PrimeBits Int | number of bits used by prime in classic Diffie-Hellman |
Prime Integer | value of prime modulus, used in classic Diffie-Hellman |
Base Integer | value of generator, used in classic Diffie-Hellman |
ValueLen Int | length in bytes of the corresponding |
Value ByteString | object's value attribute, for example it is a DER encoded certificate for certificate objects |
Extractable Bool | allows or denys extraction of certain attributes of private keys |
EcParams ByteString | DER encoded ANSI X9.62 parameters value for elliptic-curve algorithm |
EcdsaParams ByteString | DER encoded ANSI X9.62 parameters value for elliptic-curve algorithm |
EcPoint ByteString | DER encoded ANSI X9.62 point for elliptic-curve algorithm |
data LlAttribute Source #
_attrType :: Attribute -> AttributeType Source #
_valueSize :: Attribute -> Int Source #
_valuesSize :: [Attribute] -> Int Source #
_makeLowLevelAttrs :: [Attribute] -> Ptr () -> [LlAttribute] Source #
_withAttribs :: [Attribute] -> (Ptr LlAttribute -> IO a) -> IO a Source #
_bigIntLen :: Integer -> Int Source #
_llAttrToAttr :: LlAttribute -> IO Attribute Source #
deriveKey' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> LlAttributePtr -> CULong -> IO (Rv, ObjectHandle) Source #
createObject' :: FunctionListPtr -> SessionHandle -> LlAttributePtr -> CULong -> IO (Rv, ObjectHandle) Source #
copyObject' :: FunctionListPtr -> SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> IO (Rv, ObjectHandle) Source #
getObjectSize' :: FunctionListPtr -> SessionHandle -> ObjectHandle -> IO (Rv, CULong) Source #
_getAttr :: FunctionListPtr -> SessionHandle -> ObjectHandle -> AttributeType -> Ptr x -> IO () Source #
getObjectAttr' :: FunctionListPtr -> SessionHandle -> ObjectHandle -> AttributeType -> IO Attribute Source #
setAttributeValue' :: FunctionListPtr -> SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> IO Rv Source #
decryptInit' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> IO Rv Source #
decrypt' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO (Rv, CULong) Source #
encryptInit' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> IO Rv Source #
encrypt' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO (Rv, CULong) Source #
encryptUpdate' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO (Rv, CULong) Source #
encryptFinal' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> IO (Rv, CULong) Source #
digestInit' :: FunctionListPtr -> SessionHandle -> Mech -> IO Rv Source #
digest' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO (Rv, CULong) Source #
signInit' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> IO Rv Source #
sign' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO (Rv, CULong) Source #
signRecoverInit' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> IO Rv Source #
signRecover' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO (Rv, CULong) Source #
verifyInit' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> IO Rv Source #
verify' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO Rv Source #
unwrapKey' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> Ptr CUChar -> CULong -> LlAttributePtr -> CULong -> IO (Rv, ObjectHandle) Source #
wrapKey' :: FunctionListPtr -> SessionHandle -> Mech -> ObjectHandle -> ObjectHandle -> Ptr CUChar -> CULong -> IO (Rv, CULong) Source #
seedRandom' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> IO Rv Source #
generateRandom' :: FunctionListPtr -> SessionHandle -> Ptr CUChar -> CULong -> IO Rv Source #
getInfo''_ :: FunPtr (LibraryInfoPtr -> IO Rv) -> LibraryInfoPtr -> IO Rv Source #
getSlotList''_ :: FunPtr (CUChar -> Ptr SlotId -> Ptr CULong -> IO Rv) -> CUChar -> Ptr SlotId -> Ptr CULong -> IO Rv Source #
cK_FUNCTION_LISTc_InitToken :: FunPtr (SlotId -> Ptr CUChar -> CULong -> Ptr CUChar -> IO Rv) -> SlotId -> Ptr CUChar -> CULong -> Ptr CUChar -> IO Rv Source #
cK_FUNCTION_LISTc_InitPIN :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> IO Rv Source #
cK_FUNCTION_LISTc_SetPIN :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO Rv Source #
getSessionInfo''_ :: FunPtr (SessionHandle -> SessionInfoPtr -> IO Rv) -> SessionHandle -> SessionInfoPtr -> IO Rv Source #
getSlotInfo''_ :: FunPtr (SlotId -> SlotInfoPtr -> IO Rv) -> SlotId -> SlotInfoPtr -> IO Rv Source #
getTokenInfo''_ :: FunPtr (SlotId -> TokenInfoPtr -> IO Rv) -> SlotId -> TokenInfoPtr -> IO Rv Source #
cK_FUNCTION_LISTc_OpenSession :: FunPtr (SlotId -> CULong -> Ptr () -> FunPtr (SessionHandle -> CULong -> Ptr () -> IO Rv) -> Ptr SessionHandle -> IO Rv) -> SlotId -> CULong -> Ptr () -> FunPtr (SessionHandle -> CULong -> Ptr () -> IO Rv) -> Ptr SessionHandle -> IO Rv Source #
closeSession''_ :: FunPtr (SessionHandle -> IO Rv) -> SessionHandle -> IO Rv Source #
findObjectsInit''_ :: FunPtr (SessionHandle -> LlAttributePtr -> CULong -> IO Rv) -> SessionHandle -> LlAttributePtr -> CULong -> IO Rv Source #
cK_FUNCTION_LISTc_FindObjects :: FunPtr (SessionHandle -> Ptr ObjectHandle -> CULong -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr ObjectHandle -> CULong -> Ptr CULong -> IO Rv Source #
findObjectsFinal''_ :: FunPtr (SessionHandle -> IO Rv) -> SessionHandle -> IO Rv Source #
getOperationState''_ :: FunPtr (SessionHandle -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> Ptr CULong -> IO Rv Source #
cK_FUNCTION_LISTc_Login :: FunPtr (SessionHandle -> CULong -> Ptr CUChar -> CULong -> IO Rv) -> SessionHandle -> CULong -> Ptr CUChar -> CULong -> IO Rv Source #
logout''_ :: FunPtr (SessionHandle -> IO Rv) -> SessionHandle -> IO Rv Source #
destroyObject''_ :: FunPtr (SessionHandle -> ObjectHandle -> IO Rv) -> SessionHandle -> ObjectHandle -> IO Rv Source #
generateKey''_ :: FunPtr (SessionHandle -> MechPtr -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv Source #
cK_FUNCTION_LISTc_GenerateKeyPair :: FunPtr (SessionHandle -> MechPtr -> LlAttributePtr -> CULong -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> Ptr ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> LlAttributePtr -> CULong -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> Ptr ObjectHandle -> IO Rv Source #
getMechanismList''_ :: FunPtr (SlotId -> Ptr CULong -> Ptr CULong -> IO Rv) -> SlotId -> Ptr CULong -> Ptr CULong -> IO Rv Source #
_getMechanismInfo'_ :: FunPtr (SlotId -> CULong -> MechInfoPtr -> IO Rv) -> SlotId -> CULong -> MechInfoPtr -> IO Rv Source #
deriveKey''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv Source #
createObject''_ :: FunPtr (SessionHandle -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv) -> SessionHandle -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv Source #
copyObject''_ :: FunPtr (SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv) -> SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv Source #
getObjectSize''_ :: FunPtr (SessionHandle -> ObjectHandle -> Ptr CULong -> IO Rv) -> SessionHandle -> ObjectHandle -> Ptr CULong -> IO Rv Source #
cK_FUNCTION_LISTc_GetAttributeValue :: FunPtr (SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> IO Rv) -> SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> IO Rv Source #
setAttributeValue''_ :: FunPtr (SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> IO Rv) -> SessionHandle -> ObjectHandle -> LlAttributePtr -> CULong -> IO Rv Source #
decryptInit''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> IO Rv Source #
decrypt''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv Source #
encryptInit''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> IO Rv Source #
encrypt''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv Source #
encryptUpdate''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv Source #
encryptFinal''_ :: FunPtr (SessionHandle -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> Ptr CULong -> IO Rv Source #
digestInit''_ :: FunPtr (SessionHandle -> MechPtr -> IO Rv) -> SessionHandle -> MechPtr -> IO Rv Source #
digest''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv Source #
signInit''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> IO Rv Source #
sign''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv Source #
signRecoverInit''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> IO Rv Source #
signRecover''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> Ptr CULong -> IO Rv Source #
verifyInit''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> IO Rv Source #
verify''_ :: FunPtr (SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO Rv) -> SessionHandle -> Ptr CUChar -> CULong -> Ptr CUChar -> CULong -> IO Rv Source #
unwrapKey''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> Ptr CUChar -> CULong -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> Ptr CUChar -> CULong -> LlAttributePtr -> CULong -> Ptr ObjectHandle -> IO Rv Source #
wrapKey''_ :: FunPtr (SessionHandle -> MechPtr -> ObjectHandle -> ObjectHandle -> Ptr CUChar -> Ptr CULong -> IO Rv) -> SessionHandle -> MechPtr -> ObjectHandle -> ObjectHandle -> Ptr CUChar -> Ptr CULong -> IO Rv Source #