003 File Manager
Current Path:
/usr/src/crypto/openssl/ssl
usr
/
src
/
crypto
/
openssl
/
ssl
/
📁
..
📄
bio_ssl.c
(12.75 KB)
📄
build.info
(852 B)
📄
d1_lib.c
(29.48 KB)
📄
d1_msg.c
(2.03 KB)
📄
d1_srtp.c
(3.4 KB)
📄
ktls.c
(7.27 KB)
📄
methods.c
(8.68 KB)
📄
packet.c
(9.91 KB)
📄
packet_local.h
(26.24 KB)
📄
pqueue.c
(2.96 KB)
📁
record
📄
s3_cbc.c
(17.57 KB)
📄
s3_enc.c
(18.16 KB)
📄
s3_lib.c
(125.08 KB)
📄
s3_msg.c
(3.06 KB)
📄
ssl_asn1.c
(12 KB)
📄
ssl_cert.c
(27.13 KB)
📄
ssl_cert_table.h
(1010 B)
📄
ssl_ciph.c
(66.38 KB)
📄
ssl_conf.c
(30.4 KB)
📄
ssl_err.c
(67.33 KB)
📄
ssl_init.c
(6.48 KB)
📄
ssl_lib.c
(159.63 KB)
📄
ssl_local.h
(102.47 KB)
📄
ssl_mcnf.c
(2.73 KB)
📄
ssl_rsa.c
(33.12 KB)
📄
ssl_sess.c
(36.87 KB)
📄
ssl_stat.c
(11.64 KB)
📄
ssl_txt.c
(5.91 KB)
📄
ssl_utst.c
(622 B)
📁
statem
📄
t1_enc.c
(25.88 KB)
📄
t1_lib.c
(91.36 KB)
📄
t1_trce.c
(54.85 KB)
📄
tls13_enc.c
(34.78 KB)
📄
tls_srp.c
(13.26 KB)
Editing: ssl_mcnf.c
/* * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ #include <stdio.h> #include <openssl/conf.h> #include <openssl/ssl.h> #include "ssl_local.h" #include "internal/sslconf.h" /* SSL library configuration module. */ void SSL_add_ssl_module(void) { /* Do nothing. This will be added automatically by libcrypto */ } static int ssl_do_config(SSL *s, SSL_CTX *ctx, const char *name, int system) { SSL_CONF_CTX *cctx = NULL; size_t i, idx, cmd_count; int rv = 0; unsigned int flags; const SSL_METHOD *meth; const SSL_CONF_CMD *cmds; if (s == NULL && ctx == NULL) { SSLerr(SSL_F_SSL_DO_CONFIG, ERR_R_PASSED_NULL_PARAMETER); goto err; } if (name == NULL && system) name = "system_default"; if (!conf_ssl_name_find(name, &idx)) { if (!system) { SSLerr(SSL_F_SSL_DO_CONFIG, SSL_R_INVALID_CONFIGURATION_NAME); ERR_add_error_data(2, "name=", name); } goto err; } cmds = conf_ssl_get(idx, &name, &cmd_count); cctx = SSL_CONF_CTX_new(); if (cctx == NULL) goto err; flags = SSL_CONF_FLAG_FILE; if (!system) flags |= SSL_CONF_FLAG_CERTIFICATE | SSL_CONF_FLAG_REQUIRE_PRIVATE; if (s != NULL) { meth = s->method; SSL_CONF_CTX_set_ssl(cctx, s); } else { meth = ctx->method; SSL_CONF_CTX_set_ssl_ctx(cctx, ctx); } if (meth->ssl_accept != ssl_undefined_function) flags |= SSL_CONF_FLAG_SERVER; if (meth->ssl_connect != ssl_undefined_function) flags |= SSL_CONF_FLAG_CLIENT; SSL_CONF_CTX_set_flags(cctx, flags); for (i = 0; i < cmd_count; i++) { char *cmdstr, *arg; conf_ssl_get_cmd(cmds, i, &cmdstr, &arg); rv = SSL_CONF_cmd(cctx, cmdstr, arg); if (rv <= 0) { if (rv == -2) SSLerr(SSL_F_SSL_DO_CONFIG, SSL_R_UNKNOWN_COMMAND); else SSLerr(SSL_F_SSL_DO_CONFIG, SSL_R_BAD_VALUE); ERR_add_error_data(6, "section=", name, ", cmd=", cmdstr, ", arg=", arg); goto err; } } rv = SSL_CONF_CTX_finish(cctx); err: SSL_CONF_CTX_free(cctx); return rv <= 0 ? 0 : 1; } int SSL_config(SSL *s, const char *name) { return ssl_do_config(s, NULL, name, 0); } int SSL_CTX_config(SSL_CTX *ctx, const char *name) { return ssl_do_config(NULL, ctx, name, 0); } void ssl_ctx_system_config(SSL_CTX *ctx) { ssl_do_config(NULL, ctx, NULL, 1); }
Upload File
Create Folder