head 1.3; access; symbols trunk-20040613:1.3 mach64-last-merge:1.3 driinterface-0-0-3-20040303-merge:1.3 driinterface-0-0-3-20040303-premerge:1.3 driinterface-0-0-3-20040303:1.3 driinterface-0-0-3-branch:1.3.0.14 mach64-0-0-7-branch:1.3.0.12 driinterface-0-0-2-branch:1.3.0.10 newmesa-0-0-1-20031209-merge:1.3 trunk-20031209:1.3 newmesa-0-0-1-20031209:1.3 newmesa-0-0-1-branch:1.3.0.8 driinterface-0-0-1-branch:1.3.0.6 savage-2-0-0-branch:1.3.0.4 savage-2-0-0-fork:1.3 cle266-0-0-1-branch:1.3.0.2 trunk-20030916:1.3 XFree86-4_3_99_12-merge:1.3 X_4_1_99_1-20010822-merge:1.1.1.4 X_4_1_99_1:1.1.1.4 X_4_1_99_1-20010822-preimport:1.1.1.4 multihead-1-0-0-20010730:1.1.1.4 multihead-1-0-0-20010730-merge:1.1.1.4 multihead-1-0-0-20010727-freeze:1.1.1.4 X_4_1_0-20010615-merge:1.1.1.4 mesa-3-5-20010621-freeze:1.1.1.3.20.1 X_4_1_0:1.1.1.4 X_4_1_0-20010614-preimport:1.1.1.4 multihead-1-0-0-branch:1.1.1.4.0.6 X_4_0_99_3-20010502-merge:1.1.1.4 X_4_0_99_3:1.1.1.4 X_4_0_99_3-20010501-preimport:1.1.1.4 bsd-2-0-0-branch:1.1.1.4.0.4 X_4_0_99_2-20010410-merge:1.1.1.4 X_4_0_99_2:1.1.1.4 X_4_0_99_2-20010409-preimport:1.1.1.4 ati-pcigart-1-0-0-20010405-merge:1.1.1.4 ati-pcigart-1-0-0-20010405:1.1.1.4 ati-pcigart-1-0-0-20010405-freeze:1.1.1.4 ati-pcigart-1-0-0-branch:1.1.1.4.0.2 mesa-3-5-20010323-freeze:1.1.1.3 X_4_0_99_1-20010321-merge:1.1.1.4 X_4_0_99_1:1.1.1.4 X_4_0_99_1-20010319-preimport:1.1.1.3 full-1-0-0-20010315-head:1.1.1.3 sarea-1-0-0-20010314-merge:1.1.1.3 sarea-1-0-0-20010314:1.1.1.3 full-1-0-0-branch:1.1.1.3 sarea-1-0-0-20010307:1.1.1.3 sarea-1-0-0-20010307-freeze:1.1.1.3 tdfx-3-1-0-20010306-merge:1.1.1.3 tdfx-3-1-0-20010306-freeze:1.1.1.3 tdfx-3-1-0-20010306:1.1.1.3 tdfx-3-1-0-20010305-merge:1.1.1.3 tdfx-3-1-0-20010305-freeze2:1.1.1.3 tdfx-3-1-0-20010305-freeze:1.1.1.3 tdfx-3-1-0-20010301-freeze:1.1.1.3 ati-pcigart-0-0-1-branch-02282001-freeze:1.1.1.3 ati-5-0-1-20010220-head:1.1.1.3 ati-5-0-1-branch:1.1.1.3.0.28 sarea-1-0-0-branch:1.1.1.3.0.26 mga-1-0-0-20010215-merge:1.1.1.3 mga-1-0-0-20010215-freeze:1.1.1.3 tdfx-3-1-0-branch:1.1.1.3.0.24 tdfx-3-0-1-branch:1.1.1.3 ati-pcigart-0-0-1-branch:1.1.1.3.0.22 mesa-3-5-branch:1.1.1.3.0.20 tdfx-3-0-0-20010109-merge:1.1.1.3 tdfx-3-0-0-20010108:1.1.1.3 ati-5-0-0-20010105-merge:1.1.1.3 ati-5-0-0-20010105:1.1.1.3 ati-5-0-0-20000104-freeze:1.1.1.3 tdfx-3-0-0-20010104-freeze:1.1.1.3 ati-5-0-0-20001223-merge:1.1.1.3 ati-5-0-0-20001223-freeze:1.1.1.3 X_4_0_2-20001221-merge:1.1.1.3 X_4_0_2:1.1.1.3 mga-1-0-0-branch:1.1.1.3.0.18 X_4_0_1h-20001207-merge:1.1.1.3 X_4_0_1h-20001205-merge:1.1.1.3 X_4_0_1h:1.1.1.3 ati-4-1-1-20001202-merge-trunk:1.1.1.3 sse-1-0-1-branch:1.1.1.3.0.16 ati-4-1-1-20001202-merge:1.1.1.1 tdfx-3-0-0-20001201:1.1.1.3 ati-4-1-1-20001201-freeze:1.1.1.1 tdfx-3-0-0-20001201-freeze:1.1.1.3 X_4_0_1g-20001130-merge:1.1.1.3 X_4_0_1g:1.1.1.3 X_4_0_1f-20001130-merge:1.1.1.3 X_4_0_1f:1.1.1.3 ati-4-1-1-20001125-freeze:1.1.1.1 mach64-0-0-1-branch:1.1.1.3.0.14 ati-5-0-0-branch:1.1.1.3.0.12 X_4_0_1e-20001107-merge:1.1.1.3 X_4_0_1e:1.1.1.3 X_4_0_1d-20001107-merge:1.1.1.3 X_4_0_1d:1.1.1.3 ppc-1-0-1-branch:1.1.1.3.0.10 radeon-1-0-0-20001017:1.1.1.1 full-0-0-2-branch:1.1.1.3.0.8 full-0-0-1-branch:1.1.1.3.0.6 ati-4-1-1-20001009-freeze:1.1.1.1 mga-readpix-0-0-1-branch:1.1.1.3.0.4 tdfx-3-0-0-branch:1.1.1.3.0.2 X_4_0_1d-pre:1.1.1.3 ati-4-1-1-20000919-stable:1.1.1.1 radeon-1-0-0-branch:1.1.1.1.0.66 ppc-1-0-0-20000912:1.1.1.1 mga-lock-debug-0-2-0-branch:1.1.1.1.0.64 sse-1-0-0-branch:1.1.1.1.0.62 mga-lock-debug-0-0-1-branch:1.1.1.1.0.60 gamma-2-0-0-branch:1.1.1.1.0.58 tdfx-2-1-20000907-merge:1.1.1.1 tdfx-2-1-20000906:1.1.1.1 tdfx-2-1-20000905-freeze:1.1.1.1 ppc-1-0-0-2000-09-01-freeze:1.1.1.1 m3-0-0-1-branch:1.1.1.1.0.56 mach64-0-0-0-branch:1.1.1.1.0.54 ati-4-1-1-branch:1.1.1.1.0.52 X_4_0_1b-20000816-merge:1.1.1.1 X_4_0_1b:1.1.1.1 ati-4-0-2-branch:1.1.1.1.0.50 ppc-1-0-0-branch:1.1.1.1.0.48 tdfx-2-1-20000711:1.1.1.1 tdfx-2-1-20000711-freeze:1.1.1.1 X_4_0_1:1.1.1.1 tdfx-2-1-branch:1.1.1.1.0.46 pre401-20000613-freeze:1.1.1.1 bsd-1-0-1-20000613-merge:1.1.1.1 bsd-1-0-1-20000613:1.1.1.1 bsd-1-0-1-20000612-freeze:1.1.1.1 tdfx-2-0-20000612-merge:1.1.1.1 ati-4-1-0-20000613-merge:1.1.1.1 ati-4-1-0-20000613:1.1.1.1 tdfx-2-0-20000608-merge:1.1.1.1 tdfx-2-0-20000608-freeze:1.1.1.1 ati-4-1-0-branch:1.1.1.1.0.44 glxmisc-3-0-0-20000608-merge:1.1.1.1 glxmisc-3-0-0-20000607:1.1.1.1 glxmisc-3-0-0-20000606-freeze:1.1.1.1 bsd-1-0-1-branch:1.1.1.1.0.42 bsd-1-0-0-20000531-merge:1.1.1.1 bsd-1-0-0-20000530-merge:1.1.1.1 bsd-1-0-0-20000530-freeze:1.1.1.1 tdfx-2-0-20000222-merge:1.1.1.1 tdfx-2-0-20000222-freeze:1.1.1.1 ati-4-0-1-20000518-merge:1.1.1.1 ati-4-0-1-20000518:1.1.1.1 video-1-0-0-branch:1.1.1.1.0.40 gamma-1-0-0-branch:1.1.1.1.0.38 mgadh-0-0-3-branch:1.1.1.1.0.36 glxmisc-3-0-0-branch:1.1.1.1.0.34 glxmisc-2-0-0-20000503-merge:1.1.1.1 bsd-1-0-0-branch:1.1.1.1.0.32 glxmisc-2-0-0-20000503:1.1.1.1 glxmisc-2-0-0-branch:1.1.1.1.0.30 tdfx-2-0-branch:1.1.1.1.0.28 tdfx-2-0-trunk:1.1.1.1 glxmisc-1-0-0-20000420-merge:1.1.1.1 glxmisc-1-0-0-20000420:1.1.1.1 ati-4-0-1-beta:1.1.1.1 glxmisc-1-0-0-branch:1.1.1.1.0.26 mga-0-0-3-branch:1.1.1.1.0.24 mga-0-0-2-20000404-merge:1.1.1.1 ati-4-0-1-alpha:1.1.1.1 ati-4-0-1-20000319-base:1.1.1.1 ati-4-0-1-branch:1.1.1.1.0.22 ati-4-0-0-20000319:1.1.1.1 X_4_0-20000315-merge:1.1.1.1 X_4_0:1.1.1.1 freeze-20000226:1.1.1.1 dispatch-0-0-3-20000225-merge:1.1.1.1 dispatch-0-0-3-20000225:1.1.1.1 mga-0-0-1-20000225-merge:1.1.1.1 mga-0-0-2-branch:1.1.1.1.0.20 smt-0-0-2-branch:1.1.1.1.0.18 smt-0-0-1-20000222-freeze:1.1.1.1 X_3_9_18-20000222-merge:1.1.1.1 X_3_9_18:1.1.1.1 smt-0-0-1-stage2c:1.1.1.1 smt-0-0-1-stage2b:1.1.1.1.0.16 dispatch-0-0-3-branch:1.1.1.1.0.14 i810-20000214-beta2:1.1.1.1 dispatch-0-0-2-20000212:1.1.1.1 dispatch-0-0-2-branch:1.1.1.1.0.12 i810-20000201-beta1:1.1.1.1 dispatch-0-0-1-20000129-merge:1.1.1.1 dispatch-0-0-1-20000128:1.1.1.1 smt-0-0-1-20000112-base:1.1.1.1 smt-0-0-1-branch:1.1.1.1.0.6 dispatch-0-0-1-branch:1.1.1.1.0.10 tdfx-1-1:1.1.1.1.0.4 X_3_9_17:1.1.1.1 ati-4-0-0-branch:1.1.1.1.0.8 mga-0-0-1-branch:1.1.1.1.0.2 X_3_9_16:1.1.1.1 XFree:1.1.1; locks; strict; comment @ * @; 1.3 date 2003.09.12.22.16.44; author alanh; state Exp; branches; next 1.2; 1.2 date 2001.08.25.03.13.04; author dawes; state dead; branches; next 1.1; 1.1 date 99.12.05.01.02.12; author daryll; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 99.12.05.01.02.12; author daryll; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2000.09.22.17.22.39; author alanh; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2000.09.23.20.55.31; author alanh; state Exp; branches 1.1.1.3.20.1; next 1.1.1.4; 1.1.1.4 date 2001.03.19.17.45.19; author dawes; state Exp; branches 1.1.1.4.4.1; next ; 1.1.1.4.4.1 date 2001.08.29.17.24.55; author alanh; state dead; branches; next ; 1.1.1.3.20.1 date 2001.03.27.20.02.56; author gareth; state Exp; branches; next ; desc @@ 1.3 log @xc/programs/Xserver/os now has a dependency on the newer lib/Xdmcp/Xdmcp.h header file due to the IPv6 changes. So we now import libXdmcp and turn this on. @ text @/* * $Xorg: Unwrap.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. * * * Author: Keith Packard, MIT X Consortium */ /* $XFree86: xc/lib/Xdmcp/Unwrap.c,v 1.4 2001/12/14 19:54:55 dawes Exp $ */ #include #include #include #include #ifdef HASXDMAUTH /* * The following function exists only to demonstrate the * desired functional interface for this routine. You will * need to add the appropriate algorithm if you wish to * use XDM-AUTHENTICATION-1/XDM-AUTHORIZATION-1. * * The interface for this routine is quite simple. All three * arguments are arrays of 8 unsigned characters, the first two * are 64 bits of useful data, the last is 56 bits of useful * data packed into 8 bytes, using the low 7 bits of each * byte, filling the high bit with odd parity. * * Examine the XDMCP specification for the correct algorithm */ #include "Wrap.h" void XdmcpUnwrap ( unsigned char *input, unsigned char *wrapper, unsigned char *output, int bytes) { int i, j, k; unsigned char tmp[8]; unsigned char blocks[2][8]; unsigned char expand_wrapper[8]; auth_wrapper_schedule schedule; _XdmcpWrapperToOddParity (wrapper, expand_wrapper); _XdmcpAuthSetup (expand_wrapper, schedule); k = 0; for (j = 0; j < bytes; j += 8) { if (bytes - j < 8) return; /* bad input length */ for (i = 0; i < 8; i++) blocks[k][i] = input[j + i]; _XdmcpAuthDoIt ((unsigned char *) (input + j), (unsigned char *) tmp, schedule, 0); /* block chaining */ k = (k == 0) ? 1 : 0; for (i = 0; i < 8; i++) { if (j == 0) output[j + i] = tmp[i]; else output[j + i] = tmp[i] ^ blocks[k][i]; } } } #endif /* HASXDMAUTH */ @ 1.2 log @- Remove the rest of the unneeded client-side libraries. - Use installed libraries that are not built here. - Don't build/install client-library related file and headers. @ text @d2 1 a2 1 * $TOG: Unwrap.c /main/10 1998/02/06 14:41:06 kaleb $ d7 5 a11 1 All Rights Reserved. d30 1 a30 1 /* $XFree86: xc/lib/Xdmcp/Unwrap.c,v 1.2 1998/10/10 15:25:16 dawes Exp $ */ @ 1.1 log @Initial revision @ text @@ 1.1.1.1 log @Import XFree 3.9.16 @ text @@ 1.1.1.2 log @Import of XFree86 4.0.1d-pre @ text @d26 1 a26 1 /* $XFree86$ */ @ 1.1.1.3 log @Import of XFree86 4.0.1d-pre (2) @ text @d26 1 a26 1 /* $XFree86: xc/lib/Xdmcp/Unwrap.c,v 1.2 1998/10/10 15:25:16 dawes Exp $ */ @ 1.1.1.3.20.1 log @Initial merge of trunk onto branch. @ text @d2 1 a2 1 * $Xorg: Unwrap.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ d26 1 a26 1 /* $XFree86: xc/lib/Xdmcp/Unwrap.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ @ 1.1.1.4 log @Import of XFree86 4.0.99.1 @ text @d2 1 a2 1 * $Xorg: Unwrap.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ d26 1 a26 1 /* $XFree86: xc/lib/Xdmcp/Unwrap.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ @ 1.1.1.4.4.1 log @merge from trunk. @ text @@