• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 10.2.0.83
GDNegotiateScheme.h
Go to the documentation of this file.
1 /*
2  * (c) 2017 BlackBerry Limited. All rights reserved.
3  *
4  */
5 
6 #ifndef GD_GSS_API_NEGOTIATESCHEME_H_
7 #define GD_GSS_API_NEGOTIATESCHEME_H_
8 
9 #include <stdint.h>
10 
11 #if defined(_WIN32)
12 # define GD_ATTRIBUTE(ignore)
13 #else
14 # define GD_ATTRIBUTE __attribute__
15 #endif
16 
17 namespace GD
18 {
19 
20 namespace GSS_API
21 {
22 
49 enum class GssStatusCode
50 {
51  /* Major status codes. */
52 
56 
57  /*
58  * Calling errors.
59  */
60 
64 
68 
72 
73  /*
74  * Routine errors.
75  */
76 
80 
84 
88 
89 
93 
97 
101 
105 
109 
113 
117 
121 
125 
129 
133 
137 
141 
145 
149 
153 
154  /*
155  * Supplementary status:
156  */
157 
161 
165 
169 
173 
177 
181 };
182 
197 {
201 
205 };
206 
254 class GD_ATTRIBUTE((visibility("default"))) NegotiateScheme /* final */
255 {
256 
257 public:
261  NegotiateScheme();
262  ~NegotiateScheme();
263 
264 public:
265 
320  char* generateGssApiData(const char* token,
321  const char* hostname,
322  const bool allow_delegation);
323 
380  char* generateGssApiData(const char* token,
381  NegotiateMechanism mechanism,
382  const char* service_principal_name,
383  const bool allow_delegation);
384 
396  GssStatusCode getGssApiStatus() const;
397 
409  bool gssContextEstablishmentInitiated() const;
410 
415  static void resetKerberosNegotiateTimeout();
416 
423  static void setKerberosNegotiateTimeout(unsigned long timeout);
424 
431  static bool attemptToCancelKDCNegotiate(const char* host);
432 
433 
434 private:
435  void* _impl;
436 };
437 
438 
439 } // end of namespace GSS_API
440 
441 } // end of namespace GD
442 
443 #endif /* GDNEGOTIATESCHEME_H_ */
GD
Definition: GDKerberosAuthHandler.h:16
GD::GSS_API::GssStatusCode::STATUS_GSS_S_BAD_QOP
@ STATUS_GSS_S_BAD_QOP
GSS-API status code: GSS_S_BAD_QOP.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_CALL_INACCESSIBLE_READ
@ STATUS_GSS_S_CALL_INACCESSIBLE_READ
GSS-API status code: GSS_S_CALL_INACCESSIBLE_READ.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_BAD_NAME
@ STATUS_GSS_S_BAD_NAME
GSS-API status code: GSS_S_BAD_NAME.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_DUPLICATE_TOKEN
@ STATUS_GSS_S_DUPLICATE_TOKEN
GSS-API status code: GSS_S_DUPLICATE_TOKEN.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_BAD_SIG
@ STATUS_GSS_S_BAD_SIG
GSS-API status code: GSS_S_BAD_SIG.
GD::GSS_API::NegotiateMechanism::NEGOTIATE_MECHANISM_KRB5
@ NEGOTIATE_MECHANISM_KRB5
Raw Kerberos version 5 scheme.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_BAD_STATUS
@ STATUS_GSS_S_BAD_STATUS
GSS-API status code: GSS_S_BAD_STATUS.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_UNAUTHORIZED
@ STATUS_GSS_S_UNAUTHORIZED
GSS-API status code: GSS_S_UNAUTHORIZED.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_NO_CRED
@ STATUS_GSS_S_NO_CRED
GSS-API status code: GSS_S_NO_CRED.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_FAILURE
@ STATUS_GSS_S_FAILURE
GSS-API status code: GSS_S_FAILURE.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_CONTEXT_EXPIRED
@ STATUS_GSS_S_CONTEXT_EXPIRED
GSS-API status code: GSS_S_CONTEXT_EXPIRED.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_UNSEQ_TOKEN
@ STATUS_GSS_S_UNSEQ_TOKEN
GSS-API status code: GSS_S_UNSEQ_TOKEN.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_CALL_BAD_STRUCTURE
@ STATUS_GSS_S_CALL_BAD_STRUCTURE
GSS-API status code: GSS_S_CALL_BAD_STRUCTURE.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_CONTINUE_NEEDED
@ STATUS_GSS_S_CONTINUE_NEEDED
GSS-API status code: GSS_S_CONTINUE_NEEDED.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_BAD_BINDINGS
@ STATUS_GSS_S_BAD_BINDINGS
GSS-API status code: GSS_S_BAD_BINDINGS.
GD_ATTRIBUTE
#define GD_ATTRIBUTE
Definition: GDNegotiateScheme.h:14
GD::GSS_API::NegotiateScheme
GSS programming interface, including SPNEGO (C++).
Definition: GDNegotiateScheme.h:254
GD::GSS_API::NegotiateMechanism
NegotiateMechanism
Generic Security Service Application Program Interface negotiation mechanisms (deprecated).
Definition: GDNegotiateScheme.h:196
GD::GSS_API::GssStatusCode::STATUS_GSS_S_UNAVAILABLE
@ STATUS_GSS_S_UNAVAILABLE
GSS-API status code: GSS_S_UNAVAILABLE.
GD::GSS_API::GssStatusCode::STATUS_UNKNOWN
@ STATUS_UNKNOWN
Initial value.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_NO_CONTEXT
@ STATUS_GSS_S_NO_CONTEXT
GSS-API status code: GSS_S_NO_CONTEXT.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_GAP_TOKEN
@ STATUS_GSS_S_GAP_TOKEN
GSS-API status code: GSS_S_GAP_TOKEN.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_COMPLETE
@ STATUS_GSS_S_COMPLETE
GSS-API status code: GSS_S_COMPLETE.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_CREDENTIALS_EXPIRED
@ STATUS_GSS_S_CREDENTIALS_EXPIRED
GSS-API status code: GSS_S_CREDENTIALS_EXPIRED.
GD::GSS_API::GssStatusCode
GssStatusCode
Generic Security Service Application Program Interface status code.
Definition: GDNegotiateScheme.h:49
GD::GSS_API::GssStatusCode::STATUS_GSS_S_BAD_MECH
@ STATUS_GSS_S_BAD_MECH
GSS-API status code: GSS_S_BAD_MECH.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_BAD_MIC
@ STATUS_GSS_S_BAD_MIC
GSS-API status code: GSS_S_BAD_MIC.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_BAD_NAMETYPE
@ STATUS_GSS_S_BAD_NAMETYPE
GSS-API status code: GSS_S_BAD_NAMETYPE.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_DUPLICATE_ELEMENT
@ STATUS_GSS_S_DUPLICATE_ELEMENT
GSS-API status code: GSS_S_DUPLICATE_ELEMENT.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_OLD_TOKEN
@ STATUS_GSS_S_OLD_TOKEN
GSS-API status code: GSS_S_OLD_TOKEN.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_DEFECTIVE_CREDENTIAL
@ STATUS_GSS_S_DEFECTIVE_CREDENTIAL
GSS-API status code: GSS_S_DEFECTIVE_CREDENTIAL.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_DEFECTIVE_TOKEN
@ STATUS_GSS_S_DEFECTIVE_TOKEN
GSS-API status code: GSS_S_DEFECTIVE_TOKEN.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_CALL_INACCESSIBLE_WRITE
@ STATUS_GSS_S_CALL_INACCESSIBLE_WRITE
GSS-API status code: GSS_S_CALL_INACCESSIBLE_WRITE.
GD::GSS_API::GssStatusCode::STATUS_GSS_S_NAME_NOT_MN
@ STATUS_GSS_S_NAME_NOT_MN
GSS-API status code: GSS_S_NAME_NOT_MN.
GD::GSS_API::NegotiateMechanism::NEGOTIATE_MECHANISM_SPNEGO
@ NEGOTIATE_MECHANISM_SPNEGO
Simple and Protected GSS-API Negotiation.