00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TAO_SSLIOP_CREDENTIALS_ACQUIRER_H
00015 #define TAO_SSLIOP_CREDENTIALS_ACQUIRER_H
00016
00017 #include "ace/pre.h"
00018 #include "orbsvcs/SSLIOP/SSLIOP_Export.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #include "orbsvcs/Security/SL3_CredentialsCurator.h"
00025
00026 #include "orbsvcs/SSLIOPC.h"
00027 #include "orbsvcs/SecurityLevel3C.h"
00028
00029 #include "tao/LocalObject.h"
00030
00031 #include <openssl/opensslconf.h>
00032
00033
00034 #if defined(_MSC_VER)
00035 #pragma warning(push)
00036 #pragma warning(disable:4250)
00037 #endif
00038
00039
00040
00041 extern "C"
00042 {
00043 typedef struct x509_st X509;
00044 typedef struct evp_pkey_st EVP_PKEY;
00045 }
00046
00047 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00048
00049 namespace TAO
00050 {
00051 namespace SSLIOP
00052 {
00053
00054
00055
00056
00057
00058
00059
00060
00061 class TAO_SSLIOP_Export CredentialsAcquirer
00062 : public virtual SecurityLevel3::CredentialsAcquirer,
00063 public virtual TAO_Local_RefCounted_Object
00064 {
00065 public:
00066
00067
00068 CredentialsAcquirer (TAO::SL3::CredentialsCurator_ptr curator,
00069 const CORBA::Any & acquisition_arguments);
00070
00071
00072
00073
00074
00075
00076
00077
00078 virtual char * acquisition_method (void);
00079
00080 virtual SecurityLevel3::AcquisitionStatus current_status ();
00081
00082 virtual CORBA::ULong nth_iteration (void);
00083
00084 virtual CORBA::Any * get_continuation_data (void);
00085
00086 virtual SecurityLevel3::AcquisitionStatus continue_acquisition (
00087 const CORBA::Any & acquisition_arguments);
00088
00089 virtual SecurityLevel3::OwnCredentials_ptr get_credentials (
00090 CORBA::Boolean on_list);
00091
00092 virtual void destroy (void);
00093
00094
00095 protected:
00096
00097
00098
00099
00100
00101
00102 ~CredentialsAcquirer (void);
00103
00104 private:
00105
00106
00107
00108 void check_validity (void);
00109
00110
00111 static ::X509 * make_X509 (const ::SSLIOP::File &certificate);
00112
00113
00114 static ::EVP_PKEY * make_EVP_PKEY (const ::SSLIOP::File &key);
00115
00116 private:
00117
00118
00119 TAO_SYNCH_MUTEX lock_;
00120
00121
00122 TAO::SL3::CredentialsCurator_var curator_;
00123
00124
00125 const CORBA::Any & acquisition_arguments_;
00126
00127
00128
00129 bool destroyed_;
00130
00131 };
00132
00133 }
00134 }
00135
00136 TAO_END_VERSIONED_NAMESPACE_DECL
00137
00138 #if defined(_MSC_VER)
00139 #pragma warning(pop)
00140 #endif
00141
00142 #include "ace/post.h"
00143
00144 #endif