Revert changes relative to lib/*.[ch] recent renaming
[platform/upstream/curl.git] / lib / axtls.c
similarity index 92%
rename from lib/curl_axtls.c
rename to lib/axtls.c
index 8bd606a..19ed730 100644 (file)
@@ -5,8 +5,8 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2010, DirecTV * contact: Eric Hu <ehu@directv.com>
- * Copyright (C) 2010 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2010, DirecTV
+ * contact: Eric Hu <ehu@directv.com>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 
 /*
  * Source file for all axTLS-specific code for the TLS/SSL layer. No code
- * but curl_sslgen.c should ever call or use these functions.
+ * but sslgen.c should ever call or use these functions.
  */
 
-#include "curl_setup.h"
+#include "setup.h"
 
 #ifdef USE_AXTLS
 #include <axTLS/ssl.h>
-#include "curl_axtls.h"
-
-#include "curl_sendf.h"
-#include "curl_inet_pton.h"
-#include "curl_sslgen.h"
-#include "curl_parsedate.h"
-#include "curl_connect.h" /* for the connect timeout */
-#include "curl_select.h"
+#include "axtls.h"
+
+#include "sendf.h"
+#include "inet_pton.h"
+#include "sslgen.h"
+#include "parsedate.h"
+#include "connect.h" /* for the connect timeout */
+#include "select.h"
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 #include "curl_memory.h"
 /* The last #include file should be: */
-#include "curl_memdebug.h"
-#include "curl_hostcheck.h"
+#include "memdebug.h"
+#include "hostcheck.h"
 
 
 /* SSL_read is opied from axTLS compat layer */
@@ -65,14 +65,14 @@ static int SSL_read(SSL *ssl, void *buf, int num)
 int Curl_axtls_init(void)
 {
 /* axTLS has no global init.  Everything is done through SSL and SSL_CTX
- * structs stored in connectdata structure.  Perhaps can move to curl_axtls.h.
+ * structs stored in connectdata structure.  Perhaps can move to axtls.h.
  */
   return 1;
 }
 
 int Curl_axtls_cleanup(void)
 {
-  /* axTLS has no global cleanup.  Perhaps can move this to curl_axtls.h. */
+  /* axTLS has no global cleanup.  Perhaps can move this to axtls.h. */
   return 1;
 }
 
@@ -199,7 +199,7 @@ Curl_axtls_connect(struct connectdata *conn,
       infof(data, "found certificates in %s\n", data->set.ssl.CAfile);
   }
 
-  /* curl_gtls.c tasks we're skipping for now:
+  /* gtls.c tasks we're skipping for now:
    * 1) certificate revocation list checking
    * 2) dns name assignment to host
    * 3) set protocol priority.  axTLS is TLSv1 only, so can probably ignore
@@ -255,7 +255,7 @@ Curl_axtls_connect(struct connectdata *conn,
     }
   }
 
-  /* curl_gtls.c does more here that is being left out for now
+  /* gtls.c does more here that is being left out for now
    * 1) set session credentials.  can probably ignore since axtls puts this
    *    info in the ssl_ctx struct
    * 2) setting up callbacks.  these seem gnutls specific
@@ -280,7 +280,7 @@ Curl_axtls_connect(struct connectdata *conn,
   }
   infof (data, "handshake completed successfully\n");
 
-  /* Here, curl_gtls.c gets the peer certificates and fails out depending on
+  /* Here, gtls.c gets the peer certificates and fails out depending on
    * settings in "data."  axTLS api doesn't have get cert chain fcn, so omit?
    */
 
@@ -295,10 +295,10 @@ Curl_axtls_connect(struct connectdata *conn,
   else
     infof(data, "\t server certificate verification SKIPPED\n");
 
-  /* Here, curl_gtls.c does issuer verification. axTLS has no straightforward
+  /* Here, gtls.c does issuer verification. axTLS has no straightforward
    * equivalent, so omitting for now.*/
 
-  /* Here, curl_gtls.c does the following
+  /* Here, gtls.c does the following
    * 1) x509 hostname checking per RFC2818.  axTLS doesn't support this, but
    *    it seems useful. This is now implemented, by Oscar Koeroo
    * 2) checks cert validity based on time.  axTLS does this in ssl_verify_cert
@@ -408,10 +408,10 @@ void Curl_axtls_close(struct connectdata *conn, int sockindex)
 
   infof(conn->data, "  Curl_axtls_close\n");
   if(connssl->ssl) {
-    /* line from curl_ssluse.c: (void)SSL_shutdown(connssl->ssl);
+    /* line from ssluse.c: (void)SSL_shutdown(connssl->ssl);
        axTLS compat layer does nothing for SSL_shutdown */
 
-    /* The following line is from curl_ssluse.c.  There seems to be no axTLS
+    /* The following line is from ssluse.c.  There seems to be no axTLS
        equivalent.  ssl_free and ssl_ctx_free close things.
        SSL_set_connect_state(connssl->handle); */
 
@@ -430,9 +430,8 @@ void Curl_axtls_close(struct connectdata *conn, int sockindex)
  */
 int Curl_axtls_shutdown(struct connectdata *conn, int sockindex)
 {
-  /* Outline taken from curl_ssluse.c since functions are in axTLS compat
-     layer.  axTLS's error set is much smaller, so a lot of error-handling
-     was removed.
+  /* Outline taken from ssluse.c since functions are in axTLS compat layer.
+     axTLS's error set is much smaller, so a lot of error-handling was removed.
    */
   int retval = 0;
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
@@ -522,8 +521,7 @@ static ssize_t axtls_recv(struct connectdata *conn, /* connection data */
  */
 int Curl_axtls_check_cxn(struct connectdata *conn)
 {
-  /* curl_ssluse.c line:
-     rc = SSL_peek(conn->ssl[FIRSTSOCKET].ssl, (void*)&buf, 1);
+  /* ssluse.c line: rc = SSL_peek(conn->ssl[FIRSTSOCKET].ssl, (void*)&buf, 1);
      axTLS compat layer always returns the last argument, so connection is
      always alive? */
 
@@ -535,8 +533,8 @@ void Curl_axtls_session_free(void *ptr)
 {
   (void)ptr;
   /* free the ID */
-  /* both curl_ssluse.c and curl_gtls.c do something here, but axTLS's
-     OpenSSL compatibility layer does nothing, so we do nothing too. */
+  /* both ssluse.c and gtls.c do something here, but axTLS's OpenSSL
+     compatibility layer does nothing, so we do nothing too. */
 }
 
 size_t Curl_axtls_version(char *buffer, size_t size)