Print this page


Split Close
Expand all
Collapse all
          --- old/src/windows/native/sun/net/www/protocol/http/NTLMAuthSequence.c
          +++ new/src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.c
↓ open down ↓ 52 lines elided ↑ open up ↑
  53   53  static COMPLETE_AUTH_TOKEN_FN pCompleteAuthToken;
  54   54  static DELETE_SECURITY_CONTEXT_FN pDeleteSecurityContext;
  55   55  
  56   56  static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle);
  57   57  
  58   58  static jfieldID ntlm_ctxHandleID;
  59   59  static jfieldID ntlm_crdHandleID;
  60   60  
  61   61  static HINSTANCE lib = NULL;
  62   62  
  63      -JNIEXPORT void JNICALL Java_sun_net_www_protocol_http_NTLMAuthSequence_initFirst
       63 +JNIEXPORT void JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequence_initFirst
  64   64  (JNIEnv *env, jclass clazz)
  65   65  {
  66   66      OSVERSIONINFO   version;
  67   67      UCHAR libName[MAX_PATH];
  68   68  
  69   69      ntlm_ctxHandleID = (*env)->GetFieldID(env, clazz, "ctxHandle", "J");
  70   70      ntlm_crdHandleID = (*env)->GetFieldID(env, clazz, "crdHandle", "J");
  71   71  
  72   72      version.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
  73   73      GetVersionEx (&version);
↓ open down ↓ 32 lines elided ↑ open up ↑
 106  106          lib, "DeleteSecurityContext" );
 107  107  
 108  108  }
 109  109  
 110  110  /*
 111  111   * Class:     sun_net_www_protocol_http_NTLMAuthSequence
 112  112   * Method:    getCredentialsHandle
 113  113   * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)J
 114  114   */
 115  115  
 116      -JNIEXPORT jlong JNICALL Java_sun_net_www_protocol_http_NTLMAuthSequence_getCredentialsHandle
      116 +JNIEXPORT jlong JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequence_getCredentialsHandle
 117  117  (JNIEnv *env, jobject this, jstring user, jstring domain, jstring password)
 118  118  {
 119  119      SEC_WINNT_AUTH_IDENTITY   AuthId;
 120  120      SEC_WINNT_AUTH_IDENTITY * pAuthId;
 121  121      const CHAR        *pUser = 0;
 122  122      const CHAR        *pDomain = 0;
 123  123      const CHAR        *pPassword = 0;
 124  124      CredHandle      *pCred;
 125  125      TimeStamp            ltime;
 126  126      jboolean         isCopy;
↓ open down ↓ 63 lines elided ↑ open up ↑
 190  190      if (pDomain != NULL)
 191  191          JNU_ReleaseStringPlatformChars(env, domain, pDomain);
 192  192  
 193  193      if (ss == 0) {
 194  194          return (jlong) pCred;
 195  195      } else {
 196  196          return 0;
 197  197      }
 198  198  }
 199  199  
 200      -JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_NTLMAuthSequence_getNextToken
      200 +JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequence_getNextToken
 201  201  (JNIEnv *env, jobject this, jlong crdHandle, jbyteArray lastToken)
 202  202  {
 203  203  
 204  204      VOID        *pInput = 0;
 205  205      DWORD            inputLen;
 206  206      CHAR         buffOut[512];
 207  207      jboolean         isCopy;
 208  208      SECURITY_STATUS      ss;
 209  209      SecBufferDesc        OutBuffDesc;
 210  210      SecBuffer            OutSecBuff;
↓ open down ↓ 101 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX