summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/openssl.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/openssl.c b/src/openssl.c
index 7985b1f..757bbf0 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -857,8 +857,6 @@ static int pk_new(lua_State *L) {
857 }; 857 };
858 unsigned i; 858 unsigned i;
859 859
860 type = OBJ_sn2nid(id);
861
862 if (NID_undef == (type = EVP_PKEY_type(OBJ_sn2nid(id)))) { 860 if (NID_undef == (type = EVP_PKEY_type(OBJ_sn2nid(id)))) {
863 for (i = 0; i < countof(types); i++) { 861 for (i = 0; i < countof(types); i++) {
864 if (strieq(id, types[i].sn)) { 862 if (strieq(id, types[i].sn)) {
@@ -1589,13 +1587,6 @@ static int gn_interpose(lua_State *L) {
1589} /* gn_interpose() */ 1587} /* gn_interpose() */
1590 1588
1591 1589
1592static int gn_setCritical(lua_State *L) {
1593 GENERAL_NAMES *gens = checksimple(L, 1, X509_GENS_CLASS);
1594
1595 return 0;
1596} /* gn_setCritical() */
1597
1598
1599static int gn_checktype(lua_State *L, int index) { 1590static int gn_checktype(lua_State *L, int index) {
1600 static const struct { int type; const char *name; } table[] = { 1591 static const struct { int type; const char *name; } table[] = {
1601 { GEN_EMAIL, "RFC822Name" }, 1592 { GEN_EMAIL, "RFC822Name" },
@@ -1701,7 +1692,7 @@ static int gn__next(lua_State *L) {
1701 1692
1702 while (i < n) { 1693 while (i < n) {
1703 GENERAL_NAME *name; 1694 GENERAL_NAME *name;
1704 const char *tag, *txt; 1695 const char *txt;
1705 size_t len; 1696 size_t len;
1706 union { struct in_addr in; struct in6_addr in6; } ip; 1697 union { struct in_addr in; struct in6_addr in6; } ip;
1707 char buf[INET6_ADDRSTRLEN + 1]; 1698 char buf[INET6_ADDRSTRLEN + 1];
@@ -1727,7 +1718,6 @@ static int gn__next(lua_State *L) {
1727 1718
1728 break; 1719 break;
1729 case GEN_IPADD: 1720 case GEN_IPADD:
1730 tag = "IP";
1731 txt = (char *)M_ASN1_STRING_data(name->d.iPAddress); 1721 txt = (char *)M_ASN1_STRING_data(name->d.iPAddress);
1732 len = M_ASN1_STRING_length(name->d.iPAddress); 1722 len = M_ASN1_STRING_length(name->d.iPAddress);
1733 1723
@@ -4234,7 +4224,7 @@ static void md_update_(lua_State *L, EVP_MD_CTX *ctx, int from, int to) {
4234 4224
4235static int md_update(lua_State *L) { 4225static int md_update(lua_State *L) {
4236 EVP_MD_CTX *ctx = luaL_checkudata(L, 1, DIGEST_CLASS); 4226 EVP_MD_CTX *ctx = luaL_checkudata(L, 1, DIGEST_CLASS);
4237 int i, top = lua_gettop(L); 4227 int i;
4238 4228
4239 md_update_(L, ctx, 2, lua_gettop(L)); 4229 md_update_(L, ctx, 2, lua_gettop(L));
4240 4230