diff --git a/apisix/schema_def.lua b/apisix/schema_def.lua index cec1c53b3438..5545ccc5d095 100644 --- a/apisix/schema_def.lua +++ b/apisix/schema_def.lua @@ -784,10 +784,6 @@ _M.ssl = { }, required = {"ca"}, }, - exptime = { - type = "integer", - minimum = 1588262400, -- 2020/5/1 0:0:0 - }, labels = labels_def, status = { description = "ssl status, 1 to enable, 0 to disable", @@ -804,8 +800,6 @@ _M.ssl = { enum = {"TLSv1.1", "TLSv1.2", "TLSv1.3"} }, }, - validity_end = timestamp_def, - validity_start = timestamp_def, create_time = timestamp_def, update_time = timestamp_def }, diff --git a/t/admin/ssl.t b/t/admin/ssl.t index 6b259b25ee4d..b03eb494f854 100644 --- a/t/admin/ssl.t +++ b/t/admin/ssl.t @@ -268,45 +268,7 @@ passed -=== TEST 9: store exptime ---- config - location /t { - content_by_lua_block { - local core = require("apisix.core") - local t = require("lib.test_admin") - - local ssl_cert = t.read_file("t/certs/apisix.crt") - local ssl_key = t.read_file("t/certs/apisix.key") - local data = { - cert = ssl_cert, key = ssl_key, - sni = "bar.com", - exptime = 1588262400 + 60 * 60 * 24 * 365, - } - - local code, body = t.test('/apisix/admin/ssls/1', - ngx.HTTP_PUT, - core.json.encode(data), - [[{ - "value": { - "sni": "bar.com", - "exptime": 1619798400 - }, - "key": "/apisix/ssls/1" - }]] - ) - - ngx.status = code - ngx.say(body) - } - } ---- request -GET /t ---- response_body -passed - - - -=== TEST 10: string id +=== TEST 9: string id --- config location /t { content_by_lua_block { @@ -334,7 +296,7 @@ passed -=== TEST 11: string id(delete) +=== TEST 10: string id(delete) --- config location /t { content_by_lua_block { @@ -361,7 +323,7 @@ passed -=== TEST 12: invalid id +=== TEST 11: invalid id --- config location /t { content_by_lua_block { @@ -388,7 +350,7 @@ GET /t -=== TEST 13: set ssl with multicerts(id: 1) +=== TEST 12: set ssl with multicerts(id: 1) --- config location /t { content_by_lua_block { @@ -429,7 +391,7 @@ passed -=== TEST 14: mismatched certs and keys +=== TEST 13: mismatched certs and keys --- config location /t { content_by_lua_block { @@ -467,7 +429,7 @@ GET /t -=== TEST 15: set ssl(with labels) +=== TEST 14: set ssl(with labels) --- config location /t { content_by_lua_block { @@ -505,7 +467,7 @@ passed -=== TEST 16: invalid format of label value: set ssl +=== TEST 15: invalid format of label value: set ssl --- config location /t { content_by_lua_block { @@ -542,7 +504,7 @@ GET /t -=== TEST 17: create ssl with manage fields(id: 1) +=== TEST 16: create ssl with manage fields(id: 1) --- config location /t { content_by_lua_block { @@ -554,9 +516,7 @@ GET /t local data = { cert = ssl_cert, key = ssl_key, - sni = "test.com", - validity_start = 1602873670, - validity_end = 1603893670 + sni = "test.com" } local code, body = t.test('/apisix/admin/ssls/1', @@ -564,9 +524,7 @@ GET /t core.json.encode(data), [[{ "value": { - "sni": "test.com", - "validity_start": 1602873670, - "validity_end": 1603893670 + "sni": "test.com" }, "key": "/apisix/ssls/1" }]] @@ -583,7 +541,7 @@ passed -=== TEST 18: delete test ssl(id: 1) +=== TEST 17: delete test ssl(id: 1) --- config location /t { content_by_lua_block { @@ -599,7 +557,7 @@ GET /t -=== TEST 19: create/patch ssl +=== TEST 18: create/patch ssl --- config location /t { content_by_lua_block { @@ -664,7 +622,7 @@ passed -=== TEST 20: missing sni information +=== TEST 19: missing sni information --- config location /t { content_by_lua_block { @@ -695,7 +653,7 @@ GET /t -=== TEST 21: type client, missing sni information +=== TEST 20: type client, missing sni information --- config location /t { content_by_lua_block {