]>
Commit | Line | Data |
---|---|---|
01fb72a0 | 1 | // -*- C++ -*- |
73fcca6f | 2 | // Copyright (C) 2017-2018 Red Hat Inc. |
01fb72a0 DS |
3 | // |
4 | // This file is part of systemtap, and is free software. You can | |
5 | // redistribute it and/or modify it under the terms of the GNU General | |
6 | // Public License (GPL); either version 2, or (at your option) any | |
7 | // later version. | |
8 | ||
9 | #ifndef CLIENT_NSS_H | |
10 | #define CLIENT_NSS_H | |
11 | ||
12 | #if HAVE_NSS | |
13 | ||
14 | #include "session.h" | |
15 | #include "csclient.h" | |
16 | #include "cscommon.h" | |
3e150b00 | 17 | #include "nss-server-info.h" |
01fb72a0 DS |
18 | #include <string> |
19 | #include <vector> | |
20 | ||
21 | // Utility functions | |
22 | void nss_client_query_server_status (systemtap_session &s); | |
23 | void nss_client_manage_server_trust (systemtap_session &s); | |
24 | ||
01fb72a0 DS |
25 | class nss_client_backend : public client_backend |
26 | { | |
27 | public: | |
586c8666 | 28 | nss_client_backend (systemtap_session &s); |
01fb72a0 DS |
29 | |
30 | int initialize (); | |
31 | int add_protocol_version (const std::string &version); | |
32 | int add_sysinfo (); | |
33 | int include_file_or_directory (const std::string &subdir, | |
9c6ac6cd DS |
34 | const std::string &path, |
35 | const bool add_arg = true); | |
01fb72a0 DS |
36 | int add_tmpdir_file (const std::string &) { return 0; }; |
37 | int add_cmd_arg (const std::string &arg); | |
38 | ||
39 | void add_localization_variable(const std::string &var, | |
40 | const std::string &value); | |
41 | int finalize_localization_variables(); | |
42 | ||
43 | void add_mok_fingerprint(const std::string &fingerprint); | |
44 | int finalize_mok_fingerprints(); | |
45 | ||
eb3896ef | 46 | void fill_in_server_info (compile_server_info &) { return; }; |
3580be16 | 47 | int trust_server_info (const compile_server_info &server); |
eb3896ef | 48 | |
01fb72a0 DS |
49 | int package_request (); |
50 | int find_and_connect_to_server (); | |
51 | int unpack_response (); | |
01fb72a0 DS |
52 | |
53 | private: | |
54 | unsigned argc; | |
55 | std::string client_zipfile; | |
01fb72a0 | 56 | std::string server_zipfile; |
01fb72a0 DS |
57 | std::string locale_vars; |
58 | std::ostringstream mok_fingerprints; | |
59 | ||
60 | std::vector<std::string> private_ssl_dbs; | |
61 | std::vector<std::string> public_ssl_dbs; | |
62 | ||
63 | int compile_using_server (std::vector<compile_server_info> &servers); | |
64 | void show_server_compatibility () const; | |
65 | }; | |
01fb72a0 DS |
66 | #endif // HAVE_NSS |
67 | ||
68 | #endif // CLIENT_NSS_H |