gsasl  1.8.0
internal.h
Go to the documentation of this file.
00001 /* internal.h --- Internal header with hidden library handle structures.
00002  * Copyright (C) 2002-2012 Simon Josefsson
00003  *
00004  * This file is part of GNU SASL Library.
00005  *
00006  * GNU SASL Library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public License
00008  * as published by the Free Software Foundation; either version 2.1 of
00009  * the License, or (at your option) any later version.
00010  *
00011  * GNU SASL Library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License License along with GNU SASL Library; if not, write to the
00018  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #ifndef INTERNAL_H
00024 #define INTERNAL_H
00025 
00026 #ifdef HAVE_CONFIG_H
00027 #include "config.h"
00028 #endif
00029 
00030 /* Get specifications. */
00031 #include "gsasl.h"
00032 
00033 /* Get malloc, free, ... */
00034 #include <stdlib.h>
00035 
00036 /* Get strlen, strcpy, ... */
00037 #include <string.h>
00038 
00039 /* Main library handle. */
00040 struct Gsasl
00041 {
00042   size_t n_client_mechs;
00043   Gsasl_mechanism *client_mechs;
00044   size_t n_server_mechs;
00045   Gsasl_mechanism *server_mechs;
00046   /* Callback. */
00047   Gsasl_callback_function cb;
00048   void *application_hook;
00049 #ifndef GSASL_NO_OBSOLETE
00050   /* Obsolete stuff. */
00051   Gsasl_client_callback_authorization_id cbc_authorization_id;
00052   Gsasl_client_callback_authentication_id cbc_authentication_id;
00053   Gsasl_client_callback_password cbc_password;
00054   Gsasl_client_callback_passcode cbc_passcode;
00055   Gsasl_client_callback_pin cbc_pin;
00056   Gsasl_client_callback_anonymous cbc_anonymous;
00057   Gsasl_client_callback_qop cbc_qop;
00058   Gsasl_client_callback_maxbuf cbc_maxbuf;
00059   Gsasl_client_callback_service cbc_service;
00060   Gsasl_client_callback_realm cbc_realm;
00061   Gsasl_server_callback_validate cbs_validate;
00062   Gsasl_server_callback_securid cbs_securid;
00063   Gsasl_server_callback_retrieve cbs_retrieve;
00064   Gsasl_server_callback_cram_md5 cbs_cram_md5;
00065   Gsasl_server_callback_digest_md5 cbs_digest_md5;
00066   Gsasl_server_callback_external cbs_external;
00067   Gsasl_server_callback_anonymous cbs_anonymous;
00068   Gsasl_server_callback_realm cbs_realm;
00069   Gsasl_server_callback_qop cbs_qop;
00070   Gsasl_server_callback_maxbuf cbs_maxbuf;
00071   Gsasl_server_callback_cipher cbs_cipher;
00072   Gsasl_server_callback_service cbs_service;
00073   Gsasl_server_callback_gssapi cbs_gssapi;
00074 #endif
00075 };
00076 
00077 /* Per-session library handle. */
00078 struct Gsasl_session
00079 {
00080   Gsasl *ctx;
00081   int clientp;
00082   Gsasl_mechanism *mech;
00083   void *mech_data;
00084   void *application_hook;
00085 
00086   /* Properties. */
00087   char *anonymous_token;
00088   char *authid;
00089   char *authzid;
00090   char *password;
00091   char *passcode;
00092   char *pin;
00093   char *suggestedpin;
00094   char *service;
00095   char *hostname;
00096   char *gssapi_display_name;
00097   char *realm;
00098   char *digest_md5_hashed_password;
00099   char *qops;
00100   char *qop;
00101   char *scram_iter;
00102   char *scram_salt;
00103   char *scram_salted_password;
00104   char *cb_tls_unique;
00105   char *saml20_idp_identifier;
00106   char *saml20_redirect_url;
00107   char *openid20_redirect_url;
00108   char *openid20_outcome_data;
00109   /* If you add anything here, remember to change change
00110      gsasl_finish() in xfinish.c and map() in property.c.  */
00111 
00112 #ifndef GSASL_NO_OBSOLETE
00113   /* Obsolete stuff. */
00114   void *application_data;
00115 #endif
00116 };
00117 
00118 #ifndef GSASL_NO_OBSOLETE
00119 const char *_gsasl_obsolete_property_map (Gsasl_session * sctx,
00120                                           Gsasl_property prop);
00121 int _gsasl_obsolete_callback (Gsasl * ctx, Gsasl_session * sctx,
00122                               Gsasl_property prop);
00123 #endif
00124 
00125 #endif /* INTERNAL_H */