From 08233d44a6cfde878d7e10bca38ae935ed1c8fd5 Mon Sep 17 00:00:00 2001 From: Mauro Date: Wed, 30 Jun 2021 07:57:22 +0000 Subject: [HICN-713] Transport Library Major Refactoring 2 Co-authored-by: Luca Muscariello Co-authored-by: Michele Papalini Co-authored-by: Olivier Roques Co-authored-by: Giulio Grassi Signed-off-by: Mauro Sardara Change-Id: I5b2c667bad66feb45abdb5effe22ed0f6c85d1c2 --- .../includes/hicn/transport/auth/identity.h | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'libtransport/includes/hicn/transport/auth/identity.h') diff --git a/libtransport/includes/hicn/transport/auth/identity.h b/libtransport/includes/hicn/transport/auth/identity.h index 19157952e..be072f5d3 100644 --- a/libtransport/includes/hicn/transport/auth/identity.h +++ b/libtransport/includes/hicn/transport/auth/identity.h @@ -15,14 +15,17 @@ #pragma once +#include +#include #include +#include extern "C" { -#include -#include -#include -#include -}; +#include +#include +#include +#include +} namespace transport { namespace auth { @@ -54,12 +57,20 @@ class Identity { // Return the key store password. std::string getPassword() const; + std::shared_ptr getCertificate() const; + + std::shared_ptr getPrivateKey() const; + // Generate a new random identity. static Identity generateIdentity(const std::string &subject_name = ""); private: - PARCIdentity *identity_; + static void free_key(EVP_PKEY *T) { EVP_PKEY_free(T); } + + std::string pwd_; + std::string filename_; std::shared_ptr signer_; + std::shared_ptr cert_; }; } // namespace auth -- cgit 1.2.3-korg