diff --git a/.github/workflows/hostap-vm.yml b/.github/workflows/hostap-vm.yml index 54f043ed0..77f7007c3 100644 --- a/.github/workflows/hostap-vm.yml +++ b/.github/workflows/hostap-vm.yml @@ -79,6 +79,7 @@ jobs: lookup-only: true - name: Checkout hostap + if: steps.cache.outputs.cache-hit != 'true' run: git clone git://w1.fi/hostap.git hostap build_uml_linux: diff --git a/.github/workflows/macos-apple-native-cert-validation.yml b/.github/workflows/macos-apple-native-cert-validation.yml index c8b161dbe..045686a14 100644 --- a/.github/workflows/macos-apple-native-cert-validation.yml +++ b/.github/workflows/macos-apple-native-cert-validation.yml @@ -14,8 +14,7 @@ concurrency: jobs: make_check: - strategy: - fail-fast: false + if: github.repository_owner == 'wolfssl' runs-on: macos-latest # This should be a safe limit for the tests to run. timeout-minutes: 5 diff --git a/.github/workflows/rust-wrapper.yml b/.github/workflows/rust-wrapper.yml new file mode 100644 index 000000000..de923792c --- /dev/null +++ b/.github/workflows/rust-wrapper.yml @@ -0,0 +1,33 @@ +name: Build Rust Wrapper + +# START OF COMMON SECTION +on: + push: + branches: [ 'master', 'main', 'release/**' ] + pull_request: + branches: [ '*' ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +# END OF COMMON SECTION + +jobs: + build_wolfssl: + name: Build wolfSSL Rust Wrapper + if: github.repository_owner == 'wolfssl' + runs-on: ubuntu-24.04 + # This should be a safe limit for the tests to run. + timeout-minutes: 10 + steps: + - name: Build wolfSSL + uses: wolfSSL/actions-build-autotools-project@v1 + with: + path: wolfssl + configure: --enable-all + - name: Build Rust Wrapper + working-directory: wolfssl + run: make -C wrapper/rust + - name: Run Rust Wrapper Tests + working-directory: wolfssl + run: make -C wrapper/rust test diff --git a/.gitignore b/.gitignore index f5544aa79..2b91e077e 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,7 @@ aclocal.m4 aminclude.am lt*.m4 Makefile.in -Makefile +/Makefile depcomp missing libtool @@ -449,6 +449,7 @@ MagicCrypto # debian packaging debian/changelog debian/control +debian/rules *.deb # Ada/Alire files @@ -457,6 +458,9 @@ wrapper/Ada/config/ wrapper/Ada/lib/ wrapper/Ada/obj/ +# Rust wrapper files +/wrapper/rust/*/target/ + # PlatformIO /**/.pio /**/.vscode/.browse.c_cpp.db* diff --git a/.wolfssl_known_macro_extras b/.wolfssl_known_macro_extras index 8b0cbc93f..11c6b5d4b 100644 --- a/.wolfssl_known_macro_extras +++ b/.wolfssl_known_macro_extras @@ -737,7 +737,6 @@ WOLFSSL_IMXRT_DCP WOLFSSL_ISOTP WOLFSSL_KEIL WOLFSSL_KEIL_NET -WOLFSSL_KEY_TO_DER WOLFSSL_KYBER_NO_DECAPSULATE WOLFSSL_KYBER_NO_ENCAPSULATE WOLFSSL_KYBER_NO_MAKE_KEY diff --git a/IDE/Renesas/e2studio/RA6M3/README.md b/IDE/Renesas/e2studio/RA6M3/README.md index 703bf08a8..9fe04ceba 100644 --- a/IDE/Renesas/e2studio/RA6M3/README.md +++ b/IDE/Renesas/e2studio/RA6M3/README.md @@ -21,7 +21,7 @@ The wolfssl Project Summary is listed below and is relevant for every project. |Board|EK-RA6M3| |Device|R7FA6M3AH3CFC| |Toolchain|GCC ARM Embedded| -|FSP Version|3.5.0| +|FSP Version|6.1.0| #### Selected software components @@ -64,8 +64,8 @@ The following steps explain how to generate the missing files and where to place |Property|Value| |:--|:--| -|Thread Symbol|wolfssl_tst_thread| -|Thread Name|wolf_tst_thread| +|Thread Symbol|wolfssl_tst_thd| +|Thread Name|wolf_tst_thd| |Thread Stack size|increase depending on your environment
e.g. 0xA000| |Thread Memory Allocation Support Dynamic Allocation|Enabled| |Memory Allocation Total Heap Size|increase depending on your environment
e.g. 0x20000| @@ -76,7 +76,7 @@ The following steps explain how to generate the missing files and where to place + Add `Heap 4` stack to sce_tst_thread from `New Stack` -> `RTOS` -> `FreeRTOS Heap 4` + Add `FreeRTOS + TCP` stack to sce_tst_thread from `New Stack` -> `Networking` -> `FreeRTOS+TCP` and set properties. Go to `Add Ethernet Driver` box, and click the box to select `New` -> `Ethernet (r_ether)` . Set properties. -+ Increase `BSP` heap size. Go to `BSP` tab and increase `RA Common` Heap size. e.g. 0x1000 + |Property|Value| |:--|:--| |Network Events call vApplicationIPNetworkEventHook|Disable| diff --git a/IDE/STM32Cube/wolfssl_example.c b/IDE/STM32Cube/wolfssl_example.c index d2fed0a52..9c89ddf92 100644 --- a/IDE/STM32Cube/wolfssl_example.c +++ b/IDE/STM32Cube/wolfssl_example.c @@ -1830,7 +1830,7 @@ double current_time(void) (void) date; /* return seconds.milliseconds */ - return ((double) time.Hours * 24) + ((double) time.Minutes * 60) + return ((double) time.Hours * 3600) + ((double) time.Minutes * 60) + (double) time.Seconds + ((double) subsec / 1000); } #endif /* HAL_RTC_MODULE_ENABLED */ diff --git a/Makefile.am b/Makefile.am index 63dbb3e02..3fa836759 100644 --- a/Makefile.am +++ b/Makefile.am @@ -225,6 +225,9 @@ if BUILD_LINUXKM module: +$(MAKE) -C linuxkm libwolfssl.ko +module-update-fips-hash: + +$(MAKE) -C linuxkm module-update-fips-hash + clean_module: +$(MAKE) -C linuxkm clean diff --git a/certs/sm2/gen-sm2-certs.sh b/certs/sm2/gen-sm2-certs.sh index 790e91f50..46f2a8cd5 100755 --- a/certs/sm2/gen-sm2-certs.sh +++ b/certs/sm2/gen-sm2-certs.sh @@ -91,7 +91,7 @@ openssl x509 -req -in server-sm2.csr -days 1000 -extfile ../renewcerts/wolfssl.c check_result $? "Generate certificate" rm server-sm2.csr -openssl x509 -in server-sm2-cert.pem -outform DER > server-sm2.der +openssl x509 -in server-sm2-cert.pem -outform DER > server-sm2-cert.der check_result $? "Convert to DER" openssl x509 -in server-sm2-cert.pem -text > tmp.pem check_result $? "Add text" diff --git a/certs/sm2/server-sm2-cert.der b/certs/sm2/server-sm2-cert.der new file mode 100644 index 000000000..878296d94 Binary files /dev/null and b/certs/sm2/server-sm2-cert.der differ diff --git a/configure.ac b/configure.ac index c45567632..a581995c5 100644 --- a/configure.ac +++ b/configure.ac @@ -48,9 +48,7 @@ AC_SUBST([WOLFSSL_CONFIG_ARGS]) # Store configure options and CFLAGS for debian rules generation CONFIGURE_OPTIONS="$ac_configure_args" -CONFIGURE_CFLAGS="$CFLAGS" AC_SUBST([CONFIGURE_OPTIONS]) -AC_SUBST([CONFIGURE_CFLAGS]) # shared library versioning # The three numbers in the libwolfssl.so.*.*.* file name. Unfortunately @@ -443,6 +441,8 @@ AS_CASE([$ENABLED_WOLFENGINE], # rand - wolfRand # v5 - FIPS 140-3 Cert 4718 # cert4718 - alias for v5 +# v5.2.3 -- FIPS 140-3 with support for ARM acceleration, derived from Cert 4718 +# v5.2.4 -- FIPS 140-3 with support for Linux kernel mode, derived from v5.2.3 # ready - FIPS 140-3 settings with in-tree wolfcrypt sources, feature locked # dev - FIPS 140-3 settings with in-tree wolfcrypt sources, features freely adjustable # v5-ready - Alias for ready. @@ -499,6 +499,24 @@ AS_CASE([$ENABLED_FIPS], DEF_SP_MATH="no" DEF_FAST_MATH="yes" ], + [v5.2.3],[ + FIPS_VERSION="v5" + HAVE_FIPS_VERSION_MAJOR=5 + HAVE_FIPS_VERSION_MINOR=2 + HAVE_FIPS_VERSION_PATCH=3 + ENABLED_FIPS="yes" + DEF_SP_MATH="yes" + DEF_FAST_MATH="no" + ], + [v5.2.4],[ + FIPS_VERSION="v5" + HAVE_FIPS_VERSION_MAJOR=5 + HAVE_FIPS_VERSION_MINOR=2 + HAVE_FIPS_VERSION_PATCH=4 + ENABLED_FIPS="yes" + DEF_SP_MATH="yes" + DEF_FAST_MATH="no" + ], [v5-RC12],[ FIPS_VERSION="v5-RC12" HAVE_FIPS_VERSION_MAJOR=5 @@ -1107,6 +1125,7 @@ then AC_MSG_ERROR([--enable-all-osp is incompatible with --enable-linuxkm-defaults]) fi + test "$enable_wolfguard" = "" && enable_wolfguard=yes test "$enable_webserver" = "" && enable_webserver=yes if test "$ENABLED_SP_MATH" != "yes" @@ -1382,7 +1401,7 @@ then test "$enable_aesxts_stream" = "" && test "$enable_aesxts" = "yes" && enable_aesxts_stream=yes test "$enable_shake128" = "" && enable_shake128=yes test "$enable_shake256" = "" && enable_shake256=yes - test "$enable_compkey" = "" && test "$ENABLED_LINUXKM_DEFAULTS" != "yes" && enable_compkey=yes + test "$enable_compkey" = "" && enable_compkey=yes # AFALG lacks AES-ECB test "$enable_srtp_kdf" = "" && test "$enable_afalg" != "yes" && enable_srtp_kdf=yes fi @@ -1411,6 +1430,24 @@ then AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_ISSUER_NAMES" fi +# wolfGuard +AC_ARG_ENABLE([wolfguard], + [AS_HELP_STRING([--enable-wolfguard],[Enable wolfGuard dependencies (default: disabled)])], + [ ENABLED_WOLFGUARD=$enableval ], + [ ENABLED_WOLFGUARD=no ] + ) +if test "$ENABLED_WOLFGUARD" = "yes" +then + test "$enable_ecc" = "" && enable_ecc=yes + test "$enable_sha256" = "" && enable_sha256=yes + test "$enable_aesgcm" = "" && enable_aesgcm=yes + if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -ge 6 + then + test "$enable_compkey" = "" && enable_compkey=yes + test "$enable_aesgcm_stream" = "" && enable_aesgcm_stream=yes + fi +fi + # liboqs ENABLED_LIBOQS="no" tryliboqsdir="" @@ -3792,6 +3829,18 @@ then AM_CFLAGS="$AM_CFLAGS -DHAVE_INTEL_RDRAND" fi +# INTEL RDSEED +AC_ARG_ENABLE([intelrdseed], + [AS_HELP_STRING([--enable-intelrdseed],[Enable Intel rdseed as preferred RNG seeding source (default: disabled)])], + [ ENABLED_INTELRDSEED=$enableval ], + [ ENABLED_INTELRDSEED=no ] + ) + +if test "$ENABLED_INTELRDSEED" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_INTEL_RDSEED" +fi + # AMD RDSEED AC_ARG_ENABLE([amdrand], [AS_HELP_STRING([--enable-amdrand],[Enable AMD rdseed as preferred RNG seeding source (default: disabled)])], @@ -5669,6 +5718,9 @@ AC_ARG_ENABLE([pwdbased], # wolfEntropy Software Jitter SP800-90B certifiable entropy source if test "$ENABLED_LINUXKM_DEFAULTS" = "yes" && \ + test "$ENABLED_AMDRDSEED" != "yes" && \ + test "$ENABLED_INTELRDRAND" != "yes" && \ + test "$ENABLED_INTELRDSEED" != "yes" && \ (test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -ge 6) then ENABLED_ENTROPY_MEMUSE_DEFAULT=yes @@ -5760,7 +5812,7 @@ AS_CASE([$FIPS_VERSION], (test "$FIPS_VERSION" != "dev" || test "$enable_keygen" != "no")], [ENABLED_KEYGEN="yes"; AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KEY_GEN"]) -# AS_IF([test "$ENABLED_COMPKEY" = "yes" && +# AS_IF([test "$ENABLED_COMPKEY" != "yes" && # (test "$FIPS_VERSION" != "dev" || test "$enable_compkey" != "yes")], # [ENABLED_COMPKEY="yes"]) @@ -10650,6 +10702,17 @@ if test "$enable_shared" = "no"; then fi fi +if test "$ENABLED_WOLFGUARD" = "yes"; then + if test "$ENABLED_ECC" = "no" || + test "$ENABLED_SHA256" = "no" || + test "$ENABLED_AESGCM" = "no" || + test "$ENABLED_HMAC" = "no" || + test "$ENABLED_RNG" = "no" + then + AC_MSG_ERROR([--enable-wolfguard requires ECC, SHA256-HMAC, AES-GCM, and RNG.]) + fi +fi + if test "x$ENABLED_LINUXKM" = "xyes"; then AX_SIMD_CC_COMPILER_FLAGS AC_SUBST([CFLAGS_FPU_DISABLE]) @@ -10714,9 +10777,6 @@ if test "x$ENABLED_LINUXKM" = "xyes"; then if test "$ENABLED_STACKLOG" = "yes"; then AC_MSG_ERROR([--enable-stacklog is incompatible with --enable-linuxkm.]) fi - if test "$ENABLED_COMPKEY" = "yes"; then - AC_MSG_ERROR([--enable-compkey is incompatible with --enable-linuxkm.]) - fi fi AS_IF([test "$ENABLED_ASM" = "no" && (test "$ENABLED_INTELASM" != "no" || \ diff --git a/debian/rules.in b/debian/rules.in index d9c7b8602..88e12e219 100644 --- a/debian/rules.in +++ b/debian/rules.in @@ -3,7 +3,6 @@ # Store the configure options and CFLAGS used during ./configure # This file is generated from rules.in by the configure script CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ -CONFIGURE_CFLAGS = @CONFIGURE_CFLAGS@ ENABLED_FIPS = @ENABLED_FIPS@ # Use debhelper with automatic sequence @@ -16,18 +15,17 @@ override_dh_auto_configure: --build=$(DEB_BUILD_GNU_TYPE) \ --host=$(DEB_HOST_GNU_TYPE) \ --prefix=/usr \ - --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ --sysconfdir=/etc \ --localstatedir=/var \ - --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ - --libexecdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ + --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ + --libexecdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ --disable-maintainer-mode \ --disable-dependency-tracking \ --enable-shared \ --enable-static \ - $(CONFIGURE_OPTIONS) \ - CFLAGS="$(CONFIGURE_CFLAGS)" + $(CONFIGURE_OPTIONS) # Override test to skip them (optional, remove if you want to run tests) #override_dh_auto_test: @@ -50,22 +48,6 @@ override_dh_auto_install: dh_auto_install # Remove .la files (not needed in modern Debian packages) find debian/tmp -name '*.la' -delete - # Move libraries to multiarch directory if needed - if [ -d debian/tmp/usr/lib ]; then \ - mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH); \ - if [ -f debian/tmp/usr/lib/libwolfssl.so.* ]; then \ - mv debian/tmp/usr/lib/libwolfssl.so.* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/; \ - fi; \ - if [ -f debian/tmp/usr/lib/libwolfssl.so ]; then \ - mv debian/tmp/usr/lib/libwolfssl.so debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/; \ - fi; \ - if [ -f debian/tmp/usr/lib/libwolfssl.a ]; then \ - mv debian/tmp/usr/lib/libwolfssl.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/; \ - fi; \ - if [ -d debian/tmp/usr/lib/pkgconfig ]; then \ - mv debian/tmp/usr/lib/pkgconfig debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/; \ - fi; \ - fi # Set proper permissions and strip symbols override_dh_strip: diff --git a/doc/dox_comments/header_files/ecc.h b/doc/dox_comments/header_files/ecc.h index 20bd89ccd..ce48cf634 100644 --- a/doc/dox_comments/header_files/ecc.h +++ b/doc/dox_comments/header_files/ecc.h @@ -113,6 +113,114 @@ int wc_ecc_make_key(WC_RNG* rng, int keysize, ecc_key* key); int wc_ecc_make_key_ex(WC_RNG* rng, int keysize, ecc_key* key, int curve_id); +/*! + \ingroup ECC + + \brief wc_ecc_make_pub computes the public component from an ecc_key with an + existing private component. If pubOut is supplied, the computed public key + is stored there, else it is stored in the supplied ecc_key public component + slot. + + \return 0 Returned on success. + \return ECC_BAD_ARG_E Returned if rng or key evaluate to NULL + \return BAD_FUNC_ARG Returned if the supplied key is not a valid ecc_key. + \return MEMORY_E Returned if there is an error allocating memory while + computing the public key + \return MP_INIT_E may be returned if there is an error while computing + the public key + \return MP_READ_E may be returned if there is an error while computing + the public key + \return MP_CMP_E may be returned if there is an error while computing the + public key + \return MP_INVMOD_E may be returned if there is an error while computing + the public key + \return MP_EXPTMOD_E may be returned if there is an error while computing + the public key + \return MP_MOD_E may be returned if there is an error while computing the + public key + \return MP_MUL_E may be returned if there is an error while computing the + public key + \return MP_ADD_E may be returned if there is an error while computing the + public key + \return MP_MULMOD_E may be returned if there is an error while computing + the public key + \return MP_TO_E may be returned if there is an error while computing the + public key + \return MP_MEM may be returned if there is an error while computing the + public key + \return ECC_OUT_OF_RANGE_E may be returned if there is an error while computing the + public key + \return ECC_PRIV_KEY_E may be returned if there is an error while computing the + public key + \return ECC_INF_E may be returned if there is an error while computing the + public key + + \param key Pointer to an ecc_key containing a valid private component + \param pubOut Optional pointer to an ecc_point struct in which to store + the computed public key + + \sa wc_ecc_make_pub_ex + \sa wc_ecc_make_key +*/ + +int wc_ecc_make_pub(ecc_key* key, ecc_point* pubOut); + +/*! + \ingroup ECC + + \brief wc_ecc_make_pub_ex computes the public component from an ecc_key with + an existing private component. If pubOut is supplied, the computed public + key is stored there, else it is stored in the supplied ecc_key public + component slot. The supplied rng, if non-NULL, is used to blind the private + key value used in the computation. If rng is NULL, an ephemeral rng is + instantiated internally. + + \return 0 Returned on success. + \return ECC_BAD_ARG_E Returned if rng or key evaluate to NULL + \return BAD_FUNC_ARG Returned if the supplied key is not a valid ecc_key. + \return MEMORY_E Returned if there is an error allocating memory while + computing the public key + \return MP_INIT_E may be returned if there is an error while computing + the public key + \return MP_READ_E may be returned if there is an error while computing + the public key + \return MP_CMP_E may be returned if there is an error while computing the + public key + \return MP_INVMOD_E may be returned if there is an error while computing + the public key + \return MP_EXPTMOD_E may be returned if there is an error while computing + the public key + \return MP_MOD_E may be returned if there is an error while computing the + public key + \return MP_MUL_E may be returned if there is an error while computing the + public key + \return MP_ADD_E may be returned if there is an error while computing the + public key + \return MP_MULMOD_E may be returned if there is an error while computing + the public key + \return MP_TO_E may be returned if there is an error while computing the + public key + \return MP_MEM may be returned if there is an error while computing the + public key + \return ECC_OUT_OF_RANGE_E may be returned if there is an error while computing the + public key + \return ECC_PRIV_KEY_E may be returned if there is an error while computing the + public key + \return ECC_INF_E may be returned if there is an error while computing the + public key + + \param key Pointer to an ecc_key containing a valid private component + \param pubOut Optional pointer to an ecc_point struct in which to store + the computed public key + \param rng Rng to be used in the public key computation + + \sa wc_ecc_make_pub + \sa wc_ecc_make_key + \sa wc_InitRng +*/ + +int wc_ecc_make_pub_ex(ecc_key* key, ecc_point* pubOut, WC_RNG* rng); + /*! \ingroup ECC @@ -960,6 +1068,7 @@ int wc_ecc_mulmod(mp_int* k, ecc_point *G, ecc_point *R, \sa wc_ecc_export_x963_ex \sa wc_ecc_import_x963 + \sa wc_ecc_make_pub */ int wc_ecc_export_x963(ecc_key* key, byte* out, word32* outLen); @@ -967,23 +1076,25 @@ int wc_ecc_export_x963(ecc_key* key, byte* out, word32* outLen); /*! \ingroup ECC - \brief This function exports the ECC key from the ecc_key structure, + \brief This function exports the public key from the ecc_key structure, storing the result in out. The key will be stored in ANSI X9.63 format. It stores the bytes written to the output buffer in outLen. This function allows the additional option of compressing the certificate through the compressed parameter. When this parameter is true, the key will be stored in ANSI X9.63 compressed format. - \return 0 Returned on successfully exporting the ecc_key + \return 0 Returned on successfully exporting the ecc_key public component + \return ECC_PRIVATEKEY_ONLY Returned if the ecc_key public component is + missing \return NOT_COMPILED_IN Returned if the HAVE_COMP_KEY was not enabled at compile time, but the key was requested in compressed format \return LENGTH_ONLY_E Returned if the output buffer evaluates to NULL, but the other two input parameters are valid. Indicates that the function is - only returning the length required to store the key + only returning the length required to store the public key \return ECC_BAD_ARG_E Returned if any of the input parameters are NULL, or the key is unsupported (has an invalid index) \return BUFFER_E Returned if the output buffer is too small to store the - ecc key. If the output buffer is too small, the size needed will be + public key. If the output buffer is too small, the size needed will be returned in outLen \return MEMORY_E Returned if there is an error allocating memory with XMALLOC @@ -1010,9 +1121,9 @@ int wc_ecc_export_x963(ecc_key* key, byte* out, word32* outLen); \param key pointer to the ecc_key object to export \param out pointer to the buffer in which to store the ANSI X9.63 - formatted key + formatted public key \param outLen size of the output buffer. On successfully storing the - key, will hold the bytes written to the output buffer + public key, will hold the bytes written to the output buffer \param compressed indicator of whether to store the key in compressed format. 1==compressed, 0==uncompressed @@ -1031,6 +1142,7 @@ int wc_ecc_export_x963(ecc_key* key, byte* out, word32* outLen); \sa wc_ecc_export_x963 \sa wc_ecc_import_x963 + \sa wc_ecc_make_pub */ int wc_ecc_export_x963_ex(ecc_key* key, byte* out, word32* outLen, int compressed); diff --git a/gencertbuf.pl b/gencertbuf.pl index 70ae18682..0c2d70af8 100755 --- a/gencertbuf.pl +++ b/gencertbuf.pl @@ -13,7 +13,8 @@ use warnings; # ---- SCRIPT SETTINGS ------------------------------------------------------- # output C header file to write cert/key buffers to -my $outputFile = "./wolfssl/certs_test.h"; +my $outputFile = "./wolfssl/certs_test.h"; +my $outputFileSM = "./wolfssl/certs_test_sm.h"; # ecc keys and certs to be converted # Used with HAVE_ECC && USE_CERT_BUFFERS_256 @@ -109,6 +110,42 @@ my @fileList_4096 = ( [ "./certs/dh4096.der", "dh_key_der_4096" ], ); +# SM ciphers PRM format in certs/sm2 +my @fileList_sm2 = ( + [ "./certs/sm2/ca-sm2.pem", "ca_sm2" ], + [ "./certs/sm2/ca-sm2-key.pem", "ca_sm2_key" ], + [ "./certs/sm2/ca-sm2-priv.pem", "ca_sm2_priv" ], + [ "./certs/sm2/client-sm2.pem", "client_sm2" ], + [ "./certs/sm2/client-sm2-key.pem", "client_sm2_key" ], + [ "./certs/sm2/client-sm2-priv.pem", "client_sm2_priv" ], + [ "./certs/sm2/root-sm2.pem", "root_sm2" ], + [ "./certs/sm2/root-sm2-key.pem", "root_sm2_key" ], + [ "./certs/sm2/root-sm2-priv.pem", "root_sm2_priv" ], + [ "./certs/sm2/self-sm2-cert.pem", "self_sm2_cert" ], + [ "./certs/sm2/self-sm2-key.pem", "self_sm2_key" ], + [ "./certs/sm2/self-sm2-priv.pem", "self_sm2_priv" ], + [ "./certs/sm2/server-sm2.pem", "server_sm2" ], + [ "./certs/sm2/server-sm2-cert.pem", "server_sm2_cert" ], + [ "./certs/sm2/server-sm2-key.pem", "server_sm2_key" ], + [ "./certs/sm2/server-sm2-priv.pem", "server_sm2_priv" ], + ); + +my @fileList_sm2_der = ( + [ "./certs/sm2/ca-sm2.der", "ca_sm2_der" ], + [ "./certs/sm2/ca-sm2-key.der", "ca_sm2_key_der" ], + [ "./certs/sm2/ca-sm2-priv.der", "ca_sm2_priv_der" ], + [ "./certs/sm2/client-sm2.der", "client_sm2_der" ], + [ "./certs/sm2/client-sm2-key.der", "client_sm2_key_der" ], + [ "./certs/sm2/client-sm2-priv.der", "client_sm2_priv_der" ], + [ "./certs/sm2/root-sm2.der", "root_sm2_der" ], + [ "./certs/sm2/root-sm2-key.der", "root_sm2_key_der" ], + [ "./certs/sm2/root-sm2-priv.der", "root_sm2_priv_der" ], + [ "./certs/sm2/server-sm2.der", "server_sm2_der" ], + [ "./certs/sm2/server-sm2-cert.der", "server_sm2_cert_der" ], + [ "./certs/sm2/server-sm2-key.der", "server_sm2_key_der" ], + [ "./certs/sm2/server-sm2-priv.der", "server_sm2_priv_der" ], + ); + #Falcon Post-Quantum Keys #Used with HAVE_PQC my @fileList_falcon = ( @@ -130,15 +167,17 @@ my @fileList_sphincs = ( # ---------------------------------------------------------------------------- -my $num_ecc = @fileList_ecc; -my $num_ed = @fileList_ed; -my $num_x = @fileList_x; -my $num_1024 = @fileList_1024; -my $num_2048 = @fileList_2048; -my $num_3072 = @fileList_3072; -my $num_4096 = @fileList_4096; -my $num_falcon = @fileList_falcon; -my $num_sphincs = @fileList_sphincs; +my $num_ecc = @fileList_ecc; +my $num_ed = @fileList_ed; +my $num_x = @fileList_x; +my $num_1024 = @fileList_1024; +my $num_2048 = @fileList_2048; +my $num_3072 = @fileList_3072; +my $num_4096 = @fileList_4096; +my $num_sm2 = @fileList_sm2; +my $num_sm2_der = @fileList_sm2_der; +my $num_falcon = @fileList_falcon; +my $num_sphincs = @fileList_sphincs; # open our output file, "+>" creates and/or truncates open OUT_FILE, "+>", $outputFile or die $!; @@ -2202,9 +2241,68 @@ print OUT_FILE "#endif /* WOLFSSL_CERTS_TEST_H */\n\n"; # close certs_test.h file close OUT_FILE or die $!; +#--------------------------------------------------------------------------- +# open our output file, "+>" creates and/or truncates +open OUT_FILE_SM, "+>", $outputFileSM or die $!; + +print OUT_FILE_SM "/* certs_test_sm.h */\n"; +print OUT_FILE_SM "/* This file was generated using: ./gencertbuf.pl */\n\n"; +print OUT_FILE_SM "#ifndef WOLFSSL_CERTS_TEST_SM_H\n"; +print OUT_FILE_SM "#define WOLFSSL_CERTS_TEST_SM_H\n\n"; +print OUT_FILE_SM "#if defined(WOLFSSL_SM2) || defined(WOLFSSL_SM3) || defined(WOLFSSL_SM4)\n\n"; +print OUT_FILE_SM " /* DER Certs Begin */\n\n"; + +# convert and print SM2 DER format certs/keys +for (my $i = 0; $i < $num_sm2_der; $i++) { + + my $fname = $fileList_sm2_der[$i][0]; + my $sname = $fileList_sm2_der[$i][1]; + + print OUT_FILE_SM "/* $fname */\n"; + print OUT_FILE_SM "static const unsigned char $sname\[] =\n"; + print OUT_FILE_SM "{\n"; + file_to_hex($fname, \*OUT_FILE_SM); + print OUT_FILE_SM "};\n"; + # In C89/C90 (which Watcom generally defaults to), sizeof must be a + # compile-time constant expression when used in a static initializer. + # So don't use `static const int sizeof_` here: + print OUT_FILE_SM "#define sizeof_$sname (sizeof($sname))\n\n"; +} +print OUT_FILE_SM " /* DER Certs End */\n\n"; + + +# convert and print SM2 PEM format certs/keys +print OUT_FILE_SM "#ifdef WOLFSSL_NO_PEM\n\n"; +print OUT_FILE_SM " /* SM PEM Certs disabled */\n\n"; +print OUT_FILE_SM "#else\n\n"; + +for (my $i = 0; $i < $num_sm2; $i++) { + + my $fname = $fileList_sm2[$i][0]; + my $sname = $fileList_sm2[$i][1]; + + print OUT_FILE_SM "/* $fname */\n"; + print OUT_FILE_SM "static const unsigned char $sname\[] =\n"; + print OUT_FILE_SM "{\n"; + file_to_hex($fname, \*OUT_FILE_SM); + print OUT_FILE_SM "};\n"; + # In C89/C90 (which Watcom generally defaults to), sizeof must be a + # compile-time constant expression when used in a static initializer. + # So don't use `static const int sizeof_` here: + print OUT_FILE_SM "#define sizeof_$sname (sizeof($sname))\n\n"; +} + +print OUT_FILE_SM "#endif /* WOLFSSL_NO_PEM */\n\n"; +print OUT_FILE_SM "#endif /* WOLFSSL_SM2 || WOLFSSL_SM3 || WOLFSSL_SM4 */\n"; +print OUT_FILE_SM "#endif /* WOLFSSL_CERTS_TEST_SM_H */\n"; + +# close certs_test_sm.h file +close OUT_FILE_SM or die $!; + # print file as hex, comma-separated, as needed by C buffer sub file_to_hex { - my $fileName = $_[0]; + my ($fileName, $out_fh) = @_; + $out_fh //= \*OUT_FILE; # default handle open my $fp, "<", $fileName or die $!; binmode($fp); @@ -2215,26 +2313,27 @@ sub file_to_hex { for (my $i = 0, my $j = 1; $i < $fileLen; $i++, $j++) { if ($j == 1) { - print OUT_FILE " "; + print {$out_fh} " "; } if ($j != 1) { - print OUT_FILE " "; + print {$out_fh} " "; } read($fp, $byte, 1) or die "Error reading $fileName"; my $output = sprintf("0x%02X", ord($byte)); - print OUT_FILE $output; + print {$out_fh} $output; if ($i != ($fileLen - 1)) { - print OUT_FILE ","; + print {$out_fh} ","; } if ($j == 10) { $j = 0; - print OUT_FILE "\n"; + print {$out_fh} "\n"; } } - print OUT_FILE "\n"; + print {$out_fh} "\n"; close($fp); } + diff --git a/linuxkm/Kbuild b/linuxkm/Kbuild index 7f86da0f9..74f055061 100644 --- a/linuxkm/Kbuild +++ b/linuxkm/Kbuild @@ -131,6 +131,9 @@ ifeq "$(ENABLED_LINUXKM_PIE)" "yes" # using inline retpolines leads to "unannotated intra-function call" # warnings from objtool without this: $(WOLFCRYPT_PIE_FILES): OBJECT_FILES_NON_STANDARD := y + ifdef FORCE_GLOBAL_OBJTOOL_OFF + undefine CONFIG_OBJTOOL + endif endif ifdef KERNEL_EXTRA_CFLAGS_REMOVE @@ -176,8 +179,6 @@ ifeq "$(ENABLED_LINUXKM_PIE)" "yes" LDFLAGS_libwolfssl.o += -T $(src)/wolfcrypt.lds -rename-pie-text-and-data-sections: $(WOLFSSL_OBJ_TARGETS) - ifndef NM NM := nm endif @@ -186,31 +187,30 @@ ifndef OBJCOPY OBJCOPY := objcopy endif -.PHONY: rename-pie-text-and-data-sections -rename-pie-text-and-data-sections: -ifneq "$(quiet)" "silent_" - @echo -n ' Checking wolfCrypt for unresolved symbols and forbidden relocations... ' -endif - @cd "$(obj)" || exit $$? - $(LD) -relocatable -o wolfcrypt_test_link.o $(WOLFCRYPT_PIE_FILES) || exit $$? - undefined=$$($(NM) --undefined-only wolfcrypt_test_link.o) || exit $$? - GOT_relocs=$$($(READELF) --relocs --wide wolfcrypt_test_link.o | egrep '^[^ ]+ +[^ ]+ +[^ ]*GOT[^ ]* ') || [ $$? = 1 ] || exit 2 - rm wolfcrypt_test_link.o - if [ -n "$$undefined" ]; then - echo "wolfCrypt container has unresolved symbols:" 1>&2 - echo "$$undefined" 1>&2 - exit 1 - fi - if [ -n "$$GOT_relocs" ]; then - echo "wolfCrypt container has GOT relocations (non-local function address used as operand?):" 1>&2 - echo "$$GOT_relocs" 1>&2 - exit 1 - fi -ifneq "$(quiet)" "silent_" - echo 'OK.' -endif - cd "$(obj)" || exit $$? - for file in $(WOLFCRYPT_PIE_FILES); do +RENAME_PIE_TEXT_AND_DATA_SECTIONS := \ + if [[ "$(quiet)" != "silent_" ]]; then \ + echo -n ' Checking wolfCrypt for unresolved symbols and forbidden relocations... '; \ + fi; \ + cd "$(obj)" || exit $$?; \ + $(LD) -relocatable -o wolfcrypt_test_link.o $(WOLFCRYPT_PIE_FILES) || exit $$?; \ + undefined=$$($(NM) --undefined-only wolfcrypt_test_link.o) || exit $$?; \ + GOT_relocs=$$($(READELF) --relocs --wide wolfcrypt_test_link.o | grep -E '^[^ ]+ +[^ ]+ +[^ ]*GOT[^ ]* ') || [ $$? = 1 ] || exit 2; \ + rm wolfcrypt_test_link.o; \ + if [ -n "$$undefined" ]; then \ + echo "wolfCrypt container has unresolved symbols:" 1>&2; \ + echo "$$undefined" 1>&2; \ + exit 1; \ + fi; \ + if [ -n "$$GOT_relocs" ]; then \ + echo "wolfCrypt container has GOT relocations (non-local function address used as operand?):" 1>&2; \ + echo "$$GOT_relocs" 1>&2; \ + exit 1; \ + fi; \ + if [[ "$(quiet)" != "silent_" ]]; then \ + echo 'OK.'; \ + fi; \ + cd "$(obj)" || exit $$?; \ + for file in $(WOLFCRYPT_PIE_FILES); do \ $(OBJCOPY) --rename-section .text=.text.wolfcrypt \ --rename-section .text.unlikely=.text.wolfcrypt \ --rename-section .rodata=.rodata.wolfcrypt \ @@ -220,8 +220,8 @@ endif --rename-section .rodata.cst32=.rodata.wolfcrypt \ --rename-section .data=.data.wolfcrypt \ --rename-section .data.rel.local=.data.wolfcrypt \ - --rename-section .bss=.bss.wolfcrypt "$$file" || exit $$? - done + --rename-section .bss=.bss.wolfcrypt "$$file" || exit $$?; \ + done; \ [ "$(KERNEL_ARCH_X86)" != "yes" ] || \ { $(READELF) --sections --syms --wide $(WOLFCRYPT_PIE_FILES) | \ $(AWK) -v obj="$(obj)" ' \ @@ -295,19 +295,16 @@ endif } else { \ exit(0); \ }}'; } || \ - { echo 'Error: symbol(s) missed by containerization.' >&2; exit 1; } -ifneq "$(quiet)" "silent_" - echo ' wolfCrypt .{text,data,rodata} sections containerized to .{text,data,rodata}.wolfcrypt' + { echo 'Error: symbol(s) missed by containerization.' >&2; exit 1; }; \ + if [[ "$(quiet)" != "silent_" ]]; then \ + echo ' wolfCrypt .{text,data,rodata} sections containerized to .{text,data,rodata}.wolfcrypt'; \ + fi endif -$(obj)/linuxkm/module_exports.c: rename-pie-text-and-data-sections - -endif - - # auto-generate the exported symbol list, leveraging the WOLFSSL_API visibility tags. # exclude symbols that don't match wc_* or wolf*. $(obj)/linuxkm/module_exports.c: $(src)/module_exports.c.template $(WOLFSSL_OBJ_TARGETS) $(obj)/linuxkm/module_hooks.o + @$(RENAME_PIE_TEXT_AND_DATA_SECTIONS) @cp $< $@ || exit $$? if [[ "$${VERSION}" -gt 6 || ("$${VERSION}" -eq 6 && "$${PATCHLEVEL}" -ge 13) ]]; then # use ASCII octal escape to avoid syntax disruption in the awk script. diff --git a/linuxkm/Makefile b/linuxkm/Makefile index 5ce7af716..c0914347c 100644 --- a/linuxkm/Makefile +++ b/linuxkm/Makefile @@ -18,12 +18,11 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA +.ONESHELL: SHELL=bash all: libwolfssl.ko libwolfssl.ko.signed -.PHONY: libwolfssl.ko - ifndef MODULE_TOP MODULE_TOP=$(CURDIR) endif @@ -90,19 +89,15 @@ ifndef AWK AWK := awk endif -libwolfssl.ko: - @if test -z '$(KERNEL_ROOT)'; then echo '$$KERNEL_ROOT is unset' >&2; exit 1; fi - @if test -z '$(AM_CFLAGS)$(CFLAGS)'; then echo '$$AM_CFLAGS and $$CFLAGS are both unset.' >&2; exit 1; fi - @if test -z '$(src_libwolfssl_la_OBJECTS)'; then echo '$$src_libwolfssl_la_OBJECTS is unset.' >&2; exit 1; fi - # after commit 9a0ebe5011 (6.10), sources must be in $(obj). work around this by making links to all needed sources: - @mkdir -p '$(MODULE_TOP)/linuxkm' - @test '$(MODULE_TOP)/module_hooks.c' -ef '$(MODULE_TOP)/linuxkm/module_hooks.c' || cp --no-dereference --symbolic-link --no-clobber '$(MODULE_TOP)'/*.[ch] '$(MODULE_TOP)/linuxkm/' - @test '$(SRC_TOP)/wolfcrypt/src/wc_port.c' -ef '$(MODULE_TOP)/wolfcrypt/src/wc_port.c' || cp --no-dereference --symbolic-link --no-clobber --recursive '$(SRC_TOP)/wolfcrypt' '$(MODULE_TOP)/' - @test '$(SRC_TOP)/src/wolfio.c' -ef '$(MODULE_TOP)/src/wolfio.c' || cp --no-dereference --symbolic-link --no-clobber --recursive '$(SRC_TOP)/src' '$(MODULE_TOP)/' -ifeq "$(ENABLED_LINUXKM_PIE)" "yes" - @echo -e "const unsigned int wc_linuxkm_pie_reloc_tab[] = { ~0U };\nconst size_t wc_linuxkm_pie_reloc_tab_length = 1;" > wc_linuxkm_pie_reloc_tab.c - +$(MAKE) ARCH='$(KERNEL_ARCH)' $(OVERRIDE_PATHS) $(CROSS_COMPILE) -C '$(KERNEL_ROOT)' M='$(MODULE_TOP)' $(KBUILD_EXTRA_FLAGS) CC_FLAGS_FTRACE= - @$(READELF) --wide -r libwolfssl.ko | \ +ifndef TMPDIR + TMPDIR := /tmp +endif + +ifndef MAKE_TMPDIR + MAKE_TMPDIR := $(TMPDIR) +endif + +GENERATE_RELOC_TAB := $(READELF) --wide -r libwolfssl.ko | \ $(AWK) 'BEGIN { \ n=0; \ bad_relocs=0; \ @@ -133,12 +128,53 @@ ifeq "$(ENABLED_LINUXKM_PIE)" "yes" exit(1); \ } \ print "~0U };\nconst size_t wc_linuxkm_pie_reloc_tab_length = sizeof wc_linuxkm_pie_reloc_tab / sizeof wc_linuxkm_pie_reloc_tab[0];";\ - }' > wc_linuxkm_pie_reloc_tab.c + }' + +.PHONY: libwolfssl.ko +libwolfssl.ko: + @if test -z '$(KERNEL_ROOT)'; then echo '$$KERNEL_ROOT is unset' >&2; exit 1; fi + @if test -z '$(AM_CFLAGS)$(CFLAGS)'; then echo '$$AM_CFLAGS and $$CFLAGS are both unset.' >&2; exit 1; fi + @if test -z '$(src_libwolfssl_la_OBJECTS)'; then echo '$$src_libwolfssl_la_OBJECTS is unset.' >&2; exit 1; fi + # after commit 9a0ebe5011 (6.10), sources must be in $(obj). work around this by making links to all needed sources: + @mkdir -p '$(MODULE_TOP)/linuxkm' + @test '$(MODULE_TOP)/module_hooks.c' -ef '$(MODULE_TOP)/linuxkm/module_hooks.c' || cp --verbose --no-dereference --symbolic-link --no-clobber '$(MODULE_TOP)'/*.[ch] '$(MODULE_TOP)/linuxkm/' + @test '$(SRC_TOP)/wolfcrypt/src/wc_port.c' -ef '$(MODULE_TOP)/wolfcrypt/src/wc_port.c' || cp --verbose --no-dereference --symbolic-link --no-clobber --recursive '$(SRC_TOP)/wolfcrypt' '$(MODULE_TOP)/' + @test '$(SRC_TOP)/src/wolfio.c' -ef '$(MODULE_TOP)/src/wolfio.c' || cp --verbose --no-dereference --symbolic-link --no-clobber --recursive '$(SRC_TOP)/src' '$(MODULE_TOP)/' +ifeq "$(ENABLED_LINUXKM_PIE)" "yes" + @$(eval RELOC_TMP := $(shell mktemp "$(MAKE_TMPDIR)/wc_linuxkm_pie_reloc_tab.c.XXXXXX")) + @[[ -f wc_linuxkm_pie_reloc_tab.c ]] || echo -e "const unsigned int wc_linuxkm_pie_reloc_tab[] = { ~0U };\nconst size_t wc_linuxkm_pie_reloc_tab_length = 1;" > wc_linuxkm_pie_reloc_tab.c + @if [[ -f libwolfssl.ko ]]; then touch -r libwolfssl.ko "$(RELOC_TMP)"; fi +$(MAKE) ARCH='$(KERNEL_ARCH)' $(OVERRIDE_PATHS) $(CROSS_COMPILE) -C '$(KERNEL_ROOT)' M='$(MODULE_TOP)' $(KBUILD_EXTRA_FLAGS) CC_FLAGS_FTRACE= + # if the above make didn't build a fresh libwolfssl.ko, then the module is already up to date and we leave it untouched, assuring stability for purposes of module-update-fips-hash. + @if [[ ! libwolfssl.ko -nt "$(RELOC_TMP)" ]]; then rm "$(RELOC_TMP)"; exit 0; fi + @$(GENERATE_RELOC_TAB) >| wc_linuxkm_pie_reloc_tab.c + +$(MAKE) ARCH='$(KERNEL_ARCH)' $(OVERRIDE_PATHS) $(CROSS_COMPILE) -C '$(KERNEL_ROOT)' M='$(MODULE_TOP)' $(KBUILD_EXTRA_FLAGS) CC_FLAGS_FTRACE= + @$(GENERATE_RELOC_TAB) >| $(RELOC_TMP) + @if diff wc_linuxkm_pie_reloc_tab.c $(RELOC_TMP); then echo " Relocation table is stable."; else echo "PIE failed: relocation table is unstable." 1>&2; rm $(RELOC_TMP); exit 1; fi + @rm $(RELOC_TMP) else +$(MAKE) ARCH='$(KERNEL_ARCH)' $(OVERRIDE_PATHS) $(CROSS_COMPILE) -C '$(KERNEL_ROOT)' M='$(MODULE_TOP)' $(KBUILD_EXTRA_FLAGS) endif +.PHONY: module-update-fips-hash +module-update-fips-hash: libwolfssl.ko + @if test -z '$(FIPS_HASH)'; then echo ' $$FIPS_HASH is unset' >&2; exit 1; fi + @if [[ ! '$(FIPS_HASH)' =~ [0-9a-fA-F]{64} ]]; then echo ' $$FIPS_HASH is malformed' >&2; exit 1; fi + @readarray -t rodata_segment < <($(READELF) --wide --sections libwolfssl.ko | \ + sed -E -n 's/^[[:space:]]*\[[[:space:]]*([0-9]+)\][[:space:]]+\.rodata\.wolfcrypt[[:space:]]+PROGBITS[[:space:]]+[0-9a-fA-F]+[[:space:]]+([0-9a-fA-F]+)[[:space:]].*$$/\1\n\2/p'); \ + if [[ $${#rodata_segment[@]} != 2 ]]; then echo ' unexpected rodata_segment.' >&2; exit 1; fi; \ + readarray -t verifyCore_attrs < <($(READELF) --wide --symbols libwolfssl.ko | \ + sed -E -n 's/^[[:space:]]*[0-9]+: ([0-9a-fA-F]+)[[:space:]]+([0-9]+)[[:space:]]+OBJECT[[:space:]]+[A-Z]+[[:space:]]+[A-Z]+[[:space:]]+'"$${rodata_segment[0]}"'[[:space:]]+verifyCore$$/\1\n\2/p'); \ + if [[ $${#verifyCore_attrs[@]} != 2 ]]; then echo ' unexpected verifyCore_attrs.' >&2; exit 1; fi; \ + if [[ "$${verifyCore_attrs[1]}" != "65" ]]; then echo " verifyCore has unexpected length $${verifyCore_attrs[1]}." >&2; exit 1; fi; \ + verifyCore_offset=$$((0x$${rodata_segment[1]} + 0x$${verifyCore_attrs[0]})); \ + current_verifyCore=$$(dd bs=1 if=libwolfssl.ko skip=$$verifyCore_offset count=64 status=none); \ + if [[ ! "$$current_verifyCore" =~ [0-9a-fA-F]{64} ]]; then echo " verifyCore at offset $$verifyCore_offset has unexpected value." >&2; exit 1; fi; \ + if [[ '$(FIPS_HASH)' == "$$current_verifyCore" ]]; then echo ' Supplied FIPS_HASH matches existing verifyCore -- no update needed.'; exit 0; fi; \ + echo -n '$(FIPS_HASH)' | dd bs=1 conv=notrunc of=libwolfssl.ko seek=$$verifyCore_offset count=64 status=none && \ + echo " FIPS verifyCore updated successfully." && \ + if [[ -f libwolfssl.ko.signed ]]; then $(MAKE) -C . libwolfssl.ko.signed; fi + libwolfssl.ko.signed: libwolfssl.ko ifdef FORCE_NO_MODULE_SIG @echo 'Skipping module signature operation because FORCE_NO_MODULE_SIG.' diff --git a/linuxkm/lkcapi_dh_glue.c b/linuxkm/lkcapi_dh_glue.c index 69cfffe5a..8b3ff0ce5 100644 --- a/linuxkm/lkcapi_dh_glue.c +++ b/linuxkm/lkcapi_dh_glue.c @@ -36,9 +36,8 @@ #endif #if defined(LINUXKM_LKCAPI_REGISTER_DH) && \ - (!defined(WOLFSSL_DH_EXTRA) || \ - !defined(WOLFSSL_DH_GEN_PUB)) - /* not supported without WOLFSSL_DH_EXTRA && WOLFSSL_DH_GEN_PUB */ + !defined(WOLFSSL_DH_EXTRA) + /* not supported without WOLFSSL_DH_EXTRA */ #undef LINUXKM_LKCAPI_REGISTER_DH #if defined(LINUXKM_LKCAPI_REGISTER_ALL_KCONFIG) && defined(CONFIG_CRYPTO_DH) diff --git a/src/internal.c b/src/internal.c index 4608839eb..8f479c2b0 100644 --- a/src/internal.c +++ b/src/internal.c @@ -7396,6 +7396,7 @@ int ReinitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup) ssl->arrays->preMasterSecret = (byte*)XMALLOC(ENCRYPT_LEN, ssl->heap, DYNAMIC_TYPE_SECRET); if (ssl->arrays->preMasterSecret == NULL) { + WOLFSSL_MSG("preMasterSecret Memory error"); return MEMORY_E; } #ifdef WOLFSSL_CHECK_MEM_ZERO @@ -11179,8 +11180,10 @@ static WC_INLINE int GrowOutputBuffer(WOLFSSL* ssl, int size) return BUFFER_E; if (! WC_SAFE_SUM_WORD32(newSz, (word32)size, newSz)) return BUFFER_E; +#if WOLFSSL_GENERAL_ALIGNMENT > 0 if (! WC_SAFE_SUM_WORD32(newSz, align, newSz)) return BUFFER_E; +#endif tmp = (byte*)XMALLOC(newSz, ssl->heap, DYNAMIC_TYPE_OUT_BUFFER); newSz -= align; WOLFSSL_MSG("growing output buffer"); @@ -32243,6 +32246,188 @@ exit_gdpk: return ret; } #endif +#if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448) +static int GetEcDiffieHellmanKea(WOLFSSL *ssl, + const byte *input, word32 size, DskeArgs *args) +{ + int ret; + byte b; +#ifdef HAVE_ECC + int curveId; +#endif + int curveOid; + word16 length; + + if ((args->idx - args->begin) + ENUM_LEN + OPAQUE16_LEN + + OPAQUE8_LEN > size) { + return BUFFER_ERROR; + } + + b = input[args->idx++]; + if (b != named_curve) { + return ECC_CURVETYPE_ERROR; + } + + args->idx += 1; /* curve type, eat leading 0 */ + b = input[args->idx++]; + if ((curveOid = CheckCurveId(b)) < 0) { + return ECC_CURVE_ERROR; + } + ssl->ecdhCurveOID = (word32) curveOid; +#if defined(WOLFSSL_TLS13) || defined(HAVE_FFDHE) + ssl->namedGroup = 0; +#endif + + length = input[args->idx++]; + if ((args->idx - args->begin) + length > size) { + return BUFFER_ERROR; + } +#ifdef HAVE_CURVE25519 + if (ssl->ecdhCurveOID == ECC_X25519_OID) { + if (ssl->peerX25519Key == NULL) { + ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE25519, + (void **)&ssl->peerX25519Key); + if (ret != 0) { + return ret; + } + } + else if (ssl->peerX25519KeyPresent) { + ret = ReuseKey(ssl, DYNAMIC_TYPE_CURVE25519, ssl->peerX25519Key); + ssl->peerX25519KeyPresent = 0; + if (ret != 0) { + return ret; + } + } + + if ((ret = wc_curve25519_check_public(input + args->idx, length, + EC25519_LITTLE_ENDIAN)) != 0) { +#ifdef WOLFSSL_EXTRA_ALERTS + if (ret == WC_NO_ERR_TRACE(BUFFER_E)) + SendAlert(ssl, alert_fatal, decode_error); + else if (ret == WC_NO_ERR_TRACE(ECC_OUT_OF_RANGE_E)) + SendAlert(ssl, alert_fatal, bad_record_mac); + else { + SendAlert(ssl, alert_fatal, illegal_parameter); + } +#else + (void)ret; +#endif + return ECC_PEERKEY_ERROR; + } + + if (wc_curve25519_import_public_ex(input + args->idx, + length, ssl->peerX25519Key, + EC25519_LITTLE_ENDIAN) != 0) { + return ECC_PEERKEY_ERROR; + } + + args->idx += length; + ssl->peerX25519KeyPresent = 1; + return 0; + } +#endif +#ifdef HAVE_CURVE448 + if (ssl->ecdhCurveOID == ECC_X448_OID) { + if (ssl->peerX448Key == NULL) { + ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE448, + (void **)&ssl->peerX448Key); + if (ret != 0) { + return ret; + } + } + else if (ssl->peerX448KeyPresent) { + ret = ReuseKey(ssl, DYNAMIC_TYPE_CURVE448, ssl->peerX448Key); + ssl->peerX448KeyPresent = 0; + if (ret != 0) { + return ret; + } + } + + if ((ret = wc_curve448_check_public(input + args->idx, length, + EC448_LITTLE_ENDIAN)) != 0) { +#ifdef WOLFSSL_EXTRA_ALERTS + if (ret == WC_NO_ERR_TRACE(BUFFER_E)) + SendAlert(ssl, alert_fatal, decode_error); + else if (ret == WC_NO_ERR_TRACE(ECC_OUT_OF_RANGE_E)) + SendAlert(ssl, alert_fatal, bad_record_mac); + else { + SendAlert(ssl, alert_fatal, illegal_parameter); + } +#else + (void)ret; +#endif + return ECC_PEERKEY_ERROR; + } + + if (wc_curve448_import_public_ex(input + args->idx, + length, ssl->peerX448Key, + EC448_LITTLE_ENDIAN) != 0) { + return ECC_PEERKEY_ERROR; + } + + args->idx += length; + ssl->peerX448KeyPresent = 1; + return 0; + } +#endif +#ifdef HAVE_ECC + if (ssl->peerEccKey == NULL) { + ret = AllocKey(ssl, DYNAMIC_TYPE_ECC, (void **)&ssl->peerEccKey); + if (ret != 0) { + return ret; + } + } + else if (ssl->peerEccKeyPresent) { + ret = ReuseKey(ssl, DYNAMIC_TYPE_ECC, ssl->peerEccKey); + ssl->peerEccKeyPresent = 0; + if (ret != 0) { + return ret; + } + } + + curveId = wc_ecc_get_oid((word32) curveOid, NULL, NULL); + if (wc_ecc_import_x963_ex(input + args->idx, length, + ssl->peerEccKey, curveId) != 0) { +#ifdef WOLFSSL_EXTRA_ALERTS + SendAlert(ssl, alert_fatal, illegal_parameter); +#endif + return ECC_PEERKEY_ERROR; + } + + args->idx += length; + ssl->peerEccKeyPresent = 1; +#endif + return 0; +} +#endif /* def(HAVE_ECC) || def(HAVE_CURVE25519) || def(HAVE_CURVE448)) */ + +#if !defined(NO_PSK) +static int GetPSKServerHint(WOLFSSL *ssl, const byte *input, word32 size, + DskeArgs *args) +{ + int srvHintLen; + word16 length; + + if ((args->idx - args->begin) + OPAQUE16_LEN > size) { + return BUFFER_ERROR; + } + + ato16(input + args->idx, &length); + args->idx += OPAQUE16_LEN; + + if ((args->idx - args->begin) + length > size) { + return BUFFER_ERROR; + } + + /* get PSK server hint from the wire */ + srvHintLen = (int)min(length, MAX_PSK_ID_LEN); + XMEMCPY(ssl->arrays->server_hint, input + args->idx, (size_t)(srvHintLen)); + ssl->arrays->server_hint[srvHintLen] = '\0'; /* null term */ + + args->idx += length; + return 0; +} +#endif /* !defined(NO_PSK) */ /* handle processing of server_key_exchange (12) */ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input, @@ -32310,26 +32495,7 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input, #ifndef NO_PSK case psk_kea: { - int srvHintLen; - word16 length; - - if ((args->idx - args->begin) + OPAQUE16_LEN > size) { - ERROR_OUT(BUFFER_ERROR, exit_dske); - } - - ato16(input + args->idx, &length); - args->idx += OPAQUE16_LEN; - - if ((args->idx - args->begin) + length > size) { - ERROR_OUT(BUFFER_ERROR, exit_dske); - } - - /* get PSK server hint from the wire */ - srvHintLen = (int)min(length, MAX_PSK_ID_LEN); - XMEMCPY(ssl->arrays->server_hint, input + args->idx, - (size_t)(srvHintLen)); - ssl->arrays->server_hint[srvHintLen] = '\0'; /* null term */ - args->idx += length; + ret = GetPSKServerHint(ssl, input, size, args); break; } #endif /* !NO_PSK */ @@ -32337,8 +32503,6 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input, case diffie_hellman_kea: { ret = GetDhPublicKey(ssl, input, size, args); - if (ret != 0) - goto exit_dske; break; } #endif /* !NO_DH */ @@ -32346,181 +32510,16 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input, defined(HAVE_CURVE448) case ecc_diffie_hellman_kea: { - byte b; - #ifdef HAVE_ECC - int curveId; - #endif - int curveOid; - word16 length; - - if ((args->idx - args->begin) + ENUM_LEN + OPAQUE16_LEN + - OPAQUE8_LEN > size) { - ERROR_OUT(BUFFER_ERROR, exit_dske); - } - - b = input[args->idx++]; - if (b != named_curve) { - ERROR_OUT(ECC_CURVETYPE_ERROR, exit_dske); - } - - args->idx += 1; /* curve type, eat leading 0 */ - b = input[args->idx++]; - if ((curveOid = CheckCurveId(b)) < 0) { - ERROR_OUT(ECC_CURVE_ERROR, exit_dske); - } - ssl->ecdhCurveOID = (word32)curveOid; - #if defined(WOLFSSL_TLS13) || defined(HAVE_FFDHE) - ssl->namedGroup = 0; - #endif - - length = input[args->idx++]; - if ((args->idx - args->begin) + length > size) { - ERROR_OUT(BUFFER_ERROR, exit_dske); - } - - #ifdef HAVE_CURVE25519 - if (ssl->ecdhCurveOID == ECC_X25519_OID) { - if (ssl->peerX25519Key == NULL) { - ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE25519, - (void**)&ssl->peerX25519Key); - if (ret != 0) { - goto exit_dske; - } - } else if (ssl->peerX25519KeyPresent) { - ret = ReuseKey(ssl, DYNAMIC_TYPE_CURVE25519, - ssl->peerX25519Key); - ssl->peerX25519KeyPresent = 0; - if (ret != 0) { - goto exit_dske; - } - } - - if ((ret = wc_curve25519_check_public( - input + args->idx, length, - EC25519_LITTLE_ENDIAN)) != 0) { - #ifdef WOLFSSL_EXTRA_ALERTS - if (ret == WC_NO_ERR_TRACE(BUFFER_E)) - SendAlert(ssl, alert_fatal, decode_error); - else if (ret == WC_NO_ERR_TRACE(ECC_OUT_OF_RANGE_E)) - SendAlert(ssl, alert_fatal, bad_record_mac); - else { - SendAlert(ssl, alert_fatal, illegal_parameter); - } - #endif - ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske); - } - - if (wc_curve25519_import_public_ex(input + args->idx, - length, ssl->peerX25519Key, - EC25519_LITTLE_ENDIAN) != 0) { - ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske); - } - - args->idx += length; - ssl->peerX25519KeyPresent = 1; - break; - } - #endif - #ifdef HAVE_CURVE448 - if (ssl->ecdhCurveOID == ECC_X448_OID) { - if (ssl->peerX448Key == NULL) { - ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE448, - (void**)&ssl->peerX448Key); - if (ret != 0) { - goto exit_dske; - } - } else if (ssl->peerX448KeyPresent) { - ret = ReuseKey(ssl, DYNAMIC_TYPE_CURVE448, - ssl->peerX448Key); - ssl->peerX448KeyPresent = 0; - if (ret != 0) { - goto exit_dske; - } - } - - if ((ret = wc_curve448_check_public( - input + args->idx, length, - EC448_LITTLE_ENDIAN)) != 0) { - #ifdef WOLFSSL_EXTRA_ALERTS - if (ret == WC_NO_ERR_TRACE(BUFFER_E)) - SendAlert(ssl, alert_fatal, decode_error); - else if (ret == WC_NO_ERR_TRACE(ECC_OUT_OF_RANGE_E)) - SendAlert(ssl, alert_fatal, bad_record_mac); - else { - SendAlert(ssl, alert_fatal, illegal_parameter); - } - #endif - ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske); - } - - if (wc_curve448_import_public_ex(input + args->idx, - length, ssl->peerX448Key, - EC448_LITTLE_ENDIAN) != 0) { - ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske); - } - - args->idx += length; - ssl->peerX448KeyPresent = 1; - break; - } - #endif - #ifdef HAVE_ECC - if (ssl->peerEccKey == NULL) { - ret = AllocKey(ssl, DYNAMIC_TYPE_ECC, - (void**)&ssl->peerEccKey); - if (ret != 0) { - goto exit_dske; - } - } else if (ssl->peerEccKeyPresent) { - ret = ReuseKey(ssl, DYNAMIC_TYPE_ECC, ssl->peerEccKey); - ssl->peerEccKeyPresent = 0; - if (ret != 0) { - goto exit_dske; - } - } - - curveId = wc_ecc_get_oid((word32)curveOid, NULL, NULL); - if (wc_ecc_import_x963_ex(input + args->idx, length, - ssl->peerEccKey, curveId) != 0) { - #ifdef WOLFSSL_EXTRA_ALERTS - SendAlert(ssl, alert_fatal, illegal_parameter); - #endif - ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske); - } - - args->idx += length; - ssl->peerEccKeyPresent = 1; - #endif + ret = GetEcDiffieHellmanKea(ssl, input, size, args); break; } #endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */ #if !defined(NO_DH) && !defined(NO_PSK) case dhe_psk_kea: { - int srvHintLen; - word16 length; - - if ((args->idx - args->begin) + OPAQUE16_LEN > size) { - ERROR_OUT(BUFFER_ERROR, exit_dske); - } - - ato16(input + args->idx, &length); - args->idx += OPAQUE16_LEN; - - if ((args->idx - args->begin) + length > size) { - ERROR_OUT(BUFFER_ERROR, exit_dske); - } - - /* get PSK server hint from the wire */ - srvHintLen = (int)min(length, MAX_PSK_ID_LEN); - XMEMCPY(ssl->arrays->server_hint, input + args->idx, - srvHintLen); - ssl->arrays->server_hint[srvHintLen] = '\0'; /* null term */ - args->idx += length; - - ret = GetDhPublicKey(ssl, input, size, args); - if (ret != 0) - goto exit_dske; + ret = GetPSKServerHint(ssl, input, size, args); + if (ret == 0) + ret = GetDhPublicKey(ssl, input, size, args); break; } #endif /* !NO_DH && !NO_PSK */ @@ -32528,169 +32527,9 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input, defined(HAVE_CURVE448)) && !defined(NO_PSK) case ecdhe_psk_kea: { - byte b; - int curveOid, curveId; - int srvHintLen; - word16 length; - - if ((args->idx - args->begin) + OPAQUE16_LEN > size) { - ERROR_OUT(BUFFER_ERROR, exit_dske); - } - - ato16(input + args->idx, &length); - args->idx += OPAQUE16_LEN; - - if ((args->idx - args->begin) + length > size) { - ERROR_OUT(BUFFER_ERROR, exit_dske); - } - - /* get PSK server hint from the wire */ - srvHintLen = (int)min(length, MAX_PSK_ID_LEN); - XMEMCPY(ssl->arrays->server_hint, input + args->idx, - (size_t)(srvHintLen)); - ssl->arrays->server_hint[srvHintLen] = '\0'; /* null term */ - - args->idx += length; - - if ((args->idx - args->begin) + ENUM_LEN + OPAQUE16_LEN + - OPAQUE8_LEN > size) { - ERROR_OUT(BUFFER_ERROR, exit_dske); - } - - /* Check curve name and ID */ - b = input[args->idx++]; - if (b != named_curve) { - ERROR_OUT(ECC_CURVETYPE_ERROR, exit_dske); - } - - args->idx += 1; /* curve type, eat leading 0 */ - b = input[args->idx++]; - if ((curveOid = CheckCurveId(b)) < 0) { - ERROR_OUT(ECC_CURVE_ERROR, exit_dske); - } - ssl->ecdhCurveOID = (word32)curveOid; - #if defined(WOLFSSL_TLS13) || defined(HAVE_FFDHE) - ssl->namedGroup = 0; - #endif - - length = input[args->idx++]; - if ((args->idx - args->begin) + length > size) { - ERROR_OUT(BUFFER_ERROR, exit_dske); - } - - #ifdef HAVE_CURVE25519 - if (ssl->ecdhCurveOID == ECC_X25519_OID) { - if (ssl->peerX25519Key == NULL) { - ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE25519, - (void**)&ssl->peerX25519Key); - if (ret != 0) { - goto exit_dske; - } - } else if (ssl->peerX25519KeyPresent) { - ret = ReuseKey(ssl, DYNAMIC_TYPE_CURVE25519, - ssl->peerX25519Key); - ssl->peerX25519KeyPresent = 0; - if (ret != 0) { - goto exit_dske; - } - } - - if ((ret = wc_curve25519_check_public( - input + args->idx, length, - EC25519_LITTLE_ENDIAN)) != 0) { - #ifdef WOLFSSL_EXTRA_ALERTS - if (ret == WC_NO_ERR_TRACE(BUFFER_E)) - SendAlert(ssl, alert_fatal, decode_error); - else if (ret == WC_NO_ERR_TRACE(ECC_OUT_OF_RANGE_E)) - SendAlert(ssl, alert_fatal, bad_record_mac); - else { - SendAlert(ssl, alert_fatal, illegal_parameter); - } - #endif - ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske); - } - - if (wc_curve25519_import_public_ex(input + args->idx, - length, ssl->peerX25519Key, - EC25519_LITTLE_ENDIAN) != 0) { - ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske); - } - - args->idx += length; - ssl->peerX25519KeyPresent = 1; - break; - } - #endif - #ifdef HAVE_CURVE448 - if (ssl->ecdhCurveOID == ECC_X448_OID) { - if (ssl->peerX448Key == NULL) { - ret = AllocKey(ssl, DYNAMIC_TYPE_CURVE448, - (void**)&ssl->peerX448Key); - if (ret != 0) { - goto exit_dske; - } - } else if (ssl->peerX448KeyPresent) { - ret = ReuseKey(ssl, DYNAMIC_TYPE_CURVE448, - ssl->peerX448Key); - ssl->peerX448KeyPresent = 0; - if (ret != 0) { - goto exit_dske; - } - } - - if ((ret = wc_curve448_check_public( - input + args->idx, length, - EC448_LITTLE_ENDIAN)) != 0) { - #ifdef WOLFSSL_EXTRA_ALERTS - if (ret == WC_NO_ERR_TRACE(BUFFER_E)) - SendAlert(ssl, alert_fatal, decode_error); - else if (ret == WC_NO_ERR_TRACE(ECC_OUT_OF_RANGE_E)) - SendAlert(ssl, alert_fatal, bad_record_mac); - else { - SendAlert(ssl, alert_fatal, illegal_parameter); - } - #endif - ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske); - } - - if (wc_curve448_import_public_ex(input + args->idx, - length, ssl->peerX448Key, - EC448_LITTLE_ENDIAN) != 0) { - ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske); - } - - args->idx += length; - ssl->peerX448KeyPresent = 1; - break; - } - #endif - #ifdef HAVE_ECC - if (ssl->peerEccKey == NULL) { - ret = AllocKey(ssl, DYNAMIC_TYPE_ECC, - (void**)&ssl->peerEccKey); - if (ret != 0) { - goto exit_dske; - } - } else if (ssl->peerEccKeyPresent) { - ret = ReuseKey(ssl, DYNAMIC_TYPE_ECC, ssl->peerEccKey); - ssl->peerEccKeyPresent = 0; - if (ret != 0) { - goto exit_dske; - } - } - - curveId = wc_ecc_get_oid((word32)curveOid, NULL, NULL); - if (wc_ecc_import_x963_ex(input + args->idx, length, - ssl->peerEccKey, curveId) != 0) { - #ifdef WOLFSSL_EXTRA_ALERTS - SendAlert(ssl, alert_fatal, illegal_parameter); - #endif - ERROR_OUT(ECC_PEERKEY_ERROR, exit_dske); - } - - args->idx += length; - ssl->peerEccKeyPresent = 1; - #endif + ret = GetPSKServerHint(ssl, input, size, args); + if (ret == 0) + ret = GetEcDiffieHellmanKea(ssl, input, size, args); break; } #endif /* (HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448) && !NO_PSK */ diff --git a/src/ssl.c b/src/ssl.c index 794e5991e..71cbdd17c 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -8806,148 +8806,75 @@ static int isArrayUnique(const char* buf, size_t len) return 1; } -/* Set user preference for the client_cert_type exetnsion. +/* Set user preference for the {client,server}_cert_type extension. * Takes byte array containing cert types the caller can provide to its peer. * Cert types are in preferred order in the array. */ +static int set_cert_type(RpkConfig* cfg, + int client, const char* buf, int bufLen) +{ + int i; + byte* certTypeCnt; + byte* certTypes; + + if (cfg == NULL || bufLen > (client ? MAX_CLIENT_CERT_TYPE_CNT : + MAX_SERVER_CERT_TYPE_CNT)) { + return BAD_FUNC_ARG; + } + + if (client) { + certTypeCnt = &cfg->preferred_ClientCertTypeCnt; + certTypes = cfg->preferred_ClientCertTypes; + } + else { + certTypeCnt = &cfg->preferred_ServerCertTypeCnt; + certTypes = cfg->preferred_ServerCertTypes; + } + /* if buf is set to NULL or bufLen is zero, it defaults the setting*/ + if (buf == NULL || bufLen == 0) { + *certTypeCnt = 1; + for (i = 0; i < 2; i++) + certTypes[i] = WOLFSSL_CERT_TYPE_X509; + return WOLFSSL_SUCCESS; + } + + if (!isArrayUnique(buf, (size_t)bufLen)) + return BAD_FUNC_ARG; + + for (i = 0; i < bufLen; i++) { + if (buf[i] != WOLFSSL_CERT_TYPE_RPK && buf[i] != WOLFSSL_CERT_TYPE_X509) + return BAD_FUNC_ARG; + certTypes[i] = (byte)buf[i]; + } + *certTypeCnt = bufLen; + + return WOLFSSL_SUCCESS; +} +int wolfSSL_set_client_cert_type(WOLFSSL* ssl, const char* buf, int buflen) +{ + if (ssl == NULL) + return BAD_FUNC_ARG; + return set_cert_type(&ssl->options.rpkConfig, 1, buf, buflen); +} +int wolfSSL_set_server_cert_type(WOLFSSL* ssl, const char* buf, int buflen) +{ + if (ssl == NULL) + return BAD_FUNC_ARG; + return set_cert_type(&ssl->options.rpkConfig, 0, buf, buflen); +} int wolfSSL_CTX_set_client_cert_type(WOLFSSL_CTX* ctx, - const char* buf, int bufLen) + const char* buf, int buflen) { - int i; - - if (ctx == NULL || bufLen > MAX_CLIENT_CERT_TYPE_CNT) { + if (ctx == NULL) return BAD_FUNC_ARG; - } - - /* if buf is set to NULL or bufLen is set to zero, it defaults the setting*/ - if (buf == NULL || bufLen == 0) { - ctx->rpkConfig.preferred_ClientCertTypeCnt = 1; - ctx->rpkConfig.preferred_ClientCertTypes[0]= WOLFSSL_CERT_TYPE_X509; - ctx->rpkConfig.preferred_ClientCertTypes[1]= WOLFSSL_CERT_TYPE_X509; - return WOLFSSL_SUCCESS; - } - - if (!isArrayUnique(buf, (size_t)bufLen)) - return BAD_FUNC_ARG; - - for (i = 0; i < bufLen; i++){ - if (buf[i] != WOLFSSL_CERT_TYPE_RPK && buf[i] != WOLFSSL_CERT_TYPE_X509) - return BAD_FUNC_ARG; - - ctx->rpkConfig.preferred_ClientCertTypes[i] = (byte)buf[i]; - } - ctx->rpkConfig.preferred_ClientCertTypeCnt = bufLen; - - return WOLFSSL_SUCCESS; + return set_cert_type(&ctx->rpkConfig, 1, buf, buflen); } - -/* Set user preference for the server_cert_type exetnsion. - * Takes byte array containing cert types the caller can provide to its peer. - * Cert types are in preferred order in the array. - */ int wolfSSL_CTX_set_server_cert_type(WOLFSSL_CTX* ctx, - const char* buf, int bufLen) + const char* buf, int buflen) { - int i; - - if (ctx == NULL || bufLen > MAX_SERVER_CERT_TYPE_CNT) { + if (ctx == NULL) return BAD_FUNC_ARG; - } - - /* if buf is set to NULL or bufLen is set to zero, it defaults the setting*/ - if (buf == NULL || bufLen == 0) { - ctx->rpkConfig.preferred_ServerCertTypeCnt = 1; - ctx->rpkConfig.preferred_ServerCertTypes[0]= WOLFSSL_CERT_TYPE_X509; - ctx->rpkConfig.preferred_ServerCertTypes[1]= WOLFSSL_CERT_TYPE_X509; - return WOLFSSL_SUCCESS; - } - - if (!isArrayUnique(buf, (size_t)bufLen)) - return BAD_FUNC_ARG; - - for (i = 0; i < bufLen; i++){ - if (buf[i] != WOLFSSL_CERT_TYPE_RPK && buf[i] != WOLFSSL_CERT_TYPE_X509) - return BAD_FUNC_ARG; - - ctx->rpkConfig.preferred_ServerCertTypes[i] = (byte)buf[i]; - } - ctx->rpkConfig.preferred_ServerCertTypeCnt = bufLen; - - return WOLFSSL_SUCCESS; -} - -/* Set user preference for the client_cert_type exetnsion. - * Takes byte array containing cert types the caller can provide to its peer. - * Cert types are in preferred order in the array. - */ -int wolfSSL_set_client_cert_type(WOLFSSL* ssl, - const char* buf, int bufLen) -{ - int i; - - if (ssl == NULL || bufLen > MAX_CLIENT_CERT_TYPE_CNT) { - return BAD_FUNC_ARG; - } - - /* if buf is set to NULL or bufLen is set to zero, it defaults the setting*/ - if (buf == NULL || bufLen == 0) { - ssl->options.rpkConfig.preferred_ClientCertTypeCnt = 1; - ssl->options.rpkConfig.preferred_ClientCertTypes[0] - = WOLFSSL_CERT_TYPE_X509; - ssl->options.rpkConfig.preferred_ClientCertTypes[1] - = WOLFSSL_CERT_TYPE_X509; - return WOLFSSL_SUCCESS; - } - - if (!isArrayUnique(buf, (size_t)bufLen)) - return BAD_FUNC_ARG; - - for (i = 0; i < bufLen; i++){ - if (buf[i] != WOLFSSL_CERT_TYPE_RPK && buf[i] != WOLFSSL_CERT_TYPE_X509) - return BAD_FUNC_ARG; - - ssl->options.rpkConfig.preferred_ClientCertTypes[i] = (byte)buf[i]; - } - ssl->options.rpkConfig.preferred_ClientCertTypeCnt = bufLen; - - return WOLFSSL_SUCCESS; -} - -/* Set user preference for the server_cert_type exetnsion. - * Takes byte array containing cert types the caller can provide to its peer. - * Cert types are in preferred order in the array. - */ -int wolfSSL_set_server_cert_type(WOLFSSL* ssl, - const char* buf, int bufLen) -{ - int i; - - if (ssl == NULL || bufLen > MAX_SERVER_CERT_TYPE_CNT) { - return BAD_FUNC_ARG; - } - - /* if buf is set to NULL or bufLen is set to zero, it defaults the setting*/ - if (buf == NULL || bufLen == 0) { - ssl->options.rpkConfig.preferred_ServerCertTypeCnt = 1; - ssl->options.rpkConfig.preferred_ServerCertTypes[0] - = WOLFSSL_CERT_TYPE_X509; - ssl->options.rpkConfig.preferred_ServerCertTypes[1] - = WOLFSSL_CERT_TYPE_X509; - return WOLFSSL_SUCCESS; - } - - if (!isArrayUnique(buf, (size_t)bufLen)) - return BAD_FUNC_ARG; - - for (i = 0; i < bufLen; i++){ - if (buf[i] != WOLFSSL_CERT_TYPE_RPK && buf[i] != WOLFSSL_CERT_TYPE_X509) - return BAD_FUNC_ARG; - - ssl->options.rpkConfig.preferred_ServerCertTypes[i] = (byte)buf[i]; - } - ssl->options.rpkConfig.preferred_ServerCertTypeCnt = bufLen; - - return WOLFSSL_SUCCESS; + return set_cert_type(&ctx->rpkConfig, 0, buf, buflen); } /* get negotiated certificate type value and return it to the second parameter. diff --git a/src/tls13.c b/src/tls13.c index f984cc1bb..149ed574f 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -6201,7 +6201,8 @@ static int DoPreSharedKeys(WOLFSSL* ssl, const byte* input, word32 inputSz, if (ret != 0) return ret; if (binderLen != current->binderLen || - XMEMCMP(binder, current->binder, binderLen) != 0) { + ConstantCompare(binder, current->binder, + binderLen) != 0) { WOLFSSL_ERROR_VERBOSE(BAD_BINDER); return BAD_BINDER; } @@ -10537,28 +10538,17 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input, #endif /* !NO_RSA */ #ifdef HAVE_ECC if ((ssl->options.peerSigAlgo == ecc_dsa_sa_algo) && - (ssl->peerEccDsaKeyPresent)) { - #if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3) - if (ssl->options.peerSigAlgo == sm2_sa_algo) { - ret = Sm2wSm3Verify(ssl, TLS13_SM2_SIG_ID, - TLS13_SM2_SIG_ID_SZ, sig, args->sigSz, - args->sigData, args->sigDataSz, - ssl->peerEccDsaKey, NULL); - } - else - #endif - { - WOLFSSL_MSG("Doing ECC peer cert verify"); - ret = EccVerify(ssl, sig, args->sigSz, - args->sigData, args->sigDataSz, - ssl->peerEccDsaKey, - #ifdef HAVE_PK_CALLBACKS - &ssl->buffers.peerEccDsaKey - #else - NULL - #endif - ); - } + ssl->peerEccDsaKeyPresent) { + WOLFSSL_MSG("Doing ECC peer cert verify"); + ret = EccVerify(ssl, sig, args->sigSz, + args->sigData, args->sigDataSz, + ssl->peerEccDsaKey, + #ifdef HAVE_PK_CALLBACKS + &ssl->buffers.peerEccDsaKey + #else + NULL + #endif + ); if (ret >= 0) { /* CLIENT/SERVER: data verified with public key from @@ -10570,6 +10560,23 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input, } } #endif /* HAVE_ECC */ + #if defined(HAVE_ECC) && defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3) + if ((ssl->options.peerSigAlgo == sm2_sa_algo) && + ssl->peerEccDsaKeyPresent) { + WOLFSSL_MSG("Doing SM2/SM3 peer cert verify"); + ret = Sm2wSm3Verify(ssl, TLS13_SM2_SIG_ID, TLS13_SM2_SIG_ID_SZ, + sig, args->sigSz, args->sigData, args->sigDataSz, + ssl->peerEccDsaKey, NULL); + if (ret >= 0) { + /* CLIENT/SERVER: data verified with public key from + * certificate. */ + ssl->options.peerAuthGood = 1; + + FreeKey(ssl, DYNAMIC_TYPE_ECC, (void**)&ssl->peerEccDsaKey); + ssl->peerEccDsaKeyPresent = 0; + } + } + #endif #ifdef HAVE_ED25519 if ((ssl->options.peerSigAlgo == ed25519_sa_algo) && (ssl->peerEd25519KeyPresent)) { diff --git a/wolfcrypt/src/chacha20_poly1305.c b/wolfcrypt/src/chacha20_poly1305.c index d87325de4..0503726bf 100644 --- a/wolfcrypt/src/chacha20_poly1305.c +++ b/wolfcrypt/src/chacha20_poly1305.c @@ -401,7 +401,7 @@ static WC_INLINE int wc_XChaCha20Poly1305_crypt_oneshot( goto out; } - if ((long int)dst_space < dst_len) { + if (dst_len < 0 || (long int)dst_space < dst_len) { ret = BUFFER_E; goto out; } diff --git a/wolfcrypt/src/fe_operations.c b/wolfcrypt/src/fe_operations.c index a8807d597..192c02d60 100644 --- a/wolfcrypt/src/fe_operations.c +++ b/wolfcrypt/src/fe_operations.c @@ -24,7 +24,7 @@ /* Based On Daniel J Bernstein's curve25519 Public Domain ref10 work. */ #if defined(HAVE_CURVE25519) || defined(HAVE_ED25519) -#if !defined(CURVE25519_SMALL) || !defined(ED25519_SMALL) /* run when not defined to use small memory math */ +#if !defined(CURVE25519_SMALL) && !defined(ED25519_SMALL) #include @@ -1479,5 +1479,5 @@ void fe_cmov(fe f, const fe g, int b) } #endif -#endif /* !CURVE25519_SMALL || !ED25519_SMALL */ +#endif /* !CURVE25519_SMALL && !ED25519_SMALL */ #endif /* HAVE_CURVE25519 || HAVE_ED25519 */ diff --git a/wolfcrypt/src/memory.c b/wolfcrypt/src/memory.c index ae57c5f67..c0b7ef0a0 100644 --- a/wolfcrypt/src/memory.c +++ b/wolfcrypt/src/memory.c @@ -551,7 +551,7 @@ void wolfSSL_SetDebugMemoryCb(DebugMemoryCb cb) wc_Memory** list is the list that new buckets are prepended to */ static int wc_create_memory_buckets(byte* buffer, word32 bufSz, - word32 buckSz, byte buckNum, wc_Memory** list) { + word32 buckSz, word32 buckNum, wc_Memory** list) { byte* pt = buffer; int ret = 0; byte memSz = (byte)sizeof(wc_Memory); diff --git a/wolfcrypt/src/port/rpi_pico/README.md b/wolfcrypt/src/port/rpi_pico/README.md index 240cc9782..2a5a638a7 100644 --- a/wolfcrypt/src/port/rpi_pico/README.md +++ b/wolfcrypt/src/port/rpi_pico/README.md @@ -38,7 +38,10 @@ To enable the RNG acceleration add the following: ```c #define WC_NO_HASHDRBG #define CUSTOM_RAND_GENERATE_BLOCK wc_pico_rng_gen_block +#define WC_RESEED_INTERVAL (1000000) ``` +NOTE: the value for `WC_RESEED_INTERVAL` here is just an example. You should find what is +most appropriate for your application and use case. In CMake you should add the following linking to both wolfSSL and the end application: diff --git a/wolfcrypt/src/pwdbased.c b/wolfcrypt/src/pwdbased.c index 8c7c64cae..9a255874c 100644 --- a/wolfcrypt/src/pwdbased.c +++ b/wolfcrypt/src/pwdbased.c @@ -816,9 +816,16 @@ int wc_scrypt(byte* output, const byte* passwd, int passLen, ret = MEMORY_E; goto end; } + + /* Check that (1 << cost) * bSz won't overflow or exceed allowed max */ + if (((size_t)1 << cost) * (size_t)bSz > SCRYPT_WORD32_MAX) { + ret = BAD_FUNC_ARG; + goto end; + } + /* Temporary for scryptROMix. */ - v = (byte*)XMALLOC((size_t)((1U << cost) * bSz), NULL, - DYNAMIC_TYPE_TMP_BUFFER); + v = (byte*)XMALLOC(((size_t)1 << cost) * (size_t)bSz, NULL, + DYNAMIC_TYPE_TMP_BUFFER); if (v == NULL) { ret = MEMORY_E; goto end; @@ -841,7 +848,8 @@ int wc_scrypt(byte* output, const byte* passwd, int passLen, /* Step 2. */ for (i = 0; i < parallel; i++) - scryptROMix(blocks + i * (int)bSz, v, y, (int)blockSize, 1U << cost); + scryptROMix(blocks + i * (int)bSz, v, y, (int)blockSize, + (word32)((size_t)1 << cost)); /* Step 3. */ ret = wc_PBKDF2(output, passwd, passLen, blocks, (int)blocksSz, 1, dkLen, diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 5664f7b97..8bd98d813 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -1706,13 +1706,6 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\ TEST_PASS("asn test passed!\n"); #endif -#ifndef WC_NO_RNG - if ( (ret = random_test()) != 0) - TEST_FAIL("RANDOM test failed!\n", ret); - else - TEST_PASS("RANDOM test passed!\n"); -#endif /* WC_NO_RNG */ - #ifndef NO_MD5 if ( (ret = md5_test()) != 0) TEST_FAIL("MD5 test failed!\n", ret); @@ -1797,6 +1790,13 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\ TEST_PASS("SHA-3 test passed!\n"); #endif +#ifndef WC_NO_RNG + if ((ret = random_test()) != 0) + TEST_FAIL("RANDOM test failed!\n", ret); + else + TEST_PASS("RANDOM test passed!\n"); +#endif /* WC_NO_RNG */ + #ifdef WOLFSSL_SHAKE128 if ( (ret = shake128_test()) != 0) TEST_FAIL("SHAKE128 test failed!\n", ret); @@ -16748,10 +16748,12 @@ static wc_test_ret_t aesccm_128_test(void) ERROR_OUT(WC_TEST_RET_ENC_NC, out); /* Clear c2 to compare against p2. p2 should be set to zero in case of - * authentication fail. */ + * authentication fail. With ACVP_VECTOR_TESTING, this is not cleared */ +#ifndef ACVP_VECTOR_TESTING XMEMSET(c2, 0, sizeof(c2)); if (XMEMCMP(p2, c2, sizeof(p2))) ERROR_OUT(WC_TEST_RET_ENC_NC, out); +#endif #endif XMEMSET(t2, 0, sizeof(t2)); @@ -27553,6 +27555,11 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t scrypt_test(void) return WC_TEST_RET_ENC_EC(ret); if (XMEMCMP(derived, verify4, sizeof(verify4)) != 0) return WC_TEST_RET_ENC_NC; + + ret = wc_scrypt(derived,(byte*)"pleaseletmein", 13, + (byte*)"SodiumChloride", 14, 22, 8, 1, sizeof(derived)); + if (ret != WC_NO_ERR_TRACE(BAD_FUNC_ARG)) + return WC_TEST_RET_ENC_EC(ret); #endif #else #ifdef SCRYPT_TEST_ALL diff --git a/wolfssl/certs_test_sm.h b/wolfssl/certs_test_sm.h new file mode 100644 index 000000000..b11c222ab --- /dev/null +++ b/wolfssl/certs_test_sm.h @@ -0,0 +1,2913 @@ +/* certs_test_sm.h */ +/* This file was generated using: ./gencertbuf.pl */ + +#ifndef WOLFSSL_CERTS_TEST_SM_H +#define WOLFSSL_CERTS_TEST_SM_H + +#if defined(WOLFSSL_SM2) || defined(WOLFSSL_SM3) || defined(WOLFSSL_SM4) + + /* DER Certs Begin */ + +/* ./certs/sm2/ca-sm2.der */ +static const unsigned char ca_sm2_der[] = +{ + 0x30, 0x82, 0x02, 0x96, 0x30, 0x82, 0x02, 0x3C, 0xA0, 0x03, + 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x30, 0x0A, 0x06, 0x08, + 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x83, 0x75, 0x30, 0x81, + 0x95, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, + 0x13, 0x02, 0x55, 0x53, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, + 0x55, 0x04, 0x08, 0x0C, 0x07, 0x4D, 0x6F, 0x6E, 0x74, 0x61, + 0x6E, 0x61, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, + 0x07, 0x0C, 0x07, 0x42, 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, + 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, + 0x0B, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, 0x53, + 0x4D, 0x32, 0x31, 0x11, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x04, + 0x0B, 0x0C, 0x08, 0x52, 0x6F, 0x6F, 0x74, 0x2D, 0x53, 0x4D, + 0x32, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, + 0x0C, 0x0F, 0x77, 0x77, 0x77, 0x2E, 0x77, 0x6F, 0x6C, 0x66, + 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x1F, 0x30, + 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, + 0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77, + 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, + 0x30, 0x1E, 0x17, 0x0D, 0x32, 0x33, 0x30, 0x32, 0x31, 0x35, + 0x30, 0x36, 0x32, 0x33, 0x30, 0x37, 0x5A, 0x17, 0x0D, 0x32, + 0x35, 0x31, 0x31, 0x31, 0x31, 0x30, 0x36, 0x32, 0x33, 0x30, + 0x37, 0x5A, 0x30, 0x81, 0xAC, 0x31, 0x0B, 0x30, 0x09, 0x06, + 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x10, + 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0C, 0x07, 0x4D, + 0x6F, 0x6E, 0x74, 0x61, 0x6E, 0x61, 0x31, 0x10, 0x30, 0x0E, + 0x06, 0x03, 0x55, 0x04, 0x07, 0x0C, 0x07, 0x42, 0x6F, 0x7A, + 0x65, 0x6D, 0x61, 0x6E, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, + 0x55, 0x04, 0x0A, 0x0C, 0x0B, 0x77, 0x6F, 0x6C, 0x66, 0x53, + 0x53, 0x4C, 0x5F, 0x73, 0x6D, 0x32, 0x31, 0x0F, 0x30, 0x0D, + 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x06, 0x43, 0x41, 0x2D, + 0x73, 0x6D, 0x32, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, + 0x04, 0x03, 0x0C, 0x0F, 0x77, 0x77, 0x77, 0x2E, 0x77, 0x6F, + 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, + 0x1F, 0x30, 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, + 0x0D, 0x01, 0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, + 0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, + 0x6F, 0x6D, 0x31, 0x17, 0x30, 0x15, 0x06, 0x0A, 0x09, 0x92, + 0x26, 0x89, 0x93, 0xF2, 0x2C, 0x64, 0x01, 0x01, 0x0C, 0x07, + 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x30, 0x5A, 0x30, + 0x14, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, + 0x2D, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, + 0x2D, 0x03, 0x42, 0x00, 0x04, 0x21, 0x92, 0xF7, 0xCB, 0x24, + 0xDF, 0x64, 0x4D, 0xBA, 0xAB, 0x66, 0x7B, 0x83, 0x75, 0xA9, + 0x29, 0xE7, 0xFF, 0x64, 0x63, 0xB6, 0xD5, 0x42, 0x80, 0x20, + 0xBD, 0xE2, 0xE2, 0x02, 0x12, 0x3B, 0x8E, 0xB4, 0x00, 0x95, + 0x09, 0x80, 0xCB, 0x56, 0xED, 0x4B, 0xCA, 0x8D, 0x57, 0xE6, + 0xAE, 0x05, 0xD3, 0x76, 0x27, 0x63, 0x71, 0x39, 0x89, 0xB7, + 0x69, 0xE6, 0x48, 0x80, 0xAE, 0xD1, 0xA9, 0x48, 0x12, 0xA3, + 0x63, 0x30, 0x61, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, + 0x04, 0x16, 0x04, 0x14, 0x47, 0x0A, 0x48, 0x7E, 0xBB, 0x02, + 0xA8, 0x5A, 0x26, 0x57, 0x2B, 0x19, 0xA9, 0x7B, 0x61, 0x8B, + 0x7F, 0x5D, 0x99, 0x6E, 0x30, 0x1F, 0x06, 0x03, 0x55, 0x1D, + 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x34, 0x1D, 0x79, + 0x44, 0x15, 0x79, 0xA1, 0xB1, 0x63, 0x99, 0xE3, 0xED, 0x65, + 0x7C, 0x64, 0x89, 0x80, 0xFF, 0xB8, 0xEC, 0x30, 0x0F, 0x06, + 0x03, 0x55, 0x1D, 0x13, 0x01, 0x01, 0xFF, 0x04, 0x05, 0x30, + 0x03, 0x01, 0x01, 0xFF, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x1D, + 0x0F, 0x01, 0x01, 0xFF, 0x04, 0x04, 0x03, 0x02, 0x01, 0x86, + 0x30, 0x0A, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, + 0x83, 0x75, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x20, 0x47, + 0x4E, 0x00, 0x03, 0xAB, 0x34, 0xA1, 0xAF, 0x59, 0x39, 0x8F, + 0x60, 0x36, 0xBF, 0x89, 0x88, 0x42, 0x41, 0x27, 0xC1, 0xDD, + 0x57, 0xC9, 0x79, 0xCB, 0x1F, 0x56, 0x5C, 0x16, 0xB5, 0x28, + 0xBD, 0x02, 0x21, 0x00, 0x8B, 0x2E, 0x25, 0xEB, 0x21, 0x9B, + 0xA9, 0x2B, 0xA6, 0x6A, 0x5B, 0xDB, 0xA7, 0xC7, 0x2B, 0x11, + 0xDF, 0x73, 0x15, 0xAD, 0xE4, 0xC5, 0xC3, 0xC2, 0xF3, 0xB4, + 0xB4, 0x67, 0xAF, 0xD7, 0x51, 0x1C +}; +#define sizeof_ca_sm2_der (sizeof(ca_sm2_der)) + +/* ./certs/sm2/ca-sm2-key.der */ +static const unsigned char ca_sm2_key_der[] = +{ + 0x30, 0x5A, 0x30, 0x14, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, + 0x55, 0x01, 0x82, 0x2D, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, + 0x55, 0x01, 0x82, 0x2D, 0x03, 0x42, 0x00, 0x04, 0x21, 0x92, + 0xF7, 0xCB, 0x24, 0xDF, 0x64, 0x4D, 0xBA, 0xAB, 0x66, 0x7B, + 0x83, 0x75, 0xA9, 0x29, 0xE7, 0xFF, 0x64, 0x63, 0xB6, 0xD5, + 0x42, 0x80, 0x20, 0xBD, 0xE2, 0xE2, 0x02, 0x12, 0x3B, 0x8E, + 0xB4, 0x00, 0x95, 0x09, 0x80, 0xCB, 0x56, 0xED, 0x4B, 0xCA, + 0x8D, 0x57, 0xE6, 0xAE, 0x05, 0xD3, 0x76, 0x27, 0x63, 0x71, + 0x39, 0x89, 0xB7, 0x69, 0xE6, 0x48, 0x80, 0xAE, 0xD1, 0xA9, + 0x48, 0x12 +}; +#define sizeof_ca_sm2_key_der (sizeof(ca_sm2_key_der)) + +/* ./certs/sm2/ca-sm2-priv.der */ +static const unsigned char ca_sm2_priv_der[] = +{ + 0x30, 0x77, 0x02, 0x01, 0x01, 0x04, 0x20, 0x8F, 0xB9, 0xB8, + 0x40, 0x19, 0x0E, 0x21, 0x39, 0xEB, 0xE8, 0x08, 0x7C, 0xFD, + 0xD8, 0xA1, 0x05, 0x93, 0xA4, 0x35, 0x2C, 0xD1, 0x80, 0xE3, + 0xBF, 0x7E, 0x48, 0x47, 0xE4, 0x05, 0x0D, 0x09, 0x41, 0xA0, + 0x0A, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, + 0x2D, 0xA1, 0x44, 0x03, 0x42, 0x00, 0x04, 0x21, 0x92, 0xF7, + 0xCB, 0x24, 0xDF, 0x64, 0x4D, 0xBA, 0xAB, 0x66, 0x7B, 0x83, + 0x75, 0xA9, 0x29, 0xE7, 0xFF, 0x64, 0x63, 0xB6, 0xD5, 0x42, + 0x80, 0x20, 0xBD, 0xE2, 0xE2, 0x02, 0x12, 0x3B, 0x8E, 0xB4, + 0x00, 0x95, 0x09, 0x80, 0xCB, 0x56, 0xED, 0x4B, 0xCA, 0x8D, + 0x57, 0xE6, 0xAE, 0x05, 0xD3, 0x76, 0x27, 0x63, 0x71, 0x39, + 0x89, 0xB7, 0x69, 0xE6, 0x48, 0x80, 0xAE, 0xD1, 0xA9, 0x48, + 0x12 +}; +#define sizeof_ca_sm2_priv_der (sizeof(ca_sm2_priv_der)) + +/* ./certs/sm2/client-sm2.der */ +static const unsigned char client_sm2_der[] = +{ + 0x30, 0x82, 0x03, 0xC9, 0x30, 0x82, 0x03, 0x6E, 0xA0, 0x03, + 0x02, 0x01, 0x02, 0x02, 0x14, 0x60, 0xA0, 0x4A, 0x0B, 0x36, + 0xEB, 0x7D, 0xE1, 0x3F, 0x74, 0x29, 0xA9, 0x29, 0xB4, 0x05, + 0x6C, 0x17, 0xF7, 0xA6, 0xD4, 0x30, 0x0A, 0x06, 0x08, 0x2A, + 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x83, 0x75, 0x30, 0x81, 0xB0, + 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, + 0x02, 0x55, 0x53, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, + 0x04, 0x08, 0x0C, 0x07, 0x4D, 0x6F, 0x6E, 0x74, 0x61, 0x6E, + 0x61, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x07, + 0x0C, 0x07, 0x42, 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, 0x31, + 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, 0x0B, + 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, 0x73, 0x6D, + 0x32, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x0B, + 0x0C, 0x0A, 0x43, 0x6C, 0x69, 0x65, 0x6E, 0x74, 0x2D, 0x73, + 0x6D, 0x32, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, + 0x03, 0x0C, 0x0F, 0x77, 0x77, 0x77, 0x2E, 0x77, 0x6F, 0x6C, + 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x1F, + 0x30, 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, + 0x01, 0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, 0x40, + 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, + 0x6D, 0x31, 0x17, 0x30, 0x15, 0x06, 0x0A, 0x09, 0x92, 0x26, + 0x89, 0x93, 0xF2, 0x2C, 0x64, 0x01, 0x01, 0x0C, 0x07, 0x77, + 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x30, 0x1E, 0x17, 0x0D, + 0x32, 0x33, 0x30, 0x32, 0x31, 0x35, 0x30, 0x36, 0x32, 0x33, + 0x30, 0x37, 0x5A, 0x17, 0x0D, 0x32, 0x35, 0x31, 0x31, 0x31, + 0x31, 0x30, 0x36, 0x32, 0x33, 0x30, 0x37, 0x5A, 0x30, 0x81, + 0xB0, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, + 0x13, 0x02, 0x55, 0x53, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, + 0x55, 0x04, 0x08, 0x0C, 0x07, 0x4D, 0x6F, 0x6E, 0x74, 0x61, + 0x6E, 0x61, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, + 0x07, 0x0C, 0x07, 0x42, 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, + 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, + 0x0B, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, 0x73, + 0x6D, 0x32, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, + 0x0B, 0x0C, 0x0A, 0x43, 0x6C, 0x69, 0x65, 0x6E, 0x74, 0x2D, + 0x73, 0x6D, 0x32, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, + 0x04, 0x03, 0x0C, 0x0F, 0x77, 0x77, 0x77, 0x2E, 0x77, 0x6F, + 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, + 0x1F, 0x30, 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, + 0x0D, 0x01, 0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, + 0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, + 0x6F, 0x6D, 0x31, 0x17, 0x30, 0x15, 0x06, 0x0A, 0x09, 0x92, + 0x26, 0x89, 0x93, 0xF2, 0x2C, 0x64, 0x01, 0x01, 0x0C, 0x07, + 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x30, 0x5A, 0x30, + 0x14, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, + 0x2D, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, + 0x2D, 0x03, 0x42, 0x00, 0x04, 0x3A, 0x1D, 0xE8, 0xCB, 0x4B, + 0xD3, 0x2E, 0x3F, 0x4B, 0x07, 0x3F, 0xB0, 0x21, 0xFE, 0xC5, + 0x9E, 0xD9, 0xCA, 0x3A, 0x93, 0x93, 0x95, 0x76, 0x1D, 0x30, + 0xD9, 0x0B, 0xF5, 0x56, 0xED, 0x19, 0x60, 0xED, 0x01, 0x4C, + 0xF6, 0x67, 0x1D, 0xF1, 0xAC, 0xA8, 0x74, 0x0D, 0xB2, 0x77, + 0xC8, 0x49, 0x38, 0xE4, 0xFF, 0x4C, 0xEF, 0x8D, 0x6D, 0x87, + 0xF6, 0x4E, 0xC7, 0xF8, 0x39, 0x74, 0x70, 0x70, 0xB5, 0xA3, + 0x82, 0x01, 0x61, 0x30, 0x82, 0x01, 0x5D, 0x30, 0x1D, 0x06, + 0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0xE4, 0x21, + 0xB2, 0xC5, 0xE5, 0xD4, 0x9E, 0x82, 0xCA, 0xF8, 0x67, 0xF2, + 0x28, 0x99, 0xF6, 0x85, 0xE8, 0xF1, 0x55, 0xEF, 0x30, 0x81, + 0xF0, 0x06, 0x03, 0x55, 0x1D, 0x23, 0x04, 0x81, 0xE8, 0x30, + 0x81, 0xE5, 0x80, 0x14, 0xE4, 0x21, 0xB2, 0xC5, 0xE5, 0xD4, + 0x9E, 0x82, 0xCA, 0xF8, 0x67, 0xF2, 0x28, 0x99, 0xF6, 0x85, + 0xE8, 0xF1, 0x55, 0xEF, 0xA1, 0x81, 0xB6, 0xA4, 0x81, 0xB3, + 0x30, 0x81, 0xB0, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, + 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x10, 0x30, 0x0E, + 0x06, 0x03, 0x55, 0x04, 0x08, 0x0C, 0x07, 0x4D, 0x6F, 0x6E, + 0x74, 0x61, 0x6E, 0x61, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, + 0x55, 0x04, 0x07, 0x0C, 0x07, 0x42, 0x6F, 0x7A, 0x65, 0x6D, + 0x61, 0x6E, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, + 0x0A, 0x0C, 0x0B, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, + 0x5F, 0x73, 0x6D, 0x32, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, + 0x55, 0x04, 0x0B, 0x0C, 0x0A, 0x43, 0x6C, 0x69, 0x65, 0x6E, + 0x74, 0x2D, 0x73, 0x6D, 0x32, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0F, 0x77, 0x77, 0x77, 0x2E, + 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, + 0x6D, 0x31, 0x1F, 0x30, 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48, + 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, + 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, + 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x17, 0x30, 0x15, 0x06, 0x0A, + 0x09, 0x92, 0x26, 0x89, 0x93, 0xF2, 0x2C, 0x64, 0x01, 0x01, + 0x0C, 0x07, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x82, + 0x14, 0x60, 0xA0, 0x4A, 0x0B, 0x36, 0xEB, 0x7D, 0xE1, 0x3F, + 0x74, 0x29, 0xA9, 0x29, 0xB4, 0x05, 0x6C, 0x17, 0xF7, 0xA6, + 0xD4, 0x30, 0x0C, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x04, 0x05, + 0x30, 0x03, 0x01, 0x01, 0xFF, 0x30, 0x1C, 0x06, 0x03, 0x55, + 0x1D, 0x11, 0x04, 0x15, 0x30, 0x13, 0x82, 0x0B, 0x65, 0x78, + 0x61, 0x6D, 0x70, 0x6C, 0x65, 0x2E, 0x63, 0x6F, 0x6D, 0x87, + 0x04, 0x7F, 0x00, 0x00, 0x01, 0x30, 0x1D, 0x06, 0x03, 0x55, + 0x1D, 0x25, 0x04, 0x16, 0x30, 0x14, 0x06, 0x08, 0x2B, 0x06, + 0x01, 0x05, 0x05, 0x07, 0x03, 0x01, 0x06, 0x08, 0x2B, 0x06, + 0x01, 0x05, 0x05, 0x07, 0x03, 0x02, 0x30, 0x0A, 0x06, 0x08, + 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x83, 0x75, 0x03, 0x49, + 0x00, 0x30, 0x46, 0x02, 0x21, 0x00, 0x8F, 0xB2, 0xB5, 0x95, + 0x8F, 0x79, 0xF6, 0x5E, 0x75, 0xE5, 0xC5, 0xE9, 0x9A, 0x12, + 0xD2, 0x0F, 0x78, 0x9F, 0xC0, 0x1D, 0x8D, 0x1C, 0xBE, 0x6B, + 0x0C, 0xF1, 0xF5, 0x57, 0x60, 0xDB, 0x91, 0x4F, 0x02, 0x21, + 0x00, 0x87, 0x5E, 0x7D, 0xE4, 0xD6, 0x3A, 0xBB, 0x7B, 0x98, + 0x27, 0x85, 0xDE, 0x7A, 0xF0, 0x21, 0xE2, 0x66, 0xA1, 0x9F, + 0x26, 0xE0, 0xDD, 0x86, 0x23, 0xB4, 0xC8, 0xC0, 0x46, 0x5A, + 0xF2, 0x49, 0x8D +}; +#define sizeof_client_sm2_der (sizeof(client_sm2_der)) + +/* ./certs/sm2/client-sm2-key.der */ +static const unsigned char client_sm2_key_der[] = +{ + 0x30, 0x5A, 0x30, 0x14, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, + 0x55, 0x01, 0x82, 0x2D, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, + 0x55, 0x01, 0x82, 0x2D, 0x03, 0x42, 0x00, 0x04, 0x3A, 0x1D, + 0xE8, 0xCB, 0x4B, 0xD3, 0x2E, 0x3F, 0x4B, 0x07, 0x3F, 0xB0, + 0x21, 0xFE, 0xC5, 0x9E, 0xD9, 0xCA, 0x3A, 0x93, 0x93, 0x95, + 0x76, 0x1D, 0x30, 0xD9, 0x0B, 0xF5, 0x56, 0xED, 0x19, 0x60, + 0xED, 0x01, 0x4C, 0xF6, 0x67, 0x1D, 0xF1, 0xAC, 0xA8, 0x74, + 0x0D, 0xB2, 0x77, 0xC8, 0x49, 0x38, 0xE4, 0xFF, 0x4C, 0xEF, + 0x8D, 0x6D, 0x87, 0xF6, 0x4E, 0xC7, 0xF8, 0x39, 0x74, 0x70, + 0x70, 0xB5 +}; +#define sizeof_client_sm2_key_der (sizeof(client_sm2_key_der)) + +/* ./certs/sm2/client-sm2-priv.der */ +static const unsigned char client_sm2_priv_der[] = +{ + 0x30, 0x77, 0x02, 0x01, 0x01, 0x04, 0x20, 0xD0, 0xA2, 0xDF, + 0x49, 0x7A, 0x2D, 0xDF, 0x02, 0xC9, 0xCE, 0xB7, 0xF2, 0x37, + 0x02, 0x0D, 0xDD, 0xFC, 0x08, 0xB8, 0xDE, 0x14, 0x93, 0x7A, + 0x53, 0x26, 0x49, 0xD5, 0xFE, 0x02, 0xD9, 0xF3, 0x71, 0xA0, + 0x0A, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, + 0x2D, 0xA1, 0x44, 0x03, 0x42, 0x00, 0x04, 0x3A, 0x1D, 0xE8, + 0xCB, 0x4B, 0xD3, 0x2E, 0x3F, 0x4B, 0x07, 0x3F, 0xB0, 0x21, + 0xFE, 0xC5, 0x9E, 0xD9, 0xCA, 0x3A, 0x93, 0x93, 0x95, 0x76, + 0x1D, 0x30, 0xD9, 0x0B, 0xF5, 0x56, 0xED, 0x19, 0x60, 0xED, + 0x01, 0x4C, 0xF6, 0x67, 0x1D, 0xF1, 0xAC, 0xA8, 0x74, 0x0D, + 0xB2, 0x77, 0xC8, 0x49, 0x38, 0xE4, 0xFF, 0x4C, 0xEF, 0x8D, + 0x6D, 0x87, 0xF6, 0x4E, 0xC7, 0xF8, 0x39, 0x74, 0x70, 0x70, + 0xB5 +}; +#define sizeof_client_sm2_priv_der (sizeof(client_sm2_priv_der)) + +/* ./certs/sm2/root-sm2.der */ +static const unsigned char root_sm2_der[] = +{ + 0x30, 0x82, 0x02, 0x91, 0x30, 0x82, 0x02, 0x38, 0xA0, 0x03, + 0x02, 0x01, 0x02, 0x02, 0x14, 0x74, 0x9C, 0xDD, 0xA4, 0xB2, + 0x67, 0x26, 0x57, 0x29, 0xFB, 0xE9, 0x13, 0x54, 0xE0, 0x34, + 0x08, 0x03, 0x2B, 0x70, 0xA9, 0x30, 0x0A, 0x06, 0x08, 0x2A, + 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x83, 0x75, 0x30, 0x81, 0x95, + 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, + 0x02, 0x55, 0x53, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, + 0x04, 0x08, 0x0C, 0x07, 0x4D, 0x6F, 0x6E, 0x74, 0x61, 0x6E, + 0x61, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x07, + 0x0C, 0x07, 0x42, 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, 0x31, + 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, 0x0B, + 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, 0x53, 0x4D, + 0x32, 0x31, 0x11, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x04, 0x0B, + 0x0C, 0x08, 0x52, 0x6F, 0x6F, 0x74, 0x2D, 0x53, 0x4D, 0x32, + 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, + 0x0F, 0x77, 0x77, 0x77, 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, + 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x1F, 0x30, 0x1D, + 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, + 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, + 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x30, + 0x1E, 0x17, 0x0D, 0x32, 0x33, 0x30, 0x32, 0x31, 0x35, 0x30, + 0x36, 0x32, 0x33, 0x30, 0x37, 0x5A, 0x17, 0x0D, 0x32, 0x35, + 0x31, 0x31, 0x31, 0x31, 0x30, 0x36, 0x32, 0x33, 0x30, 0x37, + 0x5A, 0x30, 0x81, 0x95, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, + 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x10, 0x30, + 0x0E, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0C, 0x07, 0x4D, 0x6F, + 0x6E, 0x74, 0x61, 0x6E, 0x61, 0x31, 0x10, 0x30, 0x0E, 0x06, + 0x03, 0x55, 0x04, 0x07, 0x0C, 0x07, 0x42, 0x6F, 0x7A, 0x65, + 0x6D, 0x61, 0x6E, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, + 0x04, 0x0A, 0x0C, 0x0B, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, + 0x4C, 0x5F, 0x53, 0x4D, 0x32, 0x31, 0x11, 0x30, 0x0F, 0x06, + 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x08, 0x52, 0x6F, 0x6F, 0x74, + 0x2D, 0x53, 0x4D, 0x32, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, + 0x55, 0x04, 0x03, 0x0C, 0x0F, 0x77, 0x77, 0x77, 0x2E, 0x77, + 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, + 0x31, 0x1F, 0x30, 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, + 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, + 0x6F, 0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, + 0x63, 0x6F, 0x6D, 0x30, 0x5A, 0x30, 0x14, 0x06, 0x08, 0x2A, + 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, 0x2D, 0x06, 0x08, 0x2A, + 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, 0x2D, 0x03, 0x42, 0x00, + 0x04, 0xBB, 0x9C, 0x75, 0x8C, 0xF7, 0x17, 0xF8, 0x48, 0xAB, + 0xF7, 0xF6, 0xDB, 0x0D, 0x9A, 0x8D, 0x9F, 0xC2, 0xD1, 0x47, + 0x97, 0x95, 0x0B, 0x4E, 0xE6, 0x57, 0xEC, 0xC5, 0xF8, 0x57, + 0x54, 0x71, 0x39, 0x3C, 0x79, 0xE1, 0x40, 0x3F, 0xB6, 0x51, + 0xE9, 0x7C, 0xC7, 0xDA, 0x2D, 0xEF, 0xD2, 0xE8, 0x79, 0x81, + 0x7B, 0xAB, 0xA3, 0x5F, 0x6B, 0x2A, 0x6C, 0x97, 0x1A, 0x5E, + 0x8E, 0xD9, 0xD0, 0xCC, 0x04, 0xA3, 0x63, 0x30, 0x61, 0x30, + 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, + 0x34, 0x1D, 0x79, 0x44, 0x15, 0x79, 0xA1, 0xB1, 0x63, 0x99, + 0xE3, 0xED, 0x65, 0x7C, 0x64, 0x89, 0x80, 0xFF, 0xB8, 0xEC, + 0x30, 0x1F, 0x06, 0x03, 0x55, 0x1D, 0x23, 0x04, 0x18, 0x30, + 0x16, 0x80, 0x14, 0x34, 0x1D, 0x79, 0x44, 0x15, 0x79, 0xA1, + 0xB1, 0x63, 0x99, 0xE3, 0xED, 0x65, 0x7C, 0x64, 0x89, 0x80, + 0xFF, 0xB8, 0xEC, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x1D, 0x13, + 0x01, 0x01, 0xFF, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xFF, + 0x30, 0x0E, 0x06, 0x03, 0x55, 0x1D, 0x0F, 0x01, 0x01, 0xFF, + 0x04, 0x04, 0x03, 0x02, 0x01, 0x86, 0x30, 0x0A, 0x06, 0x08, + 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x83, 0x75, 0x03, 0x47, + 0x00, 0x30, 0x44, 0x02, 0x20, 0x03, 0x27, 0x29, 0xF0, 0xEF, + 0x78, 0x26, 0xA1, 0x1A, 0x6A, 0x1E, 0x88, 0x81, 0xE7, 0x83, + 0x72, 0x5F, 0x3E, 0xE6, 0x08, 0xE8, 0x14, 0x68, 0xBF, 0x4B, + 0x0F, 0x68, 0x52, 0x92, 0xAA, 0x8F, 0xA1, 0x02, 0x20, 0x0B, + 0xFE, 0x1B, 0x14, 0xBA, 0x51, 0x82, 0x65, 0x06, 0xBB, 0x22, + 0xD8, 0x1A, 0xA7, 0x9F, 0x54, 0x62, 0xEB, 0x8D, 0xB2, 0xD5, + 0x13, 0xB3, 0xB8, 0xA2, 0xF3, 0x14, 0x44, 0xB2, 0xA0, 0x21, + 0xD0 +}; +#define sizeof_root_sm2_der (sizeof(root_sm2_der)) + +/* ./certs/sm2/root-sm2-key.der */ +static const unsigned char root_sm2_key_der[] = +{ + 0x30, 0x5A, 0x30, 0x14, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, + 0x55, 0x01, 0x82, 0x2D, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, + 0x55, 0x01, 0x82, 0x2D, 0x03, 0x42, 0x00, 0x04, 0xBB, 0x9C, + 0x75, 0x8C, 0xF7, 0x17, 0xF8, 0x48, 0xAB, 0xF7, 0xF6, 0xDB, + 0x0D, 0x9A, 0x8D, 0x9F, 0xC2, 0xD1, 0x47, 0x97, 0x95, 0x0B, + 0x4E, 0xE6, 0x57, 0xEC, 0xC5, 0xF8, 0x57, 0x54, 0x71, 0x39, + 0x3C, 0x79, 0xE1, 0x40, 0x3F, 0xB6, 0x51, 0xE9, 0x7C, 0xC7, + 0xDA, 0x2D, 0xEF, 0xD2, 0xE8, 0x79, 0x81, 0x7B, 0xAB, 0xA3, + 0x5F, 0x6B, 0x2A, 0x6C, 0x97, 0x1A, 0x5E, 0x8E, 0xD9, 0xD0, + 0xCC, 0x04 +}; +#define sizeof_root_sm2_key_der (sizeof(root_sm2_key_der)) + +/* ./certs/sm2/root-sm2-priv.der */ +static const unsigned char root_sm2_priv_der[] = +{ + 0x30, 0x77, 0x02, 0x01, 0x01, 0x04, 0x20, 0xC6, 0x6B, 0x34, + 0x4C, 0x33, 0x37, 0x5B, 0x64, 0x16, 0x5A, 0x7F, 0x04, 0xF9, + 0xFC, 0x87, 0x30, 0xD1, 0x15, 0xBA, 0x58, 0x78, 0xEE, 0x07, + 0x98, 0x20, 0x26, 0xE1, 0x06, 0x8D, 0x51, 0x8A, 0x28, 0xA0, + 0x0A, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, + 0x2D, 0xA1, 0x44, 0x03, 0x42, 0x00, 0x04, 0xBB, 0x9C, 0x75, + 0x8C, 0xF7, 0x17, 0xF8, 0x48, 0xAB, 0xF7, 0xF6, 0xDB, 0x0D, + 0x9A, 0x8D, 0x9F, 0xC2, 0xD1, 0x47, 0x97, 0x95, 0x0B, 0x4E, + 0xE6, 0x57, 0xEC, 0xC5, 0xF8, 0x57, 0x54, 0x71, 0x39, 0x3C, + 0x79, 0xE1, 0x40, 0x3F, 0xB6, 0x51, 0xE9, 0x7C, 0xC7, 0xDA, + 0x2D, 0xEF, 0xD2, 0xE8, 0x79, 0x81, 0x7B, 0xAB, 0xA3, 0x5F, + 0x6B, 0x2A, 0x6C, 0x97, 0x1A, 0x5E, 0x8E, 0xD9, 0xD0, 0xCC, + 0x04 +}; +#define sizeof_root_sm2_priv_der (sizeof(root_sm2_priv_der)) + +/* ./certs/sm2/server-sm2.der */ +static const unsigned char server_sm2_der[] = +{ + 0x30, 0x82, 0x02, 0xD8, 0x30, 0x82, 0x02, 0x7E, 0xA0, 0x03, + 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x30, 0x0A, 0x06, 0x08, + 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x83, 0x75, 0x30, 0x81, + 0xAC, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, + 0x13, 0x02, 0x55, 0x53, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, + 0x55, 0x04, 0x08, 0x0C, 0x07, 0x4D, 0x6F, 0x6E, 0x74, 0x61, + 0x6E, 0x61, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, + 0x07, 0x0C, 0x07, 0x42, 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, + 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, + 0x0B, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, 0x73, + 0x6D, 0x32, 0x31, 0x0F, 0x30, 0x0D, 0x06, 0x03, 0x55, 0x04, + 0x0B, 0x0C, 0x06, 0x43, 0x41, 0x2D, 0x73, 0x6D, 0x32, 0x31, + 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0F, + 0x77, 0x77, 0x77, 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, + 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x1F, 0x30, 0x1D, 0x06, + 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x01, + 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C, + 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x17, + 0x30, 0x15, 0x06, 0x0A, 0x09, 0x92, 0x26, 0x89, 0x93, 0xF2, + 0x2C, 0x64, 0x01, 0x01, 0x0C, 0x07, 0x77, 0x6F, 0x6C, 0x66, + 0x53, 0x53, 0x4C, 0x30, 0x1E, 0x17, 0x0D, 0x32, 0x33, 0x30, + 0x32, 0x31, 0x35, 0x30, 0x36, 0x32, 0x33, 0x30, 0x37, 0x5A, + 0x17, 0x0D, 0x32, 0x35, 0x31, 0x31, 0x31, 0x31, 0x30, 0x36, + 0x32, 0x33, 0x30, 0x37, 0x5A, 0x30, 0x81, 0xB0, 0x31, 0x0B, + 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, + 0x53, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x08, + 0x0C, 0x07, 0x4D, 0x6F, 0x6E, 0x74, 0x61, 0x6E, 0x61, 0x31, + 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0C, 0x07, + 0x42, 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, 0x31, 0x14, 0x30, + 0x12, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, 0x0B, 0x77, 0x6F, + 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, 0x73, 0x6D, 0x32, 0x31, + 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x0A, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2D, 0x73, 0x6D, 0x32, + 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, + 0x0F, 0x77, 0x77, 0x77, 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, + 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x1F, 0x30, 0x1D, + 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, + 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, + 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, + 0x17, 0x30, 0x15, 0x06, 0x0A, 0x09, 0x92, 0x26, 0x89, 0x93, + 0xF2, 0x2C, 0x64, 0x01, 0x01, 0x0C, 0x07, 0x77, 0x6F, 0x6C, + 0x66, 0x53, 0x53, 0x4C, 0x30, 0x5A, 0x30, 0x14, 0x06, 0x08, + 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, 0x2D, 0x06, 0x08, + 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, 0x2D, 0x03, 0x42, + 0x00, 0x04, 0x94, 0x70, 0x2B, 0x46, 0xE4, 0x5E, 0x0F, 0x41, + 0xFB, 0x8F, 0x2D, 0x34, 0x0A, 0x41, 0x40, 0x19, 0x5E, 0xFB, + 0xD4, 0x1D, 0x11, 0xAC, 0xFA, 0xF5, 0x93, 0x37, 0xC6, 0xFA, + 0x87, 0x08, 0xF7, 0x16, 0x1F, 0x2C, 0xCE, 0x30, 0x40, 0x9D, + 0x4F, 0xA6, 0x2A, 0x0A, 0xA1, 0xD6, 0x95, 0x33, 0xC3, 0xA6, + 0x03, 0x98, 0xE6, 0x8D, 0x05, 0x34, 0xB0, 0x97, 0x0C, 0xDE, + 0xA4, 0xC7, 0xCF, 0x53, 0x8F, 0xD1, 0xA3, 0x81, 0x89, 0x30, + 0x81, 0x86, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04, + 0x16, 0x04, 0x14, 0x67, 0xAE, 0x60, 0xFF, 0x7E, 0x1B, 0x0F, + 0x95, 0xAE, 0x1F, 0x82, 0x59, 0xF2, 0x6C, 0x56, 0x2D, 0x93, + 0xEF, 0x17, 0x32, 0x30, 0x1F, 0x06, 0x03, 0x55, 0x1D, 0x23, + 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x47, 0x0A, 0x48, 0x7E, + 0xBB, 0x02, 0xA8, 0x5A, 0x26, 0x57, 0x2B, 0x19, 0xA9, 0x7B, + 0x61, 0x8B, 0x7F, 0x5D, 0x99, 0x6E, 0x30, 0x0C, 0x06, 0x03, + 0x55, 0x1D, 0x13, 0x01, 0x01, 0xFF, 0x04, 0x02, 0x30, 0x00, + 0x30, 0x0E, 0x06, 0x03, 0x55, 0x1D, 0x0F, 0x01, 0x01, 0xFF, + 0x04, 0x04, 0x03, 0x02, 0x03, 0xA8, 0x30, 0x13, 0x06, 0x03, + 0x55, 0x1D, 0x25, 0x04, 0x0C, 0x30, 0x0A, 0x06, 0x08, 0x2B, + 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x01, 0x30, 0x11, 0x06, + 0x09, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x42, 0x01, 0x01, + 0x04, 0x04, 0x03, 0x02, 0x06, 0x40, 0x30, 0x0A, 0x06, 0x08, + 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x83, 0x75, 0x03, 0x48, + 0x00, 0x30, 0x45, 0x02, 0x20, 0x1B, 0xCA, 0x94, 0x28, 0x7F, + 0xF6, 0xB2, 0x0D, 0x31, 0x43, 0x50, 0xE1, 0xD5, 0x34, 0x17, + 0xDD, 0xAF, 0x3A, 0xDE, 0x81, 0x06, 0x67, 0x9A, 0xB3, 0x06, + 0x22, 0x7E, 0x64, 0xEC, 0xFD, 0x0E, 0xB9, 0x02, 0x21, 0x00, + 0xA1, 0x48, 0xA8, 0x32, 0xD1, 0x05, 0x09, 0x6B, 0x1C, 0xEB, + 0x89, 0x12, 0x66, 0xD8, 0x38, 0xA1, 0xC4, 0x5C, 0x89, 0x09, + 0x0F, 0xFD, 0xE9, 0xC0, 0x3B, 0x1D, 0xFB, 0xCD, 0xB5, 0x4C, + 0x31, 0x68 +}; +#define sizeof_server_sm2_der (sizeof(server_sm2_der)) + +/* ./certs/sm2/server-sm2-cert.der */ +static const unsigned char server_sm2_cert_der[] = +{ + 0x30, 0x82, 0x02, 0xD8, 0x30, 0x82, 0x02, 0x7E, 0xA0, 0x03, + 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x30, 0x0A, 0x06, 0x08, + 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x83, 0x75, 0x30, 0x81, + 0xAC, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, + 0x13, 0x02, 0x55, 0x53, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, + 0x55, 0x04, 0x08, 0x0C, 0x07, 0x4D, 0x6F, 0x6E, 0x74, 0x61, + 0x6E, 0x61, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, + 0x07, 0x0C, 0x07, 0x42, 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, + 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, + 0x0B, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, 0x73, + 0x6D, 0x32, 0x31, 0x0F, 0x30, 0x0D, 0x06, 0x03, 0x55, 0x04, + 0x0B, 0x0C, 0x06, 0x43, 0x41, 0x2D, 0x73, 0x6D, 0x32, 0x31, + 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0F, + 0x77, 0x77, 0x77, 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, + 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x1F, 0x30, 0x1D, 0x06, + 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x01, + 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C, + 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x17, + 0x30, 0x15, 0x06, 0x0A, 0x09, 0x92, 0x26, 0x89, 0x93, 0xF2, + 0x2C, 0x64, 0x01, 0x01, 0x0C, 0x07, 0x77, 0x6F, 0x6C, 0x66, + 0x53, 0x53, 0x4C, 0x30, 0x1E, 0x17, 0x0D, 0x32, 0x33, 0x30, + 0x32, 0x31, 0x35, 0x30, 0x36, 0x32, 0x33, 0x30, 0x37, 0x5A, + 0x17, 0x0D, 0x32, 0x35, 0x31, 0x31, 0x31, 0x31, 0x30, 0x36, + 0x32, 0x33, 0x30, 0x37, 0x5A, 0x30, 0x81, 0xB0, 0x31, 0x0B, + 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, + 0x53, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x08, + 0x0C, 0x07, 0x4D, 0x6F, 0x6E, 0x74, 0x61, 0x6E, 0x61, 0x31, + 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0C, 0x07, + 0x42, 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, 0x31, 0x14, 0x30, + 0x12, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, 0x0B, 0x77, 0x6F, + 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, 0x73, 0x6D, 0x32, 0x31, + 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x0A, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2D, 0x73, 0x6D, 0x32, + 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, + 0x0F, 0x77, 0x77, 0x77, 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, + 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x1F, 0x30, 0x1D, + 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, + 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, + 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31, + 0x17, 0x30, 0x15, 0x06, 0x0A, 0x09, 0x92, 0x26, 0x89, 0x93, + 0xF2, 0x2C, 0x64, 0x01, 0x01, 0x0C, 0x07, 0x77, 0x6F, 0x6C, + 0x66, 0x53, 0x53, 0x4C, 0x30, 0x5A, 0x30, 0x14, 0x06, 0x08, + 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, 0x2D, 0x06, 0x08, + 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, 0x2D, 0x03, 0x42, + 0x00, 0x04, 0x94, 0x70, 0x2B, 0x46, 0xE4, 0x5E, 0x0F, 0x41, + 0xFB, 0x8F, 0x2D, 0x34, 0x0A, 0x41, 0x40, 0x19, 0x5E, 0xFB, + 0xD4, 0x1D, 0x11, 0xAC, 0xFA, 0xF5, 0x93, 0x37, 0xC6, 0xFA, + 0x87, 0x08, 0xF7, 0x16, 0x1F, 0x2C, 0xCE, 0x30, 0x40, 0x9D, + 0x4F, 0xA6, 0x2A, 0x0A, 0xA1, 0xD6, 0x95, 0x33, 0xC3, 0xA6, + 0x03, 0x98, 0xE6, 0x8D, 0x05, 0x34, 0xB0, 0x97, 0x0C, 0xDE, + 0xA4, 0xC7, 0xCF, 0x53, 0x8F, 0xD1, 0xA3, 0x81, 0x89, 0x30, + 0x81, 0x86, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04, + 0x16, 0x04, 0x14, 0x67, 0xAE, 0x60, 0xFF, 0x7E, 0x1B, 0x0F, + 0x95, 0xAE, 0x1F, 0x82, 0x59, 0xF2, 0x6C, 0x56, 0x2D, 0x93, + 0xEF, 0x17, 0x32, 0x30, 0x1F, 0x06, 0x03, 0x55, 0x1D, 0x23, + 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x47, 0x0A, 0x48, 0x7E, + 0xBB, 0x02, 0xA8, 0x5A, 0x26, 0x57, 0x2B, 0x19, 0xA9, 0x7B, + 0x61, 0x8B, 0x7F, 0x5D, 0x99, 0x6E, 0x30, 0x0C, 0x06, 0x03, + 0x55, 0x1D, 0x13, 0x01, 0x01, 0xFF, 0x04, 0x02, 0x30, 0x00, + 0x30, 0x0E, 0x06, 0x03, 0x55, 0x1D, 0x0F, 0x01, 0x01, 0xFF, + 0x04, 0x04, 0x03, 0x02, 0x03, 0xA8, 0x30, 0x13, 0x06, 0x03, + 0x55, 0x1D, 0x25, 0x04, 0x0C, 0x30, 0x0A, 0x06, 0x08, 0x2B, + 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x01, 0x30, 0x11, 0x06, + 0x09, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x42, 0x01, 0x01, + 0x04, 0x04, 0x03, 0x02, 0x06, 0x40, 0x30, 0x0A, 0x06, 0x08, + 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x83, 0x75, 0x03, 0x48, + 0x00, 0x30, 0x45, 0x02, 0x20, 0x1B, 0xCA, 0x94, 0x28, 0x7F, + 0xF6, 0xB2, 0x0D, 0x31, 0x43, 0x50, 0xE1, 0xD5, 0x34, 0x17, + 0xDD, 0xAF, 0x3A, 0xDE, 0x81, 0x06, 0x67, 0x9A, 0xB3, 0x06, + 0x22, 0x7E, 0x64, 0xEC, 0xFD, 0x0E, 0xB9, 0x02, 0x21, 0x00, + 0xA1, 0x48, 0xA8, 0x32, 0xD1, 0x05, 0x09, 0x6B, 0x1C, 0xEB, + 0x89, 0x12, 0x66, 0xD8, 0x38, 0xA1, 0xC4, 0x5C, 0x89, 0x09, + 0x0F, 0xFD, 0xE9, 0xC0, 0x3B, 0x1D, 0xFB, 0xCD, 0xB5, 0x4C, + 0x31, 0x68 +}; +#define sizeof_server_sm2_cert_der (sizeof(server_sm2_cert_der)) + +/* ./certs/sm2/server-sm2-key.der */ +static const unsigned char server_sm2_key_der[] = +{ + 0x30, 0x5A, 0x30, 0x14, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, + 0x55, 0x01, 0x82, 0x2D, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, + 0x55, 0x01, 0x82, 0x2D, 0x03, 0x42, 0x00, 0x04, 0x94, 0x70, + 0x2B, 0x46, 0xE4, 0x5E, 0x0F, 0x41, 0xFB, 0x8F, 0x2D, 0x34, + 0x0A, 0x41, 0x40, 0x19, 0x5E, 0xFB, 0xD4, 0x1D, 0x11, 0xAC, + 0xFA, 0xF5, 0x93, 0x37, 0xC6, 0xFA, 0x87, 0x08, 0xF7, 0x16, + 0x1F, 0x2C, 0xCE, 0x30, 0x40, 0x9D, 0x4F, 0xA6, 0x2A, 0x0A, + 0xA1, 0xD6, 0x95, 0x33, 0xC3, 0xA6, 0x03, 0x98, 0xE6, 0x8D, + 0x05, 0x34, 0xB0, 0x97, 0x0C, 0xDE, 0xA4, 0xC7, 0xCF, 0x53, + 0x8F, 0xD1 +}; +#define sizeof_server_sm2_key_der (sizeof(server_sm2_key_der)) + +/* ./certs/sm2/server-sm2-priv.der */ +static const unsigned char server_sm2_priv_der[] = +{ + 0x30, 0x77, 0x02, 0x01, 0x01, 0x04, 0x20, 0xD7, 0x33, 0xC1, + 0xA1, 0x71, 0x98, 0xDA, 0x43, 0x81, 0x0D, 0x70, 0x42, 0x88, + 0x63, 0xD0, 0x4C, 0x7E, 0x0F, 0x8A, 0x9B, 0x2D, 0xDA, 0x15, + 0xAA, 0x0E, 0x5A, 0xFA, 0xED, 0x77, 0x3A, 0x43, 0xA8, 0xA0, + 0x0A, 0x06, 0x08, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, + 0x2D, 0xA1, 0x44, 0x03, 0x42, 0x00, 0x04, 0x94, 0x70, 0x2B, + 0x46, 0xE4, 0x5E, 0x0F, 0x41, 0xFB, 0x8F, 0x2D, 0x34, 0x0A, + 0x41, 0x40, 0x19, 0x5E, 0xFB, 0xD4, 0x1D, 0x11, 0xAC, 0xFA, + 0xF5, 0x93, 0x37, 0xC6, 0xFA, 0x87, 0x08, 0xF7, 0x16, 0x1F, + 0x2C, 0xCE, 0x30, 0x40, 0x9D, 0x4F, 0xA6, 0x2A, 0x0A, 0xA1, + 0xD6, 0x95, 0x33, 0xC3, 0xA6, 0x03, 0x98, 0xE6, 0x8D, 0x05, + 0x34, 0xB0, 0x97, 0x0C, 0xDE, 0xA4, 0xC7, 0xCF, 0x53, 0x8F, + 0xD1 +}; +#define sizeof_server_sm2_priv_der (sizeof(server_sm2_priv_der)) + + /* DER Certs End */ + +#ifdef WOLFSSL_NO_PEM + + /* SM PEM Certs disabled */ + +#else + +/* ./certs/sm2/ca-sm2.pem */ +static const unsigned char ca_sm2[] = +{ + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x44, 0x61, 0x74, + 0x61, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3A, 0x20, + 0x33, 0x20, 0x28, 0x30, 0x78, 0x32, 0x29, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x65, 0x72, 0x69, + 0x61, 0x6C, 0x20, 0x4E, 0x75, 0x6D, 0x62, 0x65, 0x72, 0x3A, + 0x20, 0x31, 0x20, 0x28, 0x30, 0x78, 0x31, 0x29, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, 0x67, + 0x6E, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x41, 0x6C, 0x67, + 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x3A, 0x20, 0x53, 0x4D, + 0x32, 0x2D, 0x77, 0x69, 0x74, 0x68, 0x2D, 0x53, 0x4D, 0x33, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x49, + 0x73, 0x73, 0x75, 0x65, 0x72, 0x3A, 0x20, 0x43, 0x20, 0x3D, + 0x20, 0x55, 0x53, 0x2C, 0x20, 0x53, 0x54, 0x20, 0x3D, 0x20, + 0x4D, 0x6F, 0x6E, 0x74, 0x61, 0x6E, 0x61, 0x2C, 0x20, 0x4C, + 0x20, 0x3D, 0x20, 0x42, 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, + 0x2C, 0x20, 0x4F, 0x20, 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, + 0x53, 0x53, 0x4C, 0x5F, 0x53, 0x4D, 0x32, 0x2C, 0x20, 0x4F, + 0x55, 0x20, 0x3D, 0x20, 0x52, 0x6F, 0x6F, 0x74, 0x2D, 0x53, + 0x4D, 0x32, 0x2C, 0x20, 0x43, 0x4E, 0x20, 0x3D, 0x20, 0x77, + 0x77, 0x77, 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, + 0x2E, 0x63, 0x6F, 0x6D, 0x2C, 0x20, 0x65, 0x6D, 0x61, 0x69, + 0x6C, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3D, + 0x20, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C, 0x66, + 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x56, 0x61, 0x6C, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4E, 0x6F, 0x74, + 0x20, 0x42, 0x65, 0x66, 0x6F, 0x72, 0x65, 0x3A, 0x20, 0x46, + 0x65, 0x62, 0x20, 0x31, 0x35, 0x20, 0x30, 0x36, 0x3A, 0x32, + 0x33, 0x3A, 0x30, 0x37, 0x20, 0x32, 0x30, 0x32, 0x33, 0x20, + 0x47, 0x4D, 0x54, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4E, 0x6F, 0x74, 0x20, + 0x41, 0x66, 0x74, 0x65, 0x72, 0x20, 0x3A, 0x20, 0x4E, 0x6F, + 0x76, 0x20, 0x31, 0x31, 0x20, 0x30, 0x36, 0x3A, 0x32, 0x33, + 0x3A, 0x30, 0x37, 0x20, 0x32, 0x30, 0x32, 0x35, 0x20, 0x47, + 0x4D, 0x54, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x53, 0x75, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x3A, 0x20, + 0x43, 0x20, 0x3D, 0x20, 0x55, 0x53, 0x2C, 0x20, 0x53, 0x54, + 0x20, 0x3D, 0x20, 0x4D, 0x6F, 0x6E, 0x74, 0x61, 0x6E, 0x61, + 0x2C, 0x20, 0x4C, 0x20, 0x3D, 0x20, 0x42, 0x6F, 0x7A, 0x65, + 0x6D, 0x61, 0x6E, 0x2C, 0x20, 0x4F, 0x20, 0x3D, 0x20, 0x77, + 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, 0x73, 0x6D, 0x32, + 0x2C, 0x20, 0x4F, 0x55, 0x20, 0x3D, 0x20, 0x43, 0x41, 0x2D, + 0x73, 0x6D, 0x32, 0x2C, 0x20, 0x43, 0x4E, 0x20, 0x3D, 0x20, + 0x77, 0x77, 0x77, 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, + 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x2C, 0x20, 0x65, 0x6D, 0x61, + 0x69, 0x6C, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, + 0x3D, 0x20, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C, + 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x2C, 0x20, + 0x55, 0x49, 0x44, 0x20, 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, + 0x53, 0x53, 0x4C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x53, 0x75, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x20, + 0x50, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x20, 0x4B, 0x65, 0x79, + 0x20, 0x49, 0x6E, 0x66, 0x6F, 0x3A, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, + 0x75, 0x62, 0x6C, 0x69, 0x63, 0x20, 0x4B, 0x65, 0x79, 0x20, + 0x41, 0x6C, 0x67, 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x3A, + 0x20, 0x73, 0x6D, 0x32, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x50, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x2D, 0x4B, 0x65, + 0x79, 0x3A, 0x20, 0x28, 0x32, 0x35, 0x36, 0x20, 0x62, 0x69, + 0x74, 0x29, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, + 0x75, 0x62, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x30, 0x34, 0x3A, 0x32, 0x31, 0x3A, + 0x39, 0x32, 0x3A, 0x66, 0x37, 0x3A, 0x63, 0x62, 0x3A, 0x32, + 0x34, 0x3A, 0x64, 0x66, 0x3A, 0x36, 0x34, 0x3A, 0x34, 0x64, + 0x3A, 0x62, 0x61, 0x3A, 0x61, 0x62, 0x3A, 0x36, 0x36, 0x3A, + 0x37, 0x62, 0x3A, 0x38, 0x33, 0x3A, 0x37, 0x35, 0x3A, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x61, 0x39, 0x3A, 0x32, 0x39, 0x3A, 0x65, 0x37, 0x3A, 0x66, + 0x66, 0x3A, 0x36, 0x34, 0x3A, 0x36, 0x33, 0x3A, 0x62, 0x36, + 0x3A, 0x64, 0x35, 0x3A, 0x34, 0x32, 0x3A, 0x38, 0x30, 0x3A, + 0x32, 0x30, 0x3A, 0x62, 0x64, 0x3A, 0x65, 0x32, 0x3A, 0x65, + 0x32, 0x3A, 0x30, 0x32, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x32, 0x3A, 0x33, + 0x62, 0x3A, 0x38, 0x65, 0x3A, 0x62, 0x34, 0x3A, 0x30, 0x30, + 0x3A, 0x39, 0x35, 0x3A, 0x30, 0x39, 0x3A, 0x38, 0x30, 0x3A, + 0x63, 0x62, 0x3A, 0x35, 0x36, 0x3A, 0x65, 0x64, 0x3A, 0x34, + 0x62, 0x3A, 0x63, 0x61, 0x3A, 0x38, 0x64, 0x3A, 0x35, 0x37, + 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x65, 0x36, 0x3A, 0x61, 0x65, 0x3A, 0x30, 0x35, + 0x3A, 0x64, 0x33, 0x3A, 0x37, 0x36, 0x3A, 0x32, 0x37, 0x3A, + 0x36, 0x33, 0x3A, 0x37, 0x31, 0x3A, 0x33, 0x39, 0x3A, 0x38, + 0x39, 0x3A, 0x62, 0x37, 0x3A, 0x36, 0x39, 0x3A, 0x65, 0x36, + 0x3A, 0x34, 0x38, 0x3A, 0x38, 0x30, 0x3A, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x65, + 0x3A, 0x64, 0x31, 0x3A, 0x61, 0x39, 0x3A, 0x34, 0x38, 0x3A, + 0x31, 0x32, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x41, + 0x53, 0x4E, 0x31, 0x20, 0x4F, 0x49, 0x44, 0x3A, 0x20, 0x53, + 0x4D, 0x32, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x65, 0x78, + 0x74, 0x65, 0x6E, 0x73, 0x69, 0x6F, 0x6E, 0x73, 0x3A, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x53, + 0x75, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x4B, 0x65, 0x79, + 0x20, 0x49, 0x64, 0x65, 0x6E, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x3A, 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x34, 0x37, 0x3A, 0x30, 0x41, 0x3A, 0x34, 0x38, 0x3A, 0x37, + 0x45, 0x3A, 0x42, 0x42, 0x3A, 0x30, 0x32, 0x3A, 0x41, 0x38, + 0x3A, 0x35, 0x41, 0x3A, 0x32, 0x36, 0x3A, 0x35, 0x37, 0x3A, + 0x32, 0x42, 0x3A, 0x31, 0x39, 0x3A, 0x41, 0x39, 0x3A, 0x37, + 0x42, 0x3A, 0x36, 0x31, 0x3A, 0x38, 0x42, 0x3A, 0x37, 0x46, + 0x3A, 0x35, 0x44, 0x3A, 0x39, 0x39, 0x3A, 0x36, 0x45, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x41, + 0x75, 0x74, 0x68, 0x6F, 0x72, 0x69, 0x74, 0x79, 0x20, 0x4B, + 0x65, 0x79, 0x20, 0x49, 0x64, 0x65, 0x6E, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x3A, 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x33, 0x34, 0x3A, 0x31, 0x44, 0x3A, 0x37, 0x39, + 0x3A, 0x34, 0x34, 0x3A, 0x31, 0x35, 0x3A, 0x37, 0x39, 0x3A, + 0x41, 0x31, 0x3A, 0x42, 0x31, 0x3A, 0x36, 0x33, 0x3A, 0x39, + 0x39, 0x3A, 0x45, 0x33, 0x3A, 0x45, 0x44, 0x3A, 0x36, 0x35, + 0x3A, 0x37, 0x43, 0x3A, 0x36, 0x34, 0x3A, 0x38, 0x39, 0x3A, + 0x38, 0x30, 0x3A, 0x46, 0x46, 0x3A, 0x42, 0x38, 0x3A, 0x45, + 0x43, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, + 0x20, 0x42, 0x61, 0x73, 0x69, 0x63, 0x20, 0x43, 0x6F, 0x6E, + 0x73, 0x74, 0x72, 0x61, 0x69, 0x6E, 0x74, 0x73, 0x3A, 0x20, + 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6C, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x43, 0x41, 0x3A, 0x54, 0x52, + 0x55, 0x45, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, + 0x33, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x55, 0x73, 0x61, 0x67, + 0x65, 0x3A, 0x20, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, + 0x6C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x69, + 0x67, 0x69, 0x74, 0x61, 0x6C, 0x20, 0x53, 0x69, 0x67, 0x6E, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x2C, 0x20, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x20, 0x53, + 0x69, 0x67, 0x6E, 0x2C, 0x20, 0x43, 0x52, 0x4C, 0x20, 0x53, + 0x69, 0x67, 0x6E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, + 0x67, 0x6E, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x41, 0x6C, + 0x67, 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x3A, 0x20, 0x53, + 0x4D, 0x32, 0x2D, 0x77, 0x69, 0x74, 0x68, 0x2D, 0x53, 0x4D, + 0x33, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, 0x67, 0x6E, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x56, 0x61, 0x6C, 0x75, + 0x65, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x33, 0x30, 0x3A, 0x34, 0x35, 0x3A, 0x30, 0x32, 0x3A, + 0x32, 0x30, 0x3A, 0x34, 0x37, 0x3A, 0x34, 0x65, 0x3A, 0x30, + 0x30, 0x3A, 0x30, 0x33, 0x3A, 0x61, 0x62, 0x3A, 0x33, 0x34, + 0x3A, 0x61, 0x31, 0x3A, 0x61, 0x66, 0x3A, 0x35, 0x39, 0x3A, + 0x33, 0x39, 0x3A, 0x38, 0x66, 0x3A, 0x36, 0x30, 0x3A, 0x33, + 0x36, 0x3A, 0x62, 0x66, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x38, 0x39, 0x3A, 0x38, 0x38, 0x3A, + 0x34, 0x32, 0x3A, 0x34, 0x31, 0x3A, 0x32, 0x37, 0x3A, 0x63, + 0x31, 0x3A, 0x64, 0x64, 0x3A, 0x35, 0x37, 0x3A, 0x63, 0x39, + 0x3A, 0x37, 0x39, 0x3A, 0x63, 0x62, 0x3A, 0x31, 0x66, 0x3A, + 0x35, 0x36, 0x3A, 0x35, 0x63, 0x3A, 0x31, 0x36, 0x3A, 0x62, + 0x35, 0x3A, 0x32, 0x38, 0x3A, 0x62, 0x64, 0x3A, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x32, 0x3A, + 0x32, 0x31, 0x3A, 0x30, 0x30, 0x3A, 0x38, 0x62, 0x3A, 0x32, + 0x65, 0x3A, 0x32, 0x35, 0x3A, 0x65, 0x62, 0x3A, 0x32, 0x31, + 0x3A, 0x39, 0x62, 0x3A, 0x61, 0x39, 0x3A, 0x32, 0x62, 0x3A, + 0x61, 0x36, 0x3A, 0x36, 0x61, 0x3A, 0x35, 0x62, 0x3A, 0x64, + 0x62, 0x3A, 0x61, 0x37, 0x3A, 0x63, 0x37, 0x3A, 0x32, 0x62, + 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x31, 0x31, 0x3A, 0x64, 0x66, 0x3A, 0x37, 0x33, 0x3A, 0x31, + 0x35, 0x3A, 0x61, 0x64, 0x3A, 0x65, 0x34, 0x3A, 0x63, 0x35, + 0x3A, 0x63, 0x33, 0x3A, 0x63, 0x32, 0x3A, 0x66, 0x33, 0x3A, + 0x62, 0x34, 0x3A, 0x62, 0x34, 0x3A, 0x36, 0x37, 0x3A, 0x61, + 0x66, 0x3A, 0x64, 0x37, 0x3A, 0x35, 0x31, 0x3A, 0x31, 0x63, + 0x0A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, + 0x4E, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, + 0x41, 0x54, 0x45, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, + 0x49, 0x49, 0x43, 0x6C, 0x6A, 0x43, 0x43, 0x41, 0x6A, 0x79, + 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x42, 0x41, + 0x54, 0x41, 0x4B, 0x42, 0x67, 0x67, 0x71, 0x67, 0x52, 0x7A, + 0x50, 0x56, 0x51, 0x47, 0x44, 0x64, 0x54, 0x43, 0x42, 0x6C, + 0x54, 0x45, 0x4C, 0x4D, 0x41, 0x6B, 0x47, 0x41, 0x31, 0x55, + 0x45, 0x42, 0x68, 0x4D, 0x43, 0x56, 0x56, 0x4D, 0x78, 0x45, + 0x44, 0x41, 0x4F, 0x0A, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, + 0x67, 0x4D, 0x42, 0x30, 0x31, 0x76, 0x62, 0x6E, 0x52, 0x68, + 0x62, 0x6D, 0x45, 0x78, 0x45, 0x44, 0x41, 0x4F, 0x42, 0x67, + 0x4E, 0x56, 0x42, 0x41, 0x63, 0x4D, 0x42, 0x30, 0x4A, 0x76, + 0x65, 0x6D, 0x56, 0x74, 0x59, 0x57, 0x34, 0x78, 0x46, 0x44, + 0x41, 0x53, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x6F, 0x4D, + 0x43, 0x33, 0x64, 0x76, 0x62, 0x47, 0x5A, 0x54, 0x0A, 0x55, + 0x30, 0x78, 0x66, 0x55, 0x30, 0x30, 0x79, 0x4D, 0x52, 0x45, + 0x77, 0x44, 0x77, 0x59, 0x44, 0x56, 0x51, 0x51, 0x4C, 0x44, + 0x41, 0x68, 0x53, 0x62, 0x32, 0x39, 0x30, 0x4C, 0x56, 0x4E, + 0x4E, 0x4D, 0x6A, 0x45, 0x59, 0x4D, 0x42, 0x59, 0x47, 0x41, + 0x31, 0x55, 0x45, 0x41, 0x77, 0x77, 0x50, 0x64, 0x33, 0x64, + 0x33, 0x4C, 0x6E, 0x64, 0x76, 0x62, 0x47, 0x5A, 0x7A, 0x63, + 0x32, 0x77, 0x75, 0x0A, 0x59, 0x32, 0x39, 0x74, 0x4D, 0x52, + 0x38, 0x77, 0x48, 0x51, 0x59, 0x4A, 0x4B, 0x6F, 0x5A, 0x49, + 0x68, 0x76, 0x63, 0x4E, 0x41, 0x51, 0x6B, 0x42, 0x46, 0x68, + 0x42, 0x70, 0x62, 0x6D, 0x5A, 0x76, 0x51, 0x48, 0x64, 0x76, + 0x62, 0x47, 0x5A, 0x7A, 0x63, 0x32, 0x77, 0x75, 0x59, 0x32, + 0x39, 0x74, 0x4D, 0x42, 0x34, 0x58, 0x44, 0x54, 0x49, 0x7A, + 0x4D, 0x44, 0x49, 0x78, 0x4E, 0x54, 0x41, 0x32, 0x0A, 0x4D, + 0x6A, 0x4D, 0x77, 0x4E, 0x31, 0x6F, 0x58, 0x44, 0x54, 0x49, + 0x31, 0x4D, 0x54, 0x45, 0x78, 0x4D, 0x54, 0x41, 0x32, 0x4D, + 0x6A, 0x4D, 0x77, 0x4E, 0x31, 0x6F, 0x77, 0x67, 0x61, 0x77, + 0x78, 0x43, 0x7A, 0x41, 0x4A, 0x42, 0x67, 0x4E, 0x56, 0x42, + 0x41, 0x59, 0x54, 0x41, 0x6C, 0x56, 0x54, 0x4D, 0x52, 0x41, + 0x77, 0x44, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x49, 0x44, + 0x41, 0x64, 0x4E, 0x0A, 0x62, 0x32, 0x35, 0x30, 0x59, 0x57, + 0x35, 0x68, 0x4D, 0x52, 0x41, 0x77, 0x44, 0x67, 0x59, 0x44, + 0x56, 0x51, 0x51, 0x48, 0x44, 0x41, 0x64, 0x43, 0x62, 0x33, + 0x70, 0x6C, 0x62, 0x57, 0x46, 0x75, 0x4D, 0x52, 0x51, 0x77, + 0x45, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x4B, 0x44, 0x41, + 0x74, 0x33, 0x62, 0x32, 0x78, 0x6D, 0x55, 0x31, 0x4E, 0x4D, + 0x58, 0x33, 0x4E, 0x74, 0x4D, 0x6A, 0x45, 0x50, 0x0A, 0x4D, + 0x41, 0x30, 0x47, 0x41, 0x31, 0x55, 0x45, 0x43, 0x77, 0x77, + 0x47, 0x51, 0x30, 0x45, 0x74, 0x63, 0x32, 0x30, 0x79, 0x4D, + 0x52, 0x67, 0x77, 0x46, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, + 0x44, 0x44, 0x41, 0x39, 0x33, 0x64, 0x33, 0x63, 0x75, 0x64, + 0x32, 0x39, 0x73, 0x5A, 0x6E, 0x4E, 0x7A, 0x62, 0x43, 0x35, + 0x6A, 0x62, 0x32, 0x30, 0x78, 0x48, 0x7A, 0x41, 0x64, 0x42, + 0x67, 0x6B, 0x71, 0x0A, 0x68, 0x6B, 0x69, 0x47, 0x39, 0x77, + 0x30, 0x42, 0x43, 0x51, 0x45, 0x57, 0x45, 0x47, 0x6C, 0x75, + 0x5A, 0x6D, 0x39, 0x41, 0x64, 0x32, 0x39, 0x73, 0x5A, 0x6E, + 0x4E, 0x7A, 0x62, 0x43, 0x35, 0x6A, 0x62, 0x32, 0x30, 0x78, + 0x46, 0x7A, 0x41, 0x56, 0x42, 0x67, 0x6F, 0x4A, 0x6B, 0x69, + 0x61, 0x4A, 0x6B, 0x2F, 0x49, 0x73, 0x5A, 0x41, 0x45, 0x42, + 0x44, 0x41, 0x64, 0x33, 0x62, 0x32, 0x78, 0x6D, 0x0A, 0x55, + 0x31, 0x4E, 0x4D, 0x4D, 0x46, 0x6F, 0x77, 0x46, 0x41, 0x59, + 0x49, 0x4B, 0x6F, 0x45, 0x63, 0x7A, 0x31, 0x55, 0x42, 0x67, + 0x69, 0x30, 0x47, 0x43, 0x43, 0x71, 0x42, 0x48, 0x4D, 0x39, + 0x56, 0x41, 0x59, 0x49, 0x74, 0x41, 0x30, 0x49, 0x41, 0x42, + 0x43, 0x47, 0x53, 0x39, 0x38, 0x73, 0x6B, 0x33, 0x32, 0x52, + 0x4E, 0x75, 0x71, 0x74, 0x6D, 0x65, 0x34, 0x4E, 0x31, 0x71, + 0x53, 0x6E, 0x6E, 0x0A, 0x2F, 0x32, 0x52, 0x6A, 0x74, 0x74, + 0x56, 0x43, 0x67, 0x43, 0x43, 0x39, 0x34, 0x75, 0x49, 0x43, + 0x45, 0x6A, 0x75, 0x4F, 0x74, 0x41, 0x43, 0x56, 0x43, 0x59, + 0x44, 0x4C, 0x56, 0x75, 0x31, 0x4C, 0x79, 0x6F, 0x31, 0x58, + 0x35, 0x71, 0x34, 0x46, 0x30, 0x33, 0x59, 0x6E, 0x59, 0x33, + 0x45, 0x35, 0x69, 0x62, 0x64, 0x70, 0x35, 0x6B, 0x69, 0x41, + 0x72, 0x74, 0x47, 0x70, 0x53, 0x42, 0x4B, 0x6A, 0x0A, 0x59, + 0x7A, 0x42, 0x68, 0x4D, 0x42, 0x30, 0x47, 0x41, 0x31, 0x55, + 0x64, 0x44, 0x67, 0x51, 0x57, 0x42, 0x42, 0x52, 0x48, 0x43, + 0x6B, 0x68, 0x2B, 0x75, 0x77, 0x4B, 0x6F, 0x57, 0x69, 0x5A, + 0x58, 0x4B, 0x78, 0x6D, 0x70, 0x65, 0x32, 0x47, 0x4C, 0x66, + 0x31, 0x32, 0x5A, 0x62, 0x6A, 0x41, 0x66, 0x42, 0x67, 0x4E, + 0x56, 0x48, 0x53, 0x4D, 0x45, 0x47, 0x44, 0x41, 0x57, 0x67, + 0x42, 0x51, 0x30, 0x0A, 0x48, 0x58, 0x6C, 0x45, 0x46, 0x58, + 0x6D, 0x68, 0x73, 0x57, 0x4F, 0x5A, 0x34, 0x2B, 0x31, 0x6C, + 0x66, 0x47, 0x53, 0x4A, 0x67, 0x50, 0x2B, 0x34, 0x37, 0x44, + 0x41, 0x50, 0x42, 0x67, 0x4E, 0x56, 0x48, 0x52, 0x4D, 0x42, + 0x41, 0x66, 0x38, 0x45, 0x42, 0x54, 0x41, 0x44, 0x41, 0x51, + 0x48, 0x2F, 0x4D, 0x41, 0x34, 0x47, 0x41, 0x31, 0x55, 0x64, + 0x44, 0x77, 0x45, 0x42, 0x2F, 0x77, 0x51, 0x45, 0x0A, 0x41, + 0x77, 0x49, 0x42, 0x68, 0x6A, 0x41, 0x4B, 0x42, 0x67, 0x67, + 0x71, 0x67, 0x52, 0x7A, 0x50, 0x56, 0x51, 0x47, 0x44, 0x64, + 0x51, 0x4E, 0x49, 0x41, 0x44, 0x42, 0x46, 0x41, 0x69, 0x42, + 0x48, 0x54, 0x67, 0x41, 0x44, 0x71, 0x7A, 0x53, 0x68, 0x72, + 0x31, 0x6B, 0x35, 0x6A, 0x32, 0x41, 0x32, 0x76, 0x34, 0x6D, + 0x49, 0x51, 0x6B, 0x45, 0x6E, 0x77, 0x64, 0x31, 0x58, 0x79, + 0x58, 0x6E, 0x4C, 0x0A, 0x48, 0x31, 0x5A, 0x63, 0x46, 0x72, + 0x55, 0x6F, 0x76, 0x51, 0x49, 0x68, 0x41, 0x49, 0x73, 0x75, + 0x4A, 0x65, 0x73, 0x68, 0x6D, 0x36, 0x6B, 0x72, 0x70, 0x6D, + 0x70, 0x62, 0x32, 0x36, 0x66, 0x48, 0x4B, 0x78, 0x48, 0x66, + 0x63, 0x78, 0x57, 0x74, 0x35, 0x4D, 0x58, 0x44, 0x77, 0x76, + 0x4F, 0x30, 0x74, 0x47, 0x65, 0x76, 0x31, 0x31, 0x45, 0x63, + 0x0A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x45, 0x4E, 0x44, 0x20, + 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, + 0x45, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A +}; +#define sizeof_ca_sm2 (sizeof(ca_sm2)) + +/* ./certs/sm2/ca-sm2-key.pem */ +static const unsigned char ca_sm2_key[] = +{ + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, + 0x20, 0x50, 0x55, 0x42, 0x4C, 0x49, 0x43, 0x20, 0x4B, 0x45, + 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x46, 0x6F, + 0x77, 0x46, 0x41, 0x59, 0x49, 0x4B, 0x6F, 0x45, 0x63, 0x7A, + 0x31, 0x55, 0x42, 0x67, 0x69, 0x30, 0x47, 0x43, 0x43, 0x71, + 0x42, 0x48, 0x4D, 0x39, 0x56, 0x41, 0x59, 0x49, 0x74, 0x41, + 0x30, 0x49, 0x41, 0x42, 0x43, 0x47, 0x53, 0x39, 0x38, 0x73, + 0x6B, 0x33, 0x32, 0x52, 0x4E, 0x75, 0x71, 0x74, 0x6D, 0x65, + 0x34, 0x4E, 0x31, 0x71, 0x53, 0x6E, 0x6E, 0x2F, 0x32, 0x52, + 0x6A, 0x0A, 0x74, 0x74, 0x56, 0x43, 0x67, 0x43, 0x43, 0x39, + 0x34, 0x75, 0x49, 0x43, 0x45, 0x6A, 0x75, 0x4F, 0x74, 0x41, + 0x43, 0x56, 0x43, 0x59, 0x44, 0x4C, 0x56, 0x75, 0x31, 0x4C, + 0x79, 0x6F, 0x31, 0x58, 0x35, 0x71, 0x34, 0x46, 0x30, 0x33, + 0x59, 0x6E, 0x59, 0x33, 0x45, 0x35, 0x69, 0x62, 0x64, 0x70, + 0x35, 0x6B, 0x69, 0x41, 0x72, 0x74, 0x47, 0x70, 0x53, 0x42, + 0x49, 0x3D, 0x0A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x45, 0x4E, + 0x44, 0x20, 0x50, 0x55, 0x42, 0x4C, 0x49, 0x43, 0x20, 0x4B, + 0x45, 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A +}; +#define sizeof_ca_sm2_key (sizeof(ca_sm2_key)) + +/* ./certs/sm2/ca-sm2-priv.pem */ +static const unsigned char ca_sm2_priv[] = +{ + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, + 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4B, + 0x45, 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x49, + 0x47, 0x49, 0x41, 0x67, 0x45, 0x41, 0x4D, 0x42, 0x51, 0x47, + 0x43, 0x43, 0x71, 0x42, 0x48, 0x4D, 0x39, 0x56, 0x41, 0x59, + 0x49, 0x74, 0x42, 0x67, 0x67, 0x71, 0x67, 0x52, 0x7A, 0x50, + 0x56, 0x51, 0x47, 0x43, 0x4C, 0x51, 0x52, 0x74, 0x4D, 0x47, + 0x73, 0x43, 0x41, 0x51, 0x45, 0x45, 0x49, 0x49, 0x2B, 0x35, + 0x75, 0x45, 0x41, 0x5A, 0x44, 0x69, 0x45, 0x35, 0x36, 0x2B, + 0x67, 0x49, 0x0A, 0x66, 0x50, 0x33, 0x59, 0x6F, 0x51, 0x57, + 0x54, 0x70, 0x44, 0x55, 0x73, 0x30, 0x59, 0x44, 0x6A, 0x76, + 0x33, 0x35, 0x49, 0x52, 0x2B, 0x51, 0x46, 0x44, 0x51, 0x6C, + 0x42, 0x6F, 0x55, 0x51, 0x44, 0x51, 0x67, 0x41, 0x45, 0x49, + 0x5A, 0x4C, 0x33, 0x79, 0x79, 0x54, 0x66, 0x5A, 0x45, 0x32, + 0x36, 0x71, 0x32, 0x5A, 0x37, 0x67, 0x33, 0x57, 0x70, 0x4B, + 0x65, 0x66, 0x2F, 0x5A, 0x47, 0x4F, 0x32, 0x0A, 0x31, 0x55, + 0x4B, 0x41, 0x49, 0x4C, 0x33, 0x69, 0x34, 0x67, 0x49, 0x53, + 0x4F, 0x34, 0x36, 0x30, 0x41, 0x4A, 0x55, 0x4A, 0x67, 0x4D, + 0x74, 0x57, 0x37, 0x55, 0x76, 0x4B, 0x6A, 0x56, 0x66, 0x6D, + 0x72, 0x67, 0x58, 0x54, 0x64, 0x69, 0x64, 0x6A, 0x63, 0x54, + 0x6D, 0x4A, 0x74, 0x32, 0x6E, 0x6D, 0x53, 0x49, 0x43, 0x75, + 0x30, 0x61, 0x6C, 0x49, 0x45, 0x67, 0x3D, 0x3D, 0x0A, 0x2D, + 0x2D, 0x2D, 0x2D, 0x2D, 0x45, 0x4E, 0x44, 0x20, 0x50, 0x52, + 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4B, 0x45, 0x59, 0x2D, + 0x2D, 0x2D, 0x2D, 0x2D, 0x0A +}; +#define sizeof_ca_sm2_priv (sizeof(ca_sm2_priv)) + +/* ./certs/sm2/client-sm2.pem */ +static const unsigned char client_sm2[] = +{ + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x44, 0x61, 0x74, + 0x61, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3A, 0x20, + 0x33, 0x20, 0x28, 0x30, 0x78, 0x32, 0x29, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x65, 0x72, 0x69, + 0x61, 0x6C, 0x20, 0x4E, 0x75, 0x6D, 0x62, 0x65, 0x72, 0x3A, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x36, 0x30, 0x3A, 0x61, 0x30, 0x3A, 0x34, + 0x61, 0x3A, 0x30, 0x62, 0x3A, 0x33, 0x36, 0x3A, 0x65, 0x62, + 0x3A, 0x37, 0x64, 0x3A, 0x65, 0x31, 0x3A, 0x33, 0x66, 0x3A, + 0x37, 0x34, 0x3A, 0x32, 0x39, 0x3A, 0x61, 0x39, 0x3A, 0x32, + 0x39, 0x3A, 0x62, 0x34, 0x3A, 0x30, 0x35, 0x3A, 0x36, 0x63, + 0x3A, 0x31, 0x37, 0x3A, 0x66, 0x37, 0x3A, 0x61, 0x36, 0x3A, + 0x64, 0x34, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x53, 0x69, 0x67, 0x6E, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x20, 0x41, 0x6C, 0x67, 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, + 0x3A, 0x20, 0x53, 0x4D, 0x32, 0x2D, 0x77, 0x69, 0x74, 0x68, + 0x2D, 0x53, 0x4D, 0x33, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x3A, + 0x20, 0x43, 0x20, 0x3D, 0x20, 0x55, 0x53, 0x2C, 0x20, 0x53, + 0x54, 0x20, 0x3D, 0x20, 0x4D, 0x6F, 0x6E, 0x74, 0x61, 0x6E, + 0x61, 0x2C, 0x20, 0x4C, 0x20, 0x3D, 0x20, 0x42, 0x6F, 0x7A, + 0x65, 0x6D, 0x61, 0x6E, 0x2C, 0x20, 0x4F, 0x20, 0x3D, 0x20, + 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, 0x73, 0x6D, + 0x32, 0x2C, 0x20, 0x4F, 0x55, 0x20, 0x3D, 0x20, 0x43, 0x6C, + 0x69, 0x65, 0x6E, 0x74, 0x2D, 0x73, 0x6D, 0x32, 0x2C, 0x20, + 0x43, 0x4E, 0x20, 0x3D, 0x20, 0x77, 0x77, 0x77, 0x2E, 0x77, + 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, + 0x2C, 0x20, 0x65, 0x6D, 0x61, 0x69, 0x6C, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x20, 0x3D, 0x20, 0x69, 0x6E, 0x66, + 0x6F, 0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, + 0x63, 0x6F, 0x6D, 0x2C, 0x20, 0x55, 0x49, 0x44, 0x20, 0x3D, + 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x56, 0x61, 0x6C, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4E, 0x6F, + 0x74, 0x20, 0x42, 0x65, 0x66, 0x6F, 0x72, 0x65, 0x3A, 0x20, + 0x46, 0x65, 0x62, 0x20, 0x31, 0x35, 0x20, 0x30, 0x36, 0x3A, + 0x32, 0x33, 0x3A, 0x30, 0x37, 0x20, 0x32, 0x30, 0x32, 0x33, + 0x20, 0x47, 0x4D, 0x54, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4E, 0x6F, 0x74, + 0x20, 0x41, 0x66, 0x74, 0x65, 0x72, 0x20, 0x3A, 0x20, 0x4E, + 0x6F, 0x76, 0x20, 0x31, 0x31, 0x20, 0x30, 0x36, 0x3A, 0x32, + 0x33, 0x3A, 0x30, 0x37, 0x20, 0x32, 0x30, 0x32, 0x35, 0x20, + 0x47, 0x4D, 0x54, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x53, 0x75, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x3A, + 0x20, 0x43, 0x20, 0x3D, 0x20, 0x55, 0x53, 0x2C, 0x20, 0x53, + 0x54, 0x20, 0x3D, 0x20, 0x4D, 0x6F, 0x6E, 0x74, 0x61, 0x6E, + 0x61, 0x2C, 0x20, 0x4C, 0x20, 0x3D, 0x20, 0x42, 0x6F, 0x7A, + 0x65, 0x6D, 0x61, 0x6E, 0x2C, 0x20, 0x4F, 0x20, 0x3D, 0x20, + 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, 0x73, 0x6D, + 0x32, 0x2C, 0x20, 0x4F, 0x55, 0x20, 0x3D, 0x20, 0x43, 0x6C, + 0x69, 0x65, 0x6E, 0x74, 0x2D, 0x73, 0x6D, 0x32, 0x2C, 0x20, + 0x43, 0x4E, 0x20, 0x3D, 0x20, 0x77, 0x77, 0x77, 0x2E, 0x77, + 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, + 0x2C, 0x20, 0x65, 0x6D, 0x61, 0x69, 0x6C, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x20, 0x3D, 0x20, 0x69, 0x6E, 0x66, + 0x6F, 0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, + 0x63, 0x6F, 0x6D, 0x2C, 0x20, 0x55, 0x49, 0x44, 0x20, 0x3D, + 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x75, 0x62, + 0x6A, 0x65, 0x63, 0x74, 0x20, 0x50, 0x75, 0x62, 0x6C, 0x69, + 0x63, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x49, 0x6E, 0x66, 0x6F, + 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x50, 0x75, 0x62, 0x6C, 0x69, 0x63, + 0x20, 0x4B, 0x65, 0x79, 0x20, 0x41, 0x6C, 0x67, 0x6F, 0x72, + 0x69, 0x74, 0x68, 0x6D, 0x3A, 0x20, 0x73, 0x6D, 0x32, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x75, 0x62, 0x6C, + 0x69, 0x63, 0x2D, 0x4B, 0x65, 0x79, 0x3A, 0x20, 0x28, 0x32, + 0x35, 0x36, 0x20, 0x62, 0x69, 0x74, 0x29, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x70, 0x75, 0x62, 0x3A, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, + 0x34, 0x3A, 0x33, 0x61, 0x3A, 0x31, 0x64, 0x3A, 0x65, 0x38, + 0x3A, 0x63, 0x62, 0x3A, 0x34, 0x62, 0x3A, 0x64, 0x33, 0x3A, + 0x32, 0x65, 0x3A, 0x33, 0x66, 0x3A, 0x34, 0x62, 0x3A, 0x30, + 0x37, 0x3A, 0x33, 0x66, 0x3A, 0x62, 0x30, 0x3A, 0x32, 0x31, + 0x3A, 0x66, 0x65, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x35, 0x3A, 0x39, 0x65, + 0x3A, 0x64, 0x39, 0x3A, 0x63, 0x61, 0x3A, 0x33, 0x61, 0x3A, + 0x39, 0x33, 0x3A, 0x39, 0x33, 0x3A, 0x39, 0x35, 0x3A, 0x37, + 0x36, 0x3A, 0x31, 0x64, 0x3A, 0x33, 0x30, 0x3A, 0x64, 0x39, + 0x3A, 0x30, 0x62, 0x3A, 0x66, 0x35, 0x3A, 0x35, 0x36, 0x3A, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x65, 0x64, 0x3A, 0x31, 0x39, 0x3A, 0x36, 0x30, 0x3A, + 0x65, 0x64, 0x3A, 0x30, 0x31, 0x3A, 0x34, 0x63, 0x3A, 0x66, + 0x36, 0x3A, 0x36, 0x37, 0x3A, 0x31, 0x64, 0x3A, 0x66, 0x31, + 0x3A, 0x61, 0x63, 0x3A, 0x61, 0x38, 0x3A, 0x37, 0x34, 0x3A, + 0x30, 0x64, 0x3A, 0x62, 0x32, 0x3A, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x37, 0x37, 0x3A, + 0x63, 0x38, 0x3A, 0x34, 0x39, 0x3A, 0x33, 0x38, 0x3A, 0x65, + 0x34, 0x3A, 0x66, 0x66, 0x3A, 0x34, 0x63, 0x3A, 0x65, 0x66, + 0x3A, 0x38, 0x64, 0x3A, 0x36, 0x64, 0x3A, 0x38, 0x37, 0x3A, + 0x66, 0x36, 0x3A, 0x34, 0x65, 0x3A, 0x63, 0x37, 0x3A, 0x66, + 0x38, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x33, 0x39, 0x3A, 0x37, 0x34, 0x3A, 0x37, + 0x30, 0x3A, 0x37, 0x30, 0x3A, 0x62, 0x35, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x41, 0x53, 0x4E, 0x31, 0x20, 0x4F, + 0x49, 0x44, 0x3A, 0x20, 0x53, 0x4D, 0x32, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, + 0x76, 0x33, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6E, 0x73, 0x69, + 0x6F, 0x6E, 0x73, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, 0x35, 0x30, + 0x39, 0x76, 0x33, 0x20, 0x53, 0x75, 0x62, 0x6A, 0x65, 0x63, + 0x74, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x49, 0x64, 0x65, 0x6E, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3A, 0x20, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x45, 0x34, 0x3A, 0x32, 0x31, + 0x3A, 0x42, 0x32, 0x3A, 0x43, 0x35, 0x3A, 0x45, 0x35, 0x3A, + 0x44, 0x34, 0x3A, 0x39, 0x45, 0x3A, 0x38, 0x32, 0x3A, 0x43, + 0x41, 0x3A, 0x46, 0x38, 0x3A, 0x36, 0x37, 0x3A, 0x46, 0x32, + 0x3A, 0x32, 0x38, 0x3A, 0x39, 0x39, 0x3A, 0x46, 0x36, 0x3A, + 0x38, 0x35, 0x3A, 0x45, 0x38, 0x3A, 0x46, 0x31, 0x3A, 0x35, + 0x35, 0x3A, 0x45, 0x46, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, 0x35, 0x30, + 0x39, 0x76, 0x33, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6F, 0x72, + 0x69, 0x74, 0x79, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x49, 0x64, + 0x65, 0x6E, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3A, 0x20, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6B, 0x65, 0x79, + 0x69, 0x64, 0x3A, 0x45, 0x34, 0x3A, 0x32, 0x31, 0x3A, 0x42, + 0x32, 0x3A, 0x43, 0x35, 0x3A, 0x45, 0x35, 0x3A, 0x44, 0x34, + 0x3A, 0x39, 0x45, 0x3A, 0x38, 0x32, 0x3A, 0x43, 0x41, 0x3A, + 0x46, 0x38, 0x3A, 0x36, 0x37, 0x3A, 0x46, 0x32, 0x3A, 0x32, + 0x38, 0x3A, 0x39, 0x39, 0x3A, 0x46, 0x36, 0x3A, 0x38, 0x35, + 0x3A, 0x45, 0x38, 0x3A, 0x46, 0x31, 0x3A, 0x35, 0x35, 0x3A, + 0x45, 0x46, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, + 0x69, 0x72, 0x4E, 0x61, 0x6D, 0x65, 0x3A, 0x2F, 0x43, 0x3D, + 0x55, 0x53, 0x2F, 0x53, 0x54, 0x3D, 0x4D, 0x6F, 0x6E, 0x74, + 0x61, 0x6E, 0x61, 0x2F, 0x4C, 0x3D, 0x42, 0x6F, 0x7A, 0x65, + 0x6D, 0x61, 0x6E, 0x2F, 0x4F, 0x3D, 0x77, 0x6F, 0x6C, 0x66, + 0x53, 0x53, 0x4C, 0x5F, 0x73, 0x6D, 0x32, 0x2F, 0x4F, 0x55, + 0x3D, 0x43, 0x6C, 0x69, 0x65, 0x6E, 0x74, 0x2D, 0x73, 0x6D, + 0x32, 0x2F, 0x43, 0x4E, 0x3D, 0x77, 0x77, 0x77, 0x2E, 0x77, + 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, + 0x2F, 0x65, 0x6D, 0x61, 0x69, 0x6C, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x3D, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77, + 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, + 0x2F, 0x55, 0x49, 0x44, 0x3D, 0x77, 0x6F, 0x6C, 0x66, 0x53, + 0x53, 0x4C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, + 0x65, 0x72, 0x69, 0x61, 0x6C, 0x3A, 0x36, 0x30, 0x3A, 0x41, + 0x30, 0x3A, 0x34, 0x41, 0x3A, 0x30, 0x42, 0x3A, 0x33, 0x36, + 0x3A, 0x45, 0x42, 0x3A, 0x37, 0x44, 0x3A, 0x45, 0x31, 0x3A, + 0x33, 0x46, 0x3A, 0x37, 0x34, 0x3A, 0x32, 0x39, 0x3A, 0x41, + 0x39, 0x3A, 0x32, 0x39, 0x3A, 0x42, 0x34, 0x3A, 0x30, 0x35, + 0x3A, 0x36, 0x43, 0x3A, 0x31, 0x37, 0x3A, 0x46, 0x37, 0x3A, + 0x41, 0x36, 0x3A, 0x44, 0x34, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, 0x35, + 0x30, 0x39, 0x76, 0x33, 0x20, 0x42, 0x61, 0x73, 0x69, 0x63, + 0x20, 0x43, 0x6F, 0x6E, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6E, + 0x74, 0x73, 0x3A, 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x43, 0x41, 0x3A, 0x54, 0x52, 0x55, 0x45, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x53, 0x75, + 0x62, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x41, 0x6C, 0x74, 0x65, + 0x72, 0x6E, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x4E, 0x61, + 0x6D, 0x65, 0x3A, 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x44, 0x4E, 0x53, 0x3A, 0x65, 0x78, 0x61, 0x6D, 0x70, + 0x6C, 0x65, 0x2E, 0x63, 0x6F, 0x6D, 0x2C, 0x20, 0x49, 0x50, + 0x20, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3A, 0x31, + 0x32, 0x37, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x31, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x45, 0x78, + 0x74, 0x65, 0x6E, 0x64, 0x65, 0x64, 0x20, 0x4B, 0x65, 0x79, + 0x20, 0x55, 0x73, 0x61, 0x67, 0x65, 0x3A, 0x20, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x4C, 0x53, 0x20, 0x57, + 0x65, 0x62, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, + 0x41, 0x75, 0x74, 0x68, 0x65, 0x6E, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x54, 0x4C, 0x53, 0x20, + 0x57, 0x65, 0x62, 0x20, 0x43, 0x6C, 0x69, 0x65, 0x6E, 0x74, + 0x20, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6E, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x53, 0x69, 0x67, 0x6E, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, + 0x41, 0x6C, 0x67, 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x3A, + 0x20, 0x53, 0x4D, 0x32, 0x2D, 0x77, 0x69, 0x74, 0x68, 0x2D, + 0x53, 0x4D, 0x33, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, + 0x67, 0x6E, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x56, 0x61, + 0x6C, 0x75, 0x65, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x33, 0x30, 0x3A, 0x34, 0x36, 0x3A, 0x30, + 0x32, 0x3A, 0x32, 0x31, 0x3A, 0x30, 0x30, 0x3A, 0x38, 0x66, + 0x3A, 0x62, 0x32, 0x3A, 0x62, 0x35, 0x3A, 0x39, 0x35, 0x3A, + 0x38, 0x66, 0x3A, 0x37, 0x39, 0x3A, 0x66, 0x36, 0x3A, 0x35, + 0x65, 0x3A, 0x37, 0x35, 0x3A, 0x65, 0x35, 0x3A, 0x63, 0x35, + 0x3A, 0x65, 0x39, 0x3A, 0x39, 0x61, 0x3A, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x32, 0x3A, 0x64, + 0x32, 0x3A, 0x30, 0x66, 0x3A, 0x37, 0x38, 0x3A, 0x39, 0x66, + 0x3A, 0x63, 0x30, 0x3A, 0x31, 0x64, 0x3A, 0x38, 0x64, 0x3A, + 0x31, 0x63, 0x3A, 0x62, 0x65, 0x3A, 0x36, 0x62, 0x3A, 0x30, + 0x63, 0x3A, 0x66, 0x31, 0x3A, 0x66, 0x35, 0x3A, 0x35, 0x37, + 0x3A, 0x36, 0x30, 0x3A, 0x64, 0x62, 0x3A, 0x39, 0x31, 0x3A, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x34, + 0x66, 0x3A, 0x30, 0x32, 0x3A, 0x32, 0x31, 0x3A, 0x30, 0x30, + 0x3A, 0x38, 0x37, 0x3A, 0x35, 0x65, 0x3A, 0x37, 0x64, 0x3A, + 0x65, 0x34, 0x3A, 0x64, 0x36, 0x3A, 0x33, 0x61, 0x3A, 0x62, + 0x62, 0x3A, 0x37, 0x62, 0x3A, 0x39, 0x38, 0x3A, 0x32, 0x37, + 0x3A, 0x38, 0x35, 0x3A, 0x64, 0x65, 0x3A, 0x37, 0x61, 0x3A, + 0x66, 0x30, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x32, 0x31, 0x3A, 0x65, 0x32, 0x3A, 0x36, 0x36, + 0x3A, 0x61, 0x31, 0x3A, 0x39, 0x66, 0x3A, 0x32, 0x36, 0x3A, + 0x65, 0x30, 0x3A, 0x64, 0x64, 0x3A, 0x38, 0x36, 0x3A, 0x32, + 0x33, 0x3A, 0x62, 0x34, 0x3A, 0x63, 0x38, 0x3A, 0x63, 0x30, + 0x3A, 0x34, 0x36, 0x3A, 0x35, 0x61, 0x3A, 0x66, 0x32, 0x3A, + 0x34, 0x39, 0x3A, 0x38, 0x64, 0x0A, 0x2D, 0x2D, 0x2D, 0x2D, + 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, 0x20, 0x43, 0x45, 0x52, + 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2D, 0x2D, + 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x49, 0x49, 0x44, 0x79, 0x54, + 0x43, 0x43, 0x41, 0x32, 0x36, 0x67, 0x41, 0x77, 0x49, 0x42, + 0x41, 0x67, 0x49, 0x55, 0x59, 0x4B, 0x42, 0x4B, 0x43, 0x7A, + 0x62, 0x72, 0x66, 0x65, 0x45, 0x2F, 0x64, 0x43, 0x6D, 0x70, + 0x4B, 0x62, 0x51, 0x46, 0x62, 0x42, 0x66, 0x33, 0x70, 0x74, + 0x51, 0x77, 0x43, 0x67, 0x59, 0x49, 0x4B, 0x6F, 0x45, 0x63, + 0x7A, 0x31, 0x55, 0x42, 0x67, 0x33, 0x55, 0x77, 0x0A, 0x67, + 0x62, 0x41, 0x78, 0x43, 0x7A, 0x41, 0x4A, 0x42, 0x67, 0x4E, + 0x56, 0x42, 0x41, 0x59, 0x54, 0x41, 0x6C, 0x56, 0x54, 0x4D, + 0x52, 0x41, 0x77, 0x44, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, + 0x49, 0x44, 0x41, 0x64, 0x4E, 0x62, 0x32, 0x35, 0x30, 0x59, + 0x57, 0x35, 0x68, 0x4D, 0x52, 0x41, 0x77, 0x44, 0x67, 0x59, + 0x44, 0x56, 0x51, 0x51, 0x48, 0x44, 0x41, 0x64, 0x43, 0x62, + 0x33, 0x70, 0x6C, 0x0A, 0x62, 0x57, 0x46, 0x75, 0x4D, 0x52, + 0x51, 0x77, 0x45, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x4B, + 0x44, 0x41, 0x74, 0x33, 0x62, 0x32, 0x78, 0x6D, 0x55, 0x31, + 0x4E, 0x4D, 0x58, 0x33, 0x4E, 0x74, 0x4D, 0x6A, 0x45, 0x54, + 0x4D, 0x42, 0x45, 0x47, 0x41, 0x31, 0x55, 0x45, 0x43, 0x77, + 0x77, 0x4B, 0x51, 0x32, 0x78, 0x70, 0x5A, 0x57, 0x35, 0x30, + 0x4C, 0x58, 0x4E, 0x74, 0x4D, 0x6A, 0x45, 0x59, 0x0A, 0x4D, + 0x42, 0x59, 0x47, 0x41, 0x31, 0x55, 0x45, 0x41, 0x77, 0x77, + 0x50, 0x64, 0x33, 0x64, 0x33, 0x4C, 0x6E, 0x64, 0x76, 0x62, + 0x47, 0x5A, 0x7A, 0x63, 0x32, 0x77, 0x75, 0x59, 0x32, 0x39, + 0x74, 0x4D, 0x52, 0x38, 0x77, 0x48, 0x51, 0x59, 0x4A, 0x4B, + 0x6F, 0x5A, 0x49, 0x68, 0x76, 0x63, 0x4E, 0x41, 0x51, 0x6B, + 0x42, 0x46, 0x68, 0x42, 0x70, 0x62, 0x6D, 0x5A, 0x76, 0x51, + 0x48, 0x64, 0x76, 0x0A, 0x62, 0x47, 0x5A, 0x7A, 0x63, 0x32, + 0x77, 0x75, 0x59, 0x32, 0x39, 0x74, 0x4D, 0x52, 0x63, 0x77, + 0x46, 0x51, 0x59, 0x4B, 0x43, 0x5A, 0x49, 0x6D, 0x69, 0x5A, + 0x50, 0x79, 0x4C, 0x47, 0x51, 0x42, 0x41, 0x51, 0x77, 0x48, + 0x64, 0x32, 0x39, 0x73, 0x5A, 0x6C, 0x4E, 0x54, 0x54, 0x44, + 0x41, 0x65, 0x46, 0x77, 0x30, 0x79, 0x4D, 0x7A, 0x41, 0x79, + 0x4D, 0x54, 0x55, 0x77, 0x4E, 0x6A, 0x49, 0x7A, 0x0A, 0x4D, + 0x44, 0x64, 0x61, 0x46, 0x77, 0x30, 0x79, 0x4E, 0x54, 0x45, + 0x78, 0x4D, 0x54, 0x45, 0x77, 0x4E, 0x6A, 0x49, 0x7A, 0x4D, + 0x44, 0x64, 0x61, 0x4D, 0x49, 0x47, 0x77, 0x4D, 0x51, 0x73, + 0x77, 0x43, 0x51, 0x59, 0x44, 0x56, 0x51, 0x51, 0x47, 0x45, + 0x77, 0x4A, 0x56, 0x55, 0x7A, 0x45, 0x51, 0x4D, 0x41, 0x34, + 0x47, 0x41, 0x31, 0x55, 0x45, 0x43, 0x41, 0x77, 0x48, 0x54, + 0x57, 0x39, 0x75, 0x0A, 0x64, 0x47, 0x46, 0x75, 0x59, 0x54, + 0x45, 0x51, 0x4D, 0x41, 0x34, 0x47, 0x41, 0x31, 0x55, 0x45, + 0x42, 0x77, 0x77, 0x48, 0x51, 0x6D, 0x39, 0x36, 0x5A, 0x57, + 0x31, 0x68, 0x62, 0x6A, 0x45, 0x55, 0x4D, 0x42, 0x49, 0x47, + 0x41, 0x31, 0x55, 0x45, 0x43, 0x67, 0x77, 0x4C, 0x64, 0x32, + 0x39, 0x73, 0x5A, 0x6C, 0x4E, 0x54, 0x54, 0x46, 0x39, 0x7A, + 0x62, 0x54, 0x49, 0x78, 0x45, 0x7A, 0x41, 0x52, 0x0A, 0x42, + 0x67, 0x4E, 0x56, 0x42, 0x41, 0x73, 0x4D, 0x43, 0x6B, 0x4E, + 0x73, 0x61, 0x57, 0x56, 0x75, 0x64, 0x43, 0x31, 0x7A, 0x62, + 0x54, 0x49, 0x78, 0x47, 0x44, 0x41, 0x57, 0x42, 0x67, 0x4E, + 0x56, 0x42, 0x41, 0x4D, 0x4D, 0x44, 0x33, 0x64, 0x33, 0x64, + 0x79, 0x35, 0x33, 0x62, 0x32, 0x78, 0x6D, 0x63, 0x33, 0x4E, + 0x73, 0x4C, 0x6D, 0x4E, 0x76, 0x62, 0x54, 0x45, 0x66, 0x4D, + 0x42, 0x30, 0x47, 0x0A, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, + 0x62, 0x33, 0x44, 0x51, 0x45, 0x4A, 0x41, 0x52, 0x59, 0x51, + 0x61, 0x57, 0x35, 0x6D, 0x62, 0x30, 0x42, 0x33, 0x62, 0x32, + 0x78, 0x6D, 0x63, 0x33, 0x4E, 0x73, 0x4C, 0x6D, 0x4E, 0x76, + 0x62, 0x54, 0x45, 0x58, 0x4D, 0x42, 0x55, 0x47, 0x43, 0x67, + 0x6D, 0x53, 0x4A, 0x6F, 0x6D, 0x54, 0x38, 0x69, 0x78, 0x6B, + 0x41, 0x51, 0x45, 0x4D, 0x42, 0x33, 0x64, 0x76, 0x0A, 0x62, + 0x47, 0x5A, 0x54, 0x55, 0x30, 0x77, 0x77, 0x57, 0x6A, 0x41, + 0x55, 0x42, 0x67, 0x67, 0x71, 0x67, 0x52, 0x7A, 0x50, 0x56, + 0x51, 0x47, 0x43, 0x4C, 0x51, 0x59, 0x49, 0x4B, 0x6F, 0x45, + 0x63, 0x7A, 0x31, 0x55, 0x42, 0x67, 0x69, 0x30, 0x44, 0x51, + 0x67, 0x41, 0x45, 0x4F, 0x68, 0x33, 0x6F, 0x79, 0x30, 0x76, + 0x54, 0x4C, 0x6A, 0x39, 0x4C, 0x42, 0x7A, 0x2B, 0x77, 0x49, + 0x66, 0x37, 0x46, 0x0A, 0x6E, 0x74, 0x6E, 0x4B, 0x4F, 0x70, + 0x4F, 0x54, 0x6C, 0x58, 0x59, 0x64, 0x4D, 0x4E, 0x6B, 0x4C, + 0x39, 0x56, 0x62, 0x74, 0x47, 0x57, 0x44, 0x74, 0x41, 0x55, + 0x7A, 0x32, 0x5A, 0x78, 0x33, 0x78, 0x72, 0x4B, 0x68, 0x30, + 0x44, 0x62, 0x4A, 0x33, 0x79, 0x45, 0x6B, 0x34, 0x35, 0x50, + 0x39, 0x4D, 0x37, 0x34, 0x31, 0x74, 0x68, 0x2F, 0x5A, 0x4F, + 0x78, 0x2F, 0x67, 0x35, 0x64, 0x48, 0x42, 0x77, 0x0A, 0x74, + 0x61, 0x4F, 0x43, 0x41, 0x57, 0x45, 0x77, 0x67, 0x67, 0x46, + 0x64, 0x4D, 0x42, 0x30, 0x47, 0x41, 0x31, 0x55, 0x64, 0x44, + 0x67, 0x51, 0x57, 0x42, 0x42, 0x54, 0x6B, 0x49, 0x62, 0x4C, + 0x46, 0x35, 0x64, 0x53, 0x65, 0x67, 0x73, 0x72, 0x34, 0x5A, + 0x2F, 0x49, 0x6F, 0x6D, 0x66, 0x61, 0x46, 0x36, 0x50, 0x46, + 0x56, 0x37, 0x7A, 0x43, 0x42, 0x38, 0x41, 0x59, 0x44, 0x56, + 0x52, 0x30, 0x6A, 0x0A, 0x42, 0x49, 0x48, 0x6F, 0x4D, 0x49, + 0x48, 0x6C, 0x67, 0x42, 0x54, 0x6B, 0x49, 0x62, 0x4C, 0x46, + 0x35, 0x64, 0x53, 0x65, 0x67, 0x73, 0x72, 0x34, 0x5A, 0x2F, + 0x49, 0x6F, 0x6D, 0x66, 0x61, 0x46, 0x36, 0x50, 0x46, 0x56, + 0x37, 0x36, 0x47, 0x42, 0x74, 0x71, 0x53, 0x42, 0x73, 0x7A, + 0x43, 0x42, 0x73, 0x44, 0x45, 0x4C, 0x4D, 0x41, 0x6B, 0x47, + 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4D, 0x43, 0x0A, 0x56, + 0x56, 0x4D, 0x78, 0x45, 0x44, 0x41, 0x4F, 0x42, 0x67, 0x4E, + 0x56, 0x42, 0x41, 0x67, 0x4D, 0x42, 0x30, 0x31, 0x76, 0x62, + 0x6E, 0x52, 0x68, 0x62, 0x6D, 0x45, 0x78, 0x45, 0x44, 0x41, + 0x4F, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x63, 0x4D, 0x42, + 0x30, 0x4A, 0x76, 0x65, 0x6D, 0x56, 0x74, 0x59, 0x57, 0x34, + 0x78, 0x46, 0x44, 0x41, 0x53, 0x42, 0x67, 0x4E, 0x56, 0x42, + 0x41, 0x6F, 0x4D, 0x0A, 0x43, 0x33, 0x64, 0x76, 0x62, 0x47, + 0x5A, 0x54, 0x55, 0x30, 0x78, 0x66, 0x63, 0x32, 0x30, 0x79, + 0x4D, 0x52, 0x4D, 0x77, 0x45, 0x51, 0x59, 0x44, 0x56, 0x51, + 0x51, 0x4C, 0x44, 0x41, 0x70, 0x44, 0x62, 0x47, 0x6C, 0x6C, + 0x62, 0x6E, 0x51, 0x74, 0x63, 0x32, 0x30, 0x79, 0x4D, 0x52, + 0x67, 0x77, 0x46, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, + 0x44, 0x41, 0x39, 0x33, 0x64, 0x33, 0x63, 0x75, 0x0A, 0x64, + 0x32, 0x39, 0x73, 0x5A, 0x6E, 0x4E, 0x7A, 0x62, 0x43, 0x35, + 0x6A, 0x62, 0x32, 0x30, 0x78, 0x48, 0x7A, 0x41, 0x64, 0x42, + 0x67, 0x6B, 0x71, 0x68, 0x6B, 0x69, 0x47, 0x39, 0x77, 0x30, + 0x42, 0x43, 0x51, 0x45, 0x57, 0x45, 0x47, 0x6C, 0x75, 0x5A, + 0x6D, 0x39, 0x41, 0x64, 0x32, 0x39, 0x73, 0x5A, 0x6E, 0x4E, + 0x7A, 0x62, 0x43, 0x35, 0x6A, 0x62, 0x32, 0x30, 0x78, 0x46, + 0x7A, 0x41, 0x56, 0x0A, 0x42, 0x67, 0x6F, 0x4A, 0x6B, 0x69, + 0x61, 0x4A, 0x6B, 0x2F, 0x49, 0x73, 0x5A, 0x41, 0x45, 0x42, + 0x44, 0x41, 0x64, 0x33, 0x62, 0x32, 0x78, 0x6D, 0x55, 0x31, + 0x4E, 0x4D, 0x67, 0x68, 0x52, 0x67, 0x6F, 0x45, 0x6F, 0x4C, + 0x4E, 0x75, 0x74, 0x39, 0x34, 0x54, 0x39, 0x30, 0x4B, 0x61, + 0x6B, 0x70, 0x74, 0x41, 0x56, 0x73, 0x46, 0x2F, 0x65, 0x6D, + 0x31, 0x44, 0x41, 0x4D, 0x42, 0x67, 0x4E, 0x56, 0x0A, 0x48, + 0x52, 0x4D, 0x45, 0x42, 0x54, 0x41, 0x44, 0x41, 0x51, 0x48, + 0x2F, 0x4D, 0x42, 0x77, 0x47, 0x41, 0x31, 0x55, 0x64, 0x45, + 0x51, 0x51, 0x56, 0x4D, 0x42, 0x4F, 0x43, 0x43, 0x32, 0x56, + 0x34, 0x59, 0x57, 0x31, 0x77, 0x62, 0x47, 0x55, 0x75, 0x59, + 0x32, 0x39, 0x74, 0x68, 0x77, 0x52, 0x2F, 0x41, 0x41, 0x41, + 0x42, 0x4D, 0x42, 0x30, 0x47, 0x41, 0x31, 0x55, 0x64, 0x4A, + 0x51, 0x51, 0x57, 0x0A, 0x4D, 0x42, 0x51, 0x47, 0x43, 0x43, + 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4D, 0x42, + 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, + 0x63, 0x44, 0x41, 0x6A, 0x41, 0x4B, 0x42, 0x67, 0x67, 0x71, + 0x67, 0x52, 0x7A, 0x50, 0x56, 0x51, 0x47, 0x44, 0x64, 0x51, + 0x4E, 0x4A, 0x41, 0x44, 0x42, 0x47, 0x41, 0x69, 0x45, 0x41, + 0x6A, 0x37, 0x4B, 0x31, 0x6C, 0x59, 0x39, 0x35, 0x0A, 0x39, + 0x6C, 0x35, 0x31, 0x35, 0x63, 0x58, 0x70, 0x6D, 0x68, 0x4C, + 0x53, 0x44, 0x33, 0x69, 0x66, 0x77, 0x42, 0x32, 0x4E, 0x48, + 0x4C, 0x35, 0x72, 0x44, 0x50, 0x48, 0x31, 0x56, 0x32, 0x44, + 0x62, 0x6B, 0x55, 0x38, 0x43, 0x49, 0x51, 0x43, 0x48, 0x58, + 0x6E, 0x33, 0x6B, 0x31, 0x6A, 0x71, 0x37, 0x65, 0x35, 0x67, + 0x6E, 0x68, 0x64, 0x35, 0x36, 0x38, 0x43, 0x48, 0x69, 0x5A, + 0x71, 0x47, 0x66, 0x0A, 0x4A, 0x75, 0x44, 0x64, 0x68, 0x69, + 0x4F, 0x30, 0x79, 0x4D, 0x42, 0x47, 0x57, 0x76, 0x4A, 0x4A, + 0x6A, 0x51, 0x3D, 0x3D, 0x0A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, + 0x45, 0x4E, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, + 0x49, 0x43, 0x41, 0x54, 0x45, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, + 0x0A +}; +#define sizeof_client_sm2 (sizeof(client_sm2)) + +/* ./certs/sm2/client-sm2-key.pem */ +static const unsigned char client_sm2_key[] = +{ + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, + 0x20, 0x50, 0x55, 0x42, 0x4C, 0x49, 0x43, 0x20, 0x4B, 0x45, + 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x46, 0x6F, + 0x77, 0x46, 0x41, 0x59, 0x49, 0x4B, 0x6F, 0x45, 0x63, 0x7A, + 0x31, 0x55, 0x42, 0x67, 0x69, 0x30, 0x47, 0x43, 0x43, 0x71, + 0x42, 0x48, 0x4D, 0x39, 0x56, 0x41, 0x59, 0x49, 0x74, 0x41, + 0x30, 0x49, 0x41, 0x42, 0x44, 0x6F, 0x64, 0x36, 0x4D, 0x74, + 0x4C, 0x30, 0x79, 0x34, 0x2F, 0x53, 0x77, 0x63, 0x2F, 0x73, + 0x43, 0x48, 0x2B, 0x78, 0x5A, 0x37, 0x5A, 0x79, 0x6A, 0x71, + 0x54, 0x0A, 0x6B, 0x35, 0x56, 0x32, 0x48, 0x54, 0x44, 0x5A, + 0x43, 0x2F, 0x56, 0x57, 0x37, 0x52, 0x6C, 0x67, 0x37, 0x51, + 0x46, 0x4D, 0x39, 0x6D, 0x63, 0x64, 0x38, 0x61, 0x79, 0x6F, + 0x64, 0x41, 0x32, 0x79, 0x64, 0x38, 0x68, 0x4A, 0x4F, 0x4F, + 0x54, 0x2F, 0x54, 0x4F, 0x2B, 0x4E, 0x62, 0x59, 0x66, 0x32, + 0x54, 0x73, 0x66, 0x34, 0x4F, 0x58, 0x52, 0x77, 0x63, 0x4C, + 0x55, 0x3D, 0x0A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x45, 0x4E, + 0x44, 0x20, 0x50, 0x55, 0x42, 0x4C, 0x49, 0x43, 0x20, 0x4B, + 0x45, 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A +}; +#define sizeof_client_sm2_key (sizeof(client_sm2_key)) + +/* ./certs/sm2/client-sm2-priv.pem */ +static const unsigned char client_sm2_priv[] = +{ + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, + 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4B, + 0x45, 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x49, + 0x47, 0x49, 0x41, 0x67, 0x45, 0x41, 0x4D, 0x42, 0x51, 0x47, + 0x43, 0x43, 0x71, 0x42, 0x48, 0x4D, 0x39, 0x56, 0x41, 0x59, + 0x49, 0x74, 0x42, 0x67, 0x67, 0x71, 0x67, 0x52, 0x7A, 0x50, + 0x56, 0x51, 0x47, 0x43, 0x4C, 0x51, 0x52, 0x74, 0x4D, 0x47, + 0x73, 0x43, 0x41, 0x51, 0x45, 0x45, 0x49, 0x4E, 0x43, 0x69, + 0x33, 0x30, 0x6C, 0x36, 0x4C, 0x64, 0x38, 0x43, 0x79, 0x63, + 0x36, 0x33, 0x0A, 0x38, 0x6A, 0x63, 0x43, 0x44, 0x64, 0x33, + 0x38, 0x43, 0x4C, 0x6A, 0x65, 0x46, 0x4A, 0x4E, 0x36, 0x55, + 0x79, 0x5A, 0x4A, 0x31, 0x66, 0x34, 0x43, 0x32, 0x66, 0x4E, + 0x78, 0x6F, 0x55, 0x51, 0x44, 0x51, 0x67, 0x41, 0x45, 0x4F, + 0x68, 0x33, 0x6F, 0x79, 0x30, 0x76, 0x54, 0x4C, 0x6A, 0x39, + 0x4C, 0x42, 0x7A, 0x2B, 0x77, 0x49, 0x66, 0x37, 0x46, 0x6E, + 0x74, 0x6E, 0x4B, 0x4F, 0x70, 0x4F, 0x54, 0x0A, 0x6C, 0x58, + 0x59, 0x64, 0x4D, 0x4E, 0x6B, 0x4C, 0x39, 0x56, 0x62, 0x74, + 0x47, 0x57, 0x44, 0x74, 0x41, 0x55, 0x7A, 0x32, 0x5A, 0x78, + 0x33, 0x78, 0x72, 0x4B, 0x68, 0x30, 0x44, 0x62, 0x4A, 0x33, + 0x79, 0x45, 0x6B, 0x34, 0x35, 0x50, 0x39, 0x4D, 0x37, 0x34, + 0x31, 0x74, 0x68, 0x2F, 0x5A, 0x4F, 0x78, 0x2F, 0x67, 0x35, + 0x64, 0x48, 0x42, 0x77, 0x74, 0x51, 0x3D, 0x3D, 0x0A, 0x2D, + 0x2D, 0x2D, 0x2D, 0x2D, 0x45, 0x4E, 0x44, 0x20, 0x50, 0x52, + 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4B, 0x45, 0x59, 0x2D, + 0x2D, 0x2D, 0x2D, 0x2D, 0x0A +}; +#define sizeof_client_sm2_priv (sizeof(client_sm2_priv)) + +/* ./certs/sm2/root-sm2.pem */ +static const unsigned char root_sm2[] = +{ + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x44, 0x61, 0x74, + 0x61, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3A, 0x20, + 0x33, 0x20, 0x28, 0x30, 0x78, 0x32, 0x29, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x65, 0x72, 0x69, + 0x61, 0x6C, 0x20, 0x4E, 0x75, 0x6D, 0x62, 0x65, 0x72, 0x3A, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x37, 0x34, 0x3A, 0x39, 0x63, 0x3A, 0x64, + 0x64, 0x3A, 0x61, 0x34, 0x3A, 0x62, 0x32, 0x3A, 0x36, 0x37, + 0x3A, 0x32, 0x36, 0x3A, 0x35, 0x37, 0x3A, 0x32, 0x39, 0x3A, + 0x66, 0x62, 0x3A, 0x65, 0x39, 0x3A, 0x31, 0x33, 0x3A, 0x35, + 0x34, 0x3A, 0x65, 0x30, 0x3A, 0x33, 0x34, 0x3A, 0x30, 0x38, + 0x3A, 0x30, 0x33, 0x3A, 0x32, 0x62, 0x3A, 0x37, 0x30, 0x3A, + 0x61, 0x39, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x53, 0x69, 0x67, 0x6E, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x20, 0x41, 0x6C, 0x67, 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, + 0x3A, 0x20, 0x53, 0x4D, 0x32, 0x2D, 0x77, 0x69, 0x74, 0x68, + 0x2D, 0x53, 0x4D, 0x33, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x3A, + 0x20, 0x43, 0x20, 0x3D, 0x20, 0x55, 0x53, 0x2C, 0x20, 0x53, + 0x54, 0x20, 0x3D, 0x20, 0x4D, 0x6F, 0x6E, 0x74, 0x61, 0x6E, + 0x61, 0x2C, 0x20, 0x4C, 0x20, 0x3D, 0x20, 0x42, 0x6F, 0x7A, + 0x65, 0x6D, 0x61, 0x6E, 0x2C, 0x20, 0x4F, 0x20, 0x3D, 0x20, + 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, 0x53, 0x4D, + 0x32, 0x2C, 0x20, 0x4F, 0x55, 0x20, 0x3D, 0x20, 0x52, 0x6F, + 0x6F, 0x74, 0x2D, 0x53, 0x4D, 0x32, 0x2C, 0x20, 0x43, 0x4E, + 0x20, 0x3D, 0x20, 0x77, 0x77, 0x77, 0x2E, 0x77, 0x6F, 0x6C, + 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x2C, 0x20, + 0x65, 0x6D, 0x61, 0x69, 0x6C, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x20, 0x3D, 0x20, 0x69, 0x6E, 0x66, 0x6F, 0x40, + 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, + 0x6D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x56, 0x61, 0x6C, 0x69, 0x64, 0x69, 0x74, 0x79, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x4E, 0x6F, 0x74, 0x20, 0x42, 0x65, 0x66, 0x6F, 0x72, + 0x65, 0x3A, 0x20, 0x46, 0x65, 0x62, 0x20, 0x31, 0x35, 0x20, + 0x30, 0x36, 0x3A, 0x32, 0x33, 0x3A, 0x30, 0x37, 0x20, 0x32, + 0x30, 0x32, 0x33, 0x20, 0x47, 0x4D, 0x54, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x4E, 0x6F, 0x74, 0x20, 0x41, 0x66, 0x74, 0x65, 0x72, 0x20, + 0x3A, 0x20, 0x4E, 0x6F, 0x76, 0x20, 0x31, 0x31, 0x20, 0x30, + 0x36, 0x3A, 0x32, 0x33, 0x3A, 0x30, 0x37, 0x20, 0x32, 0x30, + 0x32, 0x35, 0x20, 0x47, 0x4D, 0x54, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x75, 0x62, 0x6A, 0x65, + 0x63, 0x74, 0x3A, 0x20, 0x43, 0x20, 0x3D, 0x20, 0x55, 0x53, + 0x2C, 0x20, 0x53, 0x54, 0x20, 0x3D, 0x20, 0x4D, 0x6F, 0x6E, + 0x74, 0x61, 0x6E, 0x61, 0x2C, 0x20, 0x4C, 0x20, 0x3D, 0x20, + 0x42, 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, 0x2C, 0x20, 0x4F, + 0x20, 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, + 0x5F, 0x53, 0x4D, 0x32, 0x2C, 0x20, 0x4F, 0x55, 0x20, 0x3D, + 0x20, 0x52, 0x6F, 0x6F, 0x74, 0x2D, 0x53, 0x4D, 0x32, 0x2C, + 0x20, 0x43, 0x4E, 0x20, 0x3D, 0x20, 0x77, 0x77, 0x77, 0x2E, + 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, + 0x6D, 0x2C, 0x20, 0x65, 0x6D, 0x61, 0x69, 0x6C, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3D, 0x20, 0x69, 0x6E, + 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, + 0x2E, 0x63, 0x6F, 0x6D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x53, 0x75, 0x62, 0x6A, 0x65, 0x63, 0x74, + 0x20, 0x50, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x20, 0x4B, 0x65, + 0x79, 0x20, 0x49, 0x6E, 0x66, 0x6F, 0x3A, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x50, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x20, 0x4B, 0x65, 0x79, + 0x20, 0x41, 0x6C, 0x67, 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, + 0x3A, 0x20, 0x73, 0x6D, 0x32, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x50, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x2D, 0x4B, + 0x65, 0x79, 0x3A, 0x20, 0x28, 0x32, 0x35, 0x36, 0x20, 0x62, + 0x69, 0x74, 0x29, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x70, 0x75, 0x62, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x34, 0x3A, 0x62, 0x62, + 0x3A, 0x39, 0x63, 0x3A, 0x37, 0x35, 0x3A, 0x38, 0x63, 0x3A, + 0x66, 0x37, 0x3A, 0x31, 0x37, 0x3A, 0x66, 0x38, 0x3A, 0x34, + 0x38, 0x3A, 0x61, 0x62, 0x3A, 0x66, 0x37, 0x3A, 0x66, 0x36, + 0x3A, 0x64, 0x62, 0x3A, 0x30, 0x64, 0x3A, 0x39, 0x61, 0x3A, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x38, 0x64, 0x3A, 0x39, 0x66, 0x3A, 0x63, 0x32, 0x3A, + 0x64, 0x31, 0x3A, 0x34, 0x37, 0x3A, 0x39, 0x37, 0x3A, 0x39, + 0x35, 0x3A, 0x30, 0x62, 0x3A, 0x34, 0x65, 0x3A, 0x65, 0x36, + 0x3A, 0x35, 0x37, 0x3A, 0x65, 0x63, 0x3A, 0x63, 0x35, 0x3A, + 0x66, 0x38, 0x3A, 0x35, 0x37, 0x3A, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x35, 0x34, 0x3A, + 0x37, 0x31, 0x3A, 0x33, 0x39, 0x3A, 0x33, 0x63, 0x3A, 0x37, + 0x39, 0x3A, 0x65, 0x31, 0x3A, 0x34, 0x30, 0x3A, 0x33, 0x66, + 0x3A, 0x62, 0x36, 0x3A, 0x35, 0x31, 0x3A, 0x65, 0x39, 0x3A, + 0x37, 0x63, 0x3A, 0x63, 0x37, 0x3A, 0x64, 0x61, 0x3A, 0x32, + 0x64, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x65, 0x66, 0x3A, 0x64, 0x32, 0x3A, 0x65, + 0x38, 0x3A, 0x37, 0x39, 0x3A, 0x38, 0x31, 0x3A, 0x37, 0x62, + 0x3A, 0x61, 0x62, 0x3A, 0x61, 0x33, 0x3A, 0x35, 0x66, 0x3A, + 0x36, 0x62, 0x3A, 0x32, 0x61, 0x3A, 0x36, 0x63, 0x3A, 0x39, + 0x37, 0x3A, 0x31, 0x61, 0x3A, 0x35, 0x65, 0x3A, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x38, + 0x65, 0x3A, 0x64, 0x39, 0x3A, 0x64, 0x30, 0x3A, 0x63, 0x63, + 0x3A, 0x30, 0x34, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x41, 0x53, 0x4E, 0x31, 0x20, 0x4F, 0x49, 0x44, 0x3A, 0x20, + 0x53, 0x4D, 0x32, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x65, + 0x78, 0x74, 0x65, 0x6E, 0x73, 0x69, 0x6F, 0x6E, 0x73, 0x3A, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, + 0x53, 0x75, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x4B, 0x65, + 0x79, 0x20, 0x49, 0x64, 0x65, 0x6E, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x3A, 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x33, 0x34, 0x3A, 0x31, 0x44, 0x3A, 0x37, 0x39, 0x3A, + 0x34, 0x34, 0x3A, 0x31, 0x35, 0x3A, 0x37, 0x39, 0x3A, 0x41, + 0x31, 0x3A, 0x42, 0x31, 0x3A, 0x36, 0x33, 0x3A, 0x39, 0x39, + 0x3A, 0x45, 0x33, 0x3A, 0x45, 0x44, 0x3A, 0x36, 0x35, 0x3A, + 0x37, 0x43, 0x3A, 0x36, 0x34, 0x3A, 0x38, 0x39, 0x3A, 0x38, + 0x30, 0x3A, 0x46, 0x46, 0x3A, 0x42, 0x38, 0x3A, 0x45, 0x43, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, + 0x41, 0x75, 0x74, 0x68, 0x6F, 0x72, 0x69, 0x74, 0x79, 0x20, + 0x4B, 0x65, 0x79, 0x20, 0x49, 0x64, 0x65, 0x6E, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x3A, 0x20, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x33, 0x34, 0x3A, 0x31, 0x44, 0x3A, 0x37, + 0x39, 0x3A, 0x34, 0x34, 0x3A, 0x31, 0x35, 0x3A, 0x37, 0x39, + 0x3A, 0x41, 0x31, 0x3A, 0x42, 0x31, 0x3A, 0x36, 0x33, 0x3A, + 0x39, 0x39, 0x3A, 0x45, 0x33, 0x3A, 0x45, 0x44, 0x3A, 0x36, + 0x35, 0x3A, 0x37, 0x43, 0x3A, 0x36, 0x34, 0x3A, 0x38, 0x39, + 0x3A, 0x38, 0x30, 0x3A, 0x46, 0x46, 0x3A, 0x42, 0x38, 0x3A, + 0x45, 0x43, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, + 0x33, 0x20, 0x42, 0x61, 0x73, 0x69, 0x63, 0x20, 0x43, 0x6F, + 0x6E, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6E, 0x74, 0x73, 0x3A, + 0x20, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6C, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x43, 0x41, 0x3A, 0x54, + 0x52, 0x55, 0x45, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, + 0x76, 0x33, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x55, 0x73, 0x61, + 0x67, 0x65, 0x3A, 0x20, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, + 0x61, 0x6C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, + 0x69, 0x67, 0x69, 0x74, 0x61, 0x6C, 0x20, 0x53, 0x69, 0x67, + 0x6E, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2C, 0x20, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x20, + 0x53, 0x69, 0x67, 0x6E, 0x2C, 0x20, 0x43, 0x52, 0x4C, 0x20, + 0x53, 0x69, 0x67, 0x6E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x53, + 0x69, 0x67, 0x6E, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x41, + 0x6C, 0x67, 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x3A, 0x20, + 0x53, 0x4D, 0x32, 0x2D, 0x77, 0x69, 0x74, 0x68, 0x2D, 0x53, + 0x4D, 0x33, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, 0x67, + 0x6E, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x56, 0x61, 0x6C, + 0x75, 0x65, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x33, 0x30, 0x3A, 0x34, 0x34, 0x3A, 0x30, 0x32, + 0x3A, 0x32, 0x30, 0x3A, 0x30, 0x33, 0x3A, 0x32, 0x37, 0x3A, + 0x32, 0x39, 0x3A, 0x66, 0x30, 0x3A, 0x65, 0x66, 0x3A, 0x37, + 0x38, 0x3A, 0x32, 0x36, 0x3A, 0x61, 0x31, 0x3A, 0x31, 0x61, + 0x3A, 0x36, 0x61, 0x3A, 0x31, 0x65, 0x3A, 0x38, 0x38, 0x3A, + 0x38, 0x31, 0x3A, 0x65, 0x37, 0x3A, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x38, 0x33, 0x3A, 0x37, 0x32, + 0x3A, 0x35, 0x66, 0x3A, 0x33, 0x65, 0x3A, 0x65, 0x36, 0x3A, + 0x30, 0x38, 0x3A, 0x65, 0x38, 0x3A, 0x31, 0x34, 0x3A, 0x36, + 0x38, 0x3A, 0x62, 0x66, 0x3A, 0x34, 0x62, 0x3A, 0x30, 0x66, + 0x3A, 0x36, 0x38, 0x3A, 0x35, 0x32, 0x3A, 0x39, 0x32, 0x3A, + 0x61, 0x61, 0x3A, 0x38, 0x66, 0x3A, 0x61, 0x31, 0x3A, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x32, + 0x3A, 0x32, 0x30, 0x3A, 0x30, 0x62, 0x3A, 0x66, 0x65, 0x3A, + 0x31, 0x62, 0x3A, 0x31, 0x34, 0x3A, 0x62, 0x61, 0x3A, 0x35, + 0x31, 0x3A, 0x38, 0x32, 0x3A, 0x36, 0x35, 0x3A, 0x30, 0x36, + 0x3A, 0x62, 0x62, 0x3A, 0x32, 0x32, 0x3A, 0x64, 0x38, 0x3A, + 0x31, 0x61, 0x3A, 0x61, 0x37, 0x3A, 0x39, 0x66, 0x3A, 0x35, + 0x34, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x36, 0x32, 0x3A, 0x65, 0x62, 0x3A, 0x38, 0x64, 0x3A, + 0x62, 0x32, 0x3A, 0x64, 0x35, 0x3A, 0x31, 0x33, 0x3A, 0x62, + 0x33, 0x3A, 0x62, 0x38, 0x3A, 0x61, 0x32, 0x3A, 0x66, 0x33, + 0x3A, 0x31, 0x34, 0x3A, 0x34, 0x34, 0x3A, 0x62, 0x32, 0x3A, + 0x61, 0x30, 0x3A, 0x32, 0x31, 0x3A, 0x64, 0x30, 0x0A, 0x2D, + 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, 0x20, + 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, + 0x45, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x49, 0x49, + 0x43, 0x6B, 0x54, 0x43, 0x43, 0x41, 0x6A, 0x69, 0x67, 0x41, + 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x55, 0x64, 0x4A, 0x7A, + 0x64, 0x70, 0x4C, 0x4A, 0x6E, 0x4A, 0x6C, 0x63, 0x70, 0x2B, + 0x2B, 0x6B, 0x54, 0x56, 0x4F, 0x41, 0x30, 0x43, 0x41, 0x4D, + 0x72, 0x63, 0x4B, 0x6B, 0x77, 0x43, 0x67, 0x59, 0x49, 0x4B, + 0x6F, 0x45, 0x63, 0x7A, 0x31, 0x55, 0x42, 0x67, 0x33, 0x55, + 0x77, 0x0A, 0x67, 0x5A, 0x55, 0x78, 0x43, 0x7A, 0x41, 0x4A, + 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x59, 0x54, 0x41, 0x6C, + 0x56, 0x54, 0x4D, 0x52, 0x41, 0x77, 0x44, 0x67, 0x59, 0x44, + 0x56, 0x51, 0x51, 0x49, 0x44, 0x41, 0x64, 0x4E, 0x62, 0x32, + 0x35, 0x30, 0x59, 0x57, 0x35, 0x68, 0x4D, 0x52, 0x41, 0x77, + 0x44, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x48, 0x44, 0x41, + 0x64, 0x43, 0x62, 0x33, 0x70, 0x6C, 0x0A, 0x62, 0x57, 0x46, + 0x75, 0x4D, 0x52, 0x51, 0x77, 0x45, 0x67, 0x59, 0x44, 0x56, + 0x51, 0x51, 0x4B, 0x44, 0x41, 0x74, 0x33, 0x62, 0x32, 0x78, + 0x6D, 0x55, 0x31, 0x4E, 0x4D, 0x58, 0x31, 0x4E, 0x4E, 0x4D, + 0x6A, 0x45, 0x52, 0x4D, 0x41, 0x38, 0x47, 0x41, 0x31, 0x55, + 0x45, 0x43, 0x77, 0x77, 0x49, 0x55, 0x6D, 0x39, 0x76, 0x64, + 0x43, 0x31, 0x54, 0x54, 0x54, 0x49, 0x78, 0x47, 0x44, 0x41, + 0x57, 0x0A, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x4D, 0x4D, + 0x44, 0x33, 0x64, 0x33, 0x64, 0x79, 0x35, 0x33, 0x62, 0x32, + 0x78, 0x6D, 0x63, 0x33, 0x4E, 0x73, 0x4C, 0x6D, 0x4E, 0x76, + 0x62, 0x54, 0x45, 0x66, 0x4D, 0x42, 0x30, 0x47, 0x43, 0x53, + 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x4A, + 0x41, 0x52, 0x59, 0x51, 0x61, 0x57, 0x35, 0x6D, 0x62, 0x30, + 0x42, 0x33, 0x62, 0x32, 0x78, 0x6D, 0x0A, 0x63, 0x33, 0x4E, + 0x73, 0x4C, 0x6D, 0x4E, 0x76, 0x62, 0x54, 0x41, 0x65, 0x46, + 0x77, 0x30, 0x79, 0x4D, 0x7A, 0x41, 0x79, 0x4D, 0x54, 0x55, + 0x77, 0x4E, 0x6A, 0x49, 0x7A, 0x4D, 0x44, 0x64, 0x61, 0x46, + 0x77, 0x30, 0x79, 0x4E, 0x54, 0x45, 0x78, 0x4D, 0x54, 0x45, + 0x77, 0x4E, 0x6A, 0x49, 0x7A, 0x4D, 0x44, 0x64, 0x61, 0x4D, + 0x49, 0x47, 0x56, 0x4D, 0x51, 0x73, 0x77, 0x43, 0x51, 0x59, + 0x44, 0x0A, 0x56, 0x51, 0x51, 0x47, 0x45, 0x77, 0x4A, 0x56, + 0x55, 0x7A, 0x45, 0x51, 0x4D, 0x41, 0x34, 0x47, 0x41, 0x31, + 0x55, 0x45, 0x43, 0x41, 0x77, 0x48, 0x54, 0x57, 0x39, 0x75, + 0x64, 0x47, 0x46, 0x75, 0x59, 0x54, 0x45, 0x51, 0x4D, 0x41, + 0x34, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x77, 0x77, 0x48, + 0x51, 0x6D, 0x39, 0x36, 0x5A, 0x57, 0x31, 0x68, 0x62, 0x6A, + 0x45, 0x55, 0x4D, 0x42, 0x49, 0x47, 0x0A, 0x41, 0x31, 0x55, + 0x45, 0x43, 0x67, 0x77, 0x4C, 0x64, 0x32, 0x39, 0x73, 0x5A, + 0x6C, 0x4E, 0x54, 0x54, 0x46, 0x39, 0x54, 0x54, 0x54, 0x49, + 0x78, 0x45, 0x54, 0x41, 0x50, 0x42, 0x67, 0x4E, 0x56, 0x42, + 0x41, 0x73, 0x4D, 0x43, 0x46, 0x4A, 0x76, 0x62, 0x33, 0x51, + 0x74, 0x55, 0x30, 0x30, 0x79, 0x4D, 0x52, 0x67, 0x77, 0x46, + 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x39, + 0x33, 0x0A, 0x64, 0x33, 0x63, 0x75, 0x64, 0x32, 0x39, 0x73, + 0x5A, 0x6E, 0x4E, 0x7A, 0x62, 0x43, 0x35, 0x6A, 0x62, 0x32, + 0x30, 0x78, 0x48, 0x7A, 0x41, 0x64, 0x42, 0x67, 0x6B, 0x71, + 0x68, 0x6B, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x43, 0x51, + 0x45, 0x57, 0x45, 0x47, 0x6C, 0x75, 0x5A, 0x6D, 0x39, 0x41, + 0x64, 0x32, 0x39, 0x73, 0x5A, 0x6E, 0x4E, 0x7A, 0x62, 0x43, + 0x35, 0x6A, 0x62, 0x32, 0x30, 0x77, 0x0A, 0x57, 0x6A, 0x41, + 0x55, 0x42, 0x67, 0x67, 0x71, 0x67, 0x52, 0x7A, 0x50, 0x56, + 0x51, 0x47, 0x43, 0x4C, 0x51, 0x59, 0x49, 0x4B, 0x6F, 0x45, + 0x63, 0x7A, 0x31, 0x55, 0x42, 0x67, 0x69, 0x30, 0x44, 0x51, + 0x67, 0x41, 0x45, 0x75, 0x35, 0x78, 0x31, 0x6A, 0x50, 0x63, + 0x58, 0x2B, 0x45, 0x69, 0x72, 0x39, 0x2F, 0x62, 0x62, 0x44, + 0x5A, 0x71, 0x4E, 0x6E, 0x38, 0x4C, 0x52, 0x52, 0x35, 0x65, + 0x56, 0x0A, 0x43, 0x30, 0x37, 0x6D, 0x56, 0x2B, 0x7A, 0x46, + 0x2B, 0x46, 0x64, 0x55, 0x63, 0x54, 0x6B, 0x38, 0x65, 0x65, + 0x46, 0x41, 0x50, 0x37, 0x5A, 0x52, 0x36, 0x58, 0x7A, 0x48, + 0x32, 0x69, 0x33, 0x76, 0x30, 0x75, 0x68, 0x35, 0x67, 0x58, + 0x75, 0x72, 0x6F, 0x31, 0x39, 0x72, 0x4B, 0x6D, 0x79, 0x58, + 0x47, 0x6C, 0x36, 0x4F, 0x32, 0x64, 0x44, 0x4D, 0x42, 0x4B, + 0x4E, 0x6A, 0x4D, 0x47, 0x45, 0x77, 0x0A, 0x48, 0x51, 0x59, + 0x44, 0x56, 0x52, 0x30, 0x4F, 0x42, 0x42, 0x59, 0x45, 0x46, + 0x44, 0x51, 0x64, 0x65, 0x55, 0x51, 0x56, 0x65, 0x61, 0x47, + 0x78, 0x59, 0x35, 0x6E, 0x6A, 0x37, 0x57, 0x56, 0x38, 0x5A, + 0x49, 0x6D, 0x41, 0x2F, 0x37, 0x6A, 0x73, 0x4D, 0x42, 0x38, + 0x47, 0x41, 0x31, 0x55, 0x64, 0x49, 0x77, 0x51, 0x59, 0x4D, + 0x42, 0x61, 0x41, 0x46, 0x44, 0x51, 0x64, 0x65, 0x55, 0x51, + 0x56, 0x0A, 0x65, 0x61, 0x47, 0x78, 0x59, 0x35, 0x6E, 0x6A, + 0x37, 0x57, 0x56, 0x38, 0x5A, 0x49, 0x6D, 0x41, 0x2F, 0x37, + 0x6A, 0x73, 0x4D, 0x41, 0x38, 0x47, 0x41, 0x31, 0x55, 0x64, + 0x45, 0x77, 0x45, 0x42, 0x2F, 0x77, 0x51, 0x46, 0x4D, 0x41, + 0x4D, 0x42, 0x41, 0x66, 0x38, 0x77, 0x44, 0x67, 0x59, 0x44, + 0x56, 0x52, 0x30, 0x50, 0x41, 0x51, 0x48, 0x2F, 0x42, 0x41, + 0x51, 0x44, 0x41, 0x67, 0x47, 0x47, 0x0A, 0x4D, 0x41, 0x6F, + 0x47, 0x43, 0x43, 0x71, 0x42, 0x48, 0x4D, 0x39, 0x56, 0x41, + 0x59, 0x4E, 0x31, 0x41, 0x30, 0x63, 0x41, 0x4D, 0x45, 0x51, + 0x43, 0x49, 0x41, 0x4D, 0x6E, 0x4B, 0x66, 0x44, 0x76, 0x65, + 0x43, 0x61, 0x68, 0x47, 0x6D, 0x6F, 0x65, 0x69, 0x49, 0x48, + 0x6E, 0x67, 0x33, 0x4A, 0x66, 0x50, 0x75, 0x59, 0x49, 0x36, + 0x42, 0x52, 0x6F, 0x76, 0x30, 0x73, 0x50, 0x61, 0x46, 0x4B, + 0x53, 0x0A, 0x71, 0x6F, 0x2B, 0x68, 0x41, 0x69, 0x41, 0x4C, + 0x2F, 0x68, 0x73, 0x55, 0x75, 0x6C, 0x47, 0x43, 0x5A, 0x51, + 0x61, 0x37, 0x49, 0x74, 0x67, 0x61, 0x70, 0x35, 0x39, 0x55, + 0x59, 0x75, 0x75, 0x4E, 0x73, 0x74, 0x55, 0x54, 0x73, 0x37, + 0x69, 0x69, 0x38, 0x78, 0x52, 0x45, 0x73, 0x71, 0x41, 0x68, + 0x30, 0x41, 0x3D, 0x3D, 0x0A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, + 0x45, 0x4E, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, + 0x49, 0x43, 0x41, 0x54, 0x45, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, + 0x0A +}; +#define sizeof_root_sm2 (sizeof(root_sm2)) + +/* ./certs/sm2/root-sm2-key.pem */ +static const unsigned char root_sm2_key[] = +{ + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, + 0x20, 0x50, 0x55, 0x42, 0x4C, 0x49, 0x43, 0x20, 0x4B, 0x45, + 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x46, 0x6F, + 0x77, 0x46, 0x41, 0x59, 0x49, 0x4B, 0x6F, 0x45, 0x63, 0x7A, + 0x31, 0x55, 0x42, 0x67, 0x69, 0x30, 0x47, 0x43, 0x43, 0x71, + 0x42, 0x48, 0x4D, 0x39, 0x56, 0x41, 0x59, 0x49, 0x74, 0x41, + 0x30, 0x49, 0x41, 0x42, 0x4C, 0x75, 0x63, 0x64, 0x59, 0x7A, + 0x33, 0x46, 0x2F, 0x68, 0x49, 0x71, 0x2F, 0x66, 0x32, 0x32, + 0x77, 0x32, 0x61, 0x6A, 0x5A, 0x2F, 0x43, 0x30, 0x55, 0x65, + 0x58, 0x0A, 0x6C, 0x51, 0x74, 0x4F, 0x35, 0x6C, 0x66, 0x73, + 0x78, 0x66, 0x68, 0x58, 0x56, 0x48, 0x45, 0x35, 0x50, 0x48, + 0x6E, 0x68, 0x51, 0x44, 0x2B, 0x32, 0x55, 0x65, 0x6C, 0x38, + 0x78, 0x39, 0x6F, 0x74, 0x37, 0x39, 0x4C, 0x6F, 0x65, 0x59, + 0x46, 0x37, 0x71, 0x36, 0x4E, 0x66, 0x61, 0x79, 0x70, 0x73, + 0x6C, 0x78, 0x70, 0x65, 0x6A, 0x74, 0x6E, 0x51, 0x7A, 0x41, + 0x51, 0x3D, 0x0A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x45, 0x4E, + 0x44, 0x20, 0x50, 0x55, 0x42, 0x4C, 0x49, 0x43, 0x20, 0x4B, + 0x45, 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A +}; +#define sizeof_root_sm2_key (sizeof(root_sm2_key)) + +/* ./certs/sm2/root-sm2-priv.pem */ +static const unsigned char root_sm2_priv[] = +{ + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, + 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4B, + 0x45, 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x49, + 0x47, 0x49, 0x41, 0x67, 0x45, 0x41, 0x4D, 0x42, 0x51, 0x47, + 0x43, 0x43, 0x71, 0x42, 0x48, 0x4D, 0x39, 0x56, 0x41, 0x59, + 0x49, 0x74, 0x42, 0x67, 0x67, 0x71, 0x67, 0x52, 0x7A, 0x50, + 0x56, 0x51, 0x47, 0x43, 0x4C, 0x51, 0x52, 0x74, 0x4D, 0x47, + 0x73, 0x43, 0x41, 0x51, 0x45, 0x45, 0x49, 0x4D, 0x5A, 0x72, + 0x4E, 0x45, 0x77, 0x7A, 0x4E, 0x31, 0x74, 0x6B, 0x46, 0x6C, + 0x70, 0x2F, 0x0A, 0x42, 0x50, 0x6E, 0x38, 0x68, 0x7A, 0x44, + 0x52, 0x46, 0x62, 0x70, 0x59, 0x65, 0x4F, 0x34, 0x48, 0x6D, + 0x43, 0x41, 0x6D, 0x34, 0x51, 0x61, 0x4E, 0x55, 0x59, 0x6F, + 0x6F, 0x6F, 0x55, 0x51, 0x44, 0x51, 0x67, 0x41, 0x45, 0x75, + 0x35, 0x78, 0x31, 0x6A, 0x50, 0x63, 0x58, 0x2B, 0x45, 0x69, + 0x72, 0x39, 0x2F, 0x62, 0x62, 0x44, 0x5A, 0x71, 0x4E, 0x6E, + 0x38, 0x4C, 0x52, 0x52, 0x35, 0x65, 0x56, 0x0A, 0x43, 0x30, + 0x37, 0x6D, 0x56, 0x2B, 0x7A, 0x46, 0x2B, 0x46, 0x64, 0x55, + 0x63, 0x54, 0x6B, 0x38, 0x65, 0x65, 0x46, 0x41, 0x50, 0x37, + 0x5A, 0x52, 0x36, 0x58, 0x7A, 0x48, 0x32, 0x69, 0x33, 0x76, + 0x30, 0x75, 0x68, 0x35, 0x67, 0x58, 0x75, 0x72, 0x6F, 0x31, + 0x39, 0x72, 0x4B, 0x6D, 0x79, 0x58, 0x47, 0x6C, 0x36, 0x4F, + 0x32, 0x64, 0x44, 0x4D, 0x42, 0x41, 0x3D, 0x3D, 0x0A, 0x2D, + 0x2D, 0x2D, 0x2D, 0x2D, 0x45, 0x4E, 0x44, 0x20, 0x50, 0x52, + 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4B, 0x45, 0x59, 0x2D, + 0x2D, 0x2D, 0x2D, 0x2D, 0x0A +}; +#define sizeof_root_sm2_priv (sizeof(root_sm2_priv)) + +/* ./certs/sm2/self-sm2-cert.pem */ +static const unsigned char self_sm2_cert[] = +{ + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x44, 0x61, 0x74, + 0x61, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3A, 0x20, + 0x33, 0x20, 0x28, 0x30, 0x78, 0x32, 0x29, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x65, 0x72, 0x69, + 0x61, 0x6C, 0x20, 0x4E, 0x75, 0x6D, 0x62, 0x65, 0x72, 0x3A, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x30, 0x36, 0x3A, 0x37, 0x62, 0x3A, 0x33, + 0x61, 0x3A, 0x35, 0x64, 0x3A, 0x63, 0x66, 0x3A, 0x32, 0x32, + 0x3A, 0x61, 0x39, 0x3A, 0x36, 0x64, 0x3A, 0x36, 0x64, 0x3A, + 0x37, 0x38, 0x3A, 0x32, 0x62, 0x3A, 0x31, 0x30, 0x3A, 0x30, + 0x31, 0x3A, 0x35, 0x31, 0x3A, 0x62, 0x36, 0x3A, 0x34, 0x63, + 0x3A, 0x64, 0x34, 0x3A, 0x38, 0x32, 0x3A, 0x61, 0x32, 0x3A, + 0x61, 0x31, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x53, 0x69, 0x67, 0x6E, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x20, 0x41, 0x6C, 0x67, 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, + 0x3A, 0x20, 0x53, 0x4D, 0x32, 0x2D, 0x77, 0x69, 0x74, 0x68, + 0x2D, 0x53, 0x4D, 0x33, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x3A, + 0x20, 0x43, 0x20, 0x3D, 0x20, 0x41, 0x55, 0x2C, 0x20, 0x53, + 0x54, 0x20, 0x3D, 0x20, 0x51, 0x4C, 0x44, 0x2C, 0x20, 0x4F, + 0x20, 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, + 0x2C, 0x20, 0x4F, 0x55, 0x20, 0x3D, 0x20, 0x54, 0x65, 0x73, + 0x74, 0x69, 0x6E, 0x67, 0x2C, 0x20, 0x43, 0x4E, 0x20, 0x3D, + 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2D, 0x64, + 0x65, 0x76, 0x2D, 0x73, 0x6D, 0x32, 0x2C, 0x20, 0x65, 0x6D, + 0x61, 0x69, 0x6C, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x20, 0x3D, 0x20, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, + 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x2C, + 0x20, 0x55, 0x49, 0x44, 0x20, 0x3D, 0x20, 0x77, 0x6F, 0x6C, + 0x66, 0x53, 0x53, 0x4C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x56, 0x61, 0x6C, 0x69, 0x64, 0x69, 0x74, + 0x79, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x4E, 0x6F, 0x74, 0x20, 0x42, 0x65, + 0x66, 0x6F, 0x72, 0x65, 0x3A, 0x20, 0x4E, 0x6F, 0x76, 0x20, + 0x32, 0x32, 0x20, 0x32, 0x31, 0x3A, 0x32, 0x38, 0x3A, 0x33, + 0x37, 0x20, 0x32, 0x30, 0x32, 0x33, 0x20, 0x47, 0x4D, 0x54, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x4E, 0x6F, 0x74, 0x20, 0x41, 0x66, 0x74, + 0x65, 0x72, 0x20, 0x3A, 0x20, 0x41, 0x75, 0x67, 0x20, 0x31, + 0x38, 0x20, 0x32, 0x31, 0x3A, 0x32, 0x38, 0x3A, 0x33, 0x37, + 0x20, 0x32, 0x30, 0x32, 0x36, 0x20, 0x47, 0x4D, 0x54, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x75, + 0x62, 0x6A, 0x65, 0x63, 0x74, 0x3A, 0x20, 0x43, 0x20, 0x3D, + 0x20, 0x41, 0x55, 0x2C, 0x20, 0x53, 0x54, 0x20, 0x3D, 0x20, + 0x51, 0x4C, 0x44, 0x2C, 0x20, 0x4F, 0x20, 0x3D, 0x20, 0x77, + 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x2C, 0x20, 0x4F, 0x55, + 0x20, 0x3D, 0x20, 0x54, 0x65, 0x73, 0x74, 0x69, 0x6E, 0x67, + 0x2C, 0x20, 0x43, 0x4E, 0x20, 0x3D, 0x20, 0x77, 0x6F, 0x6C, + 0x66, 0x73, 0x73, 0x6C, 0x2D, 0x64, 0x65, 0x76, 0x2D, 0x73, + 0x6D, 0x32, 0x2C, 0x20, 0x65, 0x6D, 0x61, 0x69, 0x6C, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3D, 0x20, 0x69, + 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, + 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x2C, 0x20, 0x55, 0x49, 0x44, + 0x20, 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, + 0x75, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x50, 0x75, 0x62, + 0x6C, 0x69, 0x63, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x49, 0x6E, + 0x66, 0x6F, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x75, 0x62, 0x6C, + 0x69, 0x63, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x41, 0x6C, 0x67, + 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x3A, 0x20, 0x69, 0x64, + 0x2D, 0x65, 0x63, 0x50, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x4B, + 0x65, 0x79, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, + 0x75, 0x62, 0x6C, 0x69, 0x63, 0x2D, 0x4B, 0x65, 0x79, 0x3A, + 0x20, 0x28, 0x32, 0x35, 0x36, 0x20, 0x62, 0x69, 0x74, 0x29, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x75, 0x62, + 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x30, 0x34, 0x3A, 0x64, 0x38, 0x3A, 0x63, 0x34, + 0x3A, 0x61, 0x31, 0x3A, 0x66, 0x31, 0x3A, 0x30, 0x62, 0x3A, + 0x38, 0x62, 0x3A, 0x38, 0x64, 0x3A, 0x63, 0x34, 0x3A, 0x37, + 0x64, 0x3A, 0x64, 0x63, 0x3A, 0x64, 0x34, 0x3A, 0x36, 0x35, + 0x3A, 0x62, 0x39, 0x3A, 0x61, 0x35, 0x3A, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x35, 0x35, + 0x3A, 0x34, 0x65, 0x3A, 0x66, 0x62, 0x3A, 0x61, 0x63, 0x3A, + 0x33, 0x33, 0x3A, 0x61, 0x62, 0x3A, 0x39, 0x62, 0x3A, 0x34, + 0x33, 0x3A, 0x39, 0x34, 0x3A, 0x34, 0x63, 0x3A, 0x34, 0x38, + 0x3A, 0x34, 0x30, 0x3A, 0x31, 0x62, 0x3A, 0x33, 0x33, 0x3A, + 0x64, 0x39, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x31, 0x62, 0x3A, 0x63, 0x63, 0x3A, + 0x33, 0x31, 0x3A, 0x63, 0x31, 0x3A, 0x38, 0x32, 0x3A, 0x35, + 0x36, 0x3A, 0x33, 0x66, 0x3A, 0x62, 0x30, 0x3A, 0x63, 0x30, + 0x3A, 0x36, 0x62, 0x3A, 0x39, 0x35, 0x3A, 0x34, 0x30, 0x3A, + 0x35, 0x31, 0x3A, 0x66, 0x64, 0x3A, 0x38, 0x38, 0x3A, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x30, 0x32, 0x3A, 0x30, 0x31, 0x3A, 0x62, 0x31, 0x3A, 0x62, + 0x30, 0x3A, 0x39, 0x34, 0x3A, 0x36, 0x63, 0x3A, 0x30, 0x36, + 0x3A, 0x65, 0x62, 0x3A, 0x61, 0x37, 0x3A, 0x64, 0x61, 0x3A, + 0x38, 0x65, 0x3A, 0x65, 0x65, 0x3A, 0x37, 0x30, 0x3A, 0x62, + 0x36, 0x3A, 0x65, 0x35, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x62, 0x3A, 0x62, + 0x34, 0x3A, 0x31, 0x65, 0x3A, 0x65, 0x37, 0x3A, 0x62, 0x34, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x41, 0x53, 0x4E, + 0x31, 0x20, 0x4F, 0x49, 0x44, 0x3A, 0x20, 0x53, 0x4D, 0x32, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, + 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x65, 0x78, 0x74, 0x65, + 0x6E, 0x73, 0x69, 0x6F, 0x6E, 0x73, 0x3A, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x53, 0x75, 0x62, + 0x6A, 0x65, 0x63, 0x74, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x49, + 0x64, 0x65, 0x6E, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3A, + 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x36, 0x45, + 0x3A, 0x39, 0x37, 0x3A, 0x45, 0x38, 0x3A, 0x39, 0x38, 0x3A, + 0x42, 0x36, 0x3A, 0x35, 0x42, 0x3A, 0x42, 0x36, 0x3A, 0x41, + 0x45, 0x3A, 0x38, 0x37, 0x3A, 0x30, 0x34, 0x3A, 0x44, 0x42, + 0x3A, 0x31, 0x34, 0x3A, 0x35, 0x36, 0x3A, 0x36, 0x36, 0x3A, + 0x31, 0x36, 0x3A, 0x46, 0x34, 0x3A, 0x42, 0x38, 0x3A, 0x32, + 0x44, 0x3A, 0x38, 0x43, 0x3A, 0x46, 0x32, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x41, 0x75, 0x74, + 0x68, 0x6F, 0x72, 0x69, 0x74, 0x79, 0x20, 0x4B, 0x65, 0x79, + 0x20, 0x49, 0x64, 0x65, 0x6E, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x3A, 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x36, 0x45, 0x3A, 0x39, 0x37, 0x3A, 0x45, 0x38, 0x3A, 0x39, + 0x38, 0x3A, 0x42, 0x36, 0x3A, 0x35, 0x42, 0x3A, 0x42, 0x36, + 0x3A, 0x41, 0x45, 0x3A, 0x38, 0x37, 0x3A, 0x30, 0x34, 0x3A, + 0x44, 0x42, 0x3A, 0x31, 0x34, 0x3A, 0x35, 0x36, 0x3A, 0x36, + 0x36, 0x3A, 0x31, 0x36, 0x3A, 0x46, 0x34, 0x3A, 0x42, 0x38, + 0x3A, 0x32, 0x44, 0x3A, 0x38, 0x43, 0x3A, 0x46, 0x32, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x42, + 0x61, 0x73, 0x69, 0x63, 0x20, 0x43, 0x6F, 0x6E, 0x73, 0x74, + 0x72, 0x61, 0x69, 0x6E, 0x74, 0x73, 0x3A, 0x20, 0x63, 0x72, + 0x69, 0x74, 0x69, 0x63, 0x61, 0x6C, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x43, 0x41, 0x3A, 0x54, 0x52, 0x55, 0x45, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, + 0x4B, 0x65, 0x79, 0x20, 0x55, 0x73, 0x61, 0x67, 0x65, 0x3A, + 0x20, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6C, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x69, 0x67, 0x69, + 0x74, 0x61, 0x6C, 0x20, 0x53, 0x69, 0x67, 0x6E, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x2C, 0x20, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x20, 0x53, 0x69, 0x67, + 0x6E, 0x2C, 0x20, 0x43, 0x52, 0x4C, 0x20, 0x53, 0x69, 0x67, + 0x6E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, 0x67, 0x6E, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x41, 0x6C, 0x67, 0x6F, + 0x72, 0x69, 0x74, 0x68, 0x6D, 0x3A, 0x20, 0x53, 0x4D, 0x32, + 0x2D, 0x77, 0x69, 0x74, 0x68, 0x2D, 0x53, 0x4D, 0x33, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, 0x67, 0x6E, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x20, 0x56, 0x61, 0x6C, 0x75, 0x65, 0x3A, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x33, + 0x30, 0x3A, 0x34, 0x34, 0x3A, 0x30, 0x32, 0x3A, 0x32, 0x30, + 0x3A, 0x30, 0x66, 0x3A, 0x63, 0x33, 0x3A, 0x32, 0x63, 0x3A, + 0x33, 0x36, 0x3A, 0x65, 0x33, 0x3A, 0x39, 0x66, 0x3A, 0x31, + 0x63, 0x3A, 0x65, 0x39, 0x3A, 0x36, 0x38, 0x3A, 0x31, 0x63, + 0x3A, 0x33, 0x62, 0x3A, 0x34, 0x33, 0x3A, 0x31, 0x38, 0x3A, + 0x35, 0x62, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x63, 0x39, 0x3A, 0x38, 0x66, 0x3A, 0x65, 0x34, + 0x3A, 0x66, 0x61, 0x3A, 0x64, 0x64, 0x3A, 0x33, 0x33, 0x3A, + 0x63, 0x31, 0x3A, 0x62, 0x38, 0x3A, 0x31, 0x63, 0x3A, 0x64, + 0x33, 0x3A, 0x64, 0x34, 0x3A, 0x36, 0x31, 0x3A, 0x33, 0x33, + 0x3A, 0x66, 0x38, 0x3A, 0x33, 0x37, 0x3A, 0x39, 0x64, 0x3A, + 0x35, 0x61, 0x3A, 0x66, 0x34, 0x3A, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x32, 0x3A, 0x32, 0x30, + 0x3A, 0x33, 0x61, 0x3A, 0x62, 0x39, 0x3A, 0x61, 0x38, 0x3A, + 0x34, 0x33, 0x3A, 0x38, 0x30, 0x3A, 0x63, 0x66, 0x3A, 0x33, + 0x38, 0x3A, 0x32, 0x35, 0x3A, 0x65, 0x39, 0x3A, 0x36, 0x34, + 0x3A, 0x64, 0x38, 0x3A, 0x32, 0x36, 0x3A, 0x34, 0x37, 0x3A, + 0x39, 0x64, 0x3A, 0x35, 0x30, 0x3A, 0x30, 0x34, 0x3A, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x63, + 0x3A, 0x38, 0x61, 0x3A, 0x65, 0x38, 0x3A, 0x61, 0x32, 0x3A, + 0x34, 0x32, 0x3A, 0x65, 0x38, 0x3A, 0x36, 0x33, 0x3A, 0x64, + 0x64, 0x3A, 0x35, 0x33, 0x3A, 0x39, 0x34, 0x3A, 0x37, 0x64, + 0x3A, 0x33, 0x38, 0x3A, 0x36, 0x64, 0x3A, 0x35, 0x32, 0x3A, + 0x37, 0x30, 0x3A, 0x66, 0x64, 0x0A, 0x2D, 0x2D, 0x2D, 0x2D, + 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, 0x20, 0x43, 0x45, 0x52, + 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2D, 0x2D, + 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x49, 0x49, 0x43, 0x6A, 0x44, + 0x43, 0x43, 0x41, 0x6A, 0x4F, 0x67, 0x41, 0x77, 0x49, 0x42, + 0x41, 0x67, 0x49, 0x55, 0x42, 0x6E, 0x73, 0x36, 0x58, 0x63, + 0x38, 0x69, 0x71, 0x57, 0x31, 0x74, 0x65, 0x43, 0x73, 0x51, + 0x41, 0x56, 0x47, 0x32, 0x54, 0x4E, 0x53, 0x43, 0x6F, 0x71, + 0x45, 0x77, 0x43, 0x67, 0x59, 0x49, 0x4B, 0x6F, 0x45, 0x63, + 0x7A, 0x31, 0x55, 0x42, 0x67, 0x33, 0x55, 0x77, 0x0A, 0x67, + 0x5A, 0x4D, 0x78, 0x43, 0x7A, 0x41, 0x4A, 0x42, 0x67, 0x4E, + 0x56, 0x42, 0x41, 0x59, 0x54, 0x41, 0x6B, 0x46, 0x56, 0x4D, + 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, + 0x49, 0x44, 0x41, 0x4E, 0x52, 0x54, 0x45, 0x51, 0x78, 0x45, + 0x44, 0x41, 0x4F, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x6F, + 0x4D, 0x42, 0x33, 0x64, 0x76, 0x62, 0x47, 0x5A, 0x54, 0x55, + 0x30, 0x77, 0x78, 0x0A, 0x45, 0x44, 0x41, 0x4F, 0x42, 0x67, + 0x4E, 0x56, 0x42, 0x41, 0x73, 0x4D, 0x42, 0x31, 0x52, 0x6C, + 0x63, 0x33, 0x52, 0x70, 0x62, 0x6D, 0x63, 0x78, 0x47, 0x44, + 0x41, 0x57, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x4D, 0x4D, + 0x44, 0x33, 0x64, 0x76, 0x62, 0x47, 0x5A, 0x7A, 0x63, 0x32, + 0x77, 0x74, 0x5A, 0x47, 0x56, 0x32, 0x4C, 0x58, 0x4E, 0x74, + 0x4D, 0x6A, 0x45, 0x66, 0x4D, 0x42, 0x30, 0x47, 0x0A, 0x43, + 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, + 0x4A, 0x41, 0x52, 0x59, 0x51, 0x61, 0x57, 0x35, 0x6D, 0x62, + 0x30, 0x42, 0x33, 0x62, 0x32, 0x78, 0x6D, 0x63, 0x33, 0x4E, + 0x73, 0x4C, 0x6D, 0x4E, 0x76, 0x62, 0x54, 0x45, 0x58, 0x4D, + 0x42, 0x55, 0x47, 0x43, 0x67, 0x6D, 0x53, 0x4A, 0x6F, 0x6D, + 0x54, 0x38, 0x69, 0x78, 0x6B, 0x41, 0x51, 0x45, 0x4D, 0x42, + 0x33, 0x64, 0x76, 0x0A, 0x62, 0x47, 0x5A, 0x54, 0x55, 0x30, + 0x77, 0x77, 0x48, 0x68, 0x63, 0x4E, 0x4D, 0x6A, 0x4D, 0x78, + 0x4D, 0x54, 0x49, 0x79, 0x4D, 0x6A, 0x45, 0x79, 0x4F, 0x44, + 0x4D, 0x33, 0x57, 0x68, 0x63, 0x4E, 0x4D, 0x6A, 0x59, 0x77, + 0x4F, 0x44, 0x45, 0x34, 0x4D, 0x6A, 0x45, 0x79, 0x4F, 0x44, + 0x4D, 0x33, 0x57, 0x6A, 0x43, 0x42, 0x6B, 0x7A, 0x45, 0x4C, + 0x4D, 0x41, 0x6B, 0x47, 0x41, 0x31, 0x55, 0x45, 0x0A, 0x42, + 0x68, 0x4D, 0x43, 0x51, 0x56, 0x55, 0x78, 0x44, 0x44, 0x41, + 0x4B, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x67, 0x4D, 0x41, + 0x31, 0x46, 0x4D, 0x52, 0x44, 0x45, 0x51, 0x4D, 0x41, 0x34, + 0x47, 0x41, 0x31, 0x55, 0x45, 0x43, 0x67, 0x77, 0x48, 0x64, + 0x32, 0x39, 0x73, 0x5A, 0x6C, 0x4E, 0x54, 0x54, 0x44, 0x45, + 0x51, 0x4D, 0x41, 0x34, 0x47, 0x41, 0x31, 0x55, 0x45, 0x43, + 0x77, 0x77, 0x48, 0x0A, 0x56, 0x47, 0x56, 0x7A, 0x64, 0x47, + 0x6C, 0x75, 0x5A, 0x7A, 0x45, 0x59, 0x4D, 0x42, 0x59, 0x47, + 0x41, 0x31, 0x55, 0x45, 0x41, 0x77, 0x77, 0x50, 0x64, 0x32, + 0x39, 0x73, 0x5A, 0x6E, 0x4E, 0x7A, 0x62, 0x43, 0x31, 0x6B, + 0x5A, 0x58, 0x59, 0x74, 0x63, 0x32, 0x30, 0x79, 0x4D, 0x52, + 0x38, 0x77, 0x48, 0x51, 0x59, 0x4A, 0x4B, 0x6F, 0x5A, 0x49, + 0x68, 0x76, 0x63, 0x4E, 0x41, 0x51, 0x6B, 0x42, 0x0A, 0x46, + 0x68, 0x42, 0x70, 0x62, 0x6D, 0x5A, 0x76, 0x51, 0x48, 0x64, + 0x76, 0x62, 0x47, 0x5A, 0x7A, 0x63, 0x32, 0x77, 0x75, 0x59, + 0x32, 0x39, 0x74, 0x4D, 0x52, 0x63, 0x77, 0x46, 0x51, 0x59, + 0x4B, 0x43, 0x5A, 0x49, 0x6D, 0x69, 0x5A, 0x50, 0x79, 0x4C, + 0x47, 0x51, 0x42, 0x41, 0x51, 0x77, 0x48, 0x64, 0x32, 0x39, + 0x73, 0x5A, 0x6C, 0x4E, 0x54, 0x54, 0x44, 0x42, 0x5A, 0x4D, + 0x42, 0x4D, 0x47, 0x0A, 0x42, 0x79, 0x71, 0x47, 0x53, 0x4D, + 0x34, 0x39, 0x41, 0x67, 0x45, 0x47, 0x43, 0x43, 0x71, 0x42, + 0x48, 0x4D, 0x39, 0x56, 0x41, 0x59, 0x49, 0x74, 0x41, 0x30, + 0x49, 0x41, 0x42, 0x4E, 0x6A, 0x45, 0x6F, 0x66, 0x45, 0x4C, + 0x69, 0x34, 0x33, 0x45, 0x66, 0x64, 0x7A, 0x55, 0x5A, 0x62, + 0x6D, 0x6C, 0x56, 0x55, 0x37, 0x37, 0x72, 0x44, 0x4F, 0x72, + 0x6D, 0x30, 0x4F, 0x55, 0x54, 0x45, 0x68, 0x41, 0x0A, 0x47, + 0x7A, 0x50, 0x5A, 0x47, 0x38, 0x77, 0x78, 0x77, 0x59, 0x4A, + 0x57, 0x50, 0x37, 0x44, 0x41, 0x61, 0x35, 0x56, 0x41, 0x55, + 0x66, 0x32, 0x49, 0x41, 0x67, 0x47, 0x78, 0x73, 0x4A, 0x52, + 0x73, 0x42, 0x75, 0x75, 0x6E, 0x32, 0x6F, 0x37, 0x75, 0x63, + 0x4C, 0x62, 0x6C, 0x75, 0x37, 0x51, 0x65, 0x35, 0x37, 0x53, + 0x6A, 0x59, 0x7A, 0x42, 0x68, 0x4D, 0x42, 0x30, 0x47, 0x41, + 0x31, 0x55, 0x64, 0x0A, 0x44, 0x67, 0x51, 0x57, 0x42, 0x42, + 0x52, 0x75, 0x6C, 0x2B, 0x69, 0x59, 0x74, 0x6C, 0x75, 0x32, + 0x72, 0x6F, 0x63, 0x45, 0x32, 0x78, 0x52, 0x57, 0x5A, 0x68, + 0x62, 0x30, 0x75, 0x43, 0x32, 0x4D, 0x38, 0x6A, 0x41, 0x66, + 0x42, 0x67, 0x4E, 0x56, 0x48, 0x53, 0x4D, 0x45, 0x47, 0x44, + 0x41, 0x57, 0x67, 0x42, 0x52, 0x75, 0x6C, 0x2B, 0x69, 0x59, + 0x74, 0x6C, 0x75, 0x32, 0x72, 0x6F, 0x63, 0x45, 0x0A, 0x32, + 0x78, 0x52, 0x57, 0x5A, 0x68, 0x62, 0x30, 0x75, 0x43, 0x32, + 0x4D, 0x38, 0x6A, 0x41, 0x50, 0x42, 0x67, 0x4E, 0x56, 0x48, + 0x52, 0x4D, 0x42, 0x41, 0x66, 0x38, 0x45, 0x42, 0x54, 0x41, + 0x44, 0x41, 0x51, 0x48, 0x2F, 0x4D, 0x41, 0x34, 0x47, 0x41, + 0x31, 0x55, 0x64, 0x44, 0x77, 0x45, 0x42, 0x2F, 0x77, 0x51, + 0x45, 0x41, 0x77, 0x49, 0x42, 0x68, 0x6A, 0x41, 0x4B, 0x42, + 0x67, 0x67, 0x71, 0x0A, 0x67, 0x52, 0x7A, 0x50, 0x56, 0x51, + 0x47, 0x44, 0x64, 0x51, 0x4E, 0x48, 0x41, 0x44, 0x42, 0x45, + 0x41, 0x69, 0x41, 0x50, 0x77, 0x79, 0x77, 0x32, 0x34, 0x35, + 0x38, 0x63, 0x36, 0x57, 0x67, 0x63, 0x4F, 0x30, 0x4D, 0x59, + 0x57, 0x38, 0x6D, 0x50, 0x35, 0x50, 0x72, 0x64, 0x4D, 0x38, + 0x47, 0x34, 0x48, 0x4E, 0x50, 0x55, 0x59, 0x54, 0x50, 0x34, + 0x4E, 0x35, 0x31, 0x61, 0x39, 0x41, 0x49, 0x67, 0x0A, 0x4F, + 0x72, 0x6D, 0x6F, 0x51, 0x34, 0x44, 0x50, 0x4F, 0x43, 0x58, + 0x70, 0x5A, 0x4E, 0x67, 0x6D, 0x52, 0x35, 0x31, 0x51, 0x42, + 0x41, 0x79, 0x4B, 0x36, 0x4B, 0x4A, 0x43, 0x36, 0x47, 0x50, + 0x64, 0x55, 0x35, 0x52, 0x39, 0x4F, 0x47, 0x31, 0x53, 0x63, + 0x50, 0x30, 0x3D, 0x0A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x45, + 0x4E, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, + 0x43, 0x41, 0x54, 0x45, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A + +}; +#define sizeof_self_sm2_cert (sizeof(self_sm2_cert)) + +/* ./certs/sm2/self-sm2-key.pem */ +static const unsigned char self_sm2_key[] = +{ + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, + 0x20, 0x50, 0x55, 0x42, 0x4C, 0x49, 0x43, 0x20, 0x4B, 0x45, + 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x46, 0x6B, + 0x77, 0x45, 0x77, 0x59, 0x48, 0x4B, 0x6F, 0x5A, 0x49, 0x7A, + 0x6A, 0x30, 0x43, 0x41, 0x51, 0x59, 0x49, 0x4B, 0x6F, 0x45, + 0x63, 0x7A, 0x31, 0x55, 0x42, 0x67, 0x69, 0x30, 0x44, 0x51, + 0x67, 0x41, 0x45, 0x32, 0x4D, 0x53, 0x68, 0x38, 0x51, 0x75, + 0x4C, 0x6A, 0x63, 0x52, 0x39, 0x33, 0x4E, 0x52, 0x6C, 0x75, + 0x61, 0x56, 0x56, 0x54, 0x76, 0x75, 0x73, 0x4D, 0x36, 0x75, + 0x62, 0x0A, 0x51, 0x35, 0x52, 0x4D, 0x53, 0x45, 0x41, 0x62, + 0x4D, 0x39, 0x6B, 0x62, 0x7A, 0x44, 0x48, 0x42, 0x67, 0x6C, + 0x59, 0x2F, 0x73, 0x4D, 0x42, 0x72, 0x6C, 0x55, 0x42, 0x52, + 0x2F, 0x59, 0x67, 0x43, 0x41, 0x62, 0x47, 0x77, 0x6C, 0x47, + 0x77, 0x47, 0x36, 0x36, 0x66, 0x61, 0x6A, 0x75, 0x35, 0x77, + 0x74, 0x75, 0x57, 0x37, 0x74, 0x42, 0x37, 0x6E, 0x74, 0x41, + 0x3D, 0x3D, 0x0A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x45, 0x4E, + 0x44, 0x20, 0x50, 0x55, 0x42, 0x4C, 0x49, 0x43, 0x20, 0x4B, + 0x45, 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A +}; +#define sizeof_self_sm2_key (sizeof(self_sm2_key)) + +/* ./certs/sm2/self-sm2-priv.pem */ +static const unsigned char self_sm2_priv[] = +{ + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, + 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4B, + 0x45, 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x49, + 0x47, 0x54, 0x41, 0x67, 0x45, 0x41, 0x4D, 0x42, 0x4D, 0x47, + 0x42, 0x79, 0x71, 0x47, 0x53, 0x4D, 0x34, 0x39, 0x41, 0x67, + 0x45, 0x47, 0x43, 0x43, 0x71, 0x42, 0x48, 0x4D, 0x39, 0x56, + 0x41, 0x59, 0x49, 0x74, 0x42, 0x48, 0x6B, 0x77, 0x64, 0x77, + 0x49, 0x42, 0x41, 0x51, 0x51, 0x67, 0x30, 0x4A, 0x77, 0x6F, + 0x57, 0x68, 0x58, 0x57, 0x4A, 0x51, 0x32, 0x32, 0x58, 0x39, + 0x47, 0x68, 0x0A, 0x41, 0x57, 0x36, 0x30, 0x44, 0x74, 0x41, + 0x32, 0x2B, 0x68, 0x58, 0x38, 0x71, 0x51, 0x54, 0x6C, 0x46, + 0x36, 0x48, 0x51, 0x4C, 0x79, 0x6E, 0x57, 0x2F, 0x6D, 0x71, + 0x67, 0x43, 0x67, 0x59, 0x49, 0x4B, 0x6F, 0x45, 0x63, 0x7A, + 0x31, 0x55, 0x42, 0x67, 0x69, 0x32, 0x68, 0x52, 0x41, 0x4E, + 0x43, 0x41, 0x41, 0x54, 0x59, 0x78, 0x4B, 0x48, 0x78, 0x43, + 0x34, 0x75, 0x4E, 0x78, 0x48, 0x33, 0x63, 0x0A, 0x31, 0x47, + 0x57, 0x35, 0x70, 0x56, 0x56, 0x4F, 0x2B, 0x36, 0x77, 0x7A, + 0x71, 0x35, 0x74, 0x44, 0x6C, 0x45, 0x78, 0x49, 0x51, 0x42, + 0x73, 0x7A, 0x32, 0x52, 0x76, 0x4D, 0x4D, 0x63, 0x47, 0x43, + 0x56, 0x6A, 0x2B, 0x77, 0x77, 0x47, 0x75, 0x56, 0x51, 0x46, + 0x48, 0x39, 0x69, 0x41, 0x49, 0x42, 0x73, 0x62, 0x43, 0x55, + 0x62, 0x41, 0x62, 0x72, 0x70, 0x39, 0x71, 0x4F, 0x37, 0x6E, + 0x43, 0x32, 0x0A, 0x35, 0x62, 0x75, 0x30, 0x48, 0x75, 0x65, + 0x30, 0x0A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x45, 0x4E, 0x44, + 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4B, + 0x45, 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A +}; +#define sizeof_self_sm2_priv (sizeof(self_sm2_priv)) + +/* ./certs/sm2/server-sm2.pem */ +static const unsigned char server_sm2[] = +{ + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x44, 0x61, 0x74, + 0x61, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3A, 0x20, + 0x33, 0x20, 0x28, 0x30, 0x78, 0x32, 0x29, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x65, 0x72, 0x69, + 0x61, 0x6C, 0x20, 0x4E, 0x75, 0x6D, 0x62, 0x65, 0x72, 0x3A, + 0x20, 0x31, 0x20, 0x28, 0x30, 0x78, 0x31, 0x29, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, 0x67, + 0x6E, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x41, 0x6C, 0x67, + 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x3A, 0x20, 0x53, 0x4D, + 0x32, 0x2D, 0x77, 0x69, 0x74, 0x68, 0x2D, 0x53, 0x4D, 0x33, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x49, + 0x73, 0x73, 0x75, 0x65, 0x72, 0x3A, 0x20, 0x43, 0x20, 0x3D, + 0x20, 0x55, 0x53, 0x2C, 0x20, 0x53, 0x54, 0x20, 0x3D, 0x20, + 0x4D, 0x6F, 0x6E, 0x74, 0x61, 0x6E, 0x61, 0x2C, 0x20, 0x4C, + 0x20, 0x3D, 0x20, 0x42, 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, + 0x2C, 0x20, 0x4F, 0x20, 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, + 0x53, 0x53, 0x4C, 0x5F, 0x73, 0x6D, 0x32, 0x2C, 0x20, 0x4F, + 0x55, 0x20, 0x3D, 0x20, 0x43, 0x41, 0x2D, 0x73, 0x6D, 0x32, + 0x2C, 0x20, 0x43, 0x4E, 0x20, 0x3D, 0x20, 0x77, 0x77, 0x77, + 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, + 0x6F, 0x6D, 0x2C, 0x20, 0x65, 0x6D, 0x61, 0x69, 0x6C, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3D, 0x20, 0x69, + 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, + 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x2C, 0x20, 0x55, 0x49, 0x44, + 0x20, 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x56, + 0x61, 0x6C, 0x69, 0x64, 0x69, 0x74, 0x79, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x4E, 0x6F, 0x74, 0x20, 0x42, 0x65, 0x66, 0x6F, 0x72, 0x65, + 0x3A, 0x20, 0x46, 0x65, 0x62, 0x20, 0x31, 0x35, 0x20, 0x30, + 0x36, 0x3A, 0x32, 0x33, 0x3A, 0x30, 0x37, 0x20, 0x32, 0x30, + 0x32, 0x33, 0x20, 0x47, 0x4D, 0x54, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4E, + 0x6F, 0x74, 0x20, 0x41, 0x66, 0x74, 0x65, 0x72, 0x20, 0x3A, + 0x20, 0x4E, 0x6F, 0x76, 0x20, 0x31, 0x31, 0x20, 0x30, 0x36, + 0x3A, 0x32, 0x33, 0x3A, 0x30, 0x37, 0x20, 0x32, 0x30, 0x32, + 0x35, 0x20, 0x47, 0x4D, 0x54, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x53, 0x75, 0x62, 0x6A, 0x65, 0x63, + 0x74, 0x3A, 0x20, 0x43, 0x20, 0x3D, 0x20, 0x55, 0x53, 0x2C, + 0x20, 0x53, 0x54, 0x20, 0x3D, 0x20, 0x4D, 0x6F, 0x6E, 0x74, + 0x61, 0x6E, 0x61, 0x2C, 0x20, 0x4C, 0x20, 0x3D, 0x20, 0x42, + 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, 0x2C, 0x20, 0x4F, 0x20, + 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, + 0x73, 0x6D, 0x32, 0x2C, 0x20, 0x4F, 0x55, 0x20, 0x3D, 0x20, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2D, 0x73, 0x6D, 0x32, + 0x2C, 0x20, 0x43, 0x4E, 0x20, 0x3D, 0x20, 0x77, 0x77, 0x77, + 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, + 0x6F, 0x6D, 0x2C, 0x20, 0x65, 0x6D, 0x61, 0x69, 0x6C, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3D, 0x20, 0x69, + 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, + 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x2C, 0x20, 0x55, 0x49, 0x44, + 0x20, 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, + 0x75, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x50, 0x75, 0x62, + 0x6C, 0x69, 0x63, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x49, 0x6E, + 0x66, 0x6F, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x75, 0x62, 0x6C, + 0x69, 0x63, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x41, 0x6C, 0x67, + 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x3A, 0x20, 0x73, 0x6D, + 0x32, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x75, + 0x62, 0x6C, 0x69, 0x63, 0x2D, 0x4B, 0x65, 0x79, 0x3A, 0x20, + 0x28, 0x32, 0x35, 0x36, 0x20, 0x62, 0x69, 0x74, 0x29, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x75, 0x62, 0x3A, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x30, 0x34, 0x3A, 0x39, 0x34, 0x3A, 0x37, 0x30, 0x3A, + 0x32, 0x62, 0x3A, 0x34, 0x36, 0x3A, 0x65, 0x34, 0x3A, 0x35, + 0x65, 0x3A, 0x30, 0x66, 0x3A, 0x34, 0x31, 0x3A, 0x66, 0x62, + 0x3A, 0x38, 0x66, 0x3A, 0x32, 0x64, 0x3A, 0x33, 0x34, 0x3A, + 0x30, 0x61, 0x3A, 0x34, 0x31, 0x3A, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x34, 0x30, 0x3A, + 0x31, 0x39, 0x3A, 0x35, 0x65, 0x3A, 0x66, 0x62, 0x3A, 0x64, + 0x34, 0x3A, 0x31, 0x64, 0x3A, 0x31, 0x31, 0x3A, 0x61, 0x63, + 0x3A, 0x66, 0x61, 0x3A, 0x66, 0x35, 0x3A, 0x39, 0x33, 0x3A, + 0x33, 0x37, 0x3A, 0x63, 0x36, 0x3A, 0x66, 0x61, 0x3A, 0x38, + 0x37, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x30, 0x38, 0x3A, 0x66, 0x37, 0x3A, 0x31, + 0x36, 0x3A, 0x31, 0x66, 0x3A, 0x32, 0x63, 0x3A, 0x63, 0x65, + 0x3A, 0x33, 0x30, 0x3A, 0x34, 0x30, 0x3A, 0x39, 0x64, 0x3A, + 0x34, 0x66, 0x3A, 0x61, 0x36, 0x3A, 0x32, 0x61, 0x3A, 0x30, + 0x61, 0x3A, 0x61, 0x31, 0x3A, 0x64, 0x36, 0x3A, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x39, + 0x35, 0x3A, 0x33, 0x33, 0x3A, 0x63, 0x33, 0x3A, 0x61, 0x36, + 0x3A, 0x30, 0x33, 0x3A, 0x39, 0x38, 0x3A, 0x65, 0x36, 0x3A, + 0x38, 0x64, 0x3A, 0x30, 0x35, 0x3A, 0x33, 0x34, 0x3A, 0x62, + 0x30, 0x3A, 0x39, 0x37, 0x3A, 0x30, 0x63, 0x3A, 0x64, 0x65, + 0x3A, 0x61, 0x34, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x37, 0x3A, 0x63, 0x66, + 0x3A, 0x35, 0x33, 0x3A, 0x38, 0x66, 0x3A, 0x64, 0x31, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x41, 0x53, 0x4E, 0x31, + 0x20, 0x4F, 0x49, 0x44, 0x3A, 0x20, 0x53, 0x4D, 0x32, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, 0x35, + 0x30, 0x39, 0x76, 0x33, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6E, + 0x73, 0x69, 0x6F, 0x6E, 0x73, 0x3A, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, + 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x53, 0x75, 0x62, 0x6A, + 0x65, 0x63, 0x74, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x49, 0x64, + 0x65, 0x6E, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3A, 0x20, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x36, 0x37, 0x3A, + 0x41, 0x45, 0x3A, 0x36, 0x30, 0x3A, 0x46, 0x46, 0x3A, 0x37, + 0x45, 0x3A, 0x31, 0x42, 0x3A, 0x30, 0x46, 0x3A, 0x39, 0x35, + 0x3A, 0x41, 0x45, 0x3A, 0x31, 0x46, 0x3A, 0x38, 0x32, 0x3A, + 0x35, 0x39, 0x3A, 0x46, 0x32, 0x3A, 0x36, 0x43, 0x3A, 0x35, + 0x36, 0x3A, 0x32, 0x44, 0x3A, 0x39, 0x33, 0x3A, 0x45, 0x46, + 0x3A, 0x31, 0x37, 0x3A, 0x33, 0x32, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, + 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x41, 0x75, 0x74, 0x68, + 0x6F, 0x72, 0x69, 0x74, 0x79, 0x20, 0x4B, 0x65, 0x79, 0x20, + 0x49, 0x64, 0x65, 0x6E, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x3A, 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x34, + 0x37, 0x3A, 0x30, 0x41, 0x3A, 0x34, 0x38, 0x3A, 0x37, 0x45, + 0x3A, 0x42, 0x42, 0x3A, 0x30, 0x32, 0x3A, 0x41, 0x38, 0x3A, + 0x35, 0x41, 0x3A, 0x32, 0x36, 0x3A, 0x35, 0x37, 0x3A, 0x32, + 0x42, 0x3A, 0x31, 0x39, 0x3A, 0x41, 0x39, 0x3A, 0x37, 0x42, + 0x3A, 0x36, 0x31, 0x3A, 0x38, 0x42, 0x3A, 0x37, 0x46, 0x3A, + 0x35, 0x44, 0x3A, 0x39, 0x39, 0x3A, 0x36, 0x45, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x42, 0x61, + 0x73, 0x69, 0x63, 0x20, 0x43, 0x6F, 0x6E, 0x73, 0x74, 0x72, + 0x61, 0x69, 0x6E, 0x74, 0x73, 0x3A, 0x20, 0x63, 0x72, 0x69, + 0x74, 0x69, 0x63, 0x61, 0x6C, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x43, 0x41, 0x3A, 0x46, 0x41, 0x4C, 0x53, 0x45, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, + 0x4B, 0x65, 0x79, 0x20, 0x55, 0x73, 0x61, 0x67, 0x65, 0x3A, + 0x20, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6C, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x69, 0x67, 0x69, + 0x74, 0x61, 0x6C, 0x20, 0x53, 0x69, 0x67, 0x6E, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x2C, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x45, + 0x6E, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x6D, 0x65, 0x6E, + 0x74, 0x2C, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x41, 0x67, 0x72, + 0x65, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, + 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x45, 0x78, 0x74, 0x65, + 0x6E, 0x64, 0x65, 0x64, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x55, + 0x73, 0x61, 0x67, 0x65, 0x3A, 0x20, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x54, 0x4C, 0x53, 0x20, 0x57, 0x65, 0x62, + 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x41, 0x75, + 0x74, 0x68, 0x65, 0x6E, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6F, 0x6E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x4E, 0x65, 0x74, 0x73, 0x63, + 0x61, 0x70, 0x65, 0x20, 0x43, 0x65, 0x72, 0x74, 0x20, 0x54, + 0x79, 0x70, 0x65, 0x3A, 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x53, 0x53, 0x4C, 0x20, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, 0x67, + 0x6E, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x41, 0x6C, 0x67, + 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x3A, 0x20, 0x53, 0x4D, + 0x32, 0x2D, 0x77, 0x69, 0x74, 0x68, 0x2D, 0x53, 0x4D, 0x33, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, 0x67, 0x6E, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x20, 0x56, 0x61, 0x6C, 0x75, 0x65, + 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x33, 0x30, 0x3A, 0x34, 0x35, 0x3A, 0x30, 0x32, 0x3A, 0x32, + 0x30, 0x3A, 0x31, 0x62, 0x3A, 0x63, 0x61, 0x3A, 0x39, 0x34, + 0x3A, 0x32, 0x38, 0x3A, 0x37, 0x66, 0x3A, 0x66, 0x36, 0x3A, + 0x62, 0x32, 0x3A, 0x30, 0x64, 0x3A, 0x33, 0x31, 0x3A, 0x34, + 0x33, 0x3A, 0x35, 0x30, 0x3A, 0x65, 0x31, 0x3A, 0x64, 0x35, + 0x3A, 0x33, 0x34, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x31, 0x37, 0x3A, 0x64, 0x64, 0x3A, 0x61, + 0x66, 0x3A, 0x33, 0x61, 0x3A, 0x64, 0x65, 0x3A, 0x38, 0x31, + 0x3A, 0x30, 0x36, 0x3A, 0x36, 0x37, 0x3A, 0x39, 0x61, 0x3A, + 0x62, 0x33, 0x3A, 0x30, 0x36, 0x3A, 0x32, 0x32, 0x3A, 0x37, + 0x65, 0x3A, 0x36, 0x34, 0x3A, 0x65, 0x63, 0x3A, 0x66, 0x64, + 0x3A, 0x30, 0x65, 0x3A, 0x62, 0x39, 0x3A, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x32, 0x3A, 0x32, + 0x31, 0x3A, 0x30, 0x30, 0x3A, 0x61, 0x31, 0x3A, 0x34, 0x38, + 0x3A, 0x61, 0x38, 0x3A, 0x33, 0x32, 0x3A, 0x64, 0x31, 0x3A, + 0x30, 0x35, 0x3A, 0x30, 0x39, 0x3A, 0x36, 0x62, 0x3A, 0x31, + 0x63, 0x3A, 0x65, 0x62, 0x3A, 0x38, 0x39, 0x3A, 0x31, 0x32, + 0x3A, 0x36, 0x36, 0x3A, 0x64, 0x38, 0x3A, 0x33, 0x38, 0x3A, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, + 0x31, 0x3A, 0x63, 0x34, 0x3A, 0x35, 0x63, 0x3A, 0x38, 0x39, + 0x3A, 0x30, 0x39, 0x3A, 0x30, 0x66, 0x3A, 0x66, 0x64, 0x3A, + 0x65, 0x39, 0x3A, 0x63, 0x30, 0x3A, 0x33, 0x62, 0x3A, 0x31, + 0x64, 0x3A, 0x66, 0x62, 0x3A, 0x63, 0x64, 0x3A, 0x62, 0x35, + 0x3A, 0x34, 0x63, 0x3A, 0x33, 0x31, 0x3A, 0x36, 0x38, 0x0A, + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, + 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, + 0x54, 0x45, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x49, + 0x49, 0x43, 0x32, 0x44, 0x43, 0x43, 0x41, 0x6E, 0x36, 0x67, + 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x42, 0x41, 0x54, + 0x41, 0x4B, 0x42, 0x67, 0x67, 0x71, 0x67, 0x52, 0x7A, 0x50, + 0x56, 0x51, 0x47, 0x44, 0x64, 0x54, 0x43, 0x42, 0x72, 0x44, + 0x45, 0x4C, 0x4D, 0x41, 0x6B, 0x47, 0x41, 0x31, 0x55, 0x45, + 0x42, 0x68, 0x4D, 0x43, 0x56, 0x56, 0x4D, 0x78, 0x45, 0x44, + 0x41, 0x4F, 0x0A, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x67, + 0x4D, 0x42, 0x30, 0x31, 0x76, 0x62, 0x6E, 0x52, 0x68, 0x62, + 0x6D, 0x45, 0x78, 0x45, 0x44, 0x41, 0x4F, 0x42, 0x67, 0x4E, + 0x56, 0x42, 0x41, 0x63, 0x4D, 0x42, 0x30, 0x4A, 0x76, 0x65, + 0x6D, 0x56, 0x74, 0x59, 0x57, 0x34, 0x78, 0x46, 0x44, 0x41, + 0x53, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x6F, 0x4D, 0x43, + 0x33, 0x64, 0x76, 0x62, 0x47, 0x5A, 0x54, 0x0A, 0x55, 0x30, + 0x78, 0x66, 0x63, 0x32, 0x30, 0x79, 0x4D, 0x51, 0x38, 0x77, + 0x44, 0x51, 0x59, 0x44, 0x56, 0x51, 0x51, 0x4C, 0x44, 0x41, + 0x5A, 0x44, 0x51, 0x53, 0x31, 0x7A, 0x62, 0x54, 0x49, 0x78, + 0x47, 0x44, 0x41, 0x57, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, + 0x4D, 0x4D, 0x44, 0x33, 0x64, 0x33, 0x64, 0x79, 0x35, 0x33, + 0x62, 0x32, 0x78, 0x6D, 0x63, 0x33, 0x4E, 0x73, 0x4C, 0x6D, + 0x4E, 0x76, 0x0A, 0x62, 0x54, 0x45, 0x66, 0x4D, 0x42, 0x30, + 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, + 0x51, 0x45, 0x4A, 0x41, 0x52, 0x59, 0x51, 0x61, 0x57, 0x35, + 0x6D, 0x62, 0x30, 0x42, 0x33, 0x62, 0x32, 0x78, 0x6D, 0x63, + 0x33, 0x4E, 0x73, 0x4C, 0x6D, 0x4E, 0x76, 0x62, 0x54, 0x45, + 0x58, 0x4D, 0x42, 0x55, 0x47, 0x43, 0x67, 0x6D, 0x53, 0x4A, + 0x6F, 0x6D, 0x54, 0x38, 0x69, 0x78, 0x6B, 0x0A, 0x41, 0x51, + 0x45, 0x4D, 0x42, 0x33, 0x64, 0x76, 0x62, 0x47, 0x5A, 0x54, + 0x55, 0x30, 0x77, 0x77, 0x48, 0x68, 0x63, 0x4E, 0x4D, 0x6A, + 0x4D, 0x77, 0x4D, 0x6A, 0x45, 0x31, 0x4D, 0x44, 0x59, 0x79, + 0x4D, 0x7A, 0x41, 0x33, 0x57, 0x68, 0x63, 0x4E, 0x4D, 0x6A, + 0x55, 0x78, 0x4D, 0x54, 0x45, 0x78, 0x4D, 0x44, 0x59, 0x79, + 0x4D, 0x7A, 0x41, 0x33, 0x57, 0x6A, 0x43, 0x42, 0x73, 0x44, + 0x45, 0x4C, 0x0A, 0x4D, 0x41, 0x6B, 0x47, 0x41, 0x31, 0x55, + 0x45, 0x42, 0x68, 0x4D, 0x43, 0x56, 0x56, 0x4D, 0x78, 0x45, + 0x44, 0x41, 0x4F, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x67, + 0x4D, 0x42, 0x30, 0x31, 0x76, 0x62, 0x6E, 0x52, 0x68, 0x62, + 0x6D, 0x45, 0x78, 0x45, 0x44, 0x41, 0x4F, 0x42, 0x67, 0x4E, + 0x56, 0x42, 0x41, 0x63, 0x4D, 0x42, 0x30, 0x4A, 0x76, 0x65, + 0x6D, 0x56, 0x74, 0x59, 0x57, 0x34, 0x78, 0x0A, 0x46, 0x44, + 0x41, 0x53, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x6F, 0x4D, + 0x43, 0x33, 0x64, 0x76, 0x62, 0x47, 0x5A, 0x54, 0x55, 0x30, + 0x78, 0x66, 0x63, 0x32, 0x30, 0x79, 0x4D, 0x52, 0x4D, 0x77, + 0x45, 0x51, 0x59, 0x44, 0x56, 0x51, 0x51, 0x4C, 0x44, 0x41, + 0x70, 0x54, 0x5A, 0x58, 0x4A, 0x32, 0x5A, 0x58, 0x49, 0x74, + 0x63, 0x32, 0x30, 0x79, 0x4D, 0x52, 0x67, 0x77, 0x46, 0x67, + 0x59, 0x44, 0x0A, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x39, + 0x33, 0x64, 0x33, 0x63, 0x75, 0x64, 0x32, 0x39, 0x73, 0x5A, + 0x6E, 0x4E, 0x7A, 0x62, 0x43, 0x35, 0x6A, 0x62, 0x32, 0x30, + 0x78, 0x48, 0x7A, 0x41, 0x64, 0x42, 0x67, 0x6B, 0x71, 0x68, + 0x6B, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x43, 0x51, 0x45, + 0x57, 0x45, 0x47, 0x6C, 0x75, 0x5A, 0x6D, 0x39, 0x41, 0x64, + 0x32, 0x39, 0x73, 0x5A, 0x6E, 0x4E, 0x7A, 0x0A, 0x62, 0x43, + 0x35, 0x6A, 0x62, 0x32, 0x30, 0x78, 0x46, 0x7A, 0x41, 0x56, + 0x42, 0x67, 0x6F, 0x4A, 0x6B, 0x69, 0x61, 0x4A, 0x6B, 0x2F, + 0x49, 0x73, 0x5A, 0x41, 0x45, 0x42, 0x44, 0x41, 0x64, 0x33, + 0x62, 0x32, 0x78, 0x6D, 0x55, 0x31, 0x4E, 0x4D, 0x4D, 0x46, + 0x6F, 0x77, 0x46, 0x41, 0x59, 0x49, 0x4B, 0x6F, 0x45, 0x63, + 0x7A, 0x31, 0x55, 0x42, 0x67, 0x69, 0x30, 0x47, 0x43, 0x43, + 0x71, 0x42, 0x0A, 0x48, 0x4D, 0x39, 0x56, 0x41, 0x59, 0x49, + 0x74, 0x41, 0x30, 0x49, 0x41, 0x42, 0x4A, 0x52, 0x77, 0x4B, + 0x30, 0x62, 0x6B, 0x58, 0x67, 0x39, 0x42, 0x2B, 0x34, 0x38, + 0x74, 0x4E, 0x41, 0x70, 0x42, 0x51, 0x42, 0x6C, 0x65, 0x2B, + 0x39, 0x51, 0x64, 0x45, 0x61, 0x7A, 0x36, 0x39, 0x5A, 0x4D, + 0x33, 0x78, 0x76, 0x71, 0x48, 0x43, 0x50, 0x63, 0x57, 0x48, + 0x79, 0x7A, 0x4F, 0x4D, 0x45, 0x43, 0x64, 0x0A, 0x54, 0x36, + 0x59, 0x71, 0x43, 0x71, 0x48, 0x57, 0x6C, 0x54, 0x50, 0x44, + 0x70, 0x67, 0x4F, 0x59, 0x35, 0x6F, 0x30, 0x46, 0x4E, 0x4C, + 0x43, 0x58, 0x44, 0x4E, 0x36, 0x6B, 0x78, 0x38, 0x39, 0x54, + 0x6A, 0x39, 0x47, 0x6A, 0x67, 0x59, 0x6B, 0x77, 0x67, 0x59, + 0x59, 0x77, 0x48, 0x51, 0x59, 0x44, 0x56, 0x52, 0x30, 0x4F, + 0x42, 0x42, 0x59, 0x45, 0x46, 0x47, 0x65, 0x75, 0x59, 0x50, + 0x39, 0x2B, 0x0A, 0x47, 0x77, 0x2B, 0x56, 0x72, 0x68, 0x2B, + 0x43, 0x57, 0x66, 0x4A, 0x73, 0x56, 0x69, 0x32, 0x54, 0x37, + 0x78, 0x63, 0x79, 0x4D, 0x42, 0x38, 0x47, 0x41, 0x31, 0x55, + 0x64, 0x49, 0x77, 0x51, 0x59, 0x4D, 0x42, 0x61, 0x41, 0x46, + 0x45, 0x63, 0x4B, 0x53, 0x48, 0x36, 0x37, 0x41, 0x71, 0x68, + 0x61, 0x4A, 0x6C, 0x63, 0x72, 0x47, 0x61, 0x6C, 0x37, 0x59, + 0x59, 0x74, 0x2F, 0x58, 0x5A, 0x6C, 0x75, 0x0A, 0x4D, 0x41, + 0x77, 0x47, 0x41, 0x31, 0x55, 0x64, 0x45, 0x77, 0x45, 0x42, + 0x2F, 0x77, 0x51, 0x43, 0x4D, 0x41, 0x41, 0x77, 0x44, 0x67, + 0x59, 0x44, 0x56, 0x52, 0x30, 0x50, 0x41, 0x51, 0x48, 0x2F, + 0x42, 0x41, 0x51, 0x44, 0x41, 0x67, 0x4F, 0x6F, 0x4D, 0x42, + 0x4D, 0x47, 0x41, 0x31, 0x55, 0x64, 0x4A, 0x51, 0x51, 0x4D, + 0x4D, 0x41, 0x6F, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, + 0x55, 0x46, 0x0A, 0x42, 0x77, 0x4D, 0x42, 0x4D, 0x42, 0x45, + 0x47, 0x43, 0x57, 0x43, 0x47, 0x53, 0x41, 0x47, 0x47, 0x2B, + 0x45, 0x49, 0x42, 0x41, 0x51, 0x51, 0x45, 0x41, 0x77, 0x49, + 0x47, 0x51, 0x44, 0x41, 0x4B, 0x42, 0x67, 0x67, 0x71, 0x67, + 0x52, 0x7A, 0x50, 0x56, 0x51, 0x47, 0x44, 0x64, 0x51, 0x4E, + 0x49, 0x41, 0x44, 0x42, 0x46, 0x41, 0x69, 0x41, 0x62, 0x79, + 0x70, 0x51, 0x6F, 0x66, 0x2F, 0x61, 0x79, 0x0A, 0x44, 0x54, + 0x46, 0x44, 0x55, 0x4F, 0x48, 0x56, 0x4E, 0x42, 0x66, 0x64, + 0x72, 0x7A, 0x72, 0x65, 0x67, 0x51, 0x5A, 0x6E, 0x6D, 0x72, + 0x4D, 0x47, 0x49, 0x6E, 0x35, 0x6B, 0x37, 0x50, 0x30, 0x4F, + 0x75, 0x51, 0x49, 0x68, 0x41, 0x4B, 0x46, 0x49, 0x71, 0x44, + 0x4C, 0x52, 0x42, 0x51, 0x6C, 0x72, 0x48, 0x4F, 0x75, 0x4A, + 0x45, 0x6D, 0x62, 0x59, 0x4F, 0x4B, 0x48, 0x45, 0x58, 0x49, + 0x6B, 0x4A, 0x0A, 0x44, 0x2F, 0x33, 0x70, 0x77, 0x44, 0x73, + 0x64, 0x2B, 0x38, 0x32, 0x31, 0x54, 0x44, 0x46, 0x6F, 0x0A, + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x45, 0x4E, 0x44, 0x20, 0x43, + 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x43, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x3A, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x44, 0x61, 0x74, 0x61, 0x3A, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6F, 0x6E, 0x3A, 0x20, 0x33, 0x20, 0x28, 0x30, + 0x78, 0x32, 0x29, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6C, 0x20, 0x4E, + 0x75, 0x6D, 0x62, 0x65, 0x72, 0x3A, 0x20, 0x31, 0x20, 0x28, + 0x30, 0x78, 0x31, 0x29, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x53, 0x69, 0x67, 0x6E, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x20, 0x41, 0x6C, 0x67, 0x6F, 0x72, 0x69, 0x74, + 0x68, 0x6D, 0x3A, 0x20, 0x53, 0x4D, 0x32, 0x2D, 0x77, 0x69, + 0x74, 0x68, 0x2D, 0x53, 0x4D, 0x33, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x49, 0x73, 0x73, 0x75, 0x65, + 0x72, 0x3A, 0x20, 0x43, 0x20, 0x3D, 0x20, 0x55, 0x53, 0x2C, + 0x20, 0x53, 0x54, 0x20, 0x3D, 0x20, 0x4D, 0x6F, 0x6E, 0x74, + 0x61, 0x6E, 0x61, 0x2C, 0x20, 0x4C, 0x20, 0x3D, 0x20, 0x42, + 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, 0x2C, 0x20, 0x4F, 0x20, + 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, + 0x53, 0x4D, 0x32, 0x2C, 0x20, 0x4F, 0x55, 0x20, 0x3D, 0x20, + 0x52, 0x6F, 0x6F, 0x74, 0x2D, 0x53, 0x4D, 0x32, 0x2C, 0x20, + 0x43, 0x4E, 0x20, 0x3D, 0x20, 0x77, 0x77, 0x77, 0x2E, 0x77, + 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, + 0x2C, 0x20, 0x65, 0x6D, 0x61, 0x69, 0x6C, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x20, 0x3D, 0x20, 0x69, 0x6E, 0x66, + 0x6F, 0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, + 0x63, 0x6F, 0x6D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x56, 0x61, 0x6C, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x4E, 0x6F, 0x74, 0x20, 0x42, 0x65, 0x66, + 0x6F, 0x72, 0x65, 0x3A, 0x20, 0x46, 0x65, 0x62, 0x20, 0x31, + 0x35, 0x20, 0x30, 0x36, 0x3A, 0x32, 0x33, 0x3A, 0x30, 0x37, + 0x20, 0x32, 0x30, 0x32, 0x33, 0x20, 0x47, 0x4D, 0x54, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x4E, 0x6F, 0x74, 0x20, 0x41, 0x66, 0x74, 0x65, + 0x72, 0x20, 0x3A, 0x20, 0x4E, 0x6F, 0x76, 0x20, 0x31, 0x31, + 0x20, 0x30, 0x36, 0x3A, 0x32, 0x33, 0x3A, 0x30, 0x37, 0x20, + 0x32, 0x30, 0x32, 0x35, 0x20, 0x47, 0x4D, 0x54, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x75, 0x62, + 0x6A, 0x65, 0x63, 0x74, 0x3A, 0x20, 0x43, 0x20, 0x3D, 0x20, + 0x55, 0x53, 0x2C, 0x20, 0x53, 0x54, 0x20, 0x3D, 0x20, 0x4D, + 0x6F, 0x6E, 0x74, 0x61, 0x6E, 0x61, 0x2C, 0x20, 0x4C, 0x20, + 0x3D, 0x20, 0x42, 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, 0x2C, + 0x20, 0x4F, 0x20, 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x53, + 0x53, 0x4C, 0x5F, 0x73, 0x6D, 0x32, 0x2C, 0x20, 0x4F, 0x55, + 0x20, 0x3D, 0x20, 0x43, 0x41, 0x2D, 0x73, 0x6D, 0x32, 0x2C, + 0x20, 0x43, 0x4E, 0x20, 0x3D, 0x20, 0x77, 0x77, 0x77, 0x2E, + 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, + 0x6D, 0x2C, 0x20, 0x65, 0x6D, 0x61, 0x69, 0x6C, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3D, 0x20, 0x69, 0x6E, + 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, + 0x2E, 0x63, 0x6F, 0x6D, 0x2C, 0x20, 0x55, 0x49, 0x44, 0x20, + 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x75, + 0x62, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x50, 0x75, 0x62, 0x6C, + 0x69, 0x63, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x49, 0x6E, 0x66, + 0x6F, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x75, 0x62, 0x6C, 0x69, + 0x63, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x41, 0x6C, 0x67, 0x6F, + 0x72, 0x69, 0x74, 0x68, 0x6D, 0x3A, 0x20, 0x73, 0x6D, 0x32, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x75, 0x62, + 0x6C, 0x69, 0x63, 0x2D, 0x4B, 0x65, 0x79, 0x3A, 0x20, 0x28, + 0x32, 0x35, 0x36, 0x20, 0x62, 0x69, 0x74, 0x29, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x75, 0x62, 0x3A, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x30, 0x34, 0x3A, 0x32, 0x31, 0x3A, 0x39, 0x32, 0x3A, 0x66, + 0x37, 0x3A, 0x63, 0x62, 0x3A, 0x32, 0x34, 0x3A, 0x64, 0x66, + 0x3A, 0x36, 0x34, 0x3A, 0x34, 0x64, 0x3A, 0x62, 0x61, 0x3A, + 0x61, 0x62, 0x3A, 0x36, 0x36, 0x3A, 0x37, 0x62, 0x3A, 0x38, + 0x33, 0x3A, 0x37, 0x35, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x39, 0x3A, 0x32, + 0x39, 0x3A, 0x65, 0x37, 0x3A, 0x66, 0x66, 0x3A, 0x36, 0x34, + 0x3A, 0x36, 0x33, 0x3A, 0x62, 0x36, 0x3A, 0x64, 0x35, 0x3A, + 0x34, 0x32, 0x3A, 0x38, 0x30, 0x3A, 0x32, 0x30, 0x3A, 0x62, + 0x64, 0x3A, 0x65, 0x32, 0x3A, 0x65, 0x32, 0x3A, 0x30, 0x32, + 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x31, 0x32, 0x3A, 0x33, 0x62, 0x3A, 0x38, 0x65, + 0x3A, 0x62, 0x34, 0x3A, 0x30, 0x30, 0x3A, 0x39, 0x35, 0x3A, + 0x30, 0x39, 0x3A, 0x38, 0x30, 0x3A, 0x63, 0x62, 0x3A, 0x35, + 0x36, 0x3A, 0x65, 0x64, 0x3A, 0x34, 0x62, 0x3A, 0x63, 0x61, + 0x3A, 0x38, 0x64, 0x3A, 0x35, 0x37, 0x3A, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x36, + 0x3A, 0x61, 0x65, 0x3A, 0x30, 0x35, 0x3A, 0x64, 0x33, 0x3A, + 0x37, 0x36, 0x3A, 0x32, 0x37, 0x3A, 0x36, 0x33, 0x3A, 0x37, + 0x31, 0x3A, 0x33, 0x39, 0x3A, 0x38, 0x39, 0x3A, 0x62, 0x37, + 0x3A, 0x36, 0x39, 0x3A, 0x65, 0x36, 0x3A, 0x34, 0x38, 0x3A, + 0x38, 0x30, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x61, 0x65, 0x3A, 0x64, 0x31, 0x3A, + 0x61, 0x39, 0x3A, 0x34, 0x38, 0x3A, 0x31, 0x32, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x41, 0x53, 0x4E, 0x31, 0x20, + 0x4F, 0x49, 0x44, 0x3A, 0x20, 0x53, 0x4D, 0x32, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, 0x35, 0x30, + 0x39, 0x76, 0x33, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6E, 0x73, + 0x69, 0x6F, 0x6E, 0x73, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, 0x35, + 0x30, 0x39, 0x76, 0x33, 0x20, 0x53, 0x75, 0x62, 0x6A, 0x65, + 0x63, 0x74, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x49, 0x64, 0x65, + 0x6E, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3A, 0x20, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x34, 0x37, 0x3A, 0x30, + 0x41, 0x3A, 0x34, 0x38, 0x3A, 0x37, 0x45, 0x3A, 0x42, 0x42, + 0x3A, 0x30, 0x32, 0x3A, 0x41, 0x38, 0x3A, 0x35, 0x41, 0x3A, + 0x32, 0x36, 0x3A, 0x35, 0x37, 0x3A, 0x32, 0x42, 0x3A, 0x31, + 0x39, 0x3A, 0x41, 0x39, 0x3A, 0x37, 0x42, 0x3A, 0x36, 0x31, + 0x3A, 0x38, 0x42, 0x3A, 0x37, 0x46, 0x3A, 0x35, 0x44, 0x3A, + 0x39, 0x39, 0x3A, 0x36, 0x45, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, 0x35, + 0x30, 0x39, 0x76, 0x33, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6F, + 0x72, 0x69, 0x74, 0x79, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x49, + 0x64, 0x65, 0x6E, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3A, + 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x33, 0x34, + 0x3A, 0x31, 0x44, 0x3A, 0x37, 0x39, 0x3A, 0x34, 0x34, 0x3A, + 0x31, 0x35, 0x3A, 0x37, 0x39, 0x3A, 0x41, 0x31, 0x3A, 0x42, + 0x31, 0x3A, 0x36, 0x33, 0x3A, 0x39, 0x39, 0x3A, 0x45, 0x33, + 0x3A, 0x45, 0x44, 0x3A, 0x36, 0x35, 0x3A, 0x37, 0x43, 0x3A, + 0x36, 0x34, 0x3A, 0x38, 0x39, 0x3A, 0x38, 0x30, 0x3A, 0x46, + 0x46, 0x3A, 0x42, 0x38, 0x3A, 0x45, 0x43, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x42, 0x61, 0x73, + 0x69, 0x63, 0x20, 0x43, 0x6F, 0x6E, 0x73, 0x74, 0x72, 0x61, + 0x69, 0x6E, 0x74, 0x73, 0x3A, 0x20, 0x63, 0x72, 0x69, 0x74, + 0x69, 0x63, 0x61, 0x6C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x43, 0x41, 0x3A, 0x54, 0x52, 0x55, 0x45, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x4B, 0x65, + 0x79, 0x20, 0x55, 0x73, 0x61, 0x67, 0x65, 0x3A, 0x20, 0x63, + 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6C, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, + 0x6C, 0x20, 0x53, 0x69, 0x67, 0x6E, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x2C, 0x20, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x20, 0x53, 0x69, 0x67, 0x6E, 0x2C, + 0x20, 0x43, 0x52, 0x4C, 0x20, 0x53, 0x69, 0x67, 0x6E, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, 0x67, 0x6E, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x20, 0x41, 0x6C, 0x67, 0x6F, 0x72, 0x69, + 0x74, 0x68, 0x6D, 0x3A, 0x20, 0x53, 0x4D, 0x32, 0x2D, 0x77, + 0x69, 0x74, 0x68, 0x2D, 0x53, 0x4D, 0x33, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x53, 0x69, 0x67, 0x6E, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x20, 0x56, 0x61, 0x6C, 0x75, 0x65, 0x3A, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x33, 0x30, 0x3A, + 0x34, 0x35, 0x3A, 0x30, 0x32, 0x3A, 0x32, 0x30, 0x3A, 0x34, + 0x37, 0x3A, 0x34, 0x65, 0x3A, 0x30, 0x30, 0x3A, 0x30, 0x33, + 0x3A, 0x61, 0x62, 0x3A, 0x33, 0x34, 0x3A, 0x61, 0x31, 0x3A, + 0x61, 0x66, 0x3A, 0x35, 0x39, 0x3A, 0x33, 0x39, 0x3A, 0x38, + 0x66, 0x3A, 0x36, 0x30, 0x3A, 0x33, 0x36, 0x3A, 0x62, 0x66, + 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x38, 0x39, 0x3A, 0x38, 0x38, 0x3A, 0x34, 0x32, 0x3A, 0x34, + 0x31, 0x3A, 0x32, 0x37, 0x3A, 0x63, 0x31, 0x3A, 0x64, 0x64, + 0x3A, 0x35, 0x37, 0x3A, 0x63, 0x39, 0x3A, 0x37, 0x39, 0x3A, + 0x63, 0x62, 0x3A, 0x31, 0x66, 0x3A, 0x35, 0x36, 0x3A, 0x35, + 0x63, 0x3A, 0x31, 0x36, 0x3A, 0x62, 0x35, 0x3A, 0x32, 0x38, + 0x3A, 0x62, 0x64, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x30, 0x32, 0x3A, 0x32, 0x31, 0x3A, 0x30, + 0x30, 0x3A, 0x38, 0x62, 0x3A, 0x32, 0x65, 0x3A, 0x32, 0x35, + 0x3A, 0x65, 0x62, 0x3A, 0x32, 0x31, 0x3A, 0x39, 0x62, 0x3A, + 0x61, 0x39, 0x3A, 0x32, 0x62, 0x3A, 0x61, 0x36, 0x3A, 0x36, + 0x61, 0x3A, 0x35, 0x62, 0x3A, 0x64, 0x62, 0x3A, 0x61, 0x37, + 0x3A, 0x63, 0x37, 0x3A, 0x32, 0x62, 0x3A, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x31, 0x3A, 0x64, + 0x66, 0x3A, 0x37, 0x33, 0x3A, 0x31, 0x35, 0x3A, 0x61, 0x64, + 0x3A, 0x65, 0x34, 0x3A, 0x63, 0x35, 0x3A, 0x63, 0x33, 0x3A, + 0x63, 0x32, 0x3A, 0x66, 0x33, 0x3A, 0x62, 0x34, 0x3A, 0x62, + 0x34, 0x3A, 0x36, 0x37, 0x3A, 0x61, 0x66, 0x3A, 0x64, 0x37, + 0x3A, 0x35, 0x31, 0x3A, 0x31, 0x63, 0x0A, 0x2D, 0x2D, 0x2D, + 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, 0x20, 0x43, 0x45, + 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2D, + 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x49, 0x49, 0x43, 0x6C, + 0x6A, 0x43, 0x43, 0x41, 0x6A, 0x79, 0x67, 0x41, 0x77, 0x49, + 0x42, 0x41, 0x67, 0x49, 0x42, 0x41, 0x54, 0x41, 0x4B, 0x42, + 0x67, 0x67, 0x71, 0x67, 0x52, 0x7A, 0x50, 0x56, 0x51, 0x47, + 0x44, 0x64, 0x54, 0x43, 0x42, 0x6C, 0x54, 0x45, 0x4C, 0x4D, + 0x41, 0x6B, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4D, + 0x43, 0x56, 0x56, 0x4D, 0x78, 0x45, 0x44, 0x41, 0x4F, 0x0A, + 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x67, 0x4D, 0x42, 0x30, + 0x31, 0x76, 0x62, 0x6E, 0x52, 0x68, 0x62, 0x6D, 0x45, 0x78, + 0x45, 0x44, 0x41, 0x4F, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, + 0x63, 0x4D, 0x42, 0x30, 0x4A, 0x76, 0x65, 0x6D, 0x56, 0x74, + 0x59, 0x57, 0x34, 0x78, 0x46, 0x44, 0x41, 0x53, 0x42, 0x67, + 0x4E, 0x56, 0x42, 0x41, 0x6F, 0x4D, 0x43, 0x33, 0x64, 0x76, + 0x62, 0x47, 0x5A, 0x54, 0x0A, 0x55, 0x30, 0x78, 0x66, 0x55, + 0x30, 0x30, 0x79, 0x4D, 0x52, 0x45, 0x77, 0x44, 0x77, 0x59, + 0x44, 0x56, 0x51, 0x51, 0x4C, 0x44, 0x41, 0x68, 0x53, 0x62, + 0x32, 0x39, 0x30, 0x4C, 0x56, 0x4E, 0x4E, 0x4D, 0x6A, 0x45, + 0x59, 0x4D, 0x42, 0x59, 0x47, 0x41, 0x31, 0x55, 0x45, 0x41, + 0x77, 0x77, 0x50, 0x64, 0x33, 0x64, 0x33, 0x4C, 0x6E, 0x64, + 0x76, 0x62, 0x47, 0x5A, 0x7A, 0x63, 0x32, 0x77, 0x75, 0x0A, + 0x59, 0x32, 0x39, 0x74, 0x4D, 0x52, 0x38, 0x77, 0x48, 0x51, + 0x59, 0x4A, 0x4B, 0x6F, 0x5A, 0x49, 0x68, 0x76, 0x63, 0x4E, + 0x41, 0x51, 0x6B, 0x42, 0x46, 0x68, 0x42, 0x70, 0x62, 0x6D, + 0x5A, 0x76, 0x51, 0x48, 0x64, 0x76, 0x62, 0x47, 0x5A, 0x7A, + 0x63, 0x32, 0x77, 0x75, 0x59, 0x32, 0x39, 0x74, 0x4D, 0x42, + 0x34, 0x58, 0x44, 0x54, 0x49, 0x7A, 0x4D, 0x44, 0x49, 0x78, + 0x4E, 0x54, 0x41, 0x32, 0x0A, 0x4D, 0x6A, 0x4D, 0x77, 0x4E, + 0x31, 0x6F, 0x58, 0x44, 0x54, 0x49, 0x31, 0x4D, 0x54, 0x45, + 0x78, 0x4D, 0x54, 0x41, 0x32, 0x4D, 0x6A, 0x4D, 0x77, 0x4E, + 0x31, 0x6F, 0x77, 0x67, 0x61, 0x77, 0x78, 0x43, 0x7A, 0x41, + 0x4A, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x59, 0x54, 0x41, + 0x6C, 0x56, 0x54, 0x4D, 0x52, 0x41, 0x77, 0x44, 0x67, 0x59, + 0x44, 0x56, 0x51, 0x51, 0x49, 0x44, 0x41, 0x64, 0x4E, 0x0A, + 0x62, 0x32, 0x35, 0x30, 0x59, 0x57, 0x35, 0x68, 0x4D, 0x52, + 0x41, 0x77, 0x44, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x48, + 0x44, 0x41, 0x64, 0x43, 0x62, 0x33, 0x70, 0x6C, 0x62, 0x57, + 0x46, 0x75, 0x4D, 0x52, 0x51, 0x77, 0x45, 0x67, 0x59, 0x44, + 0x56, 0x51, 0x51, 0x4B, 0x44, 0x41, 0x74, 0x33, 0x62, 0x32, + 0x78, 0x6D, 0x55, 0x31, 0x4E, 0x4D, 0x58, 0x33, 0x4E, 0x74, + 0x4D, 0x6A, 0x45, 0x50, 0x0A, 0x4D, 0x41, 0x30, 0x47, 0x41, + 0x31, 0x55, 0x45, 0x43, 0x77, 0x77, 0x47, 0x51, 0x30, 0x45, + 0x74, 0x63, 0x32, 0x30, 0x79, 0x4D, 0x52, 0x67, 0x77, 0x46, + 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x39, + 0x33, 0x64, 0x33, 0x63, 0x75, 0x64, 0x32, 0x39, 0x73, 0x5A, + 0x6E, 0x4E, 0x7A, 0x62, 0x43, 0x35, 0x6A, 0x62, 0x32, 0x30, + 0x78, 0x48, 0x7A, 0x41, 0x64, 0x42, 0x67, 0x6B, 0x71, 0x0A, + 0x68, 0x6B, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x43, 0x51, + 0x45, 0x57, 0x45, 0x47, 0x6C, 0x75, 0x5A, 0x6D, 0x39, 0x41, + 0x64, 0x32, 0x39, 0x73, 0x5A, 0x6E, 0x4E, 0x7A, 0x62, 0x43, + 0x35, 0x6A, 0x62, 0x32, 0x30, 0x78, 0x46, 0x7A, 0x41, 0x56, + 0x42, 0x67, 0x6F, 0x4A, 0x6B, 0x69, 0x61, 0x4A, 0x6B, 0x2F, + 0x49, 0x73, 0x5A, 0x41, 0x45, 0x42, 0x44, 0x41, 0x64, 0x33, + 0x62, 0x32, 0x78, 0x6D, 0x0A, 0x55, 0x31, 0x4E, 0x4D, 0x4D, + 0x46, 0x6F, 0x77, 0x46, 0x41, 0x59, 0x49, 0x4B, 0x6F, 0x45, + 0x63, 0x7A, 0x31, 0x55, 0x42, 0x67, 0x69, 0x30, 0x47, 0x43, + 0x43, 0x71, 0x42, 0x48, 0x4D, 0x39, 0x56, 0x41, 0x59, 0x49, + 0x74, 0x41, 0x30, 0x49, 0x41, 0x42, 0x43, 0x47, 0x53, 0x39, + 0x38, 0x73, 0x6B, 0x33, 0x32, 0x52, 0x4E, 0x75, 0x71, 0x74, + 0x6D, 0x65, 0x34, 0x4E, 0x31, 0x71, 0x53, 0x6E, 0x6E, 0x0A, + 0x2F, 0x32, 0x52, 0x6A, 0x74, 0x74, 0x56, 0x43, 0x67, 0x43, + 0x43, 0x39, 0x34, 0x75, 0x49, 0x43, 0x45, 0x6A, 0x75, 0x4F, + 0x74, 0x41, 0x43, 0x56, 0x43, 0x59, 0x44, 0x4C, 0x56, 0x75, + 0x31, 0x4C, 0x79, 0x6F, 0x31, 0x58, 0x35, 0x71, 0x34, 0x46, + 0x30, 0x33, 0x59, 0x6E, 0x59, 0x33, 0x45, 0x35, 0x69, 0x62, + 0x64, 0x70, 0x35, 0x6B, 0x69, 0x41, 0x72, 0x74, 0x47, 0x70, + 0x53, 0x42, 0x4B, 0x6A, 0x0A, 0x59, 0x7A, 0x42, 0x68, 0x4D, + 0x42, 0x30, 0x47, 0x41, 0x31, 0x55, 0x64, 0x44, 0x67, 0x51, + 0x57, 0x42, 0x42, 0x52, 0x48, 0x43, 0x6B, 0x68, 0x2B, 0x75, + 0x77, 0x4B, 0x6F, 0x57, 0x69, 0x5A, 0x58, 0x4B, 0x78, 0x6D, + 0x70, 0x65, 0x32, 0x47, 0x4C, 0x66, 0x31, 0x32, 0x5A, 0x62, + 0x6A, 0x41, 0x66, 0x42, 0x67, 0x4E, 0x56, 0x48, 0x53, 0x4D, + 0x45, 0x47, 0x44, 0x41, 0x57, 0x67, 0x42, 0x51, 0x30, 0x0A, + 0x48, 0x58, 0x6C, 0x45, 0x46, 0x58, 0x6D, 0x68, 0x73, 0x57, + 0x4F, 0x5A, 0x34, 0x2B, 0x31, 0x6C, 0x66, 0x47, 0x53, 0x4A, + 0x67, 0x50, 0x2B, 0x34, 0x37, 0x44, 0x41, 0x50, 0x42, 0x67, + 0x4E, 0x56, 0x48, 0x52, 0x4D, 0x42, 0x41, 0x66, 0x38, 0x45, + 0x42, 0x54, 0x41, 0x44, 0x41, 0x51, 0x48, 0x2F, 0x4D, 0x41, + 0x34, 0x47, 0x41, 0x31, 0x55, 0x64, 0x44, 0x77, 0x45, 0x42, + 0x2F, 0x77, 0x51, 0x45, 0x0A, 0x41, 0x77, 0x49, 0x42, 0x68, + 0x6A, 0x41, 0x4B, 0x42, 0x67, 0x67, 0x71, 0x67, 0x52, 0x7A, + 0x50, 0x56, 0x51, 0x47, 0x44, 0x64, 0x51, 0x4E, 0x49, 0x41, + 0x44, 0x42, 0x46, 0x41, 0x69, 0x42, 0x48, 0x54, 0x67, 0x41, + 0x44, 0x71, 0x7A, 0x53, 0x68, 0x72, 0x31, 0x6B, 0x35, 0x6A, + 0x32, 0x41, 0x32, 0x76, 0x34, 0x6D, 0x49, 0x51, 0x6B, 0x45, + 0x6E, 0x77, 0x64, 0x31, 0x58, 0x79, 0x58, 0x6E, 0x4C, 0x0A, + 0x48, 0x31, 0x5A, 0x63, 0x46, 0x72, 0x55, 0x6F, 0x76, 0x51, + 0x49, 0x68, 0x41, 0x49, 0x73, 0x75, 0x4A, 0x65, 0x73, 0x68, + 0x6D, 0x36, 0x6B, 0x72, 0x70, 0x6D, 0x70, 0x62, 0x32, 0x36, + 0x66, 0x48, 0x4B, 0x78, 0x48, 0x66, 0x63, 0x78, 0x57, 0x74, + 0x35, 0x4D, 0x58, 0x44, 0x77, 0x76, 0x4F, 0x30, 0x74, 0x47, + 0x65, 0x76, 0x31, 0x31, 0x45, 0x63, 0x0A, 0x2D, 0x2D, 0x2D, + 0x2D, 0x2D, 0x45, 0x4E, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, + 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2D, 0x2D, 0x2D, + 0x2D, 0x2D, 0x0A +}; +#define sizeof_server_sm2 (sizeof(server_sm2)) + +/* ./certs/sm2/server-sm2-cert.pem */ +static const unsigned char server_sm2_cert[] = +{ + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x44, 0x61, 0x74, + 0x61, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3A, 0x20, + 0x33, 0x20, 0x28, 0x30, 0x78, 0x32, 0x29, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x65, 0x72, 0x69, + 0x61, 0x6C, 0x20, 0x4E, 0x75, 0x6D, 0x62, 0x65, 0x72, 0x3A, + 0x20, 0x31, 0x20, 0x28, 0x30, 0x78, 0x31, 0x29, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, 0x67, + 0x6E, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x41, 0x6C, 0x67, + 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x3A, 0x20, 0x53, 0x4D, + 0x32, 0x2D, 0x77, 0x69, 0x74, 0x68, 0x2D, 0x53, 0x4D, 0x33, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x49, + 0x73, 0x73, 0x75, 0x65, 0x72, 0x3A, 0x20, 0x43, 0x20, 0x3D, + 0x20, 0x55, 0x53, 0x2C, 0x20, 0x53, 0x54, 0x20, 0x3D, 0x20, + 0x4D, 0x6F, 0x6E, 0x74, 0x61, 0x6E, 0x61, 0x2C, 0x20, 0x4C, + 0x20, 0x3D, 0x20, 0x42, 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, + 0x2C, 0x20, 0x4F, 0x20, 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, + 0x53, 0x53, 0x4C, 0x5F, 0x73, 0x6D, 0x32, 0x2C, 0x20, 0x4F, + 0x55, 0x20, 0x3D, 0x20, 0x43, 0x41, 0x2D, 0x73, 0x6D, 0x32, + 0x2C, 0x20, 0x43, 0x4E, 0x20, 0x3D, 0x20, 0x77, 0x77, 0x77, + 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, + 0x6F, 0x6D, 0x2C, 0x20, 0x65, 0x6D, 0x61, 0x69, 0x6C, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3D, 0x20, 0x69, + 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, + 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x2C, 0x20, 0x55, 0x49, 0x44, + 0x20, 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x56, + 0x61, 0x6C, 0x69, 0x64, 0x69, 0x74, 0x79, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x4E, 0x6F, 0x74, 0x20, 0x42, 0x65, 0x66, 0x6F, 0x72, 0x65, + 0x3A, 0x20, 0x46, 0x65, 0x62, 0x20, 0x31, 0x35, 0x20, 0x30, + 0x36, 0x3A, 0x32, 0x33, 0x3A, 0x30, 0x37, 0x20, 0x32, 0x30, + 0x32, 0x33, 0x20, 0x47, 0x4D, 0x54, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4E, + 0x6F, 0x74, 0x20, 0x41, 0x66, 0x74, 0x65, 0x72, 0x20, 0x3A, + 0x20, 0x4E, 0x6F, 0x76, 0x20, 0x31, 0x31, 0x20, 0x30, 0x36, + 0x3A, 0x32, 0x33, 0x3A, 0x30, 0x37, 0x20, 0x32, 0x30, 0x32, + 0x35, 0x20, 0x47, 0x4D, 0x54, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x53, 0x75, 0x62, 0x6A, 0x65, 0x63, + 0x74, 0x3A, 0x20, 0x43, 0x20, 0x3D, 0x20, 0x55, 0x53, 0x2C, + 0x20, 0x53, 0x54, 0x20, 0x3D, 0x20, 0x4D, 0x6F, 0x6E, 0x74, + 0x61, 0x6E, 0x61, 0x2C, 0x20, 0x4C, 0x20, 0x3D, 0x20, 0x42, + 0x6F, 0x7A, 0x65, 0x6D, 0x61, 0x6E, 0x2C, 0x20, 0x4F, 0x20, + 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, 0x5F, + 0x73, 0x6D, 0x32, 0x2C, 0x20, 0x4F, 0x55, 0x20, 0x3D, 0x20, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2D, 0x73, 0x6D, 0x32, + 0x2C, 0x20, 0x43, 0x4E, 0x20, 0x3D, 0x20, 0x77, 0x77, 0x77, + 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, + 0x6F, 0x6D, 0x2C, 0x20, 0x65, 0x6D, 0x61, 0x69, 0x6C, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3D, 0x20, 0x69, + 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, + 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x2C, 0x20, 0x55, 0x49, 0x44, + 0x20, 0x3D, 0x20, 0x77, 0x6F, 0x6C, 0x66, 0x53, 0x53, 0x4C, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, + 0x75, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x50, 0x75, 0x62, + 0x6C, 0x69, 0x63, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x49, 0x6E, + 0x66, 0x6F, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x75, 0x62, 0x6C, + 0x69, 0x63, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x41, 0x6C, 0x67, + 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x3A, 0x20, 0x73, 0x6D, + 0x32, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x75, + 0x62, 0x6C, 0x69, 0x63, 0x2D, 0x4B, 0x65, 0x79, 0x3A, 0x20, + 0x28, 0x32, 0x35, 0x36, 0x20, 0x62, 0x69, 0x74, 0x29, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x75, 0x62, 0x3A, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x30, 0x34, 0x3A, 0x39, 0x34, 0x3A, 0x37, 0x30, 0x3A, + 0x32, 0x62, 0x3A, 0x34, 0x36, 0x3A, 0x65, 0x34, 0x3A, 0x35, + 0x65, 0x3A, 0x30, 0x66, 0x3A, 0x34, 0x31, 0x3A, 0x66, 0x62, + 0x3A, 0x38, 0x66, 0x3A, 0x32, 0x64, 0x3A, 0x33, 0x34, 0x3A, + 0x30, 0x61, 0x3A, 0x34, 0x31, 0x3A, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x34, 0x30, 0x3A, + 0x31, 0x39, 0x3A, 0x35, 0x65, 0x3A, 0x66, 0x62, 0x3A, 0x64, + 0x34, 0x3A, 0x31, 0x64, 0x3A, 0x31, 0x31, 0x3A, 0x61, 0x63, + 0x3A, 0x66, 0x61, 0x3A, 0x66, 0x35, 0x3A, 0x39, 0x33, 0x3A, + 0x33, 0x37, 0x3A, 0x63, 0x36, 0x3A, 0x66, 0x61, 0x3A, 0x38, + 0x37, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x30, 0x38, 0x3A, 0x66, 0x37, 0x3A, 0x31, + 0x36, 0x3A, 0x31, 0x66, 0x3A, 0x32, 0x63, 0x3A, 0x63, 0x65, + 0x3A, 0x33, 0x30, 0x3A, 0x34, 0x30, 0x3A, 0x39, 0x64, 0x3A, + 0x34, 0x66, 0x3A, 0x61, 0x36, 0x3A, 0x32, 0x61, 0x3A, 0x30, + 0x61, 0x3A, 0x61, 0x31, 0x3A, 0x64, 0x36, 0x3A, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x39, + 0x35, 0x3A, 0x33, 0x33, 0x3A, 0x63, 0x33, 0x3A, 0x61, 0x36, + 0x3A, 0x30, 0x33, 0x3A, 0x39, 0x38, 0x3A, 0x65, 0x36, 0x3A, + 0x38, 0x64, 0x3A, 0x30, 0x35, 0x3A, 0x33, 0x34, 0x3A, 0x62, + 0x30, 0x3A, 0x39, 0x37, 0x3A, 0x30, 0x63, 0x3A, 0x64, 0x65, + 0x3A, 0x61, 0x34, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x37, 0x3A, 0x63, 0x66, + 0x3A, 0x35, 0x33, 0x3A, 0x38, 0x66, 0x3A, 0x64, 0x31, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x41, 0x53, 0x4E, 0x31, + 0x20, 0x4F, 0x49, 0x44, 0x3A, 0x20, 0x53, 0x4D, 0x32, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, 0x35, + 0x30, 0x39, 0x76, 0x33, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6E, + 0x73, 0x69, 0x6F, 0x6E, 0x73, 0x3A, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, + 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x53, 0x75, 0x62, 0x6A, + 0x65, 0x63, 0x74, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x49, 0x64, + 0x65, 0x6E, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3A, 0x20, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x36, 0x37, 0x3A, + 0x41, 0x45, 0x3A, 0x36, 0x30, 0x3A, 0x46, 0x46, 0x3A, 0x37, + 0x45, 0x3A, 0x31, 0x42, 0x3A, 0x30, 0x46, 0x3A, 0x39, 0x35, + 0x3A, 0x41, 0x45, 0x3A, 0x31, 0x46, 0x3A, 0x38, 0x32, 0x3A, + 0x35, 0x39, 0x3A, 0x46, 0x32, 0x3A, 0x36, 0x43, 0x3A, 0x35, + 0x36, 0x3A, 0x32, 0x44, 0x3A, 0x39, 0x33, 0x3A, 0x45, 0x46, + 0x3A, 0x31, 0x37, 0x3A, 0x33, 0x32, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, + 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x41, 0x75, 0x74, 0x68, + 0x6F, 0x72, 0x69, 0x74, 0x79, 0x20, 0x4B, 0x65, 0x79, 0x20, + 0x49, 0x64, 0x65, 0x6E, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x3A, 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x34, + 0x37, 0x3A, 0x30, 0x41, 0x3A, 0x34, 0x38, 0x3A, 0x37, 0x45, + 0x3A, 0x42, 0x42, 0x3A, 0x30, 0x32, 0x3A, 0x41, 0x38, 0x3A, + 0x35, 0x41, 0x3A, 0x32, 0x36, 0x3A, 0x35, 0x37, 0x3A, 0x32, + 0x42, 0x3A, 0x31, 0x39, 0x3A, 0x41, 0x39, 0x3A, 0x37, 0x42, + 0x3A, 0x36, 0x31, 0x3A, 0x38, 0x42, 0x3A, 0x37, 0x46, 0x3A, + 0x35, 0x44, 0x3A, 0x39, 0x39, 0x3A, 0x36, 0x45, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x42, 0x61, + 0x73, 0x69, 0x63, 0x20, 0x43, 0x6F, 0x6E, 0x73, 0x74, 0x72, + 0x61, 0x69, 0x6E, 0x74, 0x73, 0x3A, 0x20, 0x63, 0x72, 0x69, + 0x74, 0x69, 0x63, 0x61, 0x6C, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x43, 0x41, 0x3A, 0x46, 0x41, 0x4C, 0x53, 0x45, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, + 0x4B, 0x65, 0x79, 0x20, 0x55, 0x73, 0x61, 0x67, 0x65, 0x3A, + 0x20, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6C, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x69, 0x67, 0x69, + 0x74, 0x61, 0x6C, 0x20, 0x53, 0x69, 0x67, 0x6E, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x2C, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x45, + 0x6E, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x6D, 0x65, 0x6E, + 0x74, 0x2C, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x41, 0x67, 0x72, + 0x65, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, + 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x45, 0x78, 0x74, 0x65, + 0x6E, 0x64, 0x65, 0x64, 0x20, 0x4B, 0x65, 0x79, 0x20, 0x55, + 0x73, 0x61, 0x67, 0x65, 0x3A, 0x20, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x54, 0x4C, 0x53, 0x20, 0x57, 0x65, 0x62, + 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x41, 0x75, + 0x74, 0x68, 0x65, 0x6E, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6F, 0x6E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x4E, 0x65, 0x74, 0x73, 0x63, + 0x61, 0x70, 0x65, 0x20, 0x43, 0x65, 0x72, 0x74, 0x20, 0x54, + 0x79, 0x70, 0x65, 0x3A, 0x20, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x53, 0x53, 0x4C, 0x20, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, 0x67, + 0x6E, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x41, 0x6C, 0x67, + 0x6F, 0x72, 0x69, 0x74, 0x68, 0x6D, 0x3A, 0x20, 0x53, 0x4D, + 0x32, 0x2D, 0x77, 0x69, 0x74, 0x68, 0x2D, 0x53, 0x4D, 0x33, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, 0x67, 0x6E, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x20, 0x56, 0x61, 0x6C, 0x75, 0x65, + 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x33, 0x30, 0x3A, 0x34, 0x35, 0x3A, 0x30, 0x32, 0x3A, 0x32, + 0x30, 0x3A, 0x31, 0x62, 0x3A, 0x63, 0x61, 0x3A, 0x39, 0x34, + 0x3A, 0x32, 0x38, 0x3A, 0x37, 0x66, 0x3A, 0x66, 0x36, 0x3A, + 0x62, 0x32, 0x3A, 0x30, 0x64, 0x3A, 0x33, 0x31, 0x3A, 0x34, + 0x33, 0x3A, 0x35, 0x30, 0x3A, 0x65, 0x31, 0x3A, 0x64, 0x35, + 0x3A, 0x33, 0x34, 0x3A, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x31, 0x37, 0x3A, 0x64, 0x64, 0x3A, 0x61, + 0x66, 0x3A, 0x33, 0x61, 0x3A, 0x64, 0x65, 0x3A, 0x38, 0x31, + 0x3A, 0x30, 0x36, 0x3A, 0x36, 0x37, 0x3A, 0x39, 0x61, 0x3A, + 0x62, 0x33, 0x3A, 0x30, 0x36, 0x3A, 0x32, 0x32, 0x3A, 0x37, + 0x65, 0x3A, 0x36, 0x34, 0x3A, 0x65, 0x63, 0x3A, 0x66, 0x64, + 0x3A, 0x30, 0x65, 0x3A, 0x62, 0x39, 0x3A, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x32, 0x3A, 0x32, + 0x31, 0x3A, 0x30, 0x30, 0x3A, 0x61, 0x31, 0x3A, 0x34, 0x38, + 0x3A, 0x61, 0x38, 0x3A, 0x33, 0x32, 0x3A, 0x64, 0x31, 0x3A, + 0x30, 0x35, 0x3A, 0x30, 0x39, 0x3A, 0x36, 0x62, 0x3A, 0x31, + 0x63, 0x3A, 0x65, 0x62, 0x3A, 0x38, 0x39, 0x3A, 0x31, 0x32, + 0x3A, 0x36, 0x36, 0x3A, 0x64, 0x38, 0x3A, 0x33, 0x38, 0x3A, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, + 0x31, 0x3A, 0x63, 0x34, 0x3A, 0x35, 0x63, 0x3A, 0x38, 0x39, + 0x3A, 0x30, 0x39, 0x3A, 0x30, 0x66, 0x3A, 0x66, 0x64, 0x3A, + 0x65, 0x39, 0x3A, 0x63, 0x30, 0x3A, 0x33, 0x62, 0x3A, 0x31, + 0x64, 0x3A, 0x66, 0x62, 0x3A, 0x63, 0x64, 0x3A, 0x62, 0x35, + 0x3A, 0x34, 0x63, 0x3A, 0x33, 0x31, 0x3A, 0x36, 0x38, 0x0A, + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, + 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, + 0x54, 0x45, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x49, + 0x49, 0x43, 0x32, 0x44, 0x43, 0x43, 0x41, 0x6E, 0x36, 0x67, + 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x42, 0x41, 0x54, + 0x41, 0x4B, 0x42, 0x67, 0x67, 0x71, 0x67, 0x52, 0x7A, 0x50, + 0x56, 0x51, 0x47, 0x44, 0x64, 0x54, 0x43, 0x42, 0x72, 0x44, + 0x45, 0x4C, 0x4D, 0x41, 0x6B, 0x47, 0x41, 0x31, 0x55, 0x45, + 0x42, 0x68, 0x4D, 0x43, 0x56, 0x56, 0x4D, 0x78, 0x45, 0x44, + 0x41, 0x4F, 0x0A, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x67, + 0x4D, 0x42, 0x30, 0x31, 0x76, 0x62, 0x6E, 0x52, 0x68, 0x62, + 0x6D, 0x45, 0x78, 0x45, 0x44, 0x41, 0x4F, 0x42, 0x67, 0x4E, + 0x56, 0x42, 0x41, 0x63, 0x4D, 0x42, 0x30, 0x4A, 0x76, 0x65, + 0x6D, 0x56, 0x74, 0x59, 0x57, 0x34, 0x78, 0x46, 0x44, 0x41, + 0x53, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x6F, 0x4D, 0x43, + 0x33, 0x64, 0x76, 0x62, 0x47, 0x5A, 0x54, 0x0A, 0x55, 0x30, + 0x78, 0x66, 0x63, 0x32, 0x30, 0x79, 0x4D, 0x51, 0x38, 0x77, + 0x44, 0x51, 0x59, 0x44, 0x56, 0x51, 0x51, 0x4C, 0x44, 0x41, + 0x5A, 0x44, 0x51, 0x53, 0x31, 0x7A, 0x62, 0x54, 0x49, 0x78, + 0x47, 0x44, 0x41, 0x57, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, + 0x4D, 0x4D, 0x44, 0x33, 0x64, 0x33, 0x64, 0x79, 0x35, 0x33, + 0x62, 0x32, 0x78, 0x6D, 0x63, 0x33, 0x4E, 0x73, 0x4C, 0x6D, + 0x4E, 0x76, 0x0A, 0x62, 0x54, 0x45, 0x66, 0x4D, 0x42, 0x30, + 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, + 0x51, 0x45, 0x4A, 0x41, 0x52, 0x59, 0x51, 0x61, 0x57, 0x35, + 0x6D, 0x62, 0x30, 0x42, 0x33, 0x62, 0x32, 0x78, 0x6D, 0x63, + 0x33, 0x4E, 0x73, 0x4C, 0x6D, 0x4E, 0x76, 0x62, 0x54, 0x45, + 0x58, 0x4D, 0x42, 0x55, 0x47, 0x43, 0x67, 0x6D, 0x53, 0x4A, + 0x6F, 0x6D, 0x54, 0x38, 0x69, 0x78, 0x6B, 0x0A, 0x41, 0x51, + 0x45, 0x4D, 0x42, 0x33, 0x64, 0x76, 0x62, 0x47, 0x5A, 0x54, + 0x55, 0x30, 0x77, 0x77, 0x48, 0x68, 0x63, 0x4E, 0x4D, 0x6A, + 0x4D, 0x77, 0x4D, 0x6A, 0x45, 0x31, 0x4D, 0x44, 0x59, 0x79, + 0x4D, 0x7A, 0x41, 0x33, 0x57, 0x68, 0x63, 0x4E, 0x4D, 0x6A, + 0x55, 0x78, 0x4D, 0x54, 0x45, 0x78, 0x4D, 0x44, 0x59, 0x79, + 0x4D, 0x7A, 0x41, 0x33, 0x57, 0x6A, 0x43, 0x42, 0x73, 0x44, + 0x45, 0x4C, 0x0A, 0x4D, 0x41, 0x6B, 0x47, 0x41, 0x31, 0x55, + 0x45, 0x42, 0x68, 0x4D, 0x43, 0x56, 0x56, 0x4D, 0x78, 0x45, + 0x44, 0x41, 0x4F, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x67, + 0x4D, 0x42, 0x30, 0x31, 0x76, 0x62, 0x6E, 0x52, 0x68, 0x62, + 0x6D, 0x45, 0x78, 0x45, 0x44, 0x41, 0x4F, 0x42, 0x67, 0x4E, + 0x56, 0x42, 0x41, 0x63, 0x4D, 0x42, 0x30, 0x4A, 0x76, 0x65, + 0x6D, 0x56, 0x74, 0x59, 0x57, 0x34, 0x78, 0x0A, 0x46, 0x44, + 0x41, 0x53, 0x42, 0x67, 0x4E, 0x56, 0x42, 0x41, 0x6F, 0x4D, + 0x43, 0x33, 0x64, 0x76, 0x62, 0x47, 0x5A, 0x54, 0x55, 0x30, + 0x78, 0x66, 0x63, 0x32, 0x30, 0x79, 0x4D, 0x52, 0x4D, 0x77, + 0x45, 0x51, 0x59, 0x44, 0x56, 0x51, 0x51, 0x4C, 0x44, 0x41, + 0x70, 0x54, 0x5A, 0x58, 0x4A, 0x32, 0x5A, 0x58, 0x49, 0x74, + 0x63, 0x32, 0x30, 0x79, 0x4D, 0x52, 0x67, 0x77, 0x46, 0x67, + 0x59, 0x44, 0x0A, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x39, + 0x33, 0x64, 0x33, 0x63, 0x75, 0x64, 0x32, 0x39, 0x73, 0x5A, + 0x6E, 0x4E, 0x7A, 0x62, 0x43, 0x35, 0x6A, 0x62, 0x32, 0x30, + 0x78, 0x48, 0x7A, 0x41, 0x64, 0x42, 0x67, 0x6B, 0x71, 0x68, + 0x6B, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x43, 0x51, 0x45, + 0x57, 0x45, 0x47, 0x6C, 0x75, 0x5A, 0x6D, 0x39, 0x41, 0x64, + 0x32, 0x39, 0x73, 0x5A, 0x6E, 0x4E, 0x7A, 0x0A, 0x62, 0x43, + 0x35, 0x6A, 0x62, 0x32, 0x30, 0x78, 0x46, 0x7A, 0x41, 0x56, + 0x42, 0x67, 0x6F, 0x4A, 0x6B, 0x69, 0x61, 0x4A, 0x6B, 0x2F, + 0x49, 0x73, 0x5A, 0x41, 0x45, 0x42, 0x44, 0x41, 0x64, 0x33, + 0x62, 0x32, 0x78, 0x6D, 0x55, 0x31, 0x4E, 0x4D, 0x4D, 0x46, + 0x6F, 0x77, 0x46, 0x41, 0x59, 0x49, 0x4B, 0x6F, 0x45, 0x63, + 0x7A, 0x31, 0x55, 0x42, 0x67, 0x69, 0x30, 0x47, 0x43, 0x43, + 0x71, 0x42, 0x0A, 0x48, 0x4D, 0x39, 0x56, 0x41, 0x59, 0x49, + 0x74, 0x41, 0x30, 0x49, 0x41, 0x42, 0x4A, 0x52, 0x77, 0x4B, + 0x30, 0x62, 0x6B, 0x58, 0x67, 0x39, 0x42, 0x2B, 0x34, 0x38, + 0x74, 0x4E, 0x41, 0x70, 0x42, 0x51, 0x42, 0x6C, 0x65, 0x2B, + 0x39, 0x51, 0x64, 0x45, 0x61, 0x7A, 0x36, 0x39, 0x5A, 0x4D, + 0x33, 0x78, 0x76, 0x71, 0x48, 0x43, 0x50, 0x63, 0x57, 0x48, + 0x79, 0x7A, 0x4F, 0x4D, 0x45, 0x43, 0x64, 0x0A, 0x54, 0x36, + 0x59, 0x71, 0x43, 0x71, 0x48, 0x57, 0x6C, 0x54, 0x50, 0x44, + 0x70, 0x67, 0x4F, 0x59, 0x35, 0x6F, 0x30, 0x46, 0x4E, 0x4C, + 0x43, 0x58, 0x44, 0x4E, 0x36, 0x6B, 0x78, 0x38, 0x39, 0x54, + 0x6A, 0x39, 0x47, 0x6A, 0x67, 0x59, 0x6B, 0x77, 0x67, 0x59, + 0x59, 0x77, 0x48, 0x51, 0x59, 0x44, 0x56, 0x52, 0x30, 0x4F, + 0x42, 0x42, 0x59, 0x45, 0x46, 0x47, 0x65, 0x75, 0x59, 0x50, + 0x39, 0x2B, 0x0A, 0x47, 0x77, 0x2B, 0x56, 0x72, 0x68, 0x2B, + 0x43, 0x57, 0x66, 0x4A, 0x73, 0x56, 0x69, 0x32, 0x54, 0x37, + 0x78, 0x63, 0x79, 0x4D, 0x42, 0x38, 0x47, 0x41, 0x31, 0x55, + 0x64, 0x49, 0x77, 0x51, 0x59, 0x4D, 0x42, 0x61, 0x41, 0x46, + 0x45, 0x63, 0x4B, 0x53, 0x48, 0x36, 0x37, 0x41, 0x71, 0x68, + 0x61, 0x4A, 0x6C, 0x63, 0x72, 0x47, 0x61, 0x6C, 0x37, 0x59, + 0x59, 0x74, 0x2F, 0x58, 0x5A, 0x6C, 0x75, 0x0A, 0x4D, 0x41, + 0x77, 0x47, 0x41, 0x31, 0x55, 0x64, 0x45, 0x77, 0x45, 0x42, + 0x2F, 0x77, 0x51, 0x43, 0x4D, 0x41, 0x41, 0x77, 0x44, 0x67, + 0x59, 0x44, 0x56, 0x52, 0x30, 0x50, 0x41, 0x51, 0x48, 0x2F, + 0x42, 0x41, 0x51, 0x44, 0x41, 0x67, 0x4F, 0x6F, 0x4D, 0x42, + 0x4D, 0x47, 0x41, 0x31, 0x55, 0x64, 0x4A, 0x51, 0x51, 0x4D, + 0x4D, 0x41, 0x6F, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, + 0x55, 0x46, 0x0A, 0x42, 0x77, 0x4D, 0x42, 0x4D, 0x42, 0x45, + 0x47, 0x43, 0x57, 0x43, 0x47, 0x53, 0x41, 0x47, 0x47, 0x2B, + 0x45, 0x49, 0x42, 0x41, 0x51, 0x51, 0x45, 0x41, 0x77, 0x49, + 0x47, 0x51, 0x44, 0x41, 0x4B, 0x42, 0x67, 0x67, 0x71, 0x67, + 0x52, 0x7A, 0x50, 0x56, 0x51, 0x47, 0x44, 0x64, 0x51, 0x4E, + 0x49, 0x41, 0x44, 0x42, 0x46, 0x41, 0x69, 0x41, 0x62, 0x79, + 0x70, 0x51, 0x6F, 0x66, 0x2F, 0x61, 0x79, 0x0A, 0x44, 0x54, + 0x46, 0x44, 0x55, 0x4F, 0x48, 0x56, 0x4E, 0x42, 0x66, 0x64, + 0x72, 0x7A, 0x72, 0x65, 0x67, 0x51, 0x5A, 0x6E, 0x6D, 0x72, + 0x4D, 0x47, 0x49, 0x6E, 0x35, 0x6B, 0x37, 0x50, 0x30, 0x4F, + 0x75, 0x51, 0x49, 0x68, 0x41, 0x4B, 0x46, 0x49, 0x71, 0x44, + 0x4C, 0x52, 0x42, 0x51, 0x6C, 0x72, 0x48, 0x4F, 0x75, 0x4A, + 0x45, 0x6D, 0x62, 0x59, 0x4F, 0x4B, 0x48, 0x45, 0x58, 0x49, + 0x6B, 0x4A, 0x0A, 0x44, 0x2F, 0x33, 0x70, 0x77, 0x44, 0x73, + 0x64, 0x2B, 0x38, 0x32, 0x31, 0x54, 0x44, 0x46, 0x6F, 0x0A, + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x45, 0x4E, 0x44, 0x20, 0x43, + 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A +}; +#define sizeof_server_sm2_cert (sizeof(server_sm2_cert)) + +/* ./certs/sm2/server-sm2-key.pem */ +static const unsigned char server_sm2_key[] = +{ + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, + 0x20, 0x50, 0x55, 0x42, 0x4C, 0x49, 0x43, 0x20, 0x4B, 0x45, + 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x46, 0x6F, + 0x77, 0x46, 0x41, 0x59, 0x49, 0x4B, 0x6F, 0x45, 0x63, 0x7A, + 0x31, 0x55, 0x42, 0x67, 0x69, 0x30, 0x47, 0x43, 0x43, 0x71, + 0x42, 0x48, 0x4D, 0x39, 0x56, 0x41, 0x59, 0x49, 0x74, 0x41, + 0x30, 0x49, 0x41, 0x42, 0x4A, 0x52, 0x77, 0x4B, 0x30, 0x62, + 0x6B, 0x58, 0x67, 0x39, 0x42, 0x2B, 0x34, 0x38, 0x74, 0x4E, + 0x41, 0x70, 0x42, 0x51, 0x42, 0x6C, 0x65, 0x2B, 0x39, 0x51, + 0x64, 0x0A, 0x45, 0x61, 0x7A, 0x36, 0x39, 0x5A, 0x4D, 0x33, + 0x78, 0x76, 0x71, 0x48, 0x43, 0x50, 0x63, 0x57, 0x48, 0x79, + 0x7A, 0x4F, 0x4D, 0x45, 0x43, 0x64, 0x54, 0x36, 0x59, 0x71, + 0x43, 0x71, 0x48, 0x57, 0x6C, 0x54, 0x50, 0x44, 0x70, 0x67, + 0x4F, 0x59, 0x35, 0x6F, 0x30, 0x46, 0x4E, 0x4C, 0x43, 0x58, + 0x44, 0x4E, 0x36, 0x6B, 0x78, 0x38, 0x39, 0x54, 0x6A, 0x39, + 0x45, 0x3D, 0x0A, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x45, 0x4E, + 0x44, 0x20, 0x50, 0x55, 0x42, 0x4C, 0x49, 0x43, 0x20, 0x4B, + 0x45, 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A +}; +#define sizeof_server_sm2_key (sizeof(server_sm2_key)) + +/* ./certs/sm2/server-sm2-priv.pem */ +static const unsigned char server_sm2_priv[] = +{ + 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E, + 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4B, + 0x45, 0x59, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A, 0x4D, 0x49, + 0x47, 0x49, 0x41, 0x67, 0x45, 0x41, 0x4D, 0x42, 0x51, 0x47, + 0x43, 0x43, 0x71, 0x42, 0x48, 0x4D, 0x39, 0x56, 0x41, 0x59, + 0x49, 0x74, 0x42, 0x67, 0x67, 0x71, 0x67, 0x52, 0x7A, 0x50, + 0x56, 0x51, 0x47, 0x43, 0x4C, 0x51, 0x52, 0x74, 0x4D, 0x47, + 0x73, 0x43, 0x41, 0x51, 0x45, 0x45, 0x49, 0x4E, 0x63, 0x7A, + 0x77, 0x61, 0x46, 0x78, 0x6D, 0x4E, 0x70, 0x44, 0x67, 0x51, + 0x31, 0x77, 0x0A, 0x51, 0x6F, 0x68, 0x6A, 0x30, 0x45, 0x78, + 0x2B, 0x44, 0x34, 0x71, 0x62, 0x4C, 0x64, 0x6F, 0x56, 0x71, + 0x67, 0x35, 0x61, 0x2B, 0x75, 0x31, 0x33, 0x4F, 0x6B, 0x4F, + 0x6F, 0x6F, 0x55, 0x51, 0x44, 0x51, 0x67, 0x41, 0x45, 0x6C, + 0x48, 0x41, 0x72, 0x52, 0x75, 0x52, 0x65, 0x44, 0x30, 0x48, + 0x37, 0x6A, 0x79, 0x30, 0x30, 0x43, 0x6B, 0x46, 0x41, 0x47, + 0x56, 0x37, 0x37, 0x31, 0x42, 0x30, 0x52, 0x0A, 0x72, 0x50, + 0x72, 0x31, 0x6B, 0x7A, 0x66, 0x47, 0x2B, 0x6F, 0x63, 0x49, + 0x39, 0x78, 0x59, 0x66, 0x4C, 0x4D, 0x34, 0x77, 0x51, 0x4A, + 0x31, 0x50, 0x70, 0x69, 0x6F, 0x4B, 0x6F, 0x64, 0x61, 0x56, + 0x4D, 0x38, 0x4F, 0x6D, 0x41, 0x35, 0x6A, 0x6D, 0x6A, 0x51, + 0x55, 0x30, 0x73, 0x4A, 0x63, 0x4D, 0x33, 0x71, 0x54, 0x48, + 0x7A, 0x31, 0x4F, 0x50, 0x30, 0x51, 0x3D, 0x3D, 0x0A, 0x2D, + 0x2D, 0x2D, 0x2D, 0x2D, 0x45, 0x4E, 0x44, 0x20, 0x50, 0x52, + 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4B, 0x45, 0x59, 0x2D, + 0x2D, 0x2D, 0x2D, 0x2D, 0x0A +}; +#define sizeof_server_sm2_priv (sizeof(server_sm2_priv)) + +#endif /* WOLFSSL_NO_PEM */ + +#endif /* WOLFSSL_SM2 || WOLFSSL_SM3 || WOLFSSL_SM4 */ +#endif /* WOLFSSL_CERTS_TEST_SM_H */ diff --git a/wolfssl/include.am b/wolfssl/include.am index c6a3539f6..5c20caf4a 100644 --- a/wolfssl/include.am +++ b/wolfssl/include.am @@ -18,6 +18,7 @@ nobase_include_HEADERS+= \ wolfssl/sniffer.h \ wolfssl/callbacks.h \ wolfssl/certs_test.h \ + wolfssl/certs_test_sm.h \ wolfssl/test.h \ wolfssl/version.h \ wolfssl/ocsp.h \ diff --git a/wolfssl/wolfcrypt/fe_operations.h b/wolfssl/wolfcrypt/fe_operations.h index decfb22c0..1848ca652 100644 --- a/wolfssl/wolfcrypt/fe_operations.h +++ b/wolfssl/wolfcrypt/fe_operations.h @@ -119,9 +119,10 @@ WOLFSSL_LOCAL void fe_mul121666(fe h,fe f); WOLFSSL_LOCAL void fe_cmov(fe f, const fe g, int b); WOLFSSL_LOCAL void fe_pow22523(fe out,const fe z); -/* 64 type needed for SHA512 */ -WOLFSSL_LOCAL sword64 load_3(const unsigned char *in); -WOLFSSL_LOCAL sword64 load_4(const unsigned char *in); +#if !defined(CURVE25519_SMALL) && !defined(ED25519_SMALL) + WOLFSSL_LOCAL sword64 load_3(const unsigned char *in); + WOLFSSL_LOCAL sword64 load_4(const unsigned char *in); +#endif #ifdef CURVED25519_ASM WOLFSSL_LOCAL void fe_cmov_table(fe* r, fe* base, signed char b); diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index 3f2654e2b..1b69a022b 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -423,7 +423,7 @@ enum { #endif /* set up thread local storage if available */ -#ifdef HAVE_THREAD_LS +#if defined(HAVE_THREAD_LS) && !defined(NO_THREAD_LS) #if defined(_MSC_VER) || defined(__WATCOMC__) #define THREAD_LS_T __declspec(thread) /* Thread local storage only in FreeRTOS v8.2.1 and higher */ diff --git a/wrapper/include.am b/wrapper/include.am index 0bdcbc78f..e0e76aabf 100644 --- a/wrapper/include.am +++ b/wrapper/include.am @@ -4,5 +4,6 @@ include wrapper/Ada/include.am include wrapper/CSharp/include.am +include wrapper/rust/include.am EXTRA_DIST+= wrapper/python/README.md diff --git a/wrapper/rust/Makefile b/wrapper/rust/Makefile new file mode 100644 index 000000000..8ac8e3e1a --- /dev/null +++ b/wrapper/rust/Makefile @@ -0,0 +1,13 @@ +.PHONY: all +all: + +$(MAKE) -C wolfssl-sys + +$(MAKE) -C wolfssl + +.PHONY: test +test: + +$(MAKE) -C wolfssl test + +.PHONY: clean +clean: + +$(MAKE) -C wolfssl-sys clean + +$(MAKE) -C wolfssl clean diff --git a/wrapper/rust/README.md b/wrapper/rust/README.md new file mode 100644 index 000000000..a93d6e236 --- /dev/null +++ b/wrapper/rust/README.md @@ -0,0 +1,21 @@ +# wolfSSL Rust Wrapper + +## Building the wolfssl Rust Wrapper + +First, configure and build wolfssl C library. + +Then build the wolfssl Rust wrapper with: + + make -C wrapper/rust + +Run tests with: + + make -C wrapper/rust test + +## Repository Directory Structure + +| Repository Directory | Description | +| --- | --- | +| `/wrapper/rust` | Top level container for all Rust wrapper functionality. | +| `/wrapper/rust/wolfssl` | Top level for the `wolfssl` library crate. This crate contains high-level Rust sources that use the bindings from the `wolfssl-sys` crate. | +| `/wrapper/rust/wolfssl-sys` | Top level for the `wolfssl-sys` library crate. This crate contains only automatically generated bindings to the `wolfssl` C library. | diff --git a/wrapper/rust/include.am b/wrapper/rust/include.am new file mode 100644 index 000000000..dd033c650 --- /dev/null +++ b/wrapper/rust/include.am @@ -0,0 +1,20 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +EXTRA_DIST += wrapper/rust/Makefile +EXTRA_DIST += wrapper/rust/README.md +EXTRA_DIST += wrapper/rust/wolfssl-sys/Cargo.lock +EXTRA_DIST += wrapper/rust/wolfssl-sys/Cargo.toml +EXTRA_DIST += wrapper/rust/wolfssl-sys/Makefile +EXTRA_DIST += wrapper/rust/wolfssl-sys/build.rs +EXTRA_DIST += wrapper/rust/wolfssl-sys/headers.h +EXTRA_DIST += wrapper/rust/wolfssl-sys/src/lib.rs +EXTRA_DIST += wrapper/rust/wolfssl/Cargo.lock +EXTRA_DIST += wrapper/rust/wolfssl/Cargo.toml +EXTRA_DIST += wrapper/rust/wolfssl/Makefile +EXTRA_DIST += wrapper/rust/wolfssl/build.rs +EXTRA_DIST += wrapper/rust/wolfssl/src/lib.rs +EXTRA_DIST += wrapper/rust/wolfssl/src/wolfcrypt.rs +EXTRA_DIST += wrapper/rust/wolfssl/src/wolfcrypt/random.rs +EXTRA_DIST += wrapper/rust/wolfssl/tests/test_random.rs diff --git a/wrapper/rust/wolfssl-sys/Cargo.lock b/wrapper/rust/wolfssl-sys/Cargo.lock new file mode 100644 index 000000000..d43a739f4 --- /dev/null +++ b/wrapper/rust/wolfssl-sys/Cargo.lock @@ -0,0 +1,293 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "bindgen" +version = "0.72.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", +] + +[[package]] +name = "bitflags" +version = "2.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "libc" +version = "0.2.175" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" + +[[package]] +name = "libloading" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "syn" +version = "2.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-targets" +version = "0.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "wolfssl-sys" +version = "0.1.0" +dependencies = [ + "bindgen", +] diff --git a/wrapper/rust/wolfssl-sys/Cargo.toml b/wrapper/rust/wolfssl-sys/Cargo.toml new file mode 100644 index 000000000..c959a2d99 --- /dev/null +++ b/wrapper/rust/wolfssl-sys/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "wolfssl-sys" +version = "0.1.0" +edition = "2024" + +[features] +std = [] + +[build-dependencies] +bindgen = "0.72.1" + +[profile.release] +strip = true +opt-level = "s" +lto = true +codegen-units = 1 +panic = "abort" diff --git a/wrapper/rust/wolfssl-sys/Makefile b/wrapper/rust/wolfssl-sys/Makefile new file mode 100644 index 000000000..6414a60f6 --- /dev/null +++ b/wrapper/rust/wolfssl-sys/Makefile @@ -0,0 +1,7 @@ +.PHONY: all +all: + cargo build + +.PHONY: clean +clean: + cargo clean diff --git a/wrapper/rust/wolfssl-sys/build.rs b/wrapper/rust/wolfssl-sys/build.rs new file mode 100644 index 000000000..3f902be0c --- /dev/null +++ b/wrapper/rust/wolfssl-sys/build.rs @@ -0,0 +1,58 @@ +extern crate bindgen; + +use std::env; +use std::io::{self, Result}; +use std::path::PathBuf; + +/// Perform crate build. +fn main() { + if let Err(e) = run_build() { + eprintln!("Build failed: {}", e); + std::process::exit(1); + } +} + +/// Perform all build steps. +/// +/// Returns `Ok(())` if successful, or an error if any step fails. +fn run_build() -> Result<()> { + // Generate Rust bindings for wolfssl C library. + generate_bindings()?; + Ok(()) +} + +/// Generate Rust bindings for the wolfssl C library using bindgen. +/// +/// This function: +/// 1. Sets up the library and include paths +/// 2. Configures the build environment +/// 3. Generates Rust bindings using bindgen +/// 4. Writes the bindings to a file +/// +/// Returns `Ok(())` if successful, or an error if binding generation fails. +fn generate_bindings() -> Result<()> { + let wrapper_dir = std::env::current_dir()?.display().to_string(); + let wolfssl_base_dir = format!("{}/../../..", wrapper_dir); + let wolfssl_lib_dir = format!("{}/src/.libs", wolfssl_base_dir); + + println!("cargo:rustc-link-search={}", wolfssl_lib_dir); +// TODO: do we need this if only a static library is built? +// println!("cargo:rustc-link-lib=static=wolfssl"); + + let bindings = bindgen::Builder::default() + .header("headers.h") + .clang_arg(format!("-I{}", wolfssl_base_dir)) + .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) + .generate() + .map_err(|_| io::Error::new(io::ErrorKind::Other, "Failed to generate bindings"))?; + + let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); + bindings + .write_to_file(out_path.join("bindings.rs")) + .map_err(|e| { + io::Error::new( + io::ErrorKind::Other, + format!("Couldn't write bindings: {}", e), + ) + }) +} diff --git a/wrapper/rust/wolfssl-sys/headers.h b/wrapper/rust/wolfssl-sys/headers.h new file mode 100644 index 000000000..da0815449 --- /dev/null +++ b/wrapper/rust/wolfssl-sys/headers.h @@ -0,0 +1,20 @@ +#include "wolfssl/options.h" +#include "wolfssl/wolfcrypt/settings.h" +#include "wolfssl/wolfcrypt/types.h" +#include "wolfssl/wolfcrypt/error-crypt.h" +#include "wolfssl/wolfcrypt/random.h" +#include "wolfssl/wolfcrypt/hmac.h" +#include "wolfssl/wolfcrypt/rsa.h" +#include "wolfssl/wolfcrypt/sha256.h" +#include "wolfssl/wolfcrypt/curve25519.h" +#include "wolfssl/wolfcrypt/ed25519.h" +#include "wolfssl/wolfcrypt/ed448.h" +#include "wolfssl/wolfcrypt/ecc.h" +#include "wolfssl/wolfcrypt/asn_public.h" +#include "wolfssl/wolfcrypt/asn.h" +#include "wolfssl/wolfcrypt/chacha20_poly1305.h" +#include "wolfssl/wolfcrypt/kdf.h" +#include "wolfssl/wolfcrypt/coding.h" +#include "wolfssl/wolfcrypt/signature.h" +#include "wolfssl/wolfcrypt/logging.h" +#include "wolfssl/wolfcrypt/aes.h" diff --git a/wrapper/rust/wolfssl-sys/src/lib.rs b/wrapper/rust/wolfssl-sys/src/lib.rs new file mode 100644 index 000000000..3ab98816b --- /dev/null +++ b/wrapper/rust/wolfssl-sys/src/lib.rs @@ -0,0 +1,16 @@ +/* + * Suppress warnings for bindgen-generated bindings to wolfssl C library. + */ +#![allow(clippy::missing_safety_doc)] +#![allow(clippy::ptr_offset_with_cast)] +#![allow(clippy::too_many_arguments)] +#![allow(clippy::upper_case_acronyms)] +#![allow(clippy::useless_transmute)] +#![allow(dead_code)] +#![allow(improper_ctypes)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] +#![allow(non_upper_case_globals)] +#![allow(unnecessary_transmutes)] +#![allow(unsafe_op_in_unsafe_fn)] +include!(concat!(env!("OUT_DIR"), "/bindings.rs")); diff --git a/wrapper/rust/wolfssl/Cargo.lock b/wrapper/rust/wolfssl/Cargo.lock new file mode 100644 index 000000000..d9a2ea87c --- /dev/null +++ b/wrapper/rust/wolfssl/Cargo.lock @@ -0,0 +1,300 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "bindgen" +version = "0.72.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", +] + +[[package]] +name = "bitflags" +version = "2.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "libc" +version = "0.2.175" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" + +[[package]] +name = "libloading" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "syn" +version = "2.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-targets" +version = "0.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "wolfssl" +version = "0.1.0" +dependencies = [ + "wolfssl-sys", +] + +[[package]] +name = "wolfssl-sys" +version = "0.1.0" +dependencies = [ + "bindgen", +] diff --git a/wrapper/rust/wolfssl/Cargo.toml b/wrapper/rust/wolfssl/Cargo.toml new file mode 100644 index 000000000..596cfc16d --- /dev/null +++ b/wrapper/rust/wolfssl/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "wolfssl" +version = "0.1.0" +edition = "2024" + +[dependencies] +wolfssl-sys = { path = "../wolfssl-sys" } diff --git a/wrapper/rust/wolfssl/Makefile b/wrapper/rust/wolfssl/Makefile new file mode 100644 index 000000000..8bc689515 --- /dev/null +++ b/wrapper/rust/wolfssl/Makefile @@ -0,0 +1,12 @@ +.PHONY: all +all: + cargo build + cargo doc + +.PHONY: test +test: + cargo test + +.PHONY: clean +clean: + cargo clean diff --git a/wrapper/rust/wolfssl/build.rs b/wrapper/rust/wolfssl/build.rs new file mode 100644 index 000000000..572004141 --- /dev/null +++ b/wrapper/rust/wolfssl/build.rs @@ -0,0 +1,32 @@ +use std::io::Result; + +/// Perform crate build. +fn main() { + if let Err(e) = run_build() { + eprintln!("Build failed: {}", e); + std::process::exit(1); + } +} + +/// Perform all build steps. +/// +/// Returns `Ok(())` if successful, or an error if any step fails. +fn run_build() -> Result<()> { + setup_wolfssl_link()?; + Ok(()) +} + +/// Instruct cargo to link against wolfssl C library +/// +/// Returns `Ok(())` if successful, or an error if any step fails. +fn setup_wolfssl_link() -> Result<()> { + let wrapper_dir = std::env::current_dir()?.display().to_string(); + let wolfssl_base_dir = format!("{}/../../..", wrapper_dir); + let wolfssl_lib_dir = format!("{}/src/.libs", wolfssl_base_dir); + + println!("cargo:rustc-link-search={}", wolfssl_lib_dir); + println!("cargo:rustc-link-lib=wolfssl"); + println!("cargo:rustc-link-arg=-Wl,-rpath,{}", wolfssl_lib_dir); + + Ok(()) +} diff --git a/wrapper/rust/wolfssl/src/lib.rs b/wrapper/rust/wolfssl/src/lib.rs new file mode 100644 index 000000000..701d3e0b6 --- /dev/null +++ b/wrapper/rust/wolfssl/src/lib.rs @@ -0,0 +1 @@ +pub mod wolfcrypt; diff --git a/wrapper/rust/wolfssl/src/wolfcrypt.rs b/wrapper/rust/wolfssl/src/wolfcrypt.rs new file mode 100644 index 000000000..7bcbfe0e2 --- /dev/null +++ b/wrapper/rust/wolfssl/src/wolfcrypt.rs @@ -0,0 +1 @@ +pub mod random; diff --git a/wrapper/rust/wolfssl/src/wolfcrypt/random.rs b/wrapper/rust/wolfssl/src/wolfcrypt/random.rs new file mode 100644 index 000000000..55f26015a --- /dev/null +++ b/wrapper/rust/wolfssl/src/wolfcrypt/random.rs @@ -0,0 +1,146 @@ +/*! +This crate provides a Rust wrapper for the wolfCrypt library's random number +generator (RNG). + +It leverages the `wolfssl-sys` crate for low-level FFI bindings, encapsulating +the raw C functions in a memory-safe and easy-to-use Rust API. + +The primary component is the `RNG` struct, which manages the lifecycle of a +wolfSSL `WC_RNG` object. It ensures proper initialization and deallocation. + +# Examples + +```rust +use wolfssl::wolfcrypt::random::RNG; + +fn main() { + // Create a RNG instance. + let mut rng = RNG::new().expect("Failed to create RNG"); + + // Generate a single random byte value. + let byte = rng.generate_byte().expect("Failed to generate a single byte"); + + // Generate a random block. + let mut buffer = [0u32; 8]; + rng.generate_block(&mut buffer).expect("Failed to generate a block"); +} +``` +*/ +use wolfssl_sys as ws; + +use std::mem::{size_of, MaybeUninit}; + +/// A cryptographically secure random number generator based on the wolfSSL +/// library. +/// +/// This struct wraps the wolfssl `WC_RNG` type, providing a high-level API +/// for generating random bytes and blocks of data. The `Drop` implementation +/// ensures that the underlying wolfSSL RNG context is correctly freed when the +/// `RNG` struct goes out of scope, preventing memory leaks. +pub struct RNG { + wc_rng: ws::WC_RNG, +} + +impl RNG { + /// Initialize a new `RNG` instance. + /// + /// This function wraps the wolfssl library function `wc_InitRng`, which + /// performs the necessary initialization for the RNG context. + /// + /// # Returns + /// + /// A Result which is Ok(RNG) on success or an Err containing the wolfSSL + /// library return code on failure. + pub fn new() -> Result { + let mut rng: MaybeUninit = MaybeUninit::uninit(); + let rc = unsafe { ws::wc_InitRng(&mut (*rng.as_mut_ptr()).wc_rng) }; + if rc == 0 { + let rng = unsafe { rng.assume_init() }; + Ok(rng) + } else { + Err(rc) + } + } + + /// Initialize a new `RNG` instance and provide a nonce input. + /// + /// This function wraps the wolfssl library function `wc_InitRngNonce`, + /// which performs the necessary initialization for the RNG context and + /// accepts a nonce input buffer. + /// + /// # Returns + /// + /// A Result which is Ok(RNG) on success or an Err containing the wolfSSL + /// library return code on failure. + pub fn new_with_nonce(nonce: &mut [T]) -> Result { + let ptr = nonce.as_mut_ptr() as *mut u8; + let size: u32 = (nonce.len() * size_of::()) as u32; + let mut rng: MaybeUninit = MaybeUninit::uninit(); + let rc = unsafe { + ws::wc_InitRngNonce(&mut (*rng.as_mut_ptr()).wc_rng, ptr, size) + }; + if rc == 0 { + let rng = unsafe { rng.assume_init() }; + Ok(rng) + } else { + Err(rc) + } + } + + /// Generate a single cryptographically secure random byte. + /// + /// This method calls the `wc_RNG_GenerateByte` wolfSSL library function to + /// retrieve a random byte from the underlying wolfSSL RNG context. + /// + /// # Returns + /// + /// A `Result` which is `Ok(u8)` containing the random byte on success or + /// an `Err` with the wolfssl library return code on failure. + pub fn generate_byte(&mut self) -> Result { + let mut b: u8 = 0; + let rc = unsafe { ws::wc_RNG_GenerateByte(&mut self.wc_rng, &mut b) }; + if rc == 0 { + Ok(b) + } else { + Err(rc) + } + } + + /// Fill a mutable slice with cryptographically secure random data. + /// + /// This is a generic function that can fill a slice of any type `T` with + /// random bytes. It calculates the total size of the slice in bytes and + /// calls the underlying `wc_RNG_GenerateBlock` wolfssl library function. + /// + /// # Parameters + /// + /// * `buf`: A mutable slice of any type `T` to be filled with random data. + /// + /// # Returns + /// + /// A `Result` which is `Ok(())` on success or an `Err` with the wolfssl + /// library return code on failure. + pub fn generate_block(&mut self, buf: &mut [T]) -> Result<(), i32> { + let ptr = buf.as_mut_ptr() as *mut u8; + let size: u32 = (buf.len() * size_of::()) as u32; + let rc = unsafe { ws::wc_RNG_GenerateBlock(&mut self.wc_rng, ptr, size) }; + if rc == 0 { + Ok(()) + } else { + Err(rc) + } + } +} + +impl Drop for RNG { + /// Safely free the underlying wolfSSL RNG context. + /// + /// This calls the `wc_FreeRng` wolfssl library function. + /// + /// The Rust Drop trait guarantees that this method is called when the RNG + /// struct goes out of scope, automatically cleaning up resources and + /// preventing memory leaks. + fn drop(&mut self) { + unsafe { ws::wc_FreeRng(&mut self.wc_rng); } + } +} diff --git a/wrapper/rust/wolfssl/tests/test_random.rs b/wrapper/rust/wolfssl/tests/test_random.rs new file mode 100644 index 000000000..c5a9c5b74 --- /dev/null +++ b/wrapper/rust/wolfssl/tests/test_random.rs @@ -0,0 +1,58 @@ +use wolfssl::wolfcrypt::random::RNG; + +// Test that RNG::new() returns successfully and that drop() does not panic. +#[test] +fn test_rng_new_and_drop() { + let _rng = RNG::new().expect("Failed to create RNG"); +} + +// Test that RNG::new_with_nonce() returns successfully and that drop() does +// not panic. +#[test] +fn test_rng_new_with_nonce_and_drop() { + let mut nonce = [1, 2, 3, 4]; + let _rng = RNG::new_with_nonce(&mut nonce).expect("Failed to create RNG"); +} + +// Test that generate_byte() returns random values. +#[test] +fn test_rng_generate_byte() { + // Since a single 0x00 or 0xFF could occur occasionally, we'll combine four + // bytes into a u32 and make sure they aren't all 0x00 or all 0xFF. + let mut rng = RNG::new().expect("Failed to create RNG"); + let mut v: u32 = 0; + for _i in 0..4 { + let byte = rng.generate_byte().expect("Failed to generate a single byte"); + v = (v << 8) | (byte as u32); + } + assert_ne!(v, 0u32); + assert_ne!(v, 0xFFFF_FFFFu32); +} + +// Test that generate_block works for a slice of u8. +#[test] +fn test_rng_generate_block_u8() { + let mut rng = RNG::new().expect("Failed to create RNG"); + let mut buffer = [0u8; 32]; + rng.generate_block(&mut buffer).expect("Failed to generate a block of bytes"); + + // Check if the buffer has been modified from its initial state. + let all_zeros = [0u8; 32]; + assert_ne!(buffer, all_zeros); +} + +// Test that generate_block works for a slice of u32. +#[test] +fn test_rng_generate_block_u32() { + let mut rng = RNG::new().expect("Failed to create RNG"); + let mut buffer = [0u32; 8]; + rng.generate_block(&mut buffer).expect("Failed to generate a block of u32"); + + // Check if the buffer has been modified. + let all_zeros = [0u32; 8]; + assert_ne!(buffer, all_zeros); + // Check that the last u32 is populated so the size of the buffer was + // calculated properly. + assert_ne!(buffer[buffer.len() - 1], 0u32); + assert_ne!(buffer[buffer.len() - 1], 0xFFFF_FFFFu32); +}