ARC SDK
ARCProxyUtil.h
1 #ifndef __ARC_PROXYUTIL_H__
2 #define __ARC_PROXYUTIL_H__
3 
4 
5 namespace Arc {
6 
7 
8 class ARCProxyUtil {
9  enum { SHA1, SHA224, SHA256, SHA384, SHA512 } SHA_OPTION;
10 
11  public:
12  ARCProxyUtil();
13 
14  virtual ~ARCProxyUtil();
15 
16  bool Contact_VOMS_Server(bool use_nssdb, const std::list<std::string>& vomslist,
17  const std::list<std::string>& orderlist, bool use_gsi_comm, bool use_http_comm,
18  const std::string& voms_period, std::string vomsacseq);
19 
20  bool Contact_MyProxy_Server();
21 
22  bool Create_Proxy(bool use_nssdb, const std::string& proxy_policy,
23  Arc::Time& proxy_start, Arc::Period& proxy_period,
24  const std::string& vomsacseq);
25 
26  void Set_ProxyPath(const std::string& proxypath) { proxy_path = proxypath; };
27  std::string Get_ProxyPath() { return proxy_path; };
28 
29  void Set_CertPath(const std::string& certpath) { cert_path = certpath; };
30  std::string Get_CertPath() { return cert_path; };
31 
32  void Set_KeyPath(const std::string& keypath) { key_path = keypath; };
33  std::string Get_KeyPath() { return key_path; };
34 
35  void Set_CACertDir(const std::string& cadir) { ca_dir = cadir; };
36  std::string Get_CACertDir() { return ca_dir; };
37 
38  void Set_Keybits(int bits) { keybits = bits; };
39  int Get_Keybits() { return keybits; };
40 
41  void Set_Digest(SHA_OPTION sha_opt) { sha = sha_opt; };
42  SHA_OPTION Get_Digest() { return sha; };
43 
44  void Set_VOMSDir(const std::string& vomsdir) { voms_dir = vomsdir; };
45  std::string Get_VOMSDir() { return voms_dir; };
46 
47  void Set_VOMSESPath(const std::string& vomsespath) { vomses_path = vomsespath; };
48  std::string Get_VOMSESPath() { return vomses_path; };
49 
50  void Set_NSSDBPath(const std::string& nssdbpath) { nssdb_path = nssdbpath; };
51  std::string Get_NSSDBPath() { return nssdb_path; };
52 
53  private:
54  std::string proxy_path;
55  std::string cert_path;
56  std::string key_path;
57  std::string ca_dir;
58  std::string voms_dir;
59  std::string vomses_path;
60  std::string nssdb_path;
61 
62  int keybits;
63  SHA_OPTION sha;
64 
65  std::string debug_level;
66 
67 
68 
69 };
70 
71 }
72 
73 #endif /* __ARC_PROXYUTIL_H__ */