Lines Matching defs:spnego
77 { GSS_SPNEGO, "gss-spnego", manage_gss_spnego_request},
78 { GSS_SPNEGO_CLIENT, "gss-spnego-client", manage_gss_spnego_client_request},
670 SPNEGO_DATA spnego;
677 ZERO_STRUCT(spnego);
685 spnego.type = SPNEGO_NEG_TOKEN_INIT;
686 spnego.negTokenInit.mechTypes = smb_xmalloc(sizeof(char *) * 3);
688 spnego.negTokenInit.mechTypes[0] = smb_xstrdup(OID_KERBEROS5_OLD);
689 spnego.negTokenInit.mechTypes[1] = smb_xstrdup(OID_NTLMSSP);
690 spnego.negTokenInit.mechTypes[2] = NULL;
692 spnego.negTokenInit.mechTypes[0] = smb_xstrdup(OID_NTLMSSP);
693 spnego.negTokenInit.mechTypes[1] = NULL;
697 spnego.negTokenInit.mechListMIC = data_blob(principal,
700 len = write_spnego_data(&token, &spnego);
701 free_spnego_data(&spnego);
947 static BOOL manage_client_ntlmssp_init(SPNEGO_DATA spnego)
955 DEBUG(10, ("Got spnego negTokenInit with NTLMSSP\n"));
982 spnego.type = SPNEGO_NEG_TOKEN_INIT;
983 spnego.negTokenInit.mechTypes = my_mechs;
984 spnego.negTokenInit.reqFlags = 0;
985 spnego.negTokenInit.mechListMIC = null_blob;
988 &spnego.negTokenInit.mechToken);
997 write_spnego_data(&to_server, &spnego);
998 data_blob_free(&spnego.negTokenInit.mechToken);
1007 static void manage_client_ntlmssp_targ(SPNEGO_DATA spnego)
1015 DEBUG(10, ("Got spnego negTokenTarg with NTLMSSP\n"));
1024 if (spnego.negTokenTarg.negResult == SPNEGO_REJECT) {
1030 if (spnego.negTokenTarg.negResult == SPNEGO_ACCEPT_COMPLETED) {
1037 spnego.negTokenTarg.responseToken,
1050 spnego.type = SPNEGO_NEG_TOKEN_TARG;
1051 spnego.negTokenTarg.negResult = SPNEGO_ACCEPT_INCOMPLETE;
1052 spnego.negTokenTarg.supportedMech = OID_NTLMSSP;
1053 spnego.negTokenTarg.responseToken = request;
1054 spnego.negTokenTarg.mechListMIC = null_blob;
1056 write_spnego_data(&to_server, &spnego);
1068 static BOOL manage_client_krb5_init(SPNEGO_DATA spnego)
1080 if ( (spnego.negTokenInit.mechListMIC.data == NULL) ||
1081 (spnego.negTokenInit.mechListMIC.length == 0) ) {
1086 principal = malloc(spnego.negTokenInit.mechListMIC.length+1);
1093 memcpy(principal, spnego.negTokenInit.mechListMIC.data,
1094 spnego.negTokenInit.mechListMIC.length);
1095 principal[spnego.negTokenInit.mechListMIC.length] = '\0';
1154 static void manage_client_krb5_targ(SPNEGO_DATA spnego)
1156 switch (spnego.negTokenTarg.negResult) {
1181 SPNEGO_DATA spnego;
1222 len = read_spnego_data(request, &spnego);
1231 if (spnego.type == SPNEGO_NEG_TOKEN_INIT) {
1235 const char **mechType = spnego.negTokenInit.mechTypes;
1242 if (manage_client_krb5_init(spnego))
1248 if (manage_client_ntlmssp_init(spnego))
1260 if (spnego.type == SPNEGO_NEG_TOKEN_TARG) {
1262 if (spnego.negTokenTarg.supportedMech == NULL) {
1267 switch (spnego.negTokenTarg.negResult) {
1277 spnego.negTokenTarg.negResult));
1285 if (strcmp(spnego.negTokenTarg.supportedMech,
1287 manage_client_ntlmssp_targ(spnego);
1292 if (strcmp(spnego.negTokenTarg.supportedMech,
1294 manage_client_krb5_targ(spnego);
1306 free_spnego_data(&spnego);