Home / File/ netty_quic_boringssl.c — netty Source File

netty_quic_boringssl.c — netty Source File

Architecture documentation for netty_quic_boringssl.c, a c file in the netty codebase. 11 imports, 0 dependents.

File c ProtocolCodecs 11 imports

Entity Profile

Dependency Diagram

graph LR
  607c6fa3_cf44_360f_9fe5_201ec2c52b49["netty_quic_boringssl.c"]
  f118a04b_a605_9f13_c51c_758d1dd6f9d0["netty_jni_util.h"]
  607c6fa3_cf44_360f_9fe5_201ec2c52b49 --> f118a04b_a605_9f13_c51c_758d1dd6f9d0
  9533eae2_40b5_3185_74fb_7fef2ab81f4b["netty_quic.h"]
  607c6fa3_cf44_360f_9fe5_201ec2c52b49 --> 9533eae2_40b5_3185_74fb_7fef2ab81f4b
  944c06ae_ce96_9522_4591_5753ffa7339e["netty_quic_boringssl.h"]
  607c6fa3_cf44_360f_9fe5_201ec2c52b49 --> 944c06ae_ce96_9522_4591_5753ffa7339e
  0c4a58dc_2fdd_e4ad_9234_08a5790f43e3["jni.h"]
  607c6fa3_cf44_360f_9fe5_201ec2c52b49 --> 0c4a58dc_2fdd_e4ad_9234_08a5790f43e3
  617ed4cf_d595_a5c7_1593_810f21ce0712["stdint.h"]
  607c6fa3_cf44_360f_9fe5_201ec2c52b49 --> 617ed4cf_d595_a5c7_1593_810f21ce0712
  d822c438_bcda_8ebc_05f9_1007c55018be["stdlib.h"]
  607c6fa3_cf44_360f_9fe5_201ec2c52b49 --> d822c438_bcda_8ebc_05f9_1007c55018be
  5cbcd069_b25c_7379_e9c5_47a7dd85985a["string.h"]
  607c6fa3_cf44_360f_9fe5_201ec2c52b49 --> 5cbcd069_b25c_7379_e9c5_47a7dd85985a
  71c52c20_b4aa_1551_58db_42e42fa27aa6["errno.h"]
  607c6fa3_cf44_360f_9fe5_201ec2c52b49 --> 71c52c20_b4aa_1551_58db_42e42fa27aa6
  899e4fb7_bfe6_4111_2506_f78d9fb09c14["ssl.h"]
  607c6fa3_cf44_360f_9fe5_201ec2c52b49 --> 899e4fb7_bfe6_4111_2506_f78d9fb09c14
  2e58afc5_5dcf_84f6_30e3_c9c347aca443["rand.h"]
  607c6fa3_cf44_360f_9fe5_201ec2c52b49 --> 2e58afc5_5dcf_84f6_30e3_c9c347aca443
  7c66f055_848e_08c1_9734_e49ac10685c0["hmac.h"]
  607c6fa3_cf44_360f_9fe5_201ec2c52b49 --> 7c66f055_848e_08c1_9734_e49ac10685c0
  style 607c6fa3_cf44_360f_9fe5_201ec2c52b49 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/*
 * Copyright 2021 The Netty Project
 *
 * The Netty Project licenses this file to you under the Apache License,
 * version 2.0 (the "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at:
 *
 *   https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */
#include <jni.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <openssl/ssl.h>
#include <openssl/rand.h>
#include <openssl/hmac.h>

#include "netty_jni_util.h"
#include "netty_quic.h"
#include "netty_quic_boringssl.h"

// Add define if NETTY_BUILD_STATIC is defined so it is picked up in netty_jni_util.c
#ifdef NETTY_BUILD_STATIC
#define NETTY_JNI_UTIL_BUILD_STATIC
#endif

#define STATICALLY_CLASSNAME "io/netty/handler/codec/quic/BoringSSLNativeStaticallyReferencedJniMethods"
#define CLASSNAME "io/netty/handler/codec/quic/BoringSSL"
#define AUTH_UNKNOWN "UNKNOWN"

#define ERR_LEN 256

// For encoding of keys see BoringSSLSessionTicketCallback.setSessionTicketKeys(...)
#define SSL_SESSION_TICKET_KEY_NAME_OFFSET 1
#define SSL_SESSION_TICKET_KEY_HMAC_OFFSET 17
#define SSL_SESSION_TICKET_KEY_EVP_OFFSET 33
#define SSL_SESSION_TICKET_KEY_NAME_LEN 16
#define SSL_SESSION_TICKET_AES_KEY_LEN  16
#define SSL_SESSION_TICKET_HMAC_KEY_LEN 16
#define SSL_SESSION_TICKET_KEY_LEN 49

static jweak sslTaskClassWeak = NULL;
static jmethodID sslTaskDestroyMethod = NULL;
static jfieldID sslTaskReturnValue = NULL;
static jfieldID sslTaskComplete = NULL;

static jweak sslPrivateKeyMethodTaskClassWeak = NULL;
static jfieldID sslPrivateKeyMethodTaskResultBytesField = NULL;

static jweak sslPrivateKeyMethodSignTaskClassWeak = NULL;
static jmethodID sslPrivateKeyMethodSignTaskInitMethod = NULL;

static jweak sslPrivateKeyMethodDecryptTaskClassWeak = NULL;
// ... (1624 more lines)

Dependencies

Frequently Asked Questions

What does netty_quic_boringssl.c do?
netty_quic_boringssl.c is a source file in the netty codebase, written in c. It belongs to the ProtocolCodecs domain.
What does netty_quic_boringssl.c depend on?
netty_quic_boringssl.c imports 11 module(s): errno.h, hmac.h, jni.h, netty_jni_util.h, netty_quic.h, netty_quic_boringssl.h, rand.h, ssl.h, and 3 more.
Where is netty_quic_boringssl.c in the architecture?
netty_quic_boringssl.c is located at codec-native-quic/src/main/c/netty_quic_boringssl.c (domain: ProtocolCodecs, directory: codec-native-quic/src/main/c).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free