iptsec
1.12.11
|
00001 /* 00002 * This file is part of the Sofia-SIP package 00003 * 00004 * Copyright (C) 2005 Nokia Corporation. 00005 * 00006 * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden> 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation; either version 2.1 of 00011 * the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00021 * 02110-1301 USA 00022 * 00023 */ 00024 00025 #ifndef AUTH_NTLM_H 00026 00027 #define AUTH_NTLM_H 00028 00048 #ifndef SU_ALLOC_H 00049 #include <sofia-sip/su_alloc.h> 00050 #endif 00051 00052 #ifndef AUTH_PLUGIN_H 00053 #include <sofia-sip/auth_plugin.h> 00054 #endif 00055 00056 SOFIA_BEGIN_DECLS 00057 00058 issize_t auth_ntlm_challenge_get(su_home_t *, auth_challenge_t *, 00059 char const * const params[]); 00060 issize_t auth_ntlm_response_get(su_home_t *, auth_response_t *, 00061 char const * const params[]); 00062 00063 int auth_ntlm_a1(auth_response_t *ar, 00064 auth_hexmd5_t ha1, 00065 char const *secret); 00066 00067 int auth_ntlm_a1sess(auth_response_t *ar, 00068 auth_hexmd5_t ha1sess, 00069 char const *ha1); 00070 00071 int auth_ntlm_sessionkey(auth_response_t *, auth_hexmd5_t ha1, 00072 char const *secret); 00073 int auth_ntlm_response(auth_response_t *, auth_hexmd5_t response, 00074 auth_hexmd5_t const ha1, 00075 char const *method_name, void const *data, issize_t dlen); 00076 00078 msg_auth_t *auth_ntlm_credentials(msg_auth_t *auth, 00079 char const *realm, 00080 char const *opaque, 00081 char const *gssapidata, 00082 char const *targetname); 00083 00084 void auth_challenge_ntlm(auth_mod_t *am, 00085 auth_status_t *as, 00086 auth_challenger_t const *ach); 00087 00088 00089 void auth_method_ntlm(auth_mod_t *am, 00090 auth_status_t *as, 00091 msg_auth_t *au, 00092 auth_challenger_t const *ach); 00093 00094 00095 void auth_check_ntlm(auth_mod_t *am, 00096 auth_status_t *as, 00097 auth_response_t *ar, 00098 auth_challenger_t const *ach); 00099 00100 int auth_generate_ntlm_nonce(auth_mod_t *am, 00101 char buffer[], 00102 size_t buffer_len, 00103 int nextnonce, 00104 msg_time_t now); 00105 00106 int auth_validate_ntlm_nonce(auth_mod_t *am, 00107 auth_status_t *as, 00108 auth_response_t *ar, 00109 msg_time_t now); 00110 00111 void auth_info_ntlm(auth_mod_t *am, 00112 auth_status_t *as, 00113 auth_challenger_t const *ach); 00114 00115 SOFIA_END_DECLS 00116 00117 #endif