Rev

Rev 3349 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | Bug Tracker

Rev 3349 Rev 3350
Line 17... Line 17...
17
#include <vector>
17
#include <vector>
18
18
19
#include <experimental/filesystem>
19
#include <experimental/filesystem>
20
20
21
#include "security_db_record.hh"
21
#include "security_db_record.hh"
-
 
22
#include "security_cache.hh"
22
#include "security_ecc.hh"
23
#include "security_ecc.hh"
23
24
24
namespace IEEE1609dot2BaseTypes {
25
namespace IEEE1609dot2BaseTypes {
25
  class EccP256CurvePoint; //! Declare TITAN class
26
  class EccP256CurvePoint; //! Declare TITAN class
26
  class EccP384CurvePoint; //! Declare TITAN class
27
  class EccP384CurvePoint; //! Declare TITAN class
Line 64... Line 65...
64
    return *instance;
65
    return *instance;
65
  };
66
  };
66
67
67
  int build_path(const std::string& p_root_directory);
68
  int build_path(const std::string& p_root_directory);
68
69
69
  int load_certificates(std::map<std::string, std::unique_ptr<security_db_record> >& p_certificates, /*std::map<OCTETSTRING, std::string>*/std::map<std::vector<unsigned char>, std::string>& p_hashed_id8s);
70
  int load_certificates(std::map<std::string, std::unique_ptr<security_db_record> >& p_certificates, std::map<OCTETSTRING/*std::vector<unsigned char>*/, std::string, security_cache_comp>& p_hashed_id8s);
70
  //int load_certificate(std::unique_ptr<security_db_record> >& p_certificate, std::map<const OCTETSTRING, const std::string&>& p_hashed_id8s);
71
  //int load_certificate(std::unique_ptr<security_db_record> >& p_certificate, std::map<const OCTETSTRING, const std::string&>& p_hashed_id8s);
71
  int save_certificate(const security_db_record& p_certificate);
72
  int save_certificate(const security_db_record& p_certificate);
72
73
73
private:
74
private:
74
  int retrieve_certificates_list(std::set<std::experimental::filesystem::path>& p_files);
75
  int retrieve_certificates_list(std::set<std::experimental::filesystem::path>& p_files);
75
76
76
  int build_certificates_cache(std::set<std::experimental::filesystem::path>& p_files, std::map<std::string, std::unique_ptr<security_db_record> >& p_certificates, /*std::map<OCTETSTRING, std::string>*/std::map<std::vector<unsigned char>, std::string>& p_hashed_id8s);
77
  int build_certificates_cache(std::set<std::experimental::filesystem::path>& p_files, std::map<std::string, std::unique_ptr<security_db_record> >& p_certificates, std::map<OCTETSTRING/*std::vector<unsigned char>*/, std::string, security_cache_comp>& p_hashed_id8s);
77
  
78
  
78
  void fill_public_key_vectors(const ec_elliptic_curves p_elliptic_curve, const IEEE1609dot2BaseTypes::EccP256CurvePoint& p_ecc_point, OCTETSTRING& p_public_comp_key, OCTETSTRING& p_public_key_x, OCTETSTRING& p_public_key_y);
79
  void fill_public_key_vectors(const ec_elliptic_curves p_elliptic_curve, const IEEE1609dot2BaseTypes::EccP256CurvePoint& p_ecc_point, OCTETSTRING& p_public_comp_key, OCTETSTRING& p_public_key_x, OCTETSTRING& p_public_key_y);
79
  void fill_public_key_vectors(const ec_elliptic_curves p_elliptic_curve, const IEEE1609dot2BaseTypes::EccP384CurvePoint& p_ecc_point, OCTETSTRING& p_public_comp_key, OCTETSTRING& p_public_key_x, OCTETSTRING& p_public_key_y);
80
  void fill_public_key_vectors(const ec_elliptic_curves p_elliptic_curve, const IEEE1609dot2BaseTypes::EccP384CurvePoint& p_ecc_point, OCTETSTRING& p_public_comp_key, OCTETSTRING& p_public_key_x, OCTETSTRING& p_public_key_y);
80
}; // End of class certificates_loader
81
}; // End of class certificates_loader