GCC Code Coverage Report


Directory: cvmfs/
File: cvmfs/swissknife_letter.h
Date: 2024-04-21 02:33:16
Exec Total Coverage
Lines: 0 19 0.0%
Branches: 0 0 -%

Line Branch Exec Source
1 /**
2 * This file is part of the CernVM File System.
3 */
4
5 #ifndef CVMFS_SWISSKNIFE_LETTER_H_
6 #define CVMFS_SWISSKNIFE_LETTER_H_
7
8 #include <string>
9
10 #include "swissknife.h"
11
12 namespace swissknife {
13
14 class CommandLetter : public Command {
15 public:
16 ~CommandLetter() { }
17 virtual std::string GetName() const { return "letter"; }
18 virtual std::string GetDescription() const {
19 return "Signs arbitrary text with the repository certificate.";
20 }
21 virtual ParameterList GetParams() const {
22 ParameterList r;
23 r.push_back(Parameter::Switch('s', "sign text"));
24 r.push_back(Parameter::Optional('a', "hash algorithm"));
25 r.push_back(Parameter::Optional('c', "x509 certificate"));
26 r.push_back(Parameter::Optional('k', "private key of the certificate "
27 "or public master key"));
28 r.push_back(Parameter::Optional('p', "password for the private key"));
29 r.push_back(Parameter::Switch('v', "verify text"));
30 r.push_back(Parameter::Optional('m', "max age (seconds)"));
31 r.push_back(Parameter::Optional('r', "repository url"));
32 r.push_back(Parameter::Switch('e', "Erlang mode (stay active)"));
33 r.push_back(Parameter::Optional('t', "text to sign or verify"));
34 r.push_back(Parameter::Optional('@', "proxy url"));
35 r.push_back(Parameter::Mandatory('f', "fully qualified repository name"));
36 return r;
37 }
38 int Main(const ArgumentList &args);
39
40 private:
41 static const unsigned kDefaultMaxAge = 300; // 5 minutes
42 };
43
44 } // namespace swissknife
45
46 #endif // CVMFS_SWISSKNIFE_LETTER_H_
47