summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_ReceivedCredentials.h
blob: 477af9696b4180b7531ea56ea77a9822f9669335 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// -*- C++ -*-

//=============================================================================
/**
 *  @file   SSLIOP_ReceivedCredentials.h
 *
 *  $Id$
 *
 *  @author Ossama Othman <ossama@uci.edu>
 */
//=============================================================================

#ifndef TAO_SSLIOP_RECEIVED_CREDENTIALS_H
#define TAO_SSLIOP_RECEIVED_CREDENTIALS_H

#include "ace/pre.h"

#include "SSLIOP_Export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "SSLIOP_Credentials.h"

class TAO_SSLIOP_ReceivedCredentials;
typedef TAO_SSLIOP_ReceivedCredentials* TAO_SSLIOP_ReceivedCredentials_ptr;

/**
 * @class TAO_SSLIOP_ReceivedCredentials
 *
 * @brief SSLIOP-specific implementation of the
 *        SecurityLevel2::ReceivedCredentials interface.
 *
 * An SSLIOP "received credential" encapsulates the peers X.509
 * certificate.
 */
class TAO_SSLIOP_ReceivedCredentials
  : public virtual TAO_SSLIOP_Credentials,
    public virtual SecurityLevel2::ReceivedCredentials
{
public:

  /// Constructor.
  TAO_SSLIOP_ReceivedCredentials (X509 *cert);

  /**
   * @name SecurityLevel2::Credentials Methods
   *
   * SecurityLevel2::Credentials methods implemented for
   * SecurityLevel2::ReceivedCredentials.
   */
  //@{
  virtual SecurityLevel2::Credentials_ptr copy (
      TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual Security::InvocationCredentialsType credentials_type (
      TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));
  //@}

  /**
   * @name SecurityLevel2::ReceivedCredentials Methods
   *
   * Methods required by the SecurityLevel2::ReceivedCredentials
   * interface.
   */
  //@{
  virtual SecurityLevel2::Credentials_ptr accepting_credentials (
      TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual Security::AssociationOptions association_options_used (
      TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual Security::DelegationState delegation_state (
      TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual Security::DelegationMode delegation_mode (
      TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));
  //@}

  //@{
#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)
  typedef TAO_SSLIOP_ReceivedCredentials_ptr _ptr_type;
  // typedef TAO_SSLIOP_ReceivedCredentials_var _var_type;
#endif /* ! __GNUC__ || g++ >= 2.8 */

  static int _tao_class_id;
  
  // The static operations.
  static TAO_SSLIOP_ReceivedCredentials_ptr _duplicate (TAO_SSLIOP_ReceivedCredentials_ptr obj);
  
  static TAO_SSLIOP_ReceivedCredentials_ptr _narrow (
      CORBA::Object_ptr obj
      TAO_ENV_ARG_DECL_WITH_DEFAULTS
    );
  
  static TAO_SSLIOP_ReceivedCredentials_ptr _unchecked_narrow (
      CORBA::Object_ptr obj
      TAO_ENV_ARG_DECL_WITH_DEFAULTS
    );
  
  static TAO_SSLIOP_ReceivedCredentials_ptr _nil (void)
    {
      return (TAO_SSLIOP_ReceivedCredentials_ptr)0;
    }
  
  virtual void *_tao_QueryInterface (ptr_arith_t type);
  //@}

};


#include "ace/post.h"

#endif  /* TAO_SSLIOP_RECEIVED_CREDENTIALS_H */