package pkcs11
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Bindings to the PKCS#11 cryptographic API
Install
dune-project
Dependency
Authors
Maintainers
Sources
pkcs11-0.9.0.tbz
sha256=0a1dc5fb54d3febbb0024b6fe9bb393f25e4ce6aadbc65fcc114345c5ca3982a
md5=c1a9bd7ed535e9fb31f2e6014567c9af
doc/src/pkcs11/p11_key_attributes.ml.html
Source file p11_key_attributes.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171type kind = [ `AES | `DES | `DES3 | `EC_private | `EC_public | `RSA_private | `RSA_public | `Secret ] (** Representation used internally, it prevents repetitions. *) module Internal_kind = struct type t = [ | `Secret | `RSA_public | `RSA_private | `EC_public | `EC_private | `Generic_secret | `Fixed_length_secret ] [@@deriving ord] let of_kind : kind -> t = function | `Secret -> `Secret | `RSA_public -> `RSA_public | `RSA_private -> `RSA_private | `EC_public -> `EC_public | `EC_private -> `EC_private | `AES -> `Generic_secret | `DES -> `Fixed_length_secret | `DES3 -> `Fixed_length_secret end open P11.Attribute_type module Kind_map = Map.Make(Internal_kind) let p x = Pack x let object_ = [ p CKA_CLASS; ] let storage = [ p CKA_TOKEN; p CKA_PRIVATE; p CKA_MODIFIABLE; p CKA_LABEL; ]@object_ let key = [ p CKA_KEY_TYPE; p CKA_ID; p CKA_START_DATE; p CKA_END_DATE; p CKA_DERIVE; p CKA_LOCAL; p CKA_KEY_GEN_MECHANISM; p CKA_ALLOWED_MECHANISMS; ]@storage let public = [ p CKA_SUBJECT; p CKA_ENCRYPT; p CKA_VERIFY; p CKA_VERIFY_RECOVER; p CKA_WRAP; p CKA_TRUSTED; p CKA_WRAP_TEMPLATE; ]@key let private_ = [ p CKA_SUBJECT; p CKA_SENSITIVE; p CKA_DECRYPT; p CKA_SIGN; p CKA_SIGN_RECOVER; p CKA_UNWRAP; p CKA_EXTRACTABLE; p CKA_ALWAYS_SENSITIVE; p CKA_NEVER_EXTRACTABLE; p CKA_WRAP_WITH_TRUSTED; p CKA_UNWRAP_TEMPLATE; p CKA_ALWAYS_AUTHENTICATE; ]@key let secret = [ p CKA_SENSITIVE; p CKA_ENCRYPT; p CKA_DECRYPT; p CKA_SIGN; p CKA_VERIFY; p CKA_WRAP; p CKA_UNWRAP; p CKA_EXTRACTABLE; p CKA_ALWAYS_SENSITIVE; p CKA_NEVER_EXTRACTABLE; p CKA_CHECK_VALUE; p CKA_WRAP_WITH_TRUSTED; p CKA_TRUSTED; p CKA_WRAP_TEMPLATE; p CKA_UNWRAP_TEMPLATE; ]@key let rsa_public = [ p CKA_MODULUS; p CKA_MODULUS_BITS; p CKA_PUBLIC_EXPONENT; ]@public let rsa_private = [ p CKA_MODULUS; p CKA_PUBLIC_EXPONENT; p CKA_PRIVATE_EXPONENT; p CKA_PRIME_1; p CKA_PRIME_2; p CKA_EXPONENT_1; p CKA_EXPONENT_2; p CKA_COEFFICIENT; ]@private_ let ec_public = [ p CKA_EC_PARAMS; p CKA_EC_POINT; ]@public let ec_private = [ p CKA_EC_PARAMS; p CKA_VALUE; ]@private_ let generic_secret = [ p CKA_VALUE; p CKA_VALUE_LEN; ]@secret let fixed_length_secret = [ p CKA_VALUE; ]@secret let kind_attributes : P11.Attribute_types.t Kind_map.t= let add k v m = Kind_map.add k v m in Kind_map.empty |> add `Secret secret |> add `RSA_public rsa_public |> add `RSA_private rsa_private |> add `EC_public ec_public |> add `EC_private ec_private |> add `Generic_secret generic_secret |> add `Fixed_length_secret fixed_length_secret let possible kind = try (Kind_map.find (Internal_kind.of_kind kind) kind_attributes) with Not_found -> []
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>