cryptosense / pkcs11

OCaml bindings for the PKCS#11 cryptographic API
BSD 2-Clause "Simplified" License
23 stars 6 forks source link

Implement attribute operations using the repr type #102

Closed emillon closed 6 years ago

emillon commented 6 years ago

There was a repr type in CK_ATTRIBUTE used for internal operations. It turns out that it's pretty useful in P11_attribute as well.

The idea is to do all operations in two steps:

This is a big simplification because pattern matching is only as wide as the repr type, not as P11_attribute_type.t.

emillon commented 6 years ago

Thanks for the :eye: !