axis-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r1129841 - /axis/axis2/c/core/trunk/src/core/transport/http/sender/ntlm/heimdal/heimdal_ntlm_wrapper.c
Date Tue, 31 May 2011 18:42:45 GMT
Author: nandika
Date: Tue May 31 18:42:45 2011
New Revision: 1129841

URL: http://svn.apache.org/viewvc?rev=1129841&view=rev
Log:
compilation errors fixed on windows

Modified:
    axis/axis2/c/core/trunk/src/core/transport/http/sender/ntlm/heimdal/heimdal_ntlm_wrapper.c

Modified: axis/axis2/c/core/trunk/src/core/transport/http/sender/ntlm/heimdal/heimdal_ntlm_wrapper.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/src/core/transport/http/sender/ntlm/heimdal/heimdal_ntlm_wrapper.c?rev=1129841&r1=1129840&r2=1129841&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/src/core/transport/http/sender/ntlm/heimdal/heimdal_ntlm_wrapper.c
(original)
+++ axis/axis2/c/core/trunk/src/core/transport/http/sender/ntlm/heimdal/heimdal_ntlm_wrapper.c
Tue May 31 18:42:45 2011
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-#include <axis2_ntlm.h>
+#include "axis2_ntlm.h"
 #include <axutil_utils_defines.h>
 #include <axutil_utils.h>
 #include <string.h>
@@ -24,6 +24,7 @@
 #include <roken.h>
 #include <krb5-types.h> /* or <inttypes.h> */
 #include <heimntlm.h>
+#include <openssl/rand.h>
 
 void AXIS2_CALL
 heimdal_ntlm_wrapper_free(
@@ -110,13 +111,14 @@ heimdal_ntlm_wrapper_create_type1_messag
     const int flags,
     const axis2_char_t *domain)
 {
+	struct ntlm_type1 type1;
+    struct ntlm_buf data;
+    int ret;
     heimdal_ntlm_wrapper_impl_t *ntlm_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     ntlm_impl = AXIS2_INTF_TO_IMPL(ntlm);
 
-    struct ntlm_type1 type1;
-    struct ntlm_buf data;
-    int ret;
+
     memset(&type1, 0, sizeof(type1));
 
     if(flags != 0)
@@ -176,24 +178,29 @@ heimdal_ntlm_wrapper_create_type3_messag
     const axis2_char_t *domain,
     const axis2_char_t *workstation)
 {
-    heimdal_ntlm_wrapper_impl_t *ntlm_impl = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    ntlm_impl = AXIS2_INTF_TO_IMPL(ntlm);
-
+    
+	heimdal_ntlm_wrapper_impl_t *ntlm_impl = NULL;
     struct ntlm_type3 type3;
     struct ntlm_type2 type2;
     struct ntlm_buf data;
     int ret;
+    int len;
+
+	
+	
+	AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    ntlm_impl = AXIS2_INTF_TO_IMPL(ntlm);
+
     
     memset(&type2, 0, sizeof(type2));
 
-    int len = axutil_strlen(header_value);
+    len = axutil_strlen(header_value);
     len = 2 * len + 1;
-    char temp_value[len];
-    data.data = temp_value;
+	data.data = AXIS2_MALLOC(env->allocator, sizeof(char)*len);
     data.length = axutil_base64_decode_binary(data.data, header_value);
     ret = heim_ntlm_decode_type2(&data, &type2);
-    data.data = NULL;
+	AXIS2_FREE(env->allocator, data.data);
+	data.data = NULL;
     if (ret)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
@@ -230,8 +237,9 @@ heimdal_ntlm_wrapper_create_type3_messag
 
             if (type2.flags & NTLM_NEG_NTLM2_SESSION) 
             {
+				unsigned char nonce[8];
                 AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[heimdal_wrapper] ntlm2 session");
-                unsigned char nonce[8];
+                
 
                 if (RAND_bytes(nonce, sizeof(nonce)) != 1) 
                 {



Mime
View raw message