From 460fb120977e367853afc505a5f699ee0f0ac5a4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 26 Aug 2013 11:51:18 +0200 Subject: security.h: rename to curl_sec.h to avoid name collision I brought back security.h in commit bb5529331334e. As we actually already found out back in 2005 in commit 62970da675249, the file name security.h causes problems so I renamed it curl_sec.h instead. --- lib/Makefile.inc | 2 +- lib/curl_sec.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ lib/ftp.c | 2 +- lib/krb5.c | 4 ++-- lib/security.c | 2 +- lib/security.h | 51 --------------------------------------------------- 6 files changed, 56 insertions(+), 56 deletions(-) create mode 100644 lib/curl_sec.h delete mode 100644 lib/security.h (limited to 'lib') diff --git a/lib/Makefile.inc b/lib/Makefile.inc index e28efc1ab..cb1030858 100644 --- a/lib/Makefile.inc +++ b/lib/Makefile.inc @@ -31,7 +31,7 @@ CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c \ HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \ progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h \ if2ip.h speedcheck.h urldata.h curl_ldap.h ssluse.h escape.h telnet.h \ - getinfo.h strequal.h security.h memdebug.h http_chunks.h \ + getinfo.h strequal.h curl_sec.h memdebug.h http_chunks.h \ curl_fnmatch.h wildcard.h fileinfo.h ftplistparser.h strtok.h \ connect.h llist.h hash.h content_encoding.h share.h curl_md4.h \ curl_md5.h http_digest.h http_negotiate.h inet_pton.h amigaos.h \ diff --git a/lib/curl_sec.h b/lib/curl_sec.h new file mode 100644 index 000000000..82151e9c7 --- /dev/null +++ b/lib/curl_sec.h @@ -0,0 +1,51 @@ +#ifndef HEADER_CURL_SECURITY_H +#define HEADER_CURL_SECURITY_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at http://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +struct Curl_sec_client_mech { + const char *name; + size_t size; + int (*init)(void *); + int (*auth)(void *, struct connectdata *); + void (*end)(void *); + int (*check_prot)(void *, int); + int (*overhead)(void *, int, int); + int (*encode)(void *, const void*, int, int, void**, struct connectdata *); + int (*decode)(void *, void*, int, int, struct connectdata *); +}; + +#define AUTH_OK 0 +#define AUTH_CONTINUE 1 +#define AUTH_ERROR 2 + +#ifdef HAVE_GSSAPI +int Curl_sec_read_msg (struct connectdata *conn, char *, + enum protection_level); +void Curl_sec_end (struct connectdata *); +CURLcode Curl_sec_login (struct connectdata *); +int Curl_sec_request_prot (struct connectdata *conn, const char *level); + +extern struct Curl_sec_client_mech Curl_krb5_client_mech; +#endif + +#endif /* HEADER_CURL_SECURITY_H */ diff --git a/lib/ftp.c b/lib/ftp.c index 7c7613dce..51ea99948 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -59,7 +59,7 @@ #include "ftp.h" #include "fileinfo.h" #include "ftplistparser.h" -#include "security.h" +#include "curl_sec.h" #include "strtoofft.h" #include "strequal.h" #include "sslgen.h" diff --git a/lib/krb5.c b/lib/krb5.c index cb77e12ce..1643f11a6 100644 --- a/lib/krb5.c +++ b/lib/krb5.c @@ -1,6 +1,6 @@ /* GSSAPI/krb5 support for FTP - loosely based on old krb4.c * - * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan + * Copyright (c) 1995, 1996, 1997, 1998, 1999, 2013 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * Copyright (c) 2004 - 2012 Daniel Stenberg * All rights reserved. @@ -51,7 +51,7 @@ #include "ftp.h" #include "curl_gssapi.h" #include "sendf.h" -#include "security.h" +#include "curl_sec.h" #include "curl_memory.h" #include "warnless.h" diff --git a/lib/security.c b/lib/security.c index 7d6eadc3e..508c7b41e 100644 --- a/lib/security.c +++ b/lib/security.c @@ -57,7 +57,7 @@ #include "urldata.h" #include "curl_base64.h" #include "curl_memory.h" -#include "security.h" +#include "curl_sec.h" #include "ftp.h" #include "sendf.h" #include "rawstr.h" diff --git a/lib/security.h b/lib/security.h deleted file mode 100644 index 82151e9c7..000000000 --- a/lib/security.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef HEADER_CURL_SECURITY_H -#define HEADER_CURL_SECURITY_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -struct Curl_sec_client_mech { - const char *name; - size_t size; - int (*init)(void *); - int (*auth)(void *, struct connectdata *); - void (*end)(void *); - int (*check_prot)(void *, int); - int (*overhead)(void *, int, int); - int (*encode)(void *, const void*, int, int, void**, struct connectdata *); - int (*decode)(void *, void*, int, int, struct connectdata *); -}; - -#define AUTH_OK 0 -#define AUTH_CONTINUE 1 -#define AUTH_ERROR 2 - -#ifdef HAVE_GSSAPI -int Curl_sec_read_msg (struct connectdata *conn, char *, - enum protection_level); -void Curl_sec_end (struct connectdata *); -CURLcode Curl_sec_login (struct connectdata *); -int Curl_sec_request_prot (struct connectdata *conn, const char *level); - -extern struct Curl_sec_client_mech Curl_krb5_client_mech; -#endif - -#endif /* HEADER_CURL_SECURITY_H */ -- cgit v1.2.3