Skip to content

Commit

Permalink
remove cipher related code
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed May 22, 2023
1 parent 1d278d2 commit 7c71159
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 154 deletions.
14 changes: 1 addition & 13 deletions src/ngx_lua_resty_lmdb_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ static ngx_str_t ngx_lua_resty_lmdb_file_names[] = {
};


static ngx_cycle_t *ngx_lua_resty_lmdb_ngx_cycle;


static void *ngx_lua_resty_lmdb_create_conf(ngx_cycle_t *cycle);
static char *ngx_lua_resty_lmdb_init_conf(ngx_cycle_t *cycle, void *conf);
static ngx_int_t ngx_lua_resty_lmdb_init(ngx_cycle_t *cycle);
Expand Down Expand Up @@ -670,17 +667,11 @@ static ngx_int_t ngx_lua_resty_lmdb_init(ngx_cycle_t *cycle)
return NGX_ERROR;
}

/* save cycle in init phase for ngx_lua_resty_lmdb_cipher() */
ngx_lua_resty_lmdb_ngx_cycle = cycle;

if (ngx_lua_resty_lmdb_validate(cycle, lcf) != NGX_OK) {
ngx_lua_resty_lmdb_close_file(cycle, lcf);
return NGX_ERROR;
}

/* reset to NULL for worker processes */
ngx_lua_resty_lmdb_ngx_cycle = NULL;

if (ngx_lua_resty_lmdb_close_file(cycle, lcf) != NGX_OK) {
return NGX_ERROR;
}
Expand Down Expand Up @@ -763,16 +754,13 @@ ngx_lua_resty_lmdb_cipher(const MDB_val *src, MDB_val *dst,
const MDB_val *key, int encdec)
{
ngx_lua_resty_lmdb_conf_t *lcf;
volatile ngx_cycle_t *cycle;

u_char iv[12];
int ivl, outl, rc;
mdb_size_t *ptr;
EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();

cycle = ngx_lua_resty_lmdb_ngx_cycle ? ngx_lua_resty_lmdb_ngx_cycle : ngx_cycle;

lcf = (ngx_lua_resty_lmdb_conf_t *) ngx_get_conf(cycle->conf_ctx,
lcf = (ngx_lua_resty_lmdb_conf_t *) ngx_get_conf(ngx_cycle->conf_ctx,
ngx_lua_resty_lmdb_module);

ngx_lua_resty_lmdb_assert(lcf->cipher != NULL);
Expand Down
141 changes: 0 additions & 141 deletions t/10-validation-tag-cipher.t

This file was deleted.

0 comments on commit 7c71159

Please sign in to comment.