/** * A client-side 802.1x implementation supporting EAP/TLS * * This code is released under both the GPL version 2 and BSD licenses. * Either license may be used. The respective licenses are found below. * * Copyright (C) 2002 Bryan D. Payne & Nick L. Petroni Jr. * All Rights Reserved * * --- GPL Version 2 License --- * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * --- BSD License --- * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * Maryland at College Park and its contributors. * - Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /******************************************************************* * The driver function for a Linux application layer EAPOL * implementation * File: userconf.h * * Authors: Chris.Hessing@utah.edu, Terry.Simons@utah.edu * * $Id: userconf.h,v 1.5 2003/03/04 06:10:08 npetroni Exp $ * $Date: 2003/03/04 06:10:08 $ *******************************************************************/ #ifndef USERCONF_H_ #define USERCONF_H_ struct userconf { char *username; //The username we are authenticating. char *password; //If there is one for the type of auth we are using. char *root_cert; //The filename of the root cert. char *client_cert; //The filename of the client cert. char *key_file; //The filename that holds the client cert. key. char *auth; //The same as the :auth type in the config file. char *preferred_auth; //The type of auth we want to do. char *client_type; // This this a wired or wireless connection? int chunk_size; // The size of the TLS chunks to send. char *random_file; // The file to get random data out of. char *first_auth; // command to run after first authentication char *after_auth; // command to run after all subsequent authentications }; void initalize_user_conf(); // Set up the user configuration structure. void clean_user_conf(); // Free everything, call this on quit. char *get_username(); //Return the username void set_username(char *); // Set the username; char *get_password(); //Get the password void set_password(char *); // Set the password; char *get_root_cert(); //Get the path to the root cert. void set_root_cert(char *); //Set the path to the root cert. char *get_client_cert(); void set_client_cert(char *); char *get_key_file(); void set_key_file(char *); char *get_auth(); void set_auth(char *); char *get_preferred_auth(); void set_preferred_auth(char *); char *get_client_type(); void set_client_type(char *); int get_chunk_size(); void set_chunk_size(int); char *get_random_file(); void set_random_file(char *); char *get_first_auth(); void set_first_auth(char *); char *get_after_auth(); void set_after_auth(char *); void print_userconf(); // dump userconf (except passwd) #endif