6830658: Changeset ec64fd74aa69 breaks the fastdebug build in NativeCreds.c
Reviewed-by: tbell
This commit is contained in:
parent
bca01e0826
commit
3119cce77d
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Portions Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
|
* Portions Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -73,7 +73,7 @@ jmethodID setRealmMethod = 0;
|
|||||||
* Function prototypes for internal routines
|
* Function prototypes for internal routines
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
BOOL DEBUG = 0;
|
BOOL native_debug = 0;
|
||||||
|
|
||||||
BOOL PackageConnectLookup(PHANDLE,PULONG);
|
BOOL PackageConnectLookup(PHANDLE,PULONG);
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
printf("LSA: Krb5 has no DEBUG field\n");
|
printf("LSA: Krb5 has no DEBUG field\n");
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
DEBUG = (*env)->GetStaticBooleanField(env, cls, fldDEBUG);
|
native_debug = (*env)->GetStaticBooleanField(env, cls, fldDEBUG);
|
||||||
|
|
||||||
cls = (*env)->FindClass(env,"sun/security/krb5/internal/Ticket");
|
cls = (*env)->FindClass(env,"sun/security/krb5/internal/Ticket");
|
||||||
|
|
||||||
@ -138,17 +138,17 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
printf("LSA: Couldn't find Ticket\n");
|
printf("LSA: Couldn't find Ticket\n");
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Found Ticket\n");
|
printf("LSA: Found Ticket\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
ticketClass = (*env)->NewWeakGlobalRef(env,cls);
|
ticketClass = (*env)->NewWeakGlobalRef(env,cls);
|
||||||
if (ticketClass == NULL) {
|
if (ticketClass == NULL) {
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Made NewWeakGlobalRef\n");
|
printf("LSA: Made NewWeakGlobalRef\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
cls = (*env)->FindClass(env, "sun/security/krb5/PrincipalName");
|
cls = (*env)->FindClass(env, "sun/security/krb5/PrincipalName");
|
||||||
|
|
||||||
@ -156,17 +156,17 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
printf("LSA: Couldn't find PrincipalName\n");
|
printf("LSA: Couldn't find PrincipalName\n");
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Found PrincipalName\n");
|
printf("LSA: Found PrincipalName\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
principalNameClass = (*env)->NewWeakGlobalRef(env,cls);
|
principalNameClass = (*env)->NewWeakGlobalRef(env,cls);
|
||||||
if (principalNameClass == NULL) {
|
if (principalNameClass == NULL) {
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Made NewWeakGlobalRef\n");
|
printf("LSA: Made NewWeakGlobalRef\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
cls = (*env)->FindClass(env,"sun/security/util/DerValue");
|
cls = (*env)->FindClass(env,"sun/security/util/DerValue");
|
||||||
|
|
||||||
@ -174,17 +174,17 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
printf("LSA: Couldn't find DerValue\n");
|
printf("LSA: Couldn't find DerValue\n");
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Found DerValue\n");
|
printf("LSA: Found DerValue\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
derValueClass = (*env)->NewWeakGlobalRef(env,cls);
|
derValueClass = (*env)->NewWeakGlobalRef(env,cls);
|
||||||
if (derValueClass == NULL) {
|
if (derValueClass == NULL) {
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Made NewWeakGlobalRef\n");
|
printf("LSA: Made NewWeakGlobalRef\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
cls = (*env)->FindClass(env,"sun/security/krb5/EncryptionKey");
|
cls = (*env)->FindClass(env,"sun/security/krb5/EncryptionKey");
|
||||||
|
|
||||||
@ -192,17 +192,17 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
printf("LSA: Couldn't find EncryptionKey\n");
|
printf("LSA: Couldn't find EncryptionKey\n");
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Found EncryptionKey\n");
|
printf("LSA: Found EncryptionKey\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
encryptionKeyClass = (*env)->NewWeakGlobalRef(env,cls);
|
encryptionKeyClass = (*env)->NewWeakGlobalRef(env,cls);
|
||||||
if (encryptionKeyClass == NULL) {
|
if (encryptionKeyClass == NULL) {
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Made NewWeakGlobalRef\n");
|
printf("LSA: Made NewWeakGlobalRef\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
cls = (*env)->FindClass(env,"sun/security/krb5/internal/TicketFlags");
|
cls = (*env)->FindClass(env,"sun/security/krb5/internal/TicketFlags");
|
||||||
|
|
||||||
@ -210,17 +210,17 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
printf("LSA: Couldn't find TicketFlags\n");
|
printf("LSA: Couldn't find TicketFlags\n");
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Found TicketFlags\n");
|
printf("LSA: Found TicketFlags\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
ticketFlagsClass = (*env)->NewWeakGlobalRef(env,cls);
|
ticketFlagsClass = (*env)->NewWeakGlobalRef(env,cls);
|
||||||
if (ticketFlagsClass == NULL) {
|
if (ticketFlagsClass == NULL) {
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Made NewWeakGlobalRef\n");
|
printf("LSA: Made NewWeakGlobalRef\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
cls = (*env)->FindClass(env,"sun/security/krb5/internal/KerberosTime");
|
cls = (*env)->FindClass(env,"sun/security/krb5/internal/KerberosTime");
|
||||||
|
|
||||||
@ -228,17 +228,17 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
printf("LSA: Couldn't find KerberosTime\n");
|
printf("LSA: Couldn't find KerberosTime\n");
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Found KerberosTime\n");
|
printf("LSA: Found KerberosTime\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
kerberosTimeClass = (*env)->NewWeakGlobalRef(env,cls);
|
kerberosTimeClass = (*env)->NewWeakGlobalRef(env,cls);
|
||||||
if (kerberosTimeClass == NULL) {
|
if (kerberosTimeClass == NULL) {
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Made NewWeakGlobalRef\n");
|
printf("LSA: Made NewWeakGlobalRef\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
cls = (*env)->FindClass(env,"java/lang/String");
|
cls = (*env)->FindClass(env,"java/lang/String");
|
||||||
|
|
||||||
@ -246,17 +246,17 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
printf("LSA: Couldn't find String\n");
|
printf("LSA: Couldn't find String\n");
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Found String\n");
|
printf("LSA: Found String\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
javaLangStringClass = (*env)->NewWeakGlobalRef(env,cls);
|
javaLangStringClass = (*env)->NewWeakGlobalRef(env,cls);
|
||||||
if (javaLangStringClass == NULL) {
|
if (javaLangStringClass == NULL) {
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Made NewWeakGlobalRef\n");
|
printf("LSA: Made NewWeakGlobalRef\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
derValueConstructor = (*env)->GetMethodID(env, derValueClass,
|
derValueConstructor = (*env)->GetMethodID(env, derValueClass,
|
||||||
"<init>", "([B)V");
|
"<init>", "([B)V");
|
||||||
@ -264,9 +264,9 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
printf("LSA: Couldn't find DerValue constructor\n");
|
printf("LSA: Couldn't find DerValue constructor\n");
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Found DerValue constructor\n");
|
printf("LSA: Found DerValue constructor\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
ticketConstructor = (*env)->GetMethodID(env, ticketClass,
|
ticketConstructor = (*env)->GetMethodID(env, ticketClass,
|
||||||
"<init>", "(Lsun/security/util/DerValue;)V");
|
"<init>", "(Lsun/security/util/DerValue;)V");
|
||||||
@ -274,9 +274,9 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
printf("LSA: Couldn't find Ticket constructor\n");
|
printf("LSA: Couldn't find Ticket constructor\n");
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Found Ticket constructor\n");
|
printf("LSA: Found Ticket constructor\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
principalNameConstructor = (*env)->GetMethodID(env, principalNameClass,
|
principalNameConstructor = (*env)->GetMethodID(env, principalNameClass,
|
||||||
"<init>", "([Ljava/lang/String;)V");
|
"<init>", "([Ljava/lang/String;)V");
|
||||||
@ -284,9 +284,9 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
printf("LSA: Couldn't find PrincipalName constructor\n");
|
printf("LSA: Couldn't find PrincipalName constructor\n");
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Found PrincipalName constructor\n");
|
printf("LSA: Found PrincipalName constructor\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
encryptionKeyConstructor = (*env)->GetMethodID(env, encryptionKeyClass,
|
encryptionKeyConstructor = (*env)->GetMethodID(env, encryptionKeyClass,
|
||||||
"<init>", "(I[B)V");
|
"<init>", "(I[B)V");
|
||||||
@ -294,9 +294,9 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
printf("LSA: Couldn't find EncryptionKey constructor\n");
|
printf("LSA: Couldn't find EncryptionKey constructor\n");
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Found EncryptionKey constructor\n");
|
printf("LSA: Found EncryptionKey constructor\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
ticketFlagsConstructor = (*env)->GetMethodID(env, ticketFlagsClass,
|
ticketFlagsConstructor = (*env)->GetMethodID(env, ticketFlagsClass,
|
||||||
"<init>", "(I[B)V");
|
"<init>", "(I[B)V");
|
||||||
@ -304,9 +304,9 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
printf("LSA: Couldn't find TicketFlags constructor\n");
|
printf("LSA: Couldn't find TicketFlags constructor\n");
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Found TicketFlags constructor\n");
|
printf("LSA: Found TicketFlags constructor\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
kerberosTimeConstructor = (*env)->GetMethodID(env, kerberosTimeClass,
|
kerberosTimeConstructor = (*env)->GetMethodID(env, kerberosTimeClass,
|
||||||
"<init>", "(Ljava/lang/String;)V");
|
"<init>", "(Ljava/lang/String;)V");
|
||||||
@ -314,9 +314,9 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
printf("LSA: Couldn't find KerberosTime constructor\n");
|
printf("LSA: Couldn't find KerberosTime constructor\n");
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Found KerberosTime constructor\n");
|
printf("LSA: Found KerberosTime constructor\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
// load the setRealm method in PrincipalName
|
// load the setRealm method in PrincipalName
|
||||||
setRealmMethod = (*env)->GetMethodID(env, principalNameClass,
|
setRealmMethod = (*env)->GetMethodID(env, principalNameClass,
|
||||||
@ -326,9 +326,9 @@ JNIEXPORT jint JNICALL JNI_OnLoad(
|
|||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Finished OnLoad processing\n");
|
printf("LSA: Finished OnLoad processing\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
return JNI_VERSION_1_2;
|
return JNI_VERSION_1_2;
|
||||||
}
|
}
|
||||||
@ -419,7 +419,7 @@ JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativ
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Found KrbCreds constructor\n");
|
printf("LSA: Found KrbCreds constructor\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -430,9 +430,9 @@ JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativ
|
|||||||
if (!PackageConnectLookup(&LogonHandle, &PackageId))
|
if (!PackageConnectLookup(&LogonHandle, &PackageId))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Got handle to Kerberos package\n");
|
printf("LSA: Got handle to Kerberos package\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
// Get the MS TGT from cache
|
// Get the MS TGT from cache
|
||||||
CacheRequest.MessageType = KerbRetrieveTicketMessage;
|
CacheRequest.MessageType = KerbRetrieveTicketMessage;
|
||||||
@ -449,7 +449,7 @@ JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativ
|
|||||||
&SubStatus
|
&SubStatus
|
||||||
);
|
);
|
||||||
|
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Response size is %d\n", rspSize);
|
printf("LSA: Response size is %d\n", rspSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -490,9 +490,9 @@ JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativ
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ignore_cache) {
|
if (ignore_cache) {
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: MS TGT in cache is invalid/not supported; request new ticket\n");
|
printf("LSA: MS TGT in cache is invalid/not supported; request new ticket\n");
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
// use domain to request Ticket
|
// use domain to request Ticket
|
||||||
Status = ConstructTicketRequest(msticket->TargetDomainName,
|
Status = ConstructTicketRequest(msticket->TargetDomainName,
|
||||||
@ -516,9 +516,9 @@ JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativ
|
|||||||
&SubStatus
|
&SubStatus
|
||||||
);
|
);
|
||||||
|
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Response size is %d\n", responseSize);
|
printf("LSA: Response size is %d\n", responseSize);
|
||||||
} /* DEBUG */
|
}
|
||||||
|
|
||||||
if (!LSA_SUCCESS(Status) || !LSA_SUCCESS(SubStatus)) {
|
if (!LSA_SUCCESS(Status) || !LSA_SUCCESS(SubStatus)) {
|
||||||
if (!LSA_SUCCESS(Status)) {
|
if (!LSA_SUCCESS(Status)) {
|
||||||
@ -811,7 +811,7 @@ ShowLastError(
|
|||||||
static WCHAR szMsgBuf[MAX_MSG_SIZE];
|
static WCHAR szMsgBuf[MAX_MSG_SIZE];
|
||||||
DWORD dwRes;
|
DWORD dwRes;
|
||||||
|
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Error calling function %s: %lu\n", szAPI, dwError);
|
printf("LSA: Error calling function %s: %lu\n", szAPI, dwError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -823,7 +823,7 @@ ShowLastError(
|
|||||||
szMsgBuf,
|
szMsgBuf,
|
||||||
MAX_MSG_SIZE,
|
MAX_MSG_SIZE,
|
||||||
NULL);
|
NULL);
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
if (0 == dwRes) {
|
if (0 == dwRes) {
|
||||||
printf("LSA: FormatMessage failed with %d\n", GetLastError());
|
printf("LSA: FormatMessage failed with %d\n", GetLastError());
|
||||||
// ExitProcess(EXIT_FAILURE);
|
// ExitProcess(EXIT_FAILURE);
|
||||||
@ -923,7 +923,7 @@ jobject BuildPrincipal(JNIEnv *env, PKERB_EXTERNAL_NAME principalName,
|
|||||||
((domainName.Length)*sizeof(WCHAR) + sizeof(UNICODE_NULL)));
|
((domainName.Length)*sizeof(WCHAR) + sizeof(UNICODE_NULL)));
|
||||||
wcsncpy(realm, domainName.Buffer, domainName.Length/sizeof(WCHAR));
|
wcsncpy(realm, domainName.Buffer, domainName.Length/sizeof(WCHAR));
|
||||||
|
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Principal domain is %S\n", realm);
|
printf("LSA: Principal domain is %S\n", realm);
|
||||||
printf("LSA: Name type is %x\n", principalName->NameType);
|
printf("LSA: Name type is %x\n", principalName->NameType);
|
||||||
printf("LSA: Name count is %x\n", principalName->NameCount);
|
printf("LSA: Name count is %x\n", principalName->NameCount);
|
||||||
@ -933,7 +933,7 @@ jobject BuildPrincipal(JNIEnv *env, PKERB_EXTERNAL_NAME principalName,
|
|||||||
stringArray = (*env)->NewObjectArray(env, nameCount,
|
stringArray = (*env)->NewObjectArray(env, nameCount,
|
||||||
javaLangStringClass, NULL);
|
javaLangStringClass, NULL);
|
||||||
if (stringArray == NULL) {
|
if (stringArray == NULL) {
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Can't allocate String array for Principal\n");
|
printf("LSA: Can't allocate String array for Principal\n");
|
||||||
}
|
}
|
||||||
LocalFree(realm);
|
LocalFree(realm);
|
||||||
@ -976,7 +976,7 @@ jobject BuildEncryptionKey(JNIEnv *env, PKERB_CRYPTO_KEY cryptoKey) {
|
|||||||
if (cryptoKey->Value[i]) break;
|
if (cryptoKey->Value[i]) break;
|
||||||
}
|
}
|
||||||
if (i == cryptoKey->Length) {
|
if (i == cryptoKey->Length) {
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: Session key all zero. Stop.\n");
|
printf("LSA: Session key all zero. Stop.\n");
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -1045,9 +1045,9 @@ jobject BuildKerberosTime(JNIEnv *env, PLARGE_INTEGER kerbtime) {
|
|||||||
hour,
|
hour,
|
||||||
minute,
|
minute,
|
||||||
second );
|
second );
|
||||||
if (DEBUG) {
|
if (native_debug) {
|
||||||
printf("LSA: %S\n", (wchar_t *)timeString);
|
printf("LSA: %S\n", (wchar_t *)timeString);
|
||||||
} /* DEBUG */
|
}
|
||||||
stringTime = (*env)->NewString(env, timeString,
|
stringTime = (*env)->NewString(env, timeString,
|
||||||
(sizeof(timeString)/sizeof(WCHAR))-1);
|
(sizeof(timeString)/sizeof(WCHAR))-1);
|
||||||
if (stringTime != NULL) { // everything's OK so far
|
if (stringTime != NULL) { // everything's OK so far
|
||||||
|
Loading…
Reference in New Issue
Block a user