Commit af6e0418 authored by Martti Mela's avatar Martti Mela

iptsec: more NTLM methods and header file auth_ntlm.h

darcs-hash:20060427115235-1b897-ddb4f61115c24bbd834a2216f55d0d468beff0c8.gz
parent 62e56811
......@@ -86,9 +86,10 @@ AC_ARG_ENABLE(ntlm,
[ --enable-ntlm enable NTLM support (disabled)],
, enable_ntlm=no)
if test x$enable_ntlm != xno ; then
if test x$enable_ntlm = xyes ; then
AC_DEFINE([HAVE_SOFIA_NTLM], 1, [Define as 1 if we use NTLM library])
fi
AM_CONDITIONAL([HAVE_NTLM], [test "x$enable_ntlm" = xyes])
AC_DEFINE([HAVE_SRTP], 0, [Define as 1 if we use SRTP])
......
......@@ -30,15 +30,21 @@ BUILT_SOURCES = auth_tag_ref.c
nobase_include_sofia_HEADERS = \
sofia-sip/auth_client.h sofia-sip/auth_digest.h \
sofia-sip/auth_module.h sofia-sip/auth_plugin.h
sofia-sip/auth_module.h sofia-sip/auth_plugin.h $(NTLM_HDR)
libiptsec_la_SOURCES = iptsec_debug.h \
auth_client.c auth_digest.c \
auth_module.c auth_tag.c auth_tag_ref.c \
auth_plugin.c auth_plugin_delayed.c \
$(SIPSOURCES) $(HTTPSOURCES) \
$(SIPSOURCES) $(HTTPSOURCES) $(NTLM_SOURCE) \
iptsec_debug.c
if HAVE_NTLM
NTLM_HEADER = sofia-sip/auth_ntlm.h
NTLM_SOURCE = auth_ntlm.c
endif
SIPSOURCES = auth_module_sip.c
HTTPSOURCES = auth_module_http.c
......
......@@ -45,6 +45,11 @@
#include <sofia-sip/msg_header.h>
#include <sofia-sip/auth_digest.h>
#if HAVE_SOFIA_NTLM
#include <sofia-sip/auth_digest.h>
#endif
#include <sofia-sip/base64.h>
#include <sofia-sip/su_uniqueid.h>
......
......@@ -47,6 +47,11 @@
#include <unistd.h>
#include <sofia-sip/auth_digest.h>
#if HAVE_SOFIA_NTLM
#include <sofia-sip/auth_digest.h>
#endif
#include "iptsec_debug.h"
#if HAVE_FUNC
......@@ -976,7 +981,11 @@ void auth_challenge_ntlm(auth_mod_t *am,
char const *u, *d;
char nonce[AUTH_NTLM_NONCE_LEN];
#if 0
auth_generate_ntlm_nonce(am, nonce, sizeof nonce, 0, msg_now());
#else
auth_generate_digest_nonce(am, nonce, sizeof nonce, 0, msg_now());
#endif
u = as->as_uri;
d = as->as_pdomain;
......
......@@ -41,6 +41,10 @@
#include <sofia-sip/auth_digest.h>
#if HAVE_SOFIA_NTLM
#include <sofia-sip/auth_ntlm.h>
#endif
#if !HAVE_FUNC
#if !HAVE_FUNCTION
#define __FUNCTION__ "auth_plugin"
......
......@@ -40,6 +40,9 @@
#ifndef AUTH_DIGEST_H
#include <sofia-sip/auth_digest.h>
#endif
#ifndef AUTH_NTLM_H
#include <sofia-sip/auth_ntlm.h>
#endif
#ifndef URL_H
#include <sofia-sip/url.h>
#endif
......
......@@ -42,6 +42,10 @@
#include "sofia-sip/auth_digest.h"
#endif
#ifndef AUTH_NTLM_H
#include "sofia-sip/auth_ntlm.h"
#endif
#ifndef MSG_DATE_H
#include <sofia-sip/msg_date.h>
#endif
......@@ -249,6 +253,33 @@ void auth_challenge_ntlm(auth_mod_t *am,
auth_challenger_t const *ach);
void auth_method_ntlm(auth_mod_t *am,
auth_status_t *as,
msg_auth_t *au,
auth_challenger_t const *ach);
void auth_check_ntlm(auth_mod_t *am,
auth_status_t *as,
auth_response_t *ar,
auth_challenger_t const *ach);
int auth_generate_ntlm_nonce(auth_mod_t *am,
char buffer[],
size_t buffer_len,
int nextnonce,
msg_time_t now);
int auth_validate_ntlm_nonce(auth_mod_t *am,
auth_status_t *as,
auth_response_t *ar,
msg_time_t now);
void auth_info_ntlm(auth_mod_t *am,
auth_status_t *as,
auth_challenger_t const *ach);
int auth_allow_check(auth_mod_t *am, auth_status_t *as);
int auth_get_params(su_home_t *home,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment