diff options
Diffstat (limited to 'SoftHSMv2/src/bin/util/softhsm2-util-ossl.h')
-rw-r--r-- | SoftHSMv2/src/bin/util/softhsm2-util-ossl.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/SoftHSMv2/src/bin/util/softhsm2-util-ossl.h b/SoftHSMv2/src/bin/util/softhsm2-util-ossl.h index 7a2a31a..8fac612 100644 --- a/SoftHSMv2/src/bin/util/softhsm2-util-ossl.h +++ b/SoftHSMv2/src/bin/util/softhsm2-util-ossl.h @@ -38,6 +38,9 @@ #ifdef WITH_ECC #include <openssl/ec.h> #endif +#ifdef WITH_EDDSA +#include <openssl/evp.h> +#endif typedef struct rsa_key_material_t { CK_ULONG sizeE; @@ -120,6 +123,25 @@ typedef struct ecdsa_key_material_t { } ecdsa_key_material_t; #endif +#ifdef WITH_EDDSA +typedef struct eddsa_key_material_t { + CK_ULONG sizeOID; + CK_ULONG sizeK; + CK_ULONG sizeA; + CK_VOID_PTR derOID; + CK_VOID_PTR bigK; + CK_VOID_PTR bigA; + eddsa_key_material_t() { + sizeOID = 0; + sizeK = 0; + sizeA = 0; + derOID = NULL_PTR; + bigK = NULL_PTR; + bigA = NULL_PTR; + } +} eddsa_key_material_t; +#endif + EVP_PKEY* crypto_read_file(char* filePath, char* filePIN); // RSA @@ -139,4 +161,11 @@ ecdsa_key_material_t* crypto_malloc_ecdsa(EC_KEY* ecdsa); void crypto_free_ecdsa(ecdsa_key_material_t* keyMat); #endif +#ifdef WITH_EDDSA +// EDDSA +int crypto_save_eddsa(CK_SESSION_HANDLE hSession, char* label, char* objID, size_t objIDLen, int noPublicKey, EVP_PKEY* eddsa); +eddsa_key_material_t* crypto_malloc_eddsa(EVP_PKEY* eddsa); +void crypto_free_eddsa(eddsa_key_material_t* keyMat); +#endif + #endif // !_SOFTHSM_V2_SOFTHSM2_UTIL_OSSL_H |