1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 #pragma ident "%Z%%M% %I% %E% SMI" 23 24 /* 25 * %M%, Protocol for DES style authentication for RPC 26 * 27 * Copyright (C) 1986, Sun Microsystems, Inc. 28 */ 29 30 #ifndef _rpc_auth_des_h 31 #define _rpc_auth_des_h 32 33 /* 34 * There are two kinds of "names": fullnames and nicknames 35 */ 36 enum authdes_namekind { 37 ADN_FULLNAME, 38 ADN_NICKNAME 39 }; 40 41 /* 42 * A fullname contains the network name of the client, 43 * a conversation key and the window 44 */ 45 struct authdes_fullname { 46 char *name; /* network name of client, up to MAXNETNAMELEN */ 47 des_block key; /* conversation key */ 48 u_long window; /* associated window */ 49 }; 50 51 52 /* 53 * A credential 54 */ 55 struct authdes_cred { 56 enum authdes_namekind adc_namekind; 57 struct authdes_fullname adc_fullname; 58 u_long adc_nickname; 59 }; 60 61 62 63 /* 64 * A des authentication verifier 65 */ 66 struct authdes_verf { 67 union { 68 struct timeval adv_ctime; /* clear time */ 69 des_block adv_xtime; /* crypt time */ 70 } adv_time_u; 71 u_long adv_int_u; 72 }; 73 74 /* 75 * des authentication verifier: client variety 76 * 77 * adv_timestamp is the current time. 78 * adv_winverf is the credential window + 1. 79 * Both are encrypted using the conversation key. 80 */ 81 #define adv_timestamp adv_time_u.adv_ctime 82 #define adv_xtimestamp adv_time_u.adv_xtime 83 #define adv_winverf adv_int_u 84 85 /* 86 * des authentication verifier: server variety 87 * 88 * adv_timeverf is the client's timestamp + client's window 89 * adv_nickname is the server's nickname for the client. 90 * adv_timeverf is encrypted using the conversation key. 91 */ 92 #define adv_timeverf adv_time_u.adv_ctime 93 #define adv_xtimeverf adv_time_u.adv_xtime 94 #define adv_nickname adv_int_u 95 96 #endif /*!_rpc_auth_des_h*/ 97