view src/core/ngx_crypt.h @ 8081:9aedab0f0dff quic

QUIC: check that the packet length is of at least sample size. From quic-tls draft, section 5.4.2: An endpoint MUST discard packets that are not long enough to contain a complete sample. The check includes the Packet Number field assumed to be 4 bytes long.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 08 Sep 2020 13:28:56 +0300
parents d620f497c50f
children
line wrap: on
line source


/*
 * Copyright (C) Igor Sysoev
 * Copyright (C) Nginx, Inc.
 */


#ifndef _NGX_CRYPT_H_INCLUDED_
#define _NGX_CRYPT_H_INCLUDED_


#include <ngx_config.h>
#include <ngx_core.h>


ngx_int_t ngx_crypt(ngx_pool_t *pool, u_char *key, u_char *salt,
    u_char **encrypted);


#endif /* _NGX_CRYPT_H_INCLUDED_ */