[nginx] SSL: renamed session ticket key type.

Sergey Kandaurov pluknet at nginx.com
Thu Oct 13 10:57:16 UTC 2022


details:   https://hg.nginx.org/nginx/rev/4eeb53743d25
branches:  
changeset: 8081:4eeb53743d25
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Wed Oct 12 20:14:47 2022 +0300
description:
SSL: renamed session ticket key type.

The ngx_ssl_session_ticket_key_t is way too long, renamed to
ngx_ssl_ticket_key_t to simplify writing code.

diffstat:

 src/event/ngx_event_openssl.c |  40 ++++++++++++++++++++--------------------
 src/event/ngx_event_openssl.h |   2 +-
 2 files changed, 21 insertions(+), 21 deletions(-)

diffs (82 lines):

diff -r bf02161f291e -r 4eeb53743d25 src/event/ngx_event_openssl.c
--- a/src/event/ngx_event_openssl.c	Wed Oct 12 20:14:45 2022 +0300
+++ b/src/event/ngx_event_openssl.c	Wed Oct 12 20:14:47 2022 +0300
@@ -4229,23 +4229,23 @@ ngx_ssl_session_rbtree_insert_value(ngx_
 ngx_int_t
 ngx_ssl_session_ticket_keys(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_array_t *paths)
 {
-    u_char                         buf[80];
-    size_t                         size;
-    ssize_t                        n;
-    ngx_str_t                     *path;
-    ngx_file_t                     file;
-    ngx_uint_t                     i;
-    ngx_array_t                   *keys;
-    ngx_file_info_t                fi;
-    ngx_pool_cleanup_t            *cln;
-    ngx_ssl_session_ticket_key_t  *key;
+    u_char                 buf[80];
+    size_t                 size;
+    ssize_t                n;
+    ngx_str_t             *path;
+    ngx_file_t             file;
+    ngx_uint_t             i;
+    ngx_array_t           *keys;
+    ngx_file_info_t        fi;
+    ngx_pool_cleanup_t    *cln;
+    ngx_ssl_ticket_key_t  *key;
 
     if (paths == NULL) {
         return NGX_OK;
     }
 
     keys = ngx_array_create(cf->pool, paths->nelts,
-                            sizeof(ngx_ssl_session_ticket_key_t));
+                            sizeof(ngx_ssl_ticket_key_t));
     if (keys == NULL) {
         return NGX_ERROR;
     }
@@ -4372,14 +4372,14 @@ ngx_ssl_session_ticket_key_callback(ngx_
     unsigned char *name, unsigned char *iv, EVP_CIPHER_CTX *ectx,
     HMAC_CTX *hctx, int enc)
 {
-    size_t                         size;
-    SSL_CTX                       *ssl_ctx;
-    ngx_uint_t                     i;
-    ngx_array_t                   *keys;
-    ngx_connection_t              *c;
-    ngx_ssl_session_ticket_key_t  *key;
-    const EVP_MD                  *digest;
-    const EVP_CIPHER              *cipher;
+    size_t                 size;
+    SSL_CTX               *ssl_ctx;
+    ngx_uint_t             i;
+    ngx_array_t           *keys;
+    ngx_connection_t      *c;
+    ngx_ssl_ticket_key_t  *key;
+    const EVP_MD          *digest;
+    const EVP_CIPHER      *cipher;
 
     c = ngx_ssl_get_connection(ssl_conn);
     ssl_ctx = c->ssl->session_ctx;
@@ -4508,7 +4508,7 @@ ngx_ssl_session_ticket_keys_cleanup(void
     ngx_array_t  *keys = data;
 
     ngx_explicit_memzero(keys->elts,
-                         keys->nelts * sizeof(ngx_ssl_session_ticket_key_t));
+                         keys->nelts * sizeof(ngx_ssl_ticket_key_t));
 }
 
 #else
diff -r bf02161f291e -r 4eeb53743d25 src/event/ngx_event_openssl.h
--- a/src/event/ngx_event_openssl.h	Wed Oct 12 20:14:45 2022 +0300
+++ b/src/event/ngx_event_openssl.h	Wed Oct 12 20:14:47 2022 +0300
@@ -161,7 +161,7 @@ typedef struct {
     u_char                      name[16];
     u_char                      hmac_key[32];
     u_char                      aes_key[32];
-} ngx_ssl_session_ticket_key_t;
+} ngx_ssl_ticket_key_t;
 
 #endif
 



More information about the nginx-devel mailing list