~ubuntu-branches/ubuntu/trusty/nordugrid-arc/trusty

« back to all changes in this revision

Viewing changes to src/hed/libs/globusutils/GSSCredential.h

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2013-11-29 13:39:10 UTC
  • mfrom: (3.1.16 sid)
  • Revision ID: package-import@ubuntu.com-20131129133910-sy6ayoavphc5hozs
Tags: 4.0.0-1
4.0.0 Release (Closes: #715131) (LP: #1049798)

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
namespace Arc {
9
9
 
10
10
  class Logger;
 
11
  class UserConfig;
11
12
 
12
13
  /// Class for converting credentials stored in file 
13
 
  /// in PEM format into Globus structire.
 
14
  /// in PEM format into Globus structure.
14
15
  /// It works only for full credentials containing 
15
16
  /// private key. This limitation is due to limited
16
17
  /// API of Globus.
17
18
  class GSSCredential {
18
19
  public:
 
20
    /// Load credentials from file(s)
19
21
    GSSCredential(const std::string& proxyPath,
20
 
                  const std::string& certificatePath,
21
 
                  const std::string& keyPath);
 
22
                  const std::string& certificatePath,
 
23
                  const std::string& keyPath);
 
24
    /// Load credentials from UserConfig information. First tries string then files.
 
25
    GSSCredential(const UserConfig& usercfg);
22
26
    GSSCredential(): credential(GSS_C_NO_CREDENTIAL) {};
23
27
    ~GSSCredential();
24
28
    operator gss_cred_id_t&();
25
29
    operator gss_cred_id_t*();
26
30
    static std::string ErrorStr(OM_uint32 majstat, OM_uint32 minstat);
27
31
  private:
 
32
    std::string readCredFromFiles(const std::string& proxyPath,
 
33
                                  const std::string& certificatePath,
 
34
                                  const std::string& keyPath);
 
35
    void initCred(const std::string& credbuf);
28
36
    gss_cred_id_t credential;
29
37
    //static Logger logger;
30
38
  };