mirror of
https://github.com/brunoos/luasec.git
synced 2025-07-27 11:20:14 +02:00
Check if PSK is available
This commit is contained in:
@ -4,6 +4,11 @@
|
|||||||
local socket = require("socket")
|
local socket = require("socket")
|
||||||
local ssl = require("ssl")
|
local ssl = require("ssl")
|
||||||
|
|
||||||
|
if not ssl.config.capabilities.psk then
|
||||||
|
print("[ERRO] PSK not available")
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
|
||||||
-- @param hint (nil | string)
|
-- @param hint (nil | string)
|
||||||
-- @param max_identity_len (number)
|
-- @param max_identity_len (number)
|
||||||
-- @param max_psk_len (number)
|
-- @param max_psk_len (number)
|
||||||
|
@ -4,6 +4,11 @@
|
|||||||
local socket = require("socket")
|
local socket = require("socket")
|
||||||
local ssl = require("ssl")
|
local ssl = require("ssl")
|
||||||
|
|
||||||
|
if not ssl.config.capabilities.psk then
|
||||||
|
print("[ERRO] PSK not available")
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
|
||||||
-- @param identity (string)
|
-- @param identity (string)
|
||||||
-- @param max_psk_len (number)
|
-- @param max_psk_len (number)
|
||||||
-- @return psk (string)
|
-- @return psk (string)
|
||||||
|
Reference in New Issue
Block a user