context: Clean up some warnings

Sun, 03 Jul 2011 13:13:36 -0700

author
Paul Aurich <paul@darkrain42.org>
date
Sun, 03 Jul 2011 13:13:36 -0700
changeset 43
708d39695790
parent 42
b6271d3bae0b
child 44
b3a0d23e5b20

context: Clean up some warnings

src/context.c file | annotate | diff | comparison | revisions
--- a/src/context.c	Sun Jul 03 13:13:36 2011 -0700
+++ b/src/context.c	Sun Jul 03 13:13:36 2011 -0700
@@ -138,7 +138,7 @@
 /**
  * Find the protocol.
  */
-static SSL_METHOD* str2method(const char *method)
+static const SSL_METHOD* str2method(const char *method)
 {
   if (!strcmp(method, "sslv3"))  return SSLv3_method();
   if (!strcmp(method, "tlsv1"))  return TLSv1_method();
@@ -231,7 +231,7 @@
 static int create(lua_State *L)
 {
   p_context ctx;
-  SSL_METHOD *method;
+  const SSL_METHOD *method;
 
   if (luasec_sslctx_idx == -1) {
     luasec_sslctx_idx = SSL_CTX_get_ex_new_index(0, "luasec sslctx context", NULL, NULL, NULL);
@@ -493,7 +493,6 @@
 {
   int i;
   int flag = 0, vflag = 0;
-  int ignore_errors = 0;
   p_context ctx = checkctx(L, 1);
   int max = lua_gettop(L);
   /* any flag? */
@@ -503,7 +502,6 @@
       const char *s = luaL_checkstring(L, i);
       if (!strcmp(s, "continue")) {
         ctx->verify_flags |= LUASEC_VERIFY_FLAGS_ALWAYS_CONTINUE;
-        ignore_errors = 1;
       } else if (!strcmp(s, "ignore_purpose")) {
         ctx->verify_flags |= LUASEC_VERIFY_FLAGS_IGNORE_PURPOSE;
       } else if (!strcmp(s, "crl_check")) {

mercurial