| Ximian Connector for Microsoft Exchange Programmer’s Reference Manual |
|---|
xntlm — Microsoft NTLM Authentication
GByteArray * xntlm_negotiate (void);gboolean xntlm_parse_challenge (gpointer challenge,int len,char **nonce,char **nt_domain,char **w2k_domain);GByteArray * xntlm_authenticate (constchar *nonce, constchar *domain, constchar *user, constchar *password, constchar *workstation);
These functions are the main interface to the xntlm library.
GByteArray * xntlm_negotiate (void);
Creates an NTLM Type 1 (Negotiate) message
| Returns : | the message |
gboolean xntlm_parse_challenge (gpointer challenge,int len,char **nonce,char **nt_domain,char **w2k_domain);
Attempts to parse the challenge in challenge. If nonce is
non-NULL, the 8-byte nonce from challenge will be returned in it.
Likewise, if nt_domain and/or w2k_domain are non-NULL, the
server's domain names will be returned in them. The strings
returned must be freed with
| challenge : | buffer containing an NTLM Type 2 (Challenge) message |
| len : | the length of challenge |
| nonce : | return variable for the challenge nonce, or NULL |
| nt_domain : | return variable for the server NT domain, or NULL |
| w2k_domain : | return variable for the server W2k domain, or NULL |
| Returns : | TRUE if the challenge could be parsed, FALSE otherwise. |
GByteArray * xntlm_authenticate (constchar *nonce, constchar *domain, constchar *user, constchar *password, constchar *workstation);
Generates an NTLM Type 3 (Authenticate) message from the given data. workstation is provided for completeness, but can basically always be left NULL.
| nonce : | the nonce from an NTLM Type 2 (Challenge) message |
| domain : | the NT domain to authenticate against |
| user : | the name of the user in domain |
| password : | user's password |
| workstation : | the name of the local workstation authenticated against, or NULL. |
| Returns : | the NTLM Type 3 message |
| << e2k-xml-utils | xntlm-des >> |