Vanetza
Loading...
Searching...
No Matches
persistence.hpp
1#pragma once
2#include <vanetza/security/private_key.hpp>
3#include <string>
4
5namespace vanetza
6{
7namespace security
8{
9
10/**
11 * Load a private key from a PEM file, deriving its type from the stored curve.
12 * \param key_path PEM file to load the key from
13 * \return loaded private key
14 */
15PrivateKey load_private_key_from_pem_file(const std::string& key_path);
16
17/**
18 * Load a private key from a DER file, deriving its type from the stored curve.
19 * \param key_path DER file to load the key from
20 * \return loaded private key
21 */
22PrivateKey load_private_key_from_der_file(const std::string& key_path);
23
24#ifdef VANETZA_WITH_OPENSSL
25PrivateKey load_private_key_from_pem_file_openssl(const std::string& key_path);
26PrivateKey load_private_key_from_der_file_openssl(const std::string& key_path);
27#endif
28
29#ifdef VANETZA_WITH_CRYPTOPP
30PrivateKey load_private_key_from_pem_file_cryptopp(const std::string& key_path);
31PrivateKey load_private_key_from_der_file_cryptopp(const std::string& key_path);
32#endif
33
34} // namespace security
35} // namespace vanetza