/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include <jni.h>
#include <windows.h>
#include <rpc.h>
#include <winsock.h>
#include <lm.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <tchar.h>
#include <fcntl.h>
#include "jni_util.h"
#define SECURITY_WIN32
#include "sspi.h"
{
}
/*
* Class: sun_net_www_protocol_http_NTLMAuthSequence
* Method: getCredentialsHandle
*/
{
if (user != 0) {
return 0; // pending Exception
}
if (domain != 0) {
return 0; // pending Exception
}
}
if (password != 0) {
return 0; // pending Exception
}
}
}
}
}
} else {
}
);
/* Release resources held by JNU_GetStringPlatformChars */
if (ss == 0) {
} else {
return 0;
}
}
/*
* Class: sun_net_www_protocol_http_ntlm_NTLMAuthSequence
* Method: getNextToken
*/
{
if (pCtx == 0) { /* first call */
} else {
newContext = pCtx;
}
OutBuffDesc.ulVersion = 0;
/*
* Prepare our Input buffer - Note the server is expecting the client's
* negotiation packet on the first call
*/
if (lastToken != 0)
{
InBuffDesc.ulVersion = 0;
}
/*
* will return success when its done but we still
* need to send the out buffer if there are bytes to send
*/
);
if (pInput != 0) {
}
if (ss < 0) {
return 0;
}
if (ss < 0) {
return 0;
}
}
if ( OutSecBuff.cbBuffer > 0 ) {
if (lastToken != 0) // 2nd stage
}
}
return result;
}
static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle, JNIEnv *env, jobject status) {
if (credHand != 0) {
}
if (ctxHandle != 0) {
}
/* Sequence is complete so set flag */
}