Skip to content
Permalink
Browse files

chore(*) replace tabs with spaces

  • Loading branch information
fffonion committed Mar 5, 2020
1 parent 87bf557 commit e49f7325557a7261604417ab885e5156732e7167
Showing with 6 additions and 6 deletions.
  1. +3 −3 lib/resty/openssl/asn1.lua
  2. +3 −3 lib/resty/openssl/pkey.lua
@@ -7,16 +7,16 @@ local asn1_macro = require("resty.openssl.include.asn1")

-- https://github.com/wahern/luaossl/blob/master/src/openssl.c
local function isleap(year)
return (year % 4) == 0 and ((year % 100) > 0 or (year % 400) == 0)
return (year % 4) == 0 and ((year % 100) > 0 or (year % 400) == 0)
end

local past = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }
local function yday(year, mon, mday)
local d = past[mon] + mday - 1
local d = past[mon] + mday - 1
if mon > 2 and isleap(year) then
d = d + 1
end
return d
return d
end

local function leaps(year)
@@ -77,9 +77,9 @@ local function generate_key(config)
C.EC_KEY_set_group(key, group)
code = C.EC_KEY_generate_key(key)
if code == 0 then
C.EC_KEY_free(key)
return nil, "EC_KEY_generate_key() failed"
end
C.EC_KEY_free(key)
return nil, "EC_KEY_generate_key() failed"
end
else
return nil, "unsupported type " .. type
end

0 comments on commit e49f732

Please sign in to comment.
You can’t perform that action at this time.