Botan 3.6.1
Crypto and TLS for C&
|
Classes | |
class | AttributeContainer |
Helper class to build the Attribute / CK_ATTRIBUTE structures. More... | |
class | CertificateProperties |
Common attributes of all certificate objects. More... | |
class | DataObjectProperties |
Common attributes of all data objects. More... | |
class | DomainParameterProperties |
Common attributes of domain parameter. More... | |
class | KeyProperties |
Common attributes of all key objects. More... | |
class | LowLevel |
Provides access to all PKCS#11 functions. More... | |
class | MechanismWrapper |
class | Module |
class | Object |
class | ObjectFinder |
Manages calls to C_FindObjects* functions (C_FindObjectsInit -> C_FindObjects -> C_FindObjectsFinal) More... | |
class | ObjectProperties |
Common attributes of all objects. More... | |
class | PKCS11_Error |
class | PKCS11_ReturnError |
class | PKCS11_RNG |
A random generator that only fetches random from the PKCS#11 RNG. More... | |
class | PrivateKeyProperties |
Common attributes of all private keys. More... | |
class | PublicKeyProperties |
Common attributes of all public key objects. More... | |
class | SecretKeyProperties |
Common attributes of all secret (symmetric) keys. More... | |
class | Session |
Represents a PKCS#11 session. More... | |
class | Slot |
Represents a PKCS#11 Slot, i.e., a card reader. More... | |
class | StorageObjectProperties |
Common attributes of all storage objects. More... | |
Typedefs | |
using | Attribute = CK_ATTRIBUTE |
using | Bbool = CK_BBOOL |
using | Byte = CK_BYTE |
using | C_InitializeArgs = CK_C_INITIALIZE_ARGS |
using | CreateMutex = CK_CREATEMUTEX |
using | Date = CK_DATE |
using | DestroyMutex = CK_DESTROYMUTEX |
using | Ecdh1DeriveParams = CK_ECDH1_DERIVE_PARAMS |
using | Flags = CK_FLAGS |
using | FunctionListPtr = CK_FUNCTION_LIST_PTR |
using | Info = CK_INFO |
using | LockMutex = CK_LOCKMUTEX |
using | Mechanism = CK_MECHANISM |
using | MechanismInfo = CK_MECHANISM_INFO |
using | Notify = CK_NOTIFY |
using | ObjectHandle = CK_OBJECT_HANDLE |
using | RsaPkcsOaepParams = CK_RSA_PKCS_OAEP_PARAMS |
using | RsaPkcsPssParams = CK_RSA_PKCS_PSS_PARAMS |
using | secure_string = secure_vector<uint8_t> |
using | SessionHandle = CK_SESSION_HANDLE |
using | SessionInfo = CK_SESSION_INFO |
using | SlotId = CK_SLOT_ID |
using | SlotInfo = CK_SLOT_INFO |
using | TokenInfo = CK_TOKEN_INFO |
using | Ulong = CK_ULONG |
using | UnlockMutex = CK_UNLOCKMUTEX |
using | Utf8Char = CK_UTF8CHAR |
using | VoidPtr = CK_VOID_PTR |
Enumerations | |
enum class | AttributeType : CK_ATTRIBUTE_TYPE { Class = 0x00000000UL , Token = 0x00000001UL , Private = 0x00000002UL , Label = 0x00000003UL , Application = 0x00000010UL , Value = 0x00000011UL , ObjectId = 0x00000012UL , CertificateType = 0x00000080UL , Issuer = 0x00000081UL , SerialNumber = 0x00000082UL , AcIssuer = 0x00000083UL , Owner = 0x00000084UL , AttrTypes = 0x00000085UL , Trusted = 0x00000086UL , CertificateCategory = 0x00000087UL , JavaMidpSecurityDomain = 0x00000088UL , Url = 0x00000089UL , HashOfSubjectPublicKey = 0x0000008AUL , HashOfIssuerPublicKey = 0x0000008BUL , NameHashAlgorithm = 0x0000008CUL , CheckValue = 0x00000090UL , KeyType = 0x00000100UL , Subject = 0x00000101UL , Id = 0x00000102UL , Sensitive = 0x00000103UL , Encrypt = 0x00000104UL , Decrypt = 0x00000105UL , Wrap = 0x00000106UL , Unwrap = 0x00000107UL , Sign = 0x00000108UL , SignRecover = 0x00000109UL , Verify = 0x0000010AUL , VerifyRecover = 0x0000010BUL , Derive = 0x0000010CUL , StartDate = 0x00000110UL , EndDate = 0x00000111UL , Modulus = 0x00000120UL , ModulusBits = 0x00000121UL , PublicExponent = 0x00000122UL , PrivateExponent = 0x00000123UL , Prime1 = 0x00000124UL , Prime2 = 0x00000125UL , Exponent1 = 0x00000126UL , Exponent2 = 0x00000127UL , Coefficient = 0x00000128UL , PublicKeyInfo = 0x00000129UL , Prime = 0x00000130UL , Subprime = 0x00000131UL , Base = 0x00000132UL , PrimeBits = 0x00000133UL , SubprimeBits = 0x00000134UL , SubPrimeBits = 0x00000134UL , ValueBits = 0x00000160UL , ValueLen = 0x00000161UL , Extractable = 0x00000162UL , Local = 0x00000163UL , NeverExtractable = 0x00000164UL , AlwaysSensitive = 0x00000165UL , KeyGenMechanism = 0x00000166UL , Modifiable = 0x00000170UL , Copyable = 0x00000171UL , Destroyable = 0x00000172UL , EcdsaParams = 0x00000180UL , EcParams = 0x00000180UL , EcPoint = 0x00000181UL , SecondaryAuth = 0x00000200UL , AuthPinFlags = 0x00000201UL , AlwaysAuthenticate = 0x00000202UL , WrapWithTrusted = 0x00000210UL , WrapTemplate = ( 0x40000000UL |0x00000211UL) , UnwrapTemplate = ( 0x40000000UL |0x00000212UL) , DeriveTemplate = ( 0x40000000UL |0x00000213UL) , OtpFormat = 0x00000220UL , OtpLength = 0x00000221UL , OtpTimeInterval = 0x00000222UL , OtpUserFriendlyMode = 0x00000223UL , OtpChallengeRequirement = 0x00000224UL , OtpTimeRequirement = 0x00000225UL , OtpCounterRequirement = 0x00000226UL , OtpPinRequirement = 0x00000227UL , OtpCounter = 0x0000022EUL , OtpTime = 0x0000022FUL , OtpUserIdentifier = 0x0000022AUL , OtpServiceIdentifier = 0x0000022BUL , OtpServiceLogo = 0x0000022CUL , OtpServiceLogoType = 0x0000022DUL , Gostr3410Params = 0x00000250UL , Gostr3411Params = 0x00000251UL , Gost28147Params = 0x00000252UL , HwFeatureType = 0x00000300UL , ResetOnInit = 0x00000301UL , HasReset = 0x00000302UL , PixelX = 0x00000400UL , PixelY = 0x00000401UL , Resolution = 0x00000402UL , CharRows = 0x00000403UL , CharColumns = 0x00000404UL , Color = 0x00000405UL , BitsPerPixel = 0x00000406UL , CharSets = 0x00000480UL , EncodingMethods = 0x00000481UL , MimeTypes = 0x00000482UL , MechanismType = 0x00000500UL , RequiredCmsAttributes = 0x00000501UL , DefaultCmsAttributes = 0x00000502UL , SupportedCmsAttributes = 0x00000503UL , AllowedMechanisms = ( 0x40000000UL |0x00000600UL) , VendorDefined = 0x80000000UL } |
enum class | CertificateCategory : CK_ULONG { Unspecified = 0UL , TokenUser = 1UL , Authority = 2UL , OtherEntity = 3UL } |
enum class | CertificateType : CK_CERTIFICATE_TYPE { X509 = 0x00000000UL , X509AttrCert = 0x00000001UL , Wtls = 0x00000002UL , VendorDefined = 0x80000000UL } |
enum class | Flag : CK_FLAGS { None = 0 , TokenPresent = 0x00000001UL , RemovableDevice = 0x00000002UL , HwSlot = 0x00000004UL , Rng = 0x00000001UL , WriteProtected = 0x00000002UL , LoginRequired = 0x00000004UL , UserPinInitialized = 0x00000008UL , RestoreKeyNotNeeded = 0x00000020UL , ClockOnToken = 0x00000040UL , ProtectedAuthenticationPath = 0x00000100UL , DualCryptoOperations = 0x00000200UL , TokenInitialized = 0x00000400UL , SecondaryAuthentication = 0x00000800UL , UserPinCountLow = 0x00010000UL , UserPinFinalTry = 0x00020000UL , UserPinLocked = 0x00040000UL , UserPinToBeChanged = 0x00080000UL , SoPinCountLow = 0x00100000UL , SoPinFinalTry = 0x00200000UL , SoPinLocked = 0x00400000UL , SoPinToBeChanged = 0x00800000UL , ErrorState = 0x01000000UL , RwSession = 0x00000002UL , SerialSession = 0x00000004UL , ArrayAttribute = 0x40000000UL , Hw = 0x00000001UL , Encrypt = 0x00000100UL , Decrypt = 0x00000200UL , Digest = 0x00000400UL , Sign = 0x00000800UL , SignRecover = 0x00001000UL , Verify = 0x00002000UL , VerifyRecover = 0x00004000UL , Generate = 0x00008000UL , GenerateKeyPair = 0x00010000UL , Wrap = 0x00020000UL , Unwrap = 0x00040000UL , Derive = 0x00080000UL , EcFP = 0x00100000UL , EcF2m = 0x00200000UL , EcEcparameters = 0x00400000UL , EcNamedcurve = 0x00800000UL , EcUncompress = 0x01000000UL , EcCompress = 0x02000000UL , Extension = 0x80000000UL , LibraryCantCreateOsThreads = 0x00000001UL , OsLockingOk = 0x00000002UL , DontBlock = 1 , NextOtp = 0x00000001UL , ExcludeTime = 0x00000002UL , ExcludeCounter = 0x00000004UL , ExcludeChallenge = 0x00000008UL , ExcludePin = 0x00000010UL , UserFriendlyOtp = 0x00000020UL } |
enum class | HardwareType : CK_HW_FEATURE_TYPE { MonotonicCounter = 0x00000001UL , Clock = 0x00000002UL , UserInterface = 0x00000003UL , VendorDefined = 0x80000000UL } |
enum class | KeyDerivation : CK_ULONG { Null = 0x00000001UL , Sha1Kdf = 0x00000002UL , Sha1KdfAsn1 = 0x00000003UL , Sha1KdfConcatenate = 0x00000004UL , Sha224Kdf = 0x00000005UL , Sha256Kdf = 0x00000006UL , Sha384Kdf = 0x00000007UL , Sha512Kdf = 0x00000008UL , CpdiversifyKdf = 0x00000009UL } |
enum class | KeyType : CK_KEY_TYPE { Rsa = 0x00000000UL , Dsa = 0x00000001UL , Dh = 0x00000002UL , Ecdsa = 0x00000003UL , Ec = 0x00000003UL , X942Dh = 0x00000004UL , Kea = 0x00000005UL , GenericSecret = 0x00000010UL , Rc2 = 0x00000011UL , Rc4 = 0x00000012UL , Des = 0x00000013UL , Des2 = 0x00000014UL , Des3 = 0x00000015UL , Cast = 0x00000016UL , Cast3 = 0x00000017UL , Cast5 = 0x00000018UL , Cast128 = 0x00000018UL , Rc5 = 0x00000019UL , Idea = 0x0000001AUL , Skipjack = 0x0000001BUL , Baton = 0x0000001CUL , Juniper = 0x0000001DUL , Cdmf = 0x0000001EUL , Aes = 0x0000001FUL , Blowfish = 0x00000020UL , Twofish = 0x00000021UL , Securid = 0x00000022UL , Hotp = 0x00000023UL , Acti = 0x00000024UL , Camellia = 0x00000025UL , Aria = 0x00000026UL , Md5Hmac = 0x00000027UL , Sha1Hmac = 0x00000028UL , Ripemd128Hmac = 0x00000029UL , Ripemd160Hmac = 0x0000002AUL , Sha256Hmac = 0x0000002BUL , Sha384Hmac = 0x0000002CUL , Sha512Hmac = 0x0000002DUL , Sha224Hmac = 0x0000002EUL , Seed = 0x0000002FUL , Gostr3410 = 0x00000030UL , Gostr3411 = 0x00000031UL , Gost28147 = 0x00000032UL , VendorDefined = 0x80000000UL } |
enum class | MechanismType : CK_MECHANISM_TYPE { RsaPkcsKeyPairGen = 0x00000000UL , RsaPkcs = 0x00000001UL , Rsa9796 = 0x00000002UL , RsaX509 = 0x00000003UL , Md2RsaPkcs = 0x00000004UL , Md5RsaPkcs = 0x00000005UL , Sha1RsaPkcs = 0x00000006UL , Ripemd128RsaPkcs = 0x00000007UL , Ripemd160RsaPkcs = 0x00000008UL , RsaPkcsOaep = 0x00000009UL , RsaX931KeyPairGen = 0x0000000AUL , RsaX931 = 0x0000000BUL , Sha1RsaX931 = 0x0000000CUL , RsaPkcsPss = 0x0000000DUL , Sha1RsaPkcsPss = 0x0000000EUL , DsaKeyPairGen = 0x00000010UL , Dsa = 0x00000011UL , DsaSha1 = 0x00000012UL , DsaSha224 = 0x00000013UL , DsaSha256 = 0x00000014UL , DsaSha384 = 0x00000015UL , DsaSha512 = 0x00000016UL , DhPkcsKeyPairGen = 0x00000020UL , DhPkcsDerive = 0x00000021UL , X942DhKeyPairGen = 0x00000030UL , X942DhDerive = 0x00000031UL , X942DhHybridDerive = 0x00000032UL , X942MqvDerive = 0x00000033UL , Sha256RsaPkcs = 0x00000040UL , Sha384RsaPkcs = 0x00000041UL , Sha512RsaPkcs = 0x00000042UL , Sha256RsaPkcsPss = 0x00000043UL , Sha384RsaPkcsPss = 0x00000044UL , Sha512RsaPkcsPss = 0x00000045UL , Sha224RsaPkcs = 0x00000046UL , Sha224RsaPkcsPss = 0x00000047UL , Sha512224 = 0x00000048UL , Sha512224Hmac = 0x00000049UL , Sha512224HmacGeneral = 0x0000004AUL , Sha512224KeyDerivation = 0x0000004BUL , Sha512256 = 0x0000004CUL , Sha512256Hmac = 0x0000004DUL , Sha512256HmacGeneral = 0x0000004EUL , Sha512256KeyDerivation = 0x0000004FUL , Sha512T = 0x00000050UL , Sha512THmac = 0x00000051UL , Sha512THmacGeneral = 0x00000052UL , Sha512TKeyDerivation = 0x00000053UL , Rc2KeyGen = 0x00000100UL , Rc2Ecb = 0x00000101UL , Rc2Cbc = 0x00000102UL , Rc2Mac = 0x00000103UL , Rc2MacGeneral = 0x00000104UL , Rc2CbcPad = 0x00000105UL , Rc4KeyGen = 0x00000110UL , Rc4 = 0x00000111UL , DesKeyGen = 0x00000120UL , DesEcb = 0x00000121UL , DesCbc = 0x00000122UL , DesMac = 0x00000123UL , DesMacGeneral = 0x00000124UL , DesCbcPad = 0x00000125UL , Des2KeyGen = 0x00000130UL , Des3KeyGen = 0x00000131UL , Des3Ecb = 0x00000132UL , Des3Cbc = 0x00000133UL , Des3Mac = 0x00000134UL , Des3MacGeneral = 0x00000135UL , Des3CbcPad = 0x00000136UL , Des3CmacGeneral = 0x00000137UL , Des3Cmac = 0x00000138UL , CdmfKeyGen = 0x00000140UL , CdmfEcb = 0x00000141UL , CdmfCbc = 0x00000142UL , CdmfMac = 0x00000143UL , CdmfMacGeneral = 0x00000144UL , CdmfCbcPad = 0x00000145UL , DesOfb64 = 0x00000150UL , DesOfb8 = 0x00000151UL , DesCfb64 = 0x00000152UL , DesCfb8 = 0x00000153UL , Md2 = 0x00000200UL , Md2Hmac = 0x00000201UL , Md2HmacGeneral = 0x00000202UL , Md5 = 0x00000210UL , Md5Hmac = 0x00000211UL , Md5HmacGeneral = 0x00000212UL , Sha1 = 0x00000220UL , Sha1Hmac = 0x00000221UL , Sha1HmacGeneral = 0x00000222UL , Ripemd128 = 0x00000230UL , Ripemd128Hmac = 0x00000231UL , Ripemd128HmacGeneral = 0x00000232UL , Ripemd160 = 0x00000240UL , Ripemd160Hmac = 0x00000241UL , Ripemd160HmacGeneral = 0x00000242UL , Sha256 = 0x00000250UL , Sha256Hmac = 0x00000251UL , Sha256HmacGeneral = 0x00000252UL , Sha224 = 0x00000255UL , Sha224Hmac = 0x00000256UL , Sha224HmacGeneral = 0x00000257UL , Sha384 = 0x00000260UL , Sha384Hmac = 0x00000261UL , Sha384HmacGeneral = 0x00000262UL , Sha512 = 0x00000270UL , Sha512Hmac = 0x00000271UL , Sha512HmacGeneral = 0x00000272UL , SecuridKeyGen = 0x00000280UL , Securid = 0x00000282UL , HotpKeyGen = 0x00000290UL , Hotp = 0x00000291UL , Acti = 0x000002A0UL , ActiKeyGen = 0x000002A1UL , CastKeyGen = 0x00000300UL , CastEcb = 0x00000301UL , CastCbc = 0x00000302UL , CastMac = 0x00000303UL , CastMacGeneral = 0x00000304UL , CastCbcPad = 0x00000305UL , Cast3KeyGen = 0x00000310UL , Cast3Ecb = 0x00000311UL , Cast3Cbc = 0x00000312UL , Cast3Mac = 0x00000313UL , Cast3MacGeneral = 0x00000314UL , Cast3CbcPad = 0x00000315UL , Cast5KeyGen = 0x00000320UL , Cast128KeyGen = 0x00000320UL , Cast5Ecb = 0x00000321UL , Cast128Ecb = 0x00000321UL , Cast5Cbc = 0x00000322UL , Cast128Cbc = 0x00000322UL , Cast5Mac = 0x00000323UL , Cast128Mac = 0x00000323UL , Cast5MacGeneral = 0x00000324UL , Cast128MacGeneral = 0x00000324UL , Cast5CbcPad = 0x00000325UL , Cast128CbcPad = 0x00000325UL , Rc5KeyGen = 0x00000330UL , Rc5Ecb = 0x00000331UL , Rc5Cbc = 0x00000332UL , Rc5Mac = 0x00000333UL , Rc5MacGeneral = 0x00000334UL , Rc5CbcPad = 0x00000335UL , IdeaKeyGen = 0x00000340UL , IdeaEcb = 0x00000341UL , IdeaCbc = 0x00000342UL , IdeaMac = 0x00000343UL , IdeaMacGeneral = 0x00000344UL , IdeaCbcPad = 0x00000345UL , GenericSecretKeyGen = 0x00000350UL , ConcatenateBaseAndKey = 0x00000360UL , ConcatenateBaseAndData = 0x00000362UL , ConcatenateDataAndBase = 0x00000363UL , XorBaseAndData = 0x00000364UL , ExtractKeyFromKey = 0x00000365UL , Ssl3PreMasterKeyGen = 0x00000370UL , Ssl3MasterKeyDerive = 0x00000371UL , Ssl3KeyAndMacDerive = 0x00000372UL , Ssl3MasterKeyDeriveDh = 0x00000373UL , TlsPreMasterKeyGen = 0x00000374UL , TlsMasterKeyDerive = 0x00000375UL , TlsKeyAndMacDerive = 0x00000376UL , TlsMasterKeyDeriveDh = 0x00000377UL , TlsPrf = 0x00000378UL , Ssl3Md5Mac = 0x00000380UL , Ssl3Sha1Mac = 0x00000381UL , Md5KeyDerivation = 0x00000390UL , Md2KeyDerivation = 0x00000391UL , Sha1KeyDerivation = 0x00000392UL , Sha256KeyDerivation = 0x00000393UL , Sha384KeyDerivation = 0x00000394UL , Sha512KeyDerivation = 0x00000395UL , Sha224KeyDerivation = 0x00000396UL , PbeMd2DesCbc = 0x000003A0UL , PbeMd5DesCbc = 0x000003A1UL , PbeMd5CastCbc = 0x000003A2UL , PbeMd5Cast3Cbc = 0x000003A3UL , PbeMd5Cast5Cbc = 0x000003A4UL , PbeMd5Cast128Cbc = 0x000003A4UL , PbeSha1Cast5Cbc = 0x000003A5UL , PbeSha1Cast128Cbc = 0x000003A5UL , PbeSha1Rc4128 = 0x000003A6UL , PbeSha1Rc440 = 0x000003A7UL , PbeSha1Des3EdeCbc = 0x000003A8UL , PbeSha1Des2EdeCbc = 0x000003A9UL , PbeSha1Rc2128Cbc = 0x000003AAUL , PbeSha1Rc240Cbc = 0x000003ABUL , Pkcs5Pbkd2 = 0x000003B0UL , PbaSha1WithSha1Hmac = 0x000003C0UL , WtlsPreMasterKeyGen = 0x000003D0UL , WtlsMasterKeyDerive = 0x000003D1UL , WtlsMasterKeyDeriveDhEcc = 0x000003D2UL , WtlsPrf = 0x000003D3UL , WtlsServerKeyAndMacDerive = 0x000003D4UL , WtlsClientKeyAndMacDerive = 0x000003D5UL , Tls10MacServer = 0x000003D6UL , Tls10MacClient = 0x000003D7UL , Tls12Mac = 0x000003D8UL , Tls12Kdf = 0x000003D9UL , Tls12MasterKeyDerive = 0x000003E0UL , Tls12KeyAndMacDerive = 0x000003E1UL , Tls12MasterKeyDeriveDh = 0x000003E2UL , Tls12KeySafeDerive = 0x000003E3UL , TlsMac = 0x000003E4UL , TlsKdf = 0x000003E5UL , KeyWrapLynks = 0x00000400UL , KeyWrapSetOaep = 0x00000401UL , CmsSig = 0x00000500UL , KipDerive = 0x00000510UL , KipWrap = 0x00000511UL , KipMac = 0x00000512UL , CamelliaKeyGen = 0x00000550UL , CamelliaEcb = 0x00000551UL , CamelliaCbc = 0x00000552UL , CamelliaMac = 0x00000553UL , CamelliaMacGeneral = 0x00000554UL , CamelliaCbcPad = 0x00000555UL , CamelliaEcbEncryptData = 0x00000556UL , CamelliaCbcEncryptData = 0x00000557UL , CamelliaCtr = 0x00000558UL , AriaKeyGen = 0x00000560UL , AriaEcb = 0x00000561UL , AriaCbc = 0x00000562UL , AriaMac = 0x00000563UL , AriaMacGeneral = 0x00000564UL , AriaCbcPad = 0x00000565UL , AriaEcbEncryptData = 0x00000566UL , AriaCbcEncryptData = 0x00000567UL , SeedKeyGen = 0x00000650UL , SeedEcb = 0x00000651UL , SeedCbc = 0x00000652UL , SeedMac = 0x00000653UL , SeedMacGeneral = 0x00000654UL , SeedCbcPad = 0x00000655UL , SeedEcbEncryptData = 0x00000656UL , SeedCbcEncryptData = 0x00000657UL , SkipjackKeyGen = 0x00001000UL , SkipjackEcb64 = 0x00001001UL , SkipjackCbc64 = 0x00001002UL , SkipjackOfb64 = 0x00001003UL , SkipjackCfb64 = 0x00001004UL , SkipjackCfb32 = 0x00001005UL , SkipjackCfb16 = 0x00001006UL , SkipjackCfb8 = 0x00001007UL , SkipjackWrap = 0x00001008UL , SkipjackPrivateWrap = 0x00001009UL , SkipjackRelayx = 0x0000100aUL , KeaKeyPairGen = 0x00001010UL , KeaKeyDerive = 0x00001011UL , KeaDerive = 0x00001012UL , FortezzaTimestamp = 0x00001020UL , BatonKeyGen = 0x00001030UL , BatonEcb128 = 0x00001031UL , BatonEcb96 = 0x00001032UL , BatonCbc128 = 0x00001033UL , BatonCounter = 0x00001034UL , BatonShuffle = 0x00001035UL , BatonWrap = 0x00001036UL , EcdsaKeyPairGen = 0x00001040UL , EcKeyPairGen = 0x00001040UL , Ecdsa = 0x00001041UL , EcdsaSha1 = 0x00001042UL , EcdsaSha224 = 0x00001043UL , EcdsaSha256 = 0x00001044UL , EcdsaSha384 = 0x00001045UL , EcdsaSha512 = 0x00001046UL , Ecdh1Derive = 0x00001050UL , Ecdh1CofactorDerive = 0x00001051UL , EcmqvDerive = 0x00001052UL , EcdhAesKeyWrap = 0x00001053UL , RsaAesKeyWrap = 0x00001054UL , JuniperKeyGen = 0x00001060UL , JuniperEcb128 = 0x00001061UL , JuniperCbc128 = 0x00001062UL , JuniperCounter = 0x00001063UL , JuniperShuffle = 0x00001064UL , JuniperWrap = 0x00001065UL , Fasthash = 0x00001070UL , AesKeyGen = 0x00001080UL , AesEcb = 0x00001081UL , AesCbc = 0x00001082UL , AesMac = 0x00001083UL , AesMacGeneral = 0x00001084UL , AesCbcPad = 0x00001085UL , AesCtr = 0x00001086UL , AesGcm = 0x00001087UL , AesCcm = 0x00001088UL , AesCts = 0x00001089UL , AesCmac = 0x0000108AUL , AesCmacGeneral = 0x0000108BUL , AesXcbcMac = 0x0000108CUL , AesXcbcMac96 = 0x0000108DUL , AesGmac = 0x0000108EUL , BlowfishKeyGen = 0x00001090UL , BlowfishCbc = 0x00001091UL , TwofishKeyGen = 0x00001092UL , TwofishCbc = 0x00001093UL , BlowfishCbcPad = 0x00001094UL , TwofishCbcPad = 0x00001095UL , DesEcbEncryptData = 0x00001100UL , DesCbcEncryptData = 0x00001101UL , Des3EcbEncryptData = 0x00001102UL , Des3CbcEncryptData = 0x00001103UL , AesEcbEncryptData = 0x00001104UL , AesCbcEncryptData = 0x00001105UL , Gostr3410KeyPairGen = 0x00001200UL , Gostr3410 = 0x00001201UL , Gostr3410WithGostr3411 = 0x00001202UL , Gostr3410KeyWrap = 0x00001203UL , Gostr3410Derive = 0x00001204UL , Gostr3411 = 0x00001210UL , Gostr3411Hmac = 0x00001211UL , Gost28147KeyGen = 0x00001220UL , Gost28147Ecb = 0x00001221UL , Gost28147 = 0x00001222UL , Gost28147Mac = 0x00001223UL , Gost28147KeyWrap = 0x00001224UL , DsaParameterGen = 0x00002000UL , DhPkcsParameterGen = 0x00002001UL , X942DhParameterGen = 0x00002002UL , DsaProbablisticParameterGen = 0x00002003UL , DsaShaweTaylorParameterGen = 0x00002004UL , AesOfb = 0x00002104UL , AesCfb64 = 0x00002105UL , AesCfb8 = 0x00002106UL , AesCfb128 = 0x00002107UL , AesCfb1 = 0x00002108UL , AesKeyWrap = 0x00002109UL , AesKeyWrapPad = 0x0000210AUL , RsaPkcsTpm11 = 0x00004001UL , RsaPkcsOaepTpm11 = 0x00004002UL , VendorDefined = 0x80000000UL } |
enum class | MGF : CK_RSA_PKCS_MGF_TYPE { MgfUnused = 0 , Mgf1Sha1 = 0x00000001UL , Mgf1Sha256 = 0x00000002UL , Mgf1Sha384 = 0x00000003UL , Mgf1Sha512 = 0x00000004UL , Mgf1Sha224 = 0x00000005UL } |
enum class | Notification : CK_NOTIFICATION { Surrender = 0UL , OtpChanged = 1UL } |
enum class | ObjectClass : CK_OBJECT_CLASS { Data = 0x00000000UL , Certificate = 0x00000001UL , PublicKey = 0x00000002UL , PrivateKey = 0x00000003UL , SecretKey = 0x00000004UL , HwFeature = 0x00000005UL , DomainParameters = 0x00000006UL , Mechanism = 0x00000007UL , OtpKey = 0x00000008UL , VendorDefined = 0x80000000UL } |
enum class | PseudoRandom : CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE { Pkcs5Pbkd2HmacSha1 = 0x00000001UL , Pkcs5Pbkd2HmacGostr3411 = 0x00000002UL , Pkcs5Pbkd2HmacSha224 = 0x00000003UL , Pkcs5Pbkd2HmacSha256 = 0x00000004UL , Pkcs5Pbkd2HmacSha384 = 0x00000005UL , Pkcs5Pbkd2HmacSha512 = 0x00000006UL , Pkcs5Pbkd2HmacSha512224 = 0x00000007UL , Pkcs5Pbkd2HmacSha512256 = 0x00000008UL } |
enum class | PublicPointEncoding : uint32_t { Raw , Der } |
enum class | ReturnValue : CK_RV { OK = 0x00000000UL , Cancel = 0x00000001UL , HostMemory = 0x00000002UL , SlotIdInvalid = 0x00000003UL , GeneralError = 0x00000005UL , FunctionFailed = 0x00000006UL , ArgumentsBad = 0x00000007UL , NoEvent = 0x00000008UL , NeedToCreateThreads = 0x00000009UL , CantLock = 0x0000000AUL , AttributeReadOnly = 0x00000010UL , AttributeSensitive = 0x00000011UL , AttributeTypeInvalid = 0x00000012UL , AttributeValueInvalid = 0x00000013UL , ActionProhibited = 0x0000001BUL , DataInvalid = 0x00000020UL , DataLenRange = 0x00000021UL , DeviceError = 0x00000030UL , DeviceMemory = 0x00000031UL , DeviceRemoved = 0x00000032UL , EncryptedDataInvalid = 0x00000040UL , EncryptedDataLenRange = 0x00000041UL , FunctionCanceled = 0x00000050UL , FunctionNotParallel = 0x00000051UL , FunctionNotSupported = 0x00000054UL , KeyHandleInvalid = 0x00000060UL , KeySizeRange = 0x00000062UL , KeyTypeInconsistent = 0x00000063UL , KeyNotNeeded = 0x00000064UL , KeyChanged = 0x00000065UL , KeyNeeded = 0x00000066UL , KeyIndigestible = 0x00000067UL , KeyFunctionNotPermitted = 0x00000068UL , KeyNotWrappable = 0x00000069UL , KeyUnextractable = 0x0000006AUL , MechanismInvalid = 0x00000070UL , MechanismParamInvalid = 0x00000071UL , ObjectHandleInvalid = 0x00000082UL , OperationActive = 0x00000090UL , OperationNotInitialized = 0x00000091UL , PinIncorrect = 0x000000A0UL , PinInvalid = 0x000000A1UL , PinLenRange = 0x000000A2UL , PinExpired = 0x000000A3UL , PinLocked = 0x000000A4UL , SessionClosed = 0x000000B0UL , SessionCount = 0x000000B1UL , SessionHandleInvalid = 0x000000B3UL , SessionParallelNotSupported = 0x000000B4UL , SessionReadOnly = 0x000000B5UL , SessionExists = 0x000000B6UL , SessionReadOnlyExists = 0x000000B7UL , SessionReadWriteSoExists = 0x000000B8UL , SignatureInvalid = 0x000000C0UL , SignatureLenRange = 0x000000C1UL , TemplateIncomplete = 0x000000D0UL , TemplateInconsistent = 0x000000D1UL , TokenNotPresent = 0x000000E0UL , TokenNotRecognized = 0x000000E1UL , TokenWriteProtected = 0x000000E2UL , UnwrappingKeyHandleInvalid = 0x000000F0UL , UnwrappingKeySizeRange = 0x000000F1UL , UnwrappingKeyTypeInconsistent = 0x000000F2UL , UserAlreadyLoggedIn = 0x00000100UL , UserNotLoggedIn = 0x00000101UL , UserPinNotInitialized = 0x00000102UL , UserTypeInvalid = 0x00000103UL , UserAnotherAlreadyLoggedIn = 0x00000104UL , UserTooManyTypes = 0x00000105UL , WrappedKeyInvalid = 0x00000110UL , WrappedKeyLenRange = 0x00000112UL , WrappingKeyHandleInvalid = 0x00000113UL , WrappingKeySizeRange = 0x00000114UL , WrappingKeyTypeInconsistent = 0x00000115UL , RandomSeedNotSupported = 0x00000120UL , RandomNoRng = 0x00000121UL , DomainParamsInvalid = 0x00000130UL , CurveNotSupported = 0x00000140UL , BufferTooSmall = 0x00000150UL , SavedStateInvalid = 0x00000160UL , InformationSensitive = 0x00000170UL , StateUnsaveable = 0x00000180UL , CryptokiNotInitialized = 0x00000190UL , CryptokiAlreadyInitialized = 0x00000191UL , MutexBad = 0x000001A0UL , MutexNotLocked = 0x000001A1UL , NewPinMode = 0x000001B0UL , NextOtp = 0x000001B1UL , ExceededMaxIterations = 0x000001B5UL , FipsSelfTestFailed = 0x000001B6UL , LibraryLoadFailed = 0x000001B7UL , PinTooWeak = 0x000001B8UL , PublicKeyInvalid = 0x000001B9UL , FunctionRejected = 0x00000200UL , VendorDefined = 0x80000000UL } |
enum class | SessionState : CK_STATE { RoPublicSession = 0UL , RoUserFunctions = 1UL , RwPublicSession = 2UL , RwUserFunctions = 3UL , RwSoFunctions = 4UL } |
enum class | UserType : CK_USER_TYPE { SO = 0UL , User = 1UL , ContextSpecific = 2UL } |
Functions | |
void | change_pin (Slot &slot, const secure_string &old_pin, const secure_string &new_pin) |
void | change_so_pin (Slot &slot, const secure_string &old_so_pin, const secure_string &new_so_pin) |
Flags | flags (Flag flags) |
void | initialize_token (Slot &slot, std::string_view label, const secure_string &so_pin, const secure_string &pin) |
Flag | operator| (Flag a, Flag b) |
void | set_pin (Slot &slot, const secure_string &so_pin, const secure_string &pin) |
Variables | |
const Bbool | False = 0 |
ReturnValue * | ThrowException = reinterpret_cast<ReturnValue*>(-1) |
const Bbool | True = 1 |
using Botan::PKCS11::Attribute = CK_ATTRIBUTE |
using Botan::PKCS11::Bbool = CK_BBOOL |
using Botan::PKCS11::Byte = CK_BYTE |
using Botan::PKCS11::CreateMutex = CK_CREATEMUTEX |
using Botan::PKCS11::Date = CK_DATE |
using Botan::PKCS11::DestroyMutex = CK_DESTROYMUTEX |
using Botan::PKCS11::Flags = CK_FLAGS |
using Botan::PKCS11::Info = CK_INFO |
using Botan::PKCS11::LockMutex = CK_LOCKMUTEX |
using Botan::PKCS11::Mechanism = CK_MECHANISM |
using Botan::PKCS11::Notify = CK_NOTIFY |
using Botan::PKCS11::secure_string = secure_vector<uint8_t> |
using Botan::PKCS11::SlotId = CK_SLOT_ID |
using Botan::PKCS11::SlotInfo = CK_SLOT_INFO |
using Botan::PKCS11::Ulong = CK_ULONG |
using Botan::PKCS11::UnlockMutex = CK_UNLOCKMUTEX |
using Botan::PKCS11::Utf8Char = CK_UTF8CHAR |
using Botan::PKCS11::VoidPtr = CK_VOID_PTR |
|
strong |
Definition at line 61 of file p11.h.
|
strong |
Indicates if a stored certificate is a user certificate for which the corresponding private key is available on the token ("token user"), a CA certificate ("authority"), or another end-entity certificate ("other entity").
Enumerator | |
---|---|
Unspecified | |
TokenUser | |
Authority | |
OtherEntity |
Definition at line 181 of file p11.h.
|
strong |
Enumerator | |
---|---|
X509 | |
X509AttrCert | |
Wtls | |
VendorDefined |
|
strong |
Definition at line 200 of file p11.h.
|
strong |
Enumerator | |
---|---|
MonotonicCounter | |
Clock | |
UserInterface | |
VendorDefined |
|
strong |
|
strong |
Definition at line 279 of file p11.h.
|
strong |
Definition at line 326 of file p11.h.
|
strong |
Enumerator | |
---|---|
MgfUnused | |
Mgf1Sha1 | |
Mgf1Sha256 | |
Mgf1Sha384 | |
Mgf1Sha512 | |
Mgf1Sha224 |
Definition at line 263 of file p11.h.
|
strong |
Enumerator | |
---|---|
Surrender | |
OtpChanged |
|
strong |
Enumerator | |
---|---|
Data | |
Certificate | |
PublicKey | |
PrivateKey | |
SecretKey | |
HwFeature | |
DomainParameters | |
Mechanism | |
OtpKey | |
VendorDefined |
Definition at line 667 of file p11.h.
|
strong |
Enumerator | |
---|---|
Pkcs5Pbkd2HmacSha1 | |
Pkcs5Pbkd2HmacGostr3411 | |
Pkcs5Pbkd2HmacSha224 | |
Pkcs5Pbkd2HmacSha256 | |
Pkcs5Pbkd2HmacSha384 | |
Pkcs5Pbkd2HmacSha512 | |
Pkcs5Pbkd2HmacSha512224 | |
Pkcs5Pbkd2HmacSha512256 |
Definition at line 680 of file p11.h.
|
strong |
|
strong |
Definition at line 699 of file p11.h.
|
strong |
|
strong |
Enumerator | |
---|---|
SO | |
User | |
ContextSpecific |
void Botan::PKCS11::change_pin | ( | Slot & | slot, |
const secure_string & | old_pin, | ||
const secure_string & | new_pin ) |
Change PIN with old PIN to new PIN
slot | The slot with the attached token |
old_pin | The old user PIN |
new_pin | The new user PIN |
Definition at line 46 of file p11.cpp.
References Botan::PKCS11::Session::login(), Botan::PKCS11::Session::set_pin(), and User.
void Botan::PKCS11::change_so_pin | ( | Slot & | slot, |
const secure_string & | old_so_pin, | ||
const secure_string & | new_so_pin ) |
Change SO_PIN with old SO_PIN to new SO_PIN
slot | The slot with the attached token |
old_so_pin | The old SO_PIN |
new_so_pin | The new SO_PIN |
Definition at line 52 of file p11.cpp.
References Botan::PKCS11::Session::login(), Botan::PKCS11::Session::set_pin(), and SO.
Definition at line 838 of file p11.h.
References flags().
Referenced by Botan::PKCS11::LowLevel::C_OpenSession(), Botan::PKCS11::LowLevel::C_WaitForSlotEvent(), flags(), and Botan::PKCS11::Session::Session().
void Botan::PKCS11::initialize_token | ( | Slot & | slot, |
std::string_view | label, | ||
const secure_string & | so_pin, | ||
const secure_string & | pin ) |
Initializes a token
slot | The slot with the attached token that should be initialized |
label | The token label |
so_pin | PIN of the security officer. Will be set if the token is uninitialized other this has to be the current SO_PIN |
pin | The user PIN that will be set |
Definition at line 41 of file p11.cpp.
References Botan::PKCS11::Slot::initialize(), and set_pin().
void Botan::PKCS11::set_pin | ( | Slot & | slot, |
const secure_string & | so_pin, | ||
const secure_string & | pin ) |
Sets user PIN with SO_PIN
slot | The slot with the attached token |
so_pin | PIN of the security officer |
pin | The user PIN that should be set |
Definition at line 58 of file p11.cpp.
References Botan::PKCS11::Session::init_pin(), Botan::PKCS11::Session::login(), and SO.
Referenced by initialize_token().
const Bbool Botan::PKCS11::False = 0 |
Definition at line 836 of file p11.h.
Referenced by Botan::PKCS11::AttributeContainer::add_bool().
ReturnValue * Botan::PKCS11::ThrowException = reinterpret_cast<ReturnValue*>(-1) |
Definition at line 21 of file p11.cpp.
Referenced by Botan::PKCS11::LowLevel::handle_return_value().
const Bbool Botan::PKCS11::True = 1 |
Definition at line 835 of file p11.h.
Referenced by Botan::PKCS11::AttributeContainer::add_bool().