@@ -158,7 +158,8 @@ if subsystem == 'http' then
158158 ngx_lua_ffi_ssl_export_keying_material_early =
159159 C .ngx_http_lua_ffi_ssl_export_keying_material_early
160160 ngx_lua_ffi_get_req_ssl_pointer = C .ngx_http_lua_ffi_get_req_ssl_pointer
161- ngx_lua_ffi_req_shared_ssl_ciphers = C .ngx_http_lua_ffi_req_shared_ssl_ciphers
161+ ngx_lua_ffi_req_shared_ssl_ciphers =
162+ C .ngx_http_lua_ffi_req_shared_ssl_ciphers
162163
163164elseif subsystem == ' stream' then
164165 ffi .cdef [[
571572 end ,
572573 __tostring = function (ciphers )
573574 for n , c in ipairs (ciphers ) do
574- ciphers_t [n ] = type (c ) == " table" and c .iana_name or format (" 0x%.4x" , c )
575+ ciphers_t [n ] = type (c ) == " table" and c .iana_name or
576+ format (" 0x%.4x" , c )
575577 end
576578 return concat (ciphers_t , " :" , 1 , ciphers .nciphers )
577579 end
588590 end
589591
590592 ciphers_buf [0 ] = 255 -- Set max number of ciphers we can hold
591- local rc = ngx_lua_ffi_req_shared_ssl_ciphers (r , ciphers_buf + 1 , ciphers_buf , errmsg )
593+ local rc = ngx_lua_ffi_req_shared_ssl_ciphers (r , ciphers_buf + 1 ,
594+ ciphers_buf , errmsg )
592595 if rc ~= FFI_OK then
593596 return nil , ffi_str (errmsg [0 ])
594597 end
608611
609612 -- Create the cipher structure
610613 local ciphers = ciphers_typ (filtered_count )
611- ffi_copy (ciphers , filtered_buf , (filtered_count + 1 ) * ffi_sizeof (' uint16_t' ))
614+ ffi_copy (ciphers , filtered_buf ,
615+ (filtered_count + 1 ) * ffi_sizeof (' uint16_t' ))
612616
613617 return ciphers
614618 end
@@ -628,6 +632,7 @@ function _M.clear_certs()
628632 return nil , ffi_str (errmsg [0 ])
629633end
630634
635+
631636function _M .set_der_cert (data )
632637 local r = get_request ()
633638 if not r then
0 commit comments