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