nt_gss_common.c (55682) | nt_gss_common.c (178825) |
---|---|
1/* 2 * Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H�gskolan 3 * (Royal Institute of Technology, Stockholm, Sweden). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 21 unchanged lines hidden (view full) --- 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#include "test_locl.h" 35#include <gssapi.h> 36#include "nt_gss_common.h" 37 | 1/* 2 * Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H�gskolan 3 * (Royal Institute of Technology, Stockholm, Sweden). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 21 unchanged lines hidden (view full) --- 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#include "test_locl.h" 35#include <gssapi.h> 36#include "nt_gss_common.h" 37 |
38RCSID("$Id: nt_gss_common.c,v 1.3 1999/12/02 17:04:57 joda Exp $"); | 38RCSID("$Id: nt_gss_common.c 17450 2006-05-05 11:11:43Z lha $"); |
39 40/* 41 * These are functions that are needed to interoperate with the 42 * `Sample SSPI Code' in Windows 2000 RC1 SDK. 43 */ 44 45/* 46 * Write the `gss_buffer_t' in `buf' onto the fd `sock', but remember that 47 * the length is written in little-endian-order. 48 */ 49 50void 51nt_write_token (int sock, gss_buffer_t buf) 52{ 53 unsigned char net_len[4]; | 39 40/* 41 * These are functions that are needed to interoperate with the 42 * `Sample SSPI Code' in Windows 2000 RC1 SDK. 43 */ 44 45/* 46 * Write the `gss_buffer_t' in `buf' onto the fd `sock', but remember that 47 * the length is written in little-endian-order. 48 */ 49 50void 51nt_write_token (int sock, gss_buffer_t buf) 52{ 53 unsigned char net_len[4]; |
54 u_int32_t len; | 54 uint32_t len; |
55 OM_uint32 min_stat; 56 57 len = buf->length; 58 59 net_len[0] = (len >> 0) & 0xFF; 60 net_len[1] = (len >> 8) & 0xFF; 61 net_len[2] = (len >> 16) & 0xFF; 62 net_len[3] = (len >> 24) & 0xFF; --- 9 unchanged lines hidden (view full) --- 72/* 73 * 74 */ 75 76void 77nt_read_token (int sock, gss_buffer_t buf) 78{ 79 unsigned char net_len[4]; | 55 OM_uint32 min_stat; 56 57 len = buf->length; 58 59 net_len[0] = (len >> 0) & 0xFF; 60 net_len[1] = (len >> 8) & 0xFF; 61 net_len[2] = (len >> 16) & 0xFF; 62 net_len[3] = (len >> 24) & 0xFF; --- 9 unchanged lines hidden (view full) --- 72/* 73 * 74 */ 75 76void 77nt_read_token (int sock, gss_buffer_t buf) 78{ 79 unsigned char net_len[4]; |
80 u_int32_t len; | 80 uint32_t len; |
81 82 if (read(sock, net_len, 4) != 4) 83 err (1, "read"); 84 len = (net_len[0] << 0) 85 | (net_len[1] << 8) 86 | (net_len[2] << 16) 87 | (net_len[3] << 24); 88 --- 43 unchanged lines hidden --- | 81 82 if (read(sock, net_len, 4) != 4) 83 err (1, "read"); 84 len = (net_len[0] << 0) 85 | (net_len[1] << 8) 86 | (net_len[2] << 16) 87 | (net_len[3] << 24); 88 --- 43 unchanged lines hidden --- |