403Webshell
Server IP : 62.60.133.156  /  Your IP : 216.73.217.51
Web Server : LiteSpeed
System : Linux linux24.centraldnserver.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User : mimradmin ( 1166)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : OFF
Directory :  /proc/self/root/opt/imunify360-webshield/lualib/resty/openssl/include/evp/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /proc/self/root/opt/imunify360-webshield/lualib/resty/openssl/include/evp/md.lua
local ffi = require "ffi"

require "resty.openssl.include.ossl_typ"
local OPENSSL_3X = require("resty.openssl.version").OPENSSL_3X

ffi.cdef [[
  int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type,
  ENGINE *impl);
  int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d,
                                  size_t cnt);
  int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md,
                                  unsigned int *s);
  const EVP_MD *EVP_get_digestbyname(const char *name);
  int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d,
                                size_t cnt);
  int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md,
                                unsigned int *s);

  const EVP_MD *EVP_md_null(void);

  EVP_MD_CTX *EVP_MD_CTX_new(void);
  void EVP_MD_CTX_free(EVP_MD_CTX *ctx);

  typedef void* fake_openssl_md_list_fn(const EVP_MD *ciph, const char *from,
                                        const char *to, void *x);
  void EVP_MD_do_all_sorted(fake_openssl_md_list_fn*, void *arg);

  const EVP_MD *EVP_get_digestbyname(const char *name);
]]

if OPENSSL_3X then
  require "resty.openssl.include.provider"

  ffi.cdef [[
    int EVP_MD_get_size(const EVP_MD *md);
    int EVP_MD_get_type(const EVP_MD *md);
    const OSSL_PROVIDER *EVP_MD_get0_provider(const EVP_MD *md);

    EVP_MD *EVP_MD_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
                          const char *properties);

    typedef void* fake_openssl_md_provided_list_fn(EVP_MD *md, void *arg);
    void EVP_MD_do_all_provided(OSSL_LIB_CTX *libctx,
                                fake_openssl_md_provided_list_fn*,
                                void *arg);
    // int EVP_MD_up_ref(EVP_MD *md);
    void EVP_MD_free(EVP_MD *md);

    const char *EVP_MD_get0_name(const EVP_MD *md);

    int EVP_MD_CTX_set_params(EVP_MD_CTX *ctx, const OSSL_PARAM params[]);
    const OSSL_PARAM *EVP_MD_CTX_settable_params(EVP_MD_CTX *ctx);
    int EVP_MD_CTX_get_params(EVP_MD_CTX *ctx, OSSL_PARAM params[]);
    const OSSL_PARAM *EVP_MD_CTX_gettable_params(EVP_MD_CTX *ctx);
  ]]
else
  ffi.cdef [[
    int EVP_MD_size(const EVP_MD *md);
    int EVP_MD_type(const EVP_MD *md);
  ]]
end

Youez - 2016 - github.com/yon3zu