From b3f28e522d5ec267175607c849836780c76d43b5 Mon Sep 17 00:00:00 2001 From: "jeffery.wsj" Date: Tue, 19 Sep 2023 09:43:55 +0800 Subject: [PATCH] Add mysql tls sm benchmark example --- .../mysql/mysql_client_entrypoint.sh | 21 +++ examples/tls/benchmark/mysql/mysql_run.sh | 5 + .../benchmark/mysql/mysql_server_startup.sh | 12 ++ examples/tls/benchmark/mysql/pom.xml | 101 ++++++++++++++ .../security/mysql/SMTlsMySQLBenchmark.java | 128 ++++++++++++++++++ .../src/main/resources/TlsSettings.properties | 128 ++++++++++++++++++ .../mysql/src/main/resources/ca-key.pem | 27 ++++ .../benchmark/mysql/src/main/resources/ca.pem | 19 +++ .../mysql/src/main/resources/client-cert.pem | 19 +++ .../mysql/src/main/resources/client-key.pem | 27 ++++ .../mysql/src/main/resources/private_key.pem | 27 ++++ .../mysql/src/main/resources/public_key.pem | 9 ++ .../mysql/src/main/resources/server-cert.pem | 19 +++ .../mysql/src/main/resources/server-key.pem | 27 ++++ .../mysql/src/main/resources/truststore.jks | Bin 0 -> 1158 bytes examples/tls/benchmark/mysql/tools/Dockerfile | 43 ++++++ .../tls/benchmark/mysql/tools/ca/ca-key.pem | 27 ++++ examples/tls/benchmark/mysql/tools/ca/ca.pem | 19 +++ .../benchmark/mysql/tools/ca/client-cert.pem | 19 +++ .../benchmark/mysql/tools/ca/client-key.pem | 27 ++++ .../benchmark/mysql/tools/ca/private_key.pem | 27 ++++ .../benchmark/mysql/tools/ca/public_key.pem | 9 ++ .../benchmark/mysql/tools/ca/server-cert.pem | 19 +++ .../benchmark/mysql/tools/ca/server-key.pem | 27 ++++ .../mysql/tools/mysqld_entrypoint.sh | 28 ++++ .../mysql/tools/picture/Java_Logo.png | Bin 0 -> 6970 bytes 26 files changed, 814 insertions(+) create mode 100755 examples/tls/benchmark/mysql/mysql_client_entrypoint.sh create mode 100755 examples/tls/benchmark/mysql/mysql_run.sh create mode 100755 examples/tls/benchmark/mysql/mysql_server_startup.sh create mode 100644 examples/tls/benchmark/mysql/pom.xml create mode 100644 examples/tls/benchmark/mysql/src/main/java/com/alibaba/dragonwell/security/mysql/SMTlsMySQLBenchmark.java create mode 100644 examples/tls/benchmark/mysql/src/main/resources/TlsSettings.properties create mode 100644 examples/tls/benchmark/mysql/src/main/resources/ca-key.pem create mode 100644 examples/tls/benchmark/mysql/src/main/resources/ca.pem create mode 100644 examples/tls/benchmark/mysql/src/main/resources/client-cert.pem create mode 100644 examples/tls/benchmark/mysql/src/main/resources/client-key.pem create mode 100644 examples/tls/benchmark/mysql/src/main/resources/private_key.pem create mode 100644 examples/tls/benchmark/mysql/src/main/resources/public_key.pem create mode 100644 examples/tls/benchmark/mysql/src/main/resources/server-cert.pem create mode 100644 examples/tls/benchmark/mysql/src/main/resources/server-key.pem create mode 100644 examples/tls/benchmark/mysql/src/main/resources/truststore.jks create mode 100644 examples/tls/benchmark/mysql/tools/Dockerfile create mode 100644 examples/tls/benchmark/mysql/tools/ca/ca-key.pem create mode 100644 examples/tls/benchmark/mysql/tools/ca/ca.pem create mode 100644 examples/tls/benchmark/mysql/tools/ca/client-cert.pem create mode 100644 examples/tls/benchmark/mysql/tools/ca/client-key.pem create mode 100644 examples/tls/benchmark/mysql/tools/ca/private_key.pem create mode 100644 examples/tls/benchmark/mysql/tools/ca/public_key.pem create mode 100644 examples/tls/benchmark/mysql/tools/ca/server-cert.pem create mode 100644 examples/tls/benchmark/mysql/tools/ca/server-key.pem create mode 100644 examples/tls/benchmark/mysql/tools/mysqld_entrypoint.sh create mode 100644 examples/tls/benchmark/mysql/tools/picture/Java_Logo.png diff --git a/examples/tls/benchmark/mysql/mysql_client_entrypoint.sh b/examples/tls/benchmark/mysql/mysql_client_entrypoint.sh new file mode 100755 index 00000000..42c53898 --- /dev/null +++ b/examples/tls/benchmark/mysql/mysql_client_entrypoint.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +apt update -y && apt install openjdk-11-jdk maven -y + +# build mysql client benchmark. +mvn clean package + +WORK_DIR=`pwd` + +# replace mysql's properity file +mkdir -p target/tmp && cp target/benchmark-1.0.0-jar-with-dependencies.jar target/tmp +pushd target/tmp +jar -xvf benchmark-1.0.0-jar-with-dependencies.jar && rm -rf benchmark-1.0.0-jar-with-dependencies.jar +cp ${WORK_DIR}/src/main/resources/TlsSettings.properties ./com/mysql/cj/ +jar -cvf benchmark-1.0.0-jar-with-dependencies.jar ./ +popd + +# run with provider Dragonwell +java -cp target/tmp/benchmark-1.0.0-jar-with-dependencies.jar -DProvider=Dragonwell com.alibaba.dragonwell.security.mysql.SMTlsMySQLBenchmark +# run with provider Kona +java -cp target/tmp/benchmark-1.0.0-jar-with-dependencies.jar -DProvider=Kona com.alibaba.dragonwell.security.mysql.SMTlsMySQLBenchmark \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/mysql_run.sh b/examples/tls/benchmark/mysql/mysql_run.sh new file mode 100755 index 00000000..d709bbca --- /dev/null +++ b/examples/tls/benchmark/mysql/mysql_run.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +./mysql_server_startup.sh + +docker run -it --network=host --rm -v `pwd`:`pwd` -w `pwd` ubuntu:22.04 ./mysql_client_entrypoint.sh \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/mysql_server_startup.sh b/examples/tls/benchmark/mysql/mysql_server_startup.sh new file mode 100755 index 00000000..1bc57bf8 --- /dev/null +++ b/examples/tls/benchmark/mysql/mysql_server_startup.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# startup mysql service with tls which supports rfc8998. +# stop and remove an mysql service if it existed. +container_name="mysql_service" +if [[ $(docker ps -a --format "{{.Names}}" | grep "^${container_name}$") ]]; then + docker stop mysql_service && docker rm mysql_service +fi + +# create and start a new mysql service. +docker run -itd --net=host --privileged=true --name mysql_service cape2/mysql-ssl-smx /usr/sbin/init +docker exec -it mysql_service /MySQL-SMx/entrypoint/mysqld_entrypoint.sh diff --git a/examples/tls/benchmark/mysql/pom.xml b/examples/tls/benchmark/mysql/pom.xml new file mode 100644 index 00000000..59dc47b9 --- /dev/null +++ b/examples/tls/benchmark/mysql/pom.xml @@ -0,0 +1,101 @@ + + 4.0.0 + com.alibaba.dragonwell.security.mysql + benchmark + jar + 1.0.0 + benchmark + http://maven.apache.org + + UTF-8 + 8 + 8 + 1.35 + + + + org.openjdk.jmh + jmh-core + ${jmh.version} + + + org.openjdk.jmh + jmh-generator-annprocess + ${jmh.version} + provided + + + org.bouncycastle + bcprov-jdk15on + 1.70 + + + mysql + mysql-connector-java + 8.0.33 + + + com.tencent.kona + kona-provider + 1.0.7.1 + + + com.tencent.kona + kona-ssl + 1.0.7.1 + + + com.tencent.kona + kona-crypto + 1.0.7.1 + + + com.tencent.kona + kona-pkix + 1.0.7.1 + + + com.alibaba.dragonwell + security-native + 1.2.0 + ${os.detected.classifier} + + + junit + junit + 4.11 + test + + + + + + kr.motd.maven + os-maven-plugin + 1.4.1.Final + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.3.0 + + + jar-with-dependencies + + + + + make-assembly + package + + single + + + + + + + diff --git a/examples/tls/benchmark/mysql/src/main/java/com/alibaba/dragonwell/security/mysql/SMTlsMySQLBenchmark.java b/examples/tls/benchmark/mysql/src/main/java/com/alibaba/dragonwell/security/mysql/SMTlsMySQLBenchmark.java new file mode 100644 index 00000000..972fd705 --- /dev/null +++ b/examples/tls/benchmark/mysql/src/main/java/com/alibaba/dragonwell/security/mysql/SMTlsMySQLBenchmark.java @@ -0,0 +1,128 @@ +package com.alibaba.dragonwell.security.mysql; + +import java.security.Security; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.FileOutputStream; +import java.io.File; +import java.util.concurrent.TimeUnit; + +import org.openjdk.jmh.annotations.*; +import org.openjdk.jmh.infra.Blackhole; +import org.openjdk.jmh.results.format.ResultFormatType; +import org.openjdk.jmh.runner.Runner; +import org.openjdk.jmh.runner.RunnerException; +import org.openjdk.jmh.runner.options.Options; +import org.openjdk.jmh.runner.options.OptionsBuilder; + +import com.mysql.cj.jdbc.MysqlDataSource; +import com.tencent.kona.KonaProvider; +import com.alibaba.dragonwell.security.DragonwellSecurityProvider; + +@BenchmarkMode(Mode.AverageTime) +@Warmup(iterations = 6, time = 1) +@Measurement(iterations = 6, time = 1) +@Threads(1) +@Fork(1) +@State(value = Scope.Thread) +@OutputTimeUnit(TimeUnit.MICROSECONDS) +public class SMTlsMySQLBenchmark { + private final static String DRAGONWELL = "Dragonwell"; + private final static String KONA = "Kona"; + private final static String PROVIDER = System.getProperty("Provider"); + + public static void main(String[] args) throws RunnerException { + Options opt = new OptionsBuilder() + .include(SMTlsMySQLBenchmark.class.getSimpleName()) + .result("mysql_sm4_security_provider_benchmark.json") + .resultFormat(ResultFormatType.JSON).build(); + new Runner(opt).run(); + } + + @Benchmark + public void smTlsMySQLBenchMark(SMTlsMySQLBenchmark.BenchmarkContext context, Blackhole blackhole) throws Exception { + String IMAGE_DATA = "image_data"; + ResultSet resultSet = context.getPreparedStatement().executeQuery(); + blackhole.consume(resultSet); + resultSet.close(); + } + + @State(Scope.Thread) + public static class BenchmarkContext { + private final String USER = "root"; + private final String HOST_NAME = "127.0.0.1"; + private final String JKS_PASSWORD = "123456"; + private final String SQL_PASSWORD = "Wsj.123456"; + private final String DATA_BASE = "IMAGES"; + private final String DATA_TABLE = "images_table"; + private final String SQL = "SELECT image_data FROM images_table WHERE id = ?;"; + private final int PORT = 3306; + + private MysqlDataSource mysqlDS = null; + private Connection conn = null; + private PreparedStatement ps = null; + + private void initContext() throws Exception { + if (DRAGONWELL.equals(PROVIDER)) { + Security.insertProviderAt(new DragonwellSecurityProvider(), 1); + } else if (KONA.equals(PROVIDER)) { + Security.insertProviderAt(new KonaProvider(), 1); + } + + String trustCA = extractLibrary(SMTlsMySQLBenchmark.class.getClassLoader(), "truststore.jks"); + mysqlDS = new MysqlDataSource(); + mysqlDS.setUseSSL(true); + mysqlDS.setTrustCertificateKeyStoreType("JKS"); + mysqlDS.setTrustCertificateKeyStoreUrl(trustCA); + mysqlDS.setTrustCertificateKeyStorePassword(JKS_PASSWORD); + + mysqlDS.setServerName(HOST_NAME); + mysqlDS.setPort(PORT); + mysqlDS.setUser(USER); + mysqlDS.setPassword(SQL_PASSWORD); + mysqlDS.setDatabaseName(DATA_BASE); + + conn = mysqlDS.getConnection(); + + String sql = "SELECT image_data FROM images_table WHERE id = ?;"; + ps = conn.prepareStatement(sql); + ps.setInt(1, 1); + } + + public PreparedStatement getPreparedStatement() { + return ps; + } + + @Setup + public void createContext() throws Exception { + initContext(); + } + + @TearDown + public void teardown() throws Exception { + ps.close(); + conn.close(); + } + + private String extractLibrary(ClassLoader classLoader, String name) throws Exception { + int pos = name.lastIndexOf('.'); + File file = File.createTempFile(name.substring(0, pos), name.substring(pos)); + String fullPath = file.getAbsolutePath(); + try (InputStream in = classLoader.getResourceAsStream(name); + OutputStream out = new FileOutputStream(file)) { + byte[] buf = new byte[4096]; + int length; + while ((length = in.read(buf)) > 0) { + out.write(buf, 0, length); + } + } finally { + file.deleteOnExit(); + } + return fullPath; + } + } +} diff --git a/examples/tls/benchmark/mysql/src/main/resources/TlsSettings.properties b/examples/tls/benchmark/mysql/src/main/resources/TlsSettings.properties new file mode 100644 index 00000000..2b7858d8 --- /dev/null +++ b/examples/tls/benchmark/mysql/src/main/resources/TlsSettings.properties @@ -0,0 +1,128 @@ +# Copyright (c) 2019, 2021, Oracle and/or its affiliates. +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License, version 2.0, as published by the +# Free Software Foundation. +# +# This program is also distributed with certain software (including but not +# limited to OpenSSL) that is licensed under separate terms, as designated in a +# particular file or component or in included license documentation. The +# authors of MySQL hereby grant you an additional permission to link the +# program and your derivative works with the separately licensed software that +# they have included with MySQL. +# +# Without limiting anything contained in the foregoing, this file, which is +# part of MySQL Connector/J, is also subject to the Universal FOSS Exception, +# version 1.0, a copy of which can be found at +# http://oss.oracle.com/licenses/universal-foss-exception. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, +# for more details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Mandatory TLS Ciphers +TLSCiphers.Mandatory=\ + ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,\ + ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,\ + ECDHE_RSA_WITH_AES_128_GCM_SHA256 + +# Approved TLS Ciphers +TLSCiphers.Approved=\ + SM4_GCM_SM3,\ + SM4_CCM_SM3,\ + AES_128_GCM_SHA256,\ + AES_256_GCM_SHA384,\ + CHACHA20_POLY1305_SHA256,\ + AES_128_CCM_SHA256,\ + AES_128_CCM_8_SHA256,\ + ECDHE_RSA_WITH_AES_256_GCM_SHA384,\ + DHE_RSA_WITH_AES_128_GCM_SHA256,\ + DHE_DSS_WITH_AES_128_GCM_SHA256,\ + DHE_DSS_WITH_AES_256_GCM_SHA384,\ + DHE_RSA_WITH_AES_256_GCM_SHA384,\ + ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,\ + ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,\ + ECDHE_ECDSA_WITH_AES_256_CCM,\ + ECDHE_ECDSA_WITH_AES_128_CCM,\ + DHE_RSA_WITH_AES_256_CCM,\ + DHE_RSA_WITH_AES_128_CCM,\ + DHE_RSA_WITH_CHACHA20_POLY1305_SHA256,\ + ECDHE_ECDSA_WITH_AES_256_CCM_8,\ + ECDHE_ECDSA_WITH_AES_128_CCM_8,\ + DHE_RSA_WITH_AES_256_CCM_8,\ + DHE_RSA_WITH_AES_128_CCM_8 + +# Deprecated TLS Ciphers +TLSCiphers.Deprecated=\ + ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,\ + ECDHE_RSA_WITH_AES_128_CBC_SHA256,\ + ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,\ + ECDHE_RSA_WITH_AES_256_CBC_SHA384,\ + DHE_DSS_WITH_AES_128_CBC_SHA256,\ + DHE_DSS_WITH_AES_256_CBC_SHA256,\ + DHE_RSA_WITH_AES_256_CBC_SHA256,\ + DHE_RSA_WITH_AES_128_CBC_SHA256,\ + DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,\ + DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,\ + ECDHE_RSA_WITH_AES_128_CBC_SHA,\ + ECDHE_ECDSA_WITH_AES_128_CBC_SHA,\ + ECDHE_RSA_WITH_AES_256_CBC_SHA,\ + ECDHE_ECDSA_WITH_AES_256_CBC_SHA,\ + DHE_DSS_WITH_AES_128_CBC_SHA,\ + DHE_RSA_WITH_AES_128_CBC_SHA,\ + DHE_RSA_WITH_AES_256_CBC_SHA,\ + DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,\ + RSA_WITH_CAMELLIA_128_CBC_SHA,\ + DH_RSA_WITH_AES_128_CBC_SHA256,\ + ECDH_ECDSA_WITH_AES_128_CBC_SHA256,\ + ECDH_RSA_WITH_AES_128_CBC_SHA256,\ + DH_RSA_WITH_AES_256_CBC_SHA256,\ + ECDH_RSA_WITH_AES_256_CBC_SHA384,\ + DH_DSS_WITH_AES_128_CBC_SHA256,\ + ECDH_ECDSA_WITH_AES_256_CBC_SHA384,\ + DH_DSS_WITH_AES_128_CBC_SHA,\ + ECDH_ECDSA_WITH_AES_128_CBC_SHA,\ + DH_DSS_WITH_AES_256_CBC_SHA,\ + ECDH_ECDSA_WITH_AES_256_CBC_SHA,\ + DH_DSS_WITH_AES_256_CBC_SHA256,\ + DH_RSA_WITH_AES_128_CBC_SHA,\ + ECDH_RSA_WITH_AES_128_CBC_SHA,\ + DH_RSA_WITH_AES_256_CBC_SHA,\ + ECDH_RSA_WITH_AES_256_CBC_SHA,\ + RSA_WITH_AES_128_GCM_SHA256,\ + RSA_WITH_AES_128_CCM,\ + RSA_WITH_AES_128_CCM_8,\ + RSA_WITH_AES_256_GCM_SHA384,\ + RSA_WITH_AES_256_CCM,\ + RSA_WITH_AES_256_CCM_8,\ + RSA_WITH_AES_128_CBC_SHA256,\ + RSA_WITH_AES_256_CBC_SHA256,\ + RSA_WITH_AES_128_CBC_SHA,\ + RSA_WITH_AES_256_CBC_SHA,\ + RSA_WITH_CAMELLIA_256_CBC_SHA,\ + RSA_WITH_CAMELLIA_128_CBC_SHA,\ + DH_DSS_WITH_AES_128_GCM_SHA256,\ + ECDH_ECDSA_WITH_AES_128_GCM_SHA256,\ + DH_DSS_WITH_AES_256_GCM_SHA384,\ + ECDH_ECDSA_WITH_AES_256_GCM_SHA384,\ + DH_RSA_WITH_AES_128_GCM_SHA256,\ + ECDH_RSA_WITH_AES_128_GCM_SHA256,\ + DH_RSA_WITH_AES_256_GCM_SHA384,\ + ECDH_RSA_WITH_AES_256_GCM_SHA384,\ + DH_DSS_WITH_3DES_EDE_CBC_SHA,\ + DH_RSA_WITH_3DES_EDE_CBC_SHA,\ + DHE_DSS_WITH_3DES_EDE_CBC_SHA,\ + DHE_RSA_WITH_3DES_EDE_CBC_SHA,\ + ECDH_RSA_WITH_3DES_EDE_CBC_SHA,\ + ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,\ + ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,\ + ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,\ + RSA_WITH_3DES_EDE_CBC_SHA + +# Unacceptable TLS Ciphers +TLSCiphers.Unacceptable.Mask=_ANON_,_NULL_,_EXPORT,_MD5,_DES,_RC2_,_RC4_,_PSK_ diff --git a/examples/tls/benchmark/mysql/src/main/resources/ca-key.pem b/examples/tls/benchmark/mysql/src/main/resources/ca-key.pem new file mode 100644 index 00000000..ae8f7cfa --- /dev/null +++ b/examples/tls/benchmark/mysql/src/main/resources/ca-key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MII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wJ4cODBVAoGAeE5++yvyN4HlOjS5HaJP +4TxudyRyGRBveiornpcTsD0+aX0k+A0T0l2xpCUg53qc3owbypPUQlLt2jwjkfHM +nRT0H1wTRzdYUM8HAcTtC8s9JaH+4f3hdJkLViGj+LUjmxjTJ/npKbnUwdOMxZxI +boMciK6UUQYSRFsAmeQY0G8CgYAr4/rSdHPfBodN6BNRdR70UDg2BKKB8SvvH7kU +D629ED74+voYGp91CurQLaRv/v1bUs1PiWPmIXGELKeDdlQQbtKJFPZtmY+b1yuK +Q16lfnlkPHjMqxs4EhzwnvSOCDxotC6rx1oSipMlzwDKgrK81m5apUwnaCNzqpqz +SnLT9QKBgGeen+5BsoQs9Pk5sPy/RzxKuL+PVA2QSTg1FwKTbQmj/RzX2c14obha +oRFYhYbcLnDJDWpIj8dtDZyQj9RWvyKbYma1mHMvCXsp/7Qs0FO6tKdNiQGaGyUo +dW43o6iOV3PIpVlZ8rgnHZGEotLmDZ0wfrt94p4vP0A/tbTcr39g +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/src/main/resources/ca.pem b/examples/tls/benchmark/mysql/src/main/resources/ca.pem new file mode 100644 index 00000000..3eae7b8c --- /dev/null +++ b/examples/tls/benchmark/mysql/src/main/resources/ca.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDBjCCAe6gAwIBAgIBATANBgkqhkiG9w0BAQsFADA8MTowOAYDVQQDDDFNeVNR +TF9TZXJ2ZXJfOC4wLjM0X0F1dG9fR2VuZXJhdGVkX0NBX0NlcnRpZmljYXRlMB4X +DTIzMDkxNTA2NTk0M1oXDTMzMDkxMjA2NTk0M1owPDE6MDgGA1UEAwwxTXlTUUxf +U2VydmVyXzguMC4zNF9BdXRvX0dlbmVyYXRlZF9DQV9DZXJ0aWZpY2F0ZTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALaYn0LcwAYj/LktYXaLxom9Ofrc +0GS0RBn3Gkchmqi/l8jNGoPRrB6QNC6lila8j+IEJ5hibkNZ8JdbMwnKQa1VnCPi +EM60m+vExjMrvXTmsAL9xr5LoY/WBUGR77NrglLndRQaJN/W4vK1HOMPyHOnf7a3 +HiQXEmM0C4xU9pMS+ZKiN4ACbKZW3OSCHznwgeevZdMWCR3Pl9Z9VioU0jyLSKbG +s9kT7wXwon67MMWon2WDUGQXIta6zdtE5eDCVhxF2xRkW2g6u/RRd1BXXjHaNX9W +VvpVZcQ8BMtqUQ07RtzcyhkmgOj3cEVlDxvznLUSSp2sb+nEVwtnwk2S3usCAwEA +AaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAGMsNrH3X +2Djf5fovi2IU/XT3mNs9rrpb/QJWdkyBXhGdnHgnc8jUryulhYHTvM7Iv0+tCEYx +hiAcHbgZaxuKGIGpvSfozwjdQgiFITgDJ9JMgRD1qve08czqa6Lyk9QXXrGcvF7R +yhJ76mqi9cSwivN8u+2Q1otAmb8MfZB73MgAhgvBxzcWZzv1h7KH3cGrza8Cm/Yt +ij/UBq/rCso/5hq+jSvnCq87AzGQvGTiU96CR+XpNlKSsD/TiHsJrTiU8ni8STbw +zUkL90yDQ6+0WMG4Vd5f3hhdbhdFYrH5xy+GQgpiFbqOT6KwkyyycIaP57Esc0ZD +0I4yDlMvhcj2tg== +-----END CERTIFICATE----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/src/main/resources/client-cert.pem b/examples/tls/benchmark/mysql/src/main/resources/client-cert.pem new file mode 100644 index 00000000..7aa953ab --- /dev/null +++ b/examples/tls/benchmark/mysql/src/main/resources/client-cert.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDBzCCAe+gAwIBAgIBAzANBgkqhkiG9w0BAQsFADA8MTowOAYDVQQDDDFNeVNR +TF9TZXJ2ZXJfOC4wLjM0X0F1dG9fR2VuZXJhdGVkX0NBX0NlcnRpZmljYXRlMB4X +DTIzMDkxNTA2NTk0NFoXDTMzMDkxMjA2NTk0NFowQDE+MDwGA1UEAww1TXlTUUxf +U2VydmVyXzguMC4zNF9BdXRvX0dlbmVyYXRlZF9DbGllbnRfQ2VydGlmaWNhdGUw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCVUVkY33gIbimQiPvg1eZ2 +bCVhLHqxFD5WR+gYfxoOrEi2fmusiI9WfjXqjtt1qSZnZ97rCXTMJN8T02QzTTgi +eSv7wpodpL6r2CFgpxGRnC3VJnT/HEUQWaCRdtZp1/gnYsJCxfurhblasaCJQ53A +zDrT4Dy7OvKwFPyrpVgBuOOld3Te9p6EhwPMx0tkDnnGyef/UO4xq9eEDxh8+KCo +HQ1+kQnQNoeb5typUo0cTCzIHgam0bpq3U/wIt543wpRVcwHIZg/OiKfUeHwdy4E +c8klv4fb3URbcYQp/AUPkey7d4g7UQKbw4sDz37oLkcycLr6XoCYT/8l4SApjj+r +AgMBAAGjEDAOMAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggEBADrRdDH8 +NntX1kna8Cpu76TMm93jdXpV8lc/B4ul9To+VYj/FNUWcR7IQBLIwRmFfOWe/Z4q +zM7hEgy18hSkW0IlUk3dvK9DllaH7zww8j8Wiv8JPyR+cRCJuFyHuQ5MkuZ0GOLa +YnVXX9iDdRWGqfnwmPpDlgrHV2OSohMHYAAC9CHq1g8fxrPj+iuQqQGFfMLdZzYt +K9tCTlIghRP31vvbrkIGZUZP6Ncd8BSC+EXeSU7dLr8+0WwN9tWB927I20NGZuOJ +pkUWHpSrD80bi9b1a9PvT2GwnwlaJDKK+gBKJ1pR/qE5inGK0Rze1uKTURHodWNZ +IzTMcz/Fjl81Plo= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/src/main/resources/client-key.pem b/examples/tls/benchmark/mysql/src/main/resources/client-key.pem new file mode 100644 index 00000000..817bad24 --- /dev/null +++ b/examples/tls/benchmark/mysql/src/main/resources/client-key.pem @@ -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ea1bdWUQENtn +Csz3rnuoOOVhKdVa52sCpYMVTGoKCJTG0CLCo0sCgYAFflJTFDc7Ms/IjioJtt5F +7rNw/4XAZIILzPr+1Hm34N/SGWH6hBj3KWigCVDZOClxwADJiFUKDKBzTpXXlEyr +1wgAyrq8gucgyVTuqtht+jvLsem56HuOaoLxlGp21f1XOVZMmkA9SS87PiEGD+GS +9SRsVE2iSPQJyIYHt3vNAQKBgGcpHc5OH4dodcmJ1bfvjzA9Lo1C2P74UoqMLUht +ass6Fa73/Tj16d0Tt+V1pHXDyGA8PNLgSlFcpHEzQdEJrFK0UkaLDWCxzCTquyXu +eaRpA5Ty7mFbsfCOXfL2lFkQvpKSKnY5+uqZPsDeNsf/FfVCdebePL+IRcYDUeY1 +aVE9AoGBAKeDDGYJPbUNM5oDQcszmcXtgKCXITDrwX5u8vx0+tiAO5V+nSnb9x9l +/xQnSkPq6OOr8Ocl76r9U3gZaHEAyoWm5yivBCZs5JDQPqizytd1PU7pSu9u9TKb +cPSJwo2tNqzGUkffyPOLbnipTpIvZ3KZ3vCun50kvlIPpbDNHpUD +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/src/main/resources/private_key.pem b/examples/tls/benchmark/mysql/src/main/resources/private_key.pem new file mode 100644 index 00000000..2c4f49f8 --- /dev/null +++ b/examples/tls/benchmark/mysql/src/main/resources/private_key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEogIBAAKCAQEAqFF4JL6jhztci1YFhgRaZHQY56/HCCPg4bl/hBtPAY1HpQcG +zLa8Kzu7+vXH7jHnLjo8RX31x1vlzYBKWSX8nc9l7YbG9guUkGlIyz11KMpLgUPA +pXM9Mdd3lD3fH/OYNQNp6zwr0RaE2pMA79AkFR27BZDXJQB5HTLXiUL69tZXnaIx +W3O8vZE7Wunz/P8T+4Yfgzd2UdNPjeCxzc/Vr3ABPO7SPCXsZJ2EYCzIc+zmg9Lc +xyjgxV95gdM1J8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g701zp2v +67gRDX4HOt9TgU4mt7QkrHokVXAwod0LdA1WfdDj0H150FymDwXEXEssacLQ5z81 +RLzlAoGAHWVu14cjWrjK8Pxd0hrUcqQUdVye3sCXJZYprvJKkC04xgE5ENQ+/Qu8 +k5IVryHjYNliHOUJu/AlM4f2oDgipwwm7HhmMRfs2RGzMTtaKpAPtBt+1Z/5RQ99 +2JlFqzsrkmqR8GN/uCJ4XeGREQnUjvc2e1gEz5HsXRSQW92Dflk= +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/src/main/resources/public_key.pem b/examples/tls/benchmark/mysql/src/main/resources/public_key.pem new file mode 100644 index 00000000..c02713b6 --- /dev/null +++ b/examples/tls/benchmark/mysql/src/main/resources/public_key.pem @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqFF4JL6jhztci1YFhgRa +ZHQY56/HCCPg4bl/hBtPAY1HpQcGzLa8Kzu7+vXH7jHnLjo8RX31x1vlzYBKWSX8 +nc9l7YbG9guUkGlIyz11KMpLgUPApXM9Mdd3lD3fH/OYNQNp6zwr0RaE2pMA79Ak +FR27BZDXJQB5HTLXiUL69tZXnaIxW3O8vZE7Wunz/P8T+4Yfgzd2UdNPjeCxzc/V +r3ABPO7SPCXsZJ2EYCzIc+zmg9LcxyjgxV95gdM1J8ldS9PIdpHQzgNjLYRzaZKw +B+XFffnAWz2lImelELlRceJtfFebL2aUzHJkHRAUlR+/joTpHT9J9xLtn9BEMb0e +IQIDAQAB +-----END PUBLIC KEY----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/src/main/resources/server-cert.pem b/examples/tls/benchmark/mysql/src/main/resources/server-cert.pem new file mode 100644 index 00000000..6b269d68 --- /dev/null +++ b/examples/tls/benchmark/mysql/src/main/resources/server-cert.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDBzCCAe+gAwIBAgIBAjANBgkqhkiG9w0BAQsFADA8MTowOAYDVQQDDDFNeVNR +TF9TZXJ2ZXJfOC4wLjM0X0F1dG9fR2VuZXJhdGVkX0NBX0NlcnRpZmljYXRlMB4X +DTIzMDkxNTA2NTk0M1oXDTMzMDkxMjA2NTk0M1owQDE+MDwGA1UEAww1TXlTUUxf +U2VydmVyXzguMC4zNF9BdXRvX0dlbmVyYXRlZF9TZXJ2ZXJfQ2VydGlmaWNhdGUw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrI0anSGjq7AknRoawKQjj +C4l+3EfzkJgmZr4skXFdjamDj+AVy6wISqzgnnex186pdFo/ig3WX+gAsr65pbsQ +SKbBx4LKWUokMECM57xq/7VI7FNHCYWHMUoU6kS+xNfrqwRKUwNV87/JhBcPmm48 +Wk5zp5T0/TaaKR1DoyZTnf7vkkgp04epHIIwIbAh93LWocohuVmsqM4sraN28gvv +lM/u8dGA8040MreANg1tuGfWayr2H5y+ZnXrDsMgxktKL9e2NK/XAhSqjvJ4san8 +j/CI0cwpGxwFzhHtw0UY5xvU2kUoLFS0NNIpLp+yvuCmcs6JTwMUJbrwLujIX2YD +AgMBAAGjEDAOMAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggEBAFyuzyAB +LjZjAlxsrwKBC/BXor4ku8rGHNmIGqAwlHzYjyh/PzG0d+u+RUX41EOj6RUmbcAt +DxJ/ZRoNcA/brhV3RhY/KRw3LnqmWh68Deeh2bLVd/OqMf/VoaaRyQM4vjiDCPSi +1s+xtBJkF554zxu0IIAA1br0cGfK1a57rJ6EuoePjK0c5f5v3OYt0JVT5IYAcViu +5FS2BTgKOccW7eXYW64OcKEnJZmuAaRanX0Oy9pMwM0vBp/BPf9vDcsDnfveQjLd +LuzQXN9PPJcUSS2NrcRiqU4g8e7S4MkOkx7GymQcGLSG/t0t6uod9AVe2ar5AQYv +S0394TTH/Wg5yKo= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/src/main/resources/server-key.pem b/examples/tls/benchmark/mysql/src/main/resources/server-key.pem new file mode 100644 index 00000000..5d19d9cd --- /dev/null +++ b/examples/tls/benchmark/mysql/src/main/resources/server-key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAqyNGp0ho6uwJJ0aGsCkI4wuJftxH85CYJma+LJFxXY2pg4/g +FcusCEqs4J53sdfOqXRaP4oN1l/oALK+uaW7EEimwceCyllKJDBAjOe8av+1SOxT +RwmFhzFKFOpEvsTX66sESlMDVfO/yYQXD5puPFpOc6eU9P02mikdQ6MmU53+75JI +KdOHqRyCMCGwIfdy1qHKIblZrKjOLK2jdvIL75TP7vHRgPNONDK3gDYNbbhn1msq +9h+cvmZ16w7DIMZLSi/XtjSv1wIUqo7yeLGp/I/wiNHMKRscBc4R7cNFGOcb1NpF +KCxUtDTSKS6fsr7gpnLOiU8DFCW68C7oyF9mAwIDAQABAoIBAEylt/ckDxloLZFR +nPE476oAeMxAjFkh4YMRcQs0+LkVwV4TCiG43ou4JkVTs/gK15w9aE4c3qWsvpPR +empbN7TLVSRk3scRxor+sWpqP5EMhXzrm0Ctmwg5oxxK8A8gyjPanElNdKkCSltO +taVfXQ/awlg6LhSrc9EHqPuqDnhUBuJ+2MVJJ6uxT/mZD50NkjLXqTBZKhNCE8XV +dYCBVK1i+CnCQHGk1jnuR1l+0aEeAuSrw0pW3xB6B3ug0/QfkEaAfAF3HYxZTrMj +Slrrj3Z0/97sD/psZpaCKQNzwflxu9k5+e4oI7MC6rRnJFDrZUTTPIrm9eqYt5aE +RNNVXYECgYEA4Ub0p6QxAZhXkqlGAfioAq+9Z4c0if3QigcWpVImayMQWYGcl9Lu +5VNu6uRkoUO5V5cm1XMrBDYeAXbH6/bNxlxVtbQkvKIKZKD716ceAQHC3D6RcBJQ +1t5TiUWi62YuNX9Mvv9GlJcqY7kmzp2meWUxHpbbAUn82cg8PifSntkCgYEAwnoq +iqWTD3pCN6XCRagdI0HyuTFZZA2hkm8NBVkizNZbzk0Br9eyJcQwJZJ7/f3nBrwI +v1/63PxyY6i+b7dNQYtlB9NtG0vu3puGJhFeQymCtwm/AjvNQvdCKShCWkfdw4+f +o0EXRg0209MpuHOkLQ/IVrj/r9yXhYy8xaIQ2jsCgYBFWmLXeWTc6NmM/S/gS3zt +1syooqc6FDmvRJ9kJfZN5W2TIKPk2btSPm1XQxj3zLGylYYPEHWdxktWiArkSgbv +ml2IovzsVbZ9ZFIkAf7qsHAc/eYoansYqzlseVO+xKZVMeueoVhJRoB2UvnvgflO +RijpEeg6bVy6bzqcqAXfgQKBgQCpuEfsG7eNqFqliclTVPWo0WLsb77dbG/3BWdN +pY6TSPdxwQ6Z0Rmtj9uczovbC3xVCkBwE2kw9jc19gvMHyIS833GKKNtUQUzzHJ0 +QnALGOz0pFLHtjzaFkLs/C977oAArRTaOnH/NoUEs6ITUQiUMtPZqzWo2lB5wmrz +5w3iBQKBgQDYAKg3EyrEV4oe3IEZCuOslyxclXPem8QZZS3fI+ebbdxrDc4/WUwY +J5/v1+OQjWCoChGzjGJWKYVVkFFhxZ7olhghnFg+GZ2hVDzI+rr7aypXhOQKVjCM +YfWDB8UjMB6jWbNnR31i6epPy8sNuc02PHxUbAqTuE9+ROLoJpotkA== +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/src/main/resources/truststore.jks b/examples/tls/benchmark/mysql/src/main/resources/truststore.jks new file mode 100644 index 0000000000000000000000000000000000000000..7447eb9a2ae43569f8f26492f773f64ff6af25ae GIT binary patch literal 1158 zcmV;11bO=~f&_vB0Ru3C1S|##Duzgg_YDCD0ic2e9Rz{|88Ctb6)=JX5e5k=hDe6@ z4FLxRpn?PfFoFaA0s#Opf&=#k2`Yw2hW8Bt2LUi<1_>&LNQU+thDZTr0|Wso1Q35RGQ_oU*(quqxtYq`{8NB}1AwX22i5wjkxfT(u^*T;Uk2$*wRyXsH}H?G~q$Yu5sWXDNO*go$v<9lu=*a3diPE4VLKf^w1Pifc=B#}yl+7GGj z)0MHG2Ktp8{AH{+%_S;#WNCL<$&F;pXjle6JLGVBv5o3La8;5KolHf{Q-MZ{TVvoM6htsa@`d$9(kOep=sQ(rV zUUMOB@y>iC=*ZxtGtj(w5kV0xp|HKX#SMul4Hy%ivU{8m4;_31@&bF^^# zrt50Ic+YWix(AWQEtqx9ucbCr^r9A+&>jb>Mg8OHC)gK_^9k&B#wh|P@O{~j<)s6- zNC%BthUz$;q6WIK*IX&VQ_Ccz&gZ4-0YS&qGohqGkmzAlGWAozf~o?JD*cZyf3MMW z{8F95~OnMgY*r$ zz?gxg98Eh&s9J(d0*aMbsEjU=5O!RnGMfP@p7kMdE2RkJlEMaV#oVA3UHM}+r$o%% z*@P;0I;&RlKPA*6pCAY+7sDY(7rBAP{EKc|l3Kb|no34`aHQXV&VZ)%l`6wmdV3Y` zNO(I7`Qu7D|AEuhguVYF8MHTB(wZrQ#fS+7+)|C6CDOzh2&J{31xS@HW!i-A!52p> zJto=Q9HUT>>yBhZy+j!UXBPQj~Fb zX(oY*n8ty1Ocsuk5UngQZptk-Q=LiV>)Exd3n(#)|MvnyZuC*Uf-v?0T@W{f*&3f0 zVh-k)yuHqV30V%sjNC9O71OfpC00bc0zmKWocImP?^-YsD&=(i&Ieo8C;On|ln+ij8S3Nca6cFk8 Y;=3M*l8t{d5VNi=!{k@G&H@4_5J1xxKL7v# literal 0 HcmV?d00001 diff --git a/examples/tls/benchmark/mysql/tools/Dockerfile b/examples/tls/benchmark/mysql/tools/Dockerfile new file mode 100644 index 00000000..8e30a38b --- /dev/null +++ b/examples/tls/benchmark/mysql/tools/Dockerfile @@ -0,0 +1,43 @@ +FROM openanolis/anolisos:8.8 as builder + +RUN yum update -y && yum install -y wget zip perl make gcc + +WORKDIR / +RUN wget https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/8.3.3.zip && unzip 8.3.3.zip && rm -rf 8.3.3.zip +RUN pushd Tongsuo-8.3.3 && mkdir -p build && \ + ./config --libdir=lib --prefix=/Tongsuo-8.3.3/build enable-weak-ssl-ciphers && \ + make -j8 && make install && tar -zcvf build.tar.gz build && popd + +FROM openanolis/anolisos:8.8 + +RUN yum update -y && yum install -y https://dev.mysql.com/get/mysql80-community-release-el8-4.noarch.rpm && \ + yum module disable mysql -y && dnf install mysql-server -y + +WORKDIR /MySQL-SMx + +COPY --from=builder /Tongsuo-8.3.3/build.tar.gz . +RUN tar -zxvf build.tar.gz && rm -rf build.tar.gz + +WORKDIR /MySQL-SMx/entrypoint +COPY mysqld_entrypoint.sh . + +COPY picture/Java_Logo.png /var/lib/mysql-files + +WORKDIR /MySQL-SMx/ca +COPY ca . + +RUN echo 'LD_LIBRARY_PATH=/MySQL-SMx/build/lib:$LD_LIBRARY_PATH' >> /root/.bashrc && \ + echo 'PATH=/MySQL-SMx/build/bin:$PATH' >> /root/.bashrc + +RUN echo 'require_secure_transport=ON' >> /etc/my.cnf && \ + echo 'tls_ciphersuites=TLS_SM4_GCM_SM3:TLS_SM4_CCM_SM3' >> /etc/my.cnf && \ + echo 'tls_version=TLSv1.3' >> /etc/my.cnf && \ + echo 'ssl_ca=/MySQL-SMx/ca/ca.pem' >> /etc/my.cnf && \ + echo 'ssl_cert=/MySQL-SMx/ca/server-cert.pem' >> /etc/my.cnf && \ + echo 'ssl_key=/MySQL-SMx/ca/server-key.pem' >> /etc/my.cnf && \ + echo 'Environment=LD_LIBRARY_PATH=/MySQL-SMx/build/lib' >> /etc/systemd/system/multi-user.target.wants/mysqld.service + +ENV PATH=/MySQL-SMx/build/bin:$PATH +ENV LD_LIBRARY_PATH=/MySQL-SMx/build/lib:$LD_LIBRARY_PATH + +RUN chmod 755 /MySQL-SMx/entrypoint/mysqld_entrypoint.sh diff --git a/examples/tls/benchmark/mysql/tools/ca/ca-key.pem b/examples/tls/benchmark/mysql/tools/ca/ca-key.pem new file mode 100644 index 00000000..ae8f7cfa --- /dev/null +++ b/examples/tls/benchmark/m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aOEnpKVPrtarF02ssuiG7FLj8x+ +93rWFlrZjqrTfwYDmqBRPKHq9cG/CxWdwJ4cODBVAoGAeE5++yvyN4HlOjS5HaJP +4TxudyRyGRBveiornpcTsD0+aX0k+A0T0l2xpCUg53qc3owbypPUQlLt2jwjkfHM +nRT0H1wTRzdYUM8HAcTtC8s9JaH+4f3hdJkLViGj+LUjmxjTJ/npKbnUwdOMxZxI +boMciK6UUQYSRFsAmeQY0G8CgYAr4/rSdHPfBodN6BNRdR70UDg2BKKB8SvvH7kU +D629ED74+voYGp91CurQLaRv/v1bUs1PiWPmIXGELKeDdlQQbtKJFPZtmY+b1yuK +Q16lfnlkPHjMqxs4EhzwnvSOCDxotC6rx1oSipMlzwDKgrK81m5apUwnaCNzqpqz +SnLT9QKBgGeen+5BsoQs9Pk5sPy/RzxKuL+PVA2QSTg1FwKTbQmj/RzX2c14obha +oRFYhYbcLnDJDWpIj8dtDZyQj9RWvyKbYma1mHMvCXsp/7Qs0FO6tKdNiQGaGyUo +dW43o6iOV3PIpVlZ8rgnHZGEotLmDZ0wfrt94p4vP0A/tbTcr39g +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/tools/ca/ca.pem b/examples/tls/benchmark/mysql/tools/ca/ca.pem new file mode 100644 index 00000000..3eae7b8c --- /dev/null +++ b/examples/tls/benchmark/mysql/tools/ca/ca.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDBjCCAe6gAwIBAgIBATANBgkqhkiG9w0BAQsFADA8MTowOAYDVQQDDDFNeVNR +TF9TZXJ2ZXJfOC4wLjM0X0F1dG9fR2VuZXJhdGVkX0NBX0NlcnRpZmljYXRlMB4X +DTIzMDkxNTA2NTk0M1oXDTMzMDkxMjA2NTk0M1owPDE6MDgGA1UEAwwxTXlTUUxf +U2VydmVyXzguMC4zNF9BdXRvX0dlbmVyYXRlZF9DQV9DZXJ0aWZpY2F0ZTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALaYn0LcwAYj/LktYXaLxom9Ofrc +0GS0RBn3Gkchmqi/l8jNGoPRrB6QNC6lila8j+IEJ5hibkNZ8JdbMwnKQa1VnCPi +EM60m+vExjMrvXTmsAL9xr5LoY/WBUGR77NrglLndRQaJN/W4vK1HOMPyHOnf7a3 +HiQXEmM0C4xU9pMS+ZKiN4ACbKZW3OSCHznwgeevZdMWCR3Pl9Z9VioU0jyLSKbG +s9kT7wXwon67MMWon2WDUGQXIta6zdtE5eDCVhxF2xRkW2g6u/RRd1BXXjHaNX9W +VvpVZcQ8BMtqUQ07RtzcyhkmgOj3cEVlDxvznLUSSp2sb+nEVwtnwk2S3usCAwEA +AaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAGMsNrH3X +2Djf5fovi2IU/XT3mNs9rrpb/QJWdkyBXhGdnHgnc8jUryulhYHTvM7Iv0+tCEYx +hiAcHbgZaxuKGIGpvSfozwjdQgiFITgDJ9JMgRD1qve08czqa6Lyk9QXXrGcvF7R +yhJ76mqi9cSwivN8u+2Q1otAmb8MfZB73MgAhgvBxzcWZzv1h7KH3cGrza8Cm/Yt +ij/UBq/rCso/5hq+jSvnCq87AzGQvGTiU96CR+XpNlKSsD/TiHsJrTiU8ni8STbw +zUkL90yDQ6+0WMG4Vd5f3hhdbhdFYrH5xy+GQgpiFbqOT6KwkyyycIaP57Esc0ZD +0I4yDlMvhcj2tg== +-----END CERTIFICATE----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/tools/ca/client-cert.pem b/examples/tls/benchmark/mysql/tools/ca/client-cert.pem new file mode 100644 index 00000000..7aa953ab --- /dev/null +++ b/examples/tls/benchmark/mysql/tools/ca/client-cert.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDBzCCAe+gAwIBAgIBAzANBgkqhkiG9w0BAQsFADA8MTowOAYDVQQDDDFNeVNR +TF9TZXJ2ZXJfOC4wLjM0X0F1dG9fR2VuZXJhdGVkX0NBX0NlcnRpZmljYXRlMB4X +DTIzMDkxNTA2NTk0NFoXDTMzMDkxMjA2NTk0NFowQDE+MDwGA1UEAww1TXlTUUxf +U2VydmVyXzguMC4zNF9BdXRvX0dlbmVyYXRlZF9DbGllbnRfQ2VydGlmaWNhdGUw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCVUVkY33gIbimQiPvg1eZ2 +bCVhLHqxFD5WR+gYfxoOrEi2fmusiI9WfjXqjtt1qSZnZ97rCXTMJN8T02QzTTgi +eSv7wpodpL6r2CFgpxGRnC3VJnT/HEUQWaCRdtZp1/gnYsJCxfurhblasaCJQ53A +zDrT4Dy7OvKwFPyrpVgBuOOld3Te9p6EhwPMx0tkDnnGyef/UO4xq9eEDxh8+KCo +HQ1+kQnQNoeb5typUo0cTCzIHgam0bpq3U/wIt543wpRVcwHIZg/OiKfUeHwdy4E +c8klv4fb3URbcYQp/AUPkey7d4g7UQKbw4sDz37oLkcycLr6XoCYT/8l4SApjj+r +AgMBAAGjEDAOMAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggEBADrRdDH8 +NntX1kna8Cpu76TMm93jdXpV8lc/B4ul9To+VYj/FNUWcR7IQBLIwRmFfOWe/Z4q +zM7hEgy18hSkW0IlUk3dvK9DllaH7zww8j8Wiv8JPyR+cRCJuFyHuQ5MkuZ0GOLa +YnVXX9iDdRWGqfnwmPpDlgrHV2OSohMHYAAC9CHq1g8fxrPj+iuQqQGFfMLdZzYt +K9tCTlIghRP31vvbrkIGZUZP6Ncd8BSC+EXeSU7dLr8+0WwN9tWB927I20NGZuOJ +pkUWHpSrD80bi9b1a9PvT2GwnwlaJDKK+gBKJ1pR/qE5inGK0Rze1uKTURHodWNZ +IzTMcz/Fjl81Plo= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/tools/ca/client-key.pem b/examples/tls/benchmark/mysql/tools/ca/client-key.pem new file mode 100644 index 00000000..817bad24 --- /dev/null +++ b/examples/tls/benchmark/mysql/tools/ca/client-key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAlVFZGN94CG4pkIj74NXmdmwlYSx6sRQ+VkfoGH8aDqxItn5r +rIiPVn416o7bdakmZ2fe6wl0zCTfE9NkM004Inkr+8KaHaS+q9ghYKcRkZwt1SZ0 +/xxFEFmgkXbWadf4J2LCQsX7q4W5WrGgiUOdwMw60+A8uzrysBT8q6VYAbjjpXd0 +3vaehIcDzMdLZA55xsnn/1DuMavXhA8YfPigqB0NfpEJ0DaHm+bcqVKNHEwsyB4G +ptG6at1P8CLeeN8KUVXMByGYPzoin1Hh8HcuBHPJJb+H291EW3GEKfwFD5Hsu3eI +O1ECm8OLA89+6C5HMnC6+l6AmE//JeEgKY4/qwIDAQABAoIBADmpPFrakSPQRsTF +4V6lu2WnxZeM8aRISPpQslQjYRChf0LZ9wKdiZzBCFkX6a+6LlZoSjFBaZUb9/lT +/LHC9BZ77HxAXftsjyUVRW5pleNBCIHzY+LQK+twcQ07cvlUqUOsY5AdnF5UOYvI +ZFIdhmHZfC4tvcYfsXBF6nzuUNn40Q8OeNQqVdj5f3zJpqJPFq7dYYPfmI7TQSlx +VeZ0xuWaRYBTcMpuwqSeCtVc8E3Ge6wszqdG459t2LhsZK3SRGgVtdokfcjJ3BkQ +H5eNwCNhUnBE/h14OXONo0v7o/hoCmwkX28REBoonCo7VFsmvorJjntJ1Oy2tbLd +i1MgywECgYEAxIUBUEj8kH69ZXFFSwa0p0NEJmxDD/dlxbujvxZvR+h7YoswnVsJ +Zg+e8b0MprV5ADPHM5R7TV5A1ERaSzLmTsVJwcd63QPcvhug+mEhpvCY3QZY2S6Y +/7rhRTh11ZVDzYJy2y+g6ddEz4+wGLhnPmxZo1DDb5fM9XValXOiuSECgYEAwoL9 +codMNjU3D/NEdx6eO5KS0kW4kiKvwUxCFcqceKYMSv17hYZggZwiiWqtV95mpEc2 +8+KT0TVhsOU6QtA9QHrUWGv5MVN7xTAYZgFhq1HT0ry4ohvdYqbiea1bdWUQENtn +Csz3rnuoOOVhKdVa52sCpYMVTGoKCJTG0CLCo0sCgYAFflJTFDc7Ms/IjioJtt5F +7rNw/4XAZIILzPr+1Hm34N/SGWH6hBj3KWigCVDZOClxwADJiFUKDKBzTpXXlEyr +1wgAyrq8gucgyVTuqtht+jvLsem56HuOaoLxlGp21f1XOVZMmkA9SS87PiEGD+GS +9SRsVE2iSPQJyIYHt3vNAQKBgGcpHc5OH4dodcmJ1bfvjzA9Lo1C2P74UoqMLUht +ass6Fa73/Tj16d0Tt+V1pHXDyGA8PNLgSlFcpHEzQdEJrFK0UkaLDWCxzCTquyXu +eaRpA5Ty7mFbsfCOXfL2lFkQvpKSKnY5+uqZPsDeNsf/FfVCdebePL+IRcYDUeY1 +aVE9AoGBAKeDDGYJPbUNM5oDQcszmcXtgKCXITDrwX5u8vx0+tiAO5V+nSnb9x9l +/xQnSkPq6OOr8Ocl76r9U3gZaHEAyoWm5yivBCZs5JDQPqizytd1PU7pSu9u9TKb +cPSJwo2tNqzGUkffyPOLbnipTpIvZ3KZ3vCun50kvlIPpbDNHpUD +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/tools/ca/private_key.pem b/examples/tls/benchmark/mysql/tools/ca/private_key.pem new file mode 100644 index 00000000..2c4f49f8 --- /dev/null +++ b/examples/tls/benchmark/mysql/tools/ca/private_key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEogIBAAKCAQEAqFF4JL6jhztci1YFhgRaZHQY56/HCCPg4bl/hBtPAY1HpQcG +zLa8Kzu7+vXH7jHnLjo8RX31x1vlzYBKWSX8nc9l7YbG9guUkGlIyz11KMpLgUPA +pXM9Mdd3lD3fH/OYNQNp6zwr0RaE2pMA79AkFR27BZDXJQB5HTLXiUL69tZXnaIx +W3O8vZE7Wunz/P8T+4Yfgzd2UdNPjeCxzc/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03bIQaGdwhq6hRjXM5dpli3ShG8z3JqJEFTR6fZl64OA4ZaAg701zp2v +67gRDX4HOt9TgU4mt7QkrHokVXAwod0LdA1WfdDj0H150FymDwXEXEssacLQ5z81 +RLzlAoGAHWVu14cjWrjK8Pxd0hrUcqQUdVye3sCXJZYprvJKkC04xgE5ENQ+/Qu8 +k5IVryHjYNliHOUJu/AlM4f2oDgipwwm7HhmMRfs2RGzMTtaKpAPtBt+1Z/5RQ99 +2JlFqzsrkmqR8GN/uCJ4XeGREQnUjvc2e1gEz5HsXRSQW92Dflk= +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/tools/ca/public_key.pem b/examples/tls/benchmark/mysql/tools/ca/public_key.pem new file mode 100644 index 00000000..c02713b6 --- /dev/null +++ b/examples/tls/benchmark/mysql/tools/ca/public_key.pem @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqFF4JL6jhztci1YFhgRa +ZHQY56/HCCPg4bl/hBtPAY1HpQcGzLa8Kzu7+vXH7jHnLjo8RX31x1vlzYBKWSX8 +nc9l7YbG9guUkGlIyz11KMpLgUPApXM9Mdd3lD3fH/OYNQNp6zwr0RaE2pMA79Ak +FR27BZDXJQB5HTLXiUL69tZXnaIxW3O8vZE7Wunz/P8T+4Yfgzd2UdNPjeCxzc/V +r3ABPO7SPCXsZJ2EYCzIc+zmg9LcxyjgxV95gdM1J8ldS9PIdpHQzgNjLYRzaZKw +B+XFffnAWz2lImelELlRceJtfFebL2aUzHJkHRAUlR+/joTpHT9J9xLtn9BEMb0e +IQIDAQAB +-----END PUBLIC KEY----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/tools/ca/server-cert.pem b/examples/tls/benchmark/mysql/tools/ca/server-cert.pem new file mode 100644 index 00000000..6b269d68 --- /dev/null +++ b/examples/tls/benchmark/mysql/tools/ca/server-cert.pem @@ -0,0 +1,19 @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wg5yKo= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/tools/ca/server-key.pem b/examples/tls/benchmark/mysql/tools/ca/server-key.pem new file mode 100644 index 00000000..5d19d9cd --- /dev/null +++ b/examples/tls/benchmark/mysql/tools/ca/server-key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAqyNGp0ho6uwJJ0aGsCkI4wuJftxH85CYJma+LJFxXY2pg4/g +FcusCEqs4J53sdfOqXRaP4oN1l/oALK+uaW7EEimwceCyllKJDBAjOe8av+1SOxT +RwmFhzFKFOpEvsTX66sESlMDVfO/yYQXD5puPFpOc6eU9P02mikdQ6MmU53+75JI +KdOHqRyCMCGwIfdy1qHKIblZrKjOLK2jdvIL75TP7vHRgPNONDK3gDYNbbhn1msq +9h+cvmZ16w7DIMZLSi/XtjSv1wIUqo7yeLGp/I/wiNHMKRscBc4R7cNFGOcb1NpF +KCxUtDTSKS6fsr7gpnLOiU8DFCW68C7oyF9mAwIDAQABAoIBAEylt/ckDxloLZFR +nPE476oAeMxAjFkh4YMRcQs0+LkVwV4TCiG43ou4JkVTs/gK15w9aE4c3qWsvpPR +empbN7TLVSRk3scRxor+sWpqP5EMhXzrm0Ctmwg5oxxK8A8gyjPanElNdKkCSltO +taVfXQ/awlg6LhSrc9EHqPuqDnhUBuJ+2MVJJ6uxT/mZD50NkjLXqTBZKhNCE8XV +dYCBVK1i+CnCQHGk1jnuR1l+0aEeAuSrw0pW3xB6B3ug0/QfkEaAfAF3HYxZTrMj +Slrrj3Z0/97sD/psZpaCKQNzwflxu9k5+e4oI7MC6rRnJFDrZUTTPIrm9eqYt5aE +RNNVXYECgYEA4Ub0p6QxAZhXkqlGAfioAq+9Z4c0if3QigcWpVImayMQWYGcl9Lu +5VNu6uRkoUO5V5cm1XMrBDYeAXbH6/bNxlxVtbQkvKIKZKD716ceAQHC3D6RcBJQ +1t5TiUWi62YuNX9Mvv9GlJcqY7kmzp2meWUxHpbbAUn82cg8PifSntkCgYEAwnoq +iqWTD3pCN6XCRagdI0HyuTFZZA2hkm8NBVkizNZbzk0Br9eyJcQwJZJ7/f3nBrwI +v1/63PxyY6i+b7dNQYtlB9NtG0vu3puGJhFeQymCtwm/AjvNQvdCKShCWkfdw4+f +o0EXRg0209MpuHOkLQ/IVrj/r9yXhYy8xaIQ2jsCgYBFWmLXeWTc6NmM/S/gS3zt +1syooqc6FDmvRJ9kJfZN5W2TIKPk2btSPm1XQxj3zLGylYYPEHWdxktWiArkSgbv +ml2IovzsVbZ9ZFIkAf7qsHAc/eYoansYqzlseVO+xKZVMeueoVhJRoB2UvnvgflO +RijpEeg6bVy6bzqcqAXfgQKBgQCpuEfsG7eNqFqliclTVPWo0WLsb77dbG/3BWdN +pY6TSPdxwQ6Z0Rmtj9uczovbC3xVCkBwE2kw9jc19gvMHyIS833GKKNtUQUzzHJ0 +QnALGOz0pFLHtjzaFkLs/C977oAArRTaOnH/NoUEs6ITUQiUMtPZqzWo2lB5wmrz +5w3iBQKBgQDYAKg3EyrEV4oe3IEZCuOslyxclXPem8QZZS3fI+ebbdxrDc4/WUwY +J5/v1+OQjWCoChGzjGJWKYVVkFFhxZ7olhghnFg+GZ2hVDzI+rr7aypXhOQKVjCM +YfWDB8UjMB6jWbNnR31i6epPy8sNuc02PHxUbAqTuE9+ROLoJpotkA== +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/examples/tls/benchmark/mysql/tools/mysqld_entrypoint.sh b/examples/tls/benchmark/mysql/tools/mysqld_entrypoint.sh new file mode 100644 index 00000000..371f4954 --- /dev/null +++ b/examples/tls/benchmark/mysql/tools/mysqld_entrypoint.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +systemctl daemon-reload +systemctl restart mysqld + +PASSWORD_TXT=`cat /var/log/mysqld.log|grep temp` +PASSWORD_TMP=$(echo "$PASSWORD_TXT" | sed 's/.* //') + +mysql --connect-expired-password -u root -p"$PASSWORD_TMP" << EOF +ALTER USER 'root'@'localhost' IDENTIFIED BY 'Wsj.123456'; +FLUSH PRIVILEGES; +EOF + +HOSTNAME="127.0.0.1" +PORT="3306" +USERNAME="root" +PASSWORD="Wsj.123456" +DBNAME="IMAGES" +TABLENAME="images_table" + +create_db_sql="create database IF NOT EXISTS ${DBNAME}" +mysql -h${HOSTNAME} -P${PORT} -u${USERNAME} -p${PASSWORD} -e "${create_db_sql}" + +create_table_sql="create table IF NOT EXISTS ${TABLENAME} (id INT AUTO_INCREMENT PRIMARY KEY, image_name VARCHAR(255) NOT NULL, image_data LONGBLOB NOT NULL)" +mysql -h${HOSTNAME} -P${PORT} -u${USERNAME} -p${PASSWORD} -D ${DBNAME} -e "${create_table_sql=}" + +insert_sql="insert into ${TABLENAME}(image_name, image_data) values('java_logo', LOAD_FILE('/var/lib/mysql-files/Java_Logo.png'))" +mysql -h${HOSTNAME} -P${PORT} -u${USERNAME} -p${PASSWORD} -D ${DBNAME} -e "${insert_sql}" diff --git a/examples/tls/benchmark/mysql/tools/picture/Java_Logo.png b/examples/tls/benchmark/mysql/tools/picture/Java_Logo.png new file mode 100644 index 0000000000000000000000000000000000000000..75bb9f9473a13e66eaeaa06b0d3527fe6db265fa GIT binary patch literal 6970 zcmV-A8^z>_P)00004XF*Lt006O% z3;baP00001b5ch_0Itp)=>Px&08mU+MNDaN>hkyU^!WSl@9FXP>hk#P^Z5Mi>-+8Q zwkZL?)3Qb^78xX>FM$K>hbvO z^Z5Je>gMqF=kfRa@9*mI_V4fS?eq8T^Z4iR_xkSc`swNF@c8ZW`Reoe^YZlk?Caql zA`5S};2t93A0gl#A>ke&32wFE9U$Nw9|UW(0A{iaZnoeT8wYK*32wFkXR_cM9^e@q z-xU`EYO?@guiq9K0A;ZTY_tGrv)>aJ;2$9eY_$MrvfmLE0AQ{OZMEPR8Q~rx-wzVs z5flJpu;e#7-whDrCo13@9_2bb-U$re3=iKE764?h0AH^1ouA$c4jg&A-x(Y#fxqAq z7TyO60%^12B`Cz)?%om=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