gsasl  2.2.0
About: GNU SASL is an implementation of the Simple Authentication and Security Layer (SASL).
  Fossies Dox: gsasl-2.2.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Loading...
Searching...
No Matches
gsasl.h
Go to the documentation of this file.
1/* gsasl.h --- Header file for GNU SASL Library.
2 * Copyright (C) 2002-2022 Simon Josefsson
3 *
4 * This file is part of GNU SASL Library.
5 *
6 * GNU SASL Library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public License
8 * as published by the Free Software Foundation; either version 2.1 of
9 * the License, or (at your option) any later version.
10 *
11 * GNU SASL Library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License License along with GNU SASL Library; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 *
21 */
22
23#ifndef GSASL_H
24# define GSASL_H
25
26/**
27 * SECTION:gsasl
28 * @title: gsasl.h
29 * @short_description: main library interfaces
30 *
31 * The main library interfaces are declared in gsasl.h.
32 */
33
34# include <stdio.h> /* FILE */
35# include <stddef.h> /* size_t */
36# include <unistd.h> /* ssize_t */
37
38/* Get version symbols. */
39# include <gsasl-version.h>
40
41# ifndef _GSASL_API
42# if defined GSASL_BUILDING && defined HAVE_VISIBILITY && HAVE_VISIBILITY
43# define _GSASL_API __attribute__((__visibility__("default")))
44# elif defined GSASL_BUILDING && defined _MSC_VER && ! defined GSASL_STATIC
45# define _GSASL_API __declspec(dllexport)
46# elif defined _MSC_VER && ! defined GSASL_STATIC
47# define _GSASL_API __declspec(dllimport)
48# else
49# define _GSASL_API
50# endif
51# endif
52
53# ifdef __cplusplus
54extern "C"
55{
56# endif
57
58 /**
59 * Gsasl:
60 *
61 * Handle to global library context.
62 */
63 typedef struct Gsasl Gsasl;
64
65 /**
66 * Gsasl_session:
67 *
68 * Handle to SASL session context.
69 */
71
72 /**
73 * Gsasl_rc:
74 * @GSASL_OK: Successful return code, guaranteed to be always 0.
75 * @GSASL_NEEDS_MORE: Mechanism expects another round-trip.
76 * @GSASL_UNKNOWN_MECHANISM: Application requested an unknown mechanism.
77 * @GSASL_MECHANISM_CALLED_TOO_MANY_TIMES: Application requested too
78 * many round trips from mechanism.
79 * @GSASL_MALLOC_ERROR: Memory allocation failed.
80 * @GSASL_BASE64_ERROR: Base64 encoding/decoding failed.
81 * @GSASL_CRYPTO_ERROR: Cryptographic error.
82 * @GSASL_SASLPREP_ERROR: Failed to prepare internationalized string.
83 * @GSASL_MECHANISM_PARSE_ERROR: Mechanism could not parse input.
84 * @GSASL_AUTHENTICATION_ERROR: Authentication has failed.
85 * @GSASL_INTEGRITY_ERROR: Application data integrity check failed.
86 * @GSASL_NO_CLIENT_CODE: Library was built with client functionality.
87 * @GSASL_NO_SERVER_CODE: Library was built with server functionality.
88 * @GSASL_NO_CALLBACK: Application did not provide a callback.
89 * @GSASL_NO_ANONYMOUS_TOKEN: Could not get required anonymous token.
90 * @GSASL_NO_AUTHID: Could not get required authentication
91 * identity (username).
92 * @GSASL_NO_AUTHZID: Could not get required authorization identity.
93 * @GSASL_NO_PASSWORD: Could not get required password.
94 * @GSASL_NO_PASSCODE: Could not get required SecurID PIN.
95 * @GSASL_NO_PIN: Could not get required SecurID PIN.
96 * @GSASL_NO_SERVICE: Could not get required service name.
97 * @GSASL_NO_HOSTNAME: Could not get required hostname.
98 * @GSASL_NO_CB_TLS_UNIQUE: Could not get required tls-unique CB.
99 * @GSASL_NO_CB_TLS_EXPORTER: Could not get required tls-exporter CB.
100 * @GSASL_NO_SAML20_IDP_IDENTIFIER: Could not get required SAML IdP.
101 * @GSASL_NO_SAML20_REDIRECT_URL: Could not get required SAML
102 * redirect URL.
103 * @GSASL_NO_OPENID20_REDIRECT_URL: Could not get required OpenID
104 * redirect URL.
105 * @GSASL_GSSAPI_RELEASE_BUFFER_ERROR: GSS-API library call error.
106 * @GSASL_GSSAPI_IMPORT_NAME_ERROR: GSS-API library call error.
107 * @GSASL_GSSAPI_INIT_SEC_CONTEXT_ERROR: GSS-API library call error.
108 * @GSASL_GSSAPI_ACCEPT_SEC_CONTEXT_ERROR: GSS-API library call error.
109 * @GSASL_GSSAPI_UNWRAP_ERROR: GSS-API library call error.
110 * @GSASL_GSSAPI_WRAP_ERROR: GSS-API library call error.
111 * @GSASL_GSSAPI_ACQUIRE_CRED_ERROR: GSS-API library call error.
112 * @GSASL_GSSAPI_DISPLAY_NAME_ERROR: GSS-API library call error.
113 * @GSASL_GSSAPI_UNSUPPORTED_PROTECTION_ERROR: An unsupported
114 * quality-of-protection layer was requeted.
115 * @GSASL_GSSAPI_ENCAPSULATE_TOKEN_ERROR: GSS-API library call error.
116 * @GSASL_GSSAPI_DECAPSULATE_TOKEN_ERROR: GSS-API library call error.
117 * @GSASL_GSSAPI_INQUIRE_MECH_FOR_SASLNAME_ERROR: GSS-API library call error.
118 * @GSASL_GSSAPI_TEST_OID_SET_MEMBER_ERROR: GSS-API library call error.
119 * @GSASL_GSSAPI_RELEASE_OID_SET_ERROR: GSS-API library call error.
120 * @GSASL_SECURID_SERVER_NEED_ADDITIONAL_PASSCODE: SecurID mechanism
121 * needs an additional passcode.
122 * @GSASL_SECURID_SERVER_NEED_NEW_PIN: SecurID mechanism
123 * needs an new PIN.
124 *
125 * Error codes for library functions.
126 */
127 typedef enum
128 {
156 /* Mechanism specific errors. */
173 /* When adding new values, note that integers are not necessarily
174 assigned monotonously increasingly. */
176
177 /**
178 * Gsasl_property:
179 * @GSASL_AUTHID: Authentication identity (username).
180 * @GSASL_AUTHZID: Authorization identity.
181 * @GSASL_PASSWORD: Password.
182 * @GSASL_ANONYMOUS_TOKEN: Anonymous identifier.
183 * @GSASL_SERVICE: Service name
184 * @GSASL_HOSTNAME: Host name.
185 * @GSASL_GSSAPI_DISPLAY_NAME: GSS-API credential principal name.
186 * @GSASL_PASSCODE: SecurID passcode.
187 * @GSASL_SUGGESTED_PIN: SecurID suggested PIN.
188 * @GSASL_PIN: SecurID PIN.
189 * @GSASL_REALM: User realm.
190 * @GSASL_DIGEST_MD5_HASHED_PASSWORD: Pre-computed hashed DIGEST-MD5
191 * password, to avoid storing passwords in the clear.
192 * @GSASL_QOPS: Set of quality-of-protection values.
193 * @GSASL_QOP: Quality-of-protection value.
194 * @GSASL_SCRAM_ITER: Number of iterations in password-to-key hashing.
195 * @GSASL_SCRAM_SALT: Salt for password-to-key hashing.
196 * @GSASL_SCRAM_SALTED_PASSWORD: Hex-encoded hashed/salted password.
197 * @GSASL_SCRAM_SERVERKEY: Hex-encoded SCRAM ServerKey derived
198 * from users' passowrd.
199 * @GSASL_SCRAM_STOREDKEY: Hex-encoded SCRAM StoredKey derived
200 * from users' passowrd.
201 * @GSASL_CB_TLS_UNIQUE: Base64 encoded tls-unique channel binding.
202 * @GSASL_CB_TLS_EXPORTER: Base64 encoded tls-exporter channel binding.
203 * @GSASL_SAML20_IDP_IDENTIFIER: SAML20 user IdP URL.
204 * @GSASL_SAML20_REDIRECT_URL: SAML 2.0 URL to access in browser.
205 * @GSASL_OPENID20_REDIRECT_URL: OpenID 2.0 URL to access in browser.
206 * @GSASL_OPENID20_OUTCOME_DATA: OpenID 2.0 authentication outcome data.
207 * @GSASL_SAML20_AUTHENTICATE_IN_BROWSER: Request to perform SAML 2.0
208 * authentication in browser.
209 * @GSASL_OPENID20_AUTHENTICATE_IN_BROWSER: Request to perform OpenID 2.0
210 * authentication in browser.
211 * @GSASL_VALIDATE_SIMPLE: Request for simple validation.
212 * @GSASL_VALIDATE_EXTERNAL: Request for validation of EXTERNAL.
213 * @GSASL_VALIDATE_ANONYMOUS: Request for validation of ANONYMOUS.
214 * @GSASL_VALIDATE_GSSAPI: Request for validation of GSSAPI/GS2.
215 * @GSASL_VALIDATE_SECURID: Reqest for validation of SecurID.
216 * @GSASL_VALIDATE_SAML20: Reqest for validation of SAML20.
217 * @GSASL_VALIDATE_OPENID20: Reqest for validation of OpenID 2.0 login.
218 *
219 * Callback/property types.
220 */
221 typedef enum
222 {
223 /* Information properties, e.g., username. */
249 /* Client callbacks. */
252 /* Server validation callback properties. */
261
262 /**
263 * Gsasl_callback_function:
264 * @ctx: libgsasl handle.
265 * @sctx: session handle, may be NULL.
266 * @prop: enumerated value of Gsasl_property type.
267 *
268 * Prototype of function that the application should implement. Use
269 * gsasl_callback_set() to inform the library about your callback
270 * function.
271 *
272 * It is called by the SASL library when it need some information
273 * from the application. Depending on the value of @prop, it should
274 * either set some property (e.g., username or password) using
275 * gsasl_property_set(), or it should extract some properties (e.g.,
276 * authentication and authorization identities) using
277 * gsasl_property_fast() and use them to make a policy decision,
278 * perhaps returning GSASL_AUTHENTICATION_ERROR or GSASL_OK
279 * depending on whether the policy permitted the operation.
280 *
281 * Return value: Any valid return code, the interpretation of which
282 * depend on the @prop value.
283 *
284 * Since: 0.2.0
285 **/
287 Gsasl_property prop);
288
289 /**
290 * Gsasl_mechname_limits:
291 * @GSASL_MIN_MECHANISM_SIZE: Minimum size of mechanism name strings.
292 * @GSASL_MAX_MECHANISM_SIZE: Maximum size of mechanism name strings.
293 *
294 * SASL mechanisms are named by strings, from 1 to 20 characters in
295 * length, consisting of upper-case letters, digits, hyphens, and/or
296 * underscores. See also gsasl_mechanism_name_p().
297 */
298 typedef enum
299 {
303
304 /**
305 * Gsasl_qop:
306 * @GSASL_QOP_AUTH: Authentication only.
307 * @GSASL_QOP_AUTH_INT: Authentication and integrity.
308 * @GSASL_QOP_AUTH_CONF: Authentication, integrity and confidentiality.
309 *
310 * Quality of Protection types (DIGEST-MD5 and GSSAPI). The
311 * integrity and confidentiality values is about application data
312 * wrapping. We recommend that you use @GSASL_QOP_AUTH with TLS as
313 * that combination is generally more secure and have better chance
314 * of working than the integrity/confidentiality layers of SASL.
315 */
316 typedef enum
317 {
322
323 /**
324 * Gsasl_saslprep_flags:
325 * @GSASL_ALLOW_UNASSIGNED: Allow unassigned code points.
326 *
327 * Flags for the SASLprep function, see gsasl_saslprep(). For
328 * background, see the GNU Libidn documentation.
329 */
330 typedef enum
331 {
334
335 /* Library entry and exit points: version.c, init.c, done.c */
336 extern _GSASL_API int gsasl_init (Gsasl ** ctx);
337 extern _GSASL_API void gsasl_done (Gsasl * ctx);
338 extern _GSASL_API const char *gsasl_check_version (const char *req_version);
339
340 /* Callback handling: callback.c */
341 extern _GSASL_API void gsasl_callback_set (Gsasl * ctx,
343 extern _GSASL_API int gsasl_callback (Gsasl * ctx, Gsasl_session * sctx,
344 Gsasl_property prop);
345
346 extern _GSASL_API void gsasl_callback_hook_set (Gsasl * ctx, void *hook);
348
350 void *hook);
351 extern _GSASL_API void *gsasl_session_hook_get (Gsasl_session * sctx);
352
353 /* Property handling: property.c */
355 Gsasl_property prop,
356 const char *data);
358 Gsasl_property prop,
359 const char *data, size_t len);
360 extern _GSASL_API void gsasl_property_free (Gsasl_session * sctx,
361 Gsasl_property prop);
362 extern _GSASL_API const char *gsasl_property_get (Gsasl_session * sctx,
363 Gsasl_property prop);
364 extern _GSASL_API const char *gsasl_property_fast (Gsasl_session * sctx,
365 Gsasl_property prop);
366
367 /* Mechanism handling: listmech.c, supportp.c, suggest.c */
368 extern _GSASL_API int gsasl_client_mechlist (Gsasl * ctx, char **out);
370 const char *name);
372 const char
373 *mechlist);
374
375 extern _GSASL_API int gsasl_server_mechlist (Gsasl * ctx, char **out);
377 const char *name);
378 extern _GSASL_API int gsasl_mechanism_name_p (const char *mech);
379
380 /* Authentication functions: xstart.c, xstep.c, xfinish.c */
381 extern _GSASL_API int gsasl_client_start (Gsasl * ctx, const char *mech,
382 Gsasl_session ** sctx);
383 extern _GSASL_API int gsasl_server_start (Gsasl * ctx, const char *mech,
384 Gsasl_session ** sctx);
385 extern _GSASL_API int gsasl_step (Gsasl_session * sctx,
386 const char *input, size_t input_len,
387 char **output, size_t *output_len);
388 extern _GSASL_API int gsasl_step64 (Gsasl_session * sctx,
389 const char *b64input, char **b64output);
390 extern _GSASL_API void gsasl_finish (Gsasl_session * sctx);
391
392 /* Session functions: xcode.c, mechname.c */
393 extern _GSASL_API int gsasl_encode (Gsasl_session * sctx,
394 const char *input, size_t input_len,
395 char **output, size_t *output_len);
396 extern _GSASL_API int gsasl_decode (Gsasl_session * sctx,
397 const char *input, size_t input_len,
398 char **output, size_t *output_len);
399 extern _GSASL_API const char *gsasl_mechanism_name (Gsasl_session * sctx);
400
401 /* Error handling: error.c */
402 extern _GSASL_API const char *gsasl_strerror (int err);
403 extern _GSASL_API const char *gsasl_strerror_name (int err);
404
405 /* Internationalized string processing: stringprep.c */
406 extern _GSASL_API int gsasl_saslprep (const char *in,
408 char **out, int *stringpreprc);
409
410 /* Crypto functions: crypto.c */
411
412 /**
413 * Gsasl_hash:
414 * @GSASL_HASH_SHA1: Hash function SHA-1.
415 * @GSASL_HASH_SHA256: Hash function SHA-256.
416 *
417 * Hash functions. You may use gsasl_hash_length() to get the
418 * output size of a hash function.
419 *
420 * Currently only used as parameter to
421 * gsasl_scram_secrets_from_salted_password() and
422 * gsasl_scram_secrets_from_password() to specify for which SCRAM
423 * mechanism to prepare secrets for.
424 *
425 * Since: 1.10
426 */
427 typedef enum
428 {
429 /* Hash algorithm identifiers. */
432 } Gsasl_hash;
433
434 /**
435 * Gsasl_hash_length:
436 * @GSASL_HASH_SHA1_SIZE: Output size of hash function SHA-1.
437 * @GSASL_HASH_SHA256_SIZE: Output size of hash function SHA-256.
438 * @GSASL_HASH_MAX_SIZE: Maximum output size of any %Gsasl_hash_length.
439 *
440 * Identifiers specifying the output size of hash functions.
441 *
442 * These can be used when statically allocating the buffers needed
443 * for, e.g., gsasl_scram_secrets_from_password().
444 *
445 * Since: 1.10
446 */
447 typedef enum
448 {
449 /* Output sizes of hashes. */
454
455 extern _GSASL_API int gsasl_nonce (char *data, size_t datalen);
456 extern _GSASL_API int gsasl_random (char *data, size_t datalen);
457
458 extern _GSASL_API size_t gsasl_hash_length (Gsasl_hash hash);
459
460 extern _GSASL_API int
462 const char *salted_password,
463 char *client_key,
464 char *server_key,
465 char *stored_key);
466 extern _GSASL_API int
468 const char *password,
469 unsigned int iteration_count,
470 const char *salt,
471 size_t saltlen,
472 char *salted_password,
473 char *client_key,
474 char *server_key, char *stored_key);
475
476 /* Utilities: md5pwd.c, base64.c, free.c */
477 extern _GSASL_API int gsasl_simple_getpass (const char *filename,
478 const char *username,
479 char **key);
480 extern _GSASL_API int gsasl_base64_to (const char *in, size_t inlen,
481 char **out, size_t *outlen);
482 extern _GSASL_API int gsasl_base64_from (const char *in, size_t inlen,
483 char **out, size_t *outlen);
484 extern _GSASL_API int gsasl_hex_to (const char *in, size_t inlen,
485 char **out, size_t *outlen);
486 extern _GSASL_API int gsasl_hex_from (const char *in, char **out,
487 size_t *outlen);
488 extern _GSASL_API void gsasl_free (void *ptr);
489
490 /* Get the mechanism API. */
491# include <gsasl-mech.h>
492
493# ifdef __cplusplus
494}
495# endif
496
497#endif /* GSASL_H */
int gsasl_random(char *data, size_t datalen)
Definition: crypto.c:54
void gsasl_finish(Gsasl_session *sctx)
Definition: xfinish.c:33
Gsasl_saslprep_flags
Definition: gsasl.h:331
@ GSASL_ALLOW_UNASSIGNED
Definition: gsasl.h:332
int gsasl_property_set(Gsasl_session *sctx, Gsasl_property prop, const char *data)
Definition: property.c:188
void * gsasl_callback_hook_get(Gsasl *ctx)
Definition: callback.c:119
size_t gsasl_hash_length(Gsasl_hash hash)
Definition: crypto.c:72
void * gsasl_session_hook_get(Gsasl_session *sctx)
Definition: callback.c:159
int gsasl_base64_from(const char *in, size_t inlen, char **out, size_t *outlen)
Definition: base64.c:74
const char * gsasl_check_version(const char *req_version)
Definition: version.c:45
const char * gsasl_property_get(Gsasl_session *sctx, Gsasl_property prop)
Definition: property.c:291
int gsasl_decode(Gsasl_session *sctx, const char *input, size_t input_len, char **output, size_t *output_len)
Definition: xcode.c:98
int gsasl_saslprep(const char *in, Gsasl_saslprep_flags flags, char **out, int *stringpreprc)
void gsasl_callback_set(Gsasl *ctx, Gsasl_callback_function cb)
Definition: callback.c:44
Gsasl_qop
Definition: gsasl.h:317
@ GSASL_QOP_AUTH_CONF
Definition: gsasl.h:320
@ GSASL_QOP_AUTH
Definition: gsasl.h:318
@ GSASL_QOP_AUTH_INT
Definition: gsasl.h:319
int gsasl_client_support_p(Gsasl *ctx, const char *name)
Definition: supportp.c:49
Gsasl_hash
Definition: gsasl.h:428
@ GSASL_HASH_SHA1
Definition: gsasl.h:430
@ GSASL_HASH_SHA256
Definition: gsasl.h:431
#define _GSASL_API
Definition: gsasl.h:49
int gsasl_scram_secrets_from_salted_password(Gsasl_hash hash, const char *salted_password, char *client_key, char *server_key, char *stored_key)
Definition: crypto.c:103
int(* Gsasl_callback_function)(Gsasl *ctx, Gsasl_session *sctx, Gsasl_property prop)
Definition: gsasl.h:286
int gsasl_nonce(char *data, size_t datalen)
Definition: crypto.c:38
int gsasl_client_start(Gsasl *ctx, const char *mech, Gsasl_session **sctx)
Definition: xstart.c:119
Gsasl_rc
Definition: gsasl.h:128
@ GSASL_GSSAPI_UNWRAP_ERROR
Definition: gsasl.h:161
@ GSASL_NO_CLIENT_CODE
Definition: gsasl.h:140
@ GSASL_NO_CALLBACK
Definition: gsasl.h:142
@ GSASL_GSSAPI_IMPORT_NAME_ERROR
Definition: gsasl.h:158
@ GSASL_GSSAPI_RELEASE_OID_SET_ERROR
Definition: gsasl.h:172
@ GSASL_OK
Definition: gsasl.h:129
@ GSASL_SECURID_SERVER_NEED_ADDITIONAL_PASSCODE
Definition: gsasl.h:166
@ GSASL_GSSAPI_RELEASE_BUFFER_ERROR
Definition: gsasl.h:157
@ GSASL_NO_CB_TLS_EXPORTER
Definition: gsasl.h:155
@ GSASL_GSSAPI_ACCEPT_SEC_CONTEXT_ERROR
Definition: gsasl.h:160
@ GSASL_BASE64_ERROR
Definition: gsasl.h:134
@ GSASL_NO_OPENID20_REDIRECT_URL
Definition: gsasl.h:154
@ GSASL_SECURID_SERVER_NEED_NEW_PIN
Definition: gsasl.h:167
@ GSASL_GSSAPI_INQUIRE_MECH_FOR_SASLNAME_ERROR
Definition: gsasl.h:170
@ GSASL_AUTHENTICATION_ERROR
Definition: gsasl.h:138
@ GSASL_NEEDS_MORE
Definition: gsasl.h:130
@ GSASL_GSSAPI_TEST_OID_SET_MEMBER_ERROR
Definition: gsasl.h:171
@ GSASL_MALLOC_ERROR
Definition: gsasl.h:133
@ GSASL_NO_PASSWORD
Definition: gsasl.h:146
@ GSASL_NO_SAML20_IDP_IDENTIFIER
Definition: gsasl.h:152
@ GSASL_GSSAPI_DISPLAY_NAME_ERROR
Definition: gsasl.h:164
@ GSASL_NO_PASSCODE
Definition: gsasl.h:147
@ GSASL_NO_SERVICE
Definition: gsasl.h:149
@ GSASL_GSSAPI_ENCAPSULATE_TOKEN_ERROR
Definition: gsasl.h:168
@ GSASL_NO_AUTHZID
Definition: gsasl.h:145
@ GSASL_GSSAPI_ACQUIRE_CRED_ERROR
Definition: gsasl.h:163
@ GSASL_MECHANISM_CALLED_TOO_MANY_TIMES
Definition: gsasl.h:132
@ GSASL_NO_HOSTNAME
Definition: gsasl.h:150
@ GSASL_NO_AUTHID
Definition: gsasl.h:144
@ GSASL_GSSAPI_WRAP_ERROR
Definition: gsasl.h:162
@ GSASL_MECHANISM_PARSE_ERROR
Definition: gsasl.h:137
@ GSASL_NO_PIN
Definition: gsasl.h:148
@ GSASL_CRYPTO_ERROR
Definition: gsasl.h:135
@ GSASL_SASLPREP_ERROR
Definition: gsasl.h:136
@ GSASL_GSSAPI_DECAPSULATE_TOKEN_ERROR
Definition: gsasl.h:169
@ GSASL_NO_ANONYMOUS_TOKEN
Definition: gsasl.h:143
@ GSASL_NO_SERVER_CODE
Definition: gsasl.h:141
@ GSASL_NO_SAML20_REDIRECT_URL
Definition: gsasl.h:153
@ GSASL_INTEGRITY_ERROR
Definition: gsasl.h:139
@ GSASL_UNKNOWN_MECHANISM
Definition: gsasl.h:131
@ GSASL_GSSAPI_INIT_SEC_CONTEXT_ERROR
Definition: gsasl.h:159
@ GSASL_NO_CB_TLS_UNIQUE
Definition: gsasl.h:151
@ GSASL_GSSAPI_UNSUPPORTED_PROTECTION_ERROR
Definition: gsasl.h:165
void gsasl_session_hook_set(Gsasl_session *sctx, void *hook)
Definition: callback.c:139
int gsasl_property_set_raw(Gsasl_session *sctx, Gsasl_property prop, const char *data, size_t len)
Definition: property.c:217
const char * gsasl_client_suggest_mechanism(Gsasl *ctx, const char *mechlist)
Definition: suggest.c:87
int gsasl_server_support_p(Gsasl *ctx, const char *name)
Definition: supportp.c:66
int gsasl_scram_secrets_from_password(Gsasl_hash hash, const char *password, unsigned int iteration_count, const char *salt, size_t saltlen, char *salted_password, char *client_key, char *server_key, char *stored_key)
Definition: crypto.c:155
const char * gsasl_strerror(int err)
Definition: error.c:184
void gsasl_free(void *ptr)
Definition: free.c:41
const char * gsasl_property_fast(Gsasl_session *sctx, Gsasl_property prop)
Definition: property.c:261
int gsasl_base64_to(const char *in, size_t inlen, char **out, size_t *outlen)
Definition: base64.c:44
void gsasl_property_free(Gsasl_session *sctx, Gsasl_property prop)
Definition: property.c:158
int gsasl_server_start(Gsasl *ctx, const char *mech, Gsasl_session **sctx)
Definition: xstart.c:137
int gsasl_simple_getpass(const char *filename, const char *username, char **key)
Definition: md5pwd.c:47
Gsasl_hash_length
Definition: gsasl.h:448
@ GSASL_HASH_SHA1_SIZE
Definition: gsasl.h:450
@ GSASL_HASH_MAX_SIZE
Definition: gsasl.h:452
@ GSASL_HASH_SHA256_SIZE
Definition: gsasl.h:451
int gsasl_init(Gsasl **ctx)
Definition: init.c:157
int gsasl_encode(Gsasl_session *sctx, const char *input, size_t input_len, char **output, size_t *output_len)
Definition: xcode.c:65
Gsasl_property
Definition: gsasl.h:222
@ GSASL_DIGEST_MD5_HASHED_PASSWORD
Definition: gsasl.h:235
@ GSASL_SCRAM_STOREDKEY
Definition: gsasl.h:242
@ GSASL_SAML20_AUTHENTICATE_IN_BROWSER
Definition: gsasl.h:250
@ GSASL_HOSTNAME
Definition: gsasl.h:229
@ GSASL_AUTHZID
Definition: gsasl.h:225
@ GSASL_VALIDATE_GSSAPI
Definition: gsasl.h:256
@ GSASL_OPENID20_AUTHENTICATE_IN_BROWSER
Definition: gsasl.h:251
@ GSASL_SCRAM_SALT
Definition: gsasl.h:239
@ GSASL_QOP
Definition: gsasl.h:237
@ GSASL_CB_TLS_UNIQUE
Definition: gsasl.h:243
@ GSASL_SERVICE
Definition: gsasl.h:228
@ GSASL_GSSAPI_DISPLAY_NAME
Definition: gsasl.h:230
@ GSASL_VALIDATE_SIMPLE
Definition: gsasl.h:253
@ GSASL_VALIDATE_EXTERNAL
Definition: gsasl.h:254
@ GSASL_OPENID20_OUTCOME_DATA
Definition: gsasl.h:247
@ GSASL_SAML20_IDP_IDENTIFIER
Definition: gsasl.h:244
@ GSASL_SCRAM_SALTED_PASSWORD
Definition: gsasl.h:240
@ GSASL_VALIDATE_OPENID20
Definition: gsasl.h:259
@ GSASL_VALIDATE_SAML20
Definition: gsasl.h:258
@ GSASL_QOPS
Definition: gsasl.h:236
@ GSASL_PASSWORD
Definition: gsasl.h:226
@ GSASL_REALM
Definition: gsasl.h:234
@ GSASL_SCRAM_ITER
Definition: gsasl.h:238
@ GSASL_PASSCODE
Definition: gsasl.h:231
@ GSASL_AUTHID
Definition: gsasl.h:224
@ GSASL_SAML20_REDIRECT_URL
Definition: gsasl.h:245
@ GSASL_PIN
Definition: gsasl.h:233
@ GSASL_VALIDATE_SECURID
Definition: gsasl.h:257
@ GSASL_VALIDATE_ANONYMOUS
Definition: gsasl.h:255
@ GSASL_ANONYMOUS_TOKEN
Definition: gsasl.h:227
@ GSASL_SCRAM_SERVERKEY
Definition: gsasl.h:241
@ GSASL_CB_TLS_EXPORTER
Definition: gsasl.h:248
@ GSASL_SUGGESTED_PIN
Definition: gsasl.h:232
@ GSASL_OPENID20_REDIRECT_URL
Definition: gsasl.h:246
int gsasl_step64(Gsasl_session *sctx, const char *b64input, char **b64output)
Definition: xstep.c:86
int gsasl_mechanism_name_p(const char *mech)
Definition: suggest.c:52
int gsasl_callback(Gsasl *ctx, Gsasl_session *sctx, Gsasl_property prop)
Definition: callback.c:70
int gsasl_client_mechlist(Gsasl *ctx, char **out)
Definition: listmech.c:74
const char * gsasl_strerror_name(int err)
Definition: error.c:222
int gsasl_hex_from(const char *in, char **out, size_t *outlen)
Definition: base64.c:143
int gsasl_step(Gsasl_session *sctx, const char *input, size_t input_len, char **output, size_t *output_len)
Definition: xstep.c:51
int gsasl_hex_to(const char *in, size_t inlen, char **out, size_t *outlen)
Definition: base64.c:110
const char * gsasl_mechanism_name(Gsasl_session *sctx)
Definition: mechname.c:38
Gsasl_mechname_limits
Definition: gsasl.h:299
@ GSASL_MIN_MECHANISM_SIZE
Definition: gsasl.h:300
@ GSASL_MAX_MECHANISM_SIZE
Definition: gsasl.h:301
void gsasl_done(Gsasl *ctx)
Definition: done.c:33
void gsasl_callback_hook_set(Gsasl *ctx, void *hook)
Definition: callback.c:99
int gsasl_server_mechlist(Gsasl *ctx, char **out)
Definition: listmech.c:93
const char * name
Definition: error.c:37
Gsasl_mechanism * mech
Definition: internal.h:56
Gsasl * ctx
Definition: internal.h:54
char * password
Definition: internal.h:64
Definition: internal.h:41