📄 userconf.h
字号:
/**************************************************************************/
/* WIRE1x Version 1.0: A client-side 802.1x implementation */
/* based on xsupplicant of Open1x for Windows XP, 2000, 98, and Me */
/* */
/* 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) 2004, WIRE Lab, National Tsing Hua Univ., Hsinchu, Taiwan*/
/* All Rights Reserved */
/**************************************************************************/
/** * 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. */#ifndef USERCONF_H_
#define USERCONF_H_
struct userconf {
char *username; //The username we are authenticating.
char user_persist; // Should this be a persistant setting?
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 *root_dir; //The directory containing roots for chaining
char *crl_dir; //The directory containing CRLs
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
char *phase2auth; // Phase 2 type to use for PEAP/TTLS.
};
void initalize_user_conf(); // Set up the user configuration structure.
void clear_user_settings(); // Erase everything, but the root pointer.
void clean_user_conf(); // Free everything, call this on quit.
char *get_username(); //Return the username
void set_username(char *, 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_root_dir(); //Get the path to the directory of trusted roots
void set_root_dir(char *); //Set the path to the trusted root directory
char *get_crl_dir(); //Get the path to the directory of CRLs
void set_crl_dir(char *); //Set the path to the CRLs directory
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 *);
char *get_phase2auth();
void set_phase2auth(char *);
void print_userconf(); // dump userconf (except passwd)#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -