Merge pull request #299 from nmav/ocserv-match
[project/luci.git] / applications / luci-app-ocserv / luasrc / model / cbi / ocserv / main.lua
index c4289f0..23f6f5c 100644 (file)
@@ -1,15 +1,5 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2014 Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-]]--
+-- Copyright 2014 Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
+-- Licensed to the public under the Apache License 2.0.
 
 local fs = require "nixio.fs"
 local has_ipv6 = fs.access("/proc/net/ipv6_route")
@@ -52,7 +42,7 @@ if fd then local ln
                        found_pki = true
                elseif found_pki then
                        local hash = ln:match("([a-f0-9]+)")
-                       o_pki.default = hash and hash:upper()
+                       o_pki.default = hash and "sha1:" .. hash:upper()
                        complete = complete + 1
                        found_pki = false
                end