diff --git a/.github/workflows/bare.yaml b/.github/workflows/bare.yaml index c54d58762..fe8ecb728 100644 --- a/.github/workflows/bare.yaml +++ b/.github/workflows/bare.yaml @@ -29,8 +29,8 @@ jobs: strategy: fail-fast: false matrix: - # ARM64 is currently our virtualized Ubuntu 16.04 image. - runs-on: [ ubuntu-20.04, ubuntu-18.04, ARM64 ] + # The ARM64 build actually runs on an Amazon Docker container on Laja. + runs-on: [ ubuntu-20.04, ubuntu-18.04, amzn-2-arm64 ] timeout-minutes: 120 steps: - name: Prepare OS @@ -96,13 +96,14 @@ jobs: strategy: fail-fast: false matrix: - runs-on: [ macos-10.15 ] + runs-on: [ macos-11 ] timeout-minutes: 60 steps: # Avoid linking to Homebrew's libintl during build. # Needed tools are to be used from /usr/bin. - name: Hack Homebrew run: | + sleep 10 sudo find /usr/local -name 'libffi*' -exec chmod a-r {} + sudo find /usr/local -name 'libintl*' -exec chmod a-r {} + sudo rm -f /usr/local/bin/{wget,curl,git} @@ -173,7 +174,7 @@ jobs: - name: Prepare OS shell: powershell run: | - chocolatey install --yes --no-progress make nasm 7zip curl + choco install --yes --no-progress make nasm 7zip curl # There's no vcpython27 choco pkg since Microsoft removed the installer. Start-BitsTransfer https://bin.chevah.com:20443/third-party-stuff/VCForPython27.msi msiexec /quiet /i VCForPython27.msi diff --git a/brink.conf b/brink.conf index 493380b80..63d75fc57 100644 --- a/brink.conf +++ b/brink.conf @@ -1,5 +1,5 @@ -BASE_REQUIREMENTS='pip==20.3.4chevah chevah-brink==0.79.0 paver==1.2.4' -PYTHON_CONFIGURATION='default@2.7.18.90dc4a6' +BASE_REQUIREMENTS='pip==20.3.4chevah1 chevah-brink==0.79.0 paver==1.2.4' +PYTHON_CONFIGURATION='default@2.7.18.52fb2f5' # For production packages there are 2 options: BINARY_DIST_URI='https://github.com/chevah/python-package/releases/download' #BINARY_DIST_URI='https://bin.chevah.com:20443/production' diff --git a/brink.sh b/brink.sh index 02aefff2d..021f551d0 100755 --- a/brink.sh +++ b/brink.sh @@ -640,14 +640,14 @@ check_glibc_version(){ # Supported minimum minor glibc 2.X versions for various arches. # For x64, we build on CentOS 5.11 (Final) with glibc 2.5. - # For arm64, we build on Ubuntu 16.04 with glibc 2.23. + # For arm64, we build on Amazon Linux 2 with glibc 2.26. # Beware we haven't normalized arch names yet. case "$ARCH" in "amd64"|"x86_64"|"x64") supported_glibc2_version=5 ;; "aarch64"|"arm64") - supported_glibc2_version=23 + supported_glibc2_version=26 ;; *) (>&2 echo "$ARCH is an unsupported arch for generic Linux!") @@ -658,7 +658,7 @@ check_glibc_version(){ echo "No specific runtime for the current distribution / version / arch." echo "Minimum glibc version for this arch: 2.${supported_glibc2_version}." - # Tested with glibc 2.5/2.11.3/2.12/2.23/2.28-31 and eglibc 2.13/2.19. + # Tested with glibc 2.5/2.11.3/2.12/2.23/2.26/2.28-31 and eglibc 2.13/2.19. glibc_version=$(head -n 1 $ldd_output_file | rev | cut -d\ -f1 | rev) rm $ldd_output_file diff --git a/chevah_build b/chevah_build index 6ac42790b..777bc93fa 100755 --- a/chevah_build +++ b/chevah_build @@ -14,19 +14,19 @@ set -o pipefail # don't ignore exit codes when piping output PYTHON_BUILD_VERSION="2.7.18" LIBFFI_VERSION="3.4.4" -ZLIB_VERSION="1.2.13" +ZLIB_VERSION="1.3" BZIP2_VERSION="1.0.8" # We statically build the BSD libedit on selected platforms to get the # readline module available without linking to the GPL-only readline libs. LIBEDIT_VERSION="20170329-3.1" -OPENSSL_VERSION="1.1.1t" -SQLITE_VERSION="3.40.1" +OPENSSL_VERSION="1.1.1w" +SQLITE_VERSION="3.43.1" # Python modules versions to be used everywhere possible. PYSQLITE_VERSION="2.8.3" CFFI_VERSION="1.15.1" SCANDIR_VERSION="1.10.0" -PSUTIL_VERSION="5.9.3" +PSUTIL_VERSION="5.9.5" SUBPROCESS32_VERSION="3.5.4" # Versions no longer upgradable because of Python 2 deprecation. @@ -35,14 +35,29 @@ PYOPENSSL_VERSION="21.0.0" # Backported fix for https://github.com/pypa/pip/issues/9827 # at https://github.com/chevah/pip/tree/20.3.4chevah. PIP_VERSION="20.3.4chevah1" -# For pip <21.1, click <8.0.0, dparse <0.5.2, wheel <0.38.0, safety <2.2.0, -# setuptools <65.5.1, certifi <2022.12.07. -SAFETY_IGNORED_OPTS="-i 40291 -i 47833 -i 50571 -i 51499 -i 51358 -i 52495 -i 52365" +# For safety alerts, we need to ignore some vulnerabilities which are either: +# * not present in the final tarball, e.g. for wheel, safety, etc., +# * not at all relevant, e.g. those for cryptography's bundled openssl, +# * not actually relevant for these old versions, e.g. 53048 for cryptography, +# * patched by us, e.g. 40291 for pip, 53048 for cryptography, +# * not patched: 52495 for setuptools. +# pip <21.1, click <8, dparse <0.5.2, wheel <0.38, safety <2.2, pywin32 <301. +SAFETY_IGNORED_OPTS="-i 40291 -i 47833 -i 50571 -i 51499 -i 51358 -i 54687" +# setuptools <65.5.1, requests <2.31.0, certifi <2023.07.22. +SAFETY_IGNORED_OPTS="$SAFETY_IGNORED_OPTS -i 52495 -i 58755 -i 52365 -i 59956" +# These are related to cryptography's bundled OpenSSL libs. We don't use those. +SAFETY_IGNORED_OPTS="$SAFETY_IGNORED_OPTS -i 53306 -i 53298 -i 53305 -i 53301" +SAFETY_IGNORED_OPTS="$SAFETY_IGNORED_OPTS -i 53307 -i 53304 -i 53302 -i 53299" +SAFETY_IGNORED_OPTS="$SAFETY_IGNORED_OPTS -i 53303 -i 59062 -i 60225 -i 60223" +SAFETY_IGNORED_OPTS="$SAFETY_IGNORED_OPTS -i 60224" +# Other cryptography vulnerabilities, see a few lines above for more details. +SAFETY_IGNORED_OPTS="$SAFETY_IGNORED_OPTS -i 53048 -i 59473" # setuptools 44.x is the last series to support Python 2.7. # More at https://github.com/pypa/setuptools/pull/1955. SETUPTOOLS_VERSION="44.1.1" -# Version 3.2.1 is used with OpenSSL 1.0.2 libs. -CRYPTOGRAPHY_VERSION="3.3.2" +# Version 3.2.1 (with patches) from python-modules/ is used with OpenSSL 1.0.2. +# Our patched versions fix CVE-2023-23931. +CRYPTOGRAPHY_VERSION="3.3.2chevah" # bcrypt 3.2.0 requires at least Python 3.6. BCRYPT_VERSION="3.1.7" # setproctitle 1.2.x requires at least Python 3.6. @@ -164,7 +179,7 @@ case $OS in # MSYS2's Perl is not good enough for building OpenSSL. export PATH="/c/Strawberry/perl/bin/:$PATH:/c/Program Files/NASM/" export BUILD_OPENSSL="yes" - # Extra libraries are installed only using PIP. + # Python modules are installed only using PIP. EXTRA_LIBRARIES="" PIP_LIBRARIES="$PIP_LIBRARIES \ pywin32==${PYWIN32_VERSION} \ @@ -202,8 +217,8 @@ case $OS in export BUILD_LIBEDIT="no" # As of January 2021, OpenSSL 1.0.2u is the latest version from IBM. export BUILD_OPENSSL="yes" - # 1.1.1 tests fail on AIX, use 1.0.2 with patches from Ubuntu 16.04 LTS. - OPENSSL_VERSION="1.0.2v-chevah4" + # 1.1.1 tests fail on AIX, use 1.0.2 with patches from CentOS 7. + OPENSSL_VERSION="1.0.2v-chevah5" # Perl's Test::Simple and its deps are required for building OpenSSL. execute perl -MTest::Simple -e 1 # cryptography 3.2.x, last version to support OpenSSL 1.0.2. @@ -236,9 +251,13 @@ case $OS in export BUILD_LIBFFI="yes" # OpenSSL 1.0.2 has extended support: https://tinyurl.com/2ck2sm6s. export CRYPTOGRAPHY_ALLOW_OPENSSL_102="yes" - # Put cryptography back, to build it against system OpenSSL. + # Build cryptography against system OpenSSL with our patches. # cryptography 3.2.1, last version working with OpenSSL 1.0.2. - PIP_LIBRARIES="cryptography==3.2.1 $PIP_LIBRARIES_OPENSSL_102" + EXTRA_LIBRARIES="$EXTRA_LIBRARIES \ + python-modules/cryptography-3.2.1 \ + " + # Use the appropriate PIP_LIBRARIES env var. + PIP_LIBRARIES="$PIP_LIBRARIES_OPENSSL_102" add_ignored_safety_ids_for_cryptography32 ;; macos) @@ -250,8 +269,12 @@ case $OS in # setup.py skips building readline by default, as it sets this to # "10.4", and then tries to avoid the broken readline in OS X 10.4. export MACOSX_DEPLOYMENT_TARGET=10.12 - # System includes bzip2 libs by default. - export BUILD_BZIP2="no" + # System included bzip2 libs by default up to and including macOS 10.15. + export BUILD_BZIP2="yes" + # Apparently, macOS 11 doesn't include zlib libraries either. + export BUILD_ZLIB="yes" + # Building readline fails on macOS 11, didn't look into it. + export BUILD_LIBEDIT="no" # 10.13 and newer come with LibreSSL instead of the old OpenSSL libs. # But 10.13 has version 2.2.7, while cryptography 2.9 requires 2.7. # Therefore, we build OpenSSL for both stdlib and cryptography. @@ -302,18 +325,6 @@ case $OS in export PATH="/usr/local/bin:$PATH" # In particular, Perl's Test::Simple and its deps are required. execute perl -MTest::Simple -e 1 - # Version 5.9.2-5.9.4 of psutil not working properly on CentOS 5. - # More at https://github.com/giampaolo/psutil/issues/2164. - # Should be fixed with the 5.9.5 release. - PIP_LIBRARIES="\ - cryptography==${CRYPTOGRAPHY_VERSION} \ - pyOpenSSL==${PYOPENSSL_VERSION} \ - scandir==${SCANDIR_VERSION} \ - subprocess32==${SUBPROCESS32_VERSION} \ - bcrypt==${BCRYPT_VERSION} \ - psutil=="5.9.1" \ - setproctitle==${SETPROCTITLE_VERSION} - " ;; *) # Only supported Linux distributions should be left. @@ -706,6 +717,10 @@ command_test() { echo '##### Testing for outdated packages and security issues... #####' execute $PYTHON_BIN -m pip list --outdated --format=columns + # Install wheel back for better collection of needed dependencies. + execute $PYTHON_BIN -m pip install $PIP_ARGS wheel + # Move include/ back for building some deps, like Cython on ARM64. + execute mv $INSTALL_FOLDER/lib/include $INSTALL_FOLDER/ # Safety needs PyYAML, which needs Cython, which needs to be built on AIX. aix_ld_hack init # This is the newest version that still works with Python 2.7.x. @@ -742,8 +757,8 @@ command_test() { (>&2 echo -e "\tSkipping because of upstream issues.") ;; lnx*) - if [ x${CHEVAH_CONTAINER-} = x"yes" ]; then - (>&2 echo -e "\tSkipping as it fails under Docker on CentOS 5.") + if [ -f /.dockerenv ]; then + (>&2 echo -e "\tSkipping as it fails under Docker.") else execute $PYTHON_BIN ${SCANDIR_FOLDER}/test/run_tests.py fi @@ -771,7 +786,7 @@ command_compat() { execute pushd build echo '##### Running chevah.compat tests... #####' execute rm -rf compat - execute git clone https://github.com/chevah/compat.git --depth=1 -b master + execute git clone https://github.com/chevah/compat.git --depth=1 -b py2-support execute pushd compat # Copy over current brink stuff, as some changes might require it. execute cp ../../brink.{conf,sh} ./ @@ -784,8 +799,6 @@ command_compat() { execute cp -r ../$LOCAL_PYTHON_BINARY_DIST cache/ # Make sure everything is done from scratch in the current dir. unset CHEVAH_CACHE CHEVAH_BUILD - # Install wheel back for the compat tests. - execute $PYTHON_BIN -m pip install $PIP_ARGS wheel # Some tests might fail due to causes which are not related to python. execute ./brink.sh deps if [ "${CHEVAH_CONTAINER:-}" = "yes" ]; then diff --git a/external_deps.csv b/external_deps.csv index 6978487e5..415065297 100644 --- a/external_deps.csv +++ b/external_deps.csv @@ -1,36 +1,35 @@ OS,AIX,,,Amazon,Alpine,Debian,FreeBSD,,HP-UX,macOS,OS X,RHEL,,,SLES,Solaris,,,,Ubuntu Server,,,,Windows, OS Version,5.3³,6.1³,7.1+¹,2+¹,3.12+¹,5.0+²,11.4³,12.2+³,11.31³,10.13+¹,10.8³,5.11-7.x¹,8.x¹,9.x¹,11SP4+²,10u8+³,11.0/11.1³,11.2³,11.4³,14.04/16.04¹,18.04¹,20.04¹,22.04¹,"XP, 2003, 2008³","2012r2, 2016, 2019, 2022¹" OpenSSL⁶,"1.0.2v-chevah2 (statically linked with stdlib “ssl”) -1.0.2v-chevah2 (statically linked with cryptography)",1.0.2k (from AIX Web Download Pack Programs),"1.0.2v-chevah4 (statically linked with stdlib “ssl”) -1.0.2v-chevah4 (statically linked with cryptography)","1.1.1t (statically linked with stdlib “ssl”) -1.1.1t (statically linked with cryptography)","1.1.1t (statically linked with stdlib “ssl”) -1.1.1t (statically linked with cryptography)","1.1.1t (statically linked with stdlib “ssl”) -1.1.1t (statically linked with cryptography)",1.0.1u,1.0.2s,1.0.2h,"1.1.1t (statically linked with stdlib “ssl”) -1.1.1t (statically linked with cryptography)","1.1.1g (statically built for stdlib “ssl”) -1.1.1g (bundled with upstream cryptography 2.9.1)","1.1.1t (statically linked with stdlib “ssl”) -1.1.1t (statically linked with cryptography)","1.1.1cFIPS / -1.1.1k FIPS","1.1.1t (statically linked with stdlib “ssl”) -1.1.1t (statically linked with cryptography)","1.1.1t (statically linked with stdlib “ssl”) -1.1.1t (statically linked with cryptography)",1.0.2n (from upstream Oracle patches),1.0.0x,1.0.1h," -1.0.2o","1.1.1t (statically linked with stdlib “ssl”) -1.1.1t (statically linked with cryptography)",1.1.0g,1.1.1f,"1.1.1t (statically linked with stdlib “ssl”) -1.1.1t (statically linked with cryptography)","1.0.2t (bundled with upstream Python 2.7.18) +1.0.2v-chevah2 (statically linked with cryptography)",1.0.2k (from AIX Web Download Pack Programs),"1.0.2v-chevah5¹⁵ (statically linked with stdlib “ssl”) +1.0.2v-chevah5¹⁵ (statically linked with cryptography)","1.1.1w (statically linked with stdlib “ssl”) +1.1.1w (statically linked with cryptography)","1.1.1w (statically linked with stdlib “ssl”) +1.1.1w (statically linked with cryptography)","1.1.1w (statically linked with stdlib “ssl”) +1.1.1w (statically linked with cryptography)",1.0.1u,1.0.2s,1.0.2h,"1.1.1w (statically linked with stdlib “ssl”) +1.1.1w (statically linked with cryptography)","1.1.1g (statically built for stdlib “ssl”) +1.1.1g (bundled with upstream cryptography 2.9.1)","1.1.1w (statically linked with stdlib “ssl”) +1.1.1w (statically linked with cryptography)","1.1.1cFIPS / +1.1.1k FIPS","1.1.1w (statically linked with stdlib “ssl”) +1.1.1w (statically linked with cryptography)","1.1.1w (statically linked with stdlib “ssl”) +1.1.1w (statically linked with cryptography)",1.0.2n (from upstream Oracle patches),1.0.0x,1.0.1h," +1.0.2o","1.1.1w (statically linked with stdlib “ssl”) +1.1.1w (statically linked with cryptography)",1.1.0g,1.1.1f,"1.1.1w (statically linked with stdlib “ssl”) +1.1.1w (statically linked with cryptography)","1.0.2t (bundled with upstream Python 2.7.18) 1.1.1g (bundled with upstream cryptography 2.9.1)","1.0.2t⁹ (bundled with upstream Python 2.7.18) -1.1.1t (built from upstream sources for cryptography)" +1.1.1w (built from upstream sources for cryptography)" Python,2.7.18+patches,2.7.18¹¹,2.7.18+patches,2.7.18+patches,2.7.18+patches,2.7.18+patches,2.7.18¹¹,2.7.18+patches,2.7.18+patches,2.7.18+patches,2.7.18¹¹,2.7.18+patches,2.7.18+patches,2.7.18+patches,2.7.18+patches,2.7.8⁴,2.7.18¹¹,2.7.18+patches,2.7.18+patches,2.7.18+patches,2.7.18+patches,2.7.18+patches,2.7.18+patches,2.7.18¹¹,2.7.18¹³ -SQLite,3.34.1,3.34.1,3.40.1,3.40.1,3.40.1,3.40.1,3.30.1,3.34.1,3.34.1,3.40.1,3.30.1,3.40.1,3.40.1,3.40.1,3.40.1,3.34.1,3.30.1,3.34.1,3.34.1,3.40.1,3.40.1,3.40.1,3.40.1,3.30.1 (we overwrite version from upstream Python at build time),3.40.1 (we overwrite version from upstream Python at build time) +SQLite,3.34.1,3.34.1,3.43.1,3.43.1,3.43.1,3.43.1,3.30.1,3.34.1,3.34.1,3.43.1,3.30.1,3.43.1,3.43.1,3.43.1,3.43.1,3.34.1,3.30.1,3.34.1,3.34.1,3.43.1,3.43.1,3.43.1,3.43.1,3.30.1 (we overwrite version from upstream Python at build time),3.43.1 (we overwrite version from upstream Python at build time) Expat,2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.1.0⁵ (bundled with Python 2.7.8),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python),2.2.8 (bundled with Python) -zlib,1.2.12,p/o,1.2.13,1.2.13,p/o,1.2.13,p/o,p/o,1.2.12,p/o,p/o,1.2.13,p/o,1.2.13,1.2.13,p/o,p/o,p/o,p/o,1.2.13,p/o,p/o,1.2.13,1.2.11⁸ (bundled with Python),1.2.11⁸ (bundled with Python) +zlib,1.2.12,p/o,1.3,1.3,p/o,1.3,p/o,p/o,1.2.12,1.3,p/o,1.3,p/o,1.3,1.3,p/o,p/o,p/o,p/o,1.3,p/o,p/o,1.3,1.2.11⁸ (bundled with Python),1.2.11⁸ (bundled with Python) bzip2,1.0.8,1.0.8,1.0.8,1.0.8,1.0.8,1.0.8,p/o,p/o,1.0.8,p/o,p/o,1.0.8,1.0.8,1.0.8,1.0.8,p/o,p/o,p/o,p/o,1.0.8,1.0.8,1.0.8,1.0.8,1.0.6 (bundled with Python),1.0.6 (bundled with Python) libffi,3.4.4,3.4.2,3.4.4,p/o,3.4.4,3.4.4,3.4.2,3.4.2,3.4.2,p/o,p/o,3.4.4,p/o,3.4.4,3.4.4,n/a,n/a,3.4.2,3.4.2,p/o,p/o,p/o,p/o,n/a,n/a -libedit,n/a,n/a,n/a,n/a,20170329-3.1,n/a,20170329-3.1,20170329-3.1,n/a,20170329-3.1,20170329-3.1,n/a,20170329-3.1,n/a,n/a,n/a,20170329-3.1,20170329-3.1,20170329-3.1,n/a,20170329-3.1,20170329-3.1,n/a,n/a,n/a +libedit,n/a,n/a,n/a,n/a,20170329-3.1,n/a,20170329-3.1,20170329-3.1,n/a,n/a,20170329-3.1,n/a,20170329-3.1,n/a,n/a,n/a,20170329-3.1,20170329-3.1,20170329-3.1,n/a,20170329-3.1,20170329-3.1,n/a,n/a,n/a pysqlite,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,2.8.3,"n/a, upstream sqlite3 is used","n/a, upstream sqlite3 is used" pip,20.3.4¹⁴,9.0.3¹⁴,20.3.4chevah1,20.3.4chevah1,20.3.4chevah1,20.3.4chevah1,9.0.3¹⁴,20.3.4chevah1,20.3.4¹⁴,20.3.4chevah1,9.0.3¹⁴,20.3.4chevah1,20.3.4chevah1,20.3.4chevah1,20.3.4chevah1,20.3.4¹⁴,9.0.3¹⁴,20.3.4¹⁴,20.3.4chevah1,20.3.4chevah1,20.3.4chevah1,20.3.4chevah1,20.3.4chevah1,20.3.4¹⁴,20.3.4chevah1 -setuptools,44.1.1,44.1.1,44.1.1,44.1.1,44.1.1,44.1.1,44.1.1,44.1.1,44.1.1,44.1.1,44.1.1,44.1.1,44.1.1,44.1.1,44.1.1,41.6.0,41.6.0,41.6.0,44.1.1,44.1.1,44.1.1,44.1.1,44.1.1,44.1.1,44.1.1 -wheel,0.36.2,0.33.6,0.37.0,0.37.0,0.37.0,0.37.0,0.33.6,0.37.0,0.36.2,0.37.0,0.33.6,0.37.0,0.37.0,0.37.0,0.37.0,0.36.2,0.33.6,0.36.2,0.37.0,0.37.0,0.37.0,0.37.0,0.37.0,0.36.2,0.37.0 +setuptools,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,41.6.0¹⁷,41.6.0¹⁷,41.6.0¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷,44.1.1¹⁷ pycparser,2.20,2.20,2.21,2.21,2.21,2.21,2.20,2.21,2.20,2.21,2.20,2.21,2.21,2.21,2.21,2.20,2.20,2.20,2.21,2.21,2.21,2.21,2.21,2.20,2.21 setproctitle,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10,1.1.10 -cryptography,3.2.1¹²,2.9.2¹²,3.2.1¹²,3.3.2,3.3.2,3.3.2,2.9.2¹²,3.3.2,n/a,3.3.2,2.9.2¹² (wheel includes OpenSSL),3.3.2,3.3.2,3.3.2,3.3.2,n/a,n/a,n/a,3.2.1¹²,3.3.2,3.3.2,3.3.2,3.3.2,2.9.2¹² (wheel includes OpenSSL),3.3.2 +cryptography,3.2.1¹²,2.9.2¹²,3.2.1¹⁶,3.3.2¹⁶,3.3.2¹⁶,3.3.2¹⁶,2.9.2¹²,3.3.2¹⁶,n/a,3.3.2¹⁶,2.9.2¹² (wheel includes OpenSSL),3.3.2¹⁶,3.3.2¹⁶,3.3.2¹⁶,3.3.2¹⁶,n/a,n/a,n/a,3.2.1¹²,3.3.2¹⁶,3.3.2¹⁶,3.3.2¹⁶,3.3.2¹⁶,2.9.2¹² (wheel includes OpenSSL),3.3.2¹⁶ six,1.15.0,1.13.0,1.15.0,1.15.0,1.15.0,1.15.0,1.11.0,1.15.0,1.15.0,1.15.0,1.11.0,1.15.0,1.15.0,1.15.0,1.15.0,1.15.0,1.11.0,1.15.0,1.15.0,1.11.0,1.11.0,1.11.0,1.11.0,1.11.0,1.11.0 ipaddress,1.0.23,1.0.23,1.0.23,1.0.23,1.0.23,1.0.23,1.0.23,1.0.23,n/a,1.0.23,1.0.23,1.0.23,1.0.23,1.0.23,1.0.23,n/a,n/a,n/a,1.0.23,1.0.23,1.0.23,1.0.23,1.0.23,1.0.23,1.0.23 cffi,1.14.5,1.14.0,1.15.1,1.15.1,1.15.1,1.15.1,1.14.0,1.15.1,n/a,1.15.1,1.14.0,1.15.1,1.15.1,1.15.1,1.15.1,n/a,1.14.0,1.14.5,1.15.1,1.15.1,1.15.1,1.15.1,1.15.1,1.14.0,1.15.1 @@ -39,7 +38,7 @@ enum34,1.1.10,1.1.6,1.1.10,1.1.10,1.1.10,1.1.10,1.1.6,1.1.10,n/a,1.1.10,1.1.6,1. idna,n/a,2.6,n/a,n/a,n/a,n/a,2.6,n/a,n/a,n/a,2.6,n/a,n/a,n/a,n/a,n/a,2.6,n/a,n/a,n/a,n/a,n/a,n/a,2.6,n/a pyOpenSSL,19.1.0,19.1.0,19.1.0,21.0.0,21.0.0,21.0.0,19.1.0,21.0.0,0.13.1⁷,21.0.0,19.1.0,21.0.0,21.0.0,21.0.0,21.0.0,0.13.1⁷,0.13.1⁷,0.13.1⁷,19.1.0,21.0.0,21.0.0,21.0.0,21.0.0,19.1.0,21.0.0 scandir,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0,1.10.0 -psutil,n/a,5.6.5,5.9.3,5.9.3,5.9.3,5.9.3,n/a,5.9.2,n/a,5.9.3,5.6.5,5.9.3,5.9.3,5.9.3,5.9.3,n/a,n/a,n/a,5.9.2,5.9.3,5.9.3,5.9.3,5.9.3,n/a,5.9.3 +psutil,n/a,5.6.5,5.9.5,5.9.5,5.9.5,5.9.5,n/a,5.9.2,n/a,5.9.5,5.6.5,5.9.5,5.9.5,5.9.5,5.9.5,n/a,n/a,n/a,5.9.2,5.9.5,5.9.5,5.9.5,5.9.5,n/a,5.9.5 subprocess32,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4,3.5.4 bcrypt,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,n/a,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7,3.1.7 pywin32,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,,n/a,227,228 @@ -57,5 +56,8 @@ Colour codes:,DARKGREY: Tier 2 platforms and their problematic dependencies,,,,, ,,,,,,,,,,,,10. https://www.openssl.org/news/openssl-1.1.1-notes.html,,,,,,,,,,,,, ,,,,,,,,,,,,11. https://github.com/ActiveState/cpython/tags,,,,,,,,,,,,, ,,,,,,,,,,,,12. https://cryptography.io/en/latest/changelog.html,,,,,,,,,,,,, -,,,,,,,,,,,,"13. On Windows, the upstream Python 2.7.18 packages are hot patched with all the ActivePython fixes except CVE-2021-3177 and CVE-2020-10735",,,,,,,,,,,,, +,,,,,,,,,,,,"13. On Windows, the upstream Python 2.7.18 packages are hot patched for all known issues except CVE-2021-3177 and CVE-2020-10735",,,,,,,,,,,,, ,,,,,,,,,,,,14. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3572,,,,,,,,,,,,, +,,,,,,,,,,,,15. Corresponds to upstream OpenSSL version 1.0.2zg from 07 Feb 2023.,,,,,,,,,,,,, +,,,,,,,,,,,,"16. Both cryptography 3.2.1 and version 3.3.2 have been patched for CVE-2023-23931, but not for CVE-2023-38325.",,,,,,,,,,,,, +,,,,,,,,,,,,17. Versions older than 65.5.1 are vulnerable to CVE-2022-40897.,,,,,,,,,,,,, diff --git a/external_deps.fods b/external_deps.fods index bea79aa2b..3752d24ba 100644 --- a/external_deps.fods +++ b/external_deps.fods @@ -1,20 +1,20 @@ - LibreOffice/7.4.3.2$Linux_X86_64 LibreOffice_project/40$Build-2139PT8H33M6Spython-package - external dependencies and associated vulnerabilities2023-02-08T13:01:47.997122665 + LibreOffice/7.6.2.1$Linux_X86_64 LibreOffice_project/56f7684011345957bbf33a7ee678afaf4d2ba333151PT9H17M48Spython-package - external dependencies and associated vulnerabilities2023-10-10T11:39:47.776983843 0 0 - 46625 - 22571 + 49331 + 24070 view1 - 25 - 5 + 3 + 2 2 2 1 @@ -29,21 +29,25 @@ 60 true false + false + false + false Sheet1 - 1847 + 1906 0 100 60 false true true + false true 12632256 true - true 1 + true true false false @@ -54,6 +58,9 @@ 1 true false + false + false + false @@ -96,7 +103,7 @@ false Generic Printer false - oAH+/0dlbmVyaWMgUHJpbnRlcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU0dFTlBSVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAMAwQAAAAAAAAAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9R2VuZXJpYyBQcmludGVyCm9yaWVudGF0aW9uPVBvcnRyYWl0CmNvcGllcz0xCmNvbGxhdGU9ZmFsc2UKbWFyZ2luYWRqdXN0bWVudD0wLDAsMCwwCmNvbG9yZGVwdGg9MjQKcHNsZXZlbD0wCnBkZmRldmljZT0xCmNvbG9yZGV2aWNlPTAKUFBEQ29udGV4dERhdGEKRHVwbGV4Ok5vbmUAUGFnZVNpemU6QTQAABIAQ09NUEFUX0RVUExFWF9NT0RFDwBEdXBsZXhNb2RlOjpPZmY= + 1gH+/0dlbmVyaWMgUHJpbnRlcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU0dFTlBSVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAMAwgAAAAAAAAAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9R2VuZXJpYyBQcmludGVyCm9yaWVudGF0aW9uPVBvcnRyYWl0CmNvcGllcz0xCmNvbGxhdGU9ZmFsc2UKbWFyZ2luYWRqdXN0bWVudD0wLDAsJzAsMApjb2xvcmRlcHRoPTI0CnBzbGV2ZWw9MApwZGZkZXZpY2U9MQpjb2xvcmRldmljZT0wClBQRENvbnRleHREYXRhClBhZ2VTaXplOkE0AER1cGxleDpOb25lAAASAENPTVBBVF9EVVBMRVhfTU9ERQ8ARHVwbGV4TW9kZTo6T2ZmDABQUklOVEVSX05BTUUPAEdlbmVyaWMgUHJpbnRlcgsARFJJVkVSX05BTUUHAFNHRU5QUlQ= false 1000 1000 @@ -104,6 +111,7 @@ 1 true false + false true true true @@ -126,213 +134,227 @@ + + - + + + + + + + + + + + + + - + $ - + - $ - + - + : - + : : - + : - + - + - + - - + - + lei - + - lei - + - + - + - - + - - + - - - + + + - + lei - + - lei - + - lei - + - - - + + + - + - + - - + - + lei - + - lei - + - lei - + - - - + + + - + . . - + lei - + - lei - + - + - + - - + - + . - + - + - - + - + : - + lei - + - lei - + - + : @@ -341,40 +363,40 @@ - + lei - + - lei - + - + - + - - + - - + - - - + + + - + . @@ -440,591 +462,604 @@ - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - - + + - + - - + + - + - - + + - + - - + + - + - - + + + + + + + + + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + + + + + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - - - - - - + - - + + - + - - + + - + - - + + - + - + - + - - + + - + - - + + - + + + + + + - - + + + + + + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - - - - - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - - - - - - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - + - - + + - - - - - - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - - - - - - + - - - - - - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - - - - - - + + - + - - + + - + - - - - - - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - - - - - - + + - + - - + + + + + + + + + + + - + + + + + + + + + + - + + + - + + + + + + + + + + + + @@ -1058,122 +1093,178 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + ??? + + + + + Page 1 + + + + + + + + ???(???) + + + 00/00/0000, 00:00:00 + + + + + + Page 1/ 99 + + + + + @@ -1196,11 +1287,11 @@ - + + - @@ -1220,11 +1311,11 @@ OS - + AIX - - + + Amazon @@ -1266,2113 +1357,2042 @@ Windows - - + + - + OS Version - 5.3³ + 5.3³ - 6.1³ + 6.1³ - + 7.1+¹ - + 2+¹ - + 3.12+¹ - 5.0+² + 5.0+² - 11.4³ + 11.4³ - 12.2+³ + 12.2+³ - 11.31³ + 11.31³ - + 10.13+¹ - 10.8³ + 10.8³ - + 5.11-7.x¹ - + 8.x¹ - + 9.x¹ - 11SP4+² + 11SP4+² - 10u8+³ + 10u8+³ - 11.0/11.1³ + 11.0/11.1³ - 11.2³ + 11.2³ - 11.4³ + 11.4³ - + 14.04/16.04¹ - + 18.04¹ - + 20.04¹ - + 22.04¹ - XP, 2003, 2008³ + XP, 2003, 2008³ - + 2012r2, 2016, 2019, 2022¹ - OpenSSL + OpenSSL - 1.0.2v-chevah2 (statically linked with stdlib “ssl”)1.0.2v-chevah2 (statically linked with cryptography) + 1.0.2v-chevah2 (statically linked with stdlib “ssl”)1.0.2v-chevah2 (statically linked with cryptography) - 1.0.2k (from AIX Web Download Pack Programs) + 1.0.2k (from AIX Web Download Pack Programs) - 1.0.2v-chevah4 (statically linked with stdlib “ssl”)1.0.2v-chevah4 (statically linked with cryptography) + 1.0.2v-chevah5¹⁵ (statically linked with stdlib “ssl”)1.0.2v-chevah5¹⁵ (statically linked with cryptography) - 1.1.1t (statically linked with stdlib “ssl”)1.1.1t (statically linked with cryptography) + 1.1.1w (statically linked with stdlib “ssl”)1.1.1w (statically linked with cryptography) - 1.1.1t (statically linked with stdlib “ssl”)1.1.1t (statically linked with cryptography) + 1.1.1w (statically linked with stdlib “ssl”)1.1.1w (statically linked with cryptography) - 1.1.1t (statically linked with stdlib “ssl”)1.1.1t (statically linked with cryptography) + 1.1.1w (statically linked with stdlib “ssl”)1.1.1w (statically linked with cryptography) - + 1.0.1u - + 1.0.2s - + 1.0.2h - 1.1.1t (statically linked with stdlib “ssl”)1.1.1t (statically linked with cryptography) + 1.1.1w (statically linked with stdlib “ssl”)1.1.1w (statically linked with cryptography) - 1.1.1g (statically built for stdlib “ssl”)1.1.1g (bundled with upstream cryptography 2.9.1) + 1.1.1g (statically built for stdlib “ssl”)1.1.1g (bundled with upstream cryptography 2.9.1) - 1.1.1t (statically linked with stdlib “ssl”)1.1.1t (statically linked with cryptography) + 1.1.1w (statically linked with stdlib “ssl”)1.1.1w (statically linked with cryptography) - 1.1.1cFIPS /1.1.1k FIPS + 1.1.1cFIPS /1.1.1k FIPS - 1.1.1t (statically linked with stdlib “ssl”)1.1.1t (statically linked with cryptography) + 1.1.1w (statically linked with stdlib “ssl”)1.1.1w (statically linked with cryptography) - 1.1.1t (statically linked with stdlib “ssl”)1.1.1t (statically linked with cryptography) + 1.1.1w (statically linked with stdlib “ssl”)1.1.1w (statically linked with cryptography) - 1.0.2n (from upstream Oracle patches) + 1.0.2n (from upstream Oracle patches) - + 1.0.0x - + 1.0.1h - 1.0.2o + 1.0.2o - 1.1.1t (statically linked with stdlib “ssl”)1.1.1t (statically linked with cryptography) + 1.1.1w (statically linked with stdlib “ssl”)1.1.1w (statically linked with cryptography) - + 1.1.0g - + 1.1.1f - 1.1.1t (statically linked with stdlib “ssl”)1.1.1t (statically linked with cryptography) + 1.1.1w (statically linked with stdlib “ssl”)1.1.1w (statically linked with cryptography) - 1.0.2t (bundled with upstream Python 2.7.18)1.1.1g (bundled with upstream cryptography 2.9.1) + 1.0.2t (bundled with upstream Python 2.7.18)1.1.1g (bundled with upstream cryptography 2.9.1) - 1.0.2t⁹ (bundled with upstream Python 2.7.18)1.1.1t (built from upstream sources for cryptography) + 1.0.2t⁹ (bundled with upstream Python 2.7.18)1.1.1w (built from upstream sources for cryptography) - + Python - + 2.7.18+patches - 2.7.18¹¹ + 2.7.18¹¹ - + 2.7.18+patches - + 2.7.18+patches - 2.7.18¹¹ + 2.7.18¹¹ - + 2.7.18+patches - + 2.7.18+patches - 2.7.18¹¹ + 2.7.18¹¹ - + 2.7.18+patches - + 2.7.18+patches - + 2.7.18+patches - + 2.7.18+patches - 2.7.8 + 2.7.8 - 2.7.18¹¹ + 2.7.18¹¹ - + 2.7.18+patches - + 2.7.18+patches - + 2.7.18+patches - + 2.7.18+patches - + 2.7.18+patches - 2.7.18¹¹ + 2.7.18¹¹ - 2.7.18¹³ + 2.7.18¹³ - + SQLite - + 3.34.1 - + 3.34.1 - - 3.40.1 + + 3.43.1 - - 3.40.1 + + 3.43.1 - + 3.30.1 - + 3.34.1 - - 3.40.1 + + 3.43.1 - + 3.30.1 - - 3.40.1 + + 3.43.1 - - 3.40.1 + + 3.43.1 - - 3.40.1 + + 3.43.1 - + 3.34.1 - + 3.30.1 - + 3.34.1 - - 3.40.1 + + 3.43.1 - - 3.40.1 + + 3.43.1 - 3.30.1 (we overwrite version from upstream Python at build time) + 3.30.1 (we overwrite version from upstream Python at build time) - 3.40.1 (we overwrite version from upstream Python at build time) + 3.43.1 (we overwrite version from upstream Python at build time) - - + + Expat - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.1.0⁵ (bundled with Python 2.7.8) + 2.1.0⁵ (bundled with Python 2.7.8) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - 2.2.8 (bundled with Python) + 2.2.8 (bundled with Python) - - + + zlib - + 1.2.12 - + p/o - - 1.2.13 - - - 1.2.13 + + 1.3 - + p/o - - 1.2.13 + + 1.3 - + p/o - + p/o - + 1.2.12 - - p/o + + 1.3 - + p/o - - 1.2.13 + + 1.3 - + p/o - - 1.2.13 - - - 1.2.13 + + 1.3 - + p/o - + p/o - + p/o - - 1.2.13 + + 1.3 - + p/o - - 1.2.13 + + 1.3 - 1.2.11 (bundled with Python) + 1.2.11 (bundled with Python) - 1.2.11 (bundled with Python) + 1.2.11 (bundled with Python) - + bzip2 - + 1.0.8 - + 1.0.8 - + 1.0.8 - + 1.0.8 - + 1.0.8 - + 1.0.8 - + p/o - + p/o - + 1.0.8 - + p/o - + p/o - + 1.0.8 - + 1.0.8 - + 1.0.8 - + 1.0.8 - + p/o - + p/o - + p/o - + 1.0.8 - + 1.0.8 - + 1.0.8 - 1.0.6 (bundled with Python) + 1.0.6 (bundled with Python) - 1.0.6 (bundled with Python) + 1.0.6 (bundled with Python) - + libffi - + 3.4.4 - + 3.4.2 - + 3.4.4 - + p/o - + 3.4.4 - + 3.4.4 - + 3.4.2 - + 3.4.2 - + 3.4.2 - + p/o - + p/o - + 3.4.4 - + p/o - + 3.4.4 - + 3.4.4 - + n/a - + n/a - + 3.4.2 - + 3.4.2 - + p/o - + p/o - + p/o - + n/a - + n/a - + libedit - + n/a - + n/a - + n/a - + n/a - + 20170329-3.1 - + n/a - + 20170329-3.1 - + 20170329-3.1 - + n/a - - 20170329-3.1 - - + 20170329-3.1 - + n/a - + 20170329-3.1 - + n/a - + n/a - + 20170329-3.1 - + 20170329-3.1 - + n/a - + 20170329-3.1 - + 20170329-3.1 - + n/a - + n/a - + n/a - + pysqlite - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + 2.8.3 - + n/a, upstream sqlite3 is used - - + + pip - 20.3.4¹⁴ + 20.3.4¹⁴ - 9.0.3¹⁴ + 9.0.3¹⁴ - + 20.3.4chevah1 - + 20.3.4chevah1 - + 20.3.4chevah1 - + 20.3.4chevah1 - 9.0.3¹⁴ + 9.0.3¹⁴ - + 20.3.4chevah1 - 20.3.4¹⁴ + 20.3.4¹⁴ - + 20.3.4chevah1 - 9.0.3¹⁴ + 9.0.3¹⁴ - + 20.3.4chevah1 - + 20.3.4chevah1 - + 20.3.4chevah1 - + 20.3.4chevah1 - 20.3.4¹⁴ + 20.3.4¹⁴ - 9.0.3¹⁴ + 9.0.3¹⁴ - 20.3.4¹⁴ + 20.3.4¹⁴ - + 20.3.4chevah1 - + 20.3.4chevah1 - + 20.3.4chevah1 - + 20.3.4chevah1 - 20.3.4¹⁴ + 20.3.4¹⁴ - + 20.3.4chevah1 - - + + setuptools - - 44.1.1 - - - 44.1.1 - - - 44.1.1 - - - 44.1.1 - - - 44.1.1 - - - 44.1.1 - - - 44.1.1 - - - 44.1.1 - - - 44.1.1 - - - 44.1.1 - - - 44.1.1 - - - 44.1.1 - - - 44.1.1 - - - 41.6.0 - - - 41.6.0 - - - 44.1.1 - - - 44.1.1 - - - 44.1.1 - - - 44.1.1 + 44.1.1¹⁷ - - 44.1.1 + 44.1.1¹⁷ - - 44.1.1 + 44.1.1¹⁷ - - - - - wheel - - - 0.36.2 - - - 0.33.6 + 44.1.1¹⁷ - - 0.37.0 + 44.1.1¹⁷ - - 0.37.0 + 44.1.1¹⁷ - - 0.37.0 + 44.1.1¹⁷ - - 0.37.0 + 44.1.1¹⁷ - - 0.33.6 + 44.1.1¹⁷ - - 0.37.0 + 44.1.1¹⁷ - - 0.36.2 + 44.1.1¹⁷ - - 0.37.0 + 44.1.1¹⁷ - - 0.33.6 + 44.1.1¹⁷ - - 0.37.0 + 44.1.1¹⁷ - - 0.37.0 + 44.1.1¹⁷ - - 0.37.0 + 41.6.0¹⁷ - - 0.37.0 + 41.6.0¹⁷ - - 0.36.2 + 41.6.0¹⁷ - - 0.33.6 + 44.1.1¹⁷ - - 0.36.2 + 44.1.1¹⁷ - - 0.37.0 + 44.1.1¹⁷ - - 0.37.0 + 44.1.1¹⁷ - - 0.37.0 + 44.1.1¹⁷ - - 0.37.0 + 44.1.1¹⁷ - - 0.36.2 - - - 0.37.0 + 44.1.1¹⁷ - + pycparser - + 2.20 - + 2.21 - + 2.21 - + 2.20 - + 2.21 - + 2.20 - + 2.21 - + 2.20 - + 2.21 - + 2.21 - + 2.21 - + 2.20 - + 2.21 - + 2.21 - + 2.21 - + 2.20 - + 2.21 - + setproctitle - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + cryptography - 3.2.1¹² + 3.2.1¹² - 2.9.2¹² + 2.9.2¹² - 3.2.1¹² + 3.2.1¹⁶ - - 3.3.2 + 3.3.2¹⁶ - - 3.3.2 + 3.3.2¹⁶ - - 3.3.2 + 3.3.2¹⁶ - 2.9.2¹² + 2.9.2¹² - - 3.3.2 + 3.3.2¹⁶ - + n/a - - 3.3.2 + 3.3.2¹⁶ - 2.9.2¹² (wheel includes OpenSSL) + 2.9.2¹² (wheel includes OpenSSL) - - 3.3.2 + 3.3.2¹⁶ - - 3.3.2 + 3.3.2¹⁶ - - 3.3.2 + 3.3.2¹⁶ - - 3.3.2 + 3.3.2¹⁶ - + n/a - + n/a - 3.2.1¹² + 3.2.1¹² - - 3.3.2 + 3.3.2¹⁶ - - 3.3.2 + 3.3.2¹⁶ - - 3.3.2 + 3.3.2¹⁶ + + 3.3.2¹⁶ - 2.9.2¹² (wheel includes OpenSSL) + 2.9.2¹² (wheel includes OpenSSL) - - 3.3.2 + 3.3.2¹⁶ - + six - + 1.15.0 - + 1.13.0 - + 1.15.0 - + 1.15.0 - + 1.15.0 - + 1.15.0 - + 1.11.0 - + 1.15.0 - + 1.15.0 - + 1.15.0 - + 1.11.0 - + 1.15.0 - + 1.15.0 - + 1.15.0 - + 1.15.0 - + 1.11.0 - + 1.15.0 - + 1.15.0 - + 1.11.0 - + 1.11.0 - + 1.11.0 - + 1.11.0 - + 1.11.0 - + ipaddress - + 1.0.23 - + 1.0.23 - + 1.0.23 - + 1.0.23 - + 1.0.23 - + 1.0.23 - + 1.0.23 - + n/a - + 1.0.23 - + 1.0.23 - + 1.0.23 - + 1.0.23 - + 1.0.23 - + 1.0.23 - + n/a - + n/a - + 1.0.23 - + 1.0.23 - + 1.0.23 - + 1.0.23 - + 1.0.23 - + 1.0.23 - + cffi - + 1.14.5 - + 1.14.0 - + 1.15.1 - + 1.15.1 - + 1.15.1 - + 1.15.1 - + 1.14.0 - + 1.15.1 - + n/a - + 1.15.1 - + 1.14.0 - + 1.15.1 - + 1.15.1 - + 1.15.1 - + 1.15.1 - + n/a - + 1.14.0 - + 1.14.5 - + 1.15.1 - + 1.15.1 - + 1.15.1 - + 1.15.1 - + 1.14.0 - + 1.15.1 - + asn1crypto - + n/a - + 1.2.0 - + n/a - + 1.2.0 - + n/a - + n/a - + 1.2.0 - + n/a - + n/a - + n/a - + n/a - + 1.2.0 - + n/a - + n/a - + n/a - + n/a - + n/a - + 1.2.0 - + n/a - + enum34 - + 1.1.10 - + 1.1.6 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.6 - + 1.1.10 - + n/a - + 1.1.10 - + 1.1.6 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - - - + + + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.10 - + 1.1.6 - + 1.1.10 - + idna - + n/a - + 2.6 - + n/a - + 2.6 - + n/a - + n/a - + 2.6 - + n/a - + n/a - + n/a - + n/a - + 2.6 - + n/a - + n/a - + n/a - + n/a - + n/a - + 2.6 - + n/a - - + + pyOpenSSL - + 19.1.0 - + 19.1.0 - + 19.1.0 - + 21.0.0 - + 21.0.0 - + 21.0.0 - + 19.1.0 - + 21.0.0 - 0.13.1 + 0.13.1 - + 21.0.0 - + 19.1.0 - + 21.0.0 - + 21.0.0 - + 21.0.0 - + 21.0.0 - 0.13.1 + 0.13.1 - 0.13.1 + 0.13.1 - 0.13.1 + 0.13.1 - + 19.1.0 - + 21.0.0 - + 21.0.0 - + 21.0.0 - + 19.1.0 - + 21.0.0 - + scandir - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + 1.10.0 - + psutil - + n/a - + 5.6.5 - - 5.9.3 + + 5.9.5 - - 5.9.3 + + 5.9.5 - - 5.9.3 + + 5.9.5 - - 5.9.3 + + 5.9.5 - + n/a - + 5.9.2 - + n/a - - 5.9.3 + + 5.9.5 - + 5.6.5 - - 5.9.3 + + 5.9.5 - - 5.9.3 + + 5.9.5 - - 5.9.3 + + 5.9.5 - - 5.9.3 + + 5.9.5 - + n/a - + n/a - + 5.9.2 - - 5.9.3 + + 5.9.5 - - 5.9.3 + + 5.9.5 - - 5.9.3 + + 5.9.5 - + n/a - - 5.9.3 + + 5.9.5 - + subprocess32 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + 3.5.4 - + bcrypt - + 3.1.7 - + 3.1.7 - + 3.1.7 - + 3.1.7 - + 3.1.7 - + 3.1.7 - + 3.1.7 - + n/a - + 3.1.7 - + 3.1.7 - + 3.1.7 - + 3.1.7 - + 3.1.7 - + 3.1.7 - + 3.1.7 - + 3.1.7 - + 3.1.7 - + 3.1.7 - + 3.1.7 - + 3.1.7 - + 3.1.7 - + pywin32 - + n/a - + n/a - + n/a - + n/a - + n/a - + n/a - + n/a - + n/a - + n/a - + n/a - + n/a - + n/a - + n/a - + n/a - + n/a - + n/a - + n/a - + n/a - - + + n/a - + 227 - + 228 - - + + - + Abbreviations: - + n/a: not applicable - - - + + + Notes: - + 0. Dependencies above are listed as per the current build process, not necessarily for the latest released versions of python-package. - + + - - + + p/o: provided with OS - - - - + + + + 1. Tier 1 platforms, fully supported and tested - + + - - + + Colour codes: - DARKGREY: Tier 2 platforms and their problematic dependencies + DARKGREY: Tier 2 platforms and their problematic dependencies - - - - + + + + 2. Tier 2 platforms, partially supported, still built - + + - - - LIGHT GREY: Tier 3 platforms and their problematic dependencies + + + LIGHT GREY: Tier 3 platforms and their problematic dependencies - - - - + + + + 3. Tier 3 platforms, supported at some point, not built any more - + + - - - GREEN: no known vulnerabilities for Tier 1 platforms + + + GREEN: no known vulnerabilities for Tier 1 platforms - - - - + + + + 4. https://www.cvedetails.com/vulnerability-list/vendor_id-10210/product_id-18230/version_id-92056/Python-Python-2.7.html - + + - - - BLUE: possible vulnerabilities found upstream, but no released version has them yet + + + BLUE: possible vulnerabilities found upstream, but no released version has them yet - - - - + + + + 5. https://github.com/libexpat/libexpat/blob/master/expat/Changes - + + - - - ORANGE: minor vulnerabilities found + + + ORANGE: minor vulnerabilities found - - - - + + + + 6. Unless specified otherwise, OpenSSL libs are linked against dynamically - + + - - - RED: major vulnerabilities found + + + RED: major vulnerabilities found - - - - + + + + 7. pyOpenSSL 0.14 and newer is a major rewrite, so it's not clear to what extent their vulnerabilities do apply - + + - - - MAGENTA: vulnerability status could not be established + + + MAGENTA: vulnerability status could not be established - - - + + + 8. https://cve.report/CVE-2018-25032 and https://cve.report/CVE-2022-37434 - + + - - - + + + DEFAULT COLOUR: maintained upstream or not applicable - - - 9. https://www.openssl.org/news/openssl-1.0.2-notes.html + + + 9. https://www.openssl.org/news/openssl-1.0.2-notes.html - + + - - 10. https://www.openssl.org/news/openssl-1.1.1-notes.html + + 10. https://www.openssl.org/news/openssl-1.1.1-notes.html - + + - - 11. https://github.com/ActiveState/cpython/tags + + 11. https://github.com/ActiveState/cpython/tags - + + - - - - + + + + 12. https://cryptography.io/en/latest/changelog.html - + + - - - - 13. On Windows, the upstream Python 2.7.18 packages are hot patched with all the ActivePython fixes except CVE-2021-3177 and CVE-2020-10735 + + + + 13. On Windows, the upstream Python 2.7.18 packages are hot patched for all known issues except CVE-2021-3177 and CVE-2020-10735 - + + - - - - + + + + 14. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3572 - + + + + + + + + + 15. Corresponds to upstream OpenSSL version 1.0.2zg from 07 Feb 2023. + + + - - - - + + + + + + 16. Both cryptography 3.2.1 and version 3.3.2 have been patched for CVE-2023-23931, but not for CVE-2023-38325. + + + + + + + + + + 17. Versions older than 65.5.1 are vulnerable to CVE-2022-40897. + + + @@ -3381,7 +3401,7 @@ - + diff --git a/python-modules/README b/python-modules/README index e1580d936..abbc3e866 100644 --- a/python-modules/README +++ b/python-modules/README @@ -4,7 +4,7 @@ through the EXTRA_LIBRARIES variable in the "chevah_build" shell script. Patches for these modules should reside in a sub-directory named "lib-${LIB_VERSION}-patches", to be applied when needed during the build. -See the patches for PyCrypto 2.6.1 for an example involving multiple patches +See the patches for `scandir` for an example involving multiple patches to be applied in a predetermined order. For some modules built through PIP we keep source here as well because diff --git a/python-modules/chevah-python-test/test_python_binary_dist.py b/python-modules/chevah-python-test/test_python_binary_dist.py index 59f217cf3..ebcc64795 100644 --- a/python-modules/chevah-python-test/test_python_binary_dist.py +++ b/python-modules/chevah-python-test/test_python_binary_dist.py @@ -433,10 +433,10 @@ def main(): openssl_version = backend.openssl_version_text() if CHEVAH_OS.startswith(("win", "lnx", "macos", "aix")): # On some OS'es we build against our own OpenSSL. - expecting = u'OpenSSL 1.1.1t 7 Feb 2023' + expecting = u'OpenSSL 1.1.1w 11 Sep 2023' if CHEVAH_OS.startswith("aix"): # On AIX we are stuck with a patched 1.0.2. - expecting = u'OpenSSL 1.0.2v-chevah4 06 Apr 2022' + expecting = u'OpenSSL 1.0.2v-chevah5 21 Sep 2023' if openssl_version != expecting: sys.stderr.write('Expecting %s, got %s.\n' % ( expecting, openssl_version)) diff --git a/python-modules/cryptography-3.2.1-patches/CVE-2023-23931.patch b/python-modules/cryptography-3.2.1-patches/CVE-2023-23931.patch new file mode 100644 index 000000000..69a3a32f4 --- /dev/null +++ b/python-modules/cryptography-3.2.1-patches/CVE-2023-23931.patch @@ -0,0 +1,32 @@ +diff --git src/cryptography/hazmat/backends/openssl/ciphers.py src/cryptography/hazmat/backends/openssl/ciphers.py +index 286583f9325..075d68fb905 100644 +--- src/cryptography/hazmat/backends/openssl/ciphers.py ++++ src/cryptography/hazmat/backends/openssl/ciphers.py +@@ -156,7 +156,7 @@ def update_into(self, data: bytes, buf: bytes) -> int: + data_processed = 0 + total_out = 0 + outlen = self._backend._ffi.new("int *") +- baseoutbuf = self._backend._ffi.from_buffer(buf) ++ baseoutbuf = self._backend._ffi.from_buffer(buf, require_writable=True) + baseinbuf = self._backend._ffi.from_buffer(data) + + while data_processed != total_data_len: +diff --git tests/hazmat/primitives/test_ciphers.py tests/hazmat/primitives/test_ciphers.py +index 02127dd9cab..bf3b047dec2 100644 +--- tests/hazmat/primitives/test_ciphers.py ++++ tests/hazmat/primitives/test_ciphers.py +@@ -318,6 +318,14 @@ def test_update_into_buffer_too_small(self, backend): + with pytest.raises(ValueError): + encryptor.update_into(b"testing", buf) + ++ def test_update_into_immutable(self, backend): ++ key = b"\x00" * 16 ++ c = ciphers.Cipher(AES(key), modes.ECB(), backend) ++ encryptor = c.encryptor() ++ buf = b"\x00" * 32 ++ with pytest.raises((TypeError, BufferError)): ++ encryptor.update_into(b"testing", buf) ++ + @pytest.mark.supported( + only_if=lambda backend: backend.cipher_supported( + AES(b"\x00" * 16), modes.GCM(b"\x00" * 12) diff --git a/src/openssl/openssl-1.0.2v-chevah4/.travis-create-release.sh b/src/openssl/openssl-1.0.2v-chevah5/.travis-create-release.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/.travis-create-release.sh rename to src/openssl/openssl-1.0.2v-chevah5/.travis-create-release.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/ACKNOWLEDGMENTS b/src/openssl/openssl-1.0.2v-chevah5/ACKNOWLEDGMENTS similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ACKNOWLEDGMENTS rename to src/openssl/openssl-1.0.2v-chevah5/ACKNOWLEDGMENTS diff --git a/src/openssl/openssl-1.0.2v-chevah4/CHANGES b/src/openssl/openssl-1.0.2v-chevah5/CHANGES similarity index 99% rename from src/openssl/openssl-1.0.2v-chevah4/CHANGES rename to src/openssl/openssl-1.0.2v-chevah5/CHANGES index ae703712c..5788fa096 100644 --- a/src/openssl/openssl-1.0.2v-chevah4/CHANGES +++ b/src/openssl/openssl-1.0.2v-chevah5/CHANGES @@ -7,6 +7,10 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.0.2v-chevah4 and 1.0.2v-chevah5 [21 Sep 2023] + + *) Fixed address type confusion in X.509 GeneralName (CVE-2023-0286). + Changes between 1.0.2v-chevah3 and 1.0.2v-chevah4 [06 Apr 2022] *) Fixed infinite loop in BN_mod_sqrt() (CVE-2022-0778). diff --git a/src/openssl/openssl-1.0.2v-chevah4/CHANGES.SSLeay b/src/openssl/openssl-1.0.2v-chevah5/CHANGES.SSLeay similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/CHANGES.SSLeay rename to src/openssl/openssl-1.0.2v-chevah5/CHANGES.SSLeay diff --git a/src/openssl/openssl-1.0.2v-chevah4/CONTRIBUTING b/src/openssl/openssl-1.0.2v-chevah5/CONTRIBUTING similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/CONTRIBUTING rename to src/openssl/openssl-1.0.2v-chevah5/CONTRIBUTING diff --git a/src/openssl/openssl-1.0.2v-chevah4/Configure b/src/openssl/openssl-1.0.2v-chevah5/Configure similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/Configure rename to src/openssl/openssl-1.0.2v-chevah5/Configure diff --git a/src/openssl/openssl-1.0.2v-chevah4/FAQ b/src/openssl/openssl-1.0.2v-chevah5/FAQ similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/FAQ rename to src/openssl/openssl-1.0.2v-chevah5/FAQ diff --git a/src/openssl/openssl-1.0.2v-chevah4/GitConfigure b/src/openssl/openssl-1.0.2v-chevah5/GitConfigure similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/GitConfigure rename to src/openssl/openssl-1.0.2v-chevah5/GitConfigure diff --git a/src/openssl/openssl-1.0.2v-chevah4/GitMake b/src/openssl/openssl-1.0.2v-chevah5/GitMake similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/GitMake rename to src/openssl/openssl-1.0.2v-chevah5/GitMake diff --git a/src/openssl/openssl-1.0.2v-chevah4/INSTALL b/src/openssl/openssl-1.0.2v-chevah5/INSTALL similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/INSTALL rename to src/openssl/openssl-1.0.2v-chevah5/INSTALL diff --git a/src/openssl/openssl-1.0.2v-chevah4/INSTALL.DJGPP b/src/openssl/openssl-1.0.2v-chevah5/INSTALL.DJGPP similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/INSTALL.DJGPP rename to src/openssl/openssl-1.0.2v-chevah5/INSTALL.DJGPP diff --git a/src/openssl/openssl-1.0.2v-chevah4/INSTALL.MacOS b/src/openssl/openssl-1.0.2v-chevah5/INSTALL.MacOS similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/INSTALL.MacOS rename to src/openssl/openssl-1.0.2v-chevah5/INSTALL.MacOS diff --git a/src/openssl/openssl-1.0.2v-chevah4/INSTALL.NW b/src/openssl/openssl-1.0.2v-chevah5/INSTALL.NW similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/INSTALL.NW rename to src/openssl/openssl-1.0.2v-chevah5/INSTALL.NW diff --git a/src/openssl/openssl-1.0.2v-chevah4/INSTALL.OS2 b/src/openssl/openssl-1.0.2v-chevah5/INSTALL.OS2 similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/INSTALL.OS2 rename to src/openssl/openssl-1.0.2v-chevah5/INSTALL.OS2 diff --git a/src/openssl/openssl-1.0.2v-chevah4/INSTALL.VMS b/src/openssl/openssl-1.0.2v-chevah5/INSTALL.VMS similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/INSTALL.VMS rename to src/openssl/openssl-1.0.2v-chevah5/INSTALL.VMS diff --git a/src/openssl/openssl-1.0.2v-chevah4/INSTALL.W32 b/src/openssl/openssl-1.0.2v-chevah5/INSTALL.W32 similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/INSTALL.W32 rename to src/openssl/openssl-1.0.2v-chevah5/INSTALL.W32 diff --git a/src/openssl/openssl-1.0.2v-chevah4/INSTALL.W64 b/src/openssl/openssl-1.0.2v-chevah5/INSTALL.W64 similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/INSTALL.W64 rename to src/openssl/openssl-1.0.2v-chevah5/INSTALL.W64 diff --git a/src/openssl/openssl-1.0.2v-chevah4/INSTALL.WCE b/src/openssl/openssl-1.0.2v-chevah5/INSTALL.WCE similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/INSTALL.WCE rename to src/openssl/openssl-1.0.2v-chevah5/INSTALL.WCE diff --git a/src/openssl/openssl-1.0.2v-chevah4/LICENSE b/src/openssl/openssl-1.0.2v-chevah5/LICENSE similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/LICENSE rename to src/openssl/openssl-1.0.2v-chevah5/LICENSE diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/GUSI_Init.cpp b/src/openssl/openssl-1.0.2v-chevah5/MacOS/GUSI_Init.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/GUSI_Init.cpp rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/GUSI_Init.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/GetHTTPS.src/CPStringUtils.cpp b/src/openssl/openssl-1.0.2v-chevah5/MacOS/GetHTTPS.src/CPStringUtils.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/GetHTTPS.src/CPStringUtils.cpp rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/GetHTTPS.src/CPStringUtils.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/GetHTTPS.src/CPStringUtils.hpp b/src/openssl/openssl-1.0.2v-chevah5/MacOS/GetHTTPS.src/CPStringUtils.hpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/GetHTTPS.src/CPStringUtils.hpp rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/GetHTTPS.src/CPStringUtils.hpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/GetHTTPS.src/ErrorHandling.cpp b/src/openssl/openssl-1.0.2v-chevah5/MacOS/GetHTTPS.src/ErrorHandling.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/GetHTTPS.src/ErrorHandling.cpp rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/GetHTTPS.src/ErrorHandling.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/GetHTTPS.src/ErrorHandling.hpp b/src/openssl/openssl-1.0.2v-chevah5/MacOS/GetHTTPS.src/ErrorHandling.hpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/GetHTTPS.src/ErrorHandling.hpp rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/GetHTTPS.src/ErrorHandling.hpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/GetHTTPS.src/GetHTTPS.cpp b/src/openssl/openssl-1.0.2v-chevah5/MacOS/GetHTTPS.src/GetHTTPS.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/GetHTTPS.src/GetHTTPS.cpp rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/GetHTTPS.src/GetHTTPS.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/GetHTTPS.src/MacSocket.cpp b/src/openssl/openssl-1.0.2v-chevah5/MacOS/GetHTTPS.src/MacSocket.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/GetHTTPS.src/MacSocket.cpp rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/GetHTTPS.src/MacSocket.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/GetHTTPS.src/MacSocket.h b/src/openssl/openssl-1.0.2v-chevah5/MacOS/GetHTTPS.src/MacSocket.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/GetHTTPS.src/MacSocket.h rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/GetHTTPS.src/MacSocket.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/OpenSSL.mcp.hqx b/src/openssl/openssl-1.0.2v-chevah5/MacOS/OpenSSL.mcp.hqx similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/OpenSSL.mcp.hqx rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/OpenSSL.mcp.hqx diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/Randomizer.cpp b/src/openssl/openssl-1.0.2v-chevah5/MacOS/Randomizer.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/Randomizer.cpp rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/Randomizer.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/Randomizer.h b/src/openssl/openssl-1.0.2v-chevah5/MacOS/Randomizer.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/Randomizer.h rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/Randomizer.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/TODO b/src/openssl/openssl-1.0.2v-chevah5/MacOS/TODO similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/TODO rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/TODO diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/_MWERKS_GUSI_prefix.h b/src/openssl/openssl-1.0.2v-chevah5/MacOS/_MWERKS_GUSI_prefix.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/_MWERKS_GUSI_prefix.h rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/_MWERKS_GUSI_prefix.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/_MWERKS_prefix.h b/src/openssl/openssl-1.0.2v-chevah5/MacOS/_MWERKS_prefix.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/_MWERKS_prefix.h rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/_MWERKS_prefix.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/buildinf.h b/src/openssl/openssl-1.0.2v-chevah5/MacOS/buildinf.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/buildinf.h rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/buildinf.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/mklinks.as.hqx b/src/openssl/openssl-1.0.2v-chevah5/MacOS/mklinks.as.hqx similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/mklinks.as.hqx rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/mklinks.as.hqx diff --git a/src/openssl/openssl-1.0.2v-chevah4/MacOS/opensslconf.h b/src/openssl/openssl-1.0.2v-chevah5/MacOS/opensslconf.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/MacOS/opensslconf.h rename to src/openssl/openssl-1.0.2v-chevah5/MacOS/opensslconf.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/Makefile.org b/src/openssl/openssl-1.0.2v-chevah5/Makefile.org similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/Makefile.org rename to src/openssl/openssl-1.0.2v-chevah5/Makefile.org diff --git a/src/openssl/openssl-1.0.2v-chevah4/Makefile.shared b/src/openssl/openssl-1.0.2v-chevah5/Makefile.shared similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/Makefile.shared rename to src/openssl/openssl-1.0.2v-chevah5/Makefile.shared diff --git a/src/openssl/openssl-1.0.2v-chevah4/NEWS b/src/openssl/openssl-1.0.2v-chevah5/NEWS similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/NEWS rename to src/openssl/openssl-1.0.2v-chevah5/NEWS diff --git a/src/openssl/openssl-1.0.2v-chevah4/Netware/build.bat b/src/openssl/openssl-1.0.2v-chevah5/Netware/build.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/Netware/build.bat rename to src/openssl/openssl-1.0.2v-chevah5/Netware/build.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/Netware/cpy_tests.bat b/src/openssl/openssl-1.0.2v-chevah5/Netware/cpy_tests.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/Netware/cpy_tests.bat rename to src/openssl/openssl-1.0.2v-chevah5/Netware/cpy_tests.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/Netware/do_tests.pl b/src/openssl/openssl-1.0.2v-chevah5/Netware/do_tests.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/Netware/do_tests.pl rename to src/openssl/openssl-1.0.2v-chevah5/Netware/do_tests.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/Netware/globals.txt b/src/openssl/openssl-1.0.2v-chevah5/Netware/globals.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/Netware/globals.txt rename to src/openssl/openssl-1.0.2v-chevah5/Netware/globals.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/Netware/readme.txt b/src/openssl/openssl-1.0.2v-chevah5/Netware/readme.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/Netware/readme.txt rename to src/openssl/openssl-1.0.2v-chevah5/Netware/readme.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/Netware/set_env.bat b/src/openssl/openssl-1.0.2v-chevah5/Netware/set_env.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/Netware/set_env.bat rename to src/openssl/openssl-1.0.2v-chevah5/Netware/set_env.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/PROBLEMS b/src/openssl/openssl-1.0.2v-chevah5/PROBLEMS similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/PROBLEMS rename to src/openssl/openssl-1.0.2v-chevah5/PROBLEMS diff --git a/src/openssl/openssl-1.0.2v-chevah4/README b/src/openssl/openssl-1.0.2v-chevah5/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/README rename to src/openssl/openssl-1.0.2v-chevah5/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/README.ASN1 b/src/openssl/openssl-1.0.2v-chevah5/README.ASN1 similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/README.ASN1 rename to src/openssl/openssl-1.0.2v-chevah5/README.ASN1 diff --git a/src/openssl/openssl-1.0.2v-chevah4/README.ENGINE b/src/openssl/openssl-1.0.2v-chevah5/README.ENGINE similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/README.ENGINE rename to src/openssl/openssl-1.0.2v-chevah5/README.ENGINE diff --git a/src/openssl/openssl-1.0.2v-chevah4/TABLE b/src/openssl/openssl-1.0.2v-chevah5/TABLE similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/TABLE rename to src/openssl/openssl-1.0.2v-chevah5/TABLE diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/TODO b/src/openssl/openssl-1.0.2v-chevah5/VMS/TODO similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/TODO rename to src/openssl/openssl-1.0.2v-chevah5/VMS/TODO diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/VMSify-conf.pl b/src/openssl/openssl-1.0.2v-chevah5/VMS/VMSify-conf.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/VMSify-conf.pl rename to src/openssl/openssl-1.0.2v-chevah5/VMS/VMSify-conf.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/WISHLIST.TXT b/src/openssl/openssl-1.0.2v-chevah5/VMS/WISHLIST.TXT similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/WISHLIST.TXT rename to src/openssl/openssl-1.0.2v-chevah5/VMS/WISHLIST.TXT diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/install-vms.com b/src/openssl/openssl-1.0.2v-chevah5/VMS/install-vms.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/install-vms.com rename to src/openssl/openssl-1.0.2v-chevah5/VMS/install-vms.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/mkshared.com b/src/openssl/openssl-1.0.2v-chevah5/VMS/mkshared.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/mkshared.com rename to src/openssl/openssl-1.0.2v-chevah5/VMS/mkshared.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/multinet_shr.opt b/src/openssl/openssl-1.0.2v-chevah5/VMS/multinet_shr.opt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/multinet_shr.opt rename to src/openssl/openssl-1.0.2v-chevah5/VMS/multinet_shr.opt diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/openssl_startup.com b/src/openssl/openssl-1.0.2v-chevah5/VMS/openssl_startup.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/openssl_startup.com rename to src/openssl/openssl-1.0.2v-chevah5/VMS/openssl_startup.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/openssl_undo.com b/src/openssl/openssl-1.0.2v-chevah5/VMS/openssl_undo.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/openssl_undo.com rename to src/openssl/openssl-1.0.2v-chevah5/VMS/openssl_undo.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/openssl_utils.com b/src/openssl/openssl-1.0.2v-chevah5/VMS/openssl_utils.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/openssl_utils.com rename to src/openssl/openssl-1.0.2v-chevah5/VMS/openssl_utils.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/socketshr_shr.opt b/src/openssl/openssl-1.0.2v-chevah5/VMS/socketshr_shr.opt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/socketshr_shr.opt rename to src/openssl/openssl-1.0.2v-chevah5/VMS/socketshr_shr.opt diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/tcpip_shr_decc.opt b/src/openssl/openssl-1.0.2v-chevah5/VMS/tcpip_shr_decc.opt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/tcpip_shr_decc.opt rename to src/openssl/openssl-1.0.2v-chevah5/VMS/tcpip_shr_decc.opt diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/test-includes.com b/src/openssl/openssl-1.0.2v-chevah5/VMS/test-includes.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/test-includes.com rename to src/openssl/openssl-1.0.2v-chevah5/VMS/test-includes.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/ucx_shr_decc.opt b/src/openssl/openssl-1.0.2v-chevah5/VMS/ucx_shr_decc.opt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/ucx_shr_decc.opt rename to src/openssl/openssl-1.0.2v-chevah5/VMS/ucx_shr_decc.opt diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/ucx_shr_decc_log.opt b/src/openssl/openssl-1.0.2v-chevah5/VMS/ucx_shr_decc_log.opt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/ucx_shr_decc_log.opt rename to src/openssl/openssl-1.0.2v-chevah5/VMS/ucx_shr_decc_log.opt diff --git a/src/openssl/openssl-1.0.2v-chevah4/VMS/ucx_shr_vaxc.opt b/src/openssl/openssl-1.0.2v-chevah5/VMS/ucx_shr_vaxc.opt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/VMS/ucx_shr_vaxc.opt rename to src/openssl/openssl-1.0.2v-chevah5/VMS/ucx_shr_vaxc.opt diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/CA.com b/src/openssl/openssl-1.0.2v-chevah5/apps/CA.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/CA.com rename to src/openssl/openssl-1.0.2v-chevah5/apps/CA.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/CA.pl.in b/src/openssl/openssl-1.0.2v-chevah5/apps/CA.pl.in similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/CA.pl.in rename to src/openssl/openssl-1.0.2v-chevah5/apps/CA.pl.in diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/CA.sh b/src/openssl/openssl-1.0.2v-chevah5/apps/CA.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/CA.sh rename to src/openssl/openssl-1.0.2v-chevah5/apps/CA.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/Makefile b/src/openssl/openssl-1.0.2v-chevah5/apps/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/apps/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/app_rand.c b/src/openssl/openssl-1.0.2v-chevah5/apps/app_rand.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/app_rand.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/app_rand.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/apps.c b/src/openssl/openssl-1.0.2v-chevah5/apps/apps.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/apps.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/apps.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/apps.h b/src/openssl/openssl-1.0.2v-chevah5/apps/apps.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/apps.h rename to src/openssl/openssl-1.0.2v-chevah5/apps/apps.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/asn1pars.c b/src/openssl/openssl-1.0.2v-chevah5/apps/asn1pars.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/asn1pars.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/asn1pars.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/ca-cert.srl b/src/openssl/openssl-1.0.2v-chevah5/apps/ca-cert.srl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/ca-cert.srl rename to src/openssl/openssl-1.0.2v-chevah5/apps/ca-cert.srl diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/ca-key.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/ca-key.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/ca-key.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/ca-key.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/ca-req.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/ca-req.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/ca-req.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/ca-req.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/ca.c b/src/openssl/openssl-1.0.2v-chevah5/apps/ca.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/ca.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/ca.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/cert.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/cert.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/cert.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/cert.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/ciphers.c b/src/openssl/openssl-1.0.2v-chevah5/apps/ciphers.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/ciphers.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/ciphers.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/client.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/client.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/client.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/client.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/cms.c b/src/openssl/openssl-1.0.2v-chevah5/apps/cms.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/cms.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/cms.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/crl.c b/src/openssl/openssl-1.0.2v-chevah5/apps/crl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/crl.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/crl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/crl2p7.c b/src/openssl/openssl-1.0.2v-chevah5/apps/crl2p7.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/crl2p7.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/crl2p7.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/demoCA/cacert.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/demoCA/cacert.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/demoCA/cacert.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/demoCA/cacert.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/demoCA/index.txt b/src/openssl/openssl-1.0.2v-chevah5/apps/demoCA/index.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/demoCA/index.txt rename to src/openssl/openssl-1.0.2v-chevah5/apps/demoCA/index.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/demoCA/private/cakey.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/demoCA/private/cakey.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/demoCA/private/cakey.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/demoCA/private/cakey.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/demoCA/serial b/src/openssl/openssl-1.0.2v-chevah5/apps/demoCA/serial similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/demoCA/serial rename to src/openssl/openssl-1.0.2v-chevah5/apps/demoCA/serial diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/demoSRP/srp_verifier.txt b/src/openssl/openssl-1.0.2v-chevah5/apps/demoSRP/srp_verifier.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/demoSRP/srp_verifier.txt rename to src/openssl/openssl-1.0.2v-chevah5/apps/demoSRP/srp_verifier.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/demoSRP/srp_verifier.txt.attr b/src/openssl/openssl-1.0.2v-chevah5/apps/demoSRP/srp_verifier.txt.attr similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/demoSRP/srp_verifier.txt.attr rename to src/openssl/openssl-1.0.2v-chevah5/apps/demoSRP/srp_verifier.txt.attr diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/dgst.c b/src/openssl/openssl-1.0.2v-chevah5/apps/dgst.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/dgst.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/dgst.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/dh.c b/src/openssl/openssl-1.0.2v-chevah5/apps/dh.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/dh.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/dh.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/dh1024.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/dh1024.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/dh1024.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/dh1024.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/dh2048.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/dh2048.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/dh2048.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/dh2048.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/dh4096.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/dh4096.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/dh4096.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/dh4096.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/dh512.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/dh512.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/dh512.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/dh512.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/dhparam.c b/src/openssl/openssl-1.0.2v-chevah5/apps/dhparam.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/dhparam.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/dhparam.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/dsa-ca.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/dsa-ca.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/dsa-ca.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/dsa-ca.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/dsa-pca.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/dsa-pca.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/dsa-pca.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/dsa-pca.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/dsa.c b/src/openssl/openssl-1.0.2v-chevah5/apps/dsa.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/dsa.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/dsa.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/dsa1024.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/dsa1024.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/dsa1024.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/dsa1024.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/dsa512.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/dsa512.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/dsa512.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/dsa512.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/dsap.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/dsap.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/dsap.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/dsap.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/dsaparam.c b/src/openssl/openssl-1.0.2v-chevah5/apps/dsaparam.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/dsaparam.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/dsaparam.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/ec.c b/src/openssl/openssl-1.0.2v-chevah5/apps/ec.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/ec.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/ec.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/ecparam.c b/src/openssl/openssl-1.0.2v-chevah5/apps/ecparam.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/ecparam.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/ecparam.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/enc.c b/src/openssl/openssl-1.0.2v-chevah5/apps/enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/enc.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/engine.c b/src/openssl/openssl-1.0.2v-chevah5/apps/engine.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/engine.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/engine.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/errstr.c b/src/openssl/openssl-1.0.2v-chevah5/apps/errstr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/errstr.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/errstr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/gendh.c b/src/openssl/openssl-1.0.2v-chevah5/apps/gendh.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/gendh.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/gendh.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/gendsa.c b/src/openssl/openssl-1.0.2v-chevah5/apps/gendsa.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/gendsa.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/gendsa.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/genpkey.c b/src/openssl/openssl-1.0.2v-chevah5/apps/genpkey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/genpkey.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/genpkey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/genrsa.c b/src/openssl/openssl-1.0.2v-chevah5/apps/genrsa.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/genrsa.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/genrsa.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/install-apps.com b/src/openssl/openssl-1.0.2v-chevah5/apps/install-apps.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/install-apps.com rename to src/openssl/openssl-1.0.2v-chevah5/apps/install-apps.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/makeapps.com b/src/openssl/openssl-1.0.2v-chevah5/apps/makeapps.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/makeapps.com rename to src/openssl/openssl-1.0.2v-chevah5/apps/makeapps.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/nseq.c b/src/openssl/openssl-1.0.2v-chevah5/apps/nseq.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/nseq.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/nseq.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/ocsp.c b/src/openssl/openssl-1.0.2v-chevah5/apps/ocsp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/ocsp.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/ocsp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/oid.cnf b/src/openssl/openssl-1.0.2v-chevah5/apps/oid.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/oid.cnf rename to src/openssl/openssl-1.0.2v-chevah5/apps/oid.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/openssl-vms.cnf b/src/openssl/openssl-1.0.2v-chevah5/apps/openssl-vms.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/openssl-vms.cnf rename to src/openssl/openssl-1.0.2v-chevah5/apps/openssl-vms.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/openssl.c b/src/openssl/openssl-1.0.2v-chevah5/apps/openssl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/openssl.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/openssl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/openssl.cnf b/src/openssl/openssl-1.0.2v-chevah5/apps/openssl.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/openssl.cnf rename to src/openssl/openssl-1.0.2v-chevah5/apps/openssl.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/passwd.c b/src/openssl/openssl-1.0.2v-chevah5/apps/passwd.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/passwd.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/passwd.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/pca-cert.srl b/src/openssl/openssl-1.0.2v-chevah5/apps/pca-cert.srl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/pca-cert.srl rename to src/openssl/openssl-1.0.2v-chevah5/apps/pca-cert.srl diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/pca-key.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/pca-key.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/pca-key.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/pca-key.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/pca-req.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/pca-req.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/pca-req.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/pca-req.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/pkcs12.c b/src/openssl/openssl-1.0.2v-chevah5/apps/pkcs12.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/pkcs12.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/pkcs12.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/pkcs7.c b/src/openssl/openssl-1.0.2v-chevah5/apps/pkcs7.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/pkcs7.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/pkcs7.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/pkcs8.c b/src/openssl/openssl-1.0.2v-chevah5/apps/pkcs8.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/pkcs8.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/pkcs8.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/pkey.c b/src/openssl/openssl-1.0.2v-chevah5/apps/pkey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/pkey.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/pkey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/pkeyparam.c b/src/openssl/openssl-1.0.2v-chevah5/apps/pkeyparam.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/pkeyparam.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/pkeyparam.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/pkeyutl.c b/src/openssl/openssl-1.0.2v-chevah5/apps/pkeyutl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/pkeyutl.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/pkeyutl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/prime.c b/src/openssl/openssl-1.0.2v-chevah5/apps/prime.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/prime.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/prime.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/privkey.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/privkey.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/privkey.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/privkey.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/progs.h b/src/openssl/openssl-1.0.2v-chevah5/apps/progs.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/progs.h rename to src/openssl/openssl-1.0.2v-chevah5/apps/progs.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/progs.pl b/src/openssl/openssl-1.0.2v-chevah5/apps/progs.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/progs.pl rename to src/openssl/openssl-1.0.2v-chevah5/apps/progs.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/rand.c b/src/openssl/openssl-1.0.2v-chevah5/apps/rand.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/rand.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/rand.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/req.c b/src/openssl/openssl-1.0.2v-chevah5/apps/req.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/req.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/req.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/req.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/req.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/req.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/req.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/rsa.c b/src/openssl/openssl-1.0.2v-chevah5/apps/rsa.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/rsa.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/rsa.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/rsa8192.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/rsa8192.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/rsa8192.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/rsa8192.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/rsautl.c b/src/openssl/openssl-1.0.2v-chevah5/apps/rsautl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/rsautl.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/rsautl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/s1024key.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/s1024key.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/s1024key.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/s1024key.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/s1024req.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/s1024req.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/s1024req.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/s1024req.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/s512-key.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/s512-key.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/s512-key.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/s512-key.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/s512-req.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/s512-req.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/s512-req.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/s512-req.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/s_apps.h b/src/openssl/openssl-1.0.2v-chevah5/apps/s_apps.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/s_apps.h rename to src/openssl/openssl-1.0.2v-chevah5/apps/s_apps.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/s_cb.c b/src/openssl/openssl-1.0.2v-chevah5/apps/s_cb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/s_cb.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/s_cb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/s_client.c b/src/openssl/openssl-1.0.2v-chevah5/apps/s_client.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/s_client.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/s_client.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/s_server.c b/src/openssl/openssl-1.0.2v-chevah5/apps/s_server.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/s_server.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/s_server.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/s_socket.c b/src/openssl/openssl-1.0.2v-chevah5/apps/s_socket.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/s_socket.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/s_socket.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/s_time.c b/src/openssl/openssl-1.0.2v-chevah5/apps/s_time.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/s_time.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/s_time.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/server.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/server.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/server.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/server.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/server.srl b/src/openssl/openssl-1.0.2v-chevah5/apps/server.srl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/server.srl rename to src/openssl/openssl-1.0.2v-chevah5/apps/server.srl diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/server2.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/server2.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/server2.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/server2.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/sess_id.c b/src/openssl/openssl-1.0.2v-chevah5/apps/sess_id.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/sess_id.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/sess_id.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/set/set-g-ca.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/set/set-g-ca.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/set/set-g-ca.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/set/set-g-ca.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/set/set-m-ca.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/set/set-m-ca.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/set/set-m-ca.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/set/set-m-ca.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/set/set_b_ca.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/set/set_b_ca.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/set/set_b_ca.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/set/set_b_ca.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/set/set_c_ca.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/set/set_c_ca.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/set/set_c_ca.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/set/set_c_ca.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/set/set_d_ct.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/set/set_d_ct.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/set/set_d_ct.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/set/set_d_ct.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/set/set_root.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/set/set_root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/set/set_root.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/set/set_root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/smime.c b/src/openssl/openssl-1.0.2v-chevah5/apps/smime.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/smime.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/smime.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/speed.c b/src/openssl/openssl-1.0.2v-chevah5/apps/speed.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/speed.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/speed.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/spkac.c b/src/openssl/openssl-1.0.2v-chevah5/apps/spkac.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/spkac.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/spkac.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/srp.c b/src/openssl/openssl-1.0.2v-chevah5/apps/srp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/srp.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/srp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/testCA.pem b/src/openssl/openssl-1.0.2v-chevah5/apps/testCA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/testCA.pem rename to src/openssl/openssl-1.0.2v-chevah5/apps/testCA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/testdsa.h b/src/openssl/openssl-1.0.2v-chevah5/apps/testdsa.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/testdsa.h rename to src/openssl/openssl-1.0.2v-chevah5/apps/testdsa.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/testrsa.h b/src/openssl/openssl-1.0.2v-chevah5/apps/testrsa.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/testrsa.h rename to src/openssl/openssl-1.0.2v-chevah5/apps/testrsa.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/timeouts.h b/src/openssl/openssl-1.0.2v-chevah5/apps/timeouts.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/timeouts.h rename to src/openssl/openssl-1.0.2v-chevah5/apps/timeouts.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/ts.c b/src/openssl/openssl-1.0.2v-chevah5/apps/ts.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/ts.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/ts.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/tsget b/src/openssl/openssl-1.0.2v-chevah5/apps/tsget similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/tsget rename to src/openssl/openssl-1.0.2v-chevah5/apps/tsget diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/verify.c b/src/openssl/openssl-1.0.2v-chevah5/apps/verify.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/verify.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/verify.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/version.c b/src/openssl/openssl-1.0.2v-chevah5/apps/version.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/version.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/version.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/vms_decc_init.c b/src/openssl/openssl-1.0.2v-chevah5/apps/vms_decc_init.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/vms_decc_init.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/vms_decc_init.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/vms_term_sock.c b/src/openssl/openssl-1.0.2v-chevah5/apps/vms_term_sock.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/vms_term_sock.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/vms_term_sock.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/vms_term_sock.h b/src/openssl/openssl-1.0.2v-chevah5/apps/vms_term_sock.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/vms_term_sock.h rename to src/openssl/openssl-1.0.2v-chevah5/apps/vms_term_sock.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/winrand.c b/src/openssl/openssl-1.0.2v-chevah5/apps/winrand.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/winrand.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/winrand.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/apps/x509.c b/src/openssl/openssl-1.0.2v-chevah5/apps/x509.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/apps/x509.c rename to src/openssl/openssl-1.0.2v-chevah5/apps/x509.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/appveyor.yml b/src/openssl/openssl-1.0.2v-chevah5/appveyor.yml similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/appveyor.yml rename to src/openssl/openssl-1.0.2v-chevah5/appveyor.yml diff --git a/src/openssl/openssl-1.0.2v-chevah4/bugs/MS b/src/openssl/openssl-1.0.2v-chevah5/bugs/MS similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/bugs/MS rename to src/openssl/openssl-1.0.2v-chevah5/bugs/MS diff --git a/src/openssl/openssl-1.0.2v-chevah4/bugs/SSLv3 b/src/openssl/openssl-1.0.2v-chevah5/bugs/SSLv3 similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/bugs/SSLv3 rename to src/openssl/openssl-1.0.2v-chevah5/bugs/SSLv3 diff --git a/src/openssl/openssl-1.0.2v-chevah4/bugs/alpha.c b/src/openssl/openssl-1.0.2v-chevah5/bugs/alpha.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/bugs/alpha.c rename to src/openssl/openssl-1.0.2v-chevah5/bugs/alpha.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/bugs/dggccbug.c b/src/openssl/openssl-1.0.2v-chevah5/bugs/dggccbug.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/bugs/dggccbug.c rename to src/openssl/openssl-1.0.2v-chevah5/bugs/dggccbug.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/bugs/sgiccbug.c b/src/openssl/openssl-1.0.2v-chevah5/bugs/sgiccbug.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/bugs/sgiccbug.c rename to src/openssl/openssl-1.0.2v-chevah5/bugs/sgiccbug.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/bugs/sslref.dif b/src/openssl/openssl-1.0.2v-chevah5/bugs/sslref.dif similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/bugs/sslref.dif rename to src/openssl/openssl-1.0.2v-chevah5/bugs/sslref.dif diff --git a/src/openssl/openssl-1.0.2v-chevah4/bugs/stream.c b/src/openssl/openssl-1.0.2v-chevah5/bugs/stream.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/bugs/stream.c rename to src/openssl/openssl-1.0.2v-chevah5/bugs/stream.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/bugs/ultrixcc.c b/src/openssl/openssl-1.0.2v-chevah5/bugs/ultrixcc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/bugs/ultrixcc.c rename to src/openssl/openssl-1.0.2v-chevah5/bugs/ultrixcc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/certs/README.RootCerts b/src/openssl/openssl-1.0.2v-chevah5/certs/README.RootCerts similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/certs/README.RootCerts rename to src/openssl/openssl-1.0.2v-chevah5/certs/README.RootCerts diff --git a/src/openssl/openssl-1.0.2v-chevah4/certs/demo/ca-cert.pem b/src/openssl/openssl-1.0.2v-chevah5/certs/demo/ca-cert.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/certs/demo/ca-cert.pem rename to src/openssl/openssl-1.0.2v-chevah5/certs/demo/ca-cert.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/certs/demo/dsa-ca.pem b/src/openssl/openssl-1.0.2v-chevah5/certs/demo/dsa-ca.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/certs/demo/dsa-ca.pem rename to src/openssl/openssl-1.0.2v-chevah5/certs/demo/dsa-ca.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/certs/demo/dsa-pca.pem b/src/openssl/openssl-1.0.2v-chevah5/certs/demo/dsa-pca.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/certs/demo/dsa-pca.pem rename to src/openssl/openssl-1.0.2v-chevah5/certs/demo/dsa-pca.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/certs/demo/pca-cert.pem b/src/openssl/openssl-1.0.2v-chevah5/certs/demo/pca-cert.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/certs/demo/pca-cert.pem rename to src/openssl/openssl-1.0.2v-chevah5/certs/demo/pca-cert.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/certs/expired/ICE.crl b/src/openssl/openssl-1.0.2v-chevah5/certs/expired/ICE.crl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/certs/expired/ICE.crl rename to src/openssl/openssl-1.0.2v-chevah5/certs/expired/ICE.crl diff --git a/src/openssl/openssl-1.0.2v-chevah4/config b/src/openssl/openssl-1.0.2v-chevah5/config similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/config rename to src/openssl/openssl-1.0.2v-chevah5/config diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/LPdir_nyi.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/LPdir_nyi.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/LPdir_nyi.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/LPdir_nyi.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/LPdir_unix.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/LPdir_unix.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/LPdir_unix.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/LPdir_unix.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/LPdir_vms.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/LPdir_vms.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/LPdir_vms.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/LPdir_vms.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/LPdir_win.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/LPdir_win.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/LPdir_win.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/LPdir_win.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/LPdir_win32.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/LPdir_win32.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/LPdir_win32.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/LPdir_win32.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/LPdir_wince.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/LPdir_wince.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/LPdir_wince.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/LPdir_wince.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/README b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/README rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_cbc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_cbc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_cbc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_cbc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_cfb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_cfb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_cfb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_cfb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_core.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_core.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_core.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_core.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_ctr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_ctr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_ctr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_ctr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_ecb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_ecb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_ecb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_ecb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_ige.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_ige.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_ige.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_ige.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_misc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_misc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_misc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_misc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_ofb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_ofb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_ofb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_ofb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_wrap.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_wrap.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_wrap.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_wrap.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_x86core.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_x86core.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/aes_x86core.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/aes_x86core.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-586.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-586.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-586.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-586.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-armv4.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-armv4.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-armv4.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-armv4.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-ia64.S b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-ia64.S similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-ia64.S rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-ia64.S diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-mips.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-mips.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-mips.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-mips.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-parisc.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-parisc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-parisc.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-parisc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-ppc.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-ppc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-ppc.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-ppc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-s390x.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-s390x.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-s390x.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-s390x.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-sparcv9.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-sparcv9.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-sparcv9.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aes-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aes-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aesni-mb-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aesni-mb-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aesni-mb-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aesni-mb-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aesni-sha1-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aesni-sha1-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aesni-sha1-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aesni-sha1-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aesni-sha256-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aesni-sha256-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aesni-sha256-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aesni-sha256-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aesni-x86.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aesni-x86.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aesni-x86.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aesni-x86.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aesni-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aesni-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aesni-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aesni-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aesp8-ppc.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aesp8-ppc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aesp8-ppc.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aesp8-ppc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aest4-sparcv9.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aest4-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aest4-sparcv9.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aest4-sparcv9.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aesv8-armx.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aesv8-armx.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/aesv8-armx.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/aesv8-armx.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/bsaes-armv7.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/bsaes-armv7.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/bsaes-armv7.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/bsaes-armv7.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/bsaes-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/bsaes-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/bsaes-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/bsaes-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/vpaes-ppc.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/vpaes-ppc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/vpaes-ppc.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/vpaes-ppc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/vpaes-x86.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/vpaes-x86.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/vpaes-x86.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/vpaes-x86.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/vpaes-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/vpaes-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/aes/asm/vpaes-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/aes/asm/vpaes-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/alphacpuid.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/alphacpuid.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/alphacpuid.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/alphacpuid.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/arm64cpuid.S b/src/openssl/openssl-1.0.2v-chevah5/crypto/arm64cpuid.S similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/arm64cpuid.S rename to src/openssl/openssl-1.0.2v-chevah5/crypto/arm64cpuid.S diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/arm_arch.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/arm_arch.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/arm_arch.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/arm_arch.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/armcap.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/armcap.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/armcap.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/armcap.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/armv4cpuid.S b/src/openssl/openssl-1.0.2v-chevah5/crypto/armv4cpuid.S similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/armv4cpuid.S rename to src/openssl/openssl-1.0.2v-chevah5/crypto/armv4cpuid.S diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_bitstr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_bitstr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_bitstr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_bitstr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_bool.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_bool.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_bool.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_bool.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_bytes.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_bytes.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_bytes.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_bytes.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_d2i_fp.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_d2i_fp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_d2i_fp.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_d2i_fp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_digest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_digest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_digest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_digest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_dup.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_dup.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_dup.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_dup.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_enum.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_enum.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_enum.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_enum.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_gentm.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_gentm.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_gentm.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_gentm.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_i2d_fp.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_i2d_fp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_i2d_fp.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_i2d_fp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_int.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_int.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_int.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_int.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_mbstr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_mbstr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_mbstr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_mbstr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_object.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_object.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_object.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_object.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_octet.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_octet.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_octet.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_octet.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_print.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_print.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_print.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_print.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_set.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_set.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_set.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_set.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_sign.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_sign.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_sign.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_sign.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_strex.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_strex.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_strex.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_strex.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_strnid.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_strnid.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_strnid.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_strnid.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_time.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_time.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_time.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_time.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_type.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_type.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_type.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_type.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_utctm.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_utctm.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_utctm.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_utctm.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_utf8.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_utf8.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_utf8.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_utf8.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_verify.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_verify.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/a_verify.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/a_verify.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/ameth_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/ameth_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/ameth_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/ameth_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1_gen.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1_gen.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1_gen.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1_gen.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1_int.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1_int.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1_int.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1_int.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1_mac.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1_mac.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1_mac.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1_mac.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1_par.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1_par.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1_par.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1_par.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1t.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1t.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn1t.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn1t.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn_mime.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn_mime.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn_mime.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn_mime.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn_moid.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn_moid.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn_moid.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn_moid.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn_pack.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn_pack.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/asn_pack.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/asn_pack.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/bio_asn1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/bio_asn1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/bio_asn1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/bio_asn1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/bio_ndef.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/bio_ndef.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/bio_ndef.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/bio_ndef.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/charmap.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/charmap.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/charmap.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/charmap.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/charmap.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/charmap.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/charmap.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/charmap.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/d2i_pr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/d2i_pr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/d2i_pr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/d2i_pr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/d2i_pu.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/d2i_pu.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/d2i_pu.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/d2i_pu.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/evp_asn1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/evp_asn1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/evp_asn1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/evp_asn1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/f_enum.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/f_enum.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/f_enum.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/f_enum.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/f_int.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/f_int.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/f_int.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/f_int.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/f_string.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/f_string.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/f_string.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/f_string.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/i2d_pr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/i2d_pr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/i2d_pr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/i2d_pr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/i2d_pu.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/i2d_pu.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/i2d_pu.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/i2d_pu.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/n_pkey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/n_pkey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/n_pkey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/n_pkey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/nsseq.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/nsseq.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/nsseq.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/nsseq.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/p5_pbe.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/p5_pbe.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/p5_pbe.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/p5_pbe.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/p5_pbev2.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/p5_pbev2.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/p5_pbev2.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/p5_pbev2.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/p8_pkey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/p8_pkey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/p8_pkey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/p8_pkey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/t_bitst.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/t_bitst.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/t_bitst.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/t_bitst.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/t_crl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/t_crl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/t_crl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/t_crl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/t_pkey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/t_pkey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/t_pkey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/t_pkey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/t_req.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/t_req.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/t_req.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/t_req.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/t_spki.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/t_spki.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/t_spki.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/t_spki.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/t_x509.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/t_x509.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/t_x509.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/t_x509.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/t_x509a.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/t_x509a.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/t_x509a.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/t_x509a.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/tasn_dec.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/tasn_dec.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/tasn_dec.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/tasn_dec.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/tasn_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/tasn_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/tasn_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/tasn_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/tasn_fre.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/tasn_fre.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/tasn_fre.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/tasn_fre.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/tasn_new.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/tasn_new.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/tasn_new.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/tasn_new.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/tasn_prn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/tasn_prn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/tasn_prn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/tasn_prn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/tasn_typ.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/tasn_typ.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/tasn_typ.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/tasn_typ.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/tasn_utl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/tasn_utl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/tasn_utl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/tasn_utl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_algor.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_algor.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_algor.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_algor.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_attrib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_attrib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_attrib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_attrib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_bignum.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_bignum.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_bignum.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_bignum.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_crl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_crl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_crl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_crl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_exten.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_exten.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_exten.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_exten.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_info.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_info.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_info.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_info.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_long.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_long.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_long.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_long.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_name.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_name.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_name.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_name.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_nx509.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_nx509.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_nx509.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_nx509.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_pkey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_pkey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_pkey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_pkey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_pubkey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_pubkey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_pubkey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_pubkey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_req.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_req.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_req.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_req.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_sig.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_sig.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_sig.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_sig.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_spki.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_spki.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_spki.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_spki.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_val.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_val.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_val.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_val.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_x509.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_x509.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_x509.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_x509.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_x509a.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_x509a.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/asn1/x_x509a.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/asn1/x_x509a.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/COPYRIGHT b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/COPYRIGHT similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/COPYRIGHT rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/COPYRIGHT diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/INSTALL b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/INSTALL similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/INSTALL rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/INSTALL diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/README b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/README rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/VERSION b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/VERSION similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/VERSION rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/VERSION diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/asm/bf-586.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/asm/bf-586.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/asm/bf-586.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/asm/bf-586.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/asm/bf-686.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/asm/bf-686.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/asm/bf-686.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/asm/bf-686.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/asm/readme b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/asm/readme similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/asm/readme rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/asm/readme diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_cbc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_cbc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_cbc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_cbc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_cfb64.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_cfb64.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_cfb64.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_cfb64.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_ecb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_ecb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_ecb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_ecb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_ofb64.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_ofb64.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_ofb64.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_ofb64.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_opts.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_opts.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_opts.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_opts.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_pi.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_pi.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_pi.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_pi.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_skey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_skey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bf_skey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bf_skey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bfs.cpp b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bfs.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bfs.cpp rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bfs.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bfspeed.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bfspeed.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bfspeed.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bfspeed.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bftest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bftest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/bftest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/bftest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bf/blowfish.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/bf/blowfish.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bf/blowfish.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bf/blowfish.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/b_dump.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/b_dump.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/b_dump.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/b_dump.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/b_print.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/b_print.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/b_print.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/b_print.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/b_sock.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/b_sock.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/b_sock.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/b_sock.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bf_buff.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bf_buff.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bf_buff.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bf_buff.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bf_lbuf.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bf_lbuf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bf_lbuf.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bf_lbuf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bf_nbio.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bf_nbio.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bf_nbio.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bf_nbio.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bf_null.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bf_null.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bf_null.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bf_null.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bio.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bio.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bio.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bio.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bio_cb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bio_cb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bio_cb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bio_cb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bio_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bio_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bio_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bio_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bio_lcl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bio_lcl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bio_lcl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bio_lcl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bio_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bio_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bio_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bio_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_acpt.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_acpt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_acpt.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_acpt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_bio.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_bio.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_bio.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_bio.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_conn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_conn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_conn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_conn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_dgram.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_dgram.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_dgram.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_dgram.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_fd.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_fd.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_fd.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_fd.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_file.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_file.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_file.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_file.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_log.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_log.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_log.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_log.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_mem.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_mem.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_mem.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_mem.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_null.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_null.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_null.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_null.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_rtcp.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_rtcp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_rtcp.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_rtcp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_sock.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_sock.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bio/bss_sock.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bio/bss_sock.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/README b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/README rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/alpha-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/alpha-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/alpha-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/alpha-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/armv4-gf2m.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/armv4-gf2m.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/armv4-gf2m.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/armv4-gf2m.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/armv4-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/armv4-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/armv4-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/armv4-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/bn-586.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/bn-586.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/bn-586.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/bn-586.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/co-586.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/co-586.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/co-586.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/co-586.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/ia64-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/ia64-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/ia64-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/ia64-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/ia64.S b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/ia64.S similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/ia64.S rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/ia64.S diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/mips-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/mips-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/mips-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/mips-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/mips.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/mips.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/mips.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/mips.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/mips3-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/mips3-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/mips3-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/mips3-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/mips3.s b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/mips3.s similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/mips3.s rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/mips3.s diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/pa-risc2.s b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/pa-risc2.s similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/pa-risc2.s rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/pa-risc2.s diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/pa-risc2W.s b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/pa-risc2W.s similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/pa-risc2W.s rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/pa-risc2W.s diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/parisc-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/parisc-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/parisc-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/parisc-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/ppc-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/ppc-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/ppc-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/ppc-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/ppc.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/ppc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/ppc.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/ppc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/ppc64-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/ppc64-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/ppc64-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/ppc64-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/rsaz-avx2.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/rsaz-avx2.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/rsaz-avx2.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/rsaz-avx2.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/rsaz-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/rsaz-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/rsaz-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/rsaz-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/s390x-gf2m.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/s390x-gf2m.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/s390x-gf2m.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/s390x-gf2m.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/s390x-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/s390x-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/s390x-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/s390x-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/s390x.S b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/s390x.S similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/s390x.S rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/s390x.S diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/sparct4-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/sparct4-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/sparct4-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/sparct4-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/sparcv8.S b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/sparcv8.S similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/sparcv8.S rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/sparcv8.S diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/sparcv8plus.S b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/sparcv8plus.S similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/sparcv8plus.S rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/sparcv8plus.S diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/sparcv9-gf2m.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/sparcv9-gf2m.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/sparcv9-gf2m.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/sparcv9-gf2m.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/sparcv9-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/sparcv9-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/sparcv9-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/sparcv9-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/sparcv9a-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/sparcv9a-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/sparcv9a-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/sparcv9a-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/via-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/via-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/via-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/via-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/vis3-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/vis3-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/vis3-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/vis3-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/vms.mar b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/vms.mar similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/vms.mar rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/vms.mar diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86-gf2m.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86-gf2m.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86-gf2m.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86-gf2m.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/add.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/add.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/add.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/add.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/comba.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/comba.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/comba.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/comba.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/div.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/div.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/div.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/div.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/f b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/f similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/f rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/f diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/mul.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/mul.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/mul.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/mul.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/mul_add.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/mul_add.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/mul_add.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/mul_add.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/sqr.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/sqr.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/sqr.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/sqr.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/sub.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/sub.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86/sub.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86/sub.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86_64-gcc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86_64-gcc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86_64-gcc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86_64-gcc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86_64-gf2m.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86_64-gf2m.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86_64-gf2m.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86_64-gf2m.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86_64-mont.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86_64-mont.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86_64-mont.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86_64-mont.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86_64-mont5.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86_64-mont5.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/asm/x86_64-mont5.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/asm/x86_64-mont5.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn.mul b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn.mul similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn.mul rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn.mul diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_add.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_add.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_add.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_add.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_asm.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_asm.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_asm.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_asm.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_blind.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_blind.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_blind.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_blind.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_const.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_const.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_const.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_const.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_ctx.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_ctx.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_ctx.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_ctx.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_depr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_depr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_depr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_depr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_div.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_div.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_div.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_div.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_exp.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_exp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_exp.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_exp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_exp2.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_exp2.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_exp2.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_exp2.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_gcd.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_gcd.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_gcd.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_gcd.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_gf2m.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_gf2m.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_gf2m.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_gf2m.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_kron.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_kron.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_kron.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_kron.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_lcl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_lcl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_lcl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_lcl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_mod.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_mod.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_mod.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_mod.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_mont.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_mont.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_mont.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_mont.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_mpi.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_mpi.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_mpi.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_mpi.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_mul.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_mul.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_mul.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_mul.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_nist.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_nist.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_nist.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_nist.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_prime.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_prime.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_prime.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_prime.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_prime.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_prime.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_prime.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_prime.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_prime.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_prime.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_prime.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_prime.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_print.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_print.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_print.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_print.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_rand.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_rand.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_rand.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_rand.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_recp.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_recp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_recp.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_recp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_shift.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_shift.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_shift.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_shift.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_sqr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_sqr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_sqr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_sqr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_sqrt.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_sqrt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_sqrt.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_sqrt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_word.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_word.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_word.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_word.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_x931p.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_x931p.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bn_x931p.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bn_x931p.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bnspeed.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bnspeed.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bnspeed.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bnspeed.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bntest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bntest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/bntest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/bntest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/divtest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/divtest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/divtest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/divtest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/exp.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/exp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/exp.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/exp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/expspeed.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/expspeed.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/expspeed.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/expspeed.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/exptest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/exptest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/exptest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/exptest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/rsaz_exp.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/rsaz_exp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/rsaz_exp.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/rsaz_exp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/rsaz_exp.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/rsaz_exp.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/rsaz_exp.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/rsaz_exp.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/todo b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/todo similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/todo rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/todo diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn/vms-helper.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn/vms-helper.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn/vms-helper.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn/vms-helper.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/bn_int.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/bn_int.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/bn_int.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/bn_int.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/buffer/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/buffer/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/buffer/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/buffer/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/buffer/buf_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/buffer/buf_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/buffer/buf_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/buffer/buf_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/buffer/buf_str.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/buffer/buf_str.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/buffer/buf_str.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/buffer/buf_str.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/buffer/buffer.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/buffer/buffer.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/buffer/buffer.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/buffer/buffer.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/buffer/buffer.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/buffer/buffer.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/buffer/buffer.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/buffer/buffer.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/asm/cmll-x86.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/asm/cmll-x86.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/asm/cmll-x86.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/asm/cmll-x86.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/asm/cmll-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/asm/cmll-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/asm/cmll-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/asm/cmll-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/asm/cmllt4-sparcv9.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/asm/cmllt4-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/asm/cmllt4-sparcv9.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/asm/cmllt4-sparcv9.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/camellia.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/camellia.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/camellia.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/camellia.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/camellia.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/camellia.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/camellia.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/camellia.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_cbc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_cbc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_cbc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_cbc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_cfb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_cfb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_cfb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_cfb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_ctr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_ctr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_ctr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_ctr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_ecb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_ecb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_ecb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_ecb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_misc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_misc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_misc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_misc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_ofb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_ofb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_ofb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_ofb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_utl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_utl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/camellia/cmll_utl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/camellia/cmll_utl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/asm/cast-586.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/asm/cast-586.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/asm/cast-586.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/asm/cast-586.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/asm/readme b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/asm/readme similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/asm/readme rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/asm/readme diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/c_cfb64.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/c_cfb64.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/c_cfb64.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/c_cfb64.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/c_ecb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/c_ecb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/c_ecb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/c_ecb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/c_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/c_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/c_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/c_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/c_ofb64.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/c_ofb64.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/c_ofb64.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/c_ofb64.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/c_skey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/c_skey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/c_skey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/c_skey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/cast.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/cast.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/cast.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/cast.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/cast_lcl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/cast_lcl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/cast_lcl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/cast_lcl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/cast_s.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/cast_s.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/cast_s.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/cast_s.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/cast_spd.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/cast_spd.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/cast_spd.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/cast_spd.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/castopts.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/castopts.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/castopts.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/castopts.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/casts.cpp b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/casts.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/casts.cpp rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/casts.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cast/casttest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cast/casttest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cast/casttest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cast/casttest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cmac/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/cmac/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cmac/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cmac/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cmac/cm_ameth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cmac/cm_ameth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cmac/cm_ameth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cmac/cm_ameth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cmac/cm_pmeth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cmac/cm_pmeth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cmac/cm_pmeth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cmac/cm_pmeth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cmac/cmac.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cmac/cmac.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cmac/cmac.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cmac/cmac.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cmac/cmac.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/cmac/cmac.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cmac/cmac.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cmac/cmac.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_asn1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_asn1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_asn1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_asn1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_att.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_att.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_att.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_att.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_cd.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_cd.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_cd.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_cd.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_dd.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_dd.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_dd.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_dd.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_env.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_env.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_env.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_env.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_ess.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_ess.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_ess.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_ess.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_io.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_io.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_io.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_io.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_kari.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_kari.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_kari.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_kari.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_lcl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_lcl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_lcl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_lcl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_pwri.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_pwri.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_pwri.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_pwri.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_sd.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_sd.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_sd.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_sd.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_smime.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_smime.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cms/cms_smime.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cms/cms_smime.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/comp/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/comp/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/comp/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/comp/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/comp/c_rle.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/comp/c_rle.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/comp/c_rle.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/comp/c_rle.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/comp/c_zlib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/comp/c_zlib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/comp/c_zlib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/comp/c_zlib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/comp/comp.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/comp/comp.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/comp/comp.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/comp/comp.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/comp/comp_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/comp/comp_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/comp/comp_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/comp/comp_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/comp/comp_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/comp/comp_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/comp/comp_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/comp/comp_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/README b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/README rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/cnf_save.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/cnf_save.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/cnf_save.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/cnf_save.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_api.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_api.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_api.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_api.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_api.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_api.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_api.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_api.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_def.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_def.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_def.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_def.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_def.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_def.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_def.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_def.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_mall.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_mall.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_mall.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_mall.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_mod.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_mod.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_mod.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_mod.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_sap.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_sap.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/conf_sap.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/conf_sap.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/keysets.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/keysets.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/keysets.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/keysets.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/ssleay.cnf b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/ssleay.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/ssleay.cnf rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/ssleay.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/conf/test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/conf/test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/conf/test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/conf/test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/constant_time_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/constant_time_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/constant_time_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/constant_time_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/constant_time_test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/constant_time_test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/constant_time_test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/constant_time_test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cpt_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cpt_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cpt_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cpt_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cryptlib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cryptlib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cryptlib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cryptlib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cryptlib.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/cryptlib.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cryptlib.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cryptlib.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/crypto-lib.com b/src/openssl/openssl-1.0.2v-chevah5/crypto/crypto-lib.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/crypto-lib.com rename to src/openssl/openssl-1.0.2v-chevah5/crypto/crypto-lib.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/crypto.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/crypto.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/crypto.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/crypto.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/cversion.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/cversion.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/cversion.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/cversion.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/COPYRIGHT b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/COPYRIGHT similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/COPYRIGHT rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/COPYRIGHT diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/DES.pm b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/DES.pm similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/DES.pm rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/DES.pm diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/DES.xs b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/DES.xs similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/DES.xs rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/DES.xs diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/FILES0 b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/FILES0 similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/FILES0 rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/FILES0 diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/INSTALL b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/INSTALL similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/INSTALL rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/INSTALL diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/Imakefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/Imakefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/Imakefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/Imakefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/KERBEROS b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/KERBEROS similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/KERBEROS rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/KERBEROS diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/README b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/README rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/VERSION b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/VERSION similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/VERSION rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/VERSION diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/asm/crypt586.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/asm/crypt586.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/asm/crypt586.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/asm/crypt586.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/asm/des-586.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/asm/des-586.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/asm/des-586.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/asm/des-586.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/asm/des_enc.m4 b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/asm/des_enc.m4 similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/asm/des_enc.m4 rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/asm/des_enc.m4 diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/asm/desboth.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/asm/desboth.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/asm/desboth.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/asm/desboth.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/asm/dest4-sparcv9.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/asm/dest4-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/asm/dest4-sparcv9.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/asm/dest4-sparcv9.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/asm/readme b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/asm/readme similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/asm/readme rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/asm/readme diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/cbc3_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/cbc3_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/cbc3_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/cbc3_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/cbc_cksm.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/cbc_cksm.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/cbc_cksm.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/cbc_cksm.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/cbc_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/cbc_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/cbc_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/cbc_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/cfb64ede.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/cfb64ede.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/cfb64ede.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/cfb64ede.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/cfb64enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/cfb64enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/cfb64enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/cfb64enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/cfb_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/cfb_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/cfb_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/cfb_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/des-lib.com b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/des-lib.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/des-lib.com rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/des-lib.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/des.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/des.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/des.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/des.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/des.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/des.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/des.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/des.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/des.pod b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/des.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/des.pod rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/des.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/des3s.cpp b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/des3s.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/des3s.cpp rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/des3s.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/des_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/des_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/des_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/des_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/des_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/des_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/des_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/des_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/des_old.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/des_old.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/des_old.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/des_old.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/des_old.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/des_old.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/des_old.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/des_old.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/des_old2.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/des_old2.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/des_old2.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/des_old2.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/des_opts.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/des_opts.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/des_opts.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/des_opts.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/des_ver.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/des_ver.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/des_ver.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/des_ver.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/dess.cpp b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/dess.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/dess.cpp rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/dess.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/destest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/destest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/destest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/destest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/ecb3_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/ecb3_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/ecb3_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/ecb3_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/ecb_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/ecb_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/ecb_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/ecb_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/ede_cbcm_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/ede_cbcm_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/ede_cbcm_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/ede_cbcm_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/enc_read.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/enc_read.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/enc_read.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/enc_read.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/enc_writ.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/enc_writ.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/enc_writ.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/enc_writ.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/fcrypt.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/fcrypt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/fcrypt.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/fcrypt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/fcrypt_b.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/fcrypt_b.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/fcrypt_b.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/fcrypt_b.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/makefile.bc b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/makefile.bc similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/makefile.bc rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/makefile.bc diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/ncbc_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/ncbc_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/ncbc_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/ncbc_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/ofb64ede.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/ofb64ede.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/ofb64ede.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/ofb64ede.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/ofb64enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/ofb64enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/ofb64enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/ofb64enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/ofb_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/ofb_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/ofb_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/ofb_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/options.txt b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/options.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/options.txt rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/options.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/pcbc_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/pcbc_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/pcbc_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/pcbc_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/qud_cksm.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/qud_cksm.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/qud_cksm.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/qud_cksm.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/rand_key.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/rand_key.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/rand_key.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/rand_key.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/read2pwd.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/read2pwd.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/read2pwd.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/read2pwd.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/read_pwd.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/read_pwd.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/read_pwd.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/read_pwd.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/rpc_des.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/rpc_des.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/rpc_des.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/rpc_des.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/rpc_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/rpc_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/rpc_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/rpc_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/rpw.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/rpw.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/rpw.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/rpw.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/set_key.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/set_key.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/set_key.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/set_key.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/speed.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/speed.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/speed.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/speed.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/spr.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/spr.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/spr.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/spr.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/str2key.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/str2key.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/str2key.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/str2key.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/t/test b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/t/test similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/t/test rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/t/test diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/486-50.sol b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/486-50.sol similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/486-50.sol rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/486-50.sol diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/586-100.lnx b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/586-100.lnx similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/586-100.lnx rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/586-100.lnx diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/686-200.fre b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/686-200.fre similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/686-200.fre rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/686-200.fre diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/aix.cc b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/aix.cc similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/aix.cc rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/aix.cc diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/alpha.cc b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/alpha.cc similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/alpha.cc rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/alpha.cc diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/hpux.cc b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/hpux.cc similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/hpux.cc rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/hpux.cc diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/sparc.gcc b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/sparc.gcc similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/sparc.gcc rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/sparc.gcc diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/usparc.cc b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/usparc.cc similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/times/usparc.cc rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/times/usparc.cc diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/typemap b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/typemap similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/typemap rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/typemap diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/des/xcbc_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/des/xcbc_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/des/xcbc_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/des/xcbc_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh1024.pem b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh1024.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh1024.pem rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh1024.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh192.pem b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh192.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh192.pem rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh192.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh2048.pem b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh2048.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh2048.pem rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh2048.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh4096.pem b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh4096.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh4096.pem rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh4096.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh512.pem b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh512.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh512.pem rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh512.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_ameth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_ameth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_ameth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_ameth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_asn1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_asn1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_asn1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_asn1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_check.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_check.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_check.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_check.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_depr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_depr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_depr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_depr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_gen.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_gen.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_gen.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_gen.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_kdf.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_kdf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_kdf.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_kdf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_key.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_key.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_key.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_key.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_pmeth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_pmeth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_pmeth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_pmeth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_prn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_prn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_prn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_prn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_rfc5114.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_rfc5114.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dh_rfc5114.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dh_rfc5114.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dhtest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dhtest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/dhtest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/dhtest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/example b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/example similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/example rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/example diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/generate b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/generate similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/generate rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/generate diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/p1024.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/p1024.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/p1024.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/p1024.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/p192.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/p192.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/p192.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/p192.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dh/p512.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dh/p512.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dh/p512.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dh/p512.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/README b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/README rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_ameth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_ameth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_ameth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_ameth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_asn1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_asn1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_asn1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_asn1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_depr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_depr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_depr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_depr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_gen.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_gen.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_gen.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_gen.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_key.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_key.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_key.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_key.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_ossl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_ossl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_ossl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_ossl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_pmeth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_pmeth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_pmeth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_pmeth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_prn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_prn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_prn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_prn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_sign.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_sign.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_sign.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_sign.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_vrf.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_vrf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsa_vrf.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsa_vrf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsagen.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsagen.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsagen.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsagen.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsatest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsatest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/dsatest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/dsatest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/fips186a.txt b/src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/fips186a.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dsa/fips186a.txt rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dsa/fips186a.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dso/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/dso/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dso/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dso/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dso/README b/src/openssl/openssl-1.0.2v-chevah5/crypto/dso/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dso/README rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dso/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_beos.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_beos.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_beos.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_beos.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_dl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_dl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_dl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_dl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_dlfcn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_dlfcn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_dlfcn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_dlfcn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_null.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_null.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_null.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_null.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_openssl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_openssl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_openssl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_openssl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_vms.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_vms.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_vms.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_vms.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_win32.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_win32.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/dso/dso_win32.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/dso/dso_win32.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ebcdic.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ebcdic.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ebcdic.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ebcdic.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ebcdic.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ebcdic.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ebcdic.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ebcdic.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/asm/ecp_nistz256-avx2.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/asm/ecp_nistz256-avx2.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/asm/ecp_nistz256-avx2.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/asm/ecp_nistz256-avx2.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/asm/ecp_nistz256-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/asm/ecp_nistz256-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/asm/ecp_nistz256-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/asm/ecp_nistz256-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec2_mult.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec2_mult.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec2_mult.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec2_mult.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec2_oct.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec2_oct.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec2_oct.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec2_oct.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec2_smpl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec2_smpl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec2_smpl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec2_smpl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_ameth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_ameth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_ameth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_ameth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_asn1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_asn1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_asn1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_asn1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_check.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_check.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_check.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_check.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_curve.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_curve.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_curve.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_curve.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_cvt.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_cvt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_cvt.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_cvt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_key.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_key.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_key.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_key.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_lcl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_lcl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_lcl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_lcl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_mult.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_mult.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_mult.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_mult.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_oct.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_oct.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_oct.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_oct.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_pmeth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_pmeth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_pmeth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_pmeth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_print.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_print.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ec_print.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ec_print.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/eck_prn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/eck_prn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/eck_prn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/eck_prn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_mont.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_mont.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_mont.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_mont.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_nist.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_nist.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_nist.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_nist.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_nistp224.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_nistp224.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_nistp224.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_nistp224.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_nistp256.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_nistp256.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_nistp256.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_nistp256.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_nistp521.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_nistp521.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_nistp521.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_nistp521.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_nistputil.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_nistputil.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_nistputil.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_nistputil.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_nistz256.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_nistz256.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_nistz256.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_nistz256.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_nistz256_table.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_nistz256_table.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_nistz256_table.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_nistz256_table.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_oct.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_oct.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_oct.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_oct.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_smpl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_smpl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ecp_smpl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ecp_smpl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ectest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ectest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ec/ectest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ec/ectest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ecdh.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ecdh.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ecdh.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ecdh.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ecdhtest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ecdhtest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ecdhtest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ecdhtest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ech_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ech_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ech_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ech_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ech_kdf.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ech_kdf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ech_kdf.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ech_kdf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ech_key.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ech_key.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ech_key.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ech_key.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ech_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ech_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ech_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ech_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ech_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ech_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ech_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ech_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ech_ossl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ech_ossl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdh/ech_ossl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdh/ech_ossl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecdsa.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecdsa.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecdsa.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecdsa.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecdsatest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecdsatest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecdsatest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecdsatest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecs_asn1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecs_asn1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecs_asn1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecs_asn1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecs_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecs_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecs_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecs_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecs_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecs_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecs_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecs_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecs_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecs_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecs_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecs_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecs_ossl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecs_ossl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecs_ossl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecs_ossl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecs_sign.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecs_sign.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecs_sign.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecs_sign.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecs_vrf.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecs_vrf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ecdsa/ecs_vrf.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ecdsa/ecs_vrf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/README b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/README rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_all.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_all.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_all.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_all.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_cnf.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_cnf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_cnf.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_cnf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_cryptodev.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_cryptodev.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_cryptodev.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_cryptodev.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_ctrl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_ctrl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_ctrl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_ctrl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_dyn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_dyn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_dyn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_dyn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_fat.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_fat.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_fat.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_fat.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_init.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_init.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_init.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_init.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_int.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_int.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_int.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_int.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_list.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_list.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_list.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_list.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_openssl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_openssl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_openssl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_openssl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_pkey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_pkey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_pkey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_pkey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_rdrand.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_rdrand.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_rdrand.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_rdrand.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_table.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_table.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/eng_table.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/eng_table.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/engine.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/engine.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/engine.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/engine.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/enginetest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/enginetest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/enginetest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/enginetest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_asnmth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_asnmth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_asnmth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_asnmth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_cipher.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_cipher.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_cipher.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_cipher.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_dh.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_dh.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_dh.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_dh.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_digest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_digest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_digest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_digest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_dsa.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_dsa.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_dsa.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_dsa.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_ecdh.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_ecdh.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_ecdh.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_ecdh.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_ecdsa.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_ecdsa.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_ecdsa.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_ecdsa.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_pkmeth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_pkmeth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_pkmeth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_pkmeth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_rand.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_rand.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_rand.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_rand.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_rsa.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_rsa.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_rsa.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_rsa.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_store.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_store.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/engine/tb_store.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/engine/tb_store.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/err/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/err/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/err/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/err/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/err/err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/err/err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/err/err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/err/err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/err/err.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/err/err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/err/err.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/err/err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/err/err_all.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/err/err_all.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/err/err_all.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/err/err_all.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/err/err_prn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/err/err_prn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/err/err_prn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/err/err_prn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/err/openssl.ec b/src/openssl/openssl-1.0.2v-chevah5/crypto/err/openssl.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/err/openssl.ec rename to src/openssl/openssl-1.0.2v-chevah5/crypto/err/openssl.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/bio_b64.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/bio_b64.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/bio_b64.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/bio_b64.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/bio_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/bio_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/bio_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/bio_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/bio_md.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/bio_md.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/bio_md.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/bio_md.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/bio_ok.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/bio_ok.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/bio_ok.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/bio_ok.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/c_all.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/c_all.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/c_all.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/c_all.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/c_allc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/c_allc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/c_allc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/c_allc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/c_alld.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/c_alld.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/c_alld.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/c_alld.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/digest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/digest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/digest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/digest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_aes.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_aes.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_aes.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_aes.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_aes_cbc_hmac_sha1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_aes_cbc_hmac_sha1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_aes_cbc_hmac_sha1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_aes_cbc_hmac_sha1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_aes_cbc_hmac_sha256.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_aes_cbc_hmac_sha256.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_aes_cbc_hmac_sha256.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_aes_cbc_hmac_sha256.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_bf.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_bf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_bf.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_bf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_camellia.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_camellia.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_camellia.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_camellia.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_cast.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_cast.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_cast.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_cast.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_des.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_des.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_des.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_des.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_des3.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_des3.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_des3.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_des3.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_dsa.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_dsa.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_dsa.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_dsa.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_idea.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_idea.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_idea.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_idea.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_null.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_null.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_null.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_null.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_old.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_old.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_old.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_old.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_rc2.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_rc2.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_rc2.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_rc2.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_rc4.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_rc4.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_rc4.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_rc4.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_rc4_hmac_md5.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_rc4_hmac_md5.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_rc4_hmac_md5.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_rc4_hmac_md5.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_rc5.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_rc5.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_rc5.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_rc5.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_seed.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_seed.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_seed.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_seed.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_xcbc_d.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_xcbc_d.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/e_xcbc_d.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/e_xcbc_d.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/encode.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/encode.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/encode.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/encode.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_acnf.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_acnf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_acnf.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_acnf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_cnf.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_cnf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_cnf.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_cnf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_extra_test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_extra_test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_extra_test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_extra_test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_key.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_key.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_key.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_key.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_pbe.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_pbe.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_pbe.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_pbe.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_pkey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_pkey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_pkey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_pkey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evp_test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evp_test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evptests.txt b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evptests.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/evptests.txt rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/evptests.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_dss.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_dss.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_dss.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_dss.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_dss1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_dss1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_dss1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_dss1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_ecdsa.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_ecdsa.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_ecdsa.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_ecdsa.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_md2.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_md2.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_md2.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_md2.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_md4.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_md4.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_md4.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_md4.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_md5.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_md5.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_md5.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_md5.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_mdc2.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_mdc2.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_mdc2.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_mdc2.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_null.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_null.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_null.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_null.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_ripemd.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_ripemd.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_ripemd.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_ripemd.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_sha.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_sha.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_sha.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_sha.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_sha1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_sha1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_sha1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_sha1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_sigver.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_sigver.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_sigver.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_sigver.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_wp.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_wp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/m_wp.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/m_wp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/names.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/names.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/names.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/names.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/openbsd_hw.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/openbsd_hw.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/openbsd_hw.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/openbsd_hw.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p5_crpt.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p5_crpt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p5_crpt.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p5_crpt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p5_crpt2.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p5_crpt2.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p5_crpt2.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p5_crpt2.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p_dec.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p_dec.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p_dec.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p_dec.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p_open.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p_open.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p_open.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p_open.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p_seal.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p_seal.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p_seal.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p_seal.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p_sign.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p_sign.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p_sign.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p_sign.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p_verify.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p_verify.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/p_verify.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/p_verify.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/pmeth_fn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/pmeth_fn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/pmeth_fn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/pmeth_fn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/pmeth_gn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/pmeth_gn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/pmeth_gn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/pmeth_gn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/evp/pmeth_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/evp/pmeth_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/evp/pmeth_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/evp/pmeth_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ex_data.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ex_data.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ex_data.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ex_data.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/fips_err.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/fips_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/fips_err.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/fips_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/fips_ers.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/fips_ers.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/fips_ers.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/fips_ers.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/getenv.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/getenv.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/getenv.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/getenv.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/hmac/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/hmac/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/hmac/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/hmac/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/hmac/hm_ameth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/hmac/hm_ameth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/hmac/hm_ameth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/hmac/hm_ameth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/hmac/hm_pmeth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/hmac/hm_pmeth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/hmac/hm_pmeth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/hmac/hm_pmeth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/hmac/hmac.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/hmac/hmac.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/hmac/hmac.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/hmac/hmac.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/hmac/hmac.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/hmac/hmac.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/hmac/hmac.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/hmac/hmac.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/hmac/hmactest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/hmac/hmactest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/hmac/hmactest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/hmac/hmactest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ia64cpuid.S b/src/openssl/openssl-1.0.2v-chevah5/crypto/ia64cpuid.S similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ia64cpuid.S rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ia64cpuid.S diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/idea/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/idea/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/idea/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/idea/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/idea/i_cbc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/idea/i_cbc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/idea/i_cbc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/idea/i_cbc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/idea/i_cfb64.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/idea/i_cfb64.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/idea/i_cfb64.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/idea/i_cfb64.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/idea/i_ecb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/idea/i_ecb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/idea/i_ecb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/idea/i_ecb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/idea/i_ofb64.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/idea/i_ofb64.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/idea/i_ofb64.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/idea/i_ofb64.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/idea/i_skey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/idea/i_skey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/idea/i_skey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/idea/i_skey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/idea/idea.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/idea/idea.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/idea/idea.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/idea/idea.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/idea/idea_lcl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/idea/idea_lcl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/idea/idea_lcl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/idea/idea_lcl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/idea/idea_spd.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/idea/idea_spd.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/idea/idea_spd.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/idea/idea_spd.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/idea/ideatest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/idea/ideatest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/idea/ideatest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/idea/ideatest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/idea/version b/src/openssl/openssl-1.0.2v-chevah5/crypto/idea/version similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/idea/version rename to src/openssl/openssl-1.0.2v-chevah5/crypto/idea/version diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/install-crypto.com b/src/openssl/openssl-1.0.2v-chevah5/crypto/install-crypto.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/install-crypto.com rename to src/openssl/openssl-1.0.2v-chevah5/crypto/install-crypto.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/jpake/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/jpake/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/jpake/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/jpake/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/jpake/jpake.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/jpake/jpake.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/jpake/jpake.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/jpake/jpake.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/jpake/jpake.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/jpake/jpake.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/jpake/jpake.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/jpake/jpake.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/jpake/jpake_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/jpake/jpake_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/jpake/jpake_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/jpake/jpake_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/jpake/jpaketest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/jpake/jpaketest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/jpake/jpaketest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/jpake/jpaketest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/krb5/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/krb5/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/krb5/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/krb5/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/krb5/krb5_asn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/krb5/krb5_asn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/krb5/krb5_asn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/krb5/krb5_asn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/krb5/krb5_asn.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/krb5/krb5_asn.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/krb5/krb5_asn.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/krb5/krb5_asn.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/lhash/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/lhash/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/lhash/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/lhash/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/lhash/lh_stats.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/lhash/lh_stats.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/lhash/lh_stats.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/lhash/lh_stats.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/lhash/lh_test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/lhash/lh_test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/lhash/lh_test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/lhash/lh_test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/lhash/lhash.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/lhash/lhash.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/lhash/lhash.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/lhash/lhash.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/lhash/lhash.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/lhash/lhash.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/lhash/lhash.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/lhash/lhash.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/lhash/num.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/lhash/num.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/lhash/num.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/lhash/num.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md2/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/md2/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md2/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md2/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md2/md2.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/md2/md2.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md2/md2.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md2/md2.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md2/md2.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/md2/md2.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md2/md2.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md2/md2.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md2/md2_dgst.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/md2/md2_dgst.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md2/md2_dgst.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md2/md2_dgst.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md2/md2_one.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/md2/md2_one.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md2/md2_one.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md2/md2_one.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md2/md2test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/md2/md2test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md2/md2test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md2/md2test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md32_common.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/md32_common.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md32_common.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md32_common.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md4/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/md4/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md4/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md4/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md4/md4.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/md4/md4.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md4/md4.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md4/md4.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md4/md4.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/md4/md4.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md4/md4.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md4/md4.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md4/md4_dgst.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/md4/md4_dgst.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md4/md4_dgst.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md4/md4_dgst.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md4/md4_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/md4/md4_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md4/md4_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md4/md4_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md4/md4_one.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/md4/md4_one.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md4/md4_one.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md4/md4_one.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md4/md4s.cpp b/src/openssl/openssl-1.0.2v-chevah5/crypto/md4/md4s.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md4/md4s.cpp rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md4/md4s.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md4/md4test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/md4/md4test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md4/md4test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md4/md4test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md5/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/md5/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md5/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md5/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md5/asm/md5-586.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/md5/asm/md5-586.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md5/asm/md5-586.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md5/asm/md5-586.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md5/asm/md5-ia64.S b/src/openssl/openssl-1.0.2v-chevah5/crypto/md5/asm/md5-ia64.S similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md5/asm/md5-ia64.S rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md5/asm/md5-ia64.S diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md5/asm/md5-sparcv9.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/md5/asm/md5-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md5/asm/md5-sparcv9.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md5/asm/md5-sparcv9.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md5/asm/md5-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/md5/asm/md5-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md5/asm/md5-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md5/asm/md5-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md5/md5.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/md5/md5.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md5/md5.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md5/md5.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md5/md5.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/md5/md5.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md5/md5.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md5/md5.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md5/md5_dgst.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/md5/md5_dgst.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md5/md5_dgst.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md5/md5_dgst.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md5/md5_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/md5/md5_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md5/md5_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md5/md5_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md5/md5_one.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/md5/md5_one.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md5/md5_one.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md5/md5_one.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md5/md5s.cpp b/src/openssl/openssl-1.0.2v-chevah5/crypto/md5/md5s.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md5/md5s.cpp rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md5/md5s.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/md5/md5test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/md5/md5test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/md5/md5test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/md5/md5test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/mdc2/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/mdc2/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/mdc2/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/mdc2/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/mdc2/mdc2.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/mdc2/mdc2.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/mdc2/mdc2.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/mdc2/mdc2.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/mdc2/mdc2_one.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/mdc2/mdc2_one.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/mdc2/mdc2_one.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/mdc2/mdc2_one.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/mdc2/mdc2dgst.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/mdc2/mdc2dgst.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/mdc2/mdc2dgst.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/mdc2/mdc2dgst.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/mdc2/mdc2test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/mdc2/mdc2test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/mdc2/mdc2test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/mdc2/mdc2test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/mem.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/mem.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/mem.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/mem.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/mem_clr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/mem_clr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/mem_clr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/mem_clr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/mem_dbg.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/mem_dbg.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/mem_dbg.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/mem_dbg.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/aesni-gcm-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/aesni-gcm-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/aesni-gcm-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/aesni-gcm-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-alpha.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-alpha.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-alpha.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-alpha.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-armv4.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-armv4.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-armv4.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-armv4.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-ia64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-ia64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-ia64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-ia64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-parisc.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-parisc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-parisc.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-parisc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-s390x.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-s390x.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-s390x.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-s390x.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-sparcv9.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-sparcv9.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-sparcv9.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-x86.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-x86.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-x86.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-x86.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghash-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghash-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghashp8-ppc.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghashp8-ppc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghashp8-ppc.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghashp8-ppc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghashv8-armx.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghashv8-armx.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/asm/ghashv8-armx.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/asm/ghashv8-armx.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/cbc128.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/cbc128.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/cbc128.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/cbc128.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/ccm128.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/ccm128.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/ccm128.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/ccm128.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/cfb128.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/cfb128.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/cfb128.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/cfb128.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/ctr128.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/ctr128.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/ctr128.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/ctr128.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/cts128.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/cts128.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/cts128.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/cts128.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/gcm128.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/gcm128.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/gcm128.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/gcm128.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/modes.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/modes.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/modes.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/modes.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/modes_lcl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/modes_lcl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/modes_lcl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/modes_lcl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/ofb128.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/ofb128.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/ofb128.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/ofb128.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/wrap128.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/wrap128.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/wrap128.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/wrap128.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/modes/xts128.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/modes/xts128.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/modes/xts128.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/modes/xts128.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/o_dir.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/o_dir.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/o_dir.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/o_dir.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/o_dir.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/o_dir.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/o_dir.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/o_dir.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/o_dir_test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/o_dir_test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/o_dir_test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/o_dir_test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/o_fips.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/o_fips.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/o_fips.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/o_fips.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/o_init.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/o_init.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/o_init.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/o_init.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/o_str.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/o_str.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/o_str.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/o_str.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/o_str.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/o_str.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/o_str.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/o_str.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/o_time.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/o_time.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/o_time.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/o_time.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/o_time.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/o_time.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/o_time.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/o_time.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/o_names.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/o_names.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/o_names.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/o_names.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_dat.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_dat.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_dat.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_dat.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_dat.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_dat.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_dat.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_dat.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_dat.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_dat.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_dat.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_dat.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_mac.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_mac.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_mac.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_mac.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_mac.num b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_mac.num similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_mac.num rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_mac.num diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_xref.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_xref.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_xref.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_xref.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_xref.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_xref.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_xref.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_xref.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_xref.txt b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_xref.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/obj_xref.txt rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/obj_xref.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/objects.README b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/objects.README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/objects.README rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/objects.README diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/objects.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/objects.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/objects.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/objects.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/objects.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/objects.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/objects.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/objects.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/objects.txt b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/objects.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/objects.txt rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/objects.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/objects/objxref.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/objects/objxref.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/objects/objxref.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/objects/objxref.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_asn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_asn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_asn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_asn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_cl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_cl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_cl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_cl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_ext.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_ext.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_ext.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_ext.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_ht.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_ht.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_ht.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_ht.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_prn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_prn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_prn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_prn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_srv.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_srv.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_srv.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_srv.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_vfy.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_vfy.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ocsp/ocsp_vfy.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ocsp/ocsp_vfy.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/opensslconf.h.in b/src/openssl/openssl-1.0.2v-chevah5/crypto/opensslconf.h.in similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/opensslconf.h.in rename to src/openssl/openssl-1.0.2v-chevah5/crypto/opensslconf.h.in diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/opensslv.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/opensslv.h similarity index 96% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/opensslv.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/opensslv.h index 9f81ff653..56fdfd171 100644 --- a/src/openssl/openssl-1.0.2v-chevah4/crypto/opensslv.h +++ b/src/openssl/openssl-1.0.2v-chevah5/crypto/opensslv.h @@ -32,9 +32,9 @@ extern "C" { */ # define OPENSSL_VERSION_NUMBER 0x10002160L # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2v-fips-chevah4 06 Apr 2022" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2v-fips-chevah5 21 Sep 2023" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2v-chevah4 06 Apr 2022" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2v-chevah5 21 Sep 2023" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ossl_typ.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ossl_typ.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ossl_typ.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ossl_typ.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pariscid.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/pariscid.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pariscid.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pariscid.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/message b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/message similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/message rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/message diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem2.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem2.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem2.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem2.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_all.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_all.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_all.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_all.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_info.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_info.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_info.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_info.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_oth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_oth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_oth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_oth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_pk8.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_pk8.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_pk8.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_pk8.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_pkey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_pkey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_pkey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_pkey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_seal.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_seal.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_seal.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_seal.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_sign.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_sign.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_sign.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_sign.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_x509.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_x509.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_x509.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_x509.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_xaux.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_xaux.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pem_xaux.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pem_xaux.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pkcs7.lis b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pkcs7.lis similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pkcs7.lis rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pkcs7.lis diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pvkfmt.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pvkfmt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pem/pvkfmt.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pem/pvkfmt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/cbc.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/cbc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/cbc.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/cbc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/ppc-xlate.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/ppc-xlate.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/ppc-xlate.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/ppc-xlate.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/readme b/src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/readme similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/readme rename to src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/readme diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/sparcv9_modes.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/sparcv9_modes.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/sparcv9_modes.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/sparcv9_modes.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/x86_64-xlate.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/x86_64-xlate.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/x86_64-xlate.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/x86_64-xlate.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/x86asm.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/x86asm.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/x86asm.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/x86asm.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/x86gas.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/x86gas.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/x86gas.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/x86gas.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/x86masm.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/x86masm.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/x86masm.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/x86masm.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/x86nasm.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/x86nasm.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/perlasm/x86nasm.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/perlasm/x86nasm.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_add.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_add.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_add.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_add.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_asn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_asn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_asn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_asn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_attr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_attr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_attr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_attr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_crpt.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_crpt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_crpt.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_crpt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_crt.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_crt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_crt.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_crt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_decr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_decr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_decr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_decr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_init.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_init.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_init.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_init.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_key.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_key.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_key.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_key.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_kiss.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_kiss.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_kiss.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_kiss.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_mutl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_mutl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_mutl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_mutl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_npas.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_npas.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_npas.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_npas.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_p8d.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_p8d.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_p8d.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_p8d.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_p8e.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_p8e.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_p8e.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_p8e.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_utl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_utl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/p12_utl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/p12_utl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/pk12err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/pk12err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/pk12err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/pk12err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/pkcs12.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/pkcs12.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs12/pkcs12.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs12/pkcs12.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/bio_pk7.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/bio_pk7.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/bio_pk7.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/bio_pk7.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_asn1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_asn1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_asn1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_asn1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_attr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_attr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_attr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_attr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_dgst.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_dgst.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_dgst.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_dgst.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_doit.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_doit.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_doit.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_doit.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_mime.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_mime.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_mime.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_mime.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_smime.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_smime.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pk7_smime.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pk7_smime.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pkcs7.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pkcs7.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pkcs7.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pkcs7.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pkcs7err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pkcs7err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pkcs7/pkcs7err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pkcs7/pkcs7err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ppc_arch.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ppc_arch.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ppc_arch.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ppc_arch.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ppccap.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ppccap.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ppccap.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ppccap.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ppccpuid.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/ppccpuid.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ppccpuid.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ppccpuid.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pqueue/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/pqueue/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pqueue/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pqueue/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pqueue/pq_test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pqueue/pq_test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pqueue/pq_test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pqueue/pq_test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pqueue/pqueue.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/pqueue/pqueue.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pqueue/pqueue.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pqueue/pqueue.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/pqueue/pqueue.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/pqueue/pqueue.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/pqueue/pqueue.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/pqueue/pqueue.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rand/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/rand/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rand/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rand/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rand/md_rand.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rand/md_rand.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rand/md_rand.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rand/md_rand.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_egd.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_egd.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_egd.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_egd.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_lcl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_lcl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_lcl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_lcl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_nw.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_nw.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_nw.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_nw.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_os2.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_os2.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_os2.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_os2.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_unix.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_unix.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_unix.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_unix.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_vms.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_vms.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_vms.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_vms.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_win.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_win.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rand/rand_win.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rand/rand_win.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rand/randfile.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rand/randfile.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rand/randfile.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rand/randfile.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rand/randtest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rand/randtest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rand/randtest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rand/randtest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2_cbc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2_cbc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2_cbc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2_cbc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2_ecb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2_ecb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2_ecb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2_ecb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2_skey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2_skey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2_skey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2_skey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2cfb64.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2cfb64.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2cfb64.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2cfb64.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2ofb64.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2ofb64.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2ofb64.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2ofb64.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2speed.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2speed.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2speed.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2speed.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rc2test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rc2test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rrc2.doc b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rrc2.doc similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/rrc2.doc rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/rrc2.doc diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/tab.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/tab.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/tab.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/tab.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/version b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/version similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc2/version rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc2/version diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/asm/rc4-586.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/asm/rc4-586.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/asm/rc4-586.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/asm/rc4-586.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/asm/rc4-ia64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/asm/rc4-ia64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/asm/rc4-ia64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/asm/rc4-ia64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/asm/rc4-md5-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/asm/rc4-md5-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/asm/rc4-md5-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/asm/rc4-md5-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/asm/rc4-parisc.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/asm/rc4-parisc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/asm/rc4-parisc.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/asm/rc4-parisc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/asm/rc4-s390x.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/asm/rc4-s390x.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/asm/rc4-s390x.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/asm/rc4-s390x.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/asm/rc4-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/asm/rc4-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/asm/rc4-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/asm/rc4-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4_skey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4_skey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4_skey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4_skey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4_utl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4_utl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4_utl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4_utl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4s.cpp b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4s.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4s.cpp rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4s.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4speed.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4speed.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4speed.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4speed.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rc4test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rc4test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rrc4.doc b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rrc4.doc similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc4/rrc4.doc rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc4/rrc4.doc diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/asm/rc5-586.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/asm/rc5-586.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/asm/rc5-586.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/asm/rc5-586.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5_ecb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5_ecb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5_ecb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5_ecb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5_enc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5_skey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5_skey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5_skey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5_skey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5cfb64.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5cfb64.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5cfb64.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5cfb64.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5ofb64.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5ofb64.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5ofb64.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5ofb64.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5s.cpp b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5s.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5s.cpp rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5s.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5speed.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5speed.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5speed.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5speed.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rc5/rc5test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rc5/rc5test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/README b/src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/README rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/asm/rips.cpp b/src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/asm/rips.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/asm/rips.cpp rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/asm/rips.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/asm/rmd-586.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/asm/rmd-586.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/asm/rmd-586.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/asm/rmd-586.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/ripemd.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/ripemd.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/ripemd.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/ripemd.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/rmd160.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/rmd160.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/rmd160.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/rmd160.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/rmd_dgst.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/rmd_dgst.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/rmd_dgst.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/rmd_dgst.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/rmd_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/rmd_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/rmd_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/rmd_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/rmd_one.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/rmd_one.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/rmd_one.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/rmd_one.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/rmdconst.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/rmdconst.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/rmdconst.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/rmdconst.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/rmdtest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/rmdtest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ripemd/rmdtest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ripemd/rmdtest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_ameth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_ameth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_ameth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_ameth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_asn1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_asn1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_asn1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_asn1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_chk.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_chk.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_chk.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_chk.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_crpt.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_crpt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_crpt.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_crpt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_depr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_depr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_depr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_depr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_eay.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_eay.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_eay.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_eay.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_gen.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_gen.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_gen.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_gen.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_none.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_none.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_none.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_none.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_null.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_null.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_null.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_null.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_oaep.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_oaep.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_oaep.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_oaep.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_pk1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_pk1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_pk1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_pk1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_pmeth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_pmeth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_pmeth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_pmeth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_prn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_prn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_prn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_prn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_pss.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_pss.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_pss.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_pss.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_saos.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_saos.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_saos.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_saos.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_sign.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_sign.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_sign.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_sign.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_ssl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_ssl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_ssl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_ssl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_x931.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_x931.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/rsa/rsa_x931.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/rsa/rsa_x931.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/s390xcap.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/s390xcap.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/s390xcap.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/s390xcap.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/s390xcpuid.S b/src/openssl/openssl-1.0.2v-chevah5/crypto/s390xcpuid.S similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/s390xcpuid.S rename to src/openssl/openssl-1.0.2v-chevah5/crypto/s390xcpuid.S diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/seed/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/seed/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/seed/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/seed/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/seed/seed.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/seed/seed.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/seed/seed.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/seed/seed.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/seed/seed.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/seed/seed.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/seed/seed.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/seed/seed.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/seed/seed_cbc.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/seed/seed_cbc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/seed/seed_cbc.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/seed/seed_cbc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/seed/seed_cfb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/seed/seed_cfb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/seed/seed_cfb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/seed/seed_cfb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/seed/seed_ecb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/seed/seed_ecb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/seed/seed_ecb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/seed/seed_ecb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/seed/seed_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/seed/seed_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/seed/seed_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/seed/seed_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/seed/seed_ofb.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/seed/seed_ofb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/seed/seed_ofb.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/seed/seed_ofb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/README b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/README rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-586.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-586.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-586.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-586.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-alpha.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-alpha.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-alpha.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-alpha.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-armv4-large.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-armv4-large.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-armv4-large.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-armv4-large.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-armv8.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-armv8.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-armv8.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-armv8.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-ia64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-ia64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-ia64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-ia64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-mb-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-mb-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-mb-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-mb-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-mips.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-mips.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-mips.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-mips.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-parisc.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-parisc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-parisc.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-parisc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-ppc.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-ppc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-ppc.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-ppc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-s390x.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-s390x.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-s390x.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-s390x.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-sparcv9.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-sparcv9.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-sparcv9.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-sparcv9a.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-sparcv9a.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-sparcv9a.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-sparcv9a.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-thumb.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-thumb.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-thumb.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-thumb.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha1-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha1-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha256-586.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha256-586.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha256-586.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha256-586.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha256-armv4.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha256-armv4.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha256-armv4.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha256-armv4.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha256-mb-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha256-mb-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha256-mb-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha256-mb-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-586.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-586.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-586.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-586.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-armv4.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-armv4.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-armv4.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-armv4.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-armv8.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-armv8.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-armv8.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-armv8.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-ia64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-ia64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-ia64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-ia64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-mips.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-mips.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-mips.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-mips.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-parisc.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-parisc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-parisc.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-parisc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-ppc.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-ppc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-ppc.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-ppc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-s390x.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-s390x.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-s390x.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-s390x.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-sparcv9.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-sparcv9.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-sparcv9.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512p8-ppc.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512p8-ppc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/asm/sha512p8-ppc.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/asm/sha512p8-ppc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha1_one.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha1_one.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha1_one.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha1_one.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha1dgst.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha1dgst.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha1dgst.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha1dgst.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha1test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha1test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha1test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha1test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha256.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha256.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha256.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha256.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha256t.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha256t.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha256t.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha256t.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha512.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha512.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha512.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha512.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha512t.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha512t.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha512t.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha512t.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha_dgst.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha_dgst.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha_dgst.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha_dgst.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha_one.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha_one.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/sha_one.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/sha_one.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sha/shatest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/sha/shatest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sha/shatest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sha/shatest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sparc_arch.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/sparc_arch.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sparc_arch.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sparc_arch.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sparccpuid.S b/src/openssl/openssl-1.0.2v-chevah5/crypto/sparccpuid.S similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sparccpuid.S rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sparccpuid.S diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/sparcv9cap.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/sparcv9cap.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/sparcv9cap.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/sparcv9cap.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/srp/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/srp/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/srp/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/srp/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/srp/srp.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/srp/srp.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/srp/srp.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/srp/srp.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/srp/srp_grps.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/srp/srp_grps.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/srp/srp_grps.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/srp/srp_grps.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/srp/srp_lcl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/srp/srp_lcl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/srp/srp_lcl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/srp/srp_lcl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/srp/srp_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/srp/srp_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/srp/srp_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/srp/srp_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/srp/srp_vfy.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/srp/srp_vfy.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/srp/srp_vfy.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/srp/srp_vfy.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/srp/srptest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/srp/srptest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/srp/srptest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/srp/srptest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/stack/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/stack/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/stack/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/stack/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/stack/safestack.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/stack/safestack.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/stack/safestack.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/stack/safestack.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/stack/stack.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/stack/stack.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/stack/stack.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/stack/stack.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/stack/stack.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/stack/stack.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/stack/stack.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/stack/stack.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/store/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/store/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/store/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/store/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/store/README b/src/openssl/openssl-1.0.2v-chevah5/crypto/store/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/store/README rename to src/openssl/openssl-1.0.2v-chevah5/crypto/store/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/store/store.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/store/store.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/store/store.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/store/store.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/store/str_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/store/str_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/store/str_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/store/str_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/store/str_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/store/str_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/store/str_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/store/str_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/store/str_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/store/str_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/store/str_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/store/str_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/store/str_mem.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/store/str_mem.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/store/str_mem.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/store/str_mem.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/store/str_meth.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/store/str_meth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/store/str_meth.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/store/str_meth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/symhacks.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/symhacks.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/symhacks.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/symhacks.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/threads/README b/src/openssl/openssl-1.0.2v-chevah5/crypto/threads/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/threads/README rename to src/openssl/openssl-1.0.2v-chevah5/crypto/threads/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/threads/mttest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/threads/mttest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/threads/mttest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/threads/mttest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/threads/netware.bat b/src/openssl/openssl-1.0.2v-chevah5/crypto/threads/netware.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/threads/netware.bat rename to src/openssl/openssl-1.0.2v-chevah5/crypto/threads/netware.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/threads/profile.sh b/src/openssl/openssl-1.0.2v-chevah5/crypto/threads/profile.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/threads/profile.sh rename to src/openssl/openssl-1.0.2v-chevah5/crypto/threads/profile.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/threads/ptest.bat b/src/openssl/openssl-1.0.2v-chevah5/crypto/threads/ptest.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/threads/ptest.bat rename to src/openssl/openssl-1.0.2v-chevah5/crypto/threads/ptest.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/threads/pthread.sh b/src/openssl/openssl-1.0.2v-chevah5/crypto/threads/pthread.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/threads/pthread.sh rename to src/openssl/openssl-1.0.2v-chevah5/crypto/threads/pthread.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/threads/pthread2.sh b/src/openssl/openssl-1.0.2v-chevah5/crypto/threads/pthread2.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/threads/pthread2.sh rename to src/openssl/openssl-1.0.2v-chevah5/crypto/threads/pthread2.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/threads/pthreads-vms.com b/src/openssl/openssl-1.0.2v-chevah5/crypto/threads/pthreads-vms.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/threads/pthreads-vms.com rename to src/openssl/openssl-1.0.2v-chevah5/crypto/threads/pthreads-vms.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/threads/purify.sh b/src/openssl/openssl-1.0.2v-chevah5/crypto/threads/purify.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/threads/purify.sh rename to src/openssl/openssl-1.0.2v-chevah5/crypto/threads/purify.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/threads/solaris.sh b/src/openssl/openssl-1.0.2v-chevah5/crypto/threads/solaris.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/threads/solaris.sh rename to src/openssl/openssl-1.0.2v-chevah5/crypto/threads/solaris.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/threads/th-lock.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/threads/th-lock.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/threads/th-lock.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/threads/th-lock.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/threads/win32.bat b/src/openssl/openssl-1.0.2v-chevah5/crypto/threads/win32.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/threads/win32.bat rename to src/openssl/openssl-1.0.2v-chevah5/crypto/threads/win32.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ts/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/ts/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ts/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ts/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_asn1.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_asn1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_asn1.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_asn1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_conf.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_conf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_conf.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_conf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_req_print.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_req_print.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_req_print.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_req_print.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_req_utils.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_req_utils.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_req_utils.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_req_utils.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_rsp_print.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_rsp_print.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_rsp_print.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_rsp_print.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_rsp_sign.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_rsp_sign.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_rsp_sign.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_rsp_sign.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_rsp_utils.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_rsp_utils.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_rsp_utils.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_rsp_utils.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_rsp_verify.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_rsp_verify.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_rsp_verify.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_rsp_verify.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_verify_ctx.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_verify_ctx.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ts/ts_verify_ctx.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ts/ts_verify_ctx.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/txt_db/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/txt_db/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/txt_db/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/txt_db/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/txt_db/txt_db.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/txt_db/txt_db.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/txt_db/txt_db.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/txt_db/txt_db.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/txt_db/txt_db.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/txt_db/txt_db.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/txt_db/txt_db.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/txt_db/txt_db.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ui/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/ui/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ui/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ui/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui_compat.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui_compat.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui_compat.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui_compat.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui_compat.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui_compat.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui_compat.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui_compat.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui_openssl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui_openssl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui_openssl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui_openssl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui_util.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui_util.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/ui/ui_util.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/ui/ui_util.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/uid.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/uid.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/uid.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/uid.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/vms_rms.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/vms_rms.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/vms_rms.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/vms_rms.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/asm/wp-mmx.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/asm/wp-mmx.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/asm/wp-mmx.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/asm/wp-mmx.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/asm/wp-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/asm/wp-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/asm/wp-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/asm/wp-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/whrlpool.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/whrlpool.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/whrlpool.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/whrlpool.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/wp_block.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/wp_block.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/wp_block.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/wp_block.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/wp_dgst.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/wp_dgst.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/wp_dgst.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/wp_dgst.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/wp_locl.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/wp_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/wp_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/wp_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/wp_test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/wp_test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/whrlpool/wp_test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/whrlpool/wp_test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/by_dir.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/by_dir.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/by_dir.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/by_dir.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/by_file.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/by_file.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/by_file.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/by_file.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/verify_extra_test.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/verify_extra_test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/verify_extra_test.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/verify_extra_test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/vpm_int.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/vpm_int.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/vpm_int.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/vpm_int.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_att.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_att.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_att.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_att.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_cmp.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_cmp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_cmp.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_cmp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_d2.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_d2.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_d2.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_d2.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_def.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_def.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_def.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_def.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_ext.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_ext.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_ext.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_ext.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_lu.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_lu.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_lu.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_lu.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_obj.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_obj.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_obj.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_obj.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_r2x.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_r2x.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_r2x.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_r2x.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_req.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_req.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_req.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_req.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_set.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_set.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_set.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_set.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_trs.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_trs.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_trs.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_trs.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_txt.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_txt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_txt.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_txt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_v3.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_v3.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_v3.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_v3.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_vfy.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_vfy.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_vfy.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_vfy.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_vfy.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_vfy.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_vfy.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_vfy.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_vpm.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_vpm.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509_vpm.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509_vpm.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509cset.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509cset.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509cset.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509cset.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509name.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509name.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509name.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509name.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509rset.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509rset.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509rset.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509rset.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509spki.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509spki.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509spki.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509spki.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509type.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509type.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x509type.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x509type.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x_all.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x_all.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509/x_all.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509/x_all.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/Makefile b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/ext_dat.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/ext_dat.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/ext_dat.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/ext_dat.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/pcy_cache.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/pcy_cache.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/pcy_cache.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/pcy_cache.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/pcy_data.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/pcy_data.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/pcy_data.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/pcy_data.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/pcy_int.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/pcy_int.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/pcy_int.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/pcy_int.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/pcy_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/pcy_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/pcy_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/pcy_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/pcy_map.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/pcy_map.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/pcy_map.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/pcy_map.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/pcy_node.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/pcy_node.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/pcy_node.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/pcy_node.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/pcy_tree.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/pcy_tree.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/pcy_tree.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/pcy_tree.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/tabtest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/tabtest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/tabtest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/tabtest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_addr.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_addr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_addr.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_addr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_akey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_akey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_akey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_akey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_akeya.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_akeya.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_akeya.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_akeya.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_alt.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_alt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_alt.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_alt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_asid.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_asid.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_asid.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_asid.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_bcons.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_bcons.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_bcons.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_bcons.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_bitst.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_bitst.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_bitst.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_bitst.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_conf.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_conf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_conf.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_conf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_cpols.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_cpols.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_cpols.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_cpols.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_crld.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_crld.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_crld.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_crld.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_enum.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_enum.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_enum.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_enum.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_extku.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_extku.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_extku.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_extku.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_genn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_genn.c similarity index 99% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_genn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_genn.c index b96ed5eb1..b9b17caf2 100644 --- a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_genn.c +++ b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_genn.c @@ -148,7 +148,7 @@ int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b) return -1; switch (a->type) { case GEN_X400: - result = ASN1_TYPE_cmp(a->d.x400Address, b->d.x400Address); + result = ASN1_STRING_cmp(a->d.x400Address, b->d.x400Address); break; case GEN_EDIPARTY: diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_ia5.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_ia5.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_ia5.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_ia5.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_info.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_info.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_info.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_info.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_int.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_int.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_int.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_int.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_lib.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_ncons.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_ncons.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_ncons.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_ncons.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_ocsp.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_ocsp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_ocsp.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_ocsp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_pci.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_pci.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_pci.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_pci.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_pcia.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_pcia.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_pcia.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_pcia.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_pcons.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_pcons.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_pcons.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_pcons.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_pku.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_pku.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_pku.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_pku.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_pmaps.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_pmaps.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_pmaps.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_pmaps.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_prn.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_prn.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_prn.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_prn.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_purp.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_purp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_purp.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_purp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_scts.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_scts.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_scts.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_scts.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_skey.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_skey.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_skey.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_skey.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_sxnet.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_sxnet.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_sxnet.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_sxnet.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_utl.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_utl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3_utl.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3_utl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3conf.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3conf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3conf.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3conf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3err.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3err.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3nametest.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3nametest.c similarity index 99% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3nametest.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3nametest.c index 4c7f5d899..d64996db3 100644 --- a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3nametest.c +++ b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3nametest.c @@ -610,6 +610,14 @@ struct gennamedata { 0xb7, 0x09, 0x02, 0x02 }, 15 + }, { + /* + * Regression test for CVE-2023-0286. + */ + { + 0xa3, 0x00 + }, + 2 } }; diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3prin.c b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3prin.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/v3prin.c rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/v3prin.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/x509v3.h b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/x509v3.h similarity index 99% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/x509v3.h rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/x509v3.h index 1160a7ca8..9cb2d339c 100644 --- a/src/openssl/openssl-1.0.2v-chevah4/crypto/x509v3/x509v3.h +++ b/src/openssl/openssl-1.0.2v-chevah5/crypto/x509v3/x509v3.h @@ -190,7 +190,7 @@ typedef struct GENERAL_NAME_st { OTHERNAME *otherName; /* otherName */ ASN1_IA5STRING *rfc822Name; ASN1_IA5STRING *dNSName; - ASN1_TYPE *x400Address; + ASN1_STRING *x400Address; X509_NAME *directoryName; EDIPARTYNAME *ediPartyName; ASN1_IA5STRING *uniformResourceIdentifier; diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x86_64cpuid.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/x86_64cpuid.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x86_64cpuid.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x86_64cpuid.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/crypto/x86cpuid.pl b/src/openssl/openssl-1.0.2v-chevah5/crypto/x86cpuid.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/crypto/x86cpuid.pl rename to src/openssl/openssl-1.0.2v-chevah5/crypto/x86cpuid.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/README b/src/openssl/openssl-1.0.2v-chevah5/demos/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/README rename to src/openssl/openssl-1.0.2v-chevah5/demos/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/asn1/README.ASN1 b/src/openssl/openssl-1.0.2v-chevah5/demos/asn1/README.ASN1 similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/asn1/README.ASN1 rename to src/openssl/openssl-1.0.2v-chevah5/demos/asn1/README.ASN1 diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/asn1/ocsp.c b/src/openssl/openssl-1.0.2v-chevah5/demos/asn1/ocsp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/asn1/ocsp.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/asn1/ocsp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/b64.c b/src/openssl/openssl-1.0.2v-chevah5/demos/b64.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/b64.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/b64.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/b64.pl b/src/openssl/openssl-1.0.2v-chevah5/demos/b64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/b64.pl rename to src/openssl/openssl-1.0.2v-chevah5/demos/b64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/bio/Makefile b/src/openssl/openssl-1.0.2v-chevah5/demos/bio/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/bio/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/demos/bio/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/bio/README b/src/openssl/openssl-1.0.2v-chevah5/demos/bio/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/bio/README rename to src/openssl/openssl-1.0.2v-chevah5/demos/bio/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/bio/accept.cnf b/src/openssl/openssl-1.0.2v-chevah5/demos/bio/accept.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/bio/accept.cnf rename to src/openssl/openssl-1.0.2v-chevah5/demos/bio/accept.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/bio/client-arg.c b/src/openssl/openssl-1.0.2v-chevah5/demos/bio/client-arg.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/bio/client-arg.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/bio/client-arg.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/bio/client-conf.c b/src/openssl/openssl-1.0.2v-chevah5/demos/bio/client-conf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/bio/client-conf.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/bio/client-conf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/bio/connect.cnf b/src/openssl/openssl-1.0.2v-chevah5/demos/bio/connect.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/bio/connect.cnf rename to src/openssl/openssl-1.0.2v-chevah5/demos/bio/connect.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/bio/saccept.c b/src/openssl/openssl-1.0.2v-chevah5/demos/bio/saccept.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/bio/saccept.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/bio/saccept.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/bio/sconnect.c b/src/openssl/openssl-1.0.2v-chevah5/demos/bio/sconnect.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/bio/sconnect.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/bio/sconnect.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/bio/server-arg.c b/src/openssl/openssl-1.0.2v-chevah5/demos/bio/server-arg.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/bio/server-arg.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/bio/server-arg.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/bio/server-conf.c b/src/openssl/openssl-1.0.2v-chevah5/demos/bio/server-conf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/bio/server-conf.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/bio/server-conf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/bio/server.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/bio/server.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/bio/server.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/bio/server.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/cacert.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/cacert.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/cacert.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/cacert.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/cakey.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/cakey.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/cakey.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/cakey.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_comp.c b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_comp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_comp.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_comp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_ddec.c b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_ddec.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_ddec.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_ddec.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_dec.c b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_dec.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_dec.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_dec.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_denc.c b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_denc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_denc.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_denc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_enc.c b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_sign.c b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_sign.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_sign.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_sign.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_sign2.c b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_sign2.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_sign2.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_sign2.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_uncomp.c b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_uncomp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_uncomp.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_uncomp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_ver.c b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_ver.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/cms_ver.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/cms_ver.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/comp.txt b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/comp.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/comp.txt rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/comp.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/encr.txt b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/encr.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/encr.txt rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/encr.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/sign.txt b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/sign.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/sign.txt rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/sign.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/signer.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/signer.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/signer.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/signer.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/cms/signer2.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/cms/signer2.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/cms/signer2.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/cms/signer2.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/Makefile b/src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/README b/src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/README rename to src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/cacerts.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/cacerts.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/cacerts.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/cacerts.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/cert.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/cert.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/cert.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/cert.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/easy-tls.c b/src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/easy-tls.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/easy-tls.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/easy-tls.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/easy-tls.h b/src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/easy-tls.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/easy-tls.h rename to src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/easy-tls.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/test.c b/src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/test.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/test.h b/src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/test.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/easy_tls/test.h rename to src/openssl/openssl-1.0.2v-chevah5/demos/easy_tls/test.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/cluster_labs/Makefile b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/cluster_labs/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/cluster_labs/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/cluster_labs/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/cluster_labs/cluster_labs.h b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/cluster_labs/cluster_labs.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/cluster_labs/cluster_labs.h rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/cluster_labs/cluster_labs.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/cluster_labs/hw_cluster_labs.c b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/cluster_labs/hw_cluster_labs.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/cluster_labs/hw_cluster_labs.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/cluster_labs/hw_cluster_labs.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/cluster_labs/hw_cluster_labs.ec b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/cluster_labs/hw_cluster_labs.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/cluster_labs/hw_cluster_labs.ec rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/cluster_labs/hw_cluster_labs.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/cluster_labs/hw_cluster_labs_err.c b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/cluster_labs/hw_cluster_labs_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/cluster_labs/hw_cluster_labs_err.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/cluster_labs/hw_cluster_labs_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/cluster_labs/hw_cluster_labs_err.h b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/cluster_labs/hw_cluster_labs_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/cluster_labs/hw_cluster_labs_err.h rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/cluster_labs/hw_cluster_labs_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/ibmca/Makefile b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/ibmca/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/ibmca/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/ibmca/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/ibmca/hw_ibmca.c b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/ibmca/hw_ibmca.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/ibmca/hw_ibmca.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/ibmca/hw_ibmca.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/ibmca/hw_ibmca.ec b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/ibmca/hw_ibmca.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/ibmca/hw_ibmca.ec rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/ibmca/hw_ibmca.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/ibmca/hw_ibmca_err.c b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/ibmca/hw_ibmca_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/ibmca/hw_ibmca_err.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/ibmca/hw_ibmca_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/ibmca/hw_ibmca_err.h b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/ibmca/hw_ibmca_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/ibmca/hw_ibmca_err.h rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/ibmca/hw_ibmca_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/ibmca/ica_openssl_api.h b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/ibmca/ica_openssl_api.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/ibmca/ica_openssl_api.h rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/ibmca/ica_openssl_api.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/rsaref/Makefile b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/rsaref/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/rsaref/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/rsaref/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/rsaref/README b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/rsaref/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/rsaref/README rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/rsaref/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/rsaref/build.com b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/rsaref/build.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/rsaref/build.com rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/rsaref/build.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/rsaref/rsaref.c b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/rsaref/rsaref.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/rsaref/rsaref.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/rsaref/rsaref.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/rsaref/rsaref.ec b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/rsaref/rsaref.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/rsaref/rsaref.ec rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/rsaref/rsaref.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/rsaref/rsaref_err.c b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/rsaref/rsaref_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/rsaref/rsaref_err.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/rsaref/rsaref_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/rsaref/rsaref_err.h b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/rsaref/rsaref_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/rsaref/rsaref_err.h rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/rsaref/rsaref_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/zencod/Makefile b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/zencod/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/zencod/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/zencod/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/zencod/hw_zencod.c b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/zencod/hw_zencod.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/zencod/hw_zencod.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/zencod/hw_zencod.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/zencod/hw_zencod.ec b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/zencod/hw_zencod.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/zencod/hw_zencod.ec rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/zencod/hw_zencod.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/zencod/hw_zencod.h b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/zencod/hw_zencod.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/zencod/hw_zencod.h rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/zencod/hw_zencod.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/zencod/hw_zencod_err.c b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/zencod/hw_zencod_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/zencod/hw_zencod_err.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/zencod/hw_zencod_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/engines/zencod/hw_zencod_err.h b/src/openssl/openssl-1.0.2v-chevah5/demos/engines/zencod/hw_zencod_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/engines/zencod/hw_zencod_err.h rename to src/openssl/openssl-1.0.2v-chevah5/demos/engines/zencod/hw_zencod_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/pkcs12/README b/src/openssl/openssl-1.0.2v-chevah5/demos/pkcs12/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/pkcs12/README rename to src/openssl/openssl-1.0.2v-chevah5/demos/pkcs12/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/pkcs12/pkread.c b/src/openssl/openssl-1.0.2v-chevah5/demos/pkcs12/pkread.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/pkcs12/pkread.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/pkcs12/pkread.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/pkcs12/pkwrite.c b/src/openssl/openssl-1.0.2v-chevah5/demos/pkcs12/pkwrite.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/pkcs12/pkwrite.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/pkcs12/pkwrite.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/prime/Makefile b/src/openssl/openssl-1.0.2v-chevah5/demos/prime/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/prime/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/demos/prime/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/prime/prime.c b/src/openssl/openssl-1.0.2v-chevah5/demos/prime/prime.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/prime/prime.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/prime/prime.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/privkey.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/privkey.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/privkey.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/privkey.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/selfsign.c b/src/openssl/openssl-1.0.2v-chevah5/demos/selfsign.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/selfsign.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/selfsign.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/sign/Makefile b/src/openssl/openssl-1.0.2v-chevah5/demos/sign/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/sign/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/demos/sign/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/sign/cert.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/sign/cert.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/sign/cert.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/sign/cert.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/sign/key.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/sign/key.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/sign/key.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/sign/key.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/sign/sig.txt b/src/openssl/openssl-1.0.2v-chevah5/demos/sign/sig.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/sign/sig.txt rename to src/openssl/openssl-1.0.2v-chevah5/demos/sign/sig.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/sign/sign.c b/src/openssl/openssl-1.0.2v-chevah5/demos/sign/sign.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/sign/sign.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/sign/sign.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/sign/sign.txt b/src/openssl/openssl-1.0.2v-chevah5/demos/sign/sign.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/sign/sign.txt rename to src/openssl/openssl-1.0.2v-chevah5/demos/sign/sign.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/smime/cacert.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/smime/cacert.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/smime/cacert.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/smime/cacert.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/smime/cakey.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/smime/cakey.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/smime/cakey.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/smime/cakey.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/smime/encr.txt b/src/openssl/openssl-1.0.2v-chevah5/demos/smime/encr.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/smime/encr.txt rename to src/openssl/openssl-1.0.2v-chevah5/demos/smime/encr.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/smime/sign.txt b/src/openssl/openssl-1.0.2v-chevah5/demos/smime/sign.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/smime/sign.txt rename to src/openssl/openssl-1.0.2v-chevah5/demos/smime/sign.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/smime/signer.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/smime/signer.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/smime/signer.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/smime/signer.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/smime/signer2.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/smime/signer2.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/smime/signer2.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/smime/signer2.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/smime/smdec.c b/src/openssl/openssl-1.0.2v-chevah5/demos/smime/smdec.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/smime/smdec.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/smime/smdec.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/smime/smenc.c b/src/openssl/openssl-1.0.2v-chevah5/demos/smime/smenc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/smime/smenc.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/smime/smenc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/smime/smsign.c b/src/openssl/openssl-1.0.2v-chevah5/demos/smime/smsign.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/smime/smsign.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/smime/smsign.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/smime/smsign2.c b/src/openssl/openssl-1.0.2v-chevah5/demos/smime/smsign2.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/smime/smsign2.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/smime/smsign2.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/smime/smver.c b/src/openssl/openssl-1.0.2v-chevah5/demos/smime/smver.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/smime/smver.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/smime/smver.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/spkigen.c b/src/openssl/openssl-1.0.2v-chevah5/demos/spkigen.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/spkigen.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/spkigen.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/ssl/cli.cpp b/src/openssl/openssl-1.0.2v-chevah5/demos/ssl/cli.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/ssl/cli.cpp rename to src/openssl/openssl-1.0.2v-chevah5/demos/ssl/cli.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/ssl/inetdsrv.cpp b/src/openssl/openssl-1.0.2v-chevah5/demos/ssl/inetdsrv.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/ssl/inetdsrv.cpp rename to src/openssl/openssl-1.0.2v-chevah5/demos/ssl/inetdsrv.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/ssl/serv.cpp b/src/openssl/openssl-1.0.2v-chevah5/demos/ssl/serv.cpp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/ssl/serv.cpp rename to src/openssl/openssl-1.0.2v-chevah5/demos/ssl/serv.cpp diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/ssltest-ecc/ECC-RSAcertgen.sh b/src/openssl/openssl-1.0.2v-chevah5/demos/ssltest-ecc/ECC-RSAcertgen.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/ssltest-ecc/ECC-RSAcertgen.sh rename to src/openssl/openssl-1.0.2v-chevah5/demos/ssltest-ecc/ECC-RSAcertgen.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/ssltest-ecc/ECCcertgen.sh b/src/openssl/openssl-1.0.2v-chevah5/demos/ssltest-ecc/ECCcertgen.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/ssltest-ecc/ECCcertgen.sh rename to src/openssl/openssl-1.0.2v-chevah5/demos/ssltest-ecc/ECCcertgen.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/ssltest-ecc/README b/src/openssl/openssl-1.0.2v-chevah5/demos/ssltest-ecc/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/ssltest-ecc/README rename to src/openssl/openssl-1.0.2v-chevah5/demos/ssltest-ecc/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/ssltest-ecc/RSAcertgen.sh b/src/openssl/openssl-1.0.2v-chevah5/demos/ssltest-ecc/RSAcertgen.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/ssltest-ecc/RSAcertgen.sh rename to src/openssl/openssl-1.0.2v-chevah5/demos/ssltest-ecc/RSAcertgen.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/ssltest-ecc/ssltest.sh b/src/openssl/openssl-1.0.2v-chevah5/demos/ssltest-ecc/ssltest.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/ssltest-ecc/ssltest.sh rename to src/openssl/openssl-1.0.2v-chevah5/demos/ssltest-ecc/ssltest.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/state_machine/Makefile b/src/openssl/openssl-1.0.2v-chevah5/demos/state_machine/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/state_machine/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/demos/state_machine/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/state_machine/state_machine.c b/src/openssl/openssl-1.0.2v-chevah5/demos/state_machine/state_machine.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/state_machine/state_machine.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/state_machine/state_machine.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/A-client.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/A-client.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/A-client.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/A-client.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/A-server.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/A-server.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/A-server.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/A-server.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/CA.pem b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/CA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/CA.pem rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/CA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/INSTALL b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/INSTALL similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/INSTALL rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/INSTALL diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/Makefile b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/Makefile.am b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/Makefile.am similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/Makefile.am rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/Makefile.am diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/README b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/README rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/autogunk.sh b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/autogunk.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/autogunk.sh rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/autogunk.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/autoungunk.sh b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/autoungunk.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/autoungunk.sh rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/autoungunk.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/breakage.c b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/breakage.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/breakage.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/breakage.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/buffer.c b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/buffer.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/buffer.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/buffer.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/cb.c b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/cb.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/cb.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/cb.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/configure.in b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/configure.in similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/configure.in rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/configure.in diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/ip.c b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/ip.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/ip.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/ip.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/sm.c b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/sm.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/sm.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/sm.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/test.sh b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/test.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/test.sh rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/test.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/tunala.c b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/tunala.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/tunala.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/tunala.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/tunala/tunala.h b/src/openssl/openssl-1.0.2v-chevah5/demos/tunala/tunala.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/tunala/tunala.h rename to src/openssl/openssl-1.0.2v-chevah5/demos/tunala/tunala.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/x509/README b/src/openssl/openssl-1.0.2v-chevah5/demos/x509/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/x509/README rename to src/openssl/openssl-1.0.2v-chevah5/demos/x509/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/x509/mkcert.c b/src/openssl/openssl-1.0.2v-chevah5/demos/x509/mkcert.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/x509/mkcert.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/x509/mkcert.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/demos/x509/mkreq.c b/src/openssl/openssl-1.0.2v-chevah5/demos/x509/mkreq.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/demos/x509/mkreq.c rename to src/openssl/openssl-1.0.2v-chevah5/demos/x509/mkreq.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/HOWTO/certificates.txt b/src/openssl/openssl-1.0.2v-chevah5/doc/HOWTO/certificates.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/HOWTO/certificates.txt rename to src/openssl/openssl-1.0.2v-chevah5/doc/HOWTO/certificates.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/HOWTO/keys.txt b/src/openssl/openssl-1.0.2v-chevah5/doc/HOWTO/keys.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/HOWTO/keys.txt rename to src/openssl/openssl-1.0.2v-chevah5/doc/HOWTO/keys.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/HOWTO/proxy_certificates.txt b/src/openssl/openssl-1.0.2v-chevah5/doc/HOWTO/proxy_certificates.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/HOWTO/proxy_certificates.txt rename to src/openssl/openssl-1.0.2v-chevah5/doc/HOWTO/proxy_certificates.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/README b/src/openssl/openssl-1.0.2v-chevah5/doc/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/README rename to src/openssl/openssl-1.0.2v-chevah5/doc/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/CA.pl.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/CA.pl.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/CA.pl.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/CA.pl.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/asn1parse.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/asn1parse.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/asn1parse.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/asn1parse.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/c_rehash.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/c_rehash.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/c_rehash.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/c_rehash.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/ca.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/ca.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/ca.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/ca.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/ciphers.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/ciphers.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/ciphers.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/ciphers.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/cms.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/cms.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/cms.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/cms.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/config.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/config.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/config.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/config.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/crl.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/crl.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/crl.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/crl.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/crl2pkcs7.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/crl2pkcs7.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/crl2pkcs7.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/crl2pkcs7.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/dgst.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/dgst.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/dgst.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/dgst.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/dhparam.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/dhparam.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/dhparam.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/dhparam.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/dsa.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/dsa.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/dsa.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/dsa.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/dsaparam.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/dsaparam.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/dsaparam.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/dsaparam.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/ec.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/ec.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/ec.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/ec.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/ecparam.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/ecparam.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/ecparam.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/ecparam.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/enc.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/enc.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/enc.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/enc.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/errstr.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/errstr.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/errstr.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/errstr.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/gendsa.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/gendsa.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/gendsa.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/gendsa.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/genpkey.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/genpkey.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/genpkey.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/genpkey.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/genrsa.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/genrsa.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/genrsa.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/genrsa.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/nseq.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/nseq.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/nseq.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/nseq.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/ocsp.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/ocsp.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/ocsp.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/ocsp.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/openssl.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/openssl.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/openssl.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/openssl.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/passwd.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/passwd.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/passwd.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/passwd.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/pkcs12.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/pkcs12.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/pkcs12.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/pkcs12.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/pkcs7.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/pkcs7.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/pkcs7.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/pkcs7.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/pkcs8.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/pkcs8.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/pkcs8.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/pkcs8.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/pkey.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/pkey.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/pkey.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/pkey.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/pkeyparam.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/pkeyparam.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/pkeyparam.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/pkeyparam.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/pkeyutl.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/pkeyutl.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/pkeyutl.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/pkeyutl.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/rand.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/rand.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/rand.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/rand.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/req.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/req.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/req.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/req.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/rsa.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/rsa.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/rsa.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/rsa.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/rsautl.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/rsautl.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/rsautl.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/rsautl.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/s_client.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/s_client.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/s_client.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/s_client.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/s_server.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/s_server.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/s_server.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/s_server.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/s_time.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/s_time.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/s_time.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/s_time.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/sess_id.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/sess_id.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/sess_id.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/sess_id.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/smime.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/smime.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/smime.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/smime.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/speed.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/speed.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/speed.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/speed.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/spkac.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/spkac.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/spkac.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/spkac.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/ts.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/ts.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/ts.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/ts.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/tsget.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/tsget.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/tsget.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/tsget.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/verify.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/verify.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/verify.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/verify.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/version.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/version.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/version.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/version.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/x509.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/x509.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/x509.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/x509.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/apps/x509v3_config.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/apps/x509v3_config.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/apps/x509v3_config.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/apps/x509v3_config.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/c-indentation.el b/src/openssl/openssl-1.0.2v-chevah5/doc/c-indentation.el similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/c-indentation.el rename to src/openssl/openssl-1.0.2v-chevah5/doc/c-indentation.el diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ASN1_OBJECT_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ASN1_OBJECT_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ASN1_OBJECT_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ASN1_OBJECT_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ASN1_STRING_length.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ASN1_STRING_length.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ASN1_STRING_length.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ASN1_STRING_length.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ASN1_STRING_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ASN1_STRING_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ASN1_STRING_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ASN1_STRING_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ASN1_STRING_print_ex.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ASN1_STRING_print_ex.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ASN1_STRING_print_ex.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ASN1_STRING_print_ex.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ASN1_TIME_set.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ASN1_TIME_set.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ASN1_TIME_set.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ASN1_TIME_set.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ASN1_generate_nconf.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ASN1_generate_nconf.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ASN1_generate_nconf.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ASN1_generate_nconf.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_ctrl.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_ctrl.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_ctrl.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_ctrl.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_f_base64.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_f_base64.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_f_base64.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_f_base64.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_f_buffer.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_f_buffer.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_f_buffer.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_f_buffer.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_f_cipher.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_f_cipher.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_f_cipher.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_f_cipher.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_f_md.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_f_md.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_f_md.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_f_md.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_f_null.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_f_null.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_f_null.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_f_null.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_f_ssl.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_f_ssl.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_f_ssl.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_f_ssl.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_find_type.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_find_type.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_find_type.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_find_type.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_new_CMS.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_new_CMS.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_new_CMS.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_new_CMS.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_push.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_push.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_push.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_push.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_read.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_read.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_read.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_read.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_accept.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_accept.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_accept.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_accept.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_bio.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_bio.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_bio.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_bio.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_connect.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_connect.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_connect.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_connect.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_fd.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_fd.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_fd.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_fd.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_file.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_file.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_file.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_file.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_mem.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_mem.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_mem.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_mem.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_null.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_null.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_null.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_null.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_socket.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_socket.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_s_socket.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_s_socket.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_set_callback.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_set_callback.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_set_callback.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_set_callback.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_should_retry.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_should_retry.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BIO_should_retry.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BIO_should_retry.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_BLINDING_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_BLINDING_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_BLINDING_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_BLINDING_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_CTX_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_CTX_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_CTX_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_CTX_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_CTX_start.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_CTX_start.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_CTX_start.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_CTX_start.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_add.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_add.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_add.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_add.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_add_word.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_add_word.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_add_word.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_add_word.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_bn2bin.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_bn2bin.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_bn2bin.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_bn2bin.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_cmp.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_cmp.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_cmp.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_cmp.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_copy.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_copy.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_copy.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_copy.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_generate_prime.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_generate_prime.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_generate_prime.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_generate_prime.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_mod_inverse.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_mod_inverse.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_mod_inverse.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_mod_inverse.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_mod_mul_montgomery.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_mod_mul_montgomery.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_mod_mul_montgomery.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_mod_mul_montgomery.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_mod_mul_reciprocal.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_mod_mul_reciprocal.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_mod_mul_reciprocal.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_mod_mul_reciprocal.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_num_bytes.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_num_bytes.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_num_bytes.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_num_bytes.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_rand.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_rand.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_rand.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_rand.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_set_bit.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_set_bit.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_set_bit.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_set_bit.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_swap.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_swap.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_swap.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_swap.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_zero.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_zero.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/BN_zero.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/BN_zero.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_add0_cert.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_add0_cert.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_add0_cert.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_add0_cert.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_add1_recipient_cert.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_add1_recipient_cert.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_add1_recipient_cert.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_add1_recipient_cert.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_add1_signer.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_add1_signer.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_add1_signer.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_add1_signer.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_compress.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_compress.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_compress.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_compress.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_decrypt.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_decrypt.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_decrypt.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_decrypt.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_encrypt.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_encrypt.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_encrypt.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_encrypt.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_final.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_final.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_final.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_final.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_get0_RecipientInfos.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_get0_RecipientInfos.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_get0_RecipientInfos.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_get0_RecipientInfos.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_get0_SignerInfos.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_get0_SignerInfos.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_get0_SignerInfos.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_get0_SignerInfos.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_get0_type.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_get0_type.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_get0_type.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_get0_type.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_get1_ReceiptRequest.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_get1_ReceiptRequest.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_get1_ReceiptRequest.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_get1_ReceiptRequest.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_sign.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_sign.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_sign.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_sign.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_sign_receipt.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_sign_receipt.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_sign_receipt.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_sign_receipt.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_uncompress.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_uncompress.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_uncompress.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_uncompress.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_verify.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_verify.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_verify.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_verify.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_verify_receipt.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_verify_receipt.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CMS_verify_receipt.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CMS_verify_receipt.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CONF_modules_free.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CONF_modules_free.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CONF_modules_free.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CONF_modules_free.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CONF_modules_load_file.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CONF_modules_load_file.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CONF_modules_load_file.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CONF_modules_load_file.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CRYPTO_set_ex_data.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CRYPTO_set_ex_data.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/CRYPTO_set_ex_data.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/CRYPTO_set_ex_data.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DH_generate_key.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DH_generate_key.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DH_generate_key.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DH_generate_key.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DH_generate_parameters.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DH_generate_parameters.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DH_generate_parameters.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DH_generate_parameters.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DH_get_ex_new_index.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DH_get_ex_new_index.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DH_get_ex_new_index.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DH_get_ex_new_index.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DH_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DH_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DH_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DH_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DH_set_method.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DH_set_method.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DH_set_method.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DH_set_method.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DH_size.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DH_size.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DH_size.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DH_size.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_SIG_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_SIG_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_SIG_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_SIG_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_do_sign.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_do_sign.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_do_sign.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_do_sign.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_dup_DH.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_dup_DH.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_dup_DH.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_dup_DH.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_generate_key.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_generate_key.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_generate_key.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_generate_key.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_generate_parameters.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_generate_parameters.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_generate_parameters.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_generate_parameters.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_get_ex_new_index.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_get_ex_new_index.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_get_ex_new_index.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_get_ex_new_index.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_set_method.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_set_method.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_set_method.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_set_method.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_sign.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_sign.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_sign.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_sign.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_size.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_size.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/DSA_size.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/DSA_size.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EC_GFp_simple_method.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EC_GFp_simple_method.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EC_GFp_simple_method.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EC_GFp_simple_method.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EC_GROUP_copy.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EC_GROUP_copy.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EC_GROUP_copy.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EC_GROUP_copy.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EC_GROUP_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EC_GROUP_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EC_GROUP_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EC_GROUP_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EC_KEY_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EC_KEY_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EC_KEY_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EC_KEY_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EC_POINT_add.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EC_POINT_add.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EC_POINT_add.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EC_POINT_add.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EC_POINT_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EC_POINT_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EC_POINT_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EC_POINT_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_GET_LIB.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_GET_LIB.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_GET_LIB.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_GET_LIB.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_clear_error.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_clear_error.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_clear_error.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_clear_error.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_error_string.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_error_string.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_error_string.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_error_string.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_get_error.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_get_error.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_get_error.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_get_error.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_load_crypto_strings.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_load_crypto_strings.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_load_crypto_strings.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_load_crypto_strings.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_load_strings.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_load_strings.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_load_strings.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_load_strings.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_print_errors.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_print_errors.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_print_errors.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_print_errors.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_put_error.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_put_error.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_put_error.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_put_error.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_remove_state.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_remove_state.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_remove_state.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_remove_state.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_set_mark.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_set_mark.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ERR_set_mark.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ERR_set_mark.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_BytesToKey.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_BytesToKey.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_BytesToKey.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_BytesToKey.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_DigestInit.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_DigestInit.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_DigestInit.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_DigestInit.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_DigestSignInit.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_DigestSignInit.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_DigestSignInit.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_DigestSignInit.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_DigestVerifyInit.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_DigestVerifyInit.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_DigestVerifyInit.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_DigestVerifyInit.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_EncodeInit.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_EncodeInit.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_EncodeInit.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_EncodeInit.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_EncryptInit.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_EncryptInit.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_EncryptInit.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_EncryptInit.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_OpenInit.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_OpenInit.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_OpenInit.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_OpenInit.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_CTX_ctrl.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_CTX_ctrl.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_CTX_ctrl.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_CTX_ctrl.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_CTX_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_CTX_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_CTX_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_CTX_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_cmp.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_cmp.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_cmp.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_cmp.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_decrypt.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_decrypt.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_decrypt.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_decrypt.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_derive.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_derive.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_derive.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_derive.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_encrypt.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_encrypt.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_encrypt.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_encrypt.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_get_default_digest.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_get_default_digest.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_get_default_digest.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_get_default_digest.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_keygen.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_keygen.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_keygen.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_keygen.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_meth_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_meth_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_meth_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_meth_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_print_private.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_print_private.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_print_private.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_print_private.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_set1_RSA.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_set1_RSA.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_set1_RSA.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_set1_RSA.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_sign.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_sign.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_sign.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_sign.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_verify.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_verify.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_verify.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_verify.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_verify_recover.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_verify_recover.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_PKEY_verify_recover.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_PKEY_verify_recover.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_SealInit.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_SealInit.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_SealInit.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_SealInit.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_SignInit.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_SignInit.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_SignInit.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_SignInit.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_VerifyInit.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_VerifyInit.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/EVP_VerifyInit.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/EVP_VerifyInit.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OBJ_nid2obj.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OBJ_nid2obj.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OBJ_nid2obj.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OBJ_nid2obj.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OPENSSL_Applink.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OPENSSL_Applink.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OPENSSL_Applink.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OPENSSL_Applink.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OPENSSL_VERSION_NUMBER.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OPENSSL_VERSION_NUMBER.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OPENSSL_VERSION_NUMBER.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OPENSSL_VERSION_NUMBER.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OPENSSL_config.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OPENSSL_config.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OPENSSL_config.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OPENSSL_config.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OPENSSL_ia32cap.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OPENSSL_ia32cap.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OPENSSL_ia32cap.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OPENSSL_ia32cap.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OPENSSL_instrument_bus.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OPENSSL_instrument_bus.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OPENSSL_instrument_bus.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OPENSSL_instrument_bus.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OPENSSL_load_builtin_modules.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OPENSSL_load_builtin_modules.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OPENSSL_load_builtin_modules.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OPENSSL_load_builtin_modules.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OpenSSL_add_all_algorithms.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OpenSSL_add_all_algorithms.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/OpenSSL_add_all_algorithms.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/OpenSSL_add_all_algorithms.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PEM_write_bio_CMS_stream.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PEM_write_bio_CMS_stream.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PEM_write_bio_CMS_stream.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PEM_write_bio_CMS_stream.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PEM_write_bio_PKCS7_stream.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PEM_write_bio_PKCS7_stream.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PEM_write_bio_PKCS7_stream.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PEM_write_bio_PKCS7_stream.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PKCS12_create.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PKCS12_create.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PKCS12_create.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PKCS12_create.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PKCS12_parse.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PKCS12_parse.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PKCS12_parse.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PKCS12_parse.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PKCS7_decrypt.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PKCS7_decrypt.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PKCS7_decrypt.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PKCS7_decrypt.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PKCS7_encrypt.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PKCS7_encrypt.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PKCS7_encrypt.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PKCS7_encrypt.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PKCS7_sign.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PKCS7_sign.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PKCS7_sign.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PKCS7_sign.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PKCS7_sign_add_signer.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PKCS7_sign_add_signer.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PKCS7_sign_add_signer.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PKCS7_sign_add_signer.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PKCS7_verify.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PKCS7_verify.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/PKCS7_verify.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/PKCS7_verify.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RAND_add.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RAND_add.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RAND_add.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RAND_add.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RAND_bytes.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RAND_bytes.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RAND_bytes.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RAND_bytes.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RAND_cleanup.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RAND_cleanup.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RAND_cleanup.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RAND_cleanup.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RAND_egd.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RAND_egd.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RAND_egd.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RAND_egd.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RAND_load_file.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RAND_load_file.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RAND_load_file.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RAND_load_file.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RAND_set_rand_method.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RAND_set_rand_method.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RAND_set_rand_method.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RAND_set_rand_method.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_blinding_on.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_blinding_on.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_blinding_on.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_blinding_on.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_check_key.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_check_key.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_check_key.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_check_key.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_generate_key.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_generate_key.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_generate_key.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_generate_key.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_get_ex_new_index.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_get_ex_new_index.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_get_ex_new_index.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_get_ex_new_index.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_padding_add_PKCS1_type_1.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_padding_add_PKCS1_type_1.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_padding_add_PKCS1_type_1.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_padding_add_PKCS1_type_1.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_print.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_print.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_print.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_print.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_private_encrypt.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_private_encrypt.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_private_encrypt.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_private_encrypt.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_public_encrypt.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_public_encrypt.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_public_encrypt.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_public_encrypt.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_set_method.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_set_method.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_set_method.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_set_method.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_sign.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_sign.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_sign.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_sign.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_sign_ASN1_OCTET_STRING.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_sign_ASN1_OCTET_STRING.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_sign_ASN1_OCTET_STRING.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_sign_ASN1_OCTET_STRING.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_size.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_size.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/RSA_size.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/RSA_size.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/SMIME_read_CMS.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/SMIME_read_CMS.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/SMIME_read_CMS.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/SMIME_read_CMS.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/SMIME_read_PKCS7.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/SMIME_read_PKCS7.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/SMIME_read_PKCS7.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/SMIME_read_PKCS7.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/SMIME_write_CMS.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/SMIME_write_CMS.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/SMIME_write_CMS.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/SMIME_write_CMS.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/SMIME_write_PKCS7.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/SMIME_write_PKCS7.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/SMIME_write_PKCS7.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/SMIME_write_PKCS7.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/SSLeay_version.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/SSLeay_version.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/SSLeay_version.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/SSLeay_version.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_NAME_ENTRY_get_object.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_NAME_ENTRY_get_object.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_NAME_ENTRY_get_object.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_NAME_ENTRY_get_object.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_NAME_add_entry_by_txt.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_NAME_add_entry_by_txt.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_NAME_add_entry_by_txt.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_NAME_add_entry_by_txt.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_NAME_get_index_by_NID.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_NAME_get_index_by_NID.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_NAME_get_index_by_NID.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_NAME_get_index_by_NID.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_NAME_print_ex.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_NAME_print_ex.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_NAME_print_ex.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_NAME_print_ex.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_STORE_CTX_get_error.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_STORE_CTX_get_error.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_STORE_CTX_get_error.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_STORE_CTX_get_error.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_STORE_CTX_get_ex_new_index.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_STORE_CTX_get_ex_new_index.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_STORE_CTX_get_ex_new_index.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_STORE_CTX_get_ex_new_index.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_STORE_CTX_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_STORE_CTX_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_STORE_CTX_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_STORE_CTX_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_STORE_CTX_set_verify_cb.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_STORE_CTX_set_verify_cb.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_STORE_CTX_set_verify_cb.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_STORE_CTX_set_verify_cb.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_STORE_set_verify_cb_func.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_STORE_set_verify_cb_func.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_STORE_set_verify_cb_func.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_STORE_set_verify_cb_func.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_VERIFY_PARAM_set_flags.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_VERIFY_PARAM_set_flags.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_VERIFY_PARAM_set_flags.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_VERIFY_PARAM_set_flags.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_check_host.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_check_host.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_check_host.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_check_host.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_check_private_key.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_check_private_key.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_check_private_key.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_check_private_key.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_cmp_time.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_cmp_time.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_cmp_time.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_cmp_time.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_verify_cert.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_verify_cert.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/X509_verify_cert.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/X509_verify_cert.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/bio.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/bio.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/bio.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/bio.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/blowfish.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/blowfish.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/blowfish.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/blowfish.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/bn.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/bn.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/bn.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/bn.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/bn_internal.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/bn_internal.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/bn_internal.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/bn_internal.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/buffer.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/buffer.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/buffer.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/buffer.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/crypto.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/crypto.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/crypto.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/crypto.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_ASN1_OBJECT.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_ASN1_OBJECT.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_ASN1_OBJECT.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_ASN1_OBJECT.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_CMS_ContentInfo.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_CMS_ContentInfo.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_CMS_ContentInfo.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_CMS_ContentInfo.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_DHparams.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_DHparams.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_DHparams.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_DHparams.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_DSAPublicKey.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_DSAPublicKey.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_DSAPublicKey.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_DSAPublicKey.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_ECPKParameters.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_ECPKParameters.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_ECPKParameters.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_ECPKParameters.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_ECPrivateKey.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_ECPrivateKey.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_ECPrivateKey.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_ECPrivateKey.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_PKCS8PrivateKey.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_PKCS8PrivateKey.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_PKCS8PrivateKey.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_PKCS8PrivateKey.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_PrivateKey.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_PrivateKey.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_PrivateKey.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_PrivateKey.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_RSAPublicKey.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_RSAPublicKey.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_RSAPublicKey.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_RSAPublicKey.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_X509.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_X509.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_X509.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_X509.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_X509_ALGOR.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_X509_ALGOR.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_X509_ALGOR.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_X509_ALGOR.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_X509_CRL.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_X509_CRL.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_X509_CRL.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_X509_CRL.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_X509_NAME.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_X509_NAME.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_X509_NAME.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_X509_NAME.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_X509_REQ.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_X509_REQ.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_X509_REQ.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_X509_REQ.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_X509_SIG.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_X509_SIG.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/d2i_X509_SIG.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/d2i_X509_SIG.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/des.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/des.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/des.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/des.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/des_modes.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/des_modes.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/des_modes.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/des_modes.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/dh.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/dh.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/dh.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/dh.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/dsa.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/dsa.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/dsa.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/dsa.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ec.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ec.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ec.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ec.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ecdsa.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ecdsa.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ecdsa.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ecdsa.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/engine.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/engine.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/engine.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/engine.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/err.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/err.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/err.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/err.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/evp.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/evp.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/evp.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/evp.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/hmac.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/hmac.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/hmac.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/hmac.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/i2d_CMS_bio_stream.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/i2d_CMS_bio_stream.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/i2d_CMS_bio_stream.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/i2d_CMS_bio_stream.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/i2d_PKCS7_bio_stream.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/i2d_PKCS7_bio_stream.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/i2d_PKCS7_bio_stream.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/i2d_PKCS7_bio_stream.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/lh_stats.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/lh_stats.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/lh_stats.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/lh_stats.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/lhash.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/lhash.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/lhash.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/lhash.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/md5.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/md5.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/md5.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/md5.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/mdc2.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/mdc2.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/mdc2.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/mdc2.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/pem.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/pem.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/pem.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/pem.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/rand.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/rand.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/rand.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/rand.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/rc4.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/rc4.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/rc4.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/rc4.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ripemd.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ripemd.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ripemd.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ripemd.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/rsa.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/rsa.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/rsa.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/rsa.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/sha.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/sha.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/sha.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/sha.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/threads.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/threads.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/threads.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/threads.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ui.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ui.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ui.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ui.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ui_compat.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ui_compat.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/ui_compat.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/ui_compat.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/crypto/x509.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/crypto/x509.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/crypto/x509.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/crypto/x509.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/dir-locals.example.el b/src/openssl/openssl-1.0.2v-chevah5/doc/dir-locals.example.el similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/dir-locals.example.el rename to src/openssl/openssl-1.0.2v-chevah5/doc/dir-locals.example.el diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/fingerprints.txt b/src/openssl/openssl-1.0.2v-chevah5/doc/fingerprints.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/fingerprints.txt rename to src/openssl/openssl-1.0.2v-chevah5/doc/fingerprints.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/openssl-c-indent.el b/src/openssl/openssl-1.0.2v-chevah5/doc/openssl-c-indent.el similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/openssl-c-indent.el rename to src/openssl/openssl-1.0.2v-chevah5/doc/openssl-c-indent.el diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/openssl-shared.txt b/src/openssl/openssl-1.0.2v-chevah5/doc/openssl-shared.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/openssl-shared.txt rename to src/openssl/openssl-1.0.2v-chevah5/doc/openssl-shared.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/openssl.txt b/src/openssl/openssl-1.0.2v-chevah5/doc/openssl.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/openssl.txt rename to src/openssl/openssl-1.0.2v-chevah5/doc/openssl.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CIPHER_get_name.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CIPHER_get_name.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CIPHER_get_name.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CIPHER_get_name.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_COMP_add_compression_method.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_COMP_add_compression_method.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_COMP_add_compression_method.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_COMP_add_compression_method.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CONF_CTX_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CONF_CTX_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CONF_CTX_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CONF_CTX_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CONF_CTX_set1_prefix.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CONF_CTX_set1_prefix.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CONF_CTX_set1_prefix.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CONF_CTX_set1_prefix.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CONF_CTX_set_flags.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CONF_CTX_set_flags.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CONF_CTX_set_flags.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CONF_CTX_set_flags.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CONF_CTX_set_ssl_ctx.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CONF_CTX_set_ssl_ctx.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CONF_CTX_set_ssl_ctx.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CONF_CTX_set_ssl_ctx.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CONF_cmd.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CONF_cmd.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CONF_cmd.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CONF_cmd.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CONF_cmd_argv.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CONF_cmd_argv.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CONF_cmd_argv.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CONF_cmd_argv.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_add1_chain_cert.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_add1_chain_cert.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_add1_chain_cert.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_add1_chain_cert.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_add_extra_chain_cert.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_add_extra_chain_cert.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_add_extra_chain_cert.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_add_extra_chain_cert.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_add_session.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_add_session.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_add_session.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_add_session.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_ctrl.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_ctrl.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_ctrl.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_ctrl.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_flush_sessions.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_flush_sessions.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_flush_sessions.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_flush_sessions.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_free.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_free.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_free.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_free.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_get0_param.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_get0_param.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_get0_param.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_get0_param.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_get_ex_new_index.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_get_ex_new_index.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_get_ex_new_index.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_get_ex_new_index.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_get_verify_mode.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_get_verify_mode.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_get_verify_mode.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_get_verify_mode.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_load_verify_locations.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_load_verify_locations.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_load_verify_locations.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_load_verify_locations.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_sess_number.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_sess_number.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_sess_number.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_sess_number.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_sess_set_cache_size.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_sess_set_cache_size.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_sess_set_cache_size.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_sess_set_cache_size.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_sess_set_get_cb.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_sess_set_get_cb.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_sess_set_get_cb.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_sess_set_get_cb.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_sessions.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_sessions.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_sessions.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_sessions.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set1_curves.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set1_curves.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set1_curves.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set1_curves.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set1_verify_cert_store.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set1_verify_cert_store.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set1_verify_cert_store.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set1_verify_cert_store.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_alpn_select_cb.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_alpn_select_cb.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_alpn_select_cb.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_alpn_select_cb.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_cert_cb.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_cert_cb.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_cert_cb.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_cert_cb.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_cert_store.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_cert_store.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_cert_store.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_cert_store.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_cert_verify_callback.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_cert_verify_callback.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_cert_verify_callback.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_cert_verify_callback.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_cipher_list.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_cipher_list.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_cipher_list.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_cipher_list.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_client_CA_list.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_client_CA_list.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_client_CA_list.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_client_CA_list.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_client_cert_cb.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_client_cert_cb.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_client_cert_cb.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_client_cert_cb.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_custom_cli_ext.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_custom_cli_ext.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_custom_cli_ext.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_custom_cli_ext.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_default_passwd_cb.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_default_passwd_cb.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_default_passwd_cb.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_default_passwd_cb.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_generate_session_id.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_generate_session_id.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_generate_session_id.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_generate_session_id.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_info_callback.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_info_callback.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_info_callback.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_info_callback.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_max_cert_list.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_max_cert_list.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_max_cert_list.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_max_cert_list.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_mode.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_mode.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_mode.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_mode.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_msg_callback.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_msg_callback.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_msg_callback.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_msg_callback.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_options.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_options.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_options.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_options.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_psk_client_callback.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_psk_client_callback.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_psk_client_callback.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_psk_client_callback.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_quiet_shutdown.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_quiet_shutdown.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_quiet_shutdown.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_quiet_shutdown.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_read_ahead.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_read_ahead.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_read_ahead.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_read_ahead.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_session_cache_mode.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_session_cache_mode.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_session_cache_mode.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_session_cache_mode.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_session_id_context.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_session_id_context.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_session_id_context.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_session_id_context.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_ssl_version.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_ssl_version.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_ssl_version.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_ssl_version.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_timeout.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_timeout.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_timeout.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_timeout.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_tlsext_servername_callback.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_tlsext_servername_callback.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_tlsext_servername_callback.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_tlsext_servername_callback.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_tlsext_status_cb.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_tlsext_status_cb.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_tlsext_status_cb.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_tlsext_status_cb.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_tlsext_ticket_key_cb.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_tmp_rsa_callback.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_tmp_rsa_callback.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_tmp_rsa_callback.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_tmp_rsa_callback.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_verify.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_verify.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_set_verify.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_set_verify.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_use_certificate.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_use_certificate.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_use_certificate.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_use_certificate.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_use_psk_identity_hint.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_use_psk_identity_hint.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_use_psk_identity_hint.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_use_psk_identity_hint.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_use_serverinfo.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_use_serverinfo.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_CTX_use_serverinfo.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_CTX_use_serverinfo.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_SESSION_free.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_SESSION_free.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_SESSION_free.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_SESSION_free.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_SESSION_get_ex_new_index.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_SESSION_get_ex_new_index.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_SESSION_get_ex_new_index.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_SESSION_get_ex_new_index.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_SESSION_get_time.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_SESSION_get_time.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_SESSION_get_time.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_SESSION_get_time.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_accept.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_accept.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_accept.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_accept.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_alert_type_string.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_alert_type_string.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_alert_type_string.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_alert_type_string.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_check_chain.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_check_chain.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_check_chain.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_check_chain.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_clear.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_clear.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_clear.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_clear.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_connect.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_connect.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_connect.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_connect.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_do_handshake.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_do_handshake.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_do_handshake.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_do_handshake.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_export_keying_material.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_export_keying_material.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_export_keying_material.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_export_keying_material.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_free.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_free.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_free.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_free.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_SSL_CTX.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_SSL_CTX.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_SSL_CTX.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_SSL_CTX.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_ciphers.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_ciphers.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_ciphers.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_ciphers.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_client_CA_list.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_client_CA_list.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_client_CA_list.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_client_CA_list.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_current_cipher.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_current_cipher.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_current_cipher.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_current_cipher.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_default_timeout.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_default_timeout.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_default_timeout.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_default_timeout.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_error.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_error.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_error.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_error.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_ex_data_X509_STORE_CTX_idx.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_ex_data_X509_STORE_CTX_idx.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_ex_data_X509_STORE_CTX_idx.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_ex_data_X509_STORE_CTX_idx.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_ex_new_index.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_ex_new_index.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_ex_new_index.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_ex_new_index.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_fd.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_fd.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_fd.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_fd.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_peer_cert_chain.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_peer_cert_chain.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_peer_cert_chain.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_peer_cert_chain.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_peer_certificate.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_peer_certificate.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_peer_certificate.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_peer_certificate.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_psk_identity.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_psk_identity.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_psk_identity.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_psk_identity.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_rbio.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_rbio.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_rbio.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_rbio.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_session.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_session.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_session.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_session.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_verify_result.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_verify_result.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_verify_result.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_verify_result.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_version.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_version.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_get_version.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_get_version.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_library_init.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_library_init.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_library_init.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_library_init.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_load_client_CA_file.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_load_client_CA_file.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_load_client_CA_file.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_load_client_CA_file.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_new.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_new.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_new.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_new.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_pending.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_pending.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_pending.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_pending.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_read.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_read.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_read.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_read.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_rstate_string.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_rstate_string.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_rstate_string.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_rstate_string.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_session_reused.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_session_reused.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_session_reused.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_session_reused.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_set_bio.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_set_bio.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_set_bio.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_set_bio.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_set_connect_state.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_set_connect_state.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_set_connect_state.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_set_connect_state.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_set_fd.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_set_fd.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_set_fd.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_set_fd.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_set_session.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_set_session.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_set_session.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_set_session.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_set_shutdown.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_set_shutdown.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_set_shutdown.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_set_shutdown.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_set_verify_result.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_set_verify_result.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_set_verify_result.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_set_verify_result.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_shutdown.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_shutdown.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_shutdown.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_shutdown.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_state_string.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_state_string.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_state_string.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_state_string.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_want.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_want.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_want.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_want.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_write.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_write.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/SSL_write.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/SSL_write.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/d2i_SSL_SESSION.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/d2i_SSL_SESSION.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/d2i_SSL_SESSION.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/d2i_SSL_SESSION.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssl/ssl.pod b/src/openssl/openssl-1.0.2v-chevah5/doc/ssl/ssl.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssl/ssl.pod rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssl/ssl.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/ssleay.txt b/src/openssl/openssl-1.0.2v-chevah5/doc/ssleay.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/ssleay.txt rename to src/openssl/openssl-1.0.2v-chevah5/doc/ssleay.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/doc/standards.txt b/src/openssl/openssl-1.0.2v-chevah5/doc/standards.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/doc/standards.txt rename to src/openssl/openssl-1.0.2v-chevah5/doc/standards.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/e_os.h b/src/openssl/openssl-1.0.2v-chevah5/e_os.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/e_os.h rename to src/openssl/openssl-1.0.2v-chevah5/e_os.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/e_os2.h b/src/openssl/openssl-1.0.2v-chevah5/e_os2.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/e_os2.h rename to src/openssl/openssl-1.0.2v-chevah5/e_os2.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/Makefile b/src/openssl/openssl-1.0.2v-chevah5/engines/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/engines/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/alpha.opt b/src/openssl/openssl-1.0.2v-chevah5/engines/alpha.opt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/alpha.opt rename to src/openssl/openssl-1.0.2v-chevah5/engines/alpha.opt diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/axp.opt b/src/openssl/openssl-1.0.2v-chevah5/engines/axp.opt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/axp.opt rename to src/openssl/openssl-1.0.2v-chevah5/engines/axp.opt diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/capierr.bat b/src/openssl/openssl-1.0.2v-chevah5/engines/capierr.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/capierr.bat rename to src/openssl/openssl-1.0.2v-chevah5/engines/capierr.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/Makefile b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/README.gost b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/README.gost similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/README.gost rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/README.gost diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/e_gost_err.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/e_gost_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/e_gost_err.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/e_gost_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/e_gost_err.h b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/e_gost_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/e_gost_err.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/e_gost_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/e_gost_err.proto b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/e_gost_err.proto similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/e_gost_err.proto rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/e_gost_err.proto diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost.ec b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost.ec rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost2001.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost2001.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost2001.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost2001.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost2001_keyx.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost2001_keyx.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost2001_keyx.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost2001_keyx.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost2001_keyx.h b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost2001_keyx.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost2001_keyx.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost2001_keyx.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost89.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost89.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost89.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost89.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost89.h b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost89.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost89.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost89.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost94_keyx.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost94_keyx.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost94_keyx.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost94_keyx.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_ameth.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_ameth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_ameth.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_ameth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_asn1.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_asn1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_asn1.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_asn1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_crypt.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_crypt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_crypt.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_crypt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_ctl.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_ctl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_ctl.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_ctl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_eng.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_eng.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_eng.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_eng.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_keywrap.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_keywrap.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_keywrap.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_keywrap.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_keywrap.h b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_keywrap.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_keywrap.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_keywrap.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_lcl.h b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_lcl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_lcl.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_lcl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_md.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_md.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_md.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_md.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_params.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_params.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_params.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_params.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_params.h b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_params.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_params.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_params.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_pmeth.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_pmeth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_pmeth.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_pmeth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_sign.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_sign.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gost_sign.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gost_sign.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gosthash.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gosthash.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gosthash.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gosthash.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gosthash.h b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gosthash.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gosthash.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gosthash.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gostsum.c b/src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gostsum.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ccgost/gostsum.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/ccgost/gostsum.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_4758cca.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_4758cca.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_4758cca.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_4758cca.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_4758cca.ec b/src/openssl/openssl-1.0.2v-chevah5/engines/e_4758cca.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_4758cca.ec rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_4758cca.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_4758cca_err.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_4758cca_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_4758cca_err.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_4758cca_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_4758cca_err.h b/src/openssl/openssl-1.0.2v-chevah5/engines/e_4758cca_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_4758cca_err.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_4758cca_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_aep.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_aep.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_aep.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_aep.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_aep.ec b/src/openssl/openssl-1.0.2v-chevah5/engines/e_aep.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_aep.ec rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_aep.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_aep_err.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_aep_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_aep_err.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_aep_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_aep_err.h b/src/openssl/openssl-1.0.2v-chevah5/engines/e_aep_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_aep_err.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_aep_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_atalla.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_atalla.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_atalla.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_atalla.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_atalla.ec b/src/openssl/openssl-1.0.2v-chevah5/engines/e_atalla.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_atalla.ec rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_atalla.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_atalla_err.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_atalla_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_atalla_err.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_atalla_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_atalla_err.h b/src/openssl/openssl-1.0.2v-chevah5/engines/e_atalla_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_atalla_err.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_atalla_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_capi.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_capi.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_capi.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_capi.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_capi.ec b/src/openssl/openssl-1.0.2v-chevah5/engines/e_capi.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_capi.ec rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_capi.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_capi_err.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_capi_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_capi_err.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_capi_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_capi_err.h b/src/openssl/openssl-1.0.2v-chevah5/engines/e_capi_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_capi_err.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_capi_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_chil.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_chil.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_chil.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_chil.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_chil.ec b/src/openssl/openssl-1.0.2v-chevah5/engines/e_chil.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_chil.ec rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_chil.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_chil_err.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_chil_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_chil_err.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_chil_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_chil_err.h b/src/openssl/openssl-1.0.2v-chevah5/engines/e_chil_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_chil_err.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_chil_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_cswift.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_cswift.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_cswift.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_cswift.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_cswift.ec b/src/openssl/openssl-1.0.2v-chevah5/engines/e_cswift.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_cswift.ec rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_cswift.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_cswift_err.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_cswift_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_cswift_err.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_cswift_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_cswift_err.h b/src/openssl/openssl-1.0.2v-chevah5/engines/e_cswift_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_cswift_err.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_cswift_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_gmp.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_gmp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_gmp.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_gmp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_gmp.ec b/src/openssl/openssl-1.0.2v-chevah5/engines/e_gmp.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_gmp.ec rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_gmp.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_gmp_err.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_gmp_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_gmp_err.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_gmp_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_gmp_err.h b/src/openssl/openssl-1.0.2v-chevah5/engines/e_gmp_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_gmp_err.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_gmp_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_nuron.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_nuron.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_nuron.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_nuron.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_nuron.ec b/src/openssl/openssl-1.0.2v-chevah5/engines/e_nuron.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_nuron.ec rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_nuron.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_nuron_err.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_nuron_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_nuron_err.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_nuron_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_nuron_err.h b/src/openssl/openssl-1.0.2v-chevah5/engines/e_nuron_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_nuron_err.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_nuron_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_padlock.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_padlock.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_padlock.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_padlock.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_padlock.ec b/src/openssl/openssl-1.0.2v-chevah5/engines/e_padlock.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_padlock.ec rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_padlock.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_sureware.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_sureware.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_sureware.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_sureware.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_sureware.ec b/src/openssl/openssl-1.0.2v-chevah5/engines/e_sureware.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_sureware.ec rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_sureware.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_sureware_err.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_sureware_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_sureware_err.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_sureware_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_sureware_err.h b/src/openssl/openssl-1.0.2v-chevah5/engines/e_sureware_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_sureware_err.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_sureware_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_ubsec.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_ubsec.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_ubsec.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_ubsec.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_ubsec.ec b/src/openssl/openssl-1.0.2v-chevah5/engines/e_ubsec.ec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_ubsec.ec rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_ubsec.ec diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_ubsec_err.c b/src/openssl/openssl-1.0.2v-chevah5/engines/e_ubsec_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_ubsec_err.c rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_ubsec_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/e_ubsec_err.h b/src/openssl/openssl-1.0.2v-chevah5/engines/e_ubsec_err.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/e_ubsec_err.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/e_ubsec_err.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/engine_vector.mar b/src/openssl/openssl-1.0.2v-chevah5/engines/engine_vector.mar similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/engine_vector.mar rename to src/openssl/openssl-1.0.2v-chevah5/engines/engine_vector.mar diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/ia64.opt b/src/openssl/openssl-1.0.2v-chevah5/engines/ia64.opt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/ia64.opt rename to src/openssl/openssl-1.0.2v-chevah5/engines/ia64.opt diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/makeengines.com b/src/openssl/openssl-1.0.2v-chevah5/engines/makeengines.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/makeengines.com rename to src/openssl/openssl-1.0.2v-chevah5/engines/makeengines.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/vax.opt b/src/openssl/openssl-1.0.2v-chevah5/engines/vax.opt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/vax.opt rename to src/openssl/openssl-1.0.2v-chevah5/engines/vax.opt diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/vendor_defns/aep.h b/src/openssl/openssl-1.0.2v-chevah5/engines/vendor_defns/aep.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/vendor_defns/aep.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/vendor_defns/aep.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/vendor_defns/atalla.h b/src/openssl/openssl-1.0.2v-chevah5/engines/vendor_defns/atalla.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/vendor_defns/atalla.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/vendor_defns/atalla.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/vendor_defns/cswift.h b/src/openssl/openssl-1.0.2v-chevah5/engines/vendor_defns/cswift.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/vendor_defns/cswift.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/vendor_defns/cswift.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/vendor_defns/hw_4758_cca.h b/src/openssl/openssl-1.0.2v-chevah5/engines/vendor_defns/hw_4758_cca.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/vendor_defns/hw_4758_cca.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/vendor_defns/hw_4758_cca.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/vendor_defns/hw_ubsec.h b/src/openssl/openssl-1.0.2v-chevah5/engines/vendor_defns/hw_ubsec.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/vendor_defns/hw_ubsec.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/vendor_defns/hw_ubsec.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/vendor_defns/hwcryptohook.h b/src/openssl/openssl-1.0.2v-chevah5/engines/vendor_defns/hwcryptohook.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/vendor_defns/hwcryptohook.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/vendor_defns/hwcryptohook.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/engines/vendor_defns/sureware.h b/src/openssl/openssl-1.0.2v-chevah5/engines/vendor_defns/sureware.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/engines/vendor_defns/sureware.h rename to src/openssl/openssl-1.0.2v-chevah5/engines/vendor_defns/sureware.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/install.com b/src/openssl/openssl-1.0.2v-chevah5/install.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/install.com rename to src/openssl/openssl-1.0.2v-chevah5/install.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/makevms.com b/src/openssl/openssl-1.0.2v-chevah5/makevms.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/makevms.com rename to src/openssl/openssl-1.0.2v-chevah5/makevms.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/.rnd b/src/openssl/openssl-1.0.2v-chevah5/ms/.rnd similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/.rnd rename to src/openssl/openssl-1.0.2v-chevah5/ms/.rnd diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/32all.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/32all.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/32all.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/32all.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/README b/src/openssl/openssl-1.0.2v-chevah5/ms/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/README rename to src/openssl/openssl-1.0.2v-chevah5/ms/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/applink.c b/src/openssl/openssl-1.0.2v-chevah5/ms/applink.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/applink.c rename to src/openssl/openssl-1.0.2v-chevah5/ms/applink.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/bcb4.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/bcb4.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/bcb4.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/bcb4.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/certCA.srl b/src/openssl/openssl-1.0.2v-chevah5/ms/certCA.srl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/certCA.srl rename to src/openssl/openssl-1.0.2v-chevah5/ms/certCA.srl diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/certCA.ss b/src/openssl/openssl-1.0.2v-chevah5/ms/certCA.ss similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/certCA.ss rename to src/openssl/openssl-1.0.2v-chevah5/ms/certCA.ss diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/certU.ss b/src/openssl/openssl-1.0.2v-chevah5/ms/certU.ss similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/certU.ss rename to src/openssl/openssl-1.0.2v-chevah5/ms/certU.ss diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/cmp.pl b/src/openssl/openssl-1.0.2v-chevah5/ms/cmp.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/cmp.pl rename to src/openssl/openssl-1.0.2v-chevah5/ms/cmp.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/do_ms.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/do_ms.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/do_ms.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/do_ms.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/do_nasm.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/do_nasm.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/do_nasm.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/do_nasm.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/do_nt.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/do_nt.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/do_nt.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/do_nt.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/do_win64a.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/do_win64a.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/do_win64a.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/do_win64a.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/do_win64i.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/do_win64i.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/do_win64i.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/do_win64i.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/keyCA.ss b/src/openssl/openssl-1.0.2v-chevah5/ms/keyCA.ss similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/keyCA.ss rename to src/openssl/openssl-1.0.2v-chevah5/ms/keyCA.ss diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/keyU.ss b/src/openssl/openssl-1.0.2v-chevah5/ms/keyU.ss similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/keyU.ss rename to src/openssl/openssl-1.0.2v-chevah5/ms/keyU.ss diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/mingw32.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/mingw32.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/mingw32.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/mingw32.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/mw.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/mw.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/mw.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/mw.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/req2CA.ss b/src/openssl/openssl-1.0.2v-chevah5/ms/req2CA.ss similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/req2CA.ss rename to src/openssl/openssl-1.0.2v-chevah5/ms/req2CA.ss diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/reqCA.ss b/src/openssl/openssl-1.0.2v-chevah5/ms/reqCA.ss similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/reqCA.ss rename to src/openssl/openssl-1.0.2v-chevah5/ms/reqCA.ss diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/reqU.ss b/src/openssl/openssl-1.0.2v-chevah5/ms/reqU.ss similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/reqU.ss rename to src/openssl/openssl-1.0.2v-chevah5/ms/reqU.ss diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/speed32.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/speed32.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/speed32.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/speed32.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/tenc.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/tenc.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/tenc.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/tenc.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/tencce.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/tencce.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/tencce.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/tencce.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/test.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/test.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/test.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/test.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/testce.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/testce.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/testce.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/testce.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/testce2.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/testce2.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/testce2.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/testce2.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/testenc.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/testenc.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/testenc.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/testenc.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/testencce.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/testencce.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/testencce.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/testencce.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/testpem.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/testpem.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/testpem.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/testpem.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/testpemce.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/testpemce.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/testpemce.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/testpemce.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/testss.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/testss.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/testss.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/testss.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/testssce.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/testssce.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/testssce.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/testssce.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/tlhelp32.h b/src/openssl/openssl-1.0.2v-chevah5/ms/tlhelp32.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/tlhelp32.h rename to src/openssl/openssl-1.0.2v-chevah5/ms/tlhelp32.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/tpem.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/tpem.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/tpem.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/tpem.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/tpemce.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/tpemce.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/tpemce.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/tpemce.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/uplink-common.pl b/src/openssl/openssl-1.0.2v-chevah5/ms/uplink-common.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/uplink-common.pl rename to src/openssl/openssl-1.0.2v-chevah5/ms/uplink-common.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/uplink-ia64.pl b/src/openssl/openssl-1.0.2v-chevah5/ms/uplink-ia64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/uplink-ia64.pl rename to src/openssl/openssl-1.0.2v-chevah5/ms/uplink-ia64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/uplink-x86.pl b/src/openssl/openssl-1.0.2v-chevah5/ms/uplink-x86.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/uplink-x86.pl rename to src/openssl/openssl-1.0.2v-chevah5/ms/uplink-x86.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/uplink-x86_64.pl b/src/openssl/openssl-1.0.2v-chevah5/ms/uplink-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/uplink-x86_64.pl rename to src/openssl/openssl-1.0.2v-chevah5/ms/uplink-x86_64.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/uplink.c b/src/openssl/openssl-1.0.2v-chevah5/ms/uplink.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/uplink.c rename to src/openssl/openssl-1.0.2v-chevah5/ms/uplink.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/uplink.h b/src/openssl/openssl-1.0.2v-chevah5/ms/uplink.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/uplink.h rename to src/openssl/openssl-1.0.2v-chevah5/ms/uplink.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/uplink.pl b/src/openssl/openssl-1.0.2v-chevah5/ms/uplink.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/uplink.pl rename to src/openssl/openssl-1.0.2v-chevah5/ms/uplink.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/ms/x86asm.bat b/src/openssl/openssl-1.0.2v-chevah5/ms/x86asm.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ms/x86asm.bat rename to src/openssl/openssl-1.0.2v-chevah5/ms/x86asm.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/openssl.doxy b/src/openssl/openssl-1.0.2v-chevah5/openssl.doxy similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/openssl.doxy rename to src/openssl/openssl-1.0.2v-chevah5/openssl.doxy diff --git a/src/openssl/openssl-1.0.2v-chevah4/openssl.spec b/src/openssl/openssl-1.0.2v-chevah5/openssl.spec similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/openssl.spec rename to src/openssl/openssl-1.0.2v-chevah5/openssl.spec diff --git a/src/openssl/openssl-1.0.2v-chevah4/os2/OS2-EMX.cmd b/src/openssl/openssl-1.0.2v-chevah5/os2/OS2-EMX.cmd similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/os2/OS2-EMX.cmd rename to src/openssl/openssl-1.0.2v-chevah5/os2/OS2-EMX.cmd diff --git a/src/openssl/openssl-1.0.2v-chevah4/os2/backwardify.pl b/src/openssl/openssl-1.0.2v-chevah5/os2/backwardify.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/os2/backwardify.pl rename to src/openssl/openssl-1.0.2v-chevah5/os2/backwardify.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/Makefile.hpux10-cc b/src/openssl/openssl-1.0.2v-chevah5/shlib/Makefile.hpux10-cc similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/Makefile.hpux10-cc rename to src/openssl/openssl-1.0.2v-chevah5/shlib/Makefile.hpux10-cc diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/README b/src/openssl/openssl-1.0.2v-chevah5/shlib/README similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/README rename to src/openssl/openssl-1.0.2v-chevah5/shlib/README diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/hpux10-cc.sh b/src/openssl/openssl-1.0.2v-chevah5/shlib/hpux10-cc.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/hpux10-cc.sh rename to src/openssl/openssl-1.0.2v-chevah5/shlib/hpux10-cc.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/irix.sh b/src/openssl/openssl-1.0.2v-chevah5/shlib/irix.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/irix.sh rename to src/openssl/openssl-1.0.2v-chevah5/shlib/irix.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/sco5-shared-gcc.sh b/src/openssl/openssl-1.0.2v-chevah5/shlib/sco5-shared-gcc.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/sco5-shared-gcc.sh rename to src/openssl/openssl-1.0.2v-chevah5/shlib/sco5-shared-gcc.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/sco5-shared-installed b/src/openssl/openssl-1.0.2v-chevah5/shlib/sco5-shared-installed similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/sco5-shared-installed rename to src/openssl/openssl-1.0.2v-chevah5/shlib/sco5-shared-installed diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/sco5-shared.sh b/src/openssl/openssl-1.0.2v-chevah5/shlib/sco5-shared.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/sco5-shared.sh rename to src/openssl/openssl-1.0.2v-chevah5/shlib/sco5-shared.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/solaris-sc4.sh b/src/openssl/openssl-1.0.2v-chevah5/shlib/solaris-sc4.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/solaris-sc4.sh rename to src/openssl/openssl-1.0.2v-chevah5/shlib/solaris-sc4.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/solaris.sh b/src/openssl/openssl-1.0.2v-chevah5/shlib/solaris.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/solaris.sh rename to src/openssl/openssl-1.0.2v-chevah5/shlib/solaris.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/sun.sh b/src/openssl/openssl-1.0.2v-chevah5/shlib/sun.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/sun.sh rename to src/openssl/openssl-1.0.2v-chevah5/shlib/sun.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/svr5-shared-gcc.sh b/src/openssl/openssl-1.0.2v-chevah5/shlib/svr5-shared-gcc.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/svr5-shared-gcc.sh rename to src/openssl/openssl-1.0.2v-chevah5/shlib/svr5-shared-gcc.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/svr5-shared-installed b/src/openssl/openssl-1.0.2v-chevah5/shlib/svr5-shared-installed similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/svr5-shared-installed rename to src/openssl/openssl-1.0.2v-chevah5/shlib/svr5-shared-installed diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/svr5-shared.sh b/src/openssl/openssl-1.0.2v-chevah5/shlib/svr5-shared.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/svr5-shared.sh rename to src/openssl/openssl-1.0.2v-chevah5/shlib/svr5-shared.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/win32.bat b/src/openssl/openssl-1.0.2v-chevah5/shlib/win32.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/win32.bat rename to src/openssl/openssl-1.0.2v-chevah5/shlib/win32.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/shlib/win32dll.bat b/src/openssl/openssl-1.0.2v-chevah5/shlib/win32dll.bat similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/shlib/win32dll.bat rename to src/openssl/openssl-1.0.2v-chevah5/shlib/win32dll.bat diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/Makefile b/src/openssl/openssl-1.0.2v-chevah5/ssl/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/ssl/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/bad_dtls_test.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/bad_dtls_test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/bad_dtls_test.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/bad_dtls_test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/bio_ssl.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/bio_ssl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/bio_ssl.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/bio_ssl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/clienthellotest.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/clienthellotest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/clienthellotest.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/clienthellotest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/d1_both.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/d1_both.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/d1_both.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/d1_both.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/d1_clnt.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/d1_clnt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/d1_clnt.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/d1_clnt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/d1_lib.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/d1_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/d1_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/d1_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/d1_meth.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/d1_meth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/d1_meth.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/d1_meth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/d1_pkt.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/d1_pkt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/d1_pkt.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/d1_pkt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/d1_srtp.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/d1_srtp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/d1_srtp.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/d1_srtp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/d1_srvr.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/d1_srvr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/d1_srvr.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/d1_srvr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/dtls1.h b/src/openssl/openssl-1.0.2v-chevah5/ssl/dtls1.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/dtls1.h rename to src/openssl/openssl-1.0.2v-chevah5/ssl/dtls1.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/dtlstest.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/dtlstest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/dtlstest.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/dtlstest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/fatalerrtest.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/fatalerrtest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/fatalerrtest.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/fatalerrtest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/heartbeat_test.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/heartbeat_test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/heartbeat_test.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/heartbeat_test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/install-ssl.com b/src/openssl/openssl-1.0.2v-chevah5/ssl/install-ssl.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/install-ssl.com rename to src/openssl/openssl-1.0.2v-chevah5/ssl/install-ssl.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/kssl.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/kssl.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/kssl.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/kssl.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/kssl.h b/src/openssl/openssl-1.0.2v-chevah5/ssl/kssl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/kssl.h rename to src/openssl/openssl-1.0.2v-chevah5/ssl/kssl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/kssl_lcl.h b/src/openssl/openssl-1.0.2v-chevah5/ssl/kssl_lcl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/kssl_lcl.h rename to src/openssl/openssl-1.0.2v-chevah5/ssl/kssl_lcl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s23_clnt.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s23_clnt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s23_clnt.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s23_clnt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s23_lib.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s23_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s23_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s23_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s23_meth.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s23_meth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s23_meth.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s23_meth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s23_pkt.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s23_pkt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s23_pkt.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s23_pkt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s23_srvr.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s23_srvr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s23_srvr.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s23_srvr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s2_clnt.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s2_clnt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s2_clnt.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s2_clnt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s2_enc.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s2_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s2_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s2_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s2_lib.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s2_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s2_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s2_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s2_meth.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s2_meth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s2_meth.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s2_meth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s2_pkt.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s2_pkt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s2_pkt.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s2_pkt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s2_srvr.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s2_srvr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s2_srvr.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s2_srvr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s3_both.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s3_both.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s3_both.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s3_both.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s3_cbc.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s3_cbc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s3_cbc.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s3_cbc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s3_clnt.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s3_clnt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s3_clnt.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s3_clnt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s3_enc.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s3_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s3_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s3_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s3_lib.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s3_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s3_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s3_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s3_meth.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s3_meth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s3_meth.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s3_meth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s3_pkt.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s3_pkt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s3_pkt.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s3_pkt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/s3_srvr.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/s3_srvr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/s3_srvr.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/s3_srvr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/srtp.h b/src/openssl/openssl-1.0.2v-chevah5/ssl/srtp.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/srtp.h rename to src/openssl/openssl-1.0.2v-chevah5/ssl/srtp.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl-lib.com b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl-lib.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl-lib.com rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl-lib.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl.h b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl.h rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl2.h b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl2.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl2.h rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl2.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl23.h b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl23.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl23.h rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl23.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl3.h b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl3.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl3.h rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl3.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_algs.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_algs.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_algs.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_algs.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_asn1.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_asn1.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_asn1.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_asn1.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_cert.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_cert.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_cert.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_cert.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_ciph.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_ciph.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_ciph.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_ciph.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_conf.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_conf.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_conf.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_conf.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_err.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_err.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_err.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_err.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_err2.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_err2.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_err2.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_err2.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_lib.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_locl.h b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_locl.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_locl.h rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_locl.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_rsa.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_rsa.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_rsa.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_rsa.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_sess.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_sess.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_sess.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_sess.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_stat.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_stat.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_stat.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_stat.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_task.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_task.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_task.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_task.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_txt.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_txt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_txt.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_txt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_utst.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_utst.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssl_utst.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssl_utst.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/ssltest.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/ssltest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/ssltest.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/ssltest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/sslv2conftest.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/sslv2conftest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/sslv2conftest.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/sslv2conftest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/t1_clnt.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/t1_clnt.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/t1_clnt.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/t1_clnt.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/t1_enc.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/t1_enc.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/t1_enc.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/t1_enc.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/t1_ext.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/t1_ext.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/t1_ext.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/t1_ext.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/t1_lib.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/t1_lib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/t1_lib.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/t1_lib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/t1_meth.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/t1_meth.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/t1_meth.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/t1_meth.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/t1_reneg.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/t1_reneg.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/t1_reneg.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/t1_reneg.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/t1_srvr.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/t1_srvr.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/t1_srvr.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/t1_srvr.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/t1_trce.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/t1_trce.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/t1_trce.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/t1_trce.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/tls1.h b/src/openssl/openssl-1.0.2v-chevah5/ssl/tls1.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/tls1.h rename to src/openssl/openssl-1.0.2v-chevah5/ssl/tls1.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/ssl/tls_srp.c b/src/openssl/openssl-1.0.2v-chevah5/ssl/tls_srp.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/ssl/tls_srp.c rename to src/openssl/openssl-1.0.2v-chevah5/ssl/tls_srp.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/CAss.cnf b/src/openssl/openssl-1.0.2v-chevah5/test/CAss.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/CAss.cnf rename to src/openssl/openssl-1.0.2v-chevah5/test/CAss.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/CAssdh.cnf b/src/openssl/openssl-1.0.2v-chevah5/test/CAssdh.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/CAssdh.cnf rename to src/openssl/openssl-1.0.2v-chevah5/test/CAssdh.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/CAssdsa.cnf b/src/openssl/openssl-1.0.2v-chevah5/test/CAssdsa.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/CAssdsa.cnf rename to src/openssl/openssl-1.0.2v-chevah5/test/CAssdsa.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/CAssrsa.cnf b/src/openssl/openssl-1.0.2v-chevah5/test/CAssrsa.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/CAssrsa.cnf rename to src/openssl/openssl-1.0.2v-chevah5/test/CAssrsa.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/CAtsa.cnf b/src/openssl/openssl-1.0.2v-chevah5/test/CAtsa.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/CAtsa.cnf rename to src/openssl/openssl-1.0.2v-chevah5/test/CAtsa.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/Makefile b/src/openssl/openssl-1.0.2v-chevah5/test/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/test/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/P1ss.cnf b/src/openssl/openssl-1.0.2v-chevah5/test/P1ss.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/P1ss.cnf rename to src/openssl/openssl-1.0.2v-chevah5/test/P1ss.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/P2ss.cnf b/src/openssl/openssl-1.0.2v-chevah5/test/P2ss.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/P2ss.cnf rename to src/openssl/openssl-1.0.2v-chevah5/test/P2ss.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/Sssdsa.cnf b/src/openssl/openssl-1.0.2v-chevah5/test/Sssdsa.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/Sssdsa.cnf rename to src/openssl/openssl-1.0.2v-chevah5/test/Sssdsa.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/Sssrsa.cnf b/src/openssl/openssl-1.0.2v-chevah5/test/Sssrsa.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/Sssrsa.cnf rename to src/openssl/openssl-1.0.2v-chevah5/test/Sssrsa.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/Uss.cnf b/src/openssl/openssl-1.0.2v-chevah5/test/Uss.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/Uss.cnf rename to src/openssl/openssl-1.0.2v-chevah5/test/Uss.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/VMSca-response.1 b/src/openssl/openssl-1.0.2v-chevah5/test/VMSca-response.1 similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/VMSca-response.1 rename to src/openssl/openssl-1.0.2v-chevah5/test/VMSca-response.1 diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/VMSca-response.2 b/src/openssl/openssl-1.0.2v-chevah5/test/VMSca-response.2 similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/VMSca-response.2 rename to src/openssl/openssl-1.0.2v-chevah5/test/VMSca-response.2 diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/asn1test.c b/src/openssl/openssl-1.0.2v-chevah5/test/asn1test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/asn1test.c rename to src/openssl/openssl-1.0.2v-chevah5/test/asn1test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/bctest b/src/openssl/openssl-1.0.2v-chevah5/test/bctest similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/bctest rename to src/openssl/openssl-1.0.2v-chevah5/test/bctest diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/bctest.com b/src/openssl/openssl-1.0.2v-chevah5/test/bctest.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/bctest.com rename to src/openssl/openssl-1.0.2v-chevah5/test/bctest.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/bntest.com b/src/openssl/openssl-1.0.2v-chevah5/test/bntest.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/bntest.com rename to src/openssl/openssl-1.0.2v-chevah5/test/bntest.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/certs/bad.key b/src/openssl/openssl-1.0.2v-chevah5/test/certs/bad.key similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/certs/bad.key rename to src/openssl/openssl-1.0.2v-chevah5/test/certs/bad.key diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/certs/bad.pem b/src/openssl/openssl-1.0.2v-chevah5/test/certs/bad.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/certs/bad.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/certs/bad.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/certs/interCA.key b/src/openssl/openssl-1.0.2v-chevah5/test/certs/interCA.key similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/certs/interCA.key rename to src/openssl/openssl-1.0.2v-chevah5/test/certs/interCA.key diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/certs/interCA.pem b/src/openssl/openssl-1.0.2v-chevah5/test/certs/interCA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/certs/interCA.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/certs/interCA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/certs/leaf.key b/src/openssl/openssl-1.0.2v-chevah5/test/certs/leaf.key similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/certs/leaf.key rename to src/openssl/openssl-1.0.2v-chevah5/test/certs/leaf.key diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/certs/leaf.pem b/src/openssl/openssl-1.0.2v-chevah5/test/certs/leaf.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/certs/leaf.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/certs/leaf.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/certs/pss1.pem b/src/openssl/openssl-1.0.2v-chevah5/test/certs/pss1.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/certs/pss1.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/certs/pss1.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/certs/rootCA.key b/src/openssl/openssl-1.0.2v-chevah5/test/certs/rootCA.key similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/certs/rootCA.key rename to src/openssl/openssl-1.0.2v-chevah5/test/certs/rootCA.key diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/certs/rootCA.pem b/src/openssl/openssl-1.0.2v-chevah5/test/certs/rootCA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/certs/rootCA.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/certs/rootCA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/certs/roots.pem b/src/openssl/openssl-1.0.2v-chevah5/test/certs/roots.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/certs/roots.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/certs/roots.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/certs/subinterCA-ss.pem b/src/openssl/openssl-1.0.2v-chevah5/test/certs/subinterCA-ss.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/certs/subinterCA-ss.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/certs/subinterCA-ss.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/certs/subinterCA.key b/src/openssl/openssl-1.0.2v-chevah5/test/certs/subinterCA.key similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/certs/subinterCA.key rename to src/openssl/openssl-1.0.2v-chevah5/test/certs/subinterCA.key diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/certs/subinterCA.pem b/src/openssl/openssl-1.0.2v-chevah5/test/certs/subinterCA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/certs/subinterCA.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/certs/subinterCA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/certs/untrusted.pem b/src/openssl/openssl-1.0.2v-chevah5/test/certs/untrusted.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/certs/untrusted.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/certs/untrusted.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/clean_test.com b/src/openssl/openssl-1.0.2v-chevah5/test/clean_test.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/clean_test.com rename to src/openssl/openssl-1.0.2v-chevah5/test/clean_test.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/cms-examples.pl b/src/openssl/openssl-1.0.2v-chevah5/test/cms-examples.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/cms-examples.pl rename to src/openssl/openssl-1.0.2v-chevah5/test/cms-examples.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/cms-test.pl b/src/openssl/openssl-1.0.2v-chevah5/test/cms-test.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/cms-test.pl rename to src/openssl/openssl-1.0.2v-chevah5/test/cms-test.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/dummytest.c b/src/openssl/openssl-1.0.2v-chevah5/test/dummytest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/dummytest.c rename to src/openssl/openssl-1.0.2v-chevah5/test/dummytest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/igetest.c b/src/openssl/openssl-1.0.2v-chevah5/test/igetest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/igetest.c rename to src/openssl/openssl-1.0.2v-chevah5/test/igetest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/maketests.com b/src/openssl/openssl-1.0.2v-chevah5/test/maketests.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/maketests.com rename to src/openssl/openssl-1.0.2v-chevah5/test/maketests.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/methtest.c b/src/openssl/openssl-1.0.2v-chevah5/test/methtest.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/methtest.c rename to src/openssl/openssl-1.0.2v-chevah5/test/methtest.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D1.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D1.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D1.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D1.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D1_Cert_EE.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D1_Cert_EE.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D1_Cert_EE.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D1_Cert_EE.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D1_Issuer_ICA.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D1_Issuer_ICA.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D2.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D2.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D2.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D2.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D2_Cert_ICA.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D2_Cert_ICA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D2_Cert_ICA.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D2_Cert_ICA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D2_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D2_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D3.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D3.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D3.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D3.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D3_Cert_EE.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D3_Cert_EE.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D3_Cert_EE.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D3_Cert_EE.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D3_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/D3_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/D3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISDOSC_D1.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISDOSC_D1.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISDOSC_D1.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISDOSC_D1.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISDOSC_D2.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISDOSC_D2.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISDOSC_D2.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISDOSC_D2.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISDOSC_D3.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISDOSC_D3.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISDOSC_D3.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISDOSC_D3.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISIC_D1_Issuer_ICA.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISIC_D1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISIC_D1_Issuer_ICA.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISIC_D1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISIC_D2_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISIC_D2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISIC_D2_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISIC_D2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISIC_D3_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISIC_D3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISIC_D3_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISIC_D3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISIC_ND1_Issuer_ICA.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISIC_ND1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISIC_ND1_Issuer_ICA.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISIC_ND1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISIC_ND2_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISIC_ND2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISIC_ND2_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISIC_ND2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISIC_ND3_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISIC_ND3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISIC_ND3_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISIC_ND3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISOP_D1.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISOP_D1.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISOP_D1.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISOP_D1.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISOP_D2.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISOP_D2.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISOP_D2.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISOP_D2.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISOP_D3.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISOP_D3.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISOP_D3.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISOP_D3.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISOP_ND1.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISOP_ND1.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISOP_ND1.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISOP_ND1.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISOP_ND2.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISOP_ND2.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISOP_ND2.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISOP_ND2.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISOP_ND3.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISOP_ND3.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ISOP_ND3.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ISOP_ND3.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND1.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND1.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND1.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND1.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND1_Cert_EE.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND1_Cert_EE.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND1_Cert_EE.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND1_Cert_EE.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND1_Issuer_ICA.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND1_Issuer_ICA.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND2.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND2.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND2.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND2.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND2_Cert_ICA.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND2_Cert_ICA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND2_Cert_ICA.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND2_Cert_ICA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND2_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND2_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND3.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND3.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND3.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND3.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND3_Cert_EE.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND3_Cert_EE.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND3_Cert_EE.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND3_Cert_EE.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND3_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/ND3_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/ND3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WIKH_D1.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WIKH_D1.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WIKH_D1.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WIKH_D1.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WIKH_D2.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WIKH_D2.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WIKH_D2.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WIKH_D2.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WIKH_D3.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WIKH_D3.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WIKH_D3.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WIKH_D3.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WIKH_ND1.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WIKH_ND1.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WIKH_ND1.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WIKH_ND1.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WIKH_ND2.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WIKH_ND2.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WIKH_ND2.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WIKH_ND2.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WIKH_ND3.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WIKH_ND3.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WIKH_ND3.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WIKH_ND3.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WINH_D1.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WINH_D1.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WINH_D1.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WINH_D1.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WINH_D2.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WINH_D2.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WINH_D2.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WINH_D2.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WINH_D3.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WINH_D3.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WINH_D3.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WINH_D3.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WINH_ND1.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WINH_ND1.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WINH_ND1.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WINH_ND1.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WINH_ND2.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WINH_ND2.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WINH_ND2.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WINH_ND2.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WINH_ND3.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WINH_ND3.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WINH_ND3.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WINH_ND3.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKDOSC_D1.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKDOSC_D1.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKDOSC_D1.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKDOSC_D1.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKDOSC_D2.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKDOSC_D2.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKDOSC_D2.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKDOSC_D2.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKDOSC_D3.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKDOSC_D3.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKDOSC_D3.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKDOSC_D3.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKIC_D1_Issuer_ICA.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKIC_D1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKIC_D1_Issuer_ICA.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKIC_D1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKIC_D2_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKIC_D2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKIC_D2_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKIC_D2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKIC_D3_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKIC_D3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKIC_D3_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKIC_D3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKIC_ND1_Issuer_ICA.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKIC_ND1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKIC_ND1_Issuer_ICA.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKIC_ND1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKIC_ND2_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKIC_ND2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKIC_ND2_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKIC_ND2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKIC_ND3_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKIC_ND3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WKIC_ND3_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WKIC_ND3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WRID_D1.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WRID_D1.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WRID_D1.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WRID_D1.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WRID_D2.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WRID_D2.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WRID_D2.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WRID_D2.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WRID_D3.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WRID_D3.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WRID_D3.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WRID_D3.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WRID_ND1.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WRID_ND1.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WRID_ND1.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WRID_ND1.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WRID_ND2.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WRID_ND2.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WRID_ND2.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WRID_ND2.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WRID_ND3.ors b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WRID_ND3.ors similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WRID_ND3.ors rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WRID_ND3.ors diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WSNIC_D1_Issuer_ICA.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WSNIC_D1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WSNIC_D1_Issuer_ICA.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WSNIC_D1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WSNIC_D2_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WSNIC_D2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WSNIC_D2_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WSNIC_D2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WSNIC_D3_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WSNIC_D3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WSNIC_D3_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WSNIC_D3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WSNIC_ND1_Issuer_ICA.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WSNIC_ND1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WSNIC_ND1_Issuer_ICA.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WSNIC_ND1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WSNIC_ND2_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WSNIC_ND2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WSNIC_ND2_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WSNIC_ND2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WSNIC_ND3_Issuer_Root.pem b/src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WSNIC_ND3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ocsp-tests/WSNIC_ND3_Issuer_Root.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/ocsp-tests/WSNIC_ND3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/pkcs7-1.pem b/src/openssl/openssl-1.0.2v-chevah5/test/pkcs7-1.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/pkcs7-1.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/pkcs7-1.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/pkcs7.pem b/src/openssl/openssl-1.0.2v-chevah5/test/pkcs7.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/pkcs7.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/pkcs7.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/pkits-test.pl b/src/openssl/openssl-1.0.2v-chevah5/test/pkits-test.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/pkits-test.pl rename to src/openssl/openssl-1.0.2v-chevah5/test/pkits-test.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/r160test.c b/src/openssl/openssl-1.0.2v-chevah5/test/r160test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/r160test.c rename to src/openssl/openssl-1.0.2v-chevah5/test/r160test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/recipes/60-test_x509_time.t b/src/openssl/openssl-1.0.2v-chevah5/test/recipes/60-test_x509_time.t similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/recipes/60-test_x509_time.t rename to src/openssl/openssl-1.0.2v-chevah5/test/recipes/60-test_x509_time.t diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/serverinfo.pem b/src/openssl/openssl-1.0.2v-chevah5/test/serverinfo.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/serverinfo.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/serverinfo.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/smcont.txt b/src/openssl/openssl-1.0.2v-chevah5/test/smcont.txt similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/smcont.txt rename to src/openssl/openssl-1.0.2v-chevah5/test/smcont.txt diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/ca.cnf b/src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/ca.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/ca.cnf rename to src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/ca.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/mksmime-certs.sh b/src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/mksmime-certs.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/mksmime-certs.sh rename to src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/mksmime-certs.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smdh.pem b/src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smdh.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smdh.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smdh.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smdsa1.pem b/src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smdsa1.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smdsa1.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smdsa1.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smdsa2.pem b/src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smdsa2.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smdsa2.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smdsa2.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smdsa3.pem b/src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smdsa3.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smdsa3.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smdsa3.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smdsap.pem b/src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smdsap.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smdsap.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smdsap.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smec1.pem b/src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smec1.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smec1.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smec1.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smec2.pem b/src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smec2.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smec2.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smec2.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smroot.pem b/src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smroot.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smroot.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smroot.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smrsa1.pem b/src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smrsa1.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smrsa1.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smrsa1.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smrsa2.pem b/src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smrsa2.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smrsa2.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smrsa2.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smrsa3.pem b/src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smrsa3.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/smime-certs/smrsa3.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/smime-certs/smrsa3.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ssltestlib.c b/src/openssl/openssl-1.0.2v-chevah5/test/ssltestlib.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ssltestlib.c rename to src/openssl/openssl-1.0.2v-chevah5/test/ssltestlib.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/ssltestlib.h b/src/openssl/openssl-1.0.2v-chevah5/test/ssltestlib.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/ssltestlib.h rename to src/openssl/openssl-1.0.2v-chevah5/test/ssltestlib.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/tcrl b/src/openssl/openssl-1.0.2v-chevah5/test/tcrl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/tcrl rename to src/openssl/openssl-1.0.2v-chevah5/test/tcrl diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/tcrl.com b/src/openssl/openssl-1.0.2v-chevah5/test/tcrl.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/tcrl.com rename to src/openssl/openssl-1.0.2v-chevah5/test/tcrl.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/test.cnf b/src/openssl/openssl-1.0.2v-chevah5/test/test.cnf similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/test.cnf rename to src/openssl/openssl-1.0.2v-chevah5/test/test.cnf diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/test_padlock b/src/openssl/openssl-1.0.2v-chevah5/test/test_padlock similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/test_padlock rename to src/openssl/openssl-1.0.2v-chevah5/test/test_padlock diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testca b/src/openssl/openssl-1.0.2v-chevah5/test/testca similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testca rename to src/openssl/openssl-1.0.2v-chevah5/test/testca diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testca.com b/src/openssl/openssl-1.0.2v-chevah5/test/testca.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testca.com rename to src/openssl/openssl-1.0.2v-chevah5/test/testca.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testcrl.pem b/src/openssl/openssl-1.0.2v-chevah5/test/testcrl.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testcrl.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/testcrl.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testenc b/src/openssl/openssl-1.0.2v-chevah5/test/testenc similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testenc rename to src/openssl/openssl-1.0.2v-chevah5/test/testenc diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testenc.com b/src/openssl/openssl-1.0.2v-chevah5/test/testenc.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testenc.com rename to src/openssl/openssl-1.0.2v-chevah5/test/testenc.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testfipsssl b/src/openssl/openssl-1.0.2v-chevah5/test/testfipsssl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testfipsssl rename to src/openssl/openssl-1.0.2v-chevah5/test/testfipsssl diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testgen b/src/openssl/openssl-1.0.2v-chevah5/test/testgen similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testgen rename to src/openssl/openssl-1.0.2v-chevah5/test/testgen diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testgen.com b/src/openssl/openssl-1.0.2v-chevah5/test/testgen.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testgen.com rename to src/openssl/openssl-1.0.2v-chevah5/test/testgen.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testp7.pem b/src/openssl/openssl-1.0.2v-chevah5/test/testp7.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testp7.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/testp7.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testreq2.pem b/src/openssl/openssl-1.0.2v-chevah5/test/testreq2.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testreq2.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/testreq2.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testrsa.pem b/src/openssl/openssl-1.0.2v-chevah5/test/testrsa.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testrsa.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/testrsa.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/tests.com b/src/openssl/openssl-1.0.2v-chevah5/test/tests.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/tests.com rename to src/openssl/openssl-1.0.2v-chevah5/test/tests.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testsid.pem b/src/openssl/openssl-1.0.2v-chevah5/test/testsid.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testsid.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/testsid.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testss b/src/openssl/openssl-1.0.2v-chevah5/test/testss similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testss rename to src/openssl/openssl-1.0.2v-chevah5/test/testss diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testss.com b/src/openssl/openssl-1.0.2v-chevah5/test/testss.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testss.com rename to src/openssl/openssl-1.0.2v-chevah5/test/testss.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testssl b/src/openssl/openssl-1.0.2v-chevah5/test/testssl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testssl rename to src/openssl/openssl-1.0.2v-chevah5/test/testssl diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testssl.com b/src/openssl/openssl-1.0.2v-chevah5/test/testssl.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testssl.com rename to src/openssl/openssl-1.0.2v-chevah5/test/testssl.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testsslproxy b/src/openssl/openssl-1.0.2v-chevah5/test/testsslproxy similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testsslproxy rename to src/openssl/openssl-1.0.2v-chevah5/test/testsslproxy diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testtsa b/src/openssl/openssl-1.0.2v-chevah5/test/testtsa similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testtsa rename to src/openssl/openssl-1.0.2v-chevah5/test/testtsa diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testtsa.com b/src/openssl/openssl-1.0.2v-chevah5/test/testtsa.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testtsa.com rename to src/openssl/openssl-1.0.2v-chevah5/test/testtsa.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testutil.h b/src/openssl/openssl-1.0.2v-chevah5/test/testutil.h similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testutil.h rename to src/openssl/openssl-1.0.2v-chevah5/test/testutil.h diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/testx509.pem b/src/openssl/openssl-1.0.2v-chevah5/test/testx509.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/testx509.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/testx509.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/times b/src/openssl/openssl-1.0.2v-chevah5/test/times similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/times rename to src/openssl/openssl-1.0.2v-chevah5/test/times diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/tocsp b/src/openssl/openssl-1.0.2v-chevah5/test/tocsp similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/tocsp rename to src/openssl/openssl-1.0.2v-chevah5/test/tocsp diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/tocsp.com b/src/openssl/openssl-1.0.2v-chevah5/test/tocsp.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/tocsp.com rename to src/openssl/openssl-1.0.2v-chevah5/test/tocsp.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/tpkcs7 b/src/openssl/openssl-1.0.2v-chevah5/test/tpkcs7 similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/tpkcs7 rename to src/openssl/openssl-1.0.2v-chevah5/test/tpkcs7 diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/tpkcs7.com b/src/openssl/openssl-1.0.2v-chevah5/test/tpkcs7.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/tpkcs7.com rename to src/openssl/openssl-1.0.2v-chevah5/test/tpkcs7.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/tpkcs7d b/src/openssl/openssl-1.0.2v-chevah5/test/tpkcs7d similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/tpkcs7d rename to src/openssl/openssl-1.0.2v-chevah5/test/tpkcs7d diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/tpkcs7d.com b/src/openssl/openssl-1.0.2v-chevah5/test/tpkcs7d.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/tpkcs7d.com rename to src/openssl/openssl-1.0.2v-chevah5/test/tpkcs7d.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/treq b/src/openssl/openssl-1.0.2v-chevah5/test/treq similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/treq rename to src/openssl/openssl-1.0.2v-chevah5/test/treq diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/treq.com b/src/openssl/openssl-1.0.2v-chevah5/test/treq.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/treq.com rename to src/openssl/openssl-1.0.2v-chevah5/test/treq.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/trsa b/src/openssl/openssl-1.0.2v-chevah5/test/trsa similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/trsa rename to src/openssl/openssl-1.0.2v-chevah5/test/trsa diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/trsa.com b/src/openssl/openssl-1.0.2v-chevah5/test/trsa.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/trsa.com rename to src/openssl/openssl-1.0.2v-chevah5/test/trsa.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/tsid b/src/openssl/openssl-1.0.2v-chevah5/test/tsid similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/tsid rename to src/openssl/openssl-1.0.2v-chevah5/test/tsid diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/tsid.com b/src/openssl/openssl-1.0.2v-chevah5/test/tsid.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/tsid.com rename to src/openssl/openssl-1.0.2v-chevah5/test/tsid.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/tverify.com b/src/openssl/openssl-1.0.2v-chevah5/test/tverify.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/tverify.com rename to src/openssl/openssl-1.0.2v-chevah5/test/tverify.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/tx509 b/src/openssl/openssl-1.0.2v-chevah5/test/tx509 similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/tx509 rename to src/openssl/openssl-1.0.2v-chevah5/test/tx509 diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/tx509.com b/src/openssl/openssl-1.0.2v-chevah5/test/tx509.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/tx509.com rename to src/openssl/openssl-1.0.2v-chevah5/test/tx509.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/v3-cert1.pem b/src/openssl/openssl-1.0.2v-chevah5/test/v3-cert1.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/v3-cert1.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/v3-cert1.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/v3-cert2.pem b/src/openssl/openssl-1.0.2v-chevah5/test/v3-cert2.pem similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/v3-cert2.pem rename to src/openssl/openssl-1.0.2v-chevah5/test/v3-cert2.pem diff --git a/src/openssl/openssl-1.0.2v-chevah4/test/x509_time_test.c b/src/openssl/openssl-1.0.2v-chevah5/test/x509_time_test.c similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/test/x509_time_test.c rename to src/openssl/openssl-1.0.2v-chevah5/test/x509_time_test.c diff --git a/src/openssl/openssl-1.0.2v-chevah4/tools/Makefile b/src/openssl/openssl-1.0.2v-chevah5/tools/Makefile similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/tools/Makefile rename to src/openssl/openssl-1.0.2v-chevah5/tools/Makefile diff --git a/src/openssl/openssl-1.0.2v-chevah4/tools/c89.sh b/src/openssl/openssl-1.0.2v-chevah5/tools/c89.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/tools/c89.sh rename to src/openssl/openssl-1.0.2v-chevah5/tools/c89.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/tools/c_hash b/src/openssl/openssl-1.0.2v-chevah5/tools/c_hash similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/tools/c_hash rename to src/openssl/openssl-1.0.2v-chevah5/tools/c_hash diff --git a/src/openssl/openssl-1.0.2v-chevah4/tools/c_info b/src/openssl/openssl-1.0.2v-chevah5/tools/c_info similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/tools/c_info rename to src/openssl/openssl-1.0.2v-chevah5/tools/c_info diff --git a/src/openssl/openssl-1.0.2v-chevah4/tools/c_issuer b/src/openssl/openssl-1.0.2v-chevah5/tools/c_issuer similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/tools/c_issuer rename to src/openssl/openssl-1.0.2v-chevah5/tools/c_issuer diff --git a/src/openssl/openssl-1.0.2v-chevah4/tools/c_name b/src/openssl/openssl-1.0.2v-chevah5/tools/c_name similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/tools/c_name rename to src/openssl/openssl-1.0.2v-chevah5/tools/c_name diff --git a/src/openssl/openssl-1.0.2v-chevah4/tools/c_rehash.in b/src/openssl/openssl-1.0.2v-chevah5/tools/c_rehash.in similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/tools/c_rehash.in rename to src/openssl/openssl-1.0.2v-chevah5/tools/c_rehash.in diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/FreeBSD.sh b/src/openssl/openssl-1.0.2v-chevah5/util/FreeBSD.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/FreeBSD.sh rename to src/openssl/openssl-1.0.2v-chevah5/util/FreeBSD.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/add_cr.pl b/src/openssl/openssl-1.0.2v-chevah5/util/add_cr.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/add_cr.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/add_cr.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/bat.sh b/src/openssl/openssl-1.0.2v-chevah5/util/bat.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/bat.sh rename to src/openssl/openssl-1.0.2v-chevah5/util/bat.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/ck_errf.pl b/src/openssl/openssl-1.0.2v-chevah5/util/ck_errf.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/ck_errf.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/ck_errf.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/clean-depend.pl b/src/openssl/openssl-1.0.2v-chevah5/util/clean-depend.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/clean-depend.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/clean-depend.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/copy-if-different.pl b/src/openssl/openssl-1.0.2v-chevah5/util/copy-if-different.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/copy-if-different.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/copy-if-different.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/copy.pl b/src/openssl/openssl-1.0.2v-chevah5/util/copy.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/copy.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/copy.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/cygwin.sh b/src/openssl/openssl-1.0.2v-chevah5/util/cygwin.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/cygwin.sh rename to src/openssl/openssl-1.0.2v-chevah5/util/cygwin.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/deleof.pl b/src/openssl/openssl-1.0.2v-chevah5/util/deleof.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/deleof.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/deleof.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/deltree.com b/src/openssl/openssl-1.0.2v-chevah5/util/deltree.com similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/deltree.com rename to src/openssl/openssl-1.0.2v-chevah5/util/deltree.com diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/dirname.pl b/src/openssl/openssl-1.0.2v-chevah5/util/dirname.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/dirname.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/dirname.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/do_ms.sh b/src/openssl/openssl-1.0.2v-chevah5/util/do_ms.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/do_ms.sh rename to src/openssl/openssl-1.0.2v-chevah5/util/do_ms.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/domd b/src/openssl/openssl-1.0.2v-chevah5/util/domd similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/domd rename to src/openssl/openssl-1.0.2v-chevah5/util/domd diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/err-ins.pl b/src/openssl/openssl-1.0.2v-chevah5/util/err-ins.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/err-ins.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/err-ins.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/extract-names.pl b/src/openssl/openssl-1.0.2v-chevah5/util/extract-names.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/extract-names.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/extract-names.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/extract-section.pl b/src/openssl/openssl-1.0.2v-chevah5/util/extract-section.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/extract-section.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/extract-section.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/files.pl b/src/openssl/openssl-1.0.2v-chevah5/util/files.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/files.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/files.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/fixNT.sh b/src/openssl/openssl-1.0.2v-chevah5/util/fixNT.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/fixNT.sh rename to src/openssl/openssl-1.0.2v-chevah5/util/fixNT.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/indent.pro b/src/openssl/openssl-1.0.2v-chevah5/util/indent.pro similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/indent.pro rename to src/openssl/openssl-1.0.2v-chevah5/util/indent.pro diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/install.sh b/src/openssl/openssl-1.0.2v-chevah5/util/install.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/install.sh rename to src/openssl/openssl-1.0.2v-chevah5/util/install.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/libeay.num b/src/openssl/openssl-1.0.2v-chevah5/util/libeay.num similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/libeay.num rename to src/openssl/openssl-1.0.2v-chevah5/util/libeay.num diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/mk1mf.pl b/src/openssl/openssl-1.0.2v-chevah5/util/mk1mf.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/mk1mf.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/mk1mf.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/mkbuildinf.pl b/src/openssl/openssl-1.0.2v-chevah5/util/mkbuildinf.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/mkbuildinf.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/mkbuildinf.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/mkcerts.sh b/src/openssl/openssl-1.0.2v-chevah5/util/mkcerts.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/mkcerts.sh rename to src/openssl/openssl-1.0.2v-chevah5/util/mkcerts.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/mkdef.pl b/src/openssl/openssl-1.0.2v-chevah5/util/mkdef.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/mkdef.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/mkdef.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/mkdir-p.pl b/src/openssl/openssl-1.0.2v-chevah5/util/mkdir-p.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/mkdir-p.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/mkdir-p.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/mkerr.pl b/src/openssl/openssl-1.0.2v-chevah5/util/mkerr.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/mkerr.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/mkerr.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/mkfiles.pl b/src/openssl/openssl-1.0.2v-chevah5/util/mkfiles.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/mkfiles.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/mkfiles.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/mklink.pl b/src/openssl/openssl-1.0.2v-chevah5/util/mklink.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/mklink.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/mklink.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/mkrc.pl b/src/openssl/openssl-1.0.2v-chevah5/util/mkrc.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/mkrc.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/mkrc.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/mkstack.pl b/src/openssl/openssl-1.0.2v-chevah5/util/mkstack.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/mkstack.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/mkstack.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/openssl-format-source b/src/openssl/openssl-1.0.2v-chevah5/util/openssl-format-source similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/openssl-format-source rename to src/openssl/openssl-1.0.2v-chevah5/util/openssl-format-source diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/opensslwrap.sh b/src/openssl/openssl-1.0.2v-chevah5/util/opensslwrap.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/opensslwrap.sh rename to src/openssl/openssl-1.0.2v-chevah5/util/opensslwrap.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/perlpath.pl b/src/openssl/openssl-1.0.2v-chevah5/util/perlpath.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/perlpath.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/perlpath.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/pl/BC-32.pl b/src/openssl/openssl-1.0.2v-chevah5/util/pl/BC-32.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/pl/BC-32.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/pl/BC-32.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/pl/Mingw32.pl b/src/openssl/openssl-1.0.2v-chevah5/util/pl/Mingw32.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/pl/Mingw32.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/pl/Mingw32.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/pl/OS2-EMX.pl b/src/openssl/openssl-1.0.2v-chevah5/util/pl/OS2-EMX.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/pl/OS2-EMX.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/pl/OS2-EMX.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/pl/VC-32.pl b/src/openssl/openssl-1.0.2v-chevah5/util/pl/VC-32.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/pl/VC-32.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/pl/VC-32.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/pl/linux.pl b/src/openssl/openssl-1.0.2v-chevah5/util/pl/linux.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/pl/linux.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/pl/linux.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/pl/netware.pl b/src/openssl/openssl-1.0.2v-chevah5/util/pl/netware.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/pl/netware.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/pl/netware.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/pl/ultrix.pl b/src/openssl/openssl-1.0.2v-chevah5/util/pl/ultrix.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/pl/ultrix.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/pl/ultrix.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/pl/unix.pl b/src/openssl/openssl-1.0.2v-chevah5/util/pl/unix.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/pl/unix.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/pl/unix.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/pod2man.pl b/src/openssl/openssl-1.0.2v-chevah5/util/pod2man.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/pod2man.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/pod2man.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/pod2mantest b/src/openssl/openssl-1.0.2v-chevah5/util/pod2mantest similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/pod2mantest rename to src/openssl/openssl-1.0.2v-chevah5/util/pod2mantest diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/pod2mantest.pod b/src/openssl/openssl-1.0.2v-chevah5/util/pod2mantest.pod similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/pod2mantest.pod rename to src/openssl/openssl-1.0.2v-chevah5/util/pod2mantest.pod diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/point.sh b/src/openssl/openssl-1.0.2v-chevah5/util/point.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/point.sh rename to src/openssl/openssl-1.0.2v-chevah5/util/point.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/selftest.pl b/src/openssl/openssl-1.0.2v-chevah5/util/selftest.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/selftest.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/selftest.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/shlib_wrap.sh b/src/openssl/openssl-1.0.2v-chevah5/util/shlib_wrap.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/shlib_wrap.sh rename to src/openssl/openssl-1.0.2v-chevah5/util/shlib_wrap.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/sp-diff.pl b/src/openssl/openssl-1.0.2v-chevah5/util/sp-diff.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/sp-diff.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/sp-diff.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/speed.sh b/src/openssl/openssl-1.0.2v-chevah5/util/speed.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/speed.sh rename to src/openssl/openssl-1.0.2v-chevah5/util/speed.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/src-dep.pl b/src/openssl/openssl-1.0.2v-chevah5/util/src-dep.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/src-dep.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/src-dep.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/ssleay.num b/src/openssl/openssl-1.0.2v-chevah5/util/ssleay.num similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/ssleay.num rename to src/openssl/openssl-1.0.2v-chevah5/util/ssleay.num diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/su-filter.pl b/src/openssl/openssl-1.0.2v-chevah5/util/su-filter.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/su-filter.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/su-filter.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/tab_num.pl b/src/openssl/openssl-1.0.2v-chevah5/util/tab_num.pl similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/tab_num.pl rename to src/openssl/openssl-1.0.2v-chevah5/util/tab_num.pl diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/toutf8.sh b/src/openssl/openssl-1.0.2v-chevah5/util/toutf8.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/toutf8.sh rename to src/openssl/openssl-1.0.2v-chevah5/util/toutf8.sh diff --git a/src/openssl/openssl-1.0.2v-chevah4/util/x86asm.sh b/src/openssl/openssl-1.0.2v-chevah5/util/x86asm.sh similarity index 100% rename from src/openssl/openssl-1.0.2v-chevah4/util/x86asm.sh rename to src/openssl/openssl-1.0.2v-chevah5/util/x86asm.sh diff --git a/src/openssl/openssl-1.1.1t/appveyor.yml b/src/openssl/openssl-1.1.1t/appveyor.yml deleted file mode 100644 index 6210391f2..000000000 --- a/src/openssl/openssl-1.1.1t/appveyor.yml +++ /dev/null @@ -1,78 +0,0 @@ -image: - - Visual Studio 2017 - -platform: - - x64 - - x86 - -environment: - fast_finish: true - matrix: - - VSVER: 15 - -configuration: - - shared - - plain - - minimal - -before_build: - - ps: >- - Install-Module VSSetup -Scope CurrentUser - - ps: >- - Get-VSSetupInstance -All - - ps: >- - gci env:* | sort-object name - - ps: >- - If ($env:Platform -Match "x86") { - $env:VCVARS_PLATFORM="x86" - $env:TARGET="VC-WIN32 no-asm --strict-warnings" - } Else { - $env:VCVARS_PLATFORM="amd64" - $env:TARGET="VC-WIN64A-masm" - } - - ps: >- - If ($env:Configuration -Match "shared") { - $env:SHARED="no-makedepend" - } ElseIf ($env:Configuration -Match "minimal") { - $env:SHARED="no-shared no-dso no-makedepend no-aria no-async no-autoload-config no-blake2 no-bf no-camellia no-cast no-chacha no-cmac no-cms no-comp no-ct no-des no-dgram no-dh no-dsa no-dtls no-ec2m no-engine no-filenames no-gost no-idea no-mdc2 no-md4 no-multiblock no-nextprotoneg no-ocsp no-ocb no-poly1305 no-psk no-rc2 no-rc4 no-rmd160 no-seed no-siphash no-sm2 no-sm3 no-sm4 no-srp no-srtp no-ssl3 no-ssl3-method no-ts no-ui-console no-whirlpool no-asm -DOPENSSL_SMALL_FOOTPRINT" - } Else { - $env:SHARED="no-shared no-makedepend" - } - - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %VCVARS_PLATFORM% - - mkdir _build - - cd _build - - perl ..\Configure %TARGET% %SHARED% - - perl configdata.pm --dump - - cd .. - - ps: >- - if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER` - -or (&git log -1 $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT | - Select-String "\[extended tests\]") ) { - $env:EXTENDED_TESTS="yes" - } - -build_script: - - cd _build - - ps: >- - If ($env:Configuration -Match "shared" -or $env:EXTENDED_TESTS) { - cmd /c "nmake build_all_generated 2>&1" - cmd /c "nmake PERL=no-perl 2>&1" - } - - cd .. - -test_script: - - cd _build - - ps: >- - If ($env:Configuration -Match "shared" -or $env:EXTENDED_TESTS) { - if ($env:EXTENDED_TESTS) { - cmd /c "nmake test V=1 2>&1" - } Else { - cmd /c "nmake test V=1 TESTS=-test_fuzz 2>&1" - } - } - - ps: >- - if ($env:EXTENDED_TESTS) { - mkdir ..\_install - cmd /c "nmake install DESTDIR=..\_install 2>&1" - } - - cd .. diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/rsa_sup_mul.c b/src/openssl/openssl-1.1.1t/crypto/bn/rsa_sup_mul.c deleted file mode 100644 index acafefd5f..000000000 --- a/src/openssl/openssl-1.1.1t/crypto/bn/rsa_sup_mul.c +++ /dev/null @@ -1,614 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include "internal/numbers.h" -#include "internal/constant_time.h" -#include "bn_local.h" - -# if BN_BYTES == 8 -typedef uint64_t limb_t; -# if defined(__SIZEOF_INT128__) && __SIZEOF_INT128__ == 16 -/* nonstandard; implemented by gcc on 64-bit platforms */ -typedef __uint128_t limb2_t; -# define HAVE_LIMB2_T -# endif -# define LIMB_BIT_SIZE 64 -# define LIMB_BYTE_SIZE 8 -# elif BN_BYTES == 4 -typedef uint32_t limb_t; -typedef uint64_t limb2_t; -# define LIMB_BIT_SIZE 32 -# define LIMB_BYTE_SIZE 4 -# define HAVE_LIMB2_T -# else -# error "Not supported" -# endif - -/* - * For multiplication we're using schoolbook multiplication, - * so if we have two numbers, each with 6 "digits" (words) - * the multiplication is calculated as follows: - * A B C D E F - * x I J K L M N - * -------------- - * N*F - * N*E - * N*D - * N*C - * N*B - * N*A - * M*F - * M*E - * M*D - * M*C - * M*B - * M*A - * L*F - * L*E - * L*D - * L*C - * L*B - * L*A - * K*F - * K*E - * K*D - * K*C - * K*B - * K*A - * J*F - * J*E - * J*D - * J*C - * J*B - * J*A - * I*F - * I*E - * I*D - * I*C - * I*B - * + I*A - * ========================== - * N*B N*D N*F - * + N*A N*C N*E - * + M*B M*D M*F - * + M*A M*C M*E - * + L*B L*D L*F - * + L*A L*C L*E - * + K*B K*D K*F - * + K*A K*C K*E - * + J*B J*D J*F - * + J*A J*C J*E - * + I*B I*D I*F - * + I*A I*C I*E - * - * 1+1 1+3 1+5 - * 1+0 1+2 1+4 - * 0+1 0+3 0+5 - * 0+0 0+2 0+4 - * - * 0 1 2 3 4 5 6 - * which requires n^2 multiplications and 2n full length additions - * as we can keep every other result of limb multiplication in two separate - * limbs - */ - -#if defined HAVE_LIMB2_T -static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b) -{ - limb2_t t; - /* - * this is idiomatic code to tell compiler to use the native mul - * those three lines will actually compile to single instruction - */ - - t = (limb2_t)a * b; - *hi = t >> LIMB_BIT_SIZE; - *lo = (limb_t)t; -} -#elif (BN_BYTES == 8) && (defined _MSC_VER) -/* https://learn.microsoft.com/en-us/cpp/intrinsics/umul128?view=msvc-170 */ -#pragma intrinsic(_umul128) -static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b) -{ - *lo = _umul128(a, b, hi); -} -#else -/* - * if the compiler doesn't have either a 128bit data type nor a "return - * high 64 bits of multiplication" - */ -static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b) -{ - limb_t a_low = (limb_t)(uint32_t)a; - limb_t a_hi = a >> 32; - limb_t b_low = (limb_t)(uint32_t)b; - limb_t b_hi = b >> 32; - - limb_t p0 = a_low * b_low; - limb_t p1 = a_low * b_hi; - limb_t p2 = a_hi * b_low; - limb_t p3 = a_hi * b_hi; - - uint32_t cy = (uint32_t)(((p0 >> 32) + (uint32_t)p1 + (uint32_t)p2) >> 32); - - *lo = p0 + (p1 << 32) + (p2 << 32); - *hi = p3 + (p1 >> 32) + (p2 >> 32) + cy; -} -#endif - -/* add two limbs with carry in, return carry out */ -static ossl_inline limb_t _add_limb(limb_t *ret, limb_t a, limb_t b, limb_t carry) -{ - limb_t carry1, carry2, t; - /* - * `c = a + b; if (c < a)` is idiomatic code that makes compilers - * use add with carry on assembly level - */ - - *ret = a + carry; - if (*ret < a) - carry1 = 1; - else - carry1 = 0; - - t = *ret; - *ret = t + b; - if (*ret < t) - carry2 = 1; - else - carry2 = 0; - - return carry1 + carry2; -} - -/* - * add two numbers of the same size, return overflow - * - * add a to b, place result in ret; all arrays need to be n limbs long - * return overflow from addition (0 or 1) - */ -static ossl_inline limb_t add(limb_t *ret, limb_t *a, limb_t *b, size_t n) -{ - limb_t c = 0; - ossl_ssize_t i; - - for(i = n - 1; i > -1; i--) - c = _add_limb(&ret[i], a[i], b[i], c); - - return c; -} - -/* - * return number of limbs necessary for temporary values - * when multiplying numbers n limbs large - */ -static ossl_inline size_t mul_limb_numb(size_t n) -{ - return 2 * n * 2; -} - -/* - * multiply two numbers of the same size - * - * multiply a by b, place result in ret; a and b need to be n limbs long - * ret needs to be 2*n limbs long, tmp needs to be mul_limb_numb(n) limbs - * long - */ -static void limb_mul(limb_t *ret, limb_t *a, limb_t *b, size_t n, limb_t *tmp) -{ - limb_t *r_odd, *r_even; - size_t i, j, k; - - r_odd = tmp; - r_even = &tmp[2 * n]; - - memset(ret, 0, 2 * n * sizeof(limb_t)); - - for (i = 0; i < n; i++) { - for (k = 0; k < i + n + 1; k++) { - r_even[k] = 0; - r_odd[k] = 0; - } - for (j = 0; j < n; j++) { - /* - * place results from even and odd limbs in separate arrays so that - * we don't have to calculate overflow every time we get individual - * limb multiplication result - */ - if (j % 2 == 0) - _mul_limb(&r_even[i + j], &r_even[i + j + 1], a[i], b[j]); - else - _mul_limb(&r_odd[i + j], &r_odd[i + j + 1], a[i], b[j]); - } - /* - * skip the least significant limbs when adding multiples of - * more significant limbs (they're zero anyway) - */ - add(ret, ret, r_even, n + i + 1); - add(ret, ret, r_odd, n + i + 1); - } -} - -/* modifies the value in place by performing a right shift by one bit */ -static ossl_inline void rshift1(limb_t *val, size_t n) -{ - limb_t shift_in = 0, shift_out = 0; - size_t i; - - for (i = 0; i < n; i++) { - shift_out = val[i] & 1; - val[i] = shift_in << (LIMB_BIT_SIZE - 1) | (val[i] >> 1); - shift_in = shift_out; - } -} - -/* extend the LSB of flag to all bits of limb */ -static ossl_inline limb_t mk_mask(limb_t flag) -{ - flag |= flag << 1; - flag |= flag << 2; - flag |= flag << 4; - flag |= flag << 8; - flag |= flag << 16; -#if (LIMB_BYTE_SIZE == 8) - flag |= flag << 32; -#endif - return flag; -} - -/* - * copy from either a or b to ret based on flag - * when flag == 0, then copies from b - * when flag == 1, then copies from a - */ -static ossl_inline void cselect(limb_t flag, limb_t *ret, limb_t *a, limb_t *b, size_t n) -{ - /* - * would be more efficient with non volatile mask, but then gcc - * generates code with jumps - */ - volatile limb_t mask; - size_t i; - - mask = mk_mask(flag); - for (i = 0; i < n; i++) { -#if (LIMB_BYTE_SIZE == 8) - ret[i] = constant_time_select_64(mask, a[i], b[i]); -#else - ret[i] = constant_time_select_32(mask, a[i], b[i]); -#endif - } -} - -static limb_t _sub_limb(limb_t *ret, limb_t a, limb_t b, limb_t borrow) -{ - limb_t borrow1, borrow2, t; - /* - * while it doesn't look constant-time, this is idiomatic code - * to tell compilers to use the carry bit from subtraction - */ - - *ret = a - borrow; - if (*ret > a) - borrow1 = 1; - else - borrow1 = 0; - - t = *ret; - *ret = t - b; - if (*ret > t) - borrow2 = 1; - else - borrow2 = 0; - - return borrow1 + borrow2; -} - -/* - * place the result of a - b into ret, return the borrow bit. - * All arrays need to be n limbs long - */ -static limb_t sub(limb_t *ret, limb_t *a, limb_t *b, size_t n) -{ - limb_t borrow = 0; - ossl_ssize_t i; - - for (i = n - 1; i > -1; i--) - borrow = _sub_limb(&ret[i], a[i], b[i], borrow); - - return borrow; -} - -/* return the number of limbs necessary to allocate for the mod() tmp operand */ -static ossl_inline size_t mod_limb_numb(size_t anum, size_t modnum) -{ - return (anum + modnum) * 3; -} - -/* - * calculate a % mod, place the result in ret - * size of a is defined by anum, size of ret and mod is modnum, - * size of tmp is returned by mod_limb_numb() - */ -static void mod(limb_t *ret, limb_t *a, size_t anum, limb_t *mod, - size_t modnum, limb_t *tmp) -{ - limb_t *atmp, *modtmp, *rettmp; - limb_t res; - size_t i; - - memset(tmp, 0, mod_limb_numb(anum, modnum) * LIMB_BYTE_SIZE); - - atmp = tmp; - modtmp = &tmp[anum + modnum]; - rettmp = &tmp[(anum + modnum) * 2]; - - for (i = modnum; i 0; i--, rp--) { - v = _mul_add_limb(rp, mod, modnum, rp[modnum - 1] * ni0, tmp2); - v = v + carry + rp[-1]; - carry |= (v != rp[-1]); - carry &= (v <= rp[-1]); - rp[-1] = v; - } - - /* perform the final reduction by mod... */ - carry -= sub(ret, rp, mod, modnum); - - /* ...conditionally */ - cselect(carry, ret, rp, ret, modnum); -} - -/* allocated buffer should be freed afterwards */ -static void BN_to_limb(const BIGNUM *bn, limb_t *buf, size_t limbs) -{ - int i; - int real_limbs = (BN_num_bytes(bn) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; - limb_t *ptr = buf + (limbs - real_limbs); - - for (i = 0; i < real_limbs; i++) - ptr[i] = bn->d[real_limbs - i - 1]; -} - -#if LIMB_BYTE_SIZE == 8 -static ossl_inline uint64_t be64(uint64_t host) -{ - const union { - long one; - char little; - } is_endian = { 1 }; - - if (is_endian.little) { - uint64_t big = 0; - - big |= (host & 0xff00000000000000) >> 56; - big |= (host & 0x00ff000000000000) >> 40; - big |= (host & 0x0000ff0000000000) >> 24; - big |= (host & 0x000000ff00000000) >> 8; - big |= (host & 0x00000000ff000000) << 8; - big |= (host & 0x0000000000ff0000) << 24; - big |= (host & 0x000000000000ff00) << 40; - big |= (host & 0x00000000000000ff) << 56; - return big; - } else { - return host; - } -} - -#else -/* Not all platforms have htobe32(). */ -static ossl_inline uint32_t be32(uint32_t host) -{ - const union { - long one; - char little; - } is_endian = { 1 }; - - if (is_endian.little) { - uint32_t big = 0; - - big |= (host & 0xff000000) >> 24; - big |= (host & 0x00ff0000) >> 8; - big |= (host & 0x0000ff00) << 8; - big |= (host & 0x000000ff) << 24; - return big; - } else { - return host; - } -} -#endif - -/* - * We assume that intermediate, possible_arg2, blinding, and ctx are used - * similar to BN_BLINDING_invert_ex() arguments. - * to_mod is RSA modulus. - * buf and num is the serialization buffer and its length. - * - * Here we use classic/Montgomery multiplication and modulo. After the calculation finished - * we serialize the new structure instead of BIGNUMs taking endianness into account. - */ -int ossl_bn_rsa_do_unblind(const BIGNUM *intermediate, - const BN_BLINDING *blinding, - const BIGNUM *possible_arg2, - const BIGNUM *to_mod, BN_CTX *ctx, - unsigned char *buf, int num) -{ - limb_t *l_im = NULL, *l_mul = NULL, *l_mod = NULL; - limb_t *l_ret = NULL, *l_tmp = NULL, l_buf; - size_t l_im_count = 0, l_mul_count = 0, l_size = 0, l_mod_count = 0; - size_t l_tmp_count = 0; - int ret = 0; - size_t i; - unsigned char *tmp; - const BIGNUM *arg1 = intermediate; - const BIGNUM *arg2 = (possible_arg2 == NULL) ? blinding->Ai : possible_arg2; - - l_im_count = (BN_num_bytes(arg1) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; - l_mul_count = (BN_num_bytes(arg2) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; - l_mod_count = (BN_num_bytes(to_mod) + LIMB_BYTE_SIZE - 1) / LIMB_BYTE_SIZE; - - l_size = l_im_count > l_mul_count ? l_im_count : l_mul_count; - l_im = OPENSSL_zalloc(l_size * LIMB_BYTE_SIZE); - l_mul = OPENSSL_zalloc(l_size * LIMB_BYTE_SIZE); - l_mod = OPENSSL_zalloc(l_mod_count * LIMB_BYTE_SIZE); - - if ((l_im == NULL) || (l_mul == NULL) || (l_mod == NULL)) - goto err; - - BN_to_limb(arg1, l_im, l_size); - BN_to_limb(arg2, l_mul, l_size); - BN_to_limb(to_mod, l_mod, l_mod_count); - - l_ret = OPENSSL_malloc(2 * l_size * LIMB_BYTE_SIZE); - - if (blinding->m_ctx != NULL) { - l_tmp_count = mul_limb_numb(l_size) > mod_montgomery_limb_numb(l_mod_count) ? - mul_limb_numb(l_size) : mod_montgomery_limb_numb(l_mod_count); - l_tmp = OPENSSL_malloc(l_tmp_count * LIMB_BYTE_SIZE); - } else { - l_tmp_count = mul_limb_numb(l_size) > mod_limb_numb(2 * l_size, l_mod_count) ? - mul_limb_numb(l_size) : mod_limb_numb(2 * l_size, l_mod_count); - l_tmp = OPENSSL_malloc(l_tmp_count * LIMB_BYTE_SIZE); - } - - if ((l_ret == NULL) || (l_tmp == NULL)) - goto err; - - if (blinding->m_ctx != NULL) { - limb_mul(l_ret, l_im, l_mul, l_size, l_tmp); - mod_montgomery(l_ret, l_ret, 2 * l_size, l_mod, l_mod_count, - blinding->m_ctx->n0[0], l_tmp); - } else { - limb_mul(l_ret, l_im, l_mul, l_size, l_tmp); - mod(l_ret, l_ret, 2 * l_size, l_mod, l_mod_count, l_tmp); - } - - /* modulus size in bytes can be equal to num but after limbs conversion it becomes bigger */ - if (num < BN_num_bytes(to_mod)) { - BNerr(BN_F_OSSL_BN_RSA_DO_UNBLIND, ERR_R_PASSED_INVALID_ARGUMENT); - goto err; - } - - memset(buf, 0, num); - tmp = buf + num - BN_num_bytes(to_mod); - for (i = 0; i < l_mod_count; i++) { -#if LIMB_BYTE_SIZE == 8 - l_buf = be64(l_ret[i]); -#else - l_buf = be32(l_ret[i]); -#endif - if (i == 0) { - int delta = LIMB_BYTE_SIZE - ((l_mod_count * LIMB_BYTE_SIZE) - num); - - memcpy(tmp, ((char *)&l_buf) + LIMB_BYTE_SIZE - delta, delta); - tmp += delta; - } else { - memcpy(tmp, &l_buf, LIMB_BYTE_SIZE); - tmp += LIMB_BYTE_SIZE; - } - } - ret = num; - - err: - OPENSSL_free(l_im); - OPENSSL_free(l_mul); - OPENSSL_free(l_mod); - OPENSSL_free(l_tmp); - OPENSSL_free(l_ret); - - return ret; -} diff --git a/src/openssl/openssl-1.1.1t/ACKNOWLEDGEMENTS b/src/openssl/openssl-1.1.1w/ACKNOWLEDGEMENTS similarity index 100% rename from src/openssl/openssl-1.1.1t/ACKNOWLEDGEMENTS rename to src/openssl/openssl-1.1.1w/ACKNOWLEDGEMENTS diff --git a/src/openssl/openssl-1.1.1t/AUTHORS b/src/openssl/openssl-1.1.1w/AUTHORS similarity index 100% rename from src/openssl/openssl-1.1.1t/AUTHORS rename to src/openssl/openssl-1.1.1w/AUTHORS diff --git a/src/openssl/openssl-1.1.1t/CHANGES b/src/openssl/openssl-1.1.1w/CHANGES similarity index 99% rename from src/openssl/openssl-1.1.1t/CHANGES rename to src/openssl/openssl-1.1.1w/CHANGES index 1e2d651b7..c4409489e 100644 --- a/src/openssl/openssl-1.1.1t/CHANGES +++ b/src/openssl/openssl-1.1.1w/CHANGES @@ -7,6 +7,123 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1v and 1.1.1w [11 Sep 2023] + + *) Fix POLY1305 MAC implementation corrupting XMM registers on Windows. + + The POLY1305 MAC (message authentication code) implementation in OpenSSL + does not save the contents of non-volatile XMM registers on Windows 64 + platform when calculating the MAC of data larger than 64 bytes. Before + returning to the caller all the XMM registers are set to zero rather than + restoring their previous content. The vulnerable code is used only on newer + x86_64 processors supporting the AVX512-IFMA instructions. + + The consequences of this kind of internal application state corruption can + be various - from no consequences, if the calling application does not + depend on the contents of non-volatile XMM registers at all, to the worst + consequences, where the attacker could get complete control of the + application process. However given the contents of the registers are just + zeroized so the attacker cannot put arbitrary values inside, the most likely + consequence, if any, would be an incorrect result of some application + dependent calculations or a crash leading to a denial of service. + + (CVE-2023-4807) + [Bernd Edlinger] + + + Changes between 1.1.1u and 1.1.1v [1 Aug 2023] + + *) Fix excessive time spent checking DH q parameter value. + + The function DH_check() performs various checks on DH parameters. After + fixing CVE-2023-3446 it was discovered that a large q parameter value can + also trigger an overly long computation during some of these checks. + A correct q value, if present, cannot be larger than the modulus p + parameter, thus it is unnecessary to perform these checks if q is larger + than p. + + If DH_check() is called with such q parameter value, + DH_CHECK_INVALID_Q_VALUE return flag is set and the computationally + intensive checks are skipped. + + (CVE-2023-3817) + [Tomáš Mráz] + + *) Fix DH_check() excessive time with over sized modulus + + The function DH_check() performs various checks on DH parameters. One of + those checks confirms that the modulus ("p" parameter) is not too large. + Trying to use a very large modulus is slow and OpenSSL will not normally use + a modulus which is over 10,000 bits in length. + + However the DH_check() function checks numerous aspects of the key or + parameters that have been supplied. Some of those checks use the supplied + modulus value even if it has already been found to be too large. + + A new limit has been added to DH_check of 32,768 bits. Supplying a + key/parameters with a modulus over this size will simply cause DH_check() + to fail. + (CVE-2023-3446) + [Matt Caswell] + + Changes between 1.1.1t and 1.1.1u [30 May 2023] + + *) Mitigate for the time it takes for `OBJ_obj2txt` to translate gigantic + OBJECT IDENTIFIER sub-identifiers to canonical numeric text form. + + OBJ_obj2txt() would translate any size OBJECT IDENTIFIER to canonical + numeric text form. For gigantic sub-identifiers, this would take a very + long time, the time complexity being O(n^2) where n is the size of that + sub-identifier. (CVE-2023-2650) + + To mitigitate this, `OBJ_obj2txt()` will only translate an OBJECT + IDENTIFIER to canonical numeric text form if the size of that OBJECT + IDENTIFIER is 586 bytes or less, and fail otherwise. + + The basis for this restriction is RFC 2578 (STD 58), section 3.5. OBJECT + IDENTIFIER values, which stipulates that OBJECT IDENTIFIERS may have at + most 128 sub-identifiers, and that the maximum value that each sub- + identifier may have is 2^32-1 (4294967295 decimal). + + For each byte of every sub-identifier, only the 7 lower bits are part of + the value, so the maximum amount of bytes that an OBJECT IDENTIFIER with + these restrictions may occupy is 32 * 128 / 7, which is approximately 586 + bytes. + + Ref: https://datatracker.ietf.org/doc/html/rfc2578#section-3.5 + + [Richard Levitte] + + *) Reworked the Fix for the Timing Oracle in RSA Decryption (CVE-2022-4304). + The previous fix for this timing side channel turned out to cause + a severe 2-3x performance regression in the typical use case + compared to 1.1.1s. The new fix uses existing constant time + code paths, and restores the previous performance level while + fully eliminating all existing timing side channels. + The fix was developed by Bernd Edlinger with testing support + by Hubert Kario. + [Bernd Edlinger] + + *) Corrected documentation of X509_VERIFY_PARAM_add0_policy() to mention + that it does not enable policy checking. Thanks to + David Benjamin for discovering this issue. (CVE-2023-0466) + [Tomas Mraz] + + *) Fixed an issue where invalid certificate policies in leaf certificates are + silently ignored by OpenSSL and other certificate policy checks are skipped + for that certificate. A malicious CA could use this to deliberately assert + invalid certificate policies in order to circumvent policy checking on the + certificate altogether. (CVE-2023-0465) + [Matt Caswell] + + *) Limited the number of nodes created in a policy tree to mitigate + against CVE-2023-0464. The default limit is set to 1000 nodes, which + should be sufficient for most installations. If required, the limit + can be adjusted by setting the OPENSSL_POLICY_TREE_NODES_MAX build + time define to a desired maximum number of nodes or zero to allow + unlimited growth. (CVE-2023-0464) + [Paul Dale] + Changes between 1.1.1s and 1.1.1t [7 Feb 2023] *) Fixed X.400 address type confusion in X.509 GeneralName. diff --git a/src/openssl/openssl-1.1.1t/CONTRIBUTING b/src/openssl/openssl-1.1.1w/CONTRIBUTING similarity index 100% rename from src/openssl/openssl-1.1.1t/CONTRIBUTING rename to src/openssl/openssl-1.1.1w/CONTRIBUTING diff --git a/src/openssl/openssl-1.1.1t/Configurations/00-base-templates.conf b/src/openssl/openssl-1.1.1w/Configurations/00-base-templates.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/00-base-templates.conf rename to src/openssl/openssl-1.1.1w/Configurations/00-base-templates.conf diff --git a/src/openssl/openssl-1.1.1t/Configurations/10-main.conf b/src/openssl/openssl-1.1.1w/Configurations/10-main.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/10-main.conf rename to src/openssl/openssl-1.1.1w/Configurations/10-main.conf diff --git a/src/openssl/openssl-1.1.1t/Configurations/15-android.conf b/src/openssl/openssl-1.1.1w/Configurations/15-android.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/15-android.conf rename to src/openssl/openssl-1.1.1w/Configurations/15-android.conf diff --git a/src/openssl/openssl-1.1.1t/Configurations/15-ios.conf b/src/openssl/openssl-1.1.1w/Configurations/15-ios.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/15-ios.conf rename to src/openssl/openssl-1.1.1w/Configurations/15-ios.conf diff --git a/src/openssl/openssl-1.1.1t/Configurations/50-djgpp.conf b/src/openssl/openssl-1.1.1w/Configurations/50-djgpp.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/50-djgpp.conf rename to src/openssl/openssl-1.1.1w/Configurations/50-djgpp.conf diff --git a/src/openssl/openssl-1.1.1t/Configurations/50-haiku.conf b/src/openssl/openssl-1.1.1w/Configurations/50-haiku.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/50-haiku.conf rename to src/openssl/openssl-1.1.1w/Configurations/50-haiku.conf diff --git a/src/openssl/openssl-1.1.1t/Configurations/50-masm.conf b/src/openssl/openssl-1.1.1w/Configurations/50-masm.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/50-masm.conf rename to src/openssl/openssl-1.1.1w/Configurations/50-masm.conf diff --git a/src/openssl/openssl-1.1.1t/Configurations/50-win-onecore.conf b/src/openssl/openssl-1.1.1w/Configurations/50-win-onecore.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/50-win-onecore.conf rename to src/openssl/openssl-1.1.1w/Configurations/50-win-onecore.conf diff --git a/src/openssl/openssl-1.1.1t/Configurations/INTERNALS.Configure b/src/openssl/openssl-1.1.1w/Configurations/INTERNALS.Configure similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/INTERNALS.Configure rename to src/openssl/openssl-1.1.1w/Configurations/INTERNALS.Configure diff --git a/src/openssl/openssl-1.1.1t/Configurations/README b/src/openssl/openssl-1.1.1w/Configurations/README similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/README rename to src/openssl/openssl-1.1.1w/Configurations/README diff --git a/src/openssl/openssl-1.1.1t/Configurations/README.design b/src/openssl/openssl-1.1.1w/Configurations/README.design similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/README.design rename to src/openssl/openssl-1.1.1w/Configurations/README.design diff --git a/src/openssl/openssl-1.1.1t/Configurations/common.tmpl b/src/openssl/openssl-1.1.1w/Configurations/common.tmpl similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/common.tmpl rename to src/openssl/openssl-1.1.1w/Configurations/common.tmpl diff --git a/src/openssl/openssl-1.1.1t/Configurations/common0.tmpl b/src/openssl/openssl-1.1.1w/Configurations/common0.tmpl similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/common0.tmpl rename to src/openssl/openssl-1.1.1w/Configurations/common0.tmpl diff --git a/src/openssl/openssl-1.1.1t/Configurations/descrip.mms.tmpl b/src/openssl/openssl-1.1.1w/Configurations/descrip.mms.tmpl similarity index 99% rename from src/openssl/openssl-1.1.1t/Configurations/descrip.mms.tmpl rename to src/openssl/openssl-1.1.1w/Configurations/descrip.mms.tmpl index e1aecfafb..1685941e8 100644 --- a/src/openssl/openssl-1.1.1t/Configurations/descrip.mms.tmpl +++ b/src/openssl/openssl-1.1.1w/Configurations/descrip.mms.tmpl @@ -13,6 +13,8 @@ our $sover_dirname = sprintf "%02d%02d", split(/\./, $config{shlib_version_number}); our $osslver = sprintf "%02d%02d", split(/\./, $config{version}); + our $shlibvariant = $target{shlib_variant} || ""; + our $sourcedir = $config{sourcedir}; our $builddir = $config{builddir}; sub sourcefile { @@ -47,13 +49,13 @@ map { (my $x = $_) =~ s/\.a$//; $x } @{$unified_info{libraries}}; our @shlibs = - map { $unified_info{sharednames}->{$_} || () } + map { $unified_info{sharednames}->{$_}.$shlibvariant || () } grep(!/\.a$/, @{$unified_info{libraries}}); our @install_libs = map { (my $x = $_) =~ s/\.a$//; $x } @{$unified_info{install}->{libraries}}; our @install_shlibs = - map { $unified_info{sharednames}->{$_} || () } + map { $unified_info{sharednames}->{$_}.$shlibvariant || () } grep(!/\.a$/, @{$unified_info{install}->{libraries}}); # This is a horrible hack, but is needed because recursive inclusion of files @@ -695,7 +697,7 @@ reconfigure reconf : } return map { $_ =~ /\.a$/ ? $`.".OLB" - : $unified_info{sharednames}->{$_}.".EXE" } @_; + : $unified_info{sharednames}->{$_}.$shlibvariant.".EXE" } @_; } # Helper function to deal with inclusion directory specs. @@ -912,7 +914,7 @@ EOF sub libobj2shlib { my %args = @_; my $lib = $args{lib}; - my $shlib = $args{shlib}; + my $shlib = $args{shlib}.$shlibvariant; my $libd = dirname($lib); my $libn = basename($lib); my @objs = map { (my $x = $_) =~ s|\.o$|.OBJ|; $x } diff --git a/src/openssl/openssl-1.1.1t/Configurations/shared-info.pl b/src/openssl/openssl-1.1.1w/Configurations/shared-info.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/shared-info.pl rename to src/openssl/openssl-1.1.1w/Configurations/shared-info.pl diff --git a/src/openssl/openssl-1.1.1t/Configurations/unix-Makefile.tmpl b/src/openssl/openssl-1.1.1w/Configurations/unix-Makefile.tmpl similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/unix-Makefile.tmpl rename to src/openssl/openssl-1.1.1w/Configurations/unix-Makefile.tmpl diff --git a/src/openssl/openssl-1.1.1t/Configurations/unix-checker.pm b/src/openssl/openssl-1.1.1w/Configurations/unix-checker.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/unix-checker.pm rename to src/openssl/openssl-1.1.1w/Configurations/unix-checker.pm diff --git a/src/openssl/openssl-1.1.1t/Configurations/windows-checker.pm b/src/openssl/openssl-1.1.1w/Configurations/windows-checker.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/Configurations/windows-checker.pm rename to src/openssl/openssl-1.1.1w/Configurations/windows-checker.pm diff --git a/src/openssl/openssl-1.1.1t/Configurations/windows-makefile.tmpl b/src/openssl/openssl-1.1.1w/Configurations/windows-makefile.tmpl similarity index 99% rename from src/openssl/openssl-1.1.1t/Configurations/windows-makefile.tmpl rename to src/openssl/openssl-1.1.1w/Configurations/windows-makefile.tmpl index 13716e064..f7a665299 100644 --- a/src/openssl/openssl-1.1.1t/Configurations/windows-makefile.tmpl +++ b/src/openssl/openssl-1.1.1w/Configurations/windows-makefile.tmpl @@ -9,6 +9,7 @@ our $exeext = $target{exe_extension} || ".exe"; our $libext = $target{lib_extension} || ".lib"; our $shlibext = $target{shared_extension} || ".dll"; + our $shlibvariant = $target{shlib_variant} || ""; our $shlibextimport = $target{shared_import_extension} || ".lib"; our $dsoext = $target{dso_extension} || ".dll"; @@ -35,7 +36,7 @@ my $lib = shift; return () if $disabled{shared} || $lib =~ /\.a$/; return () unless defined $unified_info{sharednames}->{$lib}; - return $unified_info{sharednames}->{$lib} . $shlibext; + return $unified_info{sharednames}->{$lib} . $shlibvariant . $shlibext; } sub lib { diff --git a/src/openssl/openssl-1.1.1t/Configure b/src/openssl/openssl-1.1.1w/Configure similarity index 99% rename from src/openssl/openssl-1.1.1t/Configure rename to src/openssl/openssl-1.1.1w/Configure index 6cb1a84f4..78cc15d18 100755 --- a/src/openssl/openssl-1.1.1t/Configure +++ b/src/openssl/openssl-1.1.1w/Configure @@ -1244,7 +1244,7 @@ if ($target =~ /^mingw/ && `$config{CC} --target-help 2>&1` =~ m/-mno-cygwin/m) } if ($target =~ /linux.*-mips/ && !$disabled{asm} - && !grep { $_ !~ /-m(ips|arch=)/ } (@{$config{CFLAGS}})) { + && !grep { $_ =~ /-m(ips|arch=)/ } (@{$config{CFLAGS}})) { # minimally required architecture flags for assembly modules my $value; $value = '-mips2' if ($target =~ /mips32/); diff --git a/src/openssl/openssl-1.1.1t/FAQ b/src/openssl/openssl-1.1.1w/FAQ similarity index 100% rename from src/openssl/openssl-1.1.1t/FAQ rename to src/openssl/openssl-1.1.1w/FAQ diff --git a/src/openssl/openssl-1.1.1t/INSTALL b/src/openssl/openssl-1.1.1w/INSTALL similarity index 100% rename from src/openssl/openssl-1.1.1t/INSTALL rename to src/openssl/openssl-1.1.1w/INSTALL diff --git a/src/openssl/openssl-1.1.1t/LICENSE b/src/openssl/openssl-1.1.1w/LICENSE similarity index 100% rename from src/openssl/openssl-1.1.1t/LICENSE rename to src/openssl/openssl-1.1.1w/LICENSE diff --git a/src/openssl/openssl-1.1.1t/NEWS b/src/openssl/openssl-1.1.1w/NEWS similarity index 98% rename from src/openssl/openssl-1.1.1t/NEWS rename to src/openssl/openssl-1.1.1w/NEWS index 2724fc4d8..1b849cdf7 100644 --- a/src/openssl/openssl-1.1.1t/NEWS +++ b/src/openssl/openssl-1.1.1w/NEWS @@ -5,6 +5,25 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.1.1v and OpenSSL 1.1.1w [11 Sep 2023] + + o Fix POLY1305 MAC implementation corrupting XMM registers on Windows + (CVE-2023-4807) + + Major changes between OpenSSL 1.1.1u and OpenSSL 1.1.1v [1 Aug 2023] + + o Fix excessive time spent checking DH q parameter value (CVE-2023-3817) + o Fix DH_check() excessive time with over sized modulus (CVE-2023-3446) + + Major changes between OpenSSL 1.1.1t and OpenSSL 1.1.1u [30 May 2023] + + o Mitigate for very slow `OBJ_obj2txt()` performance with gigantic + OBJECT IDENTIFIER sub-identities. (CVE-2023-2650) + o Fixed documentation of X509_VERIFY_PARAM_add0_policy() (CVE-2023-0466) + o Fixed handling of invalid certificate policies in leaf certificates + (CVE-2023-0465) + o Limited the number of nodes created in a policy tree ([CVE-2023-0464]) + Major changes between OpenSSL 1.1.1s and OpenSSL 1.1.1t [7 Feb 2023] o Fixed X.400 address type confusion in X.509 GeneralName (CVE-2023-0286) diff --git a/src/openssl/openssl-1.1.1t/NOTES.ANDROID b/src/openssl/openssl-1.1.1w/NOTES.ANDROID similarity index 100% rename from src/openssl/openssl-1.1.1t/NOTES.ANDROID rename to src/openssl/openssl-1.1.1w/NOTES.ANDROID diff --git a/src/openssl/openssl-1.1.1t/NOTES.DJGPP b/src/openssl/openssl-1.1.1w/NOTES.DJGPP similarity index 100% rename from src/openssl/openssl-1.1.1t/NOTES.DJGPP rename to src/openssl/openssl-1.1.1w/NOTES.DJGPP diff --git a/src/openssl/openssl-1.1.1t/NOTES.PERL b/src/openssl/openssl-1.1.1w/NOTES.PERL similarity index 100% rename from src/openssl/openssl-1.1.1t/NOTES.PERL rename to src/openssl/openssl-1.1.1w/NOTES.PERL diff --git a/src/openssl/openssl-1.1.1t/NOTES.UNIX b/src/openssl/openssl-1.1.1w/NOTES.UNIX similarity index 100% rename from src/openssl/openssl-1.1.1t/NOTES.UNIX rename to src/openssl/openssl-1.1.1w/NOTES.UNIX diff --git a/src/openssl/openssl-1.1.1t/NOTES.VMS b/src/openssl/openssl-1.1.1w/NOTES.VMS similarity index 100% rename from src/openssl/openssl-1.1.1t/NOTES.VMS rename to src/openssl/openssl-1.1.1w/NOTES.VMS diff --git a/src/openssl/openssl-1.1.1t/NOTES.WIN b/src/openssl/openssl-1.1.1w/NOTES.WIN similarity index 100% rename from src/openssl/openssl-1.1.1t/NOTES.WIN rename to src/openssl/openssl-1.1.1w/NOTES.WIN diff --git a/src/openssl/openssl-1.1.1t/README b/src/openssl/openssl-1.1.1w/README similarity index 97% rename from src/openssl/openssl-1.1.1t/README rename to src/openssl/openssl-1.1.1w/README index b2f806be3..e924e1529 100644 --- a/src/openssl/openssl-1.1.1t/README +++ b/src/openssl/openssl-1.1.1w/README @@ -1,7 +1,7 @@ - OpenSSL 1.1.1t 7 Feb 2023 + OpenSSL 1.1.1w 11 Sep 2023 - Copyright (c) 1998-2022 The OpenSSL Project + Copyright (c) 1998-2023 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson All rights reserved. diff --git a/src/openssl/openssl-1.1.1t/README.ENGINE b/src/openssl/openssl-1.1.1w/README.ENGINE similarity index 100% rename from src/openssl/openssl-1.1.1t/README.ENGINE rename to src/openssl/openssl-1.1.1w/README.ENGINE diff --git a/src/openssl/openssl-1.1.1t/README.FIPS b/src/openssl/openssl-1.1.1w/README.FIPS similarity index 100% rename from src/openssl/openssl-1.1.1t/README.FIPS rename to src/openssl/openssl-1.1.1w/README.FIPS diff --git a/src/openssl/openssl-1.1.1t/VMS/VMSify-conf.pl b/src/openssl/openssl-1.1.1w/VMS/VMSify-conf.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/VMS/VMSify-conf.pl rename to src/openssl/openssl-1.1.1w/VMS/VMSify-conf.pl diff --git a/src/openssl/openssl-1.1.1t/VMS/engine.opt b/src/openssl/openssl-1.1.1w/VMS/engine.opt similarity index 100% rename from src/openssl/openssl-1.1.1t/VMS/engine.opt rename to src/openssl/openssl-1.1.1w/VMS/engine.opt diff --git a/src/openssl/openssl-1.1.1t/VMS/msg_install.com b/src/openssl/openssl-1.1.1w/VMS/msg_install.com similarity index 100% rename from src/openssl/openssl-1.1.1t/VMS/msg_install.com rename to src/openssl/openssl-1.1.1w/VMS/msg_install.com diff --git a/src/openssl/openssl-1.1.1t/VMS/msg_staging.com b/src/openssl/openssl-1.1.1w/VMS/msg_staging.com similarity index 100% rename from src/openssl/openssl-1.1.1t/VMS/msg_staging.com rename to src/openssl/openssl-1.1.1w/VMS/msg_staging.com diff --git a/src/openssl/openssl-1.1.1t/VMS/openssl_ivp.com.in b/src/openssl/openssl-1.1.1w/VMS/openssl_ivp.com.in similarity index 100% rename from src/openssl/openssl-1.1.1t/VMS/openssl_ivp.com.in rename to src/openssl/openssl-1.1.1w/VMS/openssl_ivp.com.in diff --git a/src/openssl/openssl-1.1.1t/VMS/openssl_shutdown.com.in b/src/openssl/openssl-1.1.1w/VMS/openssl_shutdown.com.in similarity index 100% rename from src/openssl/openssl-1.1.1t/VMS/openssl_shutdown.com.in rename to src/openssl/openssl-1.1.1w/VMS/openssl_shutdown.com.in diff --git a/src/openssl/openssl-1.1.1t/VMS/openssl_startup.com.in b/src/openssl/openssl-1.1.1w/VMS/openssl_startup.com.in similarity index 100% rename from src/openssl/openssl-1.1.1t/VMS/openssl_startup.com.in rename to src/openssl/openssl-1.1.1w/VMS/openssl_startup.com.in diff --git a/src/openssl/openssl-1.1.1t/VMS/openssl_utils.com.in b/src/openssl/openssl-1.1.1w/VMS/openssl_utils.com.in similarity index 100% rename from src/openssl/openssl-1.1.1t/VMS/openssl_utils.com.in rename to src/openssl/openssl-1.1.1w/VMS/openssl_utils.com.in diff --git a/src/openssl/openssl-1.1.1t/VMS/test-includes.com b/src/openssl/openssl-1.1.1w/VMS/test-includes.com similarity index 100% rename from src/openssl/openssl-1.1.1t/VMS/test-includes.com rename to src/openssl/openssl-1.1.1w/VMS/test-includes.com diff --git a/src/openssl/openssl-1.1.1t/VMS/translatesyms.pl b/src/openssl/openssl-1.1.1w/VMS/translatesyms.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/VMS/translatesyms.pl rename to src/openssl/openssl-1.1.1w/VMS/translatesyms.pl diff --git a/src/openssl/openssl-1.1.1t/apps/CA.pl.in b/src/openssl/openssl-1.1.1w/apps/CA.pl.in similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/CA.pl.in rename to src/openssl/openssl-1.1.1w/apps/CA.pl.in diff --git a/src/openssl/openssl-1.1.1t/apps/app_rand.c b/src/openssl/openssl-1.1.1w/apps/app_rand.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/app_rand.c rename to src/openssl/openssl-1.1.1w/apps/app_rand.c diff --git a/src/openssl/openssl-1.1.1t/apps/apps.c b/src/openssl/openssl-1.1.1w/apps/apps.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/apps.c rename to src/openssl/openssl-1.1.1w/apps/apps.c diff --git a/src/openssl/openssl-1.1.1t/apps/apps.h b/src/openssl/openssl-1.1.1w/apps/apps.h similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/apps.h rename to src/openssl/openssl-1.1.1w/apps/apps.h diff --git a/src/openssl/openssl-1.1.1t/apps/asn1pars.c b/src/openssl/openssl-1.1.1w/apps/asn1pars.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/asn1pars.c rename to src/openssl/openssl-1.1.1w/apps/asn1pars.c diff --git a/src/openssl/openssl-1.1.1t/apps/bf_prefix.c b/src/openssl/openssl-1.1.1w/apps/bf_prefix.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/bf_prefix.c rename to src/openssl/openssl-1.1.1w/apps/bf_prefix.c diff --git a/src/openssl/openssl-1.1.1t/apps/build.info b/src/openssl/openssl-1.1.1w/apps/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/build.info rename to src/openssl/openssl-1.1.1w/apps/build.info diff --git a/src/openssl/openssl-1.1.1t/apps/ca-cert.srl b/src/openssl/openssl-1.1.1w/apps/ca-cert.srl similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/ca-cert.srl rename to src/openssl/openssl-1.1.1w/apps/ca-cert.srl diff --git a/src/openssl/openssl-1.1.1t/apps/ca-key.pem b/src/openssl/openssl-1.1.1w/apps/ca-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/ca-key.pem rename to src/openssl/openssl-1.1.1w/apps/ca-key.pem diff --git a/src/openssl/openssl-1.1.1t/apps/ca-req.pem b/src/openssl/openssl-1.1.1w/apps/ca-req.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/ca-req.pem rename to src/openssl/openssl-1.1.1w/apps/ca-req.pem diff --git a/src/openssl/openssl-1.1.1t/apps/ca.c b/src/openssl/openssl-1.1.1w/apps/ca.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/ca.c rename to src/openssl/openssl-1.1.1w/apps/ca.c diff --git a/src/openssl/openssl-1.1.1t/apps/cert.pem b/src/openssl/openssl-1.1.1w/apps/cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/cert.pem rename to src/openssl/openssl-1.1.1w/apps/cert.pem diff --git a/src/openssl/openssl-1.1.1t/apps/ciphers.c b/src/openssl/openssl-1.1.1w/apps/ciphers.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/ciphers.c rename to src/openssl/openssl-1.1.1w/apps/ciphers.c diff --git a/src/openssl/openssl-1.1.1t/apps/client.pem b/src/openssl/openssl-1.1.1w/apps/client.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/client.pem rename to src/openssl/openssl-1.1.1w/apps/client.pem diff --git a/src/openssl/openssl-1.1.1t/apps/cms.c b/src/openssl/openssl-1.1.1w/apps/cms.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/cms.c rename to src/openssl/openssl-1.1.1w/apps/cms.c diff --git a/src/openssl/openssl-1.1.1t/apps/crl.c b/src/openssl/openssl-1.1.1w/apps/crl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/crl.c rename to src/openssl/openssl-1.1.1w/apps/crl.c diff --git a/src/openssl/openssl-1.1.1t/apps/crl2p7.c b/src/openssl/openssl-1.1.1w/apps/crl2p7.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/crl2p7.c rename to src/openssl/openssl-1.1.1w/apps/crl2p7.c diff --git a/src/openssl/openssl-1.1.1t/apps/ct_log_list.cnf b/src/openssl/openssl-1.1.1w/apps/ct_log_list.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/ct_log_list.cnf rename to src/openssl/openssl-1.1.1w/apps/ct_log_list.cnf diff --git a/src/openssl/openssl-1.1.1t/apps/demoSRP/srp_verifier.txt b/src/openssl/openssl-1.1.1w/apps/demoSRP/srp_verifier.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/demoSRP/srp_verifier.txt rename to src/openssl/openssl-1.1.1w/apps/demoSRP/srp_verifier.txt diff --git a/src/openssl/openssl-1.1.1t/apps/demoSRP/srp_verifier.txt.attr b/src/openssl/openssl-1.1.1w/apps/demoSRP/srp_verifier.txt.attr similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/demoSRP/srp_verifier.txt.attr rename to src/openssl/openssl-1.1.1w/apps/demoSRP/srp_verifier.txt.attr diff --git a/src/openssl/openssl-1.1.1t/apps/dgst.c b/src/openssl/openssl-1.1.1w/apps/dgst.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/dgst.c rename to src/openssl/openssl-1.1.1w/apps/dgst.c diff --git a/src/openssl/openssl-1.1.1t/apps/dh1024.pem b/src/openssl/openssl-1.1.1w/apps/dh1024.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/dh1024.pem rename to src/openssl/openssl-1.1.1w/apps/dh1024.pem diff --git a/src/openssl/openssl-1.1.1t/apps/dh2048.pem b/src/openssl/openssl-1.1.1w/apps/dh2048.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/dh2048.pem rename to src/openssl/openssl-1.1.1w/apps/dh2048.pem diff --git a/src/openssl/openssl-1.1.1t/apps/dh4096.pem b/src/openssl/openssl-1.1.1w/apps/dh4096.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/dh4096.pem rename to src/openssl/openssl-1.1.1w/apps/dh4096.pem diff --git a/src/openssl/openssl-1.1.1t/apps/dhparam.c b/src/openssl/openssl-1.1.1w/apps/dhparam.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/dhparam.c rename to src/openssl/openssl-1.1.1w/apps/dhparam.c diff --git a/src/openssl/openssl-1.1.1t/apps/dsa-ca.pem b/src/openssl/openssl-1.1.1w/apps/dsa-ca.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/dsa-ca.pem rename to src/openssl/openssl-1.1.1w/apps/dsa-ca.pem diff --git a/src/openssl/openssl-1.1.1t/apps/dsa-pca.pem b/src/openssl/openssl-1.1.1w/apps/dsa-pca.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/dsa-pca.pem rename to src/openssl/openssl-1.1.1w/apps/dsa-pca.pem diff --git a/src/openssl/openssl-1.1.1t/apps/dsa.c b/src/openssl/openssl-1.1.1w/apps/dsa.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/dsa.c rename to src/openssl/openssl-1.1.1w/apps/dsa.c diff --git a/src/openssl/openssl-1.1.1t/apps/dsa1024.pem b/src/openssl/openssl-1.1.1w/apps/dsa1024.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/dsa1024.pem rename to src/openssl/openssl-1.1.1w/apps/dsa1024.pem diff --git a/src/openssl/openssl-1.1.1t/apps/dsa512.pem b/src/openssl/openssl-1.1.1w/apps/dsa512.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/dsa512.pem rename to src/openssl/openssl-1.1.1w/apps/dsa512.pem diff --git a/src/openssl/openssl-1.1.1t/apps/dsap.pem b/src/openssl/openssl-1.1.1w/apps/dsap.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/dsap.pem rename to src/openssl/openssl-1.1.1w/apps/dsap.pem diff --git a/src/openssl/openssl-1.1.1t/apps/dsaparam.c b/src/openssl/openssl-1.1.1w/apps/dsaparam.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/dsaparam.c rename to src/openssl/openssl-1.1.1w/apps/dsaparam.c diff --git a/src/openssl/openssl-1.1.1t/apps/ec.c b/src/openssl/openssl-1.1.1w/apps/ec.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/ec.c rename to src/openssl/openssl-1.1.1w/apps/ec.c diff --git a/src/openssl/openssl-1.1.1t/apps/ecparam.c b/src/openssl/openssl-1.1.1w/apps/ecparam.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/ecparam.c rename to src/openssl/openssl-1.1.1w/apps/ecparam.c diff --git a/src/openssl/openssl-1.1.1t/apps/enc.c b/src/openssl/openssl-1.1.1w/apps/enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/enc.c rename to src/openssl/openssl-1.1.1w/apps/enc.c diff --git a/src/openssl/openssl-1.1.1t/apps/engine.c b/src/openssl/openssl-1.1.1w/apps/engine.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/engine.c rename to src/openssl/openssl-1.1.1w/apps/engine.c diff --git a/src/openssl/openssl-1.1.1t/apps/errstr.c b/src/openssl/openssl-1.1.1w/apps/errstr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/errstr.c rename to src/openssl/openssl-1.1.1w/apps/errstr.c diff --git a/src/openssl/openssl-1.1.1t/apps/gendsa.c b/src/openssl/openssl-1.1.1w/apps/gendsa.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/gendsa.c rename to src/openssl/openssl-1.1.1w/apps/gendsa.c diff --git a/src/openssl/openssl-1.1.1t/apps/genpkey.c b/src/openssl/openssl-1.1.1w/apps/genpkey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/genpkey.c rename to src/openssl/openssl-1.1.1w/apps/genpkey.c diff --git a/src/openssl/openssl-1.1.1t/apps/genrsa.c b/src/openssl/openssl-1.1.1w/apps/genrsa.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/genrsa.c rename to src/openssl/openssl-1.1.1w/apps/genrsa.c diff --git a/src/openssl/openssl-1.1.1t/apps/nseq.c b/src/openssl/openssl-1.1.1w/apps/nseq.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/nseq.c rename to src/openssl/openssl-1.1.1w/apps/nseq.c diff --git a/src/openssl/openssl-1.1.1t/apps/ocsp.c b/src/openssl/openssl-1.1.1w/apps/ocsp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/ocsp.c rename to src/openssl/openssl-1.1.1w/apps/ocsp.c diff --git a/src/openssl/openssl-1.1.1t/apps/openssl-vms.cnf b/src/openssl/openssl-1.1.1w/apps/openssl-vms.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/openssl-vms.cnf rename to src/openssl/openssl-1.1.1w/apps/openssl-vms.cnf diff --git a/src/openssl/openssl-1.1.1t/apps/openssl.c b/src/openssl/openssl-1.1.1w/apps/openssl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/openssl.c rename to src/openssl/openssl-1.1.1w/apps/openssl.c diff --git a/src/openssl/openssl-1.1.1t/apps/openssl.cnf b/src/openssl/openssl-1.1.1w/apps/openssl.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/openssl.cnf rename to src/openssl/openssl-1.1.1w/apps/openssl.cnf diff --git a/src/openssl/openssl-1.1.1t/apps/opt.c b/src/openssl/openssl-1.1.1w/apps/opt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/opt.c rename to src/openssl/openssl-1.1.1w/apps/opt.c diff --git a/src/openssl/openssl-1.1.1t/apps/passwd.c b/src/openssl/openssl-1.1.1w/apps/passwd.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/passwd.c rename to src/openssl/openssl-1.1.1w/apps/passwd.c diff --git a/src/openssl/openssl-1.1.1t/apps/pca-cert.srl b/src/openssl/openssl-1.1.1w/apps/pca-cert.srl similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/pca-cert.srl rename to src/openssl/openssl-1.1.1w/apps/pca-cert.srl diff --git a/src/openssl/openssl-1.1.1t/apps/pca-key.pem b/src/openssl/openssl-1.1.1w/apps/pca-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/pca-key.pem rename to src/openssl/openssl-1.1.1w/apps/pca-key.pem diff --git a/src/openssl/openssl-1.1.1t/apps/pca-req.pem b/src/openssl/openssl-1.1.1w/apps/pca-req.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/pca-req.pem rename to src/openssl/openssl-1.1.1w/apps/pca-req.pem diff --git a/src/openssl/openssl-1.1.1t/apps/pkcs12.c b/src/openssl/openssl-1.1.1w/apps/pkcs12.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/pkcs12.c rename to src/openssl/openssl-1.1.1w/apps/pkcs12.c diff --git a/src/openssl/openssl-1.1.1t/apps/pkcs7.c b/src/openssl/openssl-1.1.1w/apps/pkcs7.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/pkcs7.c rename to src/openssl/openssl-1.1.1w/apps/pkcs7.c diff --git a/src/openssl/openssl-1.1.1t/apps/pkcs8.c b/src/openssl/openssl-1.1.1w/apps/pkcs8.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/pkcs8.c rename to src/openssl/openssl-1.1.1w/apps/pkcs8.c diff --git a/src/openssl/openssl-1.1.1t/apps/pkey.c b/src/openssl/openssl-1.1.1w/apps/pkey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/pkey.c rename to src/openssl/openssl-1.1.1w/apps/pkey.c diff --git a/src/openssl/openssl-1.1.1t/apps/pkeyparam.c b/src/openssl/openssl-1.1.1w/apps/pkeyparam.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/pkeyparam.c rename to src/openssl/openssl-1.1.1w/apps/pkeyparam.c diff --git a/src/openssl/openssl-1.1.1t/apps/pkeyutl.c b/src/openssl/openssl-1.1.1w/apps/pkeyutl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/pkeyutl.c rename to src/openssl/openssl-1.1.1w/apps/pkeyutl.c diff --git a/src/openssl/openssl-1.1.1t/apps/prime.c b/src/openssl/openssl-1.1.1w/apps/prime.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/prime.c rename to src/openssl/openssl-1.1.1w/apps/prime.c diff --git a/src/openssl/openssl-1.1.1t/apps/privkey.pem b/src/openssl/openssl-1.1.1w/apps/privkey.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/privkey.pem rename to src/openssl/openssl-1.1.1w/apps/privkey.pem diff --git a/src/openssl/openssl-1.1.1t/apps/progs.pl b/src/openssl/openssl-1.1.1w/apps/progs.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/progs.pl rename to src/openssl/openssl-1.1.1w/apps/progs.pl diff --git a/src/openssl/openssl-1.1.1t/apps/rand.c b/src/openssl/openssl-1.1.1w/apps/rand.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/rand.c rename to src/openssl/openssl-1.1.1w/apps/rand.c diff --git a/src/openssl/openssl-1.1.1t/apps/rehash.c b/src/openssl/openssl-1.1.1w/apps/rehash.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/rehash.c rename to src/openssl/openssl-1.1.1w/apps/rehash.c diff --git a/src/openssl/openssl-1.1.1t/apps/req.c b/src/openssl/openssl-1.1.1w/apps/req.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/req.c rename to src/openssl/openssl-1.1.1w/apps/req.c diff --git a/src/openssl/openssl-1.1.1t/apps/req.pem b/src/openssl/openssl-1.1.1w/apps/req.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/req.pem rename to src/openssl/openssl-1.1.1w/apps/req.pem diff --git a/src/openssl/openssl-1.1.1t/apps/rsa.c b/src/openssl/openssl-1.1.1w/apps/rsa.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/rsa.c rename to src/openssl/openssl-1.1.1w/apps/rsa.c diff --git a/src/openssl/openssl-1.1.1t/apps/rsa8192.pem b/src/openssl/openssl-1.1.1w/apps/rsa8192.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/rsa8192.pem rename to src/openssl/openssl-1.1.1w/apps/rsa8192.pem diff --git a/src/openssl/openssl-1.1.1t/apps/rsautl.c b/src/openssl/openssl-1.1.1w/apps/rsautl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/rsautl.c rename to src/openssl/openssl-1.1.1w/apps/rsautl.c diff --git a/src/openssl/openssl-1.1.1t/apps/s1024key.pem b/src/openssl/openssl-1.1.1w/apps/s1024key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/s1024key.pem rename to src/openssl/openssl-1.1.1w/apps/s1024key.pem diff --git a/src/openssl/openssl-1.1.1t/apps/s1024req.pem b/src/openssl/openssl-1.1.1w/apps/s1024req.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/s1024req.pem rename to src/openssl/openssl-1.1.1w/apps/s1024req.pem diff --git a/src/openssl/openssl-1.1.1t/apps/s512-key.pem b/src/openssl/openssl-1.1.1w/apps/s512-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/s512-key.pem rename to src/openssl/openssl-1.1.1w/apps/s512-key.pem diff --git a/src/openssl/openssl-1.1.1t/apps/s512-req.pem b/src/openssl/openssl-1.1.1w/apps/s512-req.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/s512-req.pem rename to src/openssl/openssl-1.1.1w/apps/s512-req.pem diff --git a/src/openssl/openssl-1.1.1t/apps/s_apps.h b/src/openssl/openssl-1.1.1w/apps/s_apps.h similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/s_apps.h rename to src/openssl/openssl-1.1.1w/apps/s_apps.h diff --git a/src/openssl/openssl-1.1.1t/apps/s_cb.c b/src/openssl/openssl-1.1.1w/apps/s_cb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/s_cb.c rename to src/openssl/openssl-1.1.1w/apps/s_cb.c diff --git a/src/openssl/openssl-1.1.1t/apps/s_client.c b/src/openssl/openssl-1.1.1w/apps/s_client.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/s_client.c rename to src/openssl/openssl-1.1.1w/apps/s_client.c diff --git a/src/openssl/openssl-1.1.1t/apps/s_server.c b/src/openssl/openssl-1.1.1w/apps/s_server.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/s_server.c rename to src/openssl/openssl-1.1.1w/apps/s_server.c diff --git a/src/openssl/openssl-1.1.1t/apps/s_socket.c b/src/openssl/openssl-1.1.1w/apps/s_socket.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/s_socket.c rename to src/openssl/openssl-1.1.1w/apps/s_socket.c diff --git a/src/openssl/openssl-1.1.1t/apps/s_time.c b/src/openssl/openssl-1.1.1w/apps/s_time.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/s_time.c rename to src/openssl/openssl-1.1.1w/apps/s_time.c diff --git a/src/openssl/openssl-1.1.1t/apps/server.pem b/src/openssl/openssl-1.1.1w/apps/server.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/server.pem rename to src/openssl/openssl-1.1.1w/apps/server.pem diff --git a/src/openssl/openssl-1.1.1t/apps/server.srl b/src/openssl/openssl-1.1.1w/apps/server.srl similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/server.srl rename to src/openssl/openssl-1.1.1w/apps/server.srl diff --git a/src/openssl/openssl-1.1.1t/apps/server2.pem b/src/openssl/openssl-1.1.1w/apps/server2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/server2.pem rename to src/openssl/openssl-1.1.1w/apps/server2.pem diff --git a/src/openssl/openssl-1.1.1t/apps/sess_id.c b/src/openssl/openssl-1.1.1w/apps/sess_id.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/sess_id.c rename to src/openssl/openssl-1.1.1w/apps/sess_id.c diff --git a/src/openssl/openssl-1.1.1t/apps/smime.c b/src/openssl/openssl-1.1.1w/apps/smime.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/smime.c rename to src/openssl/openssl-1.1.1w/apps/smime.c diff --git a/src/openssl/openssl-1.1.1t/apps/speed.c b/src/openssl/openssl-1.1.1w/apps/speed.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/speed.c rename to src/openssl/openssl-1.1.1w/apps/speed.c diff --git a/src/openssl/openssl-1.1.1t/apps/spkac.c b/src/openssl/openssl-1.1.1w/apps/spkac.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/spkac.c rename to src/openssl/openssl-1.1.1w/apps/spkac.c diff --git a/src/openssl/openssl-1.1.1t/apps/srp.c b/src/openssl/openssl-1.1.1w/apps/srp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/srp.c rename to src/openssl/openssl-1.1.1w/apps/srp.c diff --git a/src/openssl/openssl-1.1.1t/apps/storeutl.c b/src/openssl/openssl-1.1.1w/apps/storeutl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/storeutl.c rename to src/openssl/openssl-1.1.1w/apps/storeutl.c diff --git a/src/openssl/openssl-1.1.1t/apps/testCA.pem b/src/openssl/openssl-1.1.1w/apps/testCA.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/testCA.pem rename to src/openssl/openssl-1.1.1w/apps/testCA.pem diff --git a/src/openssl/openssl-1.1.1t/apps/testdsa.h b/src/openssl/openssl-1.1.1w/apps/testdsa.h similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/testdsa.h rename to src/openssl/openssl-1.1.1w/apps/testdsa.h diff --git a/src/openssl/openssl-1.1.1t/apps/testrsa.h b/src/openssl/openssl-1.1.1w/apps/testrsa.h similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/testrsa.h rename to src/openssl/openssl-1.1.1w/apps/testrsa.h diff --git a/src/openssl/openssl-1.1.1t/apps/timeouts.h b/src/openssl/openssl-1.1.1w/apps/timeouts.h similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/timeouts.h rename to src/openssl/openssl-1.1.1w/apps/timeouts.h diff --git a/src/openssl/openssl-1.1.1t/apps/ts.c b/src/openssl/openssl-1.1.1w/apps/ts.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/ts.c rename to src/openssl/openssl-1.1.1w/apps/ts.c diff --git a/src/openssl/openssl-1.1.1t/apps/tsget.in b/src/openssl/openssl-1.1.1w/apps/tsget.in similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/tsget.in rename to src/openssl/openssl-1.1.1w/apps/tsget.in diff --git a/src/openssl/openssl-1.1.1t/apps/verify.c b/src/openssl/openssl-1.1.1w/apps/verify.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/verify.c rename to src/openssl/openssl-1.1.1w/apps/verify.c diff --git a/src/openssl/openssl-1.1.1t/apps/version.c b/src/openssl/openssl-1.1.1w/apps/version.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/version.c rename to src/openssl/openssl-1.1.1w/apps/version.c diff --git a/src/openssl/openssl-1.1.1t/apps/vms_decc_argv.c b/src/openssl/openssl-1.1.1w/apps/vms_decc_argv.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/vms_decc_argv.c rename to src/openssl/openssl-1.1.1w/apps/vms_decc_argv.c diff --git a/src/openssl/openssl-1.1.1t/apps/vms_decc_init.c b/src/openssl/openssl-1.1.1w/apps/vms_decc_init.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/vms_decc_init.c rename to src/openssl/openssl-1.1.1w/apps/vms_decc_init.c diff --git a/src/openssl/openssl-1.1.1t/apps/vms_term_sock.c b/src/openssl/openssl-1.1.1w/apps/vms_term_sock.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/vms_term_sock.c rename to src/openssl/openssl-1.1.1w/apps/vms_term_sock.c diff --git a/src/openssl/openssl-1.1.1t/apps/vms_term_sock.h b/src/openssl/openssl-1.1.1w/apps/vms_term_sock.h similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/vms_term_sock.h rename to src/openssl/openssl-1.1.1w/apps/vms_term_sock.h diff --git a/src/openssl/openssl-1.1.1t/apps/win32_init.c b/src/openssl/openssl-1.1.1w/apps/win32_init.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/win32_init.c rename to src/openssl/openssl-1.1.1w/apps/win32_init.c diff --git a/src/openssl/openssl-1.1.1t/apps/x509.c b/src/openssl/openssl-1.1.1w/apps/x509.c similarity index 100% rename from src/openssl/openssl-1.1.1t/apps/x509.c rename to src/openssl/openssl-1.1.1w/apps/x509.c diff --git a/src/openssl/openssl-1.1.1t/build.info b/src/openssl/openssl-1.1.1w/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/build.info rename to src/openssl/openssl-1.1.1w/build.info diff --git a/src/openssl/openssl-1.1.1t/config b/src/openssl/openssl-1.1.1w/config similarity index 100% rename from src/openssl/openssl-1.1.1t/config rename to src/openssl/openssl-1.1.1w/config diff --git a/src/openssl/openssl-1.1.1t/config.com b/src/openssl/openssl-1.1.1w/config.com similarity index 100% rename from src/openssl/openssl-1.1.1t/config.com rename to src/openssl/openssl-1.1.1w/config.com diff --git a/src/openssl/openssl-1.1.1t/crypto/LPdir_nyi.c b/src/openssl/openssl-1.1.1w/crypto/LPdir_nyi.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/LPdir_nyi.c rename to src/openssl/openssl-1.1.1w/crypto/LPdir_nyi.c diff --git a/src/openssl/openssl-1.1.1t/crypto/LPdir_unix.c b/src/openssl/openssl-1.1.1w/crypto/LPdir_unix.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/LPdir_unix.c rename to src/openssl/openssl-1.1.1w/crypto/LPdir_unix.c diff --git a/src/openssl/openssl-1.1.1t/crypto/LPdir_vms.c b/src/openssl/openssl-1.1.1w/crypto/LPdir_vms.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/LPdir_vms.c rename to src/openssl/openssl-1.1.1w/crypto/LPdir_vms.c diff --git a/src/openssl/openssl-1.1.1t/crypto/LPdir_win.c b/src/openssl/openssl-1.1.1w/crypto/LPdir_win.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/LPdir_win.c rename to src/openssl/openssl-1.1.1w/crypto/LPdir_win.c diff --git a/src/openssl/openssl-1.1.1t/crypto/LPdir_win32.c b/src/openssl/openssl-1.1.1w/crypto/LPdir_win32.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/LPdir_win32.c rename to src/openssl/openssl-1.1.1w/crypto/LPdir_win32.c diff --git a/src/openssl/openssl-1.1.1t/crypto/LPdir_wince.c b/src/openssl/openssl-1.1.1w/crypto/LPdir_wince.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/LPdir_wince.c rename to src/openssl/openssl-1.1.1w/crypto/LPdir_wince.c diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/aes_cbc.c b/src/openssl/openssl-1.1.1w/crypto/aes/aes_cbc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/aes_cbc.c rename to src/openssl/openssl-1.1.1w/crypto/aes/aes_cbc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/aes_cfb.c b/src/openssl/openssl-1.1.1w/crypto/aes/aes_cfb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/aes_cfb.c rename to src/openssl/openssl-1.1.1w/crypto/aes/aes_cfb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/aes_core.c b/src/openssl/openssl-1.1.1w/crypto/aes/aes_core.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/aes_core.c rename to src/openssl/openssl-1.1.1w/crypto/aes/aes_core.c diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/aes_ecb.c b/src/openssl/openssl-1.1.1w/crypto/aes/aes_ecb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/aes_ecb.c rename to src/openssl/openssl-1.1.1w/crypto/aes/aes_ecb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/aes_ige.c b/src/openssl/openssl-1.1.1w/crypto/aes/aes_ige.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/aes_ige.c rename to src/openssl/openssl-1.1.1w/crypto/aes/aes_ige.c diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/aes_local.h b/src/openssl/openssl-1.1.1w/crypto/aes/aes_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/aes_local.h rename to src/openssl/openssl-1.1.1w/crypto/aes/aes_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/aes_misc.c b/src/openssl/openssl-1.1.1w/crypto/aes/aes_misc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/aes_misc.c rename to src/openssl/openssl-1.1.1w/crypto/aes/aes_misc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/aes_ofb.c b/src/openssl/openssl-1.1.1w/crypto/aes/aes_ofb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/aes_ofb.c rename to src/openssl/openssl-1.1.1w/crypto/aes/aes_ofb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/aes_wrap.c b/src/openssl/openssl-1.1.1w/crypto/aes/aes_wrap.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/aes_wrap.c rename to src/openssl/openssl-1.1.1w/crypto/aes/aes_wrap.c diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/aes_x86core.c b/src/openssl/openssl-1.1.1w/crypto/aes/aes_x86core.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/aes_x86core.c rename to src/openssl/openssl-1.1.1w/crypto/aes/aes_x86core.c diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-armv4.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-armv4.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-armv4.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-armv4.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-c64xplus.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-c64xplus.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-c64xplus.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-c64xplus.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-ia64.S b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-ia64.S similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-ia64.S rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-ia64.S diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-mips.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-mips.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-mips.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-mips.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-parisc.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-parisc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-parisc.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-parisc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-ppc.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-ppc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-ppc.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-ppc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-s390x.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-s390x.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-s390x.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-s390x.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-sparcv9.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aes-sparcv9.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aes-sparcv9.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aesfx-sparcv9.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aesfx-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aesfx-sparcv9.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aesfx-sparcv9.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aesni-mb-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aesni-mb-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aesni-mb-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aesni-mb-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aesni-sha1-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aesni-sha1-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aesni-sha1-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aesni-sha1-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aesni-sha256-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aesni-sha256-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aesni-sha256-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aesni-sha256-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aesni-x86.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aesni-x86.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aesni-x86.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aesni-x86.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aesni-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aesni-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aesni-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aesni-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aesp8-ppc.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aesp8-ppc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aesp8-ppc.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aesp8-ppc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aest4-sparcv9.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aest4-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aest4-sparcv9.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aest4-sparcv9.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/aesv8-armx.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/aesv8-armx.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/aesv8-armx.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/aesv8-armx.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/bsaes-armv7.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/bsaes-armv7.pl similarity index 99% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/bsaes-armv7.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/bsaes-armv7.pl index 2b9f241ce..b22db37d4 100644 --- a/src/openssl/openssl-1.1.1t/crypto/aes/asm/bsaes-armv7.pl +++ b/src/openssl/openssl-1.1.1w/crypto/aes/asm/bsaes-armv7.pl @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2012-2020 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2012-2023 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -14,7 +14,7 @@ # details see http://www.openssl.org/~appro/cryptogams/. # # Specific modes and adaptation for Linux kernel by Ard Biesheuvel -# of Linaro. Permission to use under GPL terms is granted. +# of Linaro. # ==================================================================== # Bit-sliced AES for ARM NEON diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/vpaes-armv8.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/vpaes-armv8.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/vpaes-armv8.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/vpaes-armv8.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/vpaes-ppc.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/vpaes-ppc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/vpaes-ppc.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/vpaes-ppc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/vpaes-x86.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/vpaes-x86.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/vpaes-x86.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/vpaes-x86.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/asm/vpaes-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/aes/asm/vpaes-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/asm/vpaes-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/aes/asm/vpaes-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aes/build.info b/src/openssl/openssl-1.1.1w/crypto/aes/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aes/build.info rename to src/openssl/openssl-1.1.1w/crypto/aes/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/alphacpuid.pl b/src/openssl/openssl-1.1.1w/crypto/alphacpuid.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/alphacpuid.pl rename to src/openssl/openssl-1.1.1w/crypto/alphacpuid.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/aria/aria.c b/src/openssl/openssl-1.1.1w/crypto/aria/aria.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aria/aria.c rename to src/openssl/openssl-1.1.1w/crypto/aria/aria.c diff --git a/src/openssl/openssl-1.1.1t/crypto/aria/build.info b/src/openssl/openssl-1.1.1w/crypto/aria/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/aria/build.info rename to src/openssl/openssl-1.1.1w/crypto/aria/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/arm64cpuid.pl b/src/openssl/openssl-1.1.1w/crypto/arm64cpuid.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/arm64cpuid.pl rename to src/openssl/openssl-1.1.1w/crypto/arm64cpuid.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/arm_arch.h b/src/openssl/openssl-1.1.1w/crypto/arm_arch.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/arm_arch.h rename to src/openssl/openssl-1.1.1w/crypto/arm_arch.h diff --git a/src/openssl/openssl-1.1.1t/crypto/armcap.c b/src/openssl/openssl-1.1.1w/crypto/armcap.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/armcap.c rename to src/openssl/openssl-1.1.1w/crypto/armcap.c diff --git a/src/openssl/openssl-1.1.1t/crypto/armv4cpuid.pl b/src/openssl/openssl-1.1.1w/crypto/armv4cpuid.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/armv4cpuid.pl rename to src/openssl/openssl-1.1.1w/crypto/armv4cpuid.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_bitstr.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_bitstr.c similarity index 97% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_bitstr.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_bitstr.c index f462dd107..14b57265d 100644 --- a/src/openssl/openssl-1.1.1t/crypto/asn1/a_bitstr.c +++ b/src/openssl/openssl-1.1.1w/crypto/asn1/a_bitstr.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -148,6 +148,9 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) int w, v, iv; unsigned char *c; + if (n < 0) + return 0; + w = n / 8; v = 1 << (7 - (n & 0x07)); iv = ~v; @@ -182,6 +185,9 @@ int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n) { int w, v; + if (n < 0) + return 0; + w = n / 8; v = 1 << (7 - (n & 0x07)); if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL)) diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_d2i_fp.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_d2i_fp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_d2i_fp.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_d2i_fp.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_digest.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_digest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_digest.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_digest.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_dup.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_dup.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_dup.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_dup.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_gentm.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_gentm.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_gentm.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_gentm.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_i2d_fp.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_i2d_fp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_i2d_fp.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_i2d_fp.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_int.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_int.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_int.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_int.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_mbstr.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_mbstr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_mbstr.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_mbstr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_object.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_object.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_object.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_object.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_octet.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_octet.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_octet.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_octet.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_print.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_print.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_print.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_print.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_sign.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_sign.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_sign.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_sign.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_strex.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_strex.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_strex.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_strex.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_strnid.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_strnid.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_strnid.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_strnid.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_time.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_time.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_time.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_time.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_type.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_type.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_type.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_type.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_utctm.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_utctm.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_utctm.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_utctm.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_utf8.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_utf8.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_utf8.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_utf8.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/a_verify.c b/src/openssl/openssl-1.1.1w/crypto/asn1/a_verify.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/a_verify.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/a_verify.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/ameth_lib.c b/src/openssl/openssl-1.1.1w/crypto/asn1/ameth_lib.c similarity index 97% rename from src/openssl/openssl-1.1.1t/crypto/asn1/ameth_lib.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/ameth_lib.c index 5e8c3ed1d..4ab246e98 100644 --- a/src/openssl/openssl-1.1.1t/crypto/asn1/ameth_lib.c +++ b/src/openssl/openssl-1.1.1w/crypto/asn1/ameth_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -264,6 +264,7 @@ void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst, dst->pkey_size = src->pkey_size; dst->pkey_bits = src->pkey_bits; + dst->pkey_security_bits = src->pkey_security_bits; dst->param_decode = src->param_decode; dst->param_encode = src->param_encode; @@ -271,6 +272,7 @@ void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst, dst->param_copy = src->param_copy; dst->param_cmp = src->param_cmp; dst->param_print = src->param_print; + dst->sig_print = src->sig_print; dst->pkey_free = src->pkey_free; dst->pkey_ctrl = src->pkey_ctrl; @@ -281,6 +283,13 @@ void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst, dst->siginf_set = src->siginf_set; dst->pkey_check = src->pkey_check; + dst->pkey_public_check = src->pkey_public_check; + dst->pkey_param_check = src->pkey_param_check; + + dst->set_priv_key = src->set_priv_key; + dst->set_pub_key = src->set_pub_key; + dst->get_priv_key = src->get_priv_key; + dst->get_pub_key = src->get_pub_key; } diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/asn1_err.c b/src/openssl/openssl-1.1.1w/crypto/asn1/asn1_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/asn1_err.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/asn1_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/asn1_gen.c b/src/openssl/openssl-1.1.1w/crypto/asn1/asn1_gen.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/asn1_gen.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/asn1_gen.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/asn1_item_list.c b/src/openssl/openssl-1.1.1w/crypto/asn1/asn1_item_list.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/asn1_item_list.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/asn1_item_list.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/asn1_item_list.h b/src/openssl/openssl-1.1.1w/crypto/asn1/asn1_item_list.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/asn1_item_list.h rename to src/openssl/openssl-1.1.1w/crypto/asn1/asn1_item_list.h diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/asn1_lib.c b/src/openssl/openssl-1.1.1w/crypto/asn1/asn1_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/asn1_lib.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/asn1_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/asn1_local.h b/src/openssl/openssl-1.1.1w/crypto/asn1/asn1_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/asn1_local.h rename to src/openssl/openssl-1.1.1w/crypto/asn1/asn1_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/asn1_par.c b/src/openssl/openssl-1.1.1w/crypto/asn1/asn1_par.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/asn1_par.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/asn1_par.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/asn_mime.c b/src/openssl/openssl-1.1.1w/crypto/asn1/asn_mime.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/asn_mime.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/asn_mime.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/asn_moid.c b/src/openssl/openssl-1.1.1w/crypto/asn1/asn_moid.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/asn_moid.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/asn_moid.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/asn_mstbl.c b/src/openssl/openssl-1.1.1w/crypto/asn1/asn_mstbl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/asn_mstbl.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/asn_mstbl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/asn_pack.c b/src/openssl/openssl-1.1.1w/crypto/asn1/asn_pack.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/asn_pack.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/asn_pack.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/bio_asn1.c b/src/openssl/openssl-1.1.1w/crypto/asn1/bio_asn1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/bio_asn1.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/bio_asn1.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/bio_ndef.c b/src/openssl/openssl-1.1.1w/crypto/asn1/bio_ndef.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/bio_ndef.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/bio_ndef.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/build.info b/src/openssl/openssl-1.1.1w/crypto/asn1/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/build.info rename to src/openssl/openssl-1.1.1w/crypto/asn1/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/charmap.h b/src/openssl/openssl-1.1.1w/crypto/asn1/charmap.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/charmap.h rename to src/openssl/openssl-1.1.1w/crypto/asn1/charmap.h diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/charmap.pl b/src/openssl/openssl-1.1.1w/crypto/asn1/charmap.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/charmap.pl rename to src/openssl/openssl-1.1.1w/crypto/asn1/charmap.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/d2i_pr.c b/src/openssl/openssl-1.1.1w/crypto/asn1/d2i_pr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/d2i_pr.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/d2i_pr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/d2i_pu.c b/src/openssl/openssl-1.1.1w/crypto/asn1/d2i_pu.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/d2i_pu.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/d2i_pu.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/evp_asn1.c b/src/openssl/openssl-1.1.1w/crypto/asn1/evp_asn1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/evp_asn1.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/evp_asn1.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/f_int.c b/src/openssl/openssl-1.1.1w/crypto/asn1/f_int.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/f_int.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/f_int.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/f_string.c b/src/openssl/openssl-1.1.1w/crypto/asn1/f_string.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/f_string.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/f_string.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/i2d_pr.c b/src/openssl/openssl-1.1.1w/crypto/asn1/i2d_pr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/i2d_pr.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/i2d_pr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/i2d_pu.c b/src/openssl/openssl-1.1.1w/crypto/asn1/i2d_pu.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/i2d_pu.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/i2d_pu.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/n_pkey.c b/src/openssl/openssl-1.1.1w/crypto/asn1/n_pkey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/n_pkey.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/n_pkey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/nsseq.c b/src/openssl/openssl-1.1.1w/crypto/asn1/nsseq.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/nsseq.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/nsseq.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/p5_pbe.c b/src/openssl/openssl-1.1.1w/crypto/asn1/p5_pbe.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/p5_pbe.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/p5_pbe.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/p5_pbev2.c b/src/openssl/openssl-1.1.1w/crypto/asn1/p5_pbev2.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/p5_pbev2.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/p5_pbev2.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/p5_scrypt.c b/src/openssl/openssl-1.1.1w/crypto/asn1/p5_scrypt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/p5_scrypt.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/p5_scrypt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/p8_pkey.c b/src/openssl/openssl-1.1.1w/crypto/asn1/p8_pkey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/p8_pkey.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/p8_pkey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/standard_methods.h b/src/openssl/openssl-1.1.1w/crypto/asn1/standard_methods.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/standard_methods.h rename to src/openssl/openssl-1.1.1w/crypto/asn1/standard_methods.h diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/t_bitst.c b/src/openssl/openssl-1.1.1w/crypto/asn1/t_bitst.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/t_bitst.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/t_bitst.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/t_pkey.c b/src/openssl/openssl-1.1.1w/crypto/asn1/t_pkey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/t_pkey.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/t_pkey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/t_spki.c b/src/openssl/openssl-1.1.1w/crypto/asn1/t_spki.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/t_spki.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/t_spki.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/tasn_dec.c b/src/openssl/openssl-1.1.1w/crypto/asn1/tasn_dec.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/tasn_dec.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/tasn_dec.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/tasn_enc.c b/src/openssl/openssl-1.1.1w/crypto/asn1/tasn_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/tasn_enc.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/tasn_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/tasn_fre.c b/src/openssl/openssl-1.1.1w/crypto/asn1/tasn_fre.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/tasn_fre.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/tasn_fre.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/tasn_new.c b/src/openssl/openssl-1.1.1w/crypto/asn1/tasn_new.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/tasn_new.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/tasn_new.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/tasn_prn.c b/src/openssl/openssl-1.1.1w/crypto/asn1/tasn_prn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/tasn_prn.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/tasn_prn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/tasn_scn.c b/src/openssl/openssl-1.1.1w/crypto/asn1/tasn_scn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/tasn_scn.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/tasn_scn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/tasn_typ.c b/src/openssl/openssl-1.1.1w/crypto/asn1/tasn_typ.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/tasn_typ.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/tasn_typ.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/tasn_utl.c b/src/openssl/openssl-1.1.1w/crypto/asn1/tasn_utl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/tasn_utl.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/tasn_utl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/tbl_standard.h b/src/openssl/openssl-1.1.1w/crypto/asn1/tbl_standard.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/tbl_standard.h rename to src/openssl/openssl-1.1.1w/crypto/asn1/tbl_standard.h diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/x_algor.c b/src/openssl/openssl-1.1.1w/crypto/asn1/x_algor.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/x_algor.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/x_algor.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/x_bignum.c b/src/openssl/openssl-1.1.1w/crypto/asn1/x_bignum.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/x_bignum.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/x_bignum.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/x_info.c b/src/openssl/openssl-1.1.1w/crypto/asn1/x_info.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/x_info.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/x_info.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/x_int64.c b/src/openssl/openssl-1.1.1w/crypto/asn1/x_int64.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/x_int64.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/x_int64.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/x_long.c b/src/openssl/openssl-1.1.1w/crypto/asn1/x_long.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/x_long.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/x_long.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/x_pkey.c b/src/openssl/openssl-1.1.1w/crypto/asn1/x_pkey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/x_pkey.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/x_pkey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/x_sig.c b/src/openssl/openssl-1.1.1w/crypto/asn1/x_sig.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/x_sig.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/x_sig.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/x_spki.c b/src/openssl/openssl-1.1.1w/crypto/asn1/x_spki.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/x_spki.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/x_spki.c diff --git a/src/openssl/openssl-1.1.1t/crypto/asn1/x_val.c b/src/openssl/openssl-1.1.1w/crypto/asn1/x_val.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/asn1/x_val.c rename to src/openssl/openssl-1.1.1w/crypto/asn1/x_val.c diff --git a/src/openssl/openssl-1.1.1t/crypto/async/arch/async_null.c b/src/openssl/openssl-1.1.1w/crypto/async/arch/async_null.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/async/arch/async_null.c rename to src/openssl/openssl-1.1.1w/crypto/async/arch/async_null.c diff --git a/src/openssl/openssl-1.1.1t/crypto/async/arch/async_null.h b/src/openssl/openssl-1.1.1w/crypto/async/arch/async_null.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/async/arch/async_null.h rename to src/openssl/openssl-1.1.1w/crypto/async/arch/async_null.h diff --git a/src/openssl/openssl-1.1.1t/crypto/async/arch/async_posix.c b/src/openssl/openssl-1.1.1w/crypto/async/arch/async_posix.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/async/arch/async_posix.c rename to src/openssl/openssl-1.1.1w/crypto/async/arch/async_posix.c diff --git a/src/openssl/openssl-1.1.1t/crypto/async/arch/async_posix.h b/src/openssl/openssl-1.1.1w/crypto/async/arch/async_posix.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/async/arch/async_posix.h rename to src/openssl/openssl-1.1.1w/crypto/async/arch/async_posix.h diff --git a/src/openssl/openssl-1.1.1t/crypto/async/arch/async_win.c b/src/openssl/openssl-1.1.1w/crypto/async/arch/async_win.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/async/arch/async_win.c rename to src/openssl/openssl-1.1.1w/crypto/async/arch/async_win.c diff --git a/src/openssl/openssl-1.1.1t/crypto/async/arch/async_win.h b/src/openssl/openssl-1.1.1w/crypto/async/arch/async_win.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/async/arch/async_win.h rename to src/openssl/openssl-1.1.1w/crypto/async/arch/async_win.h diff --git a/src/openssl/openssl-1.1.1t/crypto/async/async.c b/src/openssl/openssl-1.1.1w/crypto/async/async.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/async/async.c rename to src/openssl/openssl-1.1.1w/crypto/async/async.c diff --git a/src/openssl/openssl-1.1.1t/crypto/async/async_err.c b/src/openssl/openssl-1.1.1w/crypto/async/async_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/async/async_err.c rename to src/openssl/openssl-1.1.1w/crypto/async/async_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/async/async_local.h b/src/openssl/openssl-1.1.1w/crypto/async/async_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/async/async_local.h rename to src/openssl/openssl-1.1.1w/crypto/async/async_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/async/async_wait.c b/src/openssl/openssl-1.1.1w/crypto/async/async_wait.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/async/async_wait.c rename to src/openssl/openssl-1.1.1w/crypto/async/async_wait.c diff --git a/src/openssl/openssl-1.1.1t/crypto/async/build.info b/src/openssl/openssl-1.1.1w/crypto/async/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/async/build.info rename to src/openssl/openssl-1.1.1w/crypto/async/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/bf/asm/bf-586.pl b/src/openssl/openssl-1.1.1w/crypto/bf/asm/bf-586.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bf/asm/bf-586.pl rename to src/openssl/openssl-1.1.1w/crypto/bf/asm/bf-586.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bf/bf_cfb64.c b/src/openssl/openssl-1.1.1w/crypto/bf/bf_cfb64.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bf/bf_cfb64.c rename to src/openssl/openssl-1.1.1w/crypto/bf/bf_cfb64.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bf/bf_ecb.c b/src/openssl/openssl-1.1.1w/crypto/bf/bf_ecb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bf/bf_ecb.c rename to src/openssl/openssl-1.1.1w/crypto/bf/bf_ecb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bf/bf_enc.c b/src/openssl/openssl-1.1.1w/crypto/bf/bf_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bf/bf_enc.c rename to src/openssl/openssl-1.1.1w/crypto/bf/bf_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bf/bf_local.h b/src/openssl/openssl-1.1.1w/crypto/bf/bf_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bf/bf_local.h rename to src/openssl/openssl-1.1.1w/crypto/bf/bf_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/bf/bf_ofb64.c b/src/openssl/openssl-1.1.1w/crypto/bf/bf_ofb64.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bf/bf_ofb64.c rename to src/openssl/openssl-1.1.1w/crypto/bf/bf_ofb64.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bf/bf_pi.h b/src/openssl/openssl-1.1.1w/crypto/bf/bf_pi.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bf/bf_pi.h rename to src/openssl/openssl-1.1.1w/crypto/bf/bf_pi.h diff --git a/src/openssl/openssl-1.1.1t/crypto/bf/bf_skey.c b/src/openssl/openssl-1.1.1w/crypto/bf/bf_skey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bf/bf_skey.c rename to src/openssl/openssl-1.1.1w/crypto/bf/bf_skey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bf/build.info b/src/openssl/openssl-1.1.1w/crypto/bf/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bf/build.info rename to src/openssl/openssl-1.1.1w/crypto/bf/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/b_addr.c b/src/openssl/openssl-1.1.1w/crypto/bio/b_addr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/b_addr.c rename to src/openssl/openssl-1.1.1w/crypto/bio/b_addr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/b_dump.c b/src/openssl/openssl-1.1.1w/crypto/bio/b_dump.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/b_dump.c rename to src/openssl/openssl-1.1.1w/crypto/bio/b_dump.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/b_print.c b/src/openssl/openssl-1.1.1w/crypto/bio/b_print.c similarity index 99% rename from src/openssl/openssl-1.1.1t/crypto/bio/b_print.c rename to src/openssl/openssl-1.1.1w/crypto/bio/b_print.c index 45d4e9f00..c4ed364d7 100644 --- a/src/openssl/openssl-1.1.1t/crypto/bio/b_print.c +++ b/src/openssl/openssl-1.1.1w/crypto/bio/b_print.c @@ -305,7 +305,6 @@ _dopr(char **sbuffer, case 'G': case 'g': /* not implemented for UEFI */ - ERR_raise(ERR_LIB_BIO, ERR_R_UNSUPPORTED); return 0; #endif case 'c': diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/b_sock.c b/src/openssl/openssl-1.1.1w/crypto/bio/b_sock.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/b_sock.c rename to src/openssl/openssl-1.1.1w/crypto/bio/b_sock.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/b_sock2.c b/src/openssl/openssl-1.1.1w/crypto/bio/b_sock2.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/b_sock2.c rename to src/openssl/openssl-1.1.1w/crypto/bio/b_sock2.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bf_buff.c b/src/openssl/openssl-1.1.1w/crypto/bio/bf_buff.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bf_buff.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bf_buff.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bf_lbuf.c b/src/openssl/openssl-1.1.1w/crypto/bio/bf_lbuf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bf_lbuf.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bf_lbuf.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bf_nbio.c b/src/openssl/openssl-1.1.1w/crypto/bio/bf_nbio.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bf_nbio.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bf_nbio.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bf_null.c b/src/openssl/openssl-1.1.1w/crypto/bio/bf_null.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bf_null.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bf_null.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bio_cb.c b/src/openssl/openssl-1.1.1w/crypto/bio/bio_cb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bio_cb.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bio_cb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bio_err.c b/src/openssl/openssl-1.1.1w/crypto/bio/bio_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bio_err.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bio_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bio_lib.c b/src/openssl/openssl-1.1.1w/crypto/bio/bio_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bio_lib.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bio_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bio_local.h b/src/openssl/openssl-1.1.1w/crypto/bio/bio_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bio_local.h rename to src/openssl/openssl-1.1.1w/crypto/bio/bio_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bio_meth.c b/src/openssl/openssl-1.1.1w/crypto/bio/bio_meth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bio_meth.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bio_meth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bss_acpt.c b/src/openssl/openssl-1.1.1w/crypto/bio/bss_acpt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bss_acpt.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bss_acpt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bss_bio.c b/src/openssl/openssl-1.1.1w/crypto/bio/bss_bio.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bss_bio.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bss_bio.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bss_conn.c b/src/openssl/openssl-1.1.1w/crypto/bio/bss_conn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bss_conn.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bss_conn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bss_dgram.c b/src/openssl/openssl-1.1.1w/crypto/bio/bss_dgram.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bss_dgram.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bss_dgram.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bss_fd.c b/src/openssl/openssl-1.1.1w/crypto/bio/bss_fd.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bss_fd.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bss_fd.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bss_file.c b/src/openssl/openssl-1.1.1w/crypto/bio/bss_file.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bss_file.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bss_file.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bss_log.c b/src/openssl/openssl-1.1.1w/crypto/bio/bss_log.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bss_log.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bss_log.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bss_mem.c b/src/openssl/openssl-1.1.1w/crypto/bio/bss_mem.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bss_mem.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bss_mem.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bss_null.c b/src/openssl/openssl-1.1.1w/crypto/bio/bss_null.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bss_null.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bss_null.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/bss_sock.c b/src/openssl/openssl-1.1.1w/crypto/bio/bss_sock.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/bss_sock.c rename to src/openssl/openssl-1.1.1w/crypto/bio/bss_sock.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bio/build.info b/src/openssl/openssl-1.1.1w/crypto/bio/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bio/build.info rename to src/openssl/openssl-1.1.1w/crypto/bio/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/blake2/blake2_impl.h b/src/openssl/openssl-1.1.1w/crypto/blake2/blake2_impl.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/blake2/blake2_impl.h rename to src/openssl/openssl-1.1.1w/crypto/blake2/blake2_impl.h diff --git a/src/openssl/openssl-1.1.1t/crypto/blake2/blake2_local.h b/src/openssl/openssl-1.1.1w/crypto/blake2/blake2_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/blake2/blake2_local.h rename to src/openssl/openssl-1.1.1w/crypto/blake2/blake2_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/blake2/blake2b.c b/src/openssl/openssl-1.1.1w/crypto/blake2/blake2b.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/blake2/blake2b.c rename to src/openssl/openssl-1.1.1w/crypto/blake2/blake2b.c diff --git a/src/openssl/openssl-1.1.1t/crypto/blake2/blake2s.c b/src/openssl/openssl-1.1.1w/crypto/blake2/blake2s.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/blake2/blake2s.c rename to src/openssl/openssl-1.1.1w/crypto/blake2/blake2s.c diff --git a/src/openssl/openssl-1.1.1t/crypto/blake2/build.info b/src/openssl/openssl-1.1.1w/crypto/blake2/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/blake2/build.info rename to src/openssl/openssl-1.1.1w/crypto/blake2/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/blake2/m_blake2b.c b/src/openssl/openssl-1.1.1w/crypto/blake2/m_blake2b.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/blake2/m_blake2b.c rename to src/openssl/openssl-1.1.1w/crypto/blake2/m_blake2b.c diff --git a/src/openssl/openssl-1.1.1t/crypto/blake2/m_blake2s.c b/src/openssl/openssl-1.1.1w/crypto/blake2/m_blake2s.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/blake2/m_blake2s.c rename to src/openssl/openssl-1.1.1w/crypto/blake2/m_blake2s.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/README.pod b/src/openssl/openssl-1.1.1w/crypto/bn/README.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/README.pod rename to src/openssl/openssl-1.1.1w/crypto/bn/README.pod diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/alpha-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/alpha-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/alpha-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/alpha-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/armv4-gf2m.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/armv4-gf2m.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/armv4-gf2m.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/armv4-gf2m.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/armv4-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/armv4-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/armv4-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/armv4-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/armv8-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/armv8-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/armv8-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/armv8-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/bn-586.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/bn-586.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/bn-586.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/bn-586.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/bn-c64xplus.asm b/src/openssl/openssl-1.1.1w/crypto/bn/asm/bn-c64xplus.asm similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/bn-c64xplus.asm rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/bn-c64xplus.asm diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/c64xplus-gf2m.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/c64xplus-gf2m.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/c64xplus-gf2m.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/c64xplus-gf2m.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/co-586.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/co-586.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/co-586.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/co-586.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/ia64-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/ia64-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/ia64-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/ia64-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/ia64.S b/src/openssl/openssl-1.1.1w/crypto/bn/asm/ia64.S similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/ia64.S rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/ia64.S diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/mips-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/mips-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/mips-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/mips-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/mips.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/mips.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/mips.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/mips.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/parisc-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/parisc-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/parisc-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/parisc-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/ppc-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/ppc-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/ppc-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/ppc-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/ppc.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/ppc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/ppc.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/ppc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/ppc64-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/ppc64-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/ppc64-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/ppc64-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/rsaz-avx2.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/rsaz-avx2.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/rsaz-avx2.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/rsaz-avx2.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/rsaz-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/rsaz-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/rsaz-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/rsaz-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/s390x-gf2m.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/s390x-gf2m.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/s390x-gf2m.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/s390x-gf2m.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/s390x-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/s390x-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/s390x-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/s390x-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/s390x.S b/src/openssl/openssl-1.1.1w/crypto/bn/asm/s390x.S similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/s390x.S rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/s390x.S diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/sparct4-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/sparct4-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/sparct4-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/sparct4-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/sparcv8.S b/src/openssl/openssl-1.1.1w/crypto/bn/asm/sparcv8.S similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/sparcv8.S rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/sparcv8.S diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/sparcv8plus.S b/src/openssl/openssl-1.1.1w/crypto/bn/asm/sparcv8plus.S similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/sparcv8plus.S rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/sparcv8plus.S diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/sparcv9-gf2m.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/sparcv9-gf2m.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/sparcv9-gf2m.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/sparcv9-gf2m.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/sparcv9-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/sparcv9-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/sparcv9-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/sparcv9-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/sparcv9a-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/sparcv9a-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/sparcv9a-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/sparcv9a-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/via-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/via-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/via-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/via-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/vis3-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/vis3-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/vis3-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/vis3-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/x86-gf2m.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/x86-gf2m.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/x86-gf2m.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/x86-gf2m.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/x86-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/x86-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/x86-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/x86-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/x86_64-gcc.c b/src/openssl/openssl-1.1.1w/crypto/bn/asm/x86_64-gcc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/x86_64-gcc.c rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/x86_64-gcc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/x86_64-gf2m.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/x86_64-gf2m.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/x86_64-gf2m.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/x86_64-gf2m.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/x86_64-mont.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/x86_64-mont.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/x86_64-mont.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/x86_64-mont.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/asm/x86_64-mont5.pl b/src/openssl/openssl-1.1.1w/crypto/bn/asm/x86_64-mont5.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/asm/x86_64-mont5.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/asm/x86_64-mont5.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_add.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_add.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_add.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_add.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_asm.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_asm.c similarity index 91% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_asm.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_asm.c index 4d83a8cf1..e5fa81b3a 100644 --- a/src/openssl/openssl-1.1.1t/crypto/bn/bn_asm.c +++ b/src/openssl/openssl-1.1.1w/crypto/bn/bn_asm.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -381,25 +381,33 @@ BN_ULONG bn_sub_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, #ifndef OPENSSL_SMALL_FOOTPRINT while (n & ~3) { t1 = a[0]; - t2 = b[0]; - r[0] = (t1 - t2 - c) & BN_MASK2; - if (t1 != t2) - c = (t1 < t2); + t2 = (t1 - c) & BN_MASK2; + c = (t2 > t1); + t1 = b[0]; + t1 = (t2 - t1) & BN_MASK2; + r[0] = t1; + c += (t1 > t2); t1 = a[1]; - t2 = b[1]; - r[1] = (t1 - t2 - c) & BN_MASK2; - if (t1 != t2) - c = (t1 < t2); + t2 = (t1 - c) & BN_MASK2; + c = (t2 > t1); + t1 = b[1]; + t1 = (t2 - t1) & BN_MASK2; + r[1] = t1; + c += (t1 > t2); t1 = a[2]; - t2 = b[2]; - r[2] = (t1 - t2 - c) & BN_MASK2; - if (t1 != t2) - c = (t1 < t2); + t2 = (t1 - c) & BN_MASK2; + c = (t2 > t1); + t1 = b[2]; + t1 = (t2 - t1) & BN_MASK2; + r[2] = t1; + c += (t1 > t2); t1 = a[3]; - t2 = b[3]; - r[3] = (t1 - t2 - c) & BN_MASK2; - if (t1 != t2) - c = (t1 < t2); + t2 = (t1 - c) & BN_MASK2; + c = (t2 > t1); + t1 = b[3]; + t1 = (t2 - t1) & BN_MASK2; + r[3] = t1; + c += (t1 > t2); a += 4; b += 4; r += 4; @@ -408,10 +416,12 @@ BN_ULONG bn_sub_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, #endif while (n) { t1 = a[0]; - t2 = b[0]; - r[0] = (t1 - t2 - c) & BN_MASK2; - if (t1 != t2) - c = (t1 < t2); + t2 = (t1 - c) & BN_MASK2; + c = (t2 > t1); + t1 = b[0]; + t1 = (t2 - t1) & BN_MASK2; + r[0] = t1; + c += (t1 > t2); a++; b++; r++; @@ -446,7 +456,7 @@ BN_ULONG bn_sub_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, t += c0; /* no carry */ \ c0 = (BN_ULONG)Lw(t); \ hi = (BN_ULONG)Hw(t); \ - c1 = (c1+hi)&BN_MASK2; if (c1top = (int)(rtop & ~mask) | (ntop & mask); n->flags |= (BN_FLG_FIXED_TOP & ~mask); } - ret = BN_mod_mul_montgomery(n, n, r, b->m_ctx, ctx); + ret = bn_mul_mont_fixed_top(n, n, r, b->m_ctx, ctx); + bn_correct_top_consttime(n); } else { ret = BN_mod_mul(n, n, r, b->mod, ctx); } diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_const.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_const.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_const.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_const.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_ctx.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_ctx.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_ctx.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_ctx.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_depr.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_depr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_depr.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_depr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_dh.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_dh.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_dh.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_dh.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_div.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_div.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_div.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_div.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_err.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_err.c similarity index 98% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_err.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_err.c index 6f5464b54..6ea5fc3d5 100644 --- a/src/openssl/openssl-1.1.1t/crypto/bn/bn_err.c +++ b/src/openssl/openssl-1.1.1w/crypto/bn/bn_err.c @@ -73,8 +73,6 @@ static const ERR_STRING_DATA BN_str_functs[] = { {ERR_PACK(ERR_LIB_BN, BN_F_BN_SET_WORDS, 0), "bn_set_words"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_STACK_PUSH, 0), "BN_STACK_push"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_USUB, 0), "BN_usub"}, - {ERR_PACK(ERR_LIB_BN, BN_F_OSSL_BN_RSA_DO_UNBLIND, 0), - "ossl_bn_rsa_do_unblind"}, {0, NULL} }; diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_exp.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_exp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_exp.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_exp.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_exp2.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_exp2.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_exp2.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_exp2.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_gcd.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_gcd.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_gcd.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_gcd.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_gf2m.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_gf2m.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_gf2m.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_gf2m.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_intern.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_intern.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_intern.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_intern.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_kron.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_kron.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_kron.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_kron.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_lib.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_lib.c similarity index 97% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_lib.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_lib.c index eb4a31849..cd6aa3448 100644 --- a/src/openssl/openssl-1.1.1t/crypto/bn/bn_lib.c +++ b/src/openssl/openssl-1.1.1w/crypto/bn/bn_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -1001,6 +1001,28 @@ BIGNUM *bn_wexpand(BIGNUM *a, int words) return (words <= a->dmax) ? a : bn_expand2(a, words); } +void bn_correct_top_consttime(BIGNUM *a) +{ + int j, atop; + BN_ULONG limb; + unsigned int mask; + + for (j = 0, atop = 0; j < a->dmax; j++) { + limb = a->d[j]; + limb |= 0 - limb; + limb >>= BN_BITS2 - 1; + limb = 0 - limb; + mask = (unsigned int)limb; + mask &= constant_time_msb(j - a->top); + atop = constant_time_select_int(mask, j + 1, atop); + } + + mask = constant_time_eq_int(atop, 0); + a->top = atop; + a->neg = constant_time_select_int(mask, 0, a->neg); + a->flags &= ~BN_FLG_FIXED_TOP; +} + void bn_correct_top(BIGNUM *a) { BN_ULONG *ftl; diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_local.h b/src/openssl/openssl-1.1.1w/crypto/bn/bn_local.h similarity index 96% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_local.h rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_local.h index 30b7614fd..818e34348 100644 --- a/src/openssl/openssl-1.1.1t/crypto/bn/bn_local.h +++ b/src/openssl/openssl-1.1.1w/crypto/bn/bn_local.h @@ -283,20 +283,6 @@ struct bn_gencb_st { } cb; }; -struct bn_blinding_st { - BIGNUM *A; - BIGNUM *Ai; - BIGNUM *e; - BIGNUM *mod; /* just a reference */ - CRYPTO_THREAD_ID tid; - int counter; - unsigned long flags; - BN_MONT_CTX *m_ctx; - int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, - const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); - CRYPTO_RWLOCK *lock; -}; - /*- * BN_window_bits_for_exponent_size -- macro for sliding window mod_exp functions * @@ -529,10 +515,10 @@ unsigned __int64 _umul128(unsigned __int64 a, unsigned __int64 b, ret = (r); \ BN_UMULT_LOHI(low,high,w,tmp); \ ret += (c); \ - (c) = (ret<(c))?1:0; \ + (c) = (ret<(c)); \ (c) += high; \ ret += low; \ - (c) += (ret>(BN_BITS4-1); \ m =(m&BN_MASK2l)<<(BN_BITS4+1); \ - l=(l+m)&BN_MASK2; if (l < m) h++; \ + l=(l+m)&BN_MASK2; h += (l < m); \ (lo)=l; \ (ho)=h; \ } @@ -637,9 +623,9 @@ unsigned __int64 _umul128(unsigned __int64 a, unsigned __int64 b, mul64(l,h,(bl),(bh)); \ \ /* non-multiply part */ \ - l=(l+(c))&BN_MASK2; if (l < (c)) h++; \ + l=(l+(c))&BN_MASK2; h += (l < (c)); \ (c)=(r); \ - l=(l+(c))&BN_MASK2; if (l < (c)) h++; \ + l=(l+(c))&BN_MASK2; h += (l < (c)); \ (c)=h&BN_MASK2; \ (r)=l; \ } @@ -653,7 +639,7 @@ unsigned __int64 _umul128(unsigned __int64 a, unsigned __int64 b, mul64(l,h,(bl),(bh)); \ \ /* non-multiply part */ \ - l+=(c); if ((l&BN_MASK2) < (c)) h++; \ + l+=(c); h += ((l&BN_MASK2) < (c)); \ (c)=h&BN_MASK2; \ (r)=l&BN_MASK2; \ } @@ -683,7 +669,7 @@ BN_ULONG bn_sub_part_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, int cl, int dl); int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_ULONG *np, const BN_ULONG *n0, int num); - +void bn_correct_top_consttime(BIGNUM *a); BIGNUM *int_bn_mod_inverse(BIGNUM *in, const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx, int *noinv); diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_mod.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_mod.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_mod.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_mod.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_mont.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_mont.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_mont.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_mont.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_mpi.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_mpi.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_mpi.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_mpi.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_mul.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_mul.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_mul.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_mul.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_nist.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_nist.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_nist.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_nist.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_prime.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_prime.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_prime.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_prime.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_prime.h b/src/openssl/openssl-1.1.1w/crypto/bn/bn_prime.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_prime.h rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_prime.h diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_prime.pl b/src/openssl/openssl-1.1.1w/crypto/bn/bn_prime.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_prime.pl rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_prime.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_print.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_print.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_print.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_print.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_rand.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_rand.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_rand.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_rand.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_recp.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_recp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_recp.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_recp.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_shift.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_shift.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_shift.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_shift.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_sqr.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_sqr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_sqr.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_sqr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_sqrt.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_sqrt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_sqrt.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_sqrt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_srp.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_srp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_srp.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_srp.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_word.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_word.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_word.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_word.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/bn_x931p.c b/src/openssl/openssl-1.1.1w/crypto/bn/bn_x931p.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/bn_x931p.c rename to src/openssl/openssl-1.1.1w/crypto/bn/bn_x931p.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/build.info b/src/openssl/openssl-1.1.1w/crypto/bn/build.info similarity index 98% rename from src/openssl/openssl-1.1.1t/crypto/bn/build.info rename to src/openssl/openssl-1.1.1w/crypto/bn/build.info index c9fe2fdad..b9ed5322f 100644 --- a/src/openssl/openssl-1.1.1t/crypto/bn/build.info +++ b/src/openssl/openssl-1.1.1w/crypto/bn/build.info @@ -5,8 +5,7 @@ SOURCE[../../libcrypto]=\ bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c \ {- $target{bn_asm_src} -} \ bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \ - bn_depr.c bn_const.c bn_x931p.c bn_intern.c bn_dh.c bn_srp.c \ - rsa_sup_mul.c + bn_depr.c bn_const.c bn_x931p.c bn_intern.c bn_dh.c bn_srp.c INCLUDE[bn_exp.o]=.. diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/rsaz_exp.c b/src/openssl/openssl-1.1.1w/crypto/bn/rsaz_exp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/rsaz_exp.c rename to src/openssl/openssl-1.1.1w/crypto/bn/rsaz_exp.c diff --git a/src/openssl/openssl-1.1.1t/crypto/bn/rsaz_exp.h b/src/openssl/openssl-1.1.1w/crypto/bn/rsaz_exp.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/bn/rsaz_exp.h rename to src/openssl/openssl-1.1.1w/crypto/bn/rsaz_exp.h diff --git a/src/openssl/openssl-1.1.1t/crypto/buffer/buf_err.c b/src/openssl/openssl-1.1.1w/crypto/buffer/buf_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/buffer/buf_err.c rename to src/openssl/openssl-1.1.1w/crypto/buffer/buf_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/buffer/buffer.c b/src/openssl/openssl-1.1.1w/crypto/buffer/buffer.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/buffer/buffer.c rename to src/openssl/openssl-1.1.1w/crypto/buffer/buffer.c diff --git a/src/openssl/openssl-1.1.1t/crypto/buffer/build.info b/src/openssl/openssl-1.1.1w/crypto/buffer/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/buffer/build.info rename to src/openssl/openssl-1.1.1w/crypto/buffer/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/build.info b/src/openssl/openssl-1.1.1w/crypto/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/build.info rename to src/openssl/openssl-1.1.1w/crypto/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/c64xpluscpuid.pl b/src/openssl/openssl-1.1.1w/crypto/c64xpluscpuid.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/c64xpluscpuid.pl rename to src/openssl/openssl-1.1.1w/crypto/c64xpluscpuid.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/camellia/asm/cmll-x86.pl b/src/openssl/openssl-1.1.1w/crypto/camellia/asm/cmll-x86.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/camellia/asm/cmll-x86.pl rename to src/openssl/openssl-1.1.1w/crypto/camellia/asm/cmll-x86.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/camellia/asm/cmll-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/camellia/asm/cmll-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/camellia/asm/cmll-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/camellia/asm/cmll-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/camellia/asm/cmllt4-sparcv9.pl b/src/openssl/openssl-1.1.1w/crypto/camellia/asm/cmllt4-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/camellia/asm/cmllt4-sparcv9.pl rename to src/openssl/openssl-1.1.1w/crypto/camellia/asm/cmllt4-sparcv9.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/camellia/build.info b/src/openssl/openssl-1.1.1w/crypto/camellia/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/camellia/build.info rename to src/openssl/openssl-1.1.1w/crypto/camellia/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/camellia/camellia.c b/src/openssl/openssl-1.1.1w/crypto/camellia/camellia.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/camellia/camellia.c rename to src/openssl/openssl-1.1.1w/crypto/camellia/camellia.c diff --git a/src/openssl/openssl-1.1.1t/crypto/camellia/cmll_cbc.c b/src/openssl/openssl-1.1.1w/crypto/camellia/cmll_cbc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/camellia/cmll_cbc.c rename to src/openssl/openssl-1.1.1w/crypto/camellia/cmll_cbc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/camellia/cmll_cfb.c b/src/openssl/openssl-1.1.1w/crypto/camellia/cmll_cfb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/camellia/cmll_cfb.c rename to src/openssl/openssl-1.1.1w/crypto/camellia/cmll_cfb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/camellia/cmll_ctr.c b/src/openssl/openssl-1.1.1w/crypto/camellia/cmll_ctr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/camellia/cmll_ctr.c rename to src/openssl/openssl-1.1.1w/crypto/camellia/cmll_ctr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/camellia/cmll_ecb.c b/src/openssl/openssl-1.1.1w/crypto/camellia/cmll_ecb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/camellia/cmll_ecb.c rename to src/openssl/openssl-1.1.1w/crypto/camellia/cmll_ecb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/camellia/cmll_local.h b/src/openssl/openssl-1.1.1w/crypto/camellia/cmll_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/camellia/cmll_local.h rename to src/openssl/openssl-1.1.1w/crypto/camellia/cmll_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/camellia/cmll_misc.c b/src/openssl/openssl-1.1.1w/crypto/camellia/cmll_misc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/camellia/cmll_misc.c rename to src/openssl/openssl-1.1.1w/crypto/camellia/cmll_misc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/camellia/cmll_ofb.c b/src/openssl/openssl-1.1.1w/crypto/camellia/cmll_ofb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/camellia/cmll_ofb.c rename to src/openssl/openssl-1.1.1w/crypto/camellia/cmll_ofb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cast/asm/cast-586.pl b/src/openssl/openssl-1.1.1w/crypto/cast/asm/cast-586.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cast/asm/cast-586.pl rename to src/openssl/openssl-1.1.1w/crypto/cast/asm/cast-586.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/cast/build.info b/src/openssl/openssl-1.1.1w/crypto/cast/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cast/build.info rename to src/openssl/openssl-1.1.1w/crypto/cast/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/cast/c_cfb64.c b/src/openssl/openssl-1.1.1w/crypto/cast/c_cfb64.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cast/c_cfb64.c rename to src/openssl/openssl-1.1.1w/crypto/cast/c_cfb64.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cast/c_ecb.c b/src/openssl/openssl-1.1.1w/crypto/cast/c_ecb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cast/c_ecb.c rename to src/openssl/openssl-1.1.1w/crypto/cast/c_ecb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cast/c_enc.c b/src/openssl/openssl-1.1.1w/crypto/cast/c_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cast/c_enc.c rename to src/openssl/openssl-1.1.1w/crypto/cast/c_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cast/c_ofb64.c b/src/openssl/openssl-1.1.1w/crypto/cast/c_ofb64.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cast/c_ofb64.c rename to src/openssl/openssl-1.1.1w/crypto/cast/c_ofb64.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cast/c_skey.c b/src/openssl/openssl-1.1.1w/crypto/cast/c_skey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cast/c_skey.c rename to src/openssl/openssl-1.1.1w/crypto/cast/c_skey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cast/cast_local.h b/src/openssl/openssl-1.1.1w/crypto/cast/cast_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cast/cast_local.h rename to src/openssl/openssl-1.1.1w/crypto/cast/cast_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/cast/cast_s.h b/src/openssl/openssl-1.1.1w/crypto/cast/cast_s.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cast/cast_s.h rename to src/openssl/openssl-1.1.1w/crypto/cast/cast_s.h diff --git a/src/openssl/openssl-1.1.1t/crypto/chacha/asm/chacha-armv4.pl b/src/openssl/openssl-1.1.1w/crypto/chacha/asm/chacha-armv4.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/chacha/asm/chacha-armv4.pl rename to src/openssl/openssl-1.1.1w/crypto/chacha/asm/chacha-armv4.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/chacha/asm/chacha-armv8.pl b/src/openssl/openssl-1.1.1w/crypto/chacha/asm/chacha-armv8.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/chacha/asm/chacha-armv8.pl rename to src/openssl/openssl-1.1.1w/crypto/chacha/asm/chacha-armv8.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/chacha/asm/chacha-c64xplus.pl b/src/openssl/openssl-1.1.1w/crypto/chacha/asm/chacha-c64xplus.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/chacha/asm/chacha-c64xplus.pl rename to src/openssl/openssl-1.1.1w/crypto/chacha/asm/chacha-c64xplus.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/chacha/asm/chacha-ppc.pl b/src/openssl/openssl-1.1.1w/crypto/chacha/asm/chacha-ppc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/chacha/asm/chacha-ppc.pl rename to src/openssl/openssl-1.1.1w/crypto/chacha/asm/chacha-ppc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/chacha/asm/chacha-s390x.pl b/src/openssl/openssl-1.1.1w/crypto/chacha/asm/chacha-s390x.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/chacha/asm/chacha-s390x.pl rename to src/openssl/openssl-1.1.1w/crypto/chacha/asm/chacha-s390x.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/chacha/asm/chacha-x86.pl b/src/openssl/openssl-1.1.1w/crypto/chacha/asm/chacha-x86.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/chacha/asm/chacha-x86.pl rename to src/openssl/openssl-1.1.1w/crypto/chacha/asm/chacha-x86.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/chacha/asm/chacha-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/chacha/asm/chacha-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/chacha/asm/chacha-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/chacha/asm/chacha-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/chacha/build.info b/src/openssl/openssl-1.1.1w/crypto/chacha/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/chacha/build.info rename to src/openssl/openssl-1.1.1w/crypto/chacha/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/chacha/chacha_enc.c b/src/openssl/openssl-1.1.1w/crypto/chacha/chacha_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/chacha/chacha_enc.c rename to src/openssl/openssl-1.1.1w/crypto/chacha/chacha_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cmac/build.info b/src/openssl/openssl-1.1.1w/crypto/cmac/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cmac/build.info rename to src/openssl/openssl-1.1.1w/crypto/cmac/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/cmac/cm_ameth.c b/src/openssl/openssl-1.1.1w/crypto/cmac/cm_ameth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cmac/cm_ameth.c rename to src/openssl/openssl-1.1.1w/crypto/cmac/cm_ameth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cmac/cm_pmeth.c b/src/openssl/openssl-1.1.1w/crypto/cmac/cm_pmeth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cmac/cm_pmeth.c rename to src/openssl/openssl-1.1.1w/crypto/cmac/cm_pmeth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cmac/cmac.c b/src/openssl/openssl-1.1.1w/crypto/cmac/cmac.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cmac/cmac.c rename to src/openssl/openssl-1.1.1w/crypto/cmac/cmac.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/build.info b/src/openssl/openssl-1.1.1w/crypto/cms/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cms/build.info rename to src/openssl/openssl-1.1.1w/crypto/cms/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_asn1.c b/src/openssl/openssl-1.1.1w/crypto/cms/cms_asn1.c similarity index 97% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_asn1.c rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_asn1.c index 08069d72a..a62e11ecb 100644 --- a/src/openssl/openssl-1.1.1t/crypto/cms/cms_asn1.c +++ b/src/openssl/openssl-1.1.1w/crypto/cms/cms_asn1.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -51,6 +51,7 @@ static int cms_si_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, EVP_PKEY_free(si->pkey); X509_free(si->signer); EVP_MD_CTX_free(si->mctx); + EVP_PKEY_CTX_free(si->pctx); } return 1; } @@ -89,11 +90,21 @@ ASN1_SEQUENCE(CMS_OriginatorInfo) = { ASN1_IMP_SET_OF_OPT(CMS_OriginatorInfo, crls, CMS_RevocationInfoChoice, 1) } static_ASN1_SEQUENCE_END(CMS_OriginatorInfo) -ASN1_NDEF_SEQUENCE(CMS_EncryptedContentInfo) = { +static int cms_ec_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, + void *exarg) +{ + CMS_EncryptedContentInfo *ec = (CMS_EncryptedContentInfo *)*pval; + + if (operation == ASN1_OP_FREE_POST) + OPENSSL_clear_free(ec->key, ec->keylen); + return 1; +} + +ASN1_NDEF_SEQUENCE_cb(CMS_EncryptedContentInfo, cms_ec_cb) = { ASN1_SIMPLE(CMS_EncryptedContentInfo, contentType, ASN1_OBJECT), ASN1_SIMPLE(CMS_EncryptedContentInfo, contentEncryptionAlgorithm, X509_ALGOR), ASN1_IMP_OPT(CMS_EncryptedContentInfo, encryptedContent, ASN1_OCTET_STRING_NDEF, 0) -} static_ASN1_NDEF_SEQUENCE_END(CMS_EncryptedContentInfo) +} ASN1_NDEF_SEQUENCE_END_cb(CMS_EncryptedContentInfo, CMS_EncryptedContentInfo) ASN1_SEQUENCE(CMS_KeyTransRecipientInfo) = { ASN1_EMBED(CMS_KeyTransRecipientInfo, version, INT32), diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_att.c b/src/openssl/openssl-1.1.1w/crypto/cms/cms_att.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_att.c rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_att.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_cd.c b/src/openssl/openssl-1.1.1w/crypto/cms/cms_cd.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_cd.c rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_cd.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_dd.c b/src/openssl/openssl-1.1.1w/crypto/cms/cms_dd.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_dd.c rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_dd.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_enc.c b/src/openssl/openssl-1.1.1w/crypto/cms/cms_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_enc.c rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_env.c b/src/openssl/openssl-1.1.1w/crypto/cms/cms_env.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_env.c rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_env.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_err.c b/src/openssl/openssl-1.1.1w/crypto/cms/cms_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_err.c rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_ess.c b/src/openssl/openssl-1.1.1w/crypto/cms/cms_ess.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_ess.c rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_ess.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_io.c b/src/openssl/openssl-1.1.1w/crypto/cms/cms_io.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_io.c rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_io.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_kari.c b/src/openssl/openssl-1.1.1w/crypto/cms/cms_kari.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_kari.c rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_kari.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_lib.c b/src/openssl/openssl-1.1.1w/crypto/cms/cms_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_lib.c rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_local.h b/src/openssl/openssl-1.1.1w/crypto/cms/cms_local.h similarity index 99% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_local.h rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_local.h index a0ce4448f..09c0bdfe5 100644 --- a/src/openssl/openssl-1.1.1t/crypto/cms/cms_local.h +++ b/src/openssl/openssl-1.1.1w/crypto/cms/cms_local.h @@ -1,5 +1,5 @@ /* - * Copyright 2008-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -342,6 +342,7 @@ struct CMS_Receipt_st { DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo) DECLARE_ASN1_ITEM(CMS_SignerInfo) +DECLARE_ASN1_ITEM(CMS_EncryptedContentInfo) DECLARE_ASN1_ITEM(CMS_IssuerAndSerialNumber) DECLARE_ASN1_ITEM(CMS_Attributes_Sign) DECLARE_ASN1_ITEM(CMS_Attributes_Verify) diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_pwri.c b/src/openssl/openssl-1.1.1w/crypto/cms/cms_pwri.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_pwri.c rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_pwri.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_sd.c b/src/openssl/openssl-1.1.1w/crypto/cms/cms_sd.c similarity index 98% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_sd.c rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_sd.c index 3f2a78256..9f67f9129 100644 --- a/src/openssl/openssl-1.1.1t/crypto/cms/cms_sd.c +++ b/src/openssl/openssl-1.1.1w/crypto/cms/cms_sd.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -375,6 +375,8 @@ CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, } else if (EVP_DigestSignInit(si->mctx, &si->pctx, md, NULL, pk) <= 0) goto err; + else + EVP_MD_CTX_set_flags(si->mctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX); } if (!sd->signerInfos) @@ -600,6 +602,7 @@ static int cms_SignerInfo_content_sign(CMS_ContentInfo *cms, unsigned char md[EVP_MAX_MD_SIZE]; unsigned int mdlen; pctx = si->pctx; + si->pctx = NULL; if (!EVP_DigestFinal_ex(mctx, md, &mdlen)) goto err; siglen = EVP_PKEY_size(si->pkey); @@ -680,6 +683,7 @@ int CMS_SignerInfo_sign(CMS_SignerInfo *si) EVP_MD_CTX_reset(mctx); if (EVP_DigestSignInit(mctx, &pctx, md, NULL, si->pkey) <= 0) goto err; + EVP_MD_CTX_set_flags(mctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX); si->pctx = pctx; } @@ -745,8 +749,13 @@ int CMS_SignerInfo_verify(CMS_SignerInfo *si) return -1; } mctx = si->mctx; + if (si->pctx != NULL) { + EVP_PKEY_CTX_free(si->pctx); + si->pctx = NULL; + } if (EVP_DigestVerifyInit(mctx, &si->pctx, md, NULL, si->pkey) <= 0) goto err; + EVP_MD_CTX_set_flags(mctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX); if (!cms_sd_asn1_ctrl(si, 1)) goto err; @@ -859,8 +868,11 @@ int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain) if (EVP_PKEY_CTX_set_signature_md(pkctx, md) <= 0) goto err; si->pctx = pkctx; - if (!cms_sd_asn1_ctrl(si, 1)) + if (!cms_sd_asn1_ctrl(si, 1)) { + si->pctx = NULL; goto err; + } + si->pctx = NULL; r = EVP_PKEY_verify(pkctx, si->signature->data, si->signature->length, mval, mlen); if (r <= 0) { diff --git a/src/openssl/openssl-1.1.1t/crypto/cms/cms_smime.c b/src/openssl/openssl-1.1.1w/crypto/cms/cms_smime.c similarity index 99% rename from src/openssl/openssl-1.1.1t/crypto/cms/cms_smime.c rename to src/openssl/openssl-1.1.1w/crypto/cms/cms_smime.c index 6e7dbc4da..f6c1c7d17 100644 --- a/src/openssl/openssl-1.1.1t/crypto/cms/cms_smime.c +++ b/src/openssl/openssl-1.1.1w/crypto/cms/cms_smime.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -211,7 +211,7 @@ CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher, if (cms == NULL) return NULL; if (!CMS_EncryptedData_set1_key(cms, cipher, key, keylen)) - return NULL; + goto err; if (!(flags & CMS_DETACHED)) CMS_set_detached(cms, 0); @@ -220,6 +220,7 @@ CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher, || CMS_final(cms, in, NULL, flags)) return cms; + err: CMS_ContentInfo_free(cms); return NULL; } diff --git a/src/openssl/openssl-1.1.1t/crypto/comp/build.info b/src/openssl/openssl-1.1.1w/crypto/comp/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/comp/build.info rename to src/openssl/openssl-1.1.1w/crypto/comp/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/comp/c_zlib.c b/src/openssl/openssl-1.1.1w/crypto/comp/c_zlib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/comp/c_zlib.c rename to src/openssl/openssl-1.1.1w/crypto/comp/c_zlib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/comp/comp_err.c b/src/openssl/openssl-1.1.1w/crypto/comp/comp_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/comp/comp_err.c rename to src/openssl/openssl-1.1.1w/crypto/comp/comp_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/comp/comp_lib.c b/src/openssl/openssl-1.1.1w/crypto/comp/comp_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/comp/comp_lib.c rename to src/openssl/openssl-1.1.1w/crypto/comp/comp_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/comp/comp_local.h b/src/openssl/openssl-1.1.1w/crypto/comp/comp_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/comp/comp_local.h rename to src/openssl/openssl-1.1.1w/crypto/comp/comp_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/conf/build.info b/src/openssl/openssl-1.1.1w/crypto/conf/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/conf/build.info rename to src/openssl/openssl-1.1.1w/crypto/conf/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/conf/conf_api.c b/src/openssl/openssl-1.1.1w/crypto/conf/conf_api.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/conf/conf_api.c rename to src/openssl/openssl-1.1.1w/crypto/conf/conf_api.c diff --git a/src/openssl/openssl-1.1.1t/crypto/conf/conf_def.c b/src/openssl/openssl-1.1.1w/crypto/conf/conf_def.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/conf/conf_def.c rename to src/openssl/openssl-1.1.1w/crypto/conf/conf_def.c diff --git a/src/openssl/openssl-1.1.1t/crypto/conf/conf_def.h b/src/openssl/openssl-1.1.1w/crypto/conf/conf_def.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/conf/conf_def.h rename to src/openssl/openssl-1.1.1w/crypto/conf/conf_def.h diff --git a/src/openssl/openssl-1.1.1t/crypto/conf/conf_err.c b/src/openssl/openssl-1.1.1w/crypto/conf/conf_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/conf/conf_err.c rename to src/openssl/openssl-1.1.1w/crypto/conf/conf_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/conf/conf_lib.c b/src/openssl/openssl-1.1.1w/crypto/conf/conf_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/conf/conf_lib.c rename to src/openssl/openssl-1.1.1w/crypto/conf/conf_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/conf/conf_local.h b/src/openssl/openssl-1.1.1w/crypto/conf/conf_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/conf/conf_local.h rename to src/openssl/openssl-1.1.1w/crypto/conf/conf_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/conf/conf_mall.c b/src/openssl/openssl-1.1.1w/crypto/conf/conf_mall.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/conf/conf_mall.c rename to src/openssl/openssl-1.1.1w/crypto/conf/conf_mall.c diff --git a/src/openssl/openssl-1.1.1t/crypto/conf/conf_mod.c b/src/openssl/openssl-1.1.1w/crypto/conf/conf_mod.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/conf/conf_mod.c rename to src/openssl/openssl-1.1.1w/crypto/conf/conf_mod.c diff --git a/src/openssl/openssl-1.1.1t/crypto/conf/conf_sap.c b/src/openssl/openssl-1.1.1w/crypto/conf/conf_sap.c similarity index 90% rename from src/openssl/openssl-1.1.1t/crypto/conf/conf_sap.c rename to src/openssl/openssl-1.1.1w/crypto/conf/conf_sap.c index 82105de74..db4f94ed9 100644 --- a/src/openssl/openssl-1.1.1t/crypto/conf/conf_sap.c +++ b/src/openssl/openssl-1.1.1w/crypto/conf/conf_sap.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -43,16 +43,19 @@ void OPENSSL_config(const char *appname) int openssl_config_int(const OPENSSL_INIT_SETTINGS *settings) { int ret = 0; +#if defined(OPENSSL_INIT_DEBUG) || !defined(OPENSSL_SYS_UEFI) const char *filename; const char *appname; unsigned long flags; +#endif if (openssl_configured) return 1; - +#if defined(OPENSSL_INIT_DEBUG) || !defined(OPENSSL_SYS_UEFI) filename = settings ? settings->filename : NULL; appname = settings ? settings->appname : NULL; flags = settings ? settings->flags : DEFAULT_CONF_MFLAGS; +#endif #ifdef OPENSSL_INIT_DEBUG fprintf(stderr, "OPENSSL_INIT: openssl_config_int(%s, %s, %lu)\n", diff --git a/src/openssl/openssl-1.1.1t/crypto/conf/conf_ssl.c b/src/openssl/openssl-1.1.1w/crypto/conf/conf_ssl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/conf/conf_ssl.c rename to src/openssl/openssl-1.1.1w/crypto/conf/conf_ssl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/conf/keysets.pl b/src/openssl/openssl-1.1.1w/crypto/conf/keysets.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/conf/keysets.pl rename to src/openssl/openssl-1.1.1w/crypto/conf/keysets.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/cpt_err.c b/src/openssl/openssl-1.1.1w/crypto/cpt_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cpt_err.c rename to src/openssl/openssl-1.1.1w/crypto/cpt_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cryptlib.c b/src/openssl/openssl-1.1.1w/crypto/cryptlib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cryptlib.c rename to src/openssl/openssl-1.1.1w/crypto/cryptlib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ct/build.info b/src/openssl/openssl-1.1.1w/crypto/ct/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ct/build.info rename to src/openssl/openssl-1.1.1w/crypto/ct/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/ct/ct_b64.c b/src/openssl/openssl-1.1.1w/crypto/ct/ct_b64.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ct/ct_b64.c rename to src/openssl/openssl-1.1.1w/crypto/ct/ct_b64.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ct/ct_err.c b/src/openssl/openssl-1.1.1w/crypto/ct/ct_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ct/ct_err.c rename to src/openssl/openssl-1.1.1w/crypto/ct/ct_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ct/ct_local.h b/src/openssl/openssl-1.1.1w/crypto/ct/ct_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ct/ct_local.h rename to src/openssl/openssl-1.1.1w/crypto/ct/ct_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ct/ct_log.c b/src/openssl/openssl-1.1.1w/crypto/ct/ct_log.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ct/ct_log.c rename to src/openssl/openssl-1.1.1w/crypto/ct/ct_log.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ct/ct_oct.c b/src/openssl/openssl-1.1.1w/crypto/ct/ct_oct.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ct/ct_oct.c rename to src/openssl/openssl-1.1.1w/crypto/ct/ct_oct.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ct/ct_policy.c b/src/openssl/openssl-1.1.1w/crypto/ct/ct_policy.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ct/ct_policy.c rename to src/openssl/openssl-1.1.1w/crypto/ct/ct_policy.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ct/ct_prn.c b/src/openssl/openssl-1.1.1w/crypto/ct/ct_prn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ct/ct_prn.c rename to src/openssl/openssl-1.1.1w/crypto/ct/ct_prn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ct/ct_sct.c b/src/openssl/openssl-1.1.1w/crypto/ct/ct_sct.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ct/ct_sct.c rename to src/openssl/openssl-1.1.1w/crypto/ct/ct_sct.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ct/ct_sct_ctx.c b/src/openssl/openssl-1.1.1w/crypto/ct/ct_sct_ctx.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ct/ct_sct_ctx.c rename to src/openssl/openssl-1.1.1w/crypto/ct/ct_sct_ctx.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ct/ct_vfy.c b/src/openssl/openssl-1.1.1w/crypto/ct/ct_vfy.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ct/ct_vfy.c rename to src/openssl/openssl-1.1.1w/crypto/ct/ct_vfy.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ct/ct_x509v3.c b/src/openssl/openssl-1.1.1w/crypto/ct/ct_x509v3.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ct/ct_x509v3.c rename to src/openssl/openssl-1.1.1w/crypto/ct/ct_x509v3.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ctype.c b/src/openssl/openssl-1.1.1w/crypto/ctype.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ctype.c rename to src/openssl/openssl-1.1.1w/crypto/ctype.c diff --git a/src/openssl/openssl-1.1.1t/crypto/cversion.c b/src/openssl/openssl-1.1.1w/crypto/cversion.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/cversion.c rename to src/openssl/openssl-1.1.1w/crypto/cversion.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/asm/crypt586.pl b/src/openssl/openssl-1.1.1w/crypto/des/asm/crypt586.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/asm/crypt586.pl rename to src/openssl/openssl-1.1.1w/crypto/des/asm/crypt586.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/des/asm/des-586.pl b/src/openssl/openssl-1.1.1w/crypto/des/asm/des-586.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/asm/des-586.pl rename to src/openssl/openssl-1.1.1w/crypto/des/asm/des-586.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/des/asm/des_enc.m4 b/src/openssl/openssl-1.1.1w/crypto/des/asm/des_enc.m4 similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/asm/des_enc.m4 rename to src/openssl/openssl-1.1.1w/crypto/des/asm/des_enc.m4 diff --git a/src/openssl/openssl-1.1.1t/crypto/des/asm/desboth.pl b/src/openssl/openssl-1.1.1w/crypto/des/asm/desboth.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/asm/desboth.pl rename to src/openssl/openssl-1.1.1w/crypto/des/asm/desboth.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/des/asm/dest4-sparcv9.pl b/src/openssl/openssl-1.1.1w/crypto/des/asm/dest4-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/asm/dest4-sparcv9.pl rename to src/openssl/openssl-1.1.1w/crypto/des/asm/dest4-sparcv9.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/des/build.info b/src/openssl/openssl-1.1.1w/crypto/des/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/build.info rename to src/openssl/openssl-1.1.1w/crypto/des/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/des/cbc_cksm.c b/src/openssl/openssl-1.1.1w/crypto/des/cbc_cksm.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/cbc_cksm.c rename to src/openssl/openssl-1.1.1w/crypto/des/cbc_cksm.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/cbc_enc.c b/src/openssl/openssl-1.1.1w/crypto/des/cbc_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/cbc_enc.c rename to src/openssl/openssl-1.1.1w/crypto/des/cbc_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/cfb64ede.c b/src/openssl/openssl-1.1.1w/crypto/des/cfb64ede.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/cfb64ede.c rename to src/openssl/openssl-1.1.1w/crypto/des/cfb64ede.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/cfb64enc.c b/src/openssl/openssl-1.1.1w/crypto/des/cfb64enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/cfb64enc.c rename to src/openssl/openssl-1.1.1w/crypto/des/cfb64enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/cfb_enc.c b/src/openssl/openssl-1.1.1w/crypto/des/cfb_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/cfb_enc.c rename to src/openssl/openssl-1.1.1w/crypto/des/cfb_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/des_enc.c b/src/openssl/openssl-1.1.1w/crypto/des/des_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/des_enc.c rename to src/openssl/openssl-1.1.1w/crypto/des/des_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/des_local.h b/src/openssl/openssl-1.1.1w/crypto/des/des_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/des_local.h rename to src/openssl/openssl-1.1.1w/crypto/des/des_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/des/ecb3_enc.c b/src/openssl/openssl-1.1.1w/crypto/des/ecb3_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/ecb3_enc.c rename to src/openssl/openssl-1.1.1w/crypto/des/ecb3_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/ecb_enc.c b/src/openssl/openssl-1.1.1w/crypto/des/ecb_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/ecb_enc.c rename to src/openssl/openssl-1.1.1w/crypto/des/ecb_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/fcrypt.c b/src/openssl/openssl-1.1.1w/crypto/des/fcrypt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/fcrypt.c rename to src/openssl/openssl-1.1.1w/crypto/des/fcrypt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/fcrypt_b.c b/src/openssl/openssl-1.1.1w/crypto/des/fcrypt_b.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/fcrypt_b.c rename to src/openssl/openssl-1.1.1w/crypto/des/fcrypt_b.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/ncbc_enc.c b/src/openssl/openssl-1.1.1w/crypto/des/ncbc_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/ncbc_enc.c rename to src/openssl/openssl-1.1.1w/crypto/des/ncbc_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/ofb64ede.c b/src/openssl/openssl-1.1.1w/crypto/des/ofb64ede.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/ofb64ede.c rename to src/openssl/openssl-1.1.1w/crypto/des/ofb64ede.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/ofb64enc.c b/src/openssl/openssl-1.1.1w/crypto/des/ofb64enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/ofb64enc.c rename to src/openssl/openssl-1.1.1w/crypto/des/ofb64enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/ofb_enc.c b/src/openssl/openssl-1.1.1w/crypto/des/ofb_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/ofb_enc.c rename to src/openssl/openssl-1.1.1w/crypto/des/ofb_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/pcbc_enc.c b/src/openssl/openssl-1.1.1w/crypto/des/pcbc_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/pcbc_enc.c rename to src/openssl/openssl-1.1.1w/crypto/des/pcbc_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/qud_cksm.c b/src/openssl/openssl-1.1.1w/crypto/des/qud_cksm.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/qud_cksm.c rename to src/openssl/openssl-1.1.1w/crypto/des/qud_cksm.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/rand_key.c b/src/openssl/openssl-1.1.1w/crypto/des/rand_key.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/rand_key.c rename to src/openssl/openssl-1.1.1w/crypto/des/rand_key.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/set_key.c b/src/openssl/openssl-1.1.1w/crypto/des/set_key.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/set_key.c rename to src/openssl/openssl-1.1.1w/crypto/des/set_key.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/spr.h b/src/openssl/openssl-1.1.1w/crypto/des/spr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/spr.h rename to src/openssl/openssl-1.1.1w/crypto/des/spr.h diff --git a/src/openssl/openssl-1.1.1t/crypto/des/str2key.c b/src/openssl/openssl-1.1.1w/crypto/des/str2key.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/str2key.c rename to src/openssl/openssl-1.1.1w/crypto/des/str2key.c diff --git a/src/openssl/openssl-1.1.1t/crypto/des/xcbc_enc.c b/src/openssl/openssl-1.1.1w/crypto/des/xcbc_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/des/xcbc_enc.c rename to src/openssl/openssl-1.1.1w/crypto/des/xcbc_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/build.info b/src/openssl/openssl-1.1.1w/crypto/dh/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/build.info rename to src/openssl/openssl-1.1.1w/crypto/dh/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh1024.pem b/src/openssl/openssl-1.1.1w/crypto/dh/dh1024.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh1024.pem rename to src/openssl/openssl-1.1.1w/crypto/dh/dh1024.pem diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh192.pem b/src/openssl/openssl-1.1.1w/crypto/dh/dh192.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh192.pem rename to src/openssl/openssl-1.1.1w/crypto/dh/dh192.pem diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh2048.pem b/src/openssl/openssl-1.1.1w/crypto/dh/dh2048.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh2048.pem rename to src/openssl/openssl-1.1.1w/crypto/dh/dh2048.pem diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh4096.pem b/src/openssl/openssl-1.1.1w/crypto/dh/dh4096.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh4096.pem rename to src/openssl/openssl-1.1.1w/crypto/dh/dh4096.pem diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh512.pem b/src/openssl/openssl-1.1.1w/crypto/dh/dh512.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh512.pem rename to src/openssl/openssl-1.1.1w/crypto/dh/dh512.pem diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_ameth.c b/src/openssl/openssl-1.1.1w/crypto/dh/dh_ameth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_ameth.c rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_ameth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_asn1.c b/src/openssl/openssl-1.1.1w/crypto/dh/dh_asn1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_asn1.c rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_asn1.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_check.c b/src/openssl/openssl-1.1.1w/crypto/dh/dh_check.c similarity index 91% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_check.c rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_check.c index 4ac169e75..ae1b03bc9 100644 --- a/src/openssl/openssl-1.1.1t/crypto/dh/dh_check.c +++ b/src/openssl/openssl-1.1.1w/crypto/dh/dh_check.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -97,10 +97,17 @@ int DH_check_ex(const DH *dh) int DH_check(const DH *dh, int *ret) { - int ok = 0, r; + int ok = 0, r, q_good = 0; BN_CTX *ctx = NULL; BIGNUM *t1 = NULL, *t2 = NULL; + /* Don't do any checks at all with an excessively large modulus */ + if (BN_num_bits(dh->p) > OPENSSL_DH_CHECK_MAX_MODULUS_BITS) { + DHerr(DH_F_DH_CHECK, DH_R_MODULUS_TOO_LARGE); + *ret = DH_CHECK_P_NOT_PRIME; + return 0; + } + if (!DH_check_params(dh, ret)) return 0; @@ -113,7 +120,14 @@ int DH_check(const DH *dh, int *ret) if (t2 == NULL) goto err; - if (dh->q) { + if (dh->q != NULL) { + if (BN_ucmp(dh->p, dh->q) > 0) + q_good = 1; + else + *ret |= DH_CHECK_INVALID_Q_VALUE; + } + + if (q_good) { if (BN_cmp(dh->g, BN_value_one()) <= 0) *ret |= DH_NOT_SUITABLE_GENERATOR; else if (BN_cmp(dh->g, dh->p) >= 0) diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_depr.c b/src/openssl/openssl-1.1.1w/crypto/dh/dh_depr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_depr.c rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_depr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_err.c b/src/openssl/openssl-1.1.1w/crypto/dh/dh_err.c similarity index 97% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_err.c rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_err.c index 7285587b4..92800d3fc 100644 --- a/src/openssl/openssl-1.1.1t/crypto/dh/dh_err.c +++ b/src/openssl/openssl-1.1.1w/crypto/dh/dh_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -18,6 +18,7 @@ static const ERR_STRING_DATA DH_str_functs[] = { {ERR_PACK(ERR_LIB_DH, DH_F_DHPARAMS_PRINT_FP, 0), "DHparams_print_fp"}, {ERR_PACK(ERR_LIB_DH, DH_F_DH_BUILTIN_GENPARAMS, 0), "dh_builtin_genparams"}, + {ERR_PACK(ERR_LIB_DH, DH_F_DH_CHECK, 0), "DH_check"}, {ERR_PACK(ERR_LIB_DH, DH_F_DH_CHECK_EX, 0), "DH_check_ex"}, {ERR_PACK(ERR_LIB_DH, DH_F_DH_CHECK_PARAMS_EX, 0), "DH_check_params_ex"}, {ERR_PACK(ERR_LIB_DH, DH_F_DH_CHECK_PUB_KEY_EX, 0), "DH_check_pub_key_ex"}, diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_gen.c b/src/openssl/openssl-1.1.1w/crypto/dh/dh_gen.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_gen.c rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_gen.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_kdf.c b/src/openssl/openssl-1.1.1w/crypto/dh/dh_kdf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_kdf.c rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_kdf.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_key.c b/src/openssl/openssl-1.1.1w/crypto/dh/dh_key.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_key.c rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_key.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_lib.c b/src/openssl/openssl-1.1.1w/crypto/dh/dh_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_lib.c rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_local.h b/src/openssl/openssl-1.1.1w/crypto/dh/dh_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_local.h rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_meth.c b/src/openssl/openssl-1.1.1w/crypto/dh/dh_meth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_meth.c rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_meth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_pmeth.c b/src/openssl/openssl-1.1.1w/crypto/dh/dh_pmeth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_pmeth.c rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_pmeth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_prn.c b/src/openssl/openssl-1.1.1w/crypto/dh/dh_prn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_prn.c rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_prn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_rfc5114.c b/src/openssl/openssl-1.1.1w/crypto/dh/dh_rfc5114.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_rfc5114.c rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_rfc5114.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dh/dh_rfc7919.c b/src/openssl/openssl-1.1.1w/crypto/dh/dh_rfc7919.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dh/dh_rfc7919.c rename to src/openssl/openssl-1.1.1w/crypto/dh/dh_rfc7919.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dllmain.c b/src/openssl/openssl-1.1.1w/crypto/dllmain.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dllmain.c rename to src/openssl/openssl-1.1.1w/crypto/dllmain.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/build.info b/src/openssl/openssl-1.1.1w/crypto/dsa/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/build.info rename to src/openssl/openssl-1.1.1w/crypto/dsa/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/dsa_ameth.c b/src/openssl/openssl-1.1.1w/crypto/dsa/dsa_ameth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/dsa_ameth.c rename to src/openssl/openssl-1.1.1w/crypto/dsa/dsa_ameth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/dsa_asn1.c b/src/openssl/openssl-1.1.1w/crypto/dsa/dsa_asn1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/dsa_asn1.c rename to src/openssl/openssl-1.1.1w/crypto/dsa/dsa_asn1.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/dsa_depr.c b/src/openssl/openssl-1.1.1w/crypto/dsa/dsa_depr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/dsa_depr.c rename to src/openssl/openssl-1.1.1w/crypto/dsa/dsa_depr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/dsa_err.c b/src/openssl/openssl-1.1.1w/crypto/dsa/dsa_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/dsa_err.c rename to src/openssl/openssl-1.1.1w/crypto/dsa/dsa_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/dsa_gen.c b/src/openssl/openssl-1.1.1w/crypto/dsa/dsa_gen.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/dsa_gen.c rename to src/openssl/openssl-1.1.1w/crypto/dsa/dsa_gen.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/dsa_key.c b/src/openssl/openssl-1.1.1w/crypto/dsa/dsa_key.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/dsa_key.c rename to src/openssl/openssl-1.1.1w/crypto/dsa/dsa_key.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/dsa_lib.c b/src/openssl/openssl-1.1.1w/crypto/dsa/dsa_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/dsa_lib.c rename to src/openssl/openssl-1.1.1w/crypto/dsa/dsa_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/dsa_local.h b/src/openssl/openssl-1.1.1w/crypto/dsa/dsa_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/dsa_local.h rename to src/openssl/openssl-1.1.1w/crypto/dsa/dsa_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/dsa_meth.c b/src/openssl/openssl-1.1.1w/crypto/dsa/dsa_meth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/dsa_meth.c rename to src/openssl/openssl-1.1.1w/crypto/dsa/dsa_meth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/dsa_ossl.c b/src/openssl/openssl-1.1.1w/crypto/dsa/dsa_ossl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/dsa_ossl.c rename to src/openssl/openssl-1.1.1w/crypto/dsa/dsa_ossl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/dsa_pmeth.c b/src/openssl/openssl-1.1.1w/crypto/dsa/dsa_pmeth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/dsa_pmeth.c rename to src/openssl/openssl-1.1.1w/crypto/dsa/dsa_pmeth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/dsa_prn.c b/src/openssl/openssl-1.1.1w/crypto/dsa/dsa_prn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/dsa_prn.c rename to src/openssl/openssl-1.1.1w/crypto/dsa/dsa_prn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/dsa_sign.c b/src/openssl/openssl-1.1.1w/crypto/dsa/dsa_sign.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/dsa_sign.c rename to src/openssl/openssl-1.1.1w/crypto/dsa/dsa_sign.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dsa/dsa_vrf.c b/src/openssl/openssl-1.1.1w/crypto/dsa/dsa_vrf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dsa/dsa_vrf.c rename to src/openssl/openssl-1.1.1w/crypto/dsa/dsa_vrf.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dso/build.info b/src/openssl/openssl-1.1.1w/crypto/dso/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dso/build.info rename to src/openssl/openssl-1.1.1w/crypto/dso/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/dso/dso_dl.c b/src/openssl/openssl-1.1.1w/crypto/dso/dso_dl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dso/dso_dl.c rename to src/openssl/openssl-1.1.1w/crypto/dso/dso_dl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dso/dso_dlfcn.c b/src/openssl/openssl-1.1.1w/crypto/dso/dso_dlfcn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dso/dso_dlfcn.c rename to src/openssl/openssl-1.1.1w/crypto/dso/dso_dlfcn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dso/dso_err.c b/src/openssl/openssl-1.1.1w/crypto/dso/dso_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dso/dso_err.c rename to src/openssl/openssl-1.1.1w/crypto/dso/dso_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dso/dso_lib.c b/src/openssl/openssl-1.1.1w/crypto/dso/dso_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dso/dso_lib.c rename to src/openssl/openssl-1.1.1w/crypto/dso/dso_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dso/dso_local.h b/src/openssl/openssl-1.1.1w/crypto/dso/dso_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dso/dso_local.h rename to src/openssl/openssl-1.1.1w/crypto/dso/dso_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/dso/dso_openssl.c b/src/openssl/openssl-1.1.1w/crypto/dso/dso_openssl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dso/dso_openssl.c rename to src/openssl/openssl-1.1.1w/crypto/dso/dso_openssl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dso/dso_vms.c b/src/openssl/openssl-1.1.1w/crypto/dso/dso_vms.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dso/dso_vms.c rename to src/openssl/openssl-1.1.1w/crypto/dso/dso_vms.c diff --git a/src/openssl/openssl-1.1.1t/crypto/dso/dso_win32.c b/src/openssl/openssl-1.1.1w/crypto/dso/dso_win32.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/dso/dso_win32.c rename to src/openssl/openssl-1.1.1w/crypto/dso/dso_win32.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ebcdic.c b/src/openssl/openssl-1.1.1w/crypto/ebcdic.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ebcdic.c rename to src/openssl/openssl-1.1.1w/crypto/ebcdic.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/asm/ecp_nistz256-armv4.pl b/src/openssl/openssl-1.1.1w/crypto/ec/asm/ecp_nistz256-armv4.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/asm/ecp_nistz256-armv4.pl rename to src/openssl/openssl-1.1.1w/crypto/ec/asm/ecp_nistz256-armv4.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/asm/ecp_nistz256-armv8.pl b/src/openssl/openssl-1.1.1w/crypto/ec/asm/ecp_nistz256-armv8.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/asm/ecp_nistz256-armv8.pl rename to src/openssl/openssl-1.1.1w/crypto/ec/asm/ecp_nistz256-armv8.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/asm/ecp_nistz256-ppc64.pl b/src/openssl/openssl-1.1.1w/crypto/ec/asm/ecp_nistz256-ppc64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/asm/ecp_nistz256-ppc64.pl rename to src/openssl/openssl-1.1.1w/crypto/ec/asm/ecp_nistz256-ppc64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/asm/ecp_nistz256-sparcv9.pl b/src/openssl/openssl-1.1.1w/crypto/ec/asm/ecp_nistz256-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/asm/ecp_nistz256-sparcv9.pl rename to src/openssl/openssl-1.1.1w/crypto/ec/asm/ecp_nistz256-sparcv9.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/asm/ecp_nistz256-x86.pl b/src/openssl/openssl-1.1.1w/crypto/ec/asm/ecp_nistz256-x86.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/asm/ecp_nistz256-x86.pl rename to src/openssl/openssl-1.1.1w/crypto/ec/asm/ecp_nistz256-x86.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/asm/ecp_nistz256-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/ec/asm/ecp_nistz256-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/asm/ecp_nistz256-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/ec/asm/ecp_nistz256-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/asm/x25519-ppc64.pl b/src/openssl/openssl-1.1.1w/crypto/ec/asm/x25519-ppc64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/asm/x25519-ppc64.pl rename to src/openssl/openssl-1.1.1w/crypto/ec/asm/x25519-ppc64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/asm/x25519-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/ec/asm/x25519-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/asm/x25519-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/ec/asm/x25519-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/build.info b/src/openssl/openssl-1.1.1w/crypto/ec/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/build.info rename to src/openssl/openssl-1.1.1w/crypto/ec/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve25519.c b/src/openssl/openssl-1.1.1w/crypto/ec/curve25519.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve25519.c rename to src/openssl/openssl-1.1.1w/crypto/ec/curve25519.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve448/arch_32/arch_intrinsics.h b/src/openssl/openssl-1.1.1w/crypto/ec/curve448/arch_32/arch_intrinsics.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve448/arch_32/arch_intrinsics.h rename to src/openssl/openssl-1.1.1w/crypto/ec/curve448/arch_32/arch_intrinsics.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve448/arch_32/f_impl.c b/src/openssl/openssl-1.1.1w/crypto/ec/curve448/arch_32/f_impl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve448/arch_32/f_impl.c rename to src/openssl/openssl-1.1.1w/crypto/ec/curve448/arch_32/f_impl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve448/arch_32/f_impl.h b/src/openssl/openssl-1.1.1w/crypto/ec/curve448/arch_32/f_impl.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve448/arch_32/f_impl.h rename to src/openssl/openssl-1.1.1w/crypto/ec/curve448/arch_32/f_impl.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve448/curve448.c b/src/openssl/openssl-1.1.1w/crypto/ec/curve448/curve448.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve448/curve448.c rename to src/openssl/openssl-1.1.1w/crypto/ec/curve448/curve448.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve448/curve448_local.h b/src/openssl/openssl-1.1.1w/crypto/ec/curve448/curve448_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve448/curve448_local.h rename to src/openssl/openssl-1.1.1w/crypto/ec/curve448/curve448_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve448/curve448_tables.c b/src/openssl/openssl-1.1.1w/crypto/ec/curve448/curve448_tables.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve448/curve448_tables.c rename to src/openssl/openssl-1.1.1w/crypto/ec/curve448/curve448_tables.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve448/curve448utils.h b/src/openssl/openssl-1.1.1w/crypto/ec/curve448/curve448utils.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve448/curve448utils.h rename to src/openssl/openssl-1.1.1w/crypto/ec/curve448/curve448utils.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve448/ed448.h b/src/openssl/openssl-1.1.1w/crypto/ec/curve448/ed448.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve448/ed448.h rename to src/openssl/openssl-1.1.1w/crypto/ec/curve448/ed448.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve448/eddsa.c b/src/openssl/openssl-1.1.1w/crypto/ec/curve448/eddsa.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve448/eddsa.c rename to src/openssl/openssl-1.1.1w/crypto/ec/curve448/eddsa.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve448/f_generic.c b/src/openssl/openssl-1.1.1w/crypto/ec/curve448/f_generic.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve448/f_generic.c rename to src/openssl/openssl-1.1.1w/crypto/ec/curve448/f_generic.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve448/field.h b/src/openssl/openssl-1.1.1w/crypto/ec/curve448/field.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve448/field.h rename to src/openssl/openssl-1.1.1w/crypto/ec/curve448/field.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve448/point_448.h b/src/openssl/openssl-1.1.1w/crypto/ec/curve448/point_448.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve448/point_448.h rename to src/openssl/openssl-1.1.1w/crypto/ec/curve448/point_448.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve448/scalar.c b/src/openssl/openssl-1.1.1w/crypto/ec/curve448/scalar.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve448/scalar.c rename to src/openssl/openssl-1.1.1w/crypto/ec/curve448/scalar.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/curve448/word.h b/src/openssl/openssl-1.1.1w/crypto/ec/curve448/word.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/curve448/word.h rename to src/openssl/openssl-1.1.1w/crypto/ec/curve448/word.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec2_oct.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec2_oct.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec2_oct.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec2_oct.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec2_smpl.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec2_smpl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec2_smpl.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec2_smpl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec_ameth.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec_ameth.c similarity index 98% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec_ameth.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec_ameth.c index 5098bd7a6..5a63590a9 100644 --- a/src/openssl/openssl-1.1.1t/crypto/ec/ec_ameth.c +++ b/src/openssl/openssl-1.1.1w/crypto/ec/ec_ameth.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -38,7 +38,6 @@ static int eckey_param2type(int *pptype, void **ppval, const EC_KEY *ec_key) ASN1_OBJECT *asn1obj = OBJ_nid2obj(nid); if (asn1obj == NULL || OBJ_length(asn1obj) == 0) { - ASN1_OBJECT_free(asn1obj); ECerr(EC_F_ECKEY_PARAM2TYPE, EC_R_MISSING_OID); return 0; } @@ -98,9 +97,7 @@ static int eckey_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) ptype, pval, penc, penclen)) return 1; err: - if (ptype == V_ASN1_OBJECT) - ASN1_OBJECT_free(pval); - else + if (ptype == V_ASN1_SEQUENCE) ASN1_STRING_free(pval); OPENSSL_free(penc); return 0; @@ -256,24 +253,32 @@ static int eckey_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) eplen = i2d_ECPrivateKey(&ec_key, NULL); if (!eplen) { + if (ptype == V_ASN1_SEQUENCE) + ASN1_STRING_free(pval); ECerr(EC_F_ECKEY_PRIV_ENCODE, ERR_R_EC_LIB); return 0; } ep = OPENSSL_malloc(eplen); if (ep == NULL) { + if (ptype == V_ASN1_SEQUENCE) + ASN1_STRING_free(pval); ECerr(EC_F_ECKEY_PRIV_ENCODE, ERR_R_MALLOC_FAILURE); return 0; } p = ep; if (!i2d_ECPrivateKey(&ec_key, &p)) { - OPENSSL_free(ep); + OPENSSL_clear_free(ep, eplen); + if (ptype == V_ASN1_SEQUENCE) + ASN1_STRING_free(pval); ECerr(EC_F_ECKEY_PRIV_ENCODE, ERR_R_EC_LIB); return 0; } if (!PKCS8_pkey_set0(p8, OBJ_nid2obj(NID_X9_62_id_ecPublicKey), 0, ptype, pval, ep, eplen)) { - OPENSSL_free(ep); + OPENSSL_clear_free(ep, eplen); + if (ptype == V_ASN1_SEQUENCE) + ASN1_STRING_free(pval); return 0; } diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec_asn1.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec_asn1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec_asn1.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec_asn1.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec_check.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec_check.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec_check.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec_check.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec_curve.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec_curve.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec_curve.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec_curve.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec_cvt.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec_cvt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec_cvt.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec_cvt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec_err.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec_err.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec_key.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec_key.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec_key.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec_key.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec_kmeth.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec_kmeth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec_kmeth.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec_kmeth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec_lib.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec_lib.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec_local.h b/src/openssl/openssl-1.1.1w/crypto/ec/ec_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec_local.h rename to src/openssl/openssl-1.1.1w/crypto/ec/ec_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec_mult.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec_mult.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec_mult.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec_mult.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec_oct.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec_oct.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec_oct.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec_oct.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec_pmeth.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec_pmeth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec_pmeth.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec_pmeth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ec_print.c b/src/openssl/openssl-1.1.1w/crypto/ec/ec_print.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ec_print.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ec_print.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecdh_kdf.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecdh_kdf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecdh_kdf.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecdh_kdf.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecdh_ossl.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecdh_ossl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecdh_ossl.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecdh_ossl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecdsa_ossl.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecdsa_ossl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecdsa_ossl.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecdsa_ossl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecdsa_sign.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecdsa_sign.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecdsa_sign.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecdsa_sign.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecdsa_vrf.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecdsa_vrf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecdsa_vrf.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecdsa_vrf.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/eck_prn.c b/src/openssl/openssl-1.1.1w/crypto/ec/eck_prn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/eck_prn.c rename to src/openssl/openssl-1.1.1w/crypto/ec/eck_prn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecp_mont.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecp_mont.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecp_mont.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecp_mont.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecp_nist.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecp_nist.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecp_nist.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecp_nist.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecp_nistp224.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecp_nistp224.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecp_nistp224.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecp_nistp224.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecp_nistp256.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecp_nistp256.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecp_nistp256.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecp_nistp256.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecp_nistp521.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecp_nistp521.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecp_nistp521.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecp_nistp521.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecp_nistputil.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecp_nistputil.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecp_nistputil.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecp_nistputil.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecp_nistz256.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecp_nistz256.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecp_nistz256.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecp_nistz256.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecp_nistz256_table.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecp_nistz256_table.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecp_nistz256_table.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecp_nistz256_table.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecp_oct.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecp_oct.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecp_oct.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecp_oct.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecp_smpl.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecp_smpl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecp_smpl.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecp_smpl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ec/ecx_meth.c b/src/openssl/openssl-1.1.1w/crypto/ec/ecx_meth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ec/ecx_meth.c rename to src/openssl/openssl-1.1.1w/crypto/ec/ecx_meth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/README b/src/openssl/openssl-1.1.1w/crypto/engine/README similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/README rename to src/openssl/openssl-1.1.1w/crypto/engine/README diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/build.info b/src/openssl/openssl-1.1.1w/crypto/engine/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/build.info rename to src/openssl/openssl-1.1.1w/crypto/engine/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_all.c b/src/openssl/openssl-1.1.1w/crypto/engine/eng_all.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_all.c rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_all.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_cnf.c b/src/openssl/openssl-1.1.1w/crypto/engine/eng_cnf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_cnf.c rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_cnf.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_ctrl.c b/src/openssl/openssl-1.1.1w/crypto/engine/eng_ctrl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_ctrl.c rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_ctrl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_devcrypto.c b/src/openssl/openssl-1.1.1w/crypto/engine/eng_devcrypto.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_devcrypto.c rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_devcrypto.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_dyn.c b/src/openssl/openssl-1.1.1w/crypto/engine/eng_dyn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_dyn.c rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_dyn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_err.c b/src/openssl/openssl-1.1.1w/crypto/engine/eng_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_err.c rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_fat.c b/src/openssl/openssl-1.1.1w/crypto/engine/eng_fat.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_fat.c rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_fat.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_init.c b/src/openssl/openssl-1.1.1w/crypto/engine/eng_init.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_init.c rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_init.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_lib.c b/src/openssl/openssl-1.1.1w/crypto/engine/eng_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_lib.c rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_list.c b/src/openssl/openssl-1.1.1w/crypto/engine/eng_list.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_list.c rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_list.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_local.h b/src/openssl/openssl-1.1.1w/crypto/engine/eng_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_local.h rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_openssl.c b/src/openssl/openssl-1.1.1w/crypto/engine/eng_openssl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_openssl.c rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_openssl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_pkey.c b/src/openssl/openssl-1.1.1w/crypto/engine/eng_pkey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_pkey.c rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_pkey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_rdrand.c b/src/openssl/openssl-1.1.1w/crypto/engine/eng_rdrand.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_rdrand.c rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_rdrand.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/eng_table.c b/src/openssl/openssl-1.1.1w/crypto/engine/eng_table.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/eng_table.c rename to src/openssl/openssl-1.1.1w/crypto/engine/eng_table.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/tb_asnmth.c b/src/openssl/openssl-1.1.1w/crypto/engine/tb_asnmth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/tb_asnmth.c rename to src/openssl/openssl-1.1.1w/crypto/engine/tb_asnmth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/tb_cipher.c b/src/openssl/openssl-1.1.1w/crypto/engine/tb_cipher.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/tb_cipher.c rename to src/openssl/openssl-1.1.1w/crypto/engine/tb_cipher.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/tb_dh.c b/src/openssl/openssl-1.1.1w/crypto/engine/tb_dh.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/tb_dh.c rename to src/openssl/openssl-1.1.1w/crypto/engine/tb_dh.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/tb_digest.c b/src/openssl/openssl-1.1.1w/crypto/engine/tb_digest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/tb_digest.c rename to src/openssl/openssl-1.1.1w/crypto/engine/tb_digest.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/tb_dsa.c b/src/openssl/openssl-1.1.1w/crypto/engine/tb_dsa.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/tb_dsa.c rename to src/openssl/openssl-1.1.1w/crypto/engine/tb_dsa.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/tb_eckey.c b/src/openssl/openssl-1.1.1w/crypto/engine/tb_eckey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/tb_eckey.c rename to src/openssl/openssl-1.1.1w/crypto/engine/tb_eckey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/tb_pkmeth.c b/src/openssl/openssl-1.1.1w/crypto/engine/tb_pkmeth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/tb_pkmeth.c rename to src/openssl/openssl-1.1.1w/crypto/engine/tb_pkmeth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/tb_rand.c b/src/openssl/openssl-1.1.1w/crypto/engine/tb_rand.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/tb_rand.c rename to src/openssl/openssl-1.1.1w/crypto/engine/tb_rand.c diff --git a/src/openssl/openssl-1.1.1t/crypto/engine/tb_rsa.c b/src/openssl/openssl-1.1.1w/crypto/engine/tb_rsa.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/engine/tb_rsa.c rename to src/openssl/openssl-1.1.1w/crypto/engine/tb_rsa.c diff --git a/src/openssl/openssl-1.1.1t/crypto/err/README b/src/openssl/openssl-1.1.1w/crypto/err/README similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/err/README rename to src/openssl/openssl-1.1.1w/crypto/err/README diff --git a/src/openssl/openssl-1.1.1t/crypto/err/build.info b/src/openssl/openssl-1.1.1w/crypto/err/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/err/build.info rename to src/openssl/openssl-1.1.1w/crypto/err/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/err/err.c b/src/openssl/openssl-1.1.1w/crypto/err/err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/err/err.c rename to src/openssl/openssl-1.1.1w/crypto/err/err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/err/err_all.c b/src/openssl/openssl-1.1.1w/crypto/err/err_all.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/err/err_all.c rename to src/openssl/openssl-1.1.1w/crypto/err/err_all.c diff --git a/src/openssl/openssl-1.1.1t/crypto/err/err_prn.c b/src/openssl/openssl-1.1.1w/crypto/err/err_prn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/err/err_prn.c rename to src/openssl/openssl-1.1.1w/crypto/err/err_prn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/err/openssl.ec b/src/openssl/openssl-1.1.1w/crypto/err/openssl.ec similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/err/openssl.ec rename to src/openssl/openssl-1.1.1w/crypto/err/openssl.ec diff --git a/src/openssl/openssl-1.1.1t/crypto/err/openssl.txt b/src/openssl/openssl-1.1.1w/crypto/err/openssl.txt similarity index 99% rename from src/openssl/openssl-1.1.1t/crypto/err/openssl.txt rename to src/openssl/openssl-1.1.1w/crypto/err/openssl.txt index ba3a46d5b..c0a3cd720 100644 --- a/src/openssl/openssl-1.1.1t/crypto/err/openssl.txt +++ b/src/openssl/openssl-1.1.1w/crypto/err/openssl.txt @@ -232,7 +232,6 @@ BN_F_BN_RSHIFT:146:BN_rshift BN_F_BN_SET_WORDS:144:bn_set_words BN_F_BN_STACK_PUSH:148:BN_STACK_push BN_F_BN_USUB:115:BN_usub -BN_F_OSSL_BN_RSA_DO_UNBLIND:151:ossl_bn_rsa_do_unblind BUF_F_BUF_MEM_GROW:100:BUF_MEM_grow BUF_F_BUF_MEM_GROW_CLEAN:105:BUF_MEM_grow_clean BUF_F_BUF_MEM_NEW:101:BUF_MEM_new @@ -402,6 +401,7 @@ CT_F_SCT_SET_VERSION:104:SCT_set_version DH_F_COMPUTE_KEY:102:compute_key DH_F_DHPARAMS_PRINT_FP:101:DHparams_print_fp DH_F_DH_BUILTIN_GENPARAMS:106:dh_builtin_genparams +DH_F_DH_CHECK:126:DH_check DH_F_DH_CHECK_EX:121:DH_check_ex DH_F_DH_CHECK_PARAMS_EX:122:DH_check_params_ex DH_F_DH_CHECK_PUB_KEY_EX:123:DH_check_pub_key_ex diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/bio_b64.c b/src/openssl/openssl-1.1.1w/crypto/evp/bio_b64.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/bio_b64.c rename to src/openssl/openssl-1.1.1w/crypto/evp/bio_b64.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/bio_enc.c b/src/openssl/openssl-1.1.1w/crypto/evp/bio_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/bio_enc.c rename to src/openssl/openssl-1.1.1w/crypto/evp/bio_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/bio_md.c b/src/openssl/openssl-1.1.1w/crypto/evp/bio_md.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/bio_md.c rename to src/openssl/openssl-1.1.1w/crypto/evp/bio_md.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/bio_ok.c b/src/openssl/openssl-1.1.1w/crypto/evp/bio_ok.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/bio_ok.c rename to src/openssl/openssl-1.1.1w/crypto/evp/bio_ok.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/build.info b/src/openssl/openssl-1.1.1w/crypto/evp/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/build.info rename to src/openssl/openssl-1.1.1w/crypto/evp/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/c_allc.c b/src/openssl/openssl-1.1.1w/crypto/evp/c_allc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/c_allc.c rename to src/openssl/openssl-1.1.1w/crypto/evp/c_allc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/c_alld.c b/src/openssl/openssl-1.1.1w/crypto/evp/c_alld.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/c_alld.c rename to src/openssl/openssl-1.1.1w/crypto/evp/c_alld.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/cmeth_lib.c b/src/openssl/openssl-1.1.1w/crypto/evp/cmeth_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/cmeth_lib.c rename to src/openssl/openssl-1.1.1w/crypto/evp/cmeth_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/digest.c b/src/openssl/openssl-1.1.1w/crypto/evp/digest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/digest.c rename to src/openssl/openssl-1.1.1w/crypto/evp/digest.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_aes.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_aes.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_aes.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_aes.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_aes_cbc_hmac_sha1.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_aes_cbc_hmac_sha1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_aes_cbc_hmac_sha1.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_aes_cbc_hmac_sha1.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_aes_cbc_hmac_sha256.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_aes_cbc_hmac_sha256.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_aes_cbc_hmac_sha256.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_aes_cbc_hmac_sha256.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_aria.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_aria.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_aria.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_aria.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_bf.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_bf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_bf.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_bf.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_camellia.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_camellia.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_camellia.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_camellia.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_cast.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_cast.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_cast.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_cast.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_chacha20_poly1305.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_chacha20_poly1305.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_chacha20_poly1305.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_chacha20_poly1305.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_des.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_des.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_des.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_des.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_des3.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_des3.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_des3.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_des3.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_idea.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_idea.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_idea.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_idea.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_null.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_null.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_null.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_null.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_old.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_old.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_old.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_old.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_rc2.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_rc2.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_rc2.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_rc2.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_rc4.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_rc4.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_rc4.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_rc4.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_rc4_hmac_md5.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_rc4_hmac_md5.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_rc4_hmac_md5.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_rc4_hmac_md5.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_rc5.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_rc5.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_rc5.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_rc5.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_seed.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_seed.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_seed.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_seed.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_sm4.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_sm4.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_sm4.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_sm4.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/e_xcbc_d.c b/src/openssl/openssl-1.1.1w/crypto/evp/e_xcbc_d.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/e_xcbc_d.c rename to src/openssl/openssl-1.1.1w/crypto/evp/e_xcbc_d.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/encode.c b/src/openssl/openssl-1.1.1w/crypto/evp/encode.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/encode.c rename to src/openssl/openssl-1.1.1w/crypto/evp/encode.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/evp_cnf.c b/src/openssl/openssl-1.1.1w/crypto/evp/evp_cnf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/evp_cnf.c rename to src/openssl/openssl-1.1.1w/crypto/evp/evp_cnf.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/evp_enc.c b/src/openssl/openssl-1.1.1w/crypto/evp/evp_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/evp_enc.c rename to src/openssl/openssl-1.1.1w/crypto/evp/evp_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/evp_err.c b/src/openssl/openssl-1.1.1w/crypto/evp/evp_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/evp_err.c rename to src/openssl/openssl-1.1.1w/crypto/evp/evp_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/evp_key.c b/src/openssl/openssl-1.1.1w/crypto/evp/evp_key.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/evp_key.c rename to src/openssl/openssl-1.1.1w/crypto/evp/evp_key.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/evp_lib.c b/src/openssl/openssl-1.1.1w/crypto/evp/evp_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/evp_lib.c rename to src/openssl/openssl-1.1.1w/crypto/evp/evp_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/evp_local.h b/src/openssl/openssl-1.1.1w/crypto/evp/evp_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/evp_local.h rename to src/openssl/openssl-1.1.1w/crypto/evp/evp_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/evp_pbe.c b/src/openssl/openssl-1.1.1w/crypto/evp/evp_pbe.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/evp_pbe.c rename to src/openssl/openssl-1.1.1w/crypto/evp/evp_pbe.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/evp_pkey.c b/src/openssl/openssl-1.1.1w/crypto/evp/evp_pkey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/evp_pkey.c rename to src/openssl/openssl-1.1.1w/crypto/evp/evp_pkey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/m_md2.c b/src/openssl/openssl-1.1.1w/crypto/evp/m_md2.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/m_md2.c rename to src/openssl/openssl-1.1.1w/crypto/evp/m_md2.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/m_md4.c b/src/openssl/openssl-1.1.1w/crypto/evp/m_md4.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/m_md4.c rename to src/openssl/openssl-1.1.1w/crypto/evp/m_md4.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/m_md5.c b/src/openssl/openssl-1.1.1w/crypto/evp/m_md5.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/m_md5.c rename to src/openssl/openssl-1.1.1w/crypto/evp/m_md5.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/m_md5_sha1.c b/src/openssl/openssl-1.1.1w/crypto/evp/m_md5_sha1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/m_md5_sha1.c rename to src/openssl/openssl-1.1.1w/crypto/evp/m_md5_sha1.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/m_mdc2.c b/src/openssl/openssl-1.1.1w/crypto/evp/m_mdc2.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/m_mdc2.c rename to src/openssl/openssl-1.1.1w/crypto/evp/m_mdc2.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/m_null.c b/src/openssl/openssl-1.1.1w/crypto/evp/m_null.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/m_null.c rename to src/openssl/openssl-1.1.1w/crypto/evp/m_null.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/m_ripemd.c b/src/openssl/openssl-1.1.1w/crypto/evp/m_ripemd.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/m_ripemd.c rename to src/openssl/openssl-1.1.1w/crypto/evp/m_ripemd.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/m_sha1.c b/src/openssl/openssl-1.1.1w/crypto/evp/m_sha1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/m_sha1.c rename to src/openssl/openssl-1.1.1w/crypto/evp/m_sha1.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/m_sha3.c b/src/openssl/openssl-1.1.1w/crypto/evp/m_sha3.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/m_sha3.c rename to src/openssl/openssl-1.1.1w/crypto/evp/m_sha3.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/m_sigver.c b/src/openssl/openssl-1.1.1w/crypto/evp/m_sigver.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/m_sigver.c rename to src/openssl/openssl-1.1.1w/crypto/evp/m_sigver.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/m_wp.c b/src/openssl/openssl-1.1.1w/crypto/evp/m_wp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/m_wp.c rename to src/openssl/openssl-1.1.1w/crypto/evp/m_wp.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/names.c b/src/openssl/openssl-1.1.1w/crypto/evp/names.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/names.c rename to src/openssl/openssl-1.1.1w/crypto/evp/names.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/p5_crpt.c b/src/openssl/openssl-1.1.1w/crypto/evp/p5_crpt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/p5_crpt.c rename to src/openssl/openssl-1.1.1w/crypto/evp/p5_crpt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/p5_crpt2.c b/src/openssl/openssl-1.1.1w/crypto/evp/p5_crpt2.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/p5_crpt2.c rename to src/openssl/openssl-1.1.1w/crypto/evp/p5_crpt2.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/p_dec.c b/src/openssl/openssl-1.1.1w/crypto/evp/p_dec.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/p_dec.c rename to src/openssl/openssl-1.1.1w/crypto/evp/p_dec.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/p_enc.c b/src/openssl/openssl-1.1.1w/crypto/evp/p_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/p_enc.c rename to src/openssl/openssl-1.1.1w/crypto/evp/p_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/p_lib.c b/src/openssl/openssl-1.1.1w/crypto/evp/p_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/p_lib.c rename to src/openssl/openssl-1.1.1w/crypto/evp/p_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/p_open.c b/src/openssl/openssl-1.1.1w/crypto/evp/p_open.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/p_open.c rename to src/openssl/openssl-1.1.1w/crypto/evp/p_open.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/p_seal.c b/src/openssl/openssl-1.1.1w/crypto/evp/p_seal.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/p_seal.c rename to src/openssl/openssl-1.1.1w/crypto/evp/p_seal.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/p_sign.c b/src/openssl/openssl-1.1.1w/crypto/evp/p_sign.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/p_sign.c rename to src/openssl/openssl-1.1.1w/crypto/evp/p_sign.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/p_verify.c b/src/openssl/openssl-1.1.1w/crypto/evp/p_verify.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/p_verify.c rename to src/openssl/openssl-1.1.1w/crypto/evp/p_verify.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/pbe_scrypt.c b/src/openssl/openssl-1.1.1w/crypto/evp/pbe_scrypt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/pbe_scrypt.c rename to src/openssl/openssl-1.1.1w/crypto/evp/pbe_scrypt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/pmeth_fn.c b/src/openssl/openssl-1.1.1w/crypto/evp/pmeth_fn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/pmeth_fn.c rename to src/openssl/openssl-1.1.1w/crypto/evp/pmeth_fn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/pmeth_gn.c b/src/openssl/openssl-1.1.1w/crypto/evp/pmeth_gn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/pmeth_gn.c rename to src/openssl/openssl-1.1.1w/crypto/evp/pmeth_gn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/evp/pmeth_lib.c b/src/openssl/openssl-1.1.1w/crypto/evp/pmeth_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/evp/pmeth_lib.c rename to src/openssl/openssl-1.1.1w/crypto/evp/pmeth_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ex_data.c b/src/openssl/openssl-1.1.1w/crypto/ex_data.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ex_data.c rename to src/openssl/openssl-1.1.1w/crypto/ex_data.c diff --git a/src/openssl/openssl-1.1.1t/crypto/getenv.c b/src/openssl/openssl-1.1.1w/crypto/getenv.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/getenv.c rename to src/openssl/openssl-1.1.1w/crypto/getenv.c diff --git a/src/openssl/openssl-1.1.1t/crypto/hmac/build.info b/src/openssl/openssl-1.1.1w/crypto/hmac/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/hmac/build.info rename to src/openssl/openssl-1.1.1w/crypto/hmac/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/hmac/hm_ameth.c b/src/openssl/openssl-1.1.1w/crypto/hmac/hm_ameth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/hmac/hm_ameth.c rename to src/openssl/openssl-1.1.1w/crypto/hmac/hm_ameth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/hmac/hm_pmeth.c b/src/openssl/openssl-1.1.1w/crypto/hmac/hm_pmeth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/hmac/hm_pmeth.c rename to src/openssl/openssl-1.1.1w/crypto/hmac/hm_pmeth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/hmac/hmac.c b/src/openssl/openssl-1.1.1w/crypto/hmac/hmac.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/hmac/hmac.c rename to src/openssl/openssl-1.1.1w/crypto/hmac/hmac.c diff --git a/src/openssl/openssl-1.1.1t/crypto/hmac/hmac_local.h b/src/openssl/openssl-1.1.1w/crypto/hmac/hmac_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/hmac/hmac_local.h rename to src/openssl/openssl-1.1.1w/crypto/hmac/hmac_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ia64cpuid.S b/src/openssl/openssl-1.1.1w/crypto/ia64cpuid.S similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ia64cpuid.S rename to src/openssl/openssl-1.1.1w/crypto/ia64cpuid.S diff --git a/src/openssl/openssl-1.1.1t/crypto/idea/build.info b/src/openssl/openssl-1.1.1w/crypto/idea/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/idea/build.info rename to src/openssl/openssl-1.1.1w/crypto/idea/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/idea/i_cbc.c b/src/openssl/openssl-1.1.1w/crypto/idea/i_cbc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/idea/i_cbc.c rename to src/openssl/openssl-1.1.1w/crypto/idea/i_cbc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/idea/i_cfb64.c b/src/openssl/openssl-1.1.1w/crypto/idea/i_cfb64.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/idea/i_cfb64.c rename to src/openssl/openssl-1.1.1w/crypto/idea/i_cfb64.c diff --git a/src/openssl/openssl-1.1.1t/crypto/idea/i_ecb.c b/src/openssl/openssl-1.1.1w/crypto/idea/i_ecb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/idea/i_ecb.c rename to src/openssl/openssl-1.1.1w/crypto/idea/i_ecb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/idea/i_ofb64.c b/src/openssl/openssl-1.1.1w/crypto/idea/i_ofb64.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/idea/i_ofb64.c rename to src/openssl/openssl-1.1.1w/crypto/idea/i_ofb64.c diff --git a/src/openssl/openssl-1.1.1t/crypto/idea/i_skey.c b/src/openssl/openssl-1.1.1w/crypto/idea/i_skey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/idea/i_skey.c rename to src/openssl/openssl-1.1.1w/crypto/idea/i_skey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/idea/idea_local.h b/src/openssl/openssl-1.1.1w/crypto/idea/idea_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/idea/idea_local.h rename to src/openssl/openssl-1.1.1w/crypto/idea/idea_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/init.c b/src/openssl/openssl-1.1.1w/crypto/init.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/init.c rename to src/openssl/openssl-1.1.1w/crypto/init.c diff --git a/src/openssl/openssl-1.1.1t/crypto/kdf/build.info b/src/openssl/openssl-1.1.1w/crypto/kdf/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/kdf/build.info rename to src/openssl/openssl-1.1.1w/crypto/kdf/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/kdf/hkdf.c b/src/openssl/openssl-1.1.1w/crypto/kdf/hkdf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/kdf/hkdf.c rename to src/openssl/openssl-1.1.1w/crypto/kdf/hkdf.c diff --git a/src/openssl/openssl-1.1.1t/crypto/kdf/kdf_err.c b/src/openssl/openssl-1.1.1w/crypto/kdf/kdf_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/kdf/kdf_err.c rename to src/openssl/openssl-1.1.1w/crypto/kdf/kdf_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/kdf/scrypt.c b/src/openssl/openssl-1.1.1w/crypto/kdf/scrypt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/kdf/scrypt.c rename to src/openssl/openssl-1.1.1w/crypto/kdf/scrypt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/kdf/tls1_prf.c b/src/openssl/openssl-1.1.1w/crypto/kdf/tls1_prf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/kdf/tls1_prf.c rename to src/openssl/openssl-1.1.1w/crypto/kdf/tls1_prf.c diff --git a/src/openssl/openssl-1.1.1t/crypto/lhash/build.info b/src/openssl/openssl-1.1.1w/crypto/lhash/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/lhash/build.info rename to src/openssl/openssl-1.1.1w/crypto/lhash/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/lhash/lh_stats.c b/src/openssl/openssl-1.1.1w/crypto/lhash/lh_stats.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/lhash/lh_stats.c rename to src/openssl/openssl-1.1.1w/crypto/lhash/lh_stats.c diff --git a/src/openssl/openssl-1.1.1t/crypto/lhash/lhash.c b/src/openssl/openssl-1.1.1w/crypto/lhash/lhash.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/lhash/lhash.c rename to src/openssl/openssl-1.1.1w/crypto/lhash/lhash.c diff --git a/src/openssl/openssl-1.1.1t/crypto/lhash/lhash_local.h b/src/openssl/openssl-1.1.1w/crypto/lhash/lhash_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/lhash/lhash_local.h rename to src/openssl/openssl-1.1.1w/crypto/lhash/lhash_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/md2/build.info b/src/openssl/openssl-1.1.1w/crypto/md2/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/md2/build.info rename to src/openssl/openssl-1.1.1w/crypto/md2/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/md2/md2_dgst.c b/src/openssl/openssl-1.1.1w/crypto/md2/md2_dgst.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/md2/md2_dgst.c rename to src/openssl/openssl-1.1.1w/crypto/md2/md2_dgst.c diff --git a/src/openssl/openssl-1.1.1t/crypto/md2/md2_one.c b/src/openssl/openssl-1.1.1w/crypto/md2/md2_one.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/md2/md2_one.c rename to src/openssl/openssl-1.1.1w/crypto/md2/md2_one.c diff --git a/src/openssl/openssl-1.1.1t/crypto/md4/build.info b/src/openssl/openssl-1.1.1w/crypto/md4/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/md4/build.info rename to src/openssl/openssl-1.1.1w/crypto/md4/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/md4/md4_dgst.c b/src/openssl/openssl-1.1.1w/crypto/md4/md4_dgst.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/md4/md4_dgst.c rename to src/openssl/openssl-1.1.1w/crypto/md4/md4_dgst.c diff --git a/src/openssl/openssl-1.1.1t/crypto/md4/md4_local.h b/src/openssl/openssl-1.1.1w/crypto/md4/md4_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/md4/md4_local.h rename to src/openssl/openssl-1.1.1w/crypto/md4/md4_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/md4/md4_one.c b/src/openssl/openssl-1.1.1w/crypto/md4/md4_one.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/md4/md4_one.c rename to src/openssl/openssl-1.1.1w/crypto/md4/md4_one.c diff --git a/src/openssl/openssl-1.1.1t/crypto/md5/asm/md5-586.pl b/src/openssl/openssl-1.1.1w/crypto/md5/asm/md5-586.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/md5/asm/md5-586.pl rename to src/openssl/openssl-1.1.1w/crypto/md5/asm/md5-586.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/md5/asm/md5-sparcv9.pl b/src/openssl/openssl-1.1.1w/crypto/md5/asm/md5-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/md5/asm/md5-sparcv9.pl rename to src/openssl/openssl-1.1.1w/crypto/md5/asm/md5-sparcv9.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/md5/asm/md5-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/md5/asm/md5-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/md5/asm/md5-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/md5/asm/md5-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/md5/build.info b/src/openssl/openssl-1.1.1w/crypto/md5/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/md5/build.info rename to src/openssl/openssl-1.1.1w/crypto/md5/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/md5/md5_dgst.c b/src/openssl/openssl-1.1.1w/crypto/md5/md5_dgst.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/md5/md5_dgst.c rename to src/openssl/openssl-1.1.1w/crypto/md5/md5_dgst.c diff --git a/src/openssl/openssl-1.1.1t/crypto/md5/md5_local.h b/src/openssl/openssl-1.1.1w/crypto/md5/md5_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/md5/md5_local.h rename to src/openssl/openssl-1.1.1w/crypto/md5/md5_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/md5/md5_one.c b/src/openssl/openssl-1.1.1w/crypto/md5/md5_one.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/md5/md5_one.c rename to src/openssl/openssl-1.1.1w/crypto/md5/md5_one.c diff --git a/src/openssl/openssl-1.1.1t/crypto/mdc2/build.info b/src/openssl/openssl-1.1.1w/crypto/mdc2/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/mdc2/build.info rename to src/openssl/openssl-1.1.1w/crypto/mdc2/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/mdc2/mdc2_one.c b/src/openssl/openssl-1.1.1w/crypto/mdc2/mdc2_one.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/mdc2/mdc2_one.c rename to src/openssl/openssl-1.1.1w/crypto/mdc2/mdc2_one.c diff --git a/src/openssl/openssl-1.1.1t/crypto/mdc2/mdc2dgst.c b/src/openssl/openssl-1.1.1w/crypto/mdc2/mdc2dgst.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/mdc2/mdc2dgst.c rename to src/openssl/openssl-1.1.1w/crypto/mdc2/mdc2dgst.c diff --git a/src/openssl/openssl-1.1.1t/crypto/mem.c b/src/openssl/openssl-1.1.1w/crypto/mem.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/mem.c rename to src/openssl/openssl-1.1.1w/crypto/mem.c diff --git a/src/openssl/openssl-1.1.1t/crypto/mem_clr.c b/src/openssl/openssl-1.1.1w/crypto/mem_clr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/mem_clr.c rename to src/openssl/openssl-1.1.1w/crypto/mem_clr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/mem_dbg.c b/src/openssl/openssl-1.1.1w/crypto/mem_dbg.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/mem_dbg.c rename to src/openssl/openssl-1.1.1w/crypto/mem_dbg.c diff --git a/src/openssl/openssl-1.1.1t/crypto/mem_sec.c b/src/openssl/openssl-1.1.1w/crypto/mem_sec.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/mem_sec.c rename to src/openssl/openssl-1.1.1w/crypto/mem_sec.c diff --git a/src/openssl/openssl-1.1.1t/crypto/mips_arch.h b/src/openssl/openssl-1.1.1w/crypto/mips_arch.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/mips_arch.h rename to src/openssl/openssl-1.1.1w/crypto/mips_arch.h diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/asm/aesni-gcm-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/modes/asm/aesni-gcm-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/asm/aesni-gcm-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/modes/asm/aesni-gcm-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-alpha.pl b/src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-alpha.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-alpha.pl rename to src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-alpha.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-armv4.pl b/src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-armv4.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-armv4.pl rename to src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-armv4.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-c64xplus.pl b/src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-c64xplus.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-c64xplus.pl rename to src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-c64xplus.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-ia64.pl b/src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-ia64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-ia64.pl rename to src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-ia64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-parisc.pl b/src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-parisc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-parisc.pl rename to src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-parisc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-s390x.pl b/src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-s390x.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-s390x.pl rename to src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-s390x.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-sparcv9.pl b/src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-sparcv9.pl rename to src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-sparcv9.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-x86.pl b/src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-x86.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-x86.pl rename to src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-x86.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/asm/ghash-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/modes/asm/ghash-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/asm/ghashp8-ppc.pl b/src/openssl/openssl-1.1.1w/crypto/modes/asm/ghashp8-ppc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/asm/ghashp8-ppc.pl rename to src/openssl/openssl-1.1.1w/crypto/modes/asm/ghashp8-ppc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/asm/ghashv8-armx.pl b/src/openssl/openssl-1.1.1w/crypto/modes/asm/ghashv8-armx.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/asm/ghashv8-armx.pl rename to src/openssl/openssl-1.1.1w/crypto/modes/asm/ghashv8-armx.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/build.info b/src/openssl/openssl-1.1.1w/crypto/modes/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/build.info rename to src/openssl/openssl-1.1.1w/crypto/modes/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/cbc128.c b/src/openssl/openssl-1.1.1w/crypto/modes/cbc128.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/cbc128.c rename to src/openssl/openssl-1.1.1w/crypto/modes/cbc128.c diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/ccm128.c b/src/openssl/openssl-1.1.1w/crypto/modes/ccm128.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/ccm128.c rename to src/openssl/openssl-1.1.1w/crypto/modes/ccm128.c diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/cfb128.c b/src/openssl/openssl-1.1.1w/crypto/modes/cfb128.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/cfb128.c rename to src/openssl/openssl-1.1.1w/crypto/modes/cfb128.c diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/ctr128.c b/src/openssl/openssl-1.1.1w/crypto/modes/ctr128.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/ctr128.c rename to src/openssl/openssl-1.1.1w/crypto/modes/ctr128.c diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/cts128.c b/src/openssl/openssl-1.1.1w/crypto/modes/cts128.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/cts128.c rename to src/openssl/openssl-1.1.1w/crypto/modes/cts128.c diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/gcm128.c b/src/openssl/openssl-1.1.1w/crypto/modes/gcm128.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/gcm128.c rename to src/openssl/openssl-1.1.1w/crypto/modes/gcm128.c diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/modes_local.h b/src/openssl/openssl-1.1.1w/crypto/modes/modes_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/modes_local.h rename to src/openssl/openssl-1.1.1w/crypto/modes/modes_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/ocb128.c b/src/openssl/openssl-1.1.1w/crypto/modes/ocb128.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/ocb128.c rename to src/openssl/openssl-1.1.1w/crypto/modes/ocb128.c diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/ofb128.c b/src/openssl/openssl-1.1.1w/crypto/modes/ofb128.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/ofb128.c rename to src/openssl/openssl-1.1.1w/crypto/modes/ofb128.c diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/wrap128.c b/src/openssl/openssl-1.1.1w/crypto/modes/wrap128.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/wrap128.c rename to src/openssl/openssl-1.1.1w/crypto/modes/wrap128.c diff --git a/src/openssl/openssl-1.1.1t/crypto/modes/xts128.c b/src/openssl/openssl-1.1.1w/crypto/modes/xts128.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/modes/xts128.c rename to src/openssl/openssl-1.1.1w/crypto/modes/xts128.c diff --git a/src/openssl/openssl-1.1.1t/crypto/o_dir.c b/src/openssl/openssl-1.1.1w/crypto/o_dir.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/o_dir.c rename to src/openssl/openssl-1.1.1w/crypto/o_dir.c diff --git a/src/openssl/openssl-1.1.1t/crypto/o_fips.c b/src/openssl/openssl-1.1.1w/crypto/o_fips.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/o_fips.c rename to src/openssl/openssl-1.1.1w/crypto/o_fips.c diff --git a/src/openssl/openssl-1.1.1t/crypto/o_fopen.c b/src/openssl/openssl-1.1.1w/crypto/o_fopen.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/o_fopen.c rename to src/openssl/openssl-1.1.1w/crypto/o_fopen.c diff --git a/src/openssl/openssl-1.1.1t/crypto/o_init.c b/src/openssl/openssl-1.1.1w/crypto/o_init.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/o_init.c rename to src/openssl/openssl-1.1.1w/crypto/o_init.c diff --git a/src/openssl/openssl-1.1.1t/crypto/o_str.c b/src/openssl/openssl-1.1.1w/crypto/o_str.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/o_str.c rename to src/openssl/openssl-1.1.1w/crypto/o_str.c diff --git a/src/openssl/openssl-1.1.1t/crypto/o_time.c b/src/openssl/openssl-1.1.1w/crypto/o_time.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/o_time.c rename to src/openssl/openssl-1.1.1w/crypto/o_time.c diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/README b/src/openssl/openssl-1.1.1w/crypto/objects/README similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/README rename to src/openssl/openssl-1.1.1w/crypto/objects/README diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/build.info b/src/openssl/openssl-1.1.1w/crypto/objects/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/build.info rename to src/openssl/openssl-1.1.1w/crypto/objects/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/o_names.c b/src/openssl/openssl-1.1.1w/crypto/objects/o_names.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/o_names.c rename to src/openssl/openssl-1.1.1w/crypto/objects/o_names.c diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/obj_dat.c b/src/openssl/openssl-1.1.1w/crypto/objects/obj_dat.c similarity index 96% rename from src/openssl/openssl-1.1.1t/crypto/objects/obj_dat.c rename to src/openssl/openssl-1.1.1w/crypto/objects/obj_dat.c index 7e8de727f..e1b4c589d 100644 --- a/src/openssl/openssl-1.1.1t/crypto/objects/obj_dat.c +++ b/src/openssl/openssl-1.1.1w/crypto/objects/obj_dat.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -428,6 +428,25 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) first = 1; bl = NULL; + /* + * RFC 2578 (STD 58) says this about OBJECT IDENTIFIERs: + * + * > 3.5. OBJECT IDENTIFIER values + * > + * > An OBJECT IDENTIFIER value is an ordered list of non-negative + * > numbers. For the SMIv2, each number in the list is referred to as a + * > sub-identifier, there are at most 128 sub-identifiers in a value, + * > and each sub-identifier has a maximum value of 2^32-1 (4294967295 + * > decimal). + * + * So a legitimate OID according to this RFC is at most (32 * 128 / 7), + * i.e. 586 bytes long. + * + * Ref: https://datatracker.ietf.org/doc/html/rfc2578#section-3.5 + */ + if (len > 586) + goto err; + while (len > 0) { l = 0; use_bn = 0; diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/obj_dat.h b/src/openssl/openssl-1.1.1w/crypto/objects/obj_dat.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/obj_dat.h rename to src/openssl/openssl-1.1.1w/crypto/objects/obj_dat.h diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/obj_dat.pl b/src/openssl/openssl-1.1.1w/crypto/objects/obj_dat.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/obj_dat.pl rename to src/openssl/openssl-1.1.1w/crypto/objects/obj_dat.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/obj_err.c b/src/openssl/openssl-1.1.1w/crypto/objects/obj_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/obj_err.c rename to src/openssl/openssl-1.1.1w/crypto/objects/obj_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/obj_lib.c b/src/openssl/openssl-1.1.1w/crypto/objects/obj_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/obj_lib.c rename to src/openssl/openssl-1.1.1w/crypto/objects/obj_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/obj_local.h b/src/openssl/openssl-1.1.1w/crypto/objects/obj_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/obj_local.h rename to src/openssl/openssl-1.1.1w/crypto/objects/obj_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/obj_mac.num b/src/openssl/openssl-1.1.1w/crypto/objects/obj_mac.num similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/obj_mac.num rename to src/openssl/openssl-1.1.1w/crypto/objects/obj_mac.num diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/obj_xref.c b/src/openssl/openssl-1.1.1w/crypto/objects/obj_xref.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/obj_xref.c rename to src/openssl/openssl-1.1.1w/crypto/objects/obj_xref.c diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/obj_xref.h b/src/openssl/openssl-1.1.1w/crypto/objects/obj_xref.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/obj_xref.h rename to src/openssl/openssl-1.1.1w/crypto/objects/obj_xref.h diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/obj_xref.txt b/src/openssl/openssl-1.1.1w/crypto/objects/obj_xref.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/obj_xref.txt rename to src/openssl/openssl-1.1.1w/crypto/objects/obj_xref.txt diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/objects.pl b/src/openssl/openssl-1.1.1w/crypto/objects/objects.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/objects.pl rename to src/openssl/openssl-1.1.1w/crypto/objects/objects.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/objects.txt b/src/openssl/openssl-1.1.1w/crypto/objects/objects.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/objects.txt rename to src/openssl/openssl-1.1.1w/crypto/objects/objects.txt diff --git a/src/openssl/openssl-1.1.1t/crypto/objects/objxref.pl b/src/openssl/openssl-1.1.1w/crypto/objects/objxref.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/objects/objxref.pl rename to src/openssl/openssl-1.1.1w/crypto/objects/objxref.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/ocsp/build.info b/src/openssl/openssl-1.1.1w/crypto/ocsp/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ocsp/build.info rename to src/openssl/openssl-1.1.1w/crypto/ocsp/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_asn.c b/src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_asn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_asn.c rename to src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_asn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_cl.c b/src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_cl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_cl.c rename to src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_cl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_err.c b/src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_err.c rename to src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_ext.c b/src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_ext.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_ext.c rename to src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_ext.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_ht.c b/src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_ht.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_ht.c rename to src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_ht.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_lib.c b/src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_lib.c rename to src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_local.h b/src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_local.h rename to src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_prn.c b/src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_prn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_prn.c rename to src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_prn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_srv.c b/src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_srv.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_srv.c rename to src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_srv.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_vfy.c b/src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_vfy.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ocsp/ocsp_vfy.c rename to src/openssl/openssl-1.1.1w/crypto/ocsp/ocsp_vfy.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ocsp/v3_ocsp.c b/src/openssl/openssl-1.1.1w/crypto/ocsp/v3_ocsp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ocsp/v3_ocsp.c rename to src/openssl/openssl-1.1.1w/crypto/ocsp/v3_ocsp.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pariscid.pl b/src/openssl/openssl-1.1.1w/crypto/pariscid.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pariscid.pl rename to src/openssl/openssl-1.1.1w/crypto/pariscid.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/pem/build.info b/src/openssl/openssl-1.1.1w/crypto/pem/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pem/build.info rename to src/openssl/openssl-1.1.1w/crypto/pem/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/pem/pem_all.c b/src/openssl/openssl-1.1.1w/crypto/pem/pem_all.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pem/pem_all.c rename to src/openssl/openssl-1.1.1w/crypto/pem/pem_all.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pem/pem_err.c b/src/openssl/openssl-1.1.1w/crypto/pem/pem_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pem/pem_err.c rename to src/openssl/openssl-1.1.1w/crypto/pem/pem_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pem/pem_info.c b/src/openssl/openssl-1.1.1w/crypto/pem/pem_info.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pem/pem_info.c rename to src/openssl/openssl-1.1.1w/crypto/pem/pem_info.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pem/pem_lib.c b/src/openssl/openssl-1.1.1w/crypto/pem/pem_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pem/pem_lib.c rename to src/openssl/openssl-1.1.1w/crypto/pem/pem_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pem/pem_oth.c b/src/openssl/openssl-1.1.1w/crypto/pem/pem_oth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pem/pem_oth.c rename to src/openssl/openssl-1.1.1w/crypto/pem/pem_oth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pem/pem_pk8.c b/src/openssl/openssl-1.1.1w/crypto/pem/pem_pk8.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pem/pem_pk8.c rename to src/openssl/openssl-1.1.1w/crypto/pem/pem_pk8.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pem/pem_pkey.c b/src/openssl/openssl-1.1.1w/crypto/pem/pem_pkey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pem/pem_pkey.c rename to src/openssl/openssl-1.1.1w/crypto/pem/pem_pkey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pem/pem_sign.c b/src/openssl/openssl-1.1.1w/crypto/pem/pem_sign.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pem/pem_sign.c rename to src/openssl/openssl-1.1.1w/crypto/pem/pem_sign.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pem/pem_x509.c b/src/openssl/openssl-1.1.1w/crypto/pem/pem_x509.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pem/pem_x509.c rename to src/openssl/openssl-1.1.1w/crypto/pem/pem_x509.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pem/pem_xaux.c b/src/openssl/openssl-1.1.1w/crypto/pem/pem_xaux.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pem/pem_xaux.c rename to src/openssl/openssl-1.1.1w/crypto/pem/pem_xaux.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pem/pvkfmt.c b/src/openssl/openssl-1.1.1w/crypto/pem/pvkfmt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pem/pvkfmt.c rename to src/openssl/openssl-1.1.1w/crypto/pem/pvkfmt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/perlasm/README b/src/openssl/openssl-1.1.1w/crypto/perlasm/README similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/perlasm/README rename to src/openssl/openssl-1.1.1w/crypto/perlasm/README diff --git a/src/openssl/openssl-1.1.1t/crypto/perlasm/arm-xlate.pl b/src/openssl/openssl-1.1.1w/crypto/perlasm/arm-xlate.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/perlasm/arm-xlate.pl rename to src/openssl/openssl-1.1.1w/crypto/perlasm/arm-xlate.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/perlasm/cbc.pl b/src/openssl/openssl-1.1.1w/crypto/perlasm/cbc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/perlasm/cbc.pl rename to src/openssl/openssl-1.1.1w/crypto/perlasm/cbc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/perlasm/ppc-xlate.pl b/src/openssl/openssl-1.1.1w/crypto/perlasm/ppc-xlate.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/perlasm/ppc-xlate.pl rename to src/openssl/openssl-1.1.1w/crypto/perlasm/ppc-xlate.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/perlasm/sparcv9_modes.pl b/src/openssl/openssl-1.1.1w/crypto/perlasm/sparcv9_modes.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/perlasm/sparcv9_modes.pl rename to src/openssl/openssl-1.1.1w/crypto/perlasm/sparcv9_modes.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/perlasm/x86_64-xlate.pl b/src/openssl/openssl-1.1.1w/crypto/perlasm/x86_64-xlate.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/perlasm/x86_64-xlate.pl rename to src/openssl/openssl-1.1.1w/crypto/perlasm/x86_64-xlate.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/perlasm/x86asm.pl b/src/openssl/openssl-1.1.1w/crypto/perlasm/x86asm.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/perlasm/x86asm.pl rename to src/openssl/openssl-1.1.1w/crypto/perlasm/x86asm.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/perlasm/x86gas.pl b/src/openssl/openssl-1.1.1w/crypto/perlasm/x86gas.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/perlasm/x86gas.pl rename to src/openssl/openssl-1.1.1w/crypto/perlasm/x86gas.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/perlasm/x86masm.pl b/src/openssl/openssl-1.1.1w/crypto/perlasm/x86masm.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/perlasm/x86masm.pl rename to src/openssl/openssl-1.1.1w/crypto/perlasm/x86masm.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/perlasm/x86nasm.pl b/src/openssl/openssl-1.1.1w/crypto/perlasm/x86nasm.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/perlasm/x86nasm.pl rename to src/openssl/openssl-1.1.1w/crypto/perlasm/x86nasm.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/build.info b/src/openssl/openssl-1.1.1w/crypto/pkcs12/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/build.info rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_add.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_add.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_add.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_add.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_asn.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_asn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_asn.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_asn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_attr.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_attr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_attr.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_attr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_crpt.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_crpt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_crpt.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_crpt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_crt.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_crt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_crt.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_crt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_decr.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_decr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_decr.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_decr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_init.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_init.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_init.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_init.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_key.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_key.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_key.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_key.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_kiss.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_kiss.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_kiss.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_kiss.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_local.h b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_local.h rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_mutl.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_mutl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_mutl.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_mutl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_npas.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_npas.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_npas.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_npas.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_p8d.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_p8d.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_p8d.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_p8d.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_p8e.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_p8e.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_p8e.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_p8e.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_sbag.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_sbag.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_sbag.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_sbag.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_utl.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_utl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/p12_utl.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/p12_utl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs12/pk12err.c b/src/openssl/openssl-1.1.1w/crypto/pkcs12/pk12err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs12/pk12err.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs12/pk12err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs7/bio_pk7.c b/src/openssl/openssl-1.1.1w/crypto/pkcs7/bio_pk7.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs7/bio_pk7.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs7/bio_pk7.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs7/build.info b/src/openssl/openssl-1.1.1w/crypto/pkcs7/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs7/build.info rename to src/openssl/openssl-1.1.1w/crypto/pkcs7/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs7/pk7_asn1.c b/src/openssl/openssl-1.1.1w/crypto/pkcs7/pk7_asn1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs7/pk7_asn1.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs7/pk7_asn1.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs7/pk7_attr.c b/src/openssl/openssl-1.1.1w/crypto/pkcs7/pk7_attr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs7/pk7_attr.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs7/pk7_attr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs7/pk7_doit.c b/src/openssl/openssl-1.1.1w/crypto/pkcs7/pk7_doit.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs7/pk7_doit.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs7/pk7_doit.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs7/pk7_lib.c b/src/openssl/openssl-1.1.1w/crypto/pkcs7/pk7_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs7/pk7_lib.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs7/pk7_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs7/pk7_mime.c b/src/openssl/openssl-1.1.1w/crypto/pkcs7/pk7_mime.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs7/pk7_mime.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs7/pk7_mime.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs7/pk7_smime.c b/src/openssl/openssl-1.1.1w/crypto/pkcs7/pk7_smime.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs7/pk7_smime.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs7/pk7_smime.c diff --git a/src/openssl/openssl-1.1.1t/crypto/pkcs7/pkcs7err.c b/src/openssl/openssl-1.1.1w/crypto/pkcs7/pkcs7err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/pkcs7/pkcs7err.c rename to src/openssl/openssl-1.1.1w/crypto/pkcs7/pkcs7err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-armv4.pl b/src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-armv4.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-armv4.pl rename to src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-armv4.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-armv8.pl b/src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-armv8.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-armv8.pl rename to src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-armv8.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-c64xplus.pl b/src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-c64xplus.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-c64xplus.pl rename to src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-c64xplus.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-mips.pl b/src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-mips.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-mips.pl rename to src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-mips.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-ppc.pl b/src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-ppc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-ppc.pl rename to src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-ppc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-ppcfp.pl b/src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-ppcfp.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-ppcfp.pl rename to src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-ppcfp.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-s390x.pl b/src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-s390x.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-s390x.pl rename to src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-s390x.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-sparcv9.pl b/src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-sparcv9.pl rename to src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-sparcv9.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-x86.pl b/src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-x86.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-x86.pl rename to src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-x86.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-x86_64.pl similarity index 99% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-x86_64.pl index 5f834d8fa..5e2bb18f2 100755 --- a/src/openssl/openssl-1.1.1t/crypto/poly1305/asm/poly1305-x86_64.pl +++ b/src/openssl/openssl-1.1.1w/crypto/poly1305/asm/poly1305-x86_64.pl @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2023 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -193,7 +193,7 @@ sub poly1305_iteration { bt \$`5+32`,%r9 # AVX2? cmovc %rax,%r10 ___ -$code.=<<___ if ($avx>3); +$code.=<<___ if ($avx>3 && !$win64); mov \$`(1<<31|1<<21|1<<16)`,%rax shr \$32,%r9 and %rax,%r9 @@ -2722,7 +2722,7 @@ sub poly1305_iteration { .cfi_endproc .size poly1305_blocks_avx512,.-poly1305_blocks_avx512 ___ -if ($avx>3) { +if ($avx>3 && !$win64) { ######################################################################## # VPMADD52 version using 2^44 radix. # diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/build.info b/src/openssl/openssl-1.1.1w/crypto/poly1305/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/build.info rename to src/openssl/openssl-1.1.1w/crypto/poly1305/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/poly1305.c b/src/openssl/openssl-1.1.1w/crypto/poly1305/poly1305.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/poly1305.c rename to src/openssl/openssl-1.1.1w/crypto/poly1305/poly1305.c diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/poly1305_ameth.c b/src/openssl/openssl-1.1.1w/crypto/poly1305/poly1305_ameth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/poly1305_ameth.c rename to src/openssl/openssl-1.1.1w/crypto/poly1305/poly1305_ameth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/poly1305_base2_44.c b/src/openssl/openssl-1.1.1w/crypto/poly1305/poly1305_base2_44.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/poly1305_base2_44.c rename to src/openssl/openssl-1.1.1w/crypto/poly1305/poly1305_base2_44.c diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/poly1305_ieee754.c b/src/openssl/openssl-1.1.1w/crypto/poly1305/poly1305_ieee754.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/poly1305_ieee754.c rename to src/openssl/openssl-1.1.1w/crypto/poly1305/poly1305_ieee754.c diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/poly1305_local.h b/src/openssl/openssl-1.1.1w/crypto/poly1305/poly1305_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/poly1305_local.h rename to src/openssl/openssl-1.1.1w/crypto/poly1305/poly1305_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/poly1305/poly1305_pmeth.c b/src/openssl/openssl-1.1.1w/crypto/poly1305/poly1305_pmeth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/poly1305/poly1305_pmeth.c rename to src/openssl/openssl-1.1.1w/crypto/poly1305/poly1305_pmeth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ppc_arch.h b/src/openssl/openssl-1.1.1w/crypto/ppc_arch.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ppc_arch.h rename to src/openssl/openssl-1.1.1w/crypto/ppc_arch.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ppccap.c b/src/openssl/openssl-1.1.1w/crypto/ppccap.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ppccap.c rename to src/openssl/openssl-1.1.1w/crypto/ppccap.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ppccpuid.pl b/src/openssl/openssl-1.1.1w/crypto/ppccpuid.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ppccpuid.pl rename to src/openssl/openssl-1.1.1w/crypto/ppccpuid.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/rand/build.info b/src/openssl/openssl-1.1.1w/crypto/rand/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rand/build.info rename to src/openssl/openssl-1.1.1w/crypto/rand/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/rand/drbg_ctr.c b/src/openssl/openssl-1.1.1w/crypto/rand/drbg_ctr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rand/drbg_ctr.c rename to src/openssl/openssl-1.1.1w/crypto/rand/drbg_ctr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rand/drbg_lib.c b/src/openssl/openssl-1.1.1w/crypto/rand/drbg_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rand/drbg_lib.c rename to src/openssl/openssl-1.1.1w/crypto/rand/drbg_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rand/rand_egd.c b/src/openssl/openssl-1.1.1w/crypto/rand/rand_egd.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rand/rand_egd.c rename to src/openssl/openssl-1.1.1w/crypto/rand/rand_egd.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rand/rand_err.c b/src/openssl/openssl-1.1.1w/crypto/rand/rand_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rand/rand_err.c rename to src/openssl/openssl-1.1.1w/crypto/rand/rand_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rand/rand_lib.c b/src/openssl/openssl-1.1.1w/crypto/rand/rand_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rand/rand_lib.c rename to src/openssl/openssl-1.1.1w/crypto/rand/rand_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rand/rand_local.h b/src/openssl/openssl-1.1.1w/crypto/rand/rand_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rand/rand_local.h rename to src/openssl/openssl-1.1.1w/crypto/rand/rand_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/rand/rand_unix.c b/src/openssl/openssl-1.1.1w/crypto/rand/rand_unix.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rand/rand_unix.c rename to src/openssl/openssl-1.1.1w/crypto/rand/rand_unix.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rand/rand_vms.c b/src/openssl/openssl-1.1.1w/crypto/rand/rand_vms.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rand/rand_vms.c rename to src/openssl/openssl-1.1.1w/crypto/rand/rand_vms.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rand/rand_win.c b/src/openssl/openssl-1.1.1w/crypto/rand/rand_win.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rand/rand_win.c rename to src/openssl/openssl-1.1.1w/crypto/rand/rand_win.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rand/randfile.c b/src/openssl/openssl-1.1.1w/crypto/rand/randfile.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rand/randfile.c rename to src/openssl/openssl-1.1.1w/crypto/rand/randfile.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rc2/build.info b/src/openssl/openssl-1.1.1w/crypto/rc2/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc2/build.info rename to src/openssl/openssl-1.1.1w/crypto/rc2/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/rc2/rc2_cbc.c b/src/openssl/openssl-1.1.1w/crypto/rc2/rc2_cbc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc2/rc2_cbc.c rename to src/openssl/openssl-1.1.1w/crypto/rc2/rc2_cbc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rc2/rc2_ecb.c b/src/openssl/openssl-1.1.1w/crypto/rc2/rc2_ecb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc2/rc2_ecb.c rename to src/openssl/openssl-1.1.1w/crypto/rc2/rc2_ecb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rc2/rc2_local.h b/src/openssl/openssl-1.1.1w/crypto/rc2/rc2_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc2/rc2_local.h rename to src/openssl/openssl-1.1.1w/crypto/rc2/rc2_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/rc2/rc2_skey.c b/src/openssl/openssl-1.1.1w/crypto/rc2/rc2_skey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc2/rc2_skey.c rename to src/openssl/openssl-1.1.1w/crypto/rc2/rc2_skey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rc2/rc2cfb64.c b/src/openssl/openssl-1.1.1w/crypto/rc2/rc2cfb64.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc2/rc2cfb64.c rename to src/openssl/openssl-1.1.1w/crypto/rc2/rc2cfb64.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rc2/rc2ofb64.c b/src/openssl/openssl-1.1.1w/crypto/rc2/rc2ofb64.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc2/rc2ofb64.c rename to src/openssl/openssl-1.1.1w/crypto/rc2/rc2ofb64.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rc4/asm/rc4-586.pl b/src/openssl/openssl-1.1.1w/crypto/rc4/asm/rc4-586.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc4/asm/rc4-586.pl rename to src/openssl/openssl-1.1.1w/crypto/rc4/asm/rc4-586.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/rc4/asm/rc4-c64xplus.pl b/src/openssl/openssl-1.1.1w/crypto/rc4/asm/rc4-c64xplus.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc4/asm/rc4-c64xplus.pl rename to src/openssl/openssl-1.1.1w/crypto/rc4/asm/rc4-c64xplus.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/rc4/asm/rc4-md5-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/rc4/asm/rc4-md5-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc4/asm/rc4-md5-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/rc4/asm/rc4-md5-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/rc4/asm/rc4-parisc.pl b/src/openssl/openssl-1.1.1w/crypto/rc4/asm/rc4-parisc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc4/asm/rc4-parisc.pl rename to src/openssl/openssl-1.1.1w/crypto/rc4/asm/rc4-parisc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/rc4/asm/rc4-s390x.pl b/src/openssl/openssl-1.1.1w/crypto/rc4/asm/rc4-s390x.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc4/asm/rc4-s390x.pl rename to src/openssl/openssl-1.1.1w/crypto/rc4/asm/rc4-s390x.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/rc4/asm/rc4-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/rc4/asm/rc4-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc4/asm/rc4-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/rc4/asm/rc4-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/rc4/build.info b/src/openssl/openssl-1.1.1w/crypto/rc4/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc4/build.info rename to src/openssl/openssl-1.1.1w/crypto/rc4/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/rc4/rc4_enc.c b/src/openssl/openssl-1.1.1w/crypto/rc4/rc4_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc4/rc4_enc.c rename to src/openssl/openssl-1.1.1w/crypto/rc4/rc4_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rc4/rc4_local.h b/src/openssl/openssl-1.1.1w/crypto/rc4/rc4_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc4/rc4_local.h rename to src/openssl/openssl-1.1.1w/crypto/rc4/rc4_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/rc4/rc4_skey.c b/src/openssl/openssl-1.1.1w/crypto/rc4/rc4_skey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc4/rc4_skey.c rename to src/openssl/openssl-1.1.1w/crypto/rc4/rc4_skey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rc5/asm/rc5-586.pl b/src/openssl/openssl-1.1.1w/crypto/rc5/asm/rc5-586.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc5/asm/rc5-586.pl rename to src/openssl/openssl-1.1.1w/crypto/rc5/asm/rc5-586.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/rc5/build.info b/src/openssl/openssl-1.1.1w/crypto/rc5/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc5/build.info rename to src/openssl/openssl-1.1.1w/crypto/rc5/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/rc5/rc5_ecb.c b/src/openssl/openssl-1.1.1w/crypto/rc5/rc5_ecb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc5/rc5_ecb.c rename to src/openssl/openssl-1.1.1w/crypto/rc5/rc5_ecb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rc5/rc5_enc.c b/src/openssl/openssl-1.1.1w/crypto/rc5/rc5_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc5/rc5_enc.c rename to src/openssl/openssl-1.1.1w/crypto/rc5/rc5_enc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rc5/rc5_local.h b/src/openssl/openssl-1.1.1w/crypto/rc5/rc5_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc5/rc5_local.h rename to src/openssl/openssl-1.1.1w/crypto/rc5/rc5_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/rc5/rc5_skey.c b/src/openssl/openssl-1.1.1w/crypto/rc5/rc5_skey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc5/rc5_skey.c rename to src/openssl/openssl-1.1.1w/crypto/rc5/rc5_skey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rc5/rc5cfb64.c b/src/openssl/openssl-1.1.1w/crypto/rc5/rc5cfb64.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc5/rc5cfb64.c rename to src/openssl/openssl-1.1.1w/crypto/rc5/rc5cfb64.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rc5/rc5ofb64.c b/src/openssl/openssl-1.1.1w/crypto/rc5/rc5ofb64.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rc5/rc5ofb64.c rename to src/openssl/openssl-1.1.1w/crypto/rc5/rc5ofb64.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ripemd/asm/rmd-586.pl b/src/openssl/openssl-1.1.1w/crypto/ripemd/asm/rmd-586.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ripemd/asm/rmd-586.pl rename to src/openssl/openssl-1.1.1w/crypto/ripemd/asm/rmd-586.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/ripemd/build.info b/src/openssl/openssl-1.1.1w/crypto/ripemd/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ripemd/build.info rename to src/openssl/openssl-1.1.1w/crypto/ripemd/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/ripemd/rmd_dgst.c b/src/openssl/openssl-1.1.1w/crypto/ripemd/rmd_dgst.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ripemd/rmd_dgst.c rename to src/openssl/openssl-1.1.1w/crypto/ripemd/rmd_dgst.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ripemd/rmd_local.h b/src/openssl/openssl-1.1.1w/crypto/ripemd/rmd_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ripemd/rmd_local.h rename to src/openssl/openssl-1.1.1w/crypto/ripemd/rmd_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ripemd/rmd_one.c b/src/openssl/openssl-1.1.1w/crypto/ripemd/rmd_one.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ripemd/rmd_one.c rename to src/openssl/openssl-1.1.1w/crypto/ripemd/rmd_one.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ripemd/rmdconst.h b/src/openssl/openssl-1.1.1w/crypto/ripemd/rmdconst.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ripemd/rmdconst.h rename to src/openssl/openssl-1.1.1w/crypto/ripemd/rmdconst.h diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/build.info b/src/openssl/openssl-1.1.1w/crypto/rsa/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/build.info rename to src/openssl/openssl-1.1.1w/crypto/rsa/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_ameth.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_ameth.c similarity index 99% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_ameth.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_ameth.c index 2c9c46ea5..00ed9820b 100644 --- a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_ameth.c +++ b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_ameth.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -82,13 +82,16 @@ static int rsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) if (!rsa_param_encode(pkey, &str, &strtype)) return 0; penclen = i2d_RSAPublicKey(pkey->pkey.rsa, &penc); - if (penclen <= 0) + if (penclen <= 0) { + ASN1_STRING_free(str); return 0; + } if (X509_PUBKEY_set0_param(pk, OBJ_nid2obj(pkey->ameth->pkey_id), strtype, str, penc, penclen)) return 1; OPENSSL_free(penc); + ASN1_STRING_free(str); return 0; } diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_asn1.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_asn1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_asn1.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_asn1.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_chk.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_chk.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_chk.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_chk.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_crpt.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_crpt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_crpt.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_crpt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_depr.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_depr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_depr.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_depr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_err.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_err.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_gen.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_gen.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_gen.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_gen.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_lib.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_lib.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_local.h b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_local.h rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_meth.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_meth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_meth.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_meth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_mp.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_mp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_mp.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_mp.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_none.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_none.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_none.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_none.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_oaep.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_oaep.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_oaep.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_oaep.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_ossl.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_ossl.c similarity index 97% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_ossl.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_ossl.c index 2e3ee4ab3..cf5a10ab4 100644 --- a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_ossl.c +++ b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_ossl.c @@ -226,6 +226,7 @@ static int rsa_blinding_invert(BN_BLINDING *b, BIGNUM *f, BIGNUM *unblind, * will only read the modulus from BN_BLINDING. In both cases it's safe * to access the blinding without a lock. */ + BN_set_flags(f, BN_FLG_CONSTTIME); return BN_BLINDING_invert_ex(f, unblind, b, ctx); } @@ -412,6 +413,11 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from, goto err; } + if (rsa->flags & RSA_FLAG_CACHE_PUBLIC) + if (!BN_MONT_CTX_set_locked(&rsa->_method_mod_n, rsa->lock, + rsa->n, ctx)) + goto err; + if (!(rsa->flags & RSA_FLAG_NO_BLINDING)) { blinding = rsa_get_blinding(rsa, &local_blinding, ctx); if (blinding == NULL) { @@ -449,13 +455,6 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from, goto err; } BN_with_flags(d, rsa->d, BN_FLG_CONSTTIME); - - if (rsa->flags & RSA_FLAG_CACHE_PUBLIC) - if (!BN_MONT_CTX_set_locked(&rsa->_method_mod_n, rsa->lock, - rsa->n, ctx)) { - BN_free(d); - goto err; - } if (!rsa->meth->bn_mod_exp(ret, f, d, rsa->n, ctx, rsa->_method_mod_n)) { BN_free(d); @@ -465,20 +464,11 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from, BN_free(d); } - if (blinding) { - /* - * ossl_bn_rsa_do_unblind() combines blinding inversion and - * 0-padded BN BE serialization - */ - j = ossl_bn_rsa_do_unblind(ret, blinding, unblind, rsa->n, ctx, - buf, num); - if (j == 0) - goto err; - } else { - j = BN_bn2binpad(ret, buf, num); - if (j < 0) + if (blinding) + if (!rsa_blinding_invert(blinding, ret, unblind, ctx)) goto err; - } + + j = BN_bn2binpad(ret, buf, num); switch (padding) { case RSA_PKCS1_PADDING: diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_pk1.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_pk1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_pk1.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_pk1.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_pmeth.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_pmeth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_pmeth.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_pmeth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_prn.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_prn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_prn.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_prn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_pss.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_pss.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_pss.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_pss.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_saos.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_saos.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_saos.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_saos.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_sign.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_sign.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_sign.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_sign.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_ssl.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_ssl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_ssl.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_ssl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_x931.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_x931.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_x931.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_x931.c diff --git a/src/openssl/openssl-1.1.1t/crypto/rsa/rsa_x931g.c b/src/openssl/openssl-1.1.1w/crypto/rsa/rsa_x931g.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/rsa/rsa_x931g.c rename to src/openssl/openssl-1.1.1w/crypto/rsa/rsa_x931g.c diff --git a/src/openssl/openssl-1.1.1t/crypto/s390x_arch.h b/src/openssl/openssl-1.1.1w/crypto/s390x_arch.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/s390x_arch.h rename to src/openssl/openssl-1.1.1w/crypto/s390x_arch.h diff --git a/src/openssl/openssl-1.1.1t/crypto/s390xcap.c b/src/openssl/openssl-1.1.1w/crypto/s390xcap.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/s390xcap.c rename to src/openssl/openssl-1.1.1w/crypto/s390xcap.c diff --git a/src/openssl/openssl-1.1.1t/crypto/s390xcpuid.pl b/src/openssl/openssl-1.1.1w/crypto/s390xcpuid.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/s390xcpuid.pl rename to src/openssl/openssl-1.1.1w/crypto/s390xcpuid.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/seed/build.info b/src/openssl/openssl-1.1.1w/crypto/seed/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/seed/build.info rename to src/openssl/openssl-1.1.1w/crypto/seed/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/seed/seed.c b/src/openssl/openssl-1.1.1w/crypto/seed/seed.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/seed/seed.c rename to src/openssl/openssl-1.1.1w/crypto/seed/seed.c diff --git a/src/openssl/openssl-1.1.1t/crypto/seed/seed_cbc.c b/src/openssl/openssl-1.1.1w/crypto/seed/seed_cbc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/seed/seed_cbc.c rename to src/openssl/openssl-1.1.1w/crypto/seed/seed_cbc.c diff --git a/src/openssl/openssl-1.1.1t/crypto/seed/seed_cfb.c b/src/openssl/openssl-1.1.1w/crypto/seed/seed_cfb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/seed/seed_cfb.c rename to src/openssl/openssl-1.1.1w/crypto/seed/seed_cfb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/seed/seed_ecb.c b/src/openssl/openssl-1.1.1w/crypto/seed/seed_ecb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/seed/seed_ecb.c rename to src/openssl/openssl-1.1.1w/crypto/seed/seed_ecb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/seed/seed_local.h b/src/openssl/openssl-1.1.1w/crypto/seed/seed_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/seed/seed_local.h rename to src/openssl/openssl-1.1.1w/crypto/seed/seed_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/seed/seed_ofb.c b/src/openssl/openssl-1.1.1w/crypto/seed/seed_ofb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/seed/seed_ofb.c rename to src/openssl/openssl-1.1.1w/crypto/seed/seed_ofb.c diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-armv4.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-armv4.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-armv4.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-armv4.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-armv8.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-armv8.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-armv8.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-armv8.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-avx2.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-avx2.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-avx2.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-avx2.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-avx512.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-avx512.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-avx512.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-avx512.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-avx512vl.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-avx512vl.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-avx512vl.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-avx512vl.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-c64x.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-c64x.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-c64x.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-c64x.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-mmx.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-mmx.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-mmx.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-mmx.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-ppc64.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-ppc64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-ppc64.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-ppc64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-s390x.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-s390x.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-s390x.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-s390x.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600p8-ppc.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600p8-ppc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/keccak1600p8-ppc.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/keccak1600p8-ppc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-586.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-586.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-586.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-586.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-alpha.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-alpha.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-alpha.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-alpha.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-armv4-large.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-armv4-large.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-armv4-large.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-armv4-large.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-armv8.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-armv8.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-armv8.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-armv8.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-c64xplus.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-c64xplus.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-c64xplus.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-c64xplus.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-ia64.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-ia64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-ia64.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-ia64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-mb-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-mb-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-mb-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-mb-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-mips.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-mips.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-mips.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-mips.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-parisc.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-parisc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-parisc.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-parisc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-ppc.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-ppc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-ppc.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-ppc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-s390x.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-s390x.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-s390x.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-s390x.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-sparcv9.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-sparcv9.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-sparcv9.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-sparcv9a.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-sparcv9a.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-sparcv9a.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-sparcv9a.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-thumb.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-thumb.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-thumb.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-thumb.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha1-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha1-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha256-586.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha256-586.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha256-586.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha256-586.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha256-armv4.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha256-armv4.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha256-armv4.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha256-armv4.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha256-c64xplus.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha256-c64xplus.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha256-c64xplus.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha256-c64xplus.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha256-mb-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha256-mb-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha256-mb-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha256-mb-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-586.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-586.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-586.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-586.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-armv4.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-armv4.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-armv4.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-armv4.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-armv8.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-armv8.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-armv8.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-armv8.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-c64xplus.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-c64xplus.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-c64xplus.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-c64xplus.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-ia64.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-ia64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-ia64.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-ia64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-mips.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-mips.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-mips.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-mips.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-parisc.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-parisc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-parisc.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-parisc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-ppc.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-ppc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-ppc.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-ppc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-s390x.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-s390x.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-s390x.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-s390x.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-sparcv9.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-sparcv9.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-sparcv9.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-sparcv9.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512p8-ppc.pl b/src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512p8-ppc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/asm/sha512p8-ppc.pl rename to src/openssl/openssl-1.1.1w/crypto/sha/asm/sha512p8-ppc.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/build.info b/src/openssl/openssl-1.1.1w/crypto/sha/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/build.info rename to src/openssl/openssl-1.1.1w/crypto/sha/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/keccak1600.c b/src/openssl/openssl-1.1.1w/crypto/sha/keccak1600.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/keccak1600.c rename to src/openssl/openssl-1.1.1w/crypto/sha/keccak1600.c diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/sha1_one.c b/src/openssl/openssl-1.1.1w/crypto/sha/sha1_one.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/sha1_one.c rename to src/openssl/openssl-1.1.1w/crypto/sha/sha1_one.c diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/sha1dgst.c b/src/openssl/openssl-1.1.1w/crypto/sha/sha1dgst.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/sha1dgst.c rename to src/openssl/openssl-1.1.1w/crypto/sha/sha1dgst.c diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/sha256.c b/src/openssl/openssl-1.1.1w/crypto/sha/sha256.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/sha256.c rename to src/openssl/openssl-1.1.1w/crypto/sha/sha256.c diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/sha512.c b/src/openssl/openssl-1.1.1w/crypto/sha/sha512.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/sha512.c rename to src/openssl/openssl-1.1.1w/crypto/sha/sha512.c diff --git a/src/openssl/openssl-1.1.1t/crypto/sha/sha_local.h b/src/openssl/openssl-1.1.1w/crypto/sha/sha_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sha/sha_local.h rename to src/openssl/openssl-1.1.1w/crypto/sha/sha_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/siphash/build.info b/src/openssl/openssl-1.1.1w/crypto/siphash/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/siphash/build.info rename to src/openssl/openssl-1.1.1w/crypto/siphash/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/siphash/siphash.c b/src/openssl/openssl-1.1.1w/crypto/siphash/siphash.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/siphash/siphash.c rename to src/openssl/openssl-1.1.1w/crypto/siphash/siphash.c diff --git a/src/openssl/openssl-1.1.1t/crypto/siphash/siphash_ameth.c b/src/openssl/openssl-1.1.1w/crypto/siphash/siphash_ameth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/siphash/siphash_ameth.c rename to src/openssl/openssl-1.1.1w/crypto/siphash/siphash_ameth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/siphash/siphash_local.h b/src/openssl/openssl-1.1.1w/crypto/siphash/siphash_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/siphash/siphash_local.h rename to src/openssl/openssl-1.1.1w/crypto/siphash/siphash_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/siphash/siphash_pmeth.c b/src/openssl/openssl-1.1.1w/crypto/siphash/siphash_pmeth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/siphash/siphash_pmeth.c rename to src/openssl/openssl-1.1.1w/crypto/siphash/siphash_pmeth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/sm2/build.info b/src/openssl/openssl-1.1.1w/crypto/sm2/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sm2/build.info rename to src/openssl/openssl-1.1.1w/crypto/sm2/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/sm2/sm2_crypt.c b/src/openssl/openssl-1.1.1w/crypto/sm2/sm2_crypt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sm2/sm2_crypt.c rename to src/openssl/openssl-1.1.1w/crypto/sm2/sm2_crypt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/sm2/sm2_err.c b/src/openssl/openssl-1.1.1w/crypto/sm2/sm2_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sm2/sm2_err.c rename to src/openssl/openssl-1.1.1w/crypto/sm2/sm2_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/sm2/sm2_pmeth.c b/src/openssl/openssl-1.1.1w/crypto/sm2/sm2_pmeth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sm2/sm2_pmeth.c rename to src/openssl/openssl-1.1.1w/crypto/sm2/sm2_pmeth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/sm2/sm2_sign.c b/src/openssl/openssl-1.1.1w/crypto/sm2/sm2_sign.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sm2/sm2_sign.c rename to src/openssl/openssl-1.1.1w/crypto/sm2/sm2_sign.c diff --git a/src/openssl/openssl-1.1.1t/crypto/sm3/build.info b/src/openssl/openssl-1.1.1w/crypto/sm3/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sm3/build.info rename to src/openssl/openssl-1.1.1w/crypto/sm3/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/sm3/m_sm3.c b/src/openssl/openssl-1.1.1w/crypto/sm3/m_sm3.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sm3/m_sm3.c rename to src/openssl/openssl-1.1.1w/crypto/sm3/m_sm3.c diff --git a/src/openssl/openssl-1.1.1t/crypto/sm3/sm3.c b/src/openssl/openssl-1.1.1w/crypto/sm3/sm3.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sm3/sm3.c rename to src/openssl/openssl-1.1.1w/crypto/sm3/sm3.c diff --git a/src/openssl/openssl-1.1.1t/crypto/sm3/sm3_local.h b/src/openssl/openssl-1.1.1w/crypto/sm3/sm3_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sm3/sm3_local.h rename to src/openssl/openssl-1.1.1w/crypto/sm3/sm3_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/sm4/build.info b/src/openssl/openssl-1.1.1w/crypto/sm4/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sm4/build.info rename to src/openssl/openssl-1.1.1w/crypto/sm4/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/sm4/sm4.c b/src/openssl/openssl-1.1.1w/crypto/sm4/sm4.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sm4/sm4.c rename to src/openssl/openssl-1.1.1w/crypto/sm4/sm4.c diff --git a/src/openssl/openssl-1.1.1t/crypto/sparc_arch.h b/src/openssl/openssl-1.1.1w/crypto/sparc_arch.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sparc_arch.h rename to src/openssl/openssl-1.1.1w/crypto/sparc_arch.h diff --git a/src/openssl/openssl-1.1.1t/crypto/sparccpuid.S b/src/openssl/openssl-1.1.1w/crypto/sparccpuid.S similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sparccpuid.S rename to src/openssl/openssl-1.1.1w/crypto/sparccpuid.S diff --git a/src/openssl/openssl-1.1.1t/crypto/sparcv9cap.c b/src/openssl/openssl-1.1.1w/crypto/sparcv9cap.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/sparcv9cap.c rename to src/openssl/openssl-1.1.1w/crypto/sparcv9cap.c diff --git a/src/openssl/openssl-1.1.1t/crypto/srp/build.info b/src/openssl/openssl-1.1.1w/crypto/srp/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/srp/build.info rename to src/openssl/openssl-1.1.1w/crypto/srp/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/srp/srp_lib.c b/src/openssl/openssl-1.1.1w/crypto/srp/srp_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/srp/srp_lib.c rename to src/openssl/openssl-1.1.1w/crypto/srp/srp_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/srp/srp_vfy.c b/src/openssl/openssl-1.1.1w/crypto/srp/srp_vfy.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/srp/srp_vfy.c rename to src/openssl/openssl-1.1.1w/crypto/srp/srp_vfy.c diff --git a/src/openssl/openssl-1.1.1t/crypto/stack/build.info b/src/openssl/openssl-1.1.1w/crypto/stack/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/stack/build.info rename to src/openssl/openssl-1.1.1w/crypto/stack/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/stack/stack.c b/src/openssl/openssl-1.1.1w/crypto/stack/stack.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/stack/stack.c rename to src/openssl/openssl-1.1.1w/crypto/stack/stack.c diff --git a/src/openssl/openssl-1.1.1t/crypto/store/build.info b/src/openssl/openssl-1.1.1w/crypto/store/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/store/build.info rename to src/openssl/openssl-1.1.1w/crypto/store/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/store/loader_file.c b/src/openssl/openssl-1.1.1w/crypto/store/loader_file.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/store/loader_file.c rename to src/openssl/openssl-1.1.1w/crypto/store/loader_file.c diff --git a/src/openssl/openssl-1.1.1t/crypto/store/store_err.c b/src/openssl/openssl-1.1.1w/crypto/store/store_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/store/store_err.c rename to src/openssl/openssl-1.1.1w/crypto/store/store_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/store/store_init.c b/src/openssl/openssl-1.1.1w/crypto/store/store_init.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/store/store_init.c rename to src/openssl/openssl-1.1.1w/crypto/store/store_init.c diff --git a/src/openssl/openssl-1.1.1t/crypto/store/store_lib.c b/src/openssl/openssl-1.1.1w/crypto/store/store_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/store/store_lib.c rename to src/openssl/openssl-1.1.1w/crypto/store/store_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/store/store_local.h b/src/openssl/openssl-1.1.1w/crypto/store/store_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/store/store_local.h rename to src/openssl/openssl-1.1.1w/crypto/store/store_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/store/store_register.c b/src/openssl/openssl-1.1.1w/crypto/store/store_register.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/store/store_register.c rename to src/openssl/openssl-1.1.1w/crypto/store/store_register.c diff --git a/src/openssl/openssl-1.1.1t/crypto/store/store_strings.c b/src/openssl/openssl-1.1.1w/crypto/store/store_strings.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/store/store_strings.c rename to src/openssl/openssl-1.1.1w/crypto/store/store_strings.c diff --git a/src/openssl/openssl-1.1.1t/crypto/threads_none.c b/src/openssl/openssl-1.1.1w/crypto/threads_none.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/threads_none.c rename to src/openssl/openssl-1.1.1w/crypto/threads_none.c diff --git a/src/openssl/openssl-1.1.1t/crypto/threads_pthread.c b/src/openssl/openssl-1.1.1w/crypto/threads_pthread.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/threads_pthread.c rename to src/openssl/openssl-1.1.1w/crypto/threads_pthread.c diff --git a/src/openssl/openssl-1.1.1t/crypto/threads_win.c b/src/openssl/openssl-1.1.1w/crypto/threads_win.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/threads_win.c rename to src/openssl/openssl-1.1.1w/crypto/threads_win.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ts/build.info b/src/openssl/openssl-1.1.1w/crypto/ts/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ts/build.info rename to src/openssl/openssl-1.1.1w/crypto/ts/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/ts/ts_asn1.c b/src/openssl/openssl-1.1.1w/crypto/ts/ts_asn1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ts/ts_asn1.c rename to src/openssl/openssl-1.1.1w/crypto/ts/ts_asn1.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ts/ts_conf.c b/src/openssl/openssl-1.1.1w/crypto/ts/ts_conf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ts/ts_conf.c rename to src/openssl/openssl-1.1.1w/crypto/ts/ts_conf.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ts/ts_err.c b/src/openssl/openssl-1.1.1w/crypto/ts/ts_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ts/ts_err.c rename to src/openssl/openssl-1.1.1w/crypto/ts/ts_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ts/ts_lib.c b/src/openssl/openssl-1.1.1w/crypto/ts/ts_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ts/ts_lib.c rename to src/openssl/openssl-1.1.1w/crypto/ts/ts_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ts/ts_local.h b/src/openssl/openssl-1.1.1w/crypto/ts/ts_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ts/ts_local.h rename to src/openssl/openssl-1.1.1w/crypto/ts/ts_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ts/ts_req_print.c b/src/openssl/openssl-1.1.1w/crypto/ts/ts_req_print.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ts/ts_req_print.c rename to src/openssl/openssl-1.1.1w/crypto/ts/ts_req_print.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ts/ts_req_utils.c b/src/openssl/openssl-1.1.1w/crypto/ts/ts_req_utils.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ts/ts_req_utils.c rename to src/openssl/openssl-1.1.1w/crypto/ts/ts_req_utils.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ts/ts_rsp_print.c b/src/openssl/openssl-1.1.1w/crypto/ts/ts_rsp_print.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ts/ts_rsp_print.c rename to src/openssl/openssl-1.1.1w/crypto/ts/ts_rsp_print.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ts/ts_rsp_sign.c b/src/openssl/openssl-1.1.1w/crypto/ts/ts_rsp_sign.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ts/ts_rsp_sign.c rename to src/openssl/openssl-1.1.1w/crypto/ts/ts_rsp_sign.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ts/ts_rsp_utils.c b/src/openssl/openssl-1.1.1w/crypto/ts/ts_rsp_utils.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ts/ts_rsp_utils.c rename to src/openssl/openssl-1.1.1w/crypto/ts/ts_rsp_utils.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ts/ts_rsp_verify.c b/src/openssl/openssl-1.1.1w/crypto/ts/ts_rsp_verify.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ts/ts_rsp_verify.c rename to src/openssl/openssl-1.1.1w/crypto/ts/ts_rsp_verify.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ts/ts_verify_ctx.c b/src/openssl/openssl-1.1.1w/crypto/ts/ts_verify_ctx.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ts/ts_verify_ctx.c rename to src/openssl/openssl-1.1.1w/crypto/ts/ts_verify_ctx.c diff --git a/src/openssl/openssl-1.1.1t/crypto/txt_db/build.info b/src/openssl/openssl-1.1.1w/crypto/txt_db/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/txt_db/build.info rename to src/openssl/openssl-1.1.1w/crypto/txt_db/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/txt_db/txt_db.c b/src/openssl/openssl-1.1.1w/crypto/txt_db/txt_db.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/txt_db/txt_db.c rename to src/openssl/openssl-1.1.1w/crypto/txt_db/txt_db.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ui/build.info b/src/openssl/openssl-1.1.1w/crypto/ui/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ui/build.info rename to src/openssl/openssl-1.1.1w/crypto/ui/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/ui/ui_err.c b/src/openssl/openssl-1.1.1w/crypto/ui/ui_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ui/ui_err.c rename to src/openssl/openssl-1.1.1w/crypto/ui/ui_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ui/ui_lib.c b/src/openssl/openssl-1.1.1w/crypto/ui/ui_lib.c similarity index 99% rename from src/openssl/openssl-1.1.1t/crypto/ui/ui_lib.c rename to src/openssl/openssl-1.1.1w/crypto/ui/ui_lib.c index 49cc45057..335a3d3d2 100644 --- a/src/openssl/openssl-1.1.1t/crypto/ui/ui_lib.c +++ b/src/openssl/openssl-1.1.1w/crypto/ui/ui_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 2001-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2001-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -529,6 +529,10 @@ int UI_process(UI *ui) ok = 0; break; } + } else { + ui->flags &= ~UI_FLAG_REDOABLE; + ok = -2; + goto err; } } diff --git a/src/openssl/openssl-1.1.1t/crypto/ui/ui_local.h b/src/openssl/openssl-1.1.1w/crypto/ui/ui_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ui/ui_local.h rename to src/openssl/openssl-1.1.1w/crypto/ui/ui_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/ui/ui_null.c b/src/openssl/openssl-1.1.1w/crypto/ui/ui_null.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ui/ui_null.c rename to src/openssl/openssl-1.1.1w/crypto/ui/ui_null.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ui/ui_openssl.c b/src/openssl/openssl-1.1.1w/crypto/ui/ui_openssl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/ui/ui_openssl.c rename to src/openssl/openssl-1.1.1w/crypto/ui/ui_openssl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/ui/ui_util.c b/src/openssl/openssl-1.1.1w/crypto/ui/ui_util.c similarity index 97% rename from src/openssl/openssl-1.1.1t/crypto/ui/ui_util.c rename to src/openssl/openssl-1.1.1w/crypto/ui/ui_util.c index 32a3c4e38..754c75671 100644 --- a/src/openssl/openssl-1.1.1t/crypto/ui/ui_util.c +++ b/src/openssl/openssl-1.1.1w/crypto/ui/ui_util.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -32,7 +32,7 @@ int UI_UTIL_read_pw_string(char *buf, int length, const char *prompt, int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt, int verify) { - int ok = 0; + int ok = -2; UI *ui; if (size < 1) @@ -47,8 +47,6 @@ int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt, ok = UI_process(ui); UI_free(ui); } - if (ok > 0) - ok = 0; return ok; } diff --git a/src/openssl/openssl-1.1.1t/crypto/uid.c b/src/openssl/openssl-1.1.1w/crypto/uid.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/uid.c rename to src/openssl/openssl-1.1.1w/crypto/uid.c diff --git a/src/openssl/openssl-1.1.1t/crypto/vms_rms.h b/src/openssl/openssl-1.1.1w/crypto/vms_rms.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/vms_rms.h rename to src/openssl/openssl-1.1.1w/crypto/vms_rms.h diff --git a/src/openssl/openssl-1.1.1t/crypto/whrlpool/asm/wp-mmx.pl b/src/openssl/openssl-1.1.1w/crypto/whrlpool/asm/wp-mmx.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/whrlpool/asm/wp-mmx.pl rename to src/openssl/openssl-1.1.1w/crypto/whrlpool/asm/wp-mmx.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/whrlpool/asm/wp-x86_64.pl b/src/openssl/openssl-1.1.1w/crypto/whrlpool/asm/wp-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/whrlpool/asm/wp-x86_64.pl rename to src/openssl/openssl-1.1.1w/crypto/whrlpool/asm/wp-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/whrlpool/build.info b/src/openssl/openssl-1.1.1w/crypto/whrlpool/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/whrlpool/build.info rename to src/openssl/openssl-1.1.1w/crypto/whrlpool/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/whrlpool/wp_block.c b/src/openssl/openssl-1.1.1w/crypto/whrlpool/wp_block.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/whrlpool/wp_block.c rename to src/openssl/openssl-1.1.1w/crypto/whrlpool/wp_block.c diff --git a/src/openssl/openssl-1.1.1t/crypto/whrlpool/wp_dgst.c b/src/openssl/openssl-1.1.1w/crypto/whrlpool/wp_dgst.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/whrlpool/wp_dgst.c rename to src/openssl/openssl-1.1.1w/crypto/whrlpool/wp_dgst.c diff --git a/src/openssl/openssl-1.1.1t/crypto/whrlpool/wp_local.h b/src/openssl/openssl-1.1.1w/crypto/whrlpool/wp_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/whrlpool/wp_local.h rename to src/openssl/openssl-1.1.1w/crypto/whrlpool/wp_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/build.info b/src/openssl/openssl-1.1.1w/crypto/x509/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/build.info rename to src/openssl/openssl-1.1.1w/crypto/x509/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/by_dir.c b/src/openssl/openssl-1.1.1w/crypto/x509/by_dir.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/by_dir.c rename to src/openssl/openssl-1.1.1w/crypto/x509/by_dir.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/by_file.c b/src/openssl/openssl-1.1.1w/crypto/x509/by_file.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/by_file.c rename to src/openssl/openssl-1.1.1w/crypto/x509/by_file.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/t_crl.c b/src/openssl/openssl-1.1.1w/crypto/x509/t_crl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/t_crl.c rename to src/openssl/openssl-1.1.1w/crypto/x509/t_crl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/t_req.c b/src/openssl/openssl-1.1.1w/crypto/x509/t_req.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/t_req.c rename to src/openssl/openssl-1.1.1w/crypto/x509/t_req.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/t_x509.c b/src/openssl/openssl-1.1.1w/crypto/x509/t_x509.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/t_x509.c rename to src/openssl/openssl-1.1.1w/crypto/x509/t_x509.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_att.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_att.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_att.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_att.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_cmp.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_cmp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_cmp.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_cmp.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_d2.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_d2.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_d2.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_d2.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_def.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_def.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_def.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_def.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_err.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_err.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_ext.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_ext.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_ext.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_ext.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_local.h b/src/openssl/openssl-1.1.1w/crypto/x509/x509_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_local.h rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_local.h diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_lu.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_lu.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_lu.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_lu.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_meth.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_meth.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_meth.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_meth.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_obj.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_obj.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_obj.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_obj.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_r2x.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_r2x.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_r2x.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_r2x.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_req.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_req.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_req.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_req.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_set.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_set.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_set.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_set.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_trs.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_trs.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_trs.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_trs.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_txt.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_txt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_txt.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_txt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_v3.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_v3.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_v3.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_v3.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_vfy.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_vfy.c similarity index 99% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_vfy.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_vfy.c index 925fbb541..66b532a16 100644 --- a/src/openssl/openssl-1.1.1t/crypto/x509/x509_vfy.c +++ b/src/openssl/openssl-1.1.1w/crypto/x509/x509_vfy.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -1649,18 +1649,25 @@ static int check_policy(X509_STORE_CTX *ctx) } /* Invalid or inconsistent extensions */ if (ret == X509_PCY_TREE_INVALID) { - int i; + int i, cbcalled = 0; /* Locate certificates with bad extensions and notify callback. */ - for (i = 1; i < sk_X509_num(ctx->chain); i++) { + for (i = 0; i < sk_X509_num(ctx->chain); i++) { X509 *x = sk_X509_value(ctx->chain, i); if (!(x->ex_flags & EXFLAG_INVALID_POLICY)) continue; + cbcalled = 1; if (!verify_cb_cert(ctx, x, i, X509_V_ERR_INVALID_POLICY_EXTENSION)) return 0; } + if (!cbcalled) { + /* Should not be able to get here */ + X509err(X509_F_CHECK_POLICY, ERR_R_INTERNAL_ERROR); + return 0; + } + /* The callback ignored the error so we return success */ return 1; } if (ret == X509_PCY_TREE_FAILURE) { diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509_vpm.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509_vpm.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509_vpm.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509_vpm.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509cset.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509cset.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509cset.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509cset.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509name.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509name.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509name.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509name.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509rset.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509rset.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509rset.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509rset.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509spki.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509spki.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509spki.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509spki.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x509type.c b/src/openssl/openssl-1.1.1w/crypto/x509/x509type.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x509type.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x509type.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x_all.c b/src/openssl/openssl-1.1.1w/crypto/x509/x_all.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x_all.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x_all.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x_attrib.c b/src/openssl/openssl-1.1.1w/crypto/x509/x_attrib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x_attrib.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x_attrib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x_crl.c b/src/openssl/openssl-1.1.1w/crypto/x509/x_crl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x_crl.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x_crl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x_exten.c b/src/openssl/openssl-1.1.1w/crypto/x509/x_exten.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x_exten.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x_exten.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x_name.c b/src/openssl/openssl-1.1.1w/crypto/x509/x_name.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x_name.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x_name.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x_pubkey.c b/src/openssl/openssl-1.1.1w/crypto/x509/x_pubkey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x_pubkey.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x_pubkey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x_req.c b/src/openssl/openssl-1.1.1w/crypto/x509/x_req.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x_req.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x_req.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x_x509.c b/src/openssl/openssl-1.1.1w/crypto/x509/x_x509.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x_x509.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x_x509.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509/x_x509a.c b/src/openssl/openssl-1.1.1w/crypto/x509/x_x509a.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509/x_x509a.c rename to src/openssl/openssl-1.1.1w/crypto/x509/x_x509a.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/build.info b/src/openssl/openssl-1.1.1w/crypto/x509v3/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/build.info rename to src/openssl/openssl-1.1.1w/crypto/x509v3/build.info diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/ext_dat.h b/src/openssl/openssl-1.1.1w/crypto/x509v3/ext_dat.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/ext_dat.h rename to src/openssl/openssl-1.1.1w/crypto/x509v3/ext_dat.h diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_cache.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_cache.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_cache.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_cache.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_data.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_data.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_data.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_data.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_lib.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_lib.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_local.h b/src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_local.h similarity index 94% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_local.h rename to src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_local.h index 5daf78de4..70d77bfb0 100644 --- a/src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_local.h +++ b/src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_local.h @@ -1,5 +1,5 @@ /* - * Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2004-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -111,6 +111,11 @@ struct X509_POLICY_LEVEL_st { }; struct X509_POLICY_TREE_st { + /* The number of nodes in the tree */ + size_t node_count; + /* The maximum number of nodes in the tree */ + size_t node_maximum; + /* This is the tree 'level' data */ X509_POLICY_LEVEL *levels; int nlevel; @@ -159,7 +164,8 @@ X509_POLICY_NODE *tree_find_sk(STACK_OF(X509_POLICY_NODE) *sk, X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level, X509_POLICY_DATA *data, X509_POLICY_NODE *parent, - X509_POLICY_TREE *tree); + X509_POLICY_TREE *tree, + int extra_data); void policy_node_free(X509_POLICY_NODE *node); int policy_node_match(const X509_POLICY_LEVEL *lvl, const X509_POLICY_NODE *node, const ASN1_OBJECT *oid); diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_map.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_map.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_map.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_map.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_node.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_node.c similarity index 85% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_node.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_node.c index e2d7b1532..78bf8b62f 100644 --- a/src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_node.c +++ b/src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_node.c @@ -1,5 +1,5 @@ /* - * Copyright 2004-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2004-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -59,10 +59,15 @@ X509_POLICY_NODE *level_find_node(const X509_POLICY_LEVEL *level, X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level, X509_POLICY_DATA *data, X509_POLICY_NODE *parent, - X509_POLICY_TREE *tree) + X509_POLICY_TREE *tree, + int extra_data) { X509_POLICY_NODE *node; + /* Verify that the tree isn't too large. This mitigates CVE-2023-0464 */ + if (tree->node_maximum > 0 && tree->node_count >= tree->node_maximum) + return NULL; + node = OPENSSL_zalloc(sizeof(*node)); if (node == NULL) { X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE); @@ -70,7 +75,7 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level, } node->data = data; node->parent = parent; - if (level) { + if (level != NULL) { if (OBJ_obj2nid(data->valid_policy) == NID_any_policy) { if (level->anyPolicy) goto node_error; @@ -90,24 +95,33 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level, } } - if (tree) { + if (extra_data) { if (tree->extra_data == NULL) tree->extra_data = sk_X509_POLICY_DATA_new_null(); if (tree->extra_data == NULL){ X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE); - goto node_error; + goto extra_data_error; } if (!sk_X509_POLICY_DATA_push(tree->extra_data, data)) { X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE); - goto node_error; + goto extra_data_error; } } + tree->node_count++; if (parent) parent->nchild++; return node; + extra_data_error: + if (level != NULL) { + if (level->anyPolicy == node) + level->anyPolicy = NULL; + else + (void) sk_X509_POLICY_NODE_pop(level->nodes); + } + node_error: policy_node_free(node); return NULL; diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_tree.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_tree.c similarity index 93% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_tree.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_tree.c index 6e8322cbc..8f09c9d09 100644 --- a/src/openssl/openssl-1.1.1t/crypto/x509v3/pcy_tree.c +++ b/src/openssl/openssl-1.1.1w/crypto/x509v3/pcy_tree.c @@ -1,5 +1,5 @@ /* - * Copyright 2004-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2004-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -13,6 +13,20 @@ #include "pcy_local.h" +/* + * If the maximum number of nodes in the policy tree isn't defined, set it to + * a generous default of 1000 nodes. + * + * Defining this to be zero means unlimited policy tree growth which opens the + * door on CVE-2023-0464. + */ + +#ifndef OPENSSL_POLICY_TREE_NODES_MAX +# define OPENSSL_POLICY_TREE_NODES_MAX 1000 +#endif + +static void exnode_free(X509_POLICY_NODE *node); + /* * Enable this to print out the complete policy tree at various point during * evaluation. @@ -168,6 +182,9 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs, return X509_PCY_TREE_INTERNAL; } + /* Limit the growth of the tree to mitigate CVE-2023-0464 */ + tree->node_maximum = OPENSSL_POLICY_TREE_NODES_MAX; + /* * http://tools.ietf.org/html/rfc5280#section-6.1.2, figure 3. * @@ -184,7 +201,7 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs, level = tree->levels; if ((data = policy_data_new(NULL, OBJ_nid2obj(NID_any_policy), 0)) == NULL) goto bad_tree; - if (level_add_node(level, data, NULL, tree) == NULL) { + if (level_add_node(level, data, NULL, tree, 1) == NULL) { policy_data_free(data); goto bad_tree; } @@ -243,7 +260,8 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs, * Return value: 1 on success, 0 otherwise */ static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr, - X509_POLICY_DATA *data) + X509_POLICY_DATA *data, + X509_POLICY_TREE *tree) { X509_POLICY_LEVEL *last = curr - 1; int i, matched = 0; @@ -253,13 +271,13 @@ static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr, X509_POLICY_NODE *node = sk_X509_POLICY_NODE_value(last->nodes, i); if (policy_node_match(last, node, data->valid_policy)) { - if (level_add_node(curr, data, node, NULL) == NULL) + if (level_add_node(curr, data, node, tree, 0) == NULL) return 0; matched = 1; } } if (!matched && last->anyPolicy) { - if (level_add_node(curr, data, last->anyPolicy, NULL) == NULL) + if (level_add_node(curr, data, last->anyPolicy, tree, 0) == NULL) return 0; } return 1; @@ -272,7 +290,8 @@ static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr, * Return value: 1 on success, 0 otherwise. */ static int tree_link_nodes(X509_POLICY_LEVEL *curr, - const X509_POLICY_CACHE *cache) + const X509_POLICY_CACHE *cache, + X509_POLICY_TREE *tree) { int i; @@ -280,7 +299,7 @@ static int tree_link_nodes(X509_POLICY_LEVEL *curr, X509_POLICY_DATA *data = sk_X509_POLICY_DATA_value(cache->data, i); /* Look for matching nodes in previous level */ - if (!tree_link_matching_nodes(curr, data)) + if (!tree_link_matching_nodes(curr, data, tree)) return 0; } return 1; @@ -311,7 +330,7 @@ static int tree_add_unmatched(X509_POLICY_LEVEL *curr, /* Curr may not have anyPolicy */ data->qualifier_set = cache->anyPolicy->qualifier_set; data->flags |= POLICY_DATA_FLAG_SHARED_QUALIFIERS; - if (level_add_node(curr, data, node, tree) == NULL) { + if (level_add_node(curr, data, node, tree, 1) == NULL) { policy_data_free(data); return 0; } @@ -373,7 +392,7 @@ static int tree_link_any(X509_POLICY_LEVEL *curr, } /* Finally add link to anyPolicy */ if (last->anyPolicy && - level_add_node(curr, cache->anyPolicy, last->anyPolicy, NULL) == NULL) + level_add_node(curr, cache->anyPolicy, last->anyPolicy, tree, 0) == NULL) return 0; return 1; } @@ -555,15 +574,24 @@ static int tree_calculate_user_set(X509_POLICY_TREE *tree, extra->qualifier_set = anyPolicy->data->qualifier_set; extra->flags = POLICY_DATA_FLAG_SHARED_QUALIFIERS | POLICY_DATA_FLAG_EXTRA_NODE; - node = level_add_node(NULL, extra, anyPolicy->parent, tree); + node = level_add_node(NULL, extra, anyPolicy->parent, + tree, 1); + if (node == NULL) { + policy_data_free(extra); + return 0; + } } if (!tree->user_policies) { tree->user_policies = sk_X509_POLICY_NODE_new_null(); - if (!tree->user_policies) - return 1; + if (!tree->user_policies) { + exnode_free(node); + return 0; + } } - if (!sk_X509_POLICY_NODE_push(tree->user_policies, node)) + if (!sk_X509_POLICY_NODE_push(tree->user_policies, node)) { + exnode_free(node); return 0; + } } return 1; } @@ -582,7 +610,7 @@ static int tree_evaluate(X509_POLICY_TREE *tree) for (i = 1; i < tree->nlevel; i++, curr++) { cache = policy_cache_set(curr->cert); - if (!tree_link_nodes(curr, cache)) + if (!tree_link_nodes(curr, cache, tree)) return X509_PCY_TREE_INTERNAL; if (!(curr->flags & X509_V_FLAG_INHIBIT_ANY) diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/standard_exts.h b/src/openssl/openssl-1.1.1w/crypto/x509v3/standard_exts.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/standard_exts.h rename to src/openssl/openssl-1.1.1w/crypto/x509v3/standard_exts.h diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_addr.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_addr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_addr.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_addr.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_admis.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_admis.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_admis.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_admis.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_admis.h b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_admis.h similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_admis.h rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_admis.h diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_akey.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_akey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_akey.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_akey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_akeya.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_akeya.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_akeya.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_akeya.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_alt.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_alt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_alt.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_alt.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_asid.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_asid.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_asid.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_asid.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_bcons.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_bcons.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_bcons.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_bcons.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_bitst.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_bitst.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_bitst.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_bitst.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_conf.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_conf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_conf.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_conf.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_cpols.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_cpols.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_cpols.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_cpols.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_crld.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_crld.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_crld.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_crld.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_enum.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_enum.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_enum.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_enum.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_extku.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_extku.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_extku.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_extku.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_genn.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_genn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_genn.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_genn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_ia5.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_ia5.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_ia5.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_ia5.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_info.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_info.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_info.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_info.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_int.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_int.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_int.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_int.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_lib.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_lib.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_lib.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_ncons.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_ncons.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_ncons.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_ncons.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_pci.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_pci.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_pci.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_pci.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_pcia.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_pcia.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_pcia.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_pcia.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_pcons.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_pcons.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_pcons.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_pcons.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_pku.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_pku.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_pku.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_pku.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_pmaps.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_pmaps.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_pmaps.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_pmaps.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_prn.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_prn.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_prn.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_prn.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_purp.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_purp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_purp.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_purp.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_skey.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_skey.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_skey.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_skey.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_sxnet.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_sxnet.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_sxnet.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_sxnet.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_tlsf.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_tlsf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_tlsf.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_tlsf.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3_utl.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3_utl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3_utl.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3_utl.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x509v3/v3err.c b/src/openssl/openssl-1.1.1w/crypto/x509v3/v3err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x509v3/v3err.c rename to src/openssl/openssl-1.1.1w/crypto/x509v3/v3err.c diff --git a/src/openssl/openssl-1.1.1t/crypto/x86_64cpuid.pl b/src/openssl/openssl-1.1.1w/crypto/x86_64cpuid.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x86_64cpuid.pl rename to src/openssl/openssl-1.1.1w/crypto/x86_64cpuid.pl diff --git a/src/openssl/openssl-1.1.1t/crypto/x86cpuid.pl b/src/openssl/openssl-1.1.1w/crypto/x86cpuid.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/crypto/x86cpuid.pl rename to src/openssl/openssl-1.1.1w/crypto/x86cpuid.pl diff --git a/src/openssl/openssl-1.1.1t/demos/README b/src/openssl/openssl-1.1.1w/demos/README similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/README rename to src/openssl/openssl-1.1.1w/demos/README diff --git a/src/openssl/openssl-1.1.1t/demos/bio/Makefile b/src/openssl/openssl-1.1.1w/demos/bio/Makefile similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/Makefile rename to src/openssl/openssl-1.1.1w/demos/bio/Makefile diff --git a/src/openssl/openssl-1.1.1t/demos/bio/README b/src/openssl/openssl-1.1.1w/demos/bio/README similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/README rename to src/openssl/openssl-1.1.1w/demos/bio/README diff --git a/src/openssl/openssl-1.1.1t/demos/bio/accept.cnf b/src/openssl/openssl-1.1.1w/demos/bio/accept.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/accept.cnf rename to src/openssl/openssl-1.1.1w/demos/bio/accept.cnf diff --git a/src/openssl/openssl-1.1.1t/demos/bio/client-arg.c b/src/openssl/openssl-1.1.1w/demos/bio/client-arg.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/client-arg.c rename to src/openssl/openssl-1.1.1w/demos/bio/client-arg.c diff --git a/src/openssl/openssl-1.1.1t/demos/bio/client-conf.c b/src/openssl/openssl-1.1.1w/demos/bio/client-conf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/client-conf.c rename to src/openssl/openssl-1.1.1w/demos/bio/client-conf.c diff --git a/src/openssl/openssl-1.1.1t/demos/bio/cmod.cnf b/src/openssl/openssl-1.1.1w/demos/bio/cmod.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/cmod.cnf rename to src/openssl/openssl-1.1.1w/demos/bio/cmod.cnf diff --git a/src/openssl/openssl-1.1.1t/demos/bio/connect.cnf b/src/openssl/openssl-1.1.1w/demos/bio/connect.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/connect.cnf rename to src/openssl/openssl-1.1.1w/demos/bio/connect.cnf diff --git a/src/openssl/openssl-1.1.1t/demos/bio/descrip.mms b/src/openssl/openssl-1.1.1w/demos/bio/descrip.mms similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/descrip.mms rename to src/openssl/openssl-1.1.1w/demos/bio/descrip.mms diff --git a/src/openssl/openssl-1.1.1t/demos/bio/intca.pem b/src/openssl/openssl-1.1.1w/demos/bio/intca.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/intca.pem rename to src/openssl/openssl-1.1.1w/demos/bio/intca.pem diff --git a/src/openssl/openssl-1.1.1t/demos/bio/root.pem b/src/openssl/openssl-1.1.1w/demos/bio/root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/root.pem rename to src/openssl/openssl-1.1.1w/demos/bio/root.pem diff --git a/src/openssl/openssl-1.1.1t/demos/bio/saccept.c b/src/openssl/openssl-1.1.1w/demos/bio/saccept.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/saccept.c rename to src/openssl/openssl-1.1.1w/demos/bio/saccept.c diff --git a/src/openssl/openssl-1.1.1t/demos/bio/sconnect.c b/src/openssl/openssl-1.1.1w/demos/bio/sconnect.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/sconnect.c rename to src/openssl/openssl-1.1.1w/demos/bio/sconnect.c diff --git a/src/openssl/openssl-1.1.1t/demos/bio/server-arg.c b/src/openssl/openssl-1.1.1w/demos/bio/server-arg.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/server-arg.c rename to src/openssl/openssl-1.1.1w/demos/bio/server-arg.c diff --git a/src/openssl/openssl-1.1.1t/demos/bio/server-cmod.c b/src/openssl/openssl-1.1.1w/demos/bio/server-cmod.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/server-cmod.c rename to src/openssl/openssl-1.1.1w/demos/bio/server-cmod.c diff --git a/src/openssl/openssl-1.1.1t/demos/bio/server-conf.c b/src/openssl/openssl-1.1.1w/demos/bio/server-conf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/server-conf.c rename to src/openssl/openssl-1.1.1w/demos/bio/server-conf.c diff --git a/src/openssl/openssl-1.1.1t/demos/bio/server-ec.pem b/src/openssl/openssl-1.1.1w/demos/bio/server-ec.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/server-ec.pem rename to src/openssl/openssl-1.1.1w/demos/bio/server-ec.pem diff --git a/src/openssl/openssl-1.1.1t/demos/bio/server.pem b/src/openssl/openssl-1.1.1w/demos/bio/server.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/server.pem rename to src/openssl/openssl-1.1.1w/demos/bio/server.pem diff --git a/src/openssl/openssl-1.1.1t/demos/bio/shared.opt b/src/openssl/openssl-1.1.1w/demos/bio/shared.opt similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/shared.opt rename to src/openssl/openssl-1.1.1w/demos/bio/shared.opt diff --git a/src/openssl/openssl-1.1.1t/demos/bio/static.opt b/src/openssl/openssl-1.1.1w/demos/bio/static.opt similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/bio/static.opt rename to src/openssl/openssl-1.1.1w/demos/bio/static.opt diff --git a/src/openssl/openssl-1.1.1t/demos/certs/README b/src/openssl/openssl-1.1.1w/demos/certs/README similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/certs/README rename to src/openssl/openssl-1.1.1w/demos/certs/README diff --git a/src/openssl/openssl-1.1.1t/demos/certs/apps/apps.cnf b/src/openssl/openssl-1.1.1w/demos/certs/apps/apps.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/certs/apps/apps.cnf rename to src/openssl/openssl-1.1.1w/demos/certs/apps/apps.cnf diff --git a/src/openssl/openssl-1.1.1t/demos/certs/apps/ckey.pem b/src/openssl/openssl-1.1.1w/demos/certs/apps/ckey.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/certs/apps/ckey.pem rename to src/openssl/openssl-1.1.1w/demos/certs/apps/ckey.pem diff --git a/src/openssl/openssl-1.1.1t/demos/certs/apps/intkey.pem b/src/openssl/openssl-1.1.1w/demos/certs/apps/intkey.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/certs/apps/intkey.pem rename to src/openssl/openssl-1.1.1w/demos/certs/apps/intkey.pem diff --git a/src/openssl/openssl-1.1.1t/demos/certs/apps/mkacerts.sh b/src/openssl/openssl-1.1.1w/demos/certs/apps/mkacerts.sh similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/certs/apps/mkacerts.sh rename to src/openssl/openssl-1.1.1w/demos/certs/apps/mkacerts.sh diff --git a/src/openssl/openssl-1.1.1t/demos/certs/apps/mkxcerts.sh b/src/openssl/openssl-1.1.1w/demos/certs/apps/mkxcerts.sh similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/certs/apps/mkxcerts.sh rename to src/openssl/openssl-1.1.1w/demos/certs/apps/mkxcerts.sh diff --git a/src/openssl/openssl-1.1.1t/demos/certs/apps/rootkey.pem b/src/openssl/openssl-1.1.1w/demos/certs/apps/rootkey.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/certs/apps/rootkey.pem rename to src/openssl/openssl-1.1.1w/demos/certs/apps/rootkey.pem diff --git a/src/openssl/openssl-1.1.1t/demos/certs/apps/skey.pem b/src/openssl/openssl-1.1.1w/demos/certs/apps/skey.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/certs/apps/skey.pem rename to src/openssl/openssl-1.1.1w/demos/certs/apps/skey.pem diff --git a/src/openssl/openssl-1.1.1t/demos/certs/apps/skey2.pem b/src/openssl/openssl-1.1.1w/demos/certs/apps/skey2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/certs/apps/skey2.pem rename to src/openssl/openssl-1.1.1w/demos/certs/apps/skey2.pem diff --git a/src/openssl/openssl-1.1.1t/demos/certs/ca.cnf b/src/openssl/openssl-1.1.1w/demos/certs/ca.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/certs/ca.cnf rename to src/openssl/openssl-1.1.1w/demos/certs/ca.cnf diff --git a/src/openssl/openssl-1.1.1t/demos/certs/mkcerts.sh b/src/openssl/openssl-1.1.1w/demos/certs/mkcerts.sh similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/certs/mkcerts.sh rename to src/openssl/openssl-1.1.1w/demos/certs/mkcerts.sh diff --git a/src/openssl/openssl-1.1.1t/demos/certs/ocspquery.sh b/src/openssl/openssl-1.1.1w/demos/certs/ocspquery.sh similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/certs/ocspquery.sh rename to src/openssl/openssl-1.1.1w/demos/certs/ocspquery.sh diff --git a/src/openssl/openssl-1.1.1t/demos/certs/ocsprun.sh b/src/openssl/openssl-1.1.1w/demos/certs/ocsprun.sh similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/certs/ocsprun.sh rename to src/openssl/openssl-1.1.1w/demos/certs/ocsprun.sh diff --git a/src/openssl/openssl-1.1.1t/demos/cms/cacert.pem b/src/openssl/openssl-1.1.1w/demos/cms/cacert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/cacert.pem rename to src/openssl/openssl-1.1.1w/demos/cms/cacert.pem diff --git a/src/openssl/openssl-1.1.1t/demos/cms/cakey.pem b/src/openssl/openssl-1.1.1w/demos/cms/cakey.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/cakey.pem rename to src/openssl/openssl-1.1.1w/demos/cms/cakey.pem diff --git a/src/openssl/openssl-1.1.1t/demos/cms/cms_comp.c b/src/openssl/openssl-1.1.1w/demos/cms/cms_comp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/cms_comp.c rename to src/openssl/openssl-1.1.1w/demos/cms/cms_comp.c diff --git a/src/openssl/openssl-1.1.1t/demos/cms/cms_ddec.c b/src/openssl/openssl-1.1.1w/demos/cms/cms_ddec.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/cms_ddec.c rename to src/openssl/openssl-1.1.1w/demos/cms/cms_ddec.c diff --git a/src/openssl/openssl-1.1.1t/demos/cms/cms_dec.c b/src/openssl/openssl-1.1.1w/demos/cms/cms_dec.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/cms_dec.c rename to src/openssl/openssl-1.1.1w/demos/cms/cms_dec.c diff --git a/src/openssl/openssl-1.1.1t/demos/cms/cms_denc.c b/src/openssl/openssl-1.1.1w/demos/cms/cms_denc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/cms_denc.c rename to src/openssl/openssl-1.1.1w/demos/cms/cms_denc.c diff --git a/src/openssl/openssl-1.1.1t/demos/cms/cms_enc.c b/src/openssl/openssl-1.1.1w/demos/cms/cms_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/cms_enc.c rename to src/openssl/openssl-1.1.1w/demos/cms/cms_enc.c diff --git a/src/openssl/openssl-1.1.1t/demos/cms/cms_sign.c b/src/openssl/openssl-1.1.1w/demos/cms/cms_sign.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/cms_sign.c rename to src/openssl/openssl-1.1.1w/demos/cms/cms_sign.c diff --git a/src/openssl/openssl-1.1.1t/demos/cms/cms_sign2.c b/src/openssl/openssl-1.1.1w/demos/cms/cms_sign2.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/cms_sign2.c rename to src/openssl/openssl-1.1.1w/demos/cms/cms_sign2.c diff --git a/src/openssl/openssl-1.1.1t/demos/cms/cms_uncomp.c b/src/openssl/openssl-1.1.1w/demos/cms/cms_uncomp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/cms_uncomp.c rename to src/openssl/openssl-1.1.1w/demos/cms/cms_uncomp.c diff --git a/src/openssl/openssl-1.1.1t/demos/cms/cms_ver.c b/src/openssl/openssl-1.1.1w/demos/cms/cms_ver.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/cms_ver.c rename to src/openssl/openssl-1.1.1w/demos/cms/cms_ver.c diff --git a/src/openssl/openssl-1.1.1t/demos/cms/comp.txt b/src/openssl/openssl-1.1.1w/demos/cms/comp.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/comp.txt rename to src/openssl/openssl-1.1.1w/demos/cms/comp.txt diff --git a/src/openssl/openssl-1.1.1t/demos/cms/encr.txt b/src/openssl/openssl-1.1.1w/demos/cms/encr.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/encr.txt rename to src/openssl/openssl-1.1.1w/demos/cms/encr.txt diff --git a/src/openssl/openssl-1.1.1t/demos/cms/sign.txt b/src/openssl/openssl-1.1.1w/demos/cms/sign.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/sign.txt rename to src/openssl/openssl-1.1.1w/demos/cms/sign.txt diff --git a/src/openssl/openssl-1.1.1t/demos/cms/signer.pem b/src/openssl/openssl-1.1.1w/demos/cms/signer.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/signer.pem rename to src/openssl/openssl-1.1.1w/demos/cms/signer.pem diff --git a/src/openssl/openssl-1.1.1t/demos/cms/signer2.pem b/src/openssl/openssl-1.1.1w/demos/cms/signer2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/cms/signer2.pem rename to src/openssl/openssl-1.1.1w/demos/cms/signer2.pem diff --git a/src/openssl/openssl-1.1.1t/demos/engines/e_chil.txt b/src/openssl/openssl-1.1.1w/demos/engines/e_chil.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/engines/e_chil.txt rename to src/openssl/openssl-1.1.1w/demos/engines/e_chil.txt diff --git a/src/openssl/openssl-1.1.1t/demos/evp/Makefile b/src/openssl/openssl-1.1.1w/demos/evp/Makefile similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/evp/Makefile rename to src/openssl/openssl-1.1.1w/demos/evp/Makefile diff --git a/src/openssl/openssl-1.1.1t/demos/evp/aesccm.c b/src/openssl/openssl-1.1.1w/demos/evp/aesccm.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/evp/aesccm.c rename to src/openssl/openssl-1.1.1w/demos/evp/aesccm.c diff --git a/src/openssl/openssl-1.1.1t/demos/evp/aesgcm.c b/src/openssl/openssl-1.1.1w/demos/evp/aesgcm.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/evp/aesgcm.c rename to src/openssl/openssl-1.1.1w/demos/evp/aesgcm.c diff --git a/src/openssl/openssl-1.1.1t/demos/pkcs12/pkread.c b/src/openssl/openssl-1.1.1w/demos/pkcs12/pkread.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/pkcs12/pkread.c rename to src/openssl/openssl-1.1.1w/demos/pkcs12/pkread.c diff --git a/src/openssl/openssl-1.1.1t/demos/pkcs12/pkwrite.c b/src/openssl/openssl-1.1.1w/demos/pkcs12/pkwrite.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/pkcs12/pkwrite.c rename to src/openssl/openssl-1.1.1w/demos/pkcs12/pkwrite.c diff --git a/src/openssl/openssl-1.1.1t/demos/smime/cacert.pem b/src/openssl/openssl-1.1.1w/demos/smime/cacert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/smime/cacert.pem rename to src/openssl/openssl-1.1.1w/demos/smime/cacert.pem diff --git a/src/openssl/openssl-1.1.1t/demos/smime/cakey.pem b/src/openssl/openssl-1.1.1w/demos/smime/cakey.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/smime/cakey.pem rename to src/openssl/openssl-1.1.1w/demos/smime/cakey.pem diff --git a/src/openssl/openssl-1.1.1t/demos/smime/encr.txt b/src/openssl/openssl-1.1.1w/demos/smime/encr.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/smime/encr.txt rename to src/openssl/openssl-1.1.1w/demos/smime/encr.txt diff --git a/src/openssl/openssl-1.1.1t/demos/smime/sign.txt b/src/openssl/openssl-1.1.1w/demos/smime/sign.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/smime/sign.txt rename to src/openssl/openssl-1.1.1w/demos/smime/sign.txt diff --git a/src/openssl/openssl-1.1.1t/demos/smime/signer.pem b/src/openssl/openssl-1.1.1w/demos/smime/signer.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/smime/signer.pem rename to src/openssl/openssl-1.1.1w/demos/smime/signer.pem diff --git a/src/openssl/openssl-1.1.1t/demos/smime/signer2.pem b/src/openssl/openssl-1.1.1w/demos/smime/signer2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/smime/signer2.pem rename to src/openssl/openssl-1.1.1w/demos/smime/signer2.pem diff --git a/src/openssl/openssl-1.1.1t/demos/smime/smdec.c b/src/openssl/openssl-1.1.1w/demos/smime/smdec.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/smime/smdec.c rename to src/openssl/openssl-1.1.1w/demos/smime/smdec.c diff --git a/src/openssl/openssl-1.1.1t/demos/smime/smenc.c b/src/openssl/openssl-1.1.1w/demos/smime/smenc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/smime/smenc.c rename to src/openssl/openssl-1.1.1w/demos/smime/smenc.c diff --git a/src/openssl/openssl-1.1.1t/demos/smime/smsign.c b/src/openssl/openssl-1.1.1w/demos/smime/smsign.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/smime/smsign.c rename to src/openssl/openssl-1.1.1w/demos/smime/smsign.c diff --git a/src/openssl/openssl-1.1.1t/demos/smime/smsign2.c b/src/openssl/openssl-1.1.1w/demos/smime/smsign2.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/smime/smsign2.c rename to src/openssl/openssl-1.1.1w/demos/smime/smsign2.c diff --git a/src/openssl/openssl-1.1.1t/demos/smime/smver.c b/src/openssl/openssl-1.1.1w/demos/smime/smver.c similarity index 100% rename from src/openssl/openssl-1.1.1t/demos/smime/smver.c rename to src/openssl/openssl-1.1.1w/demos/smime/smver.c diff --git a/src/openssl/openssl-1.1.1t/doc/HOWTO/certificates.txt b/src/openssl/openssl-1.1.1w/doc/HOWTO/certificates.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/HOWTO/certificates.txt rename to src/openssl/openssl-1.1.1w/doc/HOWTO/certificates.txt diff --git a/src/openssl/openssl-1.1.1t/doc/HOWTO/keys.txt b/src/openssl/openssl-1.1.1w/doc/HOWTO/keys.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/HOWTO/keys.txt rename to src/openssl/openssl-1.1.1w/doc/HOWTO/keys.txt diff --git a/src/openssl/openssl-1.1.1t/doc/README b/src/openssl/openssl-1.1.1w/doc/README similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/README rename to src/openssl/openssl-1.1.1w/doc/README diff --git a/src/openssl/openssl-1.1.1t/doc/dir-locals.example.el b/src/openssl/openssl-1.1.1w/doc/dir-locals.example.el similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/dir-locals.example.el rename to src/openssl/openssl-1.1.1w/doc/dir-locals.example.el diff --git a/src/openssl/openssl-1.1.1t/doc/fingerprints.txt b/src/openssl/openssl-1.1.1w/doc/fingerprints.txt similarity index 86% rename from src/openssl/openssl-1.1.1t/doc/fingerprints.txt rename to src/openssl/openssl-1.1.1w/doc/fingerprints.txt index 3604fbdc6..0655df2fd 100644 --- a/src/openssl/openssl-1.1.1t/doc/fingerprints.txt +++ b/src/openssl/openssl-1.1.1w/doc/fingerprints.txt @@ -12,6 +12,11 @@ in the file named openssl-1.0.1h.tar.gz.asc. The following is the list of fingerprints for the keys that are currently in use to sign OpenSSL distributions: +pub rsa4096 2014-10-04 + Key fingerprint = EFC0 A467 D613 CB83 C7ED 6D30 D894 E2CE 8B3D 79F5 +uid OpenSSL OMC +uid OpenSSL Security + pub 4096R/7DF9EE8C 2014-10-04 Key fingerprint = 7953 AC1F BC3D C8B3 B292 393E D5E9 E43F 7DF9 EE8C uid Richard Levitte diff --git a/src/openssl/openssl-1.1.1t/doc/man1/CA.pl.pod b/src/openssl/openssl-1.1.1w/doc/man1/CA.pl.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/CA.pl.pod rename to src/openssl/openssl-1.1.1w/doc/man1/CA.pl.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/asn1parse.pod b/src/openssl/openssl-1.1.1w/doc/man1/asn1parse.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/asn1parse.pod rename to src/openssl/openssl-1.1.1w/doc/man1/asn1parse.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/ca.pod b/src/openssl/openssl-1.1.1w/doc/man1/ca.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/ca.pod rename to src/openssl/openssl-1.1.1w/doc/man1/ca.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/ciphers.pod b/src/openssl/openssl-1.1.1w/doc/man1/ciphers.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/ciphers.pod rename to src/openssl/openssl-1.1.1w/doc/man1/ciphers.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/cms.pod b/src/openssl/openssl-1.1.1w/doc/man1/cms.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/cms.pod rename to src/openssl/openssl-1.1.1w/doc/man1/cms.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/crl.pod b/src/openssl/openssl-1.1.1w/doc/man1/crl.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/crl.pod rename to src/openssl/openssl-1.1.1w/doc/man1/crl.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/crl2pkcs7.pod b/src/openssl/openssl-1.1.1w/doc/man1/crl2pkcs7.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/crl2pkcs7.pod rename to src/openssl/openssl-1.1.1w/doc/man1/crl2pkcs7.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/dgst.pod b/src/openssl/openssl-1.1.1w/doc/man1/dgst.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/dgst.pod rename to src/openssl/openssl-1.1.1w/doc/man1/dgst.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/dhparam.pod b/src/openssl/openssl-1.1.1w/doc/man1/dhparam.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/dhparam.pod rename to src/openssl/openssl-1.1.1w/doc/man1/dhparam.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/dsa.pod b/src/openssl/openssl-1.1.1w/doc/man1/dsa.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/dsa.pod rename to src/openssl/openssl-1.1.1w/doc/man1/dsa.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/dsaparam.pod b/src/openssl/openssl-1.1.1w/doc/man1/dsaparam.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/dsaparam.pod rename to src/openssl/openssl-1.1.1w/doc/man1/dsaparam.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/ec.pod b/src/openssl/openssl-1.1.1w/doc/man1/ec.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/ec.pod rename to src/openssl/openssl-1.1.1w/doc/man1/ec.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/ecparam.pod b/src/openssl/openssl-1.1.1w/doc/man1/ecparam.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/ecparam.pod rename to src/openssl/openssl-1.1.1w/doc/man1/ecparam.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/enc.pod b/src/openssl/openssl-1.1.1w/doc/man1/enc.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/enc.pod rename to src/openssl/openssl-1.1.1w/doc/man1/enc.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/engine.pod b/src/openssl/openssl-1.1.1w/doc/man1/engine.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/engine.pod rename to src/openssl/openssl-1.1.1w/doc/man1/engine.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/errstr.pod b/src/openssl/openssl-1.1.1w/doc/man1/errstr.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/errstr.pod rename to src/openssl/openssl-1.1.1w/doc/man1/errstr.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/gendsa.pod b/src/openssl/openssl-1.1.1w/doc/man1/gendsa.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/gendsa.pod rename to src/openssl/openssl-1.1.1w/doc/man1/gendsa.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/genpkey.pod b/src/openssl/openssl-1.1.1w/doc/man1/genpkey.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/genpkey.pod rename to src/openssl/openssl-1.1.1w/doc/man1/genpkey.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/genrsa.pod b/src/openssl/openssl-1.1.1w/doc/man1/genrsa.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/genrsa.pod rename to src/openssl/openssl-1.1.1w/doc/man1/genrsa.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/list.pod b/src/openssl/openssl-1.1.1w/doc/man1/list.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/list.pod rename to src/openssl/openssl-1.1.1w/doc/man1/list.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/nseq.pod b/src/openssl/openssl-1.1.1w/doc/man1/nseq.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/nseq.pod rename to src/openssl/openssl-1.1.1w/doc/man1/nseq.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/ocsp.pod b/src/openssl/openssl-1.1.1w/doc/man1/ocsp.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/ocsp.pod rename to src/openssl/openssl-1.1.1w/doc/man1/ocsp.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/openssl.pod b/src/openssl/openssl-1.1.1w/doc/man1/openssl.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/openssl.pod rename to src/openssl/openssl-1.1.1w/doc/man1/openssl.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/passwd.pod b/src/openssl/openssl-1.1.1w/doc/man1/passwd.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/passwd.pod rename to src/openssl/openssl-1.1.1w/doc/man1/passwd.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/pkcs12.pod b/src/openssl/openssl-1.1.1w/doc/man1/pkcs12.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/pkcs12.pod rename to src/openssl/openssl-1.1.1w/doc/man1/pkcs12.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/pkcs7.pod b/src/openssl/openssl-1.1.1w/doc/man1/pkcs7.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/pkcs7.pod rename to src/openssl/openssl-1.1.1w/doc/man1/pkcs7.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/pkcs8.pod b/src/openssl/openssl-1.1.1w/doc/man1/pkcs8.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/pkcs8.pod rename to src/openssl/openssl-1.1.1w/doc/man1/pkcs8.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/pkey.pod b/src/openssl/openssl-1.1.1w/doc/man1/pkey.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/pkey.pod rename to src/openssl/openssl-1.1.1w/doc/man1/pkey.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/pkeyparam.pod b/src/openssl/openssl-1.1.1w/doc/man1/pkeyparam.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/pkeyparam.pod rename to src/openssl/openssl-1.1.1w/doc/man1/pkeyparam.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/pkeyutl.pod b/src/openssl/openssl-1.1.1w/doc/man1/pkeyutl.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/pkeyutl.pod rename to src/openssl/openssl-1.1.1w/doc/man1/pkeyutl.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/prime.pod b/src/openssl/openssl-1.1.1w/doc/man1/prime.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/prime.pod rename to src/openssl/openssl-1.1.1w/doc/man1/prime.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/rand.pod b/src/openssl/openssl-1.1.1w/doc/man1/rand.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/rand.pod rename to src/openssl/openssl-1.1.1w/doc/man1/rand.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/rehash.pod b/src/openssl/openssl-1.1.1w/doc/man1/rehash.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/rehash.pod rename to src/openssl/openssl-1.1.1w/doc/man1/rehash.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/req.pod b/src/openssl/openssl-1.1.1w/doc/man1/req.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/req.pod rename to src/openssl/openssl-1.1.1w/doc/man1/req.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/rsa.pod b/src/openssl/openssl-1.1.1w/doc/man1/rsa.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/rsa.pod rename to src/openssl/openssl-1.1.1w/doc/man1/rsa.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/rsautl.pod b/src/openssl/openssl-1.1.1w/doc/man1/rsautl.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/rsautl.pod rename to src/openssl/openssl-1.1.1w/doc/man1/rsautl.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/s_client.pod b/src/openssl/openssl-1.1.1w/doc/man1/s_client.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/s_client.pod rename to src/openssl/openssl-1.1.1w/doc/man1/s_client.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/s_server.pod b/src/openssl/openssl-1.1.1w/doc/man1/s_server.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/s_server.pod rename to src/openssl/openssl-1.1.1w/doc/man1/s_server.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/s_time.pod b/src/openssl/openssl-1.1.1w/doc/man1/s_time.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/s_time.pod rename to src/openssl/openssl-1.1.1w/doc/man1/s_time.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/sess_id.pod b/src/openssl/openssl-1.1.1w/doc/man1/sess_id.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/sess_id.pod rename to src/openssl/openssl-1.1.1w/doc/man1/sess_id.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/smime.pod b/src/openssl/openssl-1.1.1w/doc/man1/smime.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/smime.pod rename to src/openssl/openssl-1.1.1w/doc/man1/smime.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/speed.pod b/src/openssl/openssl-1.1.1w/doc/man1/speed.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/speed.pod rename to src/openssl/openssl-1.1.1w/doc/man1/speed.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/spkac.pod b/src/openssl/openssl-1.1.1w/doc/man1/spkac.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/spkac.pod rename to src/openssl/openssl-1.1.1w/doc/man1/spkac.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/srp.pod b/src/openssl/openssl-1.1.1w/doc/man1/srp.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/srp.pod rename to src/openssl/openssl-1.1.1w/doc/man1/srp.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/storeutl.pod b/src/openssl/openssl-1.1.1w/doc/man1/storeutl.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/storeutl.pod rename to src/openssl/openssl-1.1.1w/doc/man1/storeutl.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/ts.pod b/src/openssl/openssl-1.1.1w/doc/man1/ts.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/ts.pod rename to src/openssl/openssl-1.1.1w/doc/man1/ts.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/tsget.pod b/src/openssl/openssl-1.1.1w/doc/man1/tsget.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/tsget.pod rename to src/openssl/openssl-1.1.1w/doc/man1/tsget.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/verify.pod b/src/openssl/openssl-1.1.1w/doc/man1/verify.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/verify.pod rename to src/openssl/openssl-1.1.1w/doc/man1/verify.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/version.pod b/src/openssl/openssl-1.1.1w/doc/man1/version.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/version.pod rename to src/openssl/openssl-1.1.1w/doc/man1/version.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man1/x509.pod b/src/openssl/openssl-1.1.1w/doc/man1/x509.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man1/x509.pod rename to src/openssl/openssl-1.1.1w/doc/man1/x509.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ADMISSIONS.pod b/src/openssl/openssl-1.1.1w/doc/man3/ADMISSIONS.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ADMISSIONS.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ADMISSIONS.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ASN1_INTEGER_get_int64.pod b/src/openssl/openssl-1.1.1w/doc/man3/ASN1_INTEGER_get_int64.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ASN1_INTEGER_get_int64.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ASN1_INTEGER_get_int64.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ASN1_ITEM_lookup.pod b/src/openssl/openssl-1.1.1w/doc/man3/ASN1_ITEM_lookup.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ASN1_ITEM_lookup.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ASN1_ITEM_lookup.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ASN1_OBJECT_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/ASN1_OBJECT_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ASN1_OBJECT_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ASN1_OBJECT_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ASN1_STRING_TABLE_add.pod b/src/openssl/openssl-1.1.1w/doc/man3/ASN1_STRING_TABLE_add.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ASN1_STRING_TABLE_add.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ASN1_STRING_TABLE_add.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ASN1_STRING_length.pod b/src/openssl/openssl-1.1.1w/doc/man3/ASN1_STRING_length.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ASN1_STRING_length.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ASN1_STRING_length.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ASN1_STRING_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/ASN1_STRING_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ASN1_STRING_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ASN1_STRING_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ASN1_STRING_print_ex.pod b/src/openssl/openssl-1.1.1w/doc/man3/ASN1_STRING_print_ex.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ASN1_STRING_print_ex.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ASN1_STRING_print_ex.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ASN1_TIME_set.pod b/src/openssl/openssl-1.1.1w/doc/man3/ASN1_TIME_set.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ASN1_TIME_set.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ASN1_TIME_set.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ASN1_TYPE_get.pod b/src/openssl/openssl-1.1.1w/doc/man3/ASN1_TYPE_get.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ASN1_TYPE_get.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ASN1_TYPE_get.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ASN1_generate_nconf.pod b/src/openssl/openssl-1.1.1w/doc/man3/ASN1_generate_nconf.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ASN1_generate_nconf.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ASN1_generate_nconf.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ASYNC_WAIT_CTX_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/ASYNC_WAIT_CTX_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ASYNC_WAIT_CTX_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ASYNC_WAIT_CTX_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ASYNC_start_job.pod b/src/openssl/openssl-1.1.1w/doc/man3/ASYNC_start_job.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ASYNC_start_job.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ASYNC_start_job.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BF_encrypt.pod b/src/openssl/openssl-1.1.1w/doc/man3/BF_encrypt.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BF_encrypt.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BF_encrypt.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_ADDR.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_ADDR.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_ADDR.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_ADDR.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_ADDRINFO.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_ADDRINFO.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_ADDRINFO.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_ADDRINFO.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_connect.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_connect.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_connect.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_connect.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_ctrl.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_ctrl.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_ctrl.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_ctrl.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_f_base64.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_f_base64.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_f_base64.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_f_base64.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_f_buffer.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_f_buffer.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_f_buffer.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_f_buffer.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_f_cipher.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_f_cipher.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_f_cipher.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_f_cipher.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_f_md.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_f_md.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_f_md.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_f_md.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_f_null.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_f_null.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_f_null.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_f_null.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_f_ssl.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_f_ssl.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_f_ssl.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_f_ssl.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_find_type.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_find_type.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_find_type.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_find_type.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_get_data.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_get_data.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_get_data.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_get_data.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_get_ex_new_index.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_get_ex_new_index.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_get_ex_new_index.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_get_ex_new_index.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_meth_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_meth_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_meth_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_meth_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_new_CMS.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_new_CMS.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_new_CMS.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_new_CMS.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_parse_hostserv.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_parse_hostserv.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_parse_hostserv.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_parse_hostserv.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_printf.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_printf.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_printf.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_printf.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_push.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_push.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_push.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_push.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_read.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_read.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_read.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_read.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_s_accept.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_s_accept.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_s_accept.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_s_accept.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_s_bio.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_s_bio.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_s_bio.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_s_bio.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_s_connect.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_s_connect.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_s_connect.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_s_connect.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_s_fd.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_s_fd.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_s_fd.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_s_fd.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_s_file.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_s_file.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_s_file.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_s_file.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_s_mem.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_s_mem.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_s_mem.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_s_mem.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_s_null.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_s_null.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_s_null.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_s_null.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_s_socket.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_s_socket.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_s_socket.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_s_socket.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_set_callback.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_set_callback.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_set_callback.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_set_callback.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BIO_should_retry.pod b/src/openssl/openssl-1.1.1w/doc/man3/BIO_should_retry.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BIO_should_retry.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BIO_should_retry.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_BLINDING_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_BLINDING_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_BLINDING_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_BLINDING_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_CTX_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_CTX_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_CTX_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_CTX_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_CTX_start.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_CTX_start.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_CTX_start.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_CTX_start.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_add.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_add.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_add.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_add.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_add_word.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_add_word.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_add_word.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_add_word.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_bn2bin.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_bn2bin.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_bn2bin.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_bn2bin.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_cmp.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_cmp.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_cmp.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_cmp.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_copy.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_copy.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_copy.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_copy.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_generate_prime.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_generate_prime.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_generate_prime.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_generate_prime.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_mod_inverse.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_mod_inverse.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_mod_inverse.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_mod_inverse.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_mod_mul_montgomery.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_mod_mul_montgomery.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_mod_mul_montgomery.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_mod_mul_montgomery.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_mod_mul_reciprocal.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_mod_mul_reciprocal.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_mod_mul_reciprocal.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_mod_mul_reciprocal.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_num_bytes.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_num_bytes.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_num_bytes.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_num_bytes.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_rand.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_rand.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_rand.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_rand.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_security_bits.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_security_bits.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_security_bits.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_security_bits.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_set_bit.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_set_bit.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_set_bit.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_set_bit.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_swap.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_swap.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_swap.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_swap.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BN_zero.pod b/src/openssl/openssl-1.1.1w/doc/man3/BN_zero.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BN_zero.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BN_zero.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/BUF_MEM_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/BUF_MEM_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/BUF_MEM_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/BUF_MEM_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_add0_cert.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_add0_cert.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_add0_cert.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_add0_cert.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_add1_recipient_cert.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_add1_recipient_cert.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_add1_recipient_cert.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_add1_recipient_cert.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_add1_signer.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_add1_signer.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_add1_signer.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_add1_signer.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_compress.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_compress.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_compress.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_compress.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_decrypt.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_decrypt.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_decrypt.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_decrypt.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_encrypt.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_encrypt.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_encrypt.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_encrypt.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_final.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_final.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_final.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_final.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_get0_RecipientInfos.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_get0_RecipientInfos.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_get0_RecipientInfos.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_get0_RecipientInfos.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_get0_SignerInfos.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_get0_SignerInfos.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_get0_SignerInfos.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_get0_SignerInfos.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_get0_type.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_get0_type.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_get0_type.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_get0_type.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_get1_ReceiptRequest.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_get1_ReceiptRequest.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_get1_ReceiptRequest.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_get1_ReceiptRequest.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_sign.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_sign.pod similarity index 97% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_sign.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_sign.pod index 79446b129..884be8fdd 100644 --- a/src/openssl/openssl-1.1.1t/doc/man3/CMS_sign.pod +++ b/src/openssl/openssl-1.1.1w/doc/man3/CMS_sign.pod @@ -95,7 +95,7 @@ The function CMS_sign() is a basic CMS signing function whose output will be suitable for many purposes. For finer control of the output format the B, B and B parameters can all be B and the B flag set. Then one or more signers can be added using the -function CMS_sign_add1_signer(), non default digests can be used and custom +function CMS_add1_signer(), non default digests can be used and custom attributes added. CMS_final() must then be called to finalize the structure if streaming is not enabled. @@ -119,7 +119,7 @@ it is supported for embedded data in OpenSSL 1.0.0 and later. =head1 COPYRIGHT -Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2008-2023 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_sign_receipt.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_sign_receipt.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_sign_receipt.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_sign_receipt.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_uncompress.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_uncompress.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_uncompress.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_uncompress.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_verify.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_verify.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_verify.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_verify.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CMS_verify_receipt.pod b/src/openssl/openssl-1.1.1w/doc/man3/CMS_verify_receipt.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CMS_verify_receipt.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CMS_verify_receipt.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CONF_modules_free.pod b/src/openssl/openssl-1.1.1w/doc/man3/CONF_modules_free.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CONF_modules_free.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CONF_modules_free.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CONF_modules_load_file.pod b/src/openssl/openssl-1.1.1w/doc/man3/CONF_modules_load_file.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CONF_modules_load_file.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CONF_modules_load_file.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CRYPTO_THREAD_run_once.pod b/src/openssl/openssl-1.1.1w/doc/man3/CRYPTO_THREAD_run_once.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CRYPTO_THREAD_run_once.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CRYPTO_THREAD_run_once.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CRYPTO_get_ex_new_index.pod b/src/openssl/openssl-1.1.1w/doc/man3/CRYPTO_get_ex_new_index.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CRYPTO_get_ex_new_index.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CRYPTO_get_ex_new_index.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CRYPTO_memcmp.pod b/src/openssl/openssl-1.1.1w/doc/man3/CRYPTO_memcmp.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CRYPTO_memcmp.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CRYPTO_memcmp.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CTLOG_STORE_get0_log_by_id.pod b/src/openssl/openssl-1.1.1w/doc/man3/CTLOG_STORE_get0_log_by_id.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CTLOG_STORE_get0_log_by_id.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CTLOG_STORE_get0_log_by_id.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CTLOG_STORE_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/CTLOG_STORE_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CTLOG_STORE_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CTLOG_STORE_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CTLOG_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/CTLOG_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CTLOG_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CTLOG_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/CT_POLICY_EVAL_CTX_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/CT_POLICY_EVAL_CTX_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/CT_POLICY_EVAL_CTX_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/CT_POLICY_EVAL_CTX_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DEFINE_STACK_OF.pod b/src/openssl/openssl-1.1.1w/doc/man3/DEFINE_STACK_OF.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DEFINE_STACK_OF.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DEFINE_STACK_OF.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DES_random_key.pod b/src/openssl/openssl-1.1.1w/doc/man3/DES_random_key.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DES_random_key.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DES_random_key.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DH_generate_key.pod b/src/openssl/openssl-1.1.1w/doc/man3/DH_generate_key.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DH_generate_key.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DH_generate_key.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DH_generate_parameters.pod b/src/openssl/openssl-1.1.1w/doc/man3/DH_generate_parameters.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DH_generate_parameters.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DH_generate_parameters.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DH_get0_pqg.pod b/src/openssl/openssl-1.1.1w/doc/man3/DH_get0_pqg.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DH_get0_pqg.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DH_get0_pqg.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DH_get_1024_160.pod b/src/openssl/openssl-1.1.1w/doc/man3/DH_get_1024_160.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DH_get_1024_160.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DH_get_1024_160.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DH_meth_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/DH_meth_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DH_meth_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DH_meth_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DH_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/DH_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DH_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DH_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DH_new_by_nid.pod b/src/openssl/openssl-1.1.1w/doc/man3/DH_new_by_nid.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DH_new_by_nid.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DH_new_by_nid.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DH_set_method.pod b/src/openssl/openssl-1.1.1w/doc/man3/DH_set_method.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DH_set_method.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DH_set_method.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DH_size.pod b/src/openssl/openssl-1.1.1w/doc/man3/DH_size.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DH_size.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DH_size.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DSA_SIG_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/DSA_SIG_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DSA_SIG_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DSA_SIG_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DSA_do_sign.pod b/src/openssl/openssl-1.1.1w/doc/man3/DSA_do_sign.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DSA_do_sign.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DSA_do_sign.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DSA_dup_DH.pod b/src/openssl/openssl-1.1.1w/doc/man3/DSA_dup_DH.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DSA_dup_DH.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DSA_dup_DH.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DSA_generate_key.pod b/src/openssl/openssl-1.1.1w/doc/man3/DSA_generate_key.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DSA_generate_key.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DSA_generate_key.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DSA_generate_parameters.pod b/src/openssl/openssl-1.1.1w/doc/man3/DSA_generate_parameters.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DSA_generate_parameters.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DSA_generate_parameters.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DSA_get0_pqg.pod b/src/openssl/openssl-1.1.1w/doc/man3/DSA_get0_pqg.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DSA_get0_pqg.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DSA_get0_pqg.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DSA_meth_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/DSA_meth_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DSA_meth_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DSA_meth_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DSA_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/DSA_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DSA_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DSA_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DSA_set_method.pod b/src/openssl/openssl-1.1.1w/doc/man3/DSA_set_method.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DSA_set_method.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DSA_set_method.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DSA_sign.pod b/src/openssl/openssl-1.1.1w/doc/man3/DSA_sign.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DSA_sign.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DSA_sign.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DSA_size.pod b/src/openssl/openssl-1.1.1w/doc/man3/DSA_size.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DSA_size.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DSA_size.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DTLS_get_data_mtu.pod b/src/openssl/openssl-1.1.1w/doc/man3/DTLS_get_data_mtu.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DTLS_get_data_mtu.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DTLS_get_data_mtu.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DTLS_set_timer_cb.pod b/src/openssl/openssl-1.1.1w/doc/man3/DTLS_set_timer_cb.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DTLS_set_timer_cb.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DTLS_set_timer_cb.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/DTLSv1_listen.pod b/src/openssl/openssl-1.1.1w/doc/man3/DTLSv1_listen.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/DTLSv1_listen.pod rename to src/openssl/openssl-1.1.1w/doc/man3/DTLSv1_listen.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ECDSA_SIG_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/ECDSA_SIG_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ECDSA_SIG_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ECDSA_SIG_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ECPKParameters_print.pod b/src/openssl/openssl-1.1.1w/doc/man3/ECPKParameters_print.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ECPKParameters_print.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ECPKParameters_print.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EC_GFp_simple_method.pod b/src/openssl/openssl-1.1.1w/doc/man3/EC_GFp_simple_method.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EC_GFp_simple_method.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EC_GFp_simple_method.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EC_GROUP_copy.pod b/src/openssl/openssl-1.1.1w/doc/man3/EC_GROUP_copy.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EC_GROUP_copy.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EC_GROUP_copy.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EC_GROUP_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/EC_GROUP_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EC_GROUP_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EC_GROUP_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EC_KEY_get_enc_flags.pod b/src/openssl/openssl-1.1.1w/doc/man3/EC_KEY_get_enc_flags.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EC_KEY_get_enc_flags.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EC_KEY_get_enc_flags.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EC_KEY_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/EC_KEY_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EC_KEY_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EC_KEY_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EC_POINT_add.pod b/src/openssl/openssl-1.1.1w/doc/man3/EC_POINT_add.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EC_POINT_add.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EC_POINT_add.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EC_POINT_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/EC_POINT_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EC_POINT_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EC_POINT_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ENGINE_add.pod b/src/openssl/openssl-1.1.1w/doc/man3/ENGINE_add.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ENGINE_add.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ENGINE_add.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ERR_GET_LIB.pod b/src/openssl/openssl-1.1.1w/doc/man3/ERR_GET_LIB.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ERR_GET_LIB.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ERR_GET_LIB.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ERR_clear_error.pod b/src/openssl/openssl-1.1.1w/doc/man3/ERR_clear_error.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ERR_clear_error.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ERR_clear_error.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ERR_error_string.pod b/src/openssl/openssl-1.1.1w/doc/man3/ERR_error_string.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ERR_error_string.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ERR_error_string.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ERR_get_error.pod b/src/openssl/openssl-1.1.1w/doc/man3/ERR_get_error.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ERR_get_error.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ERR_get_error.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ERR_load_crypto_strings.pod b/src/openssl/openssl-1.1.1w/doc/man3/ERR_load_crypto_strings.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ERR_load_crypto_strings.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ERR_load_crypto_strings.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ERR_load_strings.pod b/src/openssl/openssl-1.1.1w/doc/man3/ERR_load_strings.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ERR_load_strings.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ERR_load_strings.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ERR_print_errors.pod b/src/openssl/openssl-1.1.1w/doc/man3/ERR_print_errors.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ERR_print_errors.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ERR_print_errors.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ERR_put_error.pod b/src/openssl/openssl-1.1.1w/doc/man3/ERR_put_error.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ERR_put_error.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ERR_put_error.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ERR_remove_state.pod b/src/openssl/openssl-1.1.1w/doc/man3/ERR_remove_state.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ERR_remove_state.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ERR_remove_state.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/ERR_set_mark.pod b/src/openssl/openssl-1.1.1w/doc/man3/ERR_set_mark.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/ERR_set_mark.pod rename to src/openssl/openssl-1.1.1w/doc/man3/ERR_set_mark.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_BytesToKey.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_BytesToKey.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_BytesToKey.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_BytesToKey.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_CIPHER_CTX_get_cipher_data.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_CIPHER_CTX_get_cipher_data.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_CIPHER_CTX_get_cipher_data.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_CIPHER_CTX_get_cipher_data.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_CIPHER_meth_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_CIPHER_meth_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_CIPHER_meth_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_CIPHER_meth_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_DigestInit.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_DigestInit.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_DigestInit.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_DigestInit.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_DigestSignInit.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_DigestSignInit.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_DigestSignInit.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_DigestSignInit.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_DigestVerifyInit.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_DigestVerifyInit.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_DigestVerifyInit.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_DigestVerifyInit.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_EncodeInit.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_EncodeInit.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_EncodeInit.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_EncodeInit.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_EncryptInit.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_EncryptInit.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_EncryptInit.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_EncryptInit.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_MD_meth_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_MD_meth_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_MD_meth_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_MD_meth_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_OpenInit.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_OpenInit.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_OpenInit.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_OpenInit.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_ASN1_METHOD.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_ASN1_METHOD.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_ASN1_METHOD.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_ASN1_METHOD.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_CTX_ctrl.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_CTX_ctrl.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_CTX_ctrl.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_CTX_ctrl.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_CTX_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_CTX_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_CTX_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_CTX_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_CTX_set1_pbe_pass.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_CTX_set1_pbe_pass.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_CTX_set1_pbe_pass.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_CTX_set1_pbe_pass.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_CTX_set_hkdf_md.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_CTX_set_hkdf_md.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_CTX_set_hkdf_md.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_CTX_set_hkdf_md.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_CTX_set_scrypt_N.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_CTX_set_scrypt_N.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_CTX_set_scrypt_N.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_CTX_set_scrypt_N.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_CTX_set_tls1_prf_md.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_CTX_set_tls1_prf_md.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_CTX_set_tls1_prf_md.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_CTX_set_tls1_prf_md.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_asn1_get_count.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_asn1_get_count.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_asn1_get_count.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_asn1_get_count.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_cmp.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_cmp.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_cmp.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_cmp.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_decrypt.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_decrypt.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_decrypt.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_decrypt.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_derive.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_derive.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_derive.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_derive.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_encrypt.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_encrypt.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_encrypt.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_encrypt.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_get_default_digest_nid.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_get_default_digest_nid.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_get_default_digest_nid.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_get_default_digest_nid.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_keygen.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_keygen.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_keygen.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_keygen.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_meth_get_count.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_meth_get_count.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_meth_get_count.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_meth_get_count.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_meth_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_meth_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_meth_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_meth_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_print_private.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_print_private.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_print_private.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_print_private.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_set1_RSA.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_set1_RSA.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_set1_RSA.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_set1_RSA.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_sign.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_sign.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_sign.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_sign.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_size.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_size.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_size.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_size.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_verify.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_verify.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_verify.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_verify.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_verify_recover.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_verify_recover.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_PKEY_verify_recover.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_PKEY_verify_recover.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_SealInit.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_SealInit.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_SealInit.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_SealInit.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_SignInit.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_SignInit.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_SignInit.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_SignInit.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_VerifyInit.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_VerifyInit.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_VerifyInit.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_VerifyInit.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_aes.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_aes.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_aes.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_aes.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_aria.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_aria.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_aria.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_aria.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_bf_cbc.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_bf_cbc.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_bf_cbc.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_bf_cbc.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_blake2b512.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_blake2b512.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_blake2b512.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_blake2b512.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_camellia.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_camellia.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_camellia.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_camellia.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_cast5_cbc.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_cast5_cbc.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_cast5_cbc.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_cast5_cbc.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_chacha20.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_chacha20.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_chacha20.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_chacha20.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_des.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_des.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_des.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_des.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_desx_cbc.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_desx_cbc.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_desx_cbc.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_desx_cbc.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_idea_cbc.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_idea_cbc.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_idea_cbc.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_idea_cbc.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_md2.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_md2.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_md2.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_md2.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_md4.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_md4.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_md4.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_md4.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_md5.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_md5.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_md5.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_md5.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_mdc2.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_mdc2.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_mdc2.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_mdc2.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_rc2_cbc.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_rc2_cbc.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_rc2_cbc.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_rc2_cbc.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_rc4.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_rc4.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_rc4.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_rc4.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_rc5_32_12_16_cbc.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_rc5_32_12_16_cbc.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_rc5_32_12_16_cbc.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_rc5_32_12_16_cbc.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_ripemd160.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_ripemd160.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_ripemd160.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_ripemd160.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_seed_cbc.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_seed_cbc.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_seed_cbc.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_seed_cbc.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_sha1.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_sha1.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_sha1.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_sha1.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_sha224.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_sha224.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_sha224.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_sha224.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_sha3_224.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_sha3_224.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_sha3_224.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_sha3_224.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_sm3.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_sm3.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_sm3.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_sm3.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_sm4_cbc.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_sm4_cbc.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_sm4_cbc.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_sm4_cbc.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/EVP_whirlpool.pod b/src/openssl/openssl-1.1.1w/doc/man3/EVP_whirlpool.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/EVP_whirlpool.pod rename to src/openssl/openssl-1.1.1w/doc/man3/EVP_whirlpool.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/HMAC.pod b/src/openssl/openssl-1.1.1w/doc/man3/HMAC.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/HMAC.pod rename to src/openssl/openssl-1.1.1w/doc/man3/HMAC.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/MD5.pod b/src/openssl/openssl-1.1.1w/doc/man3/MD5.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/MD5.pod rename to src/openssl/openssl-1.1.1w/doc/man3/MD5.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/MDC2_Init.pod b/src/openssl/openssl-1.1.1w/doc/man3/MDC2_Init.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/MDC2_Init.pod rename to src/openssl/openssl-1.1.1w/doc/man3/MDC2_Init.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OBJ_nid2obj.pod b/src/openssl/openssl-1.1.1w/doc/man3/OBJ_nid2obj.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OBJ_nid2obj.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OBJ_nid2obj.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OCSP_REQUEST_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/OCSP_REQUEST_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OCSP_REQUEST_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OCSP_REQUEST_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OCSP_cert_to_id.pod b/src/openssl/openssl-1.1.1w/doc/man3/OCSP_cert_to_id.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OCSP_cert_to_id.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OCSP_cert_to_id.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OCSP_request_add1_nonce.pod b/src/openssl/openssl-1.1.1w/doc/man3/OCSP_request_add1_nonce.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OCSP_request_add1_nonce.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OCSP_request_add1_nonce.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OCSP_resp_find_status.pod b/src/openssl/openssl-1.1.1w/doc/man3/OCSP_resp_find_status.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OCSP_resp_find_status.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OCSP_resp_find_status.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OCSP_response_status.pod b/src/openssl/openssl-1.1.1w/doc/man3/OCSP_response_status.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OCSP_response_status.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OCSP_response_status.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OCSP_sendreq_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/OCSP_sendreq_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OCSP_sendreq_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OCSP_sendreq_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_Applink.pod b/src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_Applink.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_Applink.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_Applink.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_LH_COMPFUNC.pod b/src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_LH_COMPFUNC.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_LH_COMPFUNC.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_LH_COMPFUNC.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_LH_stats.pod b/src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_LH_stats.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_LH_stats.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_LH_stats.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_VERSION_NUMBER.pod b/src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_VERSION_NUMBER.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_VERSION_NUMBER.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_VERSION_NUMBER.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_config.pod b/src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_config.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_config.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_config.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_fork_prepare.pod b/src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_fork_prepare.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_fork_prepare.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_fork_prepare.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_ia32cap.pod b/src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_ia32cap.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_ia32cap.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_ia32cap.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_init_crypto.pod b/src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_init_crypto.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_init_crypto.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_init_crypto.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_init_ssl.pod b/src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_init_ssl.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_init_ssl.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_init_ssl.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_instrument_bus.pod b/src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_instrument_bus.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_instrument_bus.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_instrument_bus.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_load_builtin_modules.pod b/src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_load_builtin_modules.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_load_builtin_modules.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_load_builtin_modules.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_malloc.pod b/src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_malloc.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_malloc.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_malloc.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_secure_malloc.pod b/src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_secure_malloc.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OPENSSL_secure_malloc.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OPENSSL_secure_malloc.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OSSL_STORE_INFO.pod b/src/openssl/openssl-1.1.1w/doc/man3/OSSL_STORE_INFO.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OSSL_STORE_INFO.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OSSL_STORE_INFO.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OSSL_STORE_LOADER.pod b/src/openssl/openssl-1.1.1w/doc/man3/OSSL_STORE_LOADER.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OSSL_STORE_LOADER.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OSSL_STORE_LOADER.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OSSL_STORE_SEARCH.pod b/src/openssl/openssl-1.1.1w/doc/man3/OSSL_STORE_SEARCH.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OSSL_STORE_SEARCH.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OSSL_STORE_SEARCH.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OSSL_STORE_expect.pod b/src/openssl/openssl-1.1.1w/doc/man3/OSSL_STORE_expect.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OSSL_STORE_expect.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OSSL_STORE_expect.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OSSL_STORE_open.pod b/src/openssl/openssl-1.1.1w/doc/man3/OSSL_STORE_open.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OSSL_STORE_open.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OSSL_STORE_open.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/OpenSSL_add_all_algorithms.pod b/src/openssl/openssl-1.1.1w/doc/man3/OpenSSL_add_all_algorithms.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/OpenSSL_add_all_algorithms.pod rename to src/openssl/openssl-1.1.1w/doc/man3/OpenSSL_add_all_algorithms.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PEM_bytes_read_bio.pod b/src/openssl/openssl-1.1.1w/doc/man3/PEM_bytes_read_bio.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PEM_bytes_read_bio.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PEM_bytes_read_bio.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PEM_read.pod b/src/openssl/openssl-1.1.1w/doc/man3/PEM_read.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PEM_read.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PEM_read.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PEM_read_CMS.pod b/src/openssl/openssl-1.1.1w/doc/man3/PEM_read_CMS.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PEM_read_CMS.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PEM_read_CMS.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PEM_read_bio_PrivateKey.pod b/src/openssl/openssl-1.1.1w/doc/man3/PEM_read_bio_PrivateKey.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PEM_read_bio_PrivateKey.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PEM_read_bio_PrivateKey.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PEM_read_bio_ex.pod b/src/openssl/openssl-1.1.1w/doc/man3/PEM_read_bio_ex.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PEM_read_bio_ex.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PEM_read_bio_ex.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PEM_write_bio_CMS_stream.pod b/src/openssl/openssl-1.1.1w/doc/man3/PEM_write_bio_CMS_stream.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PEM_write_bio_CMS_stream.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PEM_write_bio_CMS_stream.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PEM_write_bio_PKCS7_stream.pod b/src/openssl/openssl-1.1.1w/doc/man3/PEM_write_bio_PKCS7_stream.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PEM_write_bio_PKCS7_stream.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PEM_write_bio_PKCS7_stream.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PKCS12_create.pod b/src/openssl/openssl-1.1.1w/doc/man3/PKCS12_create.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PKCS12_create.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PKCS12_create.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PKCS12_newpass.pod b/src/openssl/openssl-1.1.1w/doc/man3/PKCS12_newpass.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PKCS12_newpass.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PKCS12_newpass.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PKCS12_parse.pod b/src/openssl/openssl-1.1.1w/doc/man3/PKCS12_parse.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PKCS12_parse.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PKCS12_parse.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PKCS5_PBKDF2_HMAC.pod b/src/openssl/openssl-1.1.1w/doc/man3/PKCS5_PBKDF2_HMAC.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PKCS5_PBKDF2_HMAC.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PKCS5_PBKDF2_HMAC.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PKCS7_decrypt.pod b/src/openssl/openssl-1.1.1w/doc/man3/PKCS7_decrypt.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PKCS7_decrypt.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PKCS7_decrypt.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PKCS7_encrypt.pod b/src/openssl/openssl-1.1.1w/doc/man3/PKCS7_encrypt.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PKCS7_encrypt.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PKCS7_encrypt.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PKCS7_sign.pod b/src/openssl/openssl-1.1.1w/doc/man3/PKCS7_sign.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PKCS7_sign.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PKCS7_sign.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PKCS7_sign_add_signer.pod b/src/openssl/openssl-1.1.1w/doc/man3/PKCS7_sign_add_signer.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PKCS7_sign_add_signer.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PKCS7_sign_add_signer.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/PKCS7_verify.pod b/src/openssl/openssl-1.1.1w/doc/man3/PKCS7_verify.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/PKCS7_verify.pod rename to src/openssl/openssl-1.1.1w/doc/man3/PKCS7_verify.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RAND_DRBG_generate.pod b/src/openssl/openssl-1.1.1w/doc/man3/RAND_DRBG_generate.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RAND_DRBG_generate.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RAND_DRBG_generate.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RAND_DRBG_get0_master.pod b/src/openssl/openssl-1.1.1w/doc/man3/RAND_DRBG_get0_master.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RAND_DRBG_get0_master.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RAND_DRBG_get0_master.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RAND_DRBG_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/RAND_DRBG_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RAND_DRBG_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RAND_DRBG_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RAND_DRBG_reseed.pod b/src/openssl/openssl-1.1.1w/doc/man3/RAND_DRBG_reseed.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RAND_DRBG_reseed.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RAND_DRBG_reseed.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RAND_DRBG_set_callbacks.pod b/src/openssl/openssl-1.1.1w/doc/man3/RAND_DRBG_set_callbacks.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RAND_DRBG_set_callbacks.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RAND_DRBG_set_callbacks.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RAND_DRBG_set_ex_data.pod b/src/openssl/openssl-1.1.1w/doc/man3/RAND_DRBG_set_ex_data.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RAND_DRBG_set_ex_data.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RAND_DRBG_set_ex_data.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RAND_add.pod b/src/openssl/openssl-1.1.1w/doc/man3/RAND_add.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RAND_add.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RAND_add.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RAND_bytes.pod b/src/openssl/openssl-1.1.1w/doc/man3/RAND_bytes.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RAND_bytes.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RAND_bytes.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RAND_cleanup.pod b/src/openssl/openssl-1.1.1w/doc/man3/RAND_cleanup.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RAND_cleanup.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RAND_cleanup.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RAND_egd.pod b/src/openssl/openssl-1.1.1w/doc/man3/RAND_egd.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RAND_egd.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RAND_egd.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RAND_load_file.pod b/src/openssl/openssl-1.1.1w/doc/man3/RAND_load_file.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RAND_load_file.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RAND_load_file.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RAND_set_rand_method.pod b/src/openssl/openssl-1.1.1w/doc/man3/RAND_set_rand_method.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RAND_set_rand_method.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RAND_set_rand_method.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RC4_set_key.pod b/src/openssl/openssl-1.1.1w/doc/man3/RC4_set_key.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RC4_set_key.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RC4_set_key.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RIPEMD160_Init.pod b/src/openssl/openssl-1.1.1w/doc/man3/RIPEMD160_Init.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RIPEMD160_Init.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RIPEMD160_Init.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RSA_blinding_on.pod b/src/openssl/openssl-1.1.1w/doc/man3/RSA_blinding_on.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RSA_blinding_on.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RSA_blinding_on.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RSA_check_key.pod b/src/openssl/openssl-1.1.1w/doc/man3/RSA_check_key.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RSA_check_key.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RSA_check_key.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RSA_generate_key.pod b/src/openssl/openssl-1.1.1w/doc/man3/RSA_generate_key.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RSA_generate_key.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RSA_generate_key.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RSA_get0_key.pod b/src/openssl/openssl-1.1.1w/doc/man3/RSA_get0_key.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RSA_get0_key.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RSA_get0_key.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RSA_meth_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/RSA_meth_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RSA_meth_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RSA_meth_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RSA_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/RSA_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RSA_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RSA_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RSA_padding_add_PKCS1_type_1.pod b/src/openssl/openssl-1.1.1w/doc/man3/RSA_padding_add_PKCS1_type_1.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RSA_padding_add_PKCS1_type_1.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RSA_padding_add_PKCS1_type_1.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RSA_print.pod b/src/openssl/openssl-1.1.1w/doc/man3/RSA_print.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RSA_print.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RSA_print.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RSA_private_encrypt.pod b/src/openssl/openssl-1.1.1w/doc/man3/RSA_private_encrypt.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RSA_private_encrypt.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RSA_private_encrypt.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RSA_public_encrypt.pod b/src/openssl/openssl-1.1.1w/doc/man3/RSA_public_encrypt.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RSA_public_encrypt.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RSA_public_encrypt.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RSA_set_method.pod b/src/openssl/openssl-1.1.1w/doc/man3/RSA_set_method.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RSA_set_method.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RSA_set_method.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RSA_sign.pod b/src/openssl/openssl-1.1.1w/doc/man3/RSA_sign.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RSA_sign.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RSA_sign.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RSA_sign_ASN1_OCTET_STRING.pod b/src/openssl/openssl-1.1.1w/doc/man3/RSA_sign_ASN1_OCTET_STRING.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RSA_sign_ASN1_OCTET_STRING.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RSA_sign_ASN1_OCTET_STRING.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/RSA_size.pod b/src/openssl/openssl-1.1.1w/doc/man3/RSA_size.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/RSA_size.pod rename to src/openssl/openssl-1.1.1w/doc/man3/RSA_size.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SCT_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/SCT_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SCT_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SCT_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SCT_print.pod b/src/openssl/openssl-1.1.1w/doc/man3/SCT_print.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SCT_print.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SCT_print.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SCT_validate.pod b/src/openssl/openssl-1.1.1w/doc/man3/SCT_validate.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SCT_validate.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SCT_validate.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SHA256_Init.pod b/src/openssl/openssl-1.1.1w/doc/man3/SHA256_Init.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SHA256_Init.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SHA256_Init.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SMIME_read_CMS.pod b/src/openssl/openssl-1.1.1w/doc/man3/SMIME_read_CMS.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SMIME_read_CMS.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SMIME_read_CMS.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SMIME_read_PKCS7.pod b/src/openssl/openssl-1.1.1w/doc/man3/SMIME_read_PKCS7.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SMIME_read_PKCS7.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SMIME_read_PKCS7.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SMIME_write_CMS.pod b/src/openssl/openssl-1.1.1w/doc/man3/SMIME_write_CMS.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SMIME_write_CMS.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SMIME_write_CMS.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SMIME_write_PKCS7.pod b/src/openssl/openssl-1.1.1w/doc/man3/SMIME_write_PKCS7.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SMIME_write_PKCS7.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SMIME_write_PKCS7.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CIPHER_get_name.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CIPHER_get_name.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CIPHER_get_name.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CIPHER_get_name.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_COMP_add_compression_method.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_COMP_add_compression_method.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_COMP_add_compression_method.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_COMP_add_compression_method.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CONF_CTX_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CONF_CTX_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CONF_CTX_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CONF_CTX_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CONF_CTX_set1_prefix.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CONF_CTX_set1_prefix.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CONF_CTX_set1_prefix.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CONF_CTX_set1_prefix.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CONF_CTX_set_flags.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CONF_CTX_set_flags.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CONF_CTX_set_flags.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CONF_CTX_set_flags.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CONF_CTX_set_ssl_ctx.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CONF_CTX_set_ssl_ctx.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CONF_CTX_set_ssl_ctx.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CONF_CTX_set_ssl_ctx.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CONF_cmd.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CONF_cmd.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CONF_cmd.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CONF_cmd.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CONF_cmd_argv.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CONF_cmd_argv.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CONF_cmd_argv.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CONF_cmd_argv.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_add1_chain_cert.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_add1_chain_cert.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_add1_chain_cert.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_add1_chain_cert.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_add_extra_chain_cert.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_add_extra_chain_cert.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_add_extra_chain_cert.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_add_extra_chain_cert.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_add_session.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_add_session.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_add_session.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_add_session.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_config.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_config.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_config.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_config.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_ctrl.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_ctrl.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_ctrl.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_ctrl.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_dane_enable.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_dane_enable.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_dane_enable.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_dane_enable.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_flush_sessions.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_flush_sessions.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_flush_sessions.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_flush_sessions.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_free.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_free.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_free.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_free.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_get0_param.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_get0_param.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_get0_param.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_get0_param.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_get_verify_mode.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_get_verify_mode.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_get_verify_mode.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_get_verify_mode.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_has_client_custom_ext.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_has_client_custom_ext.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_has_client_custom_ext.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_has_client_custom_ext.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_load_verify_locations.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_load_verify_locations.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_load_verify_locations.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_load_verify_locations.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_sess_number.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_sess_number.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_sess_number.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_sess_number.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_sess_set_cache_size.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_sess_set_cache_size.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_sess_set_cache_size.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_sess_set_cache_size.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_sess_set_get_cb.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_sess_set_get_cb.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_sess_set_get_cb.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_sess_set_get_cb.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_sessions.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_sessions.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_sessions.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_sessions.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set0_CA_list.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set0_CA_list.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set0_CA_list.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set0_CA_list.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set1_curves.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set1_curves.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set1_curves.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set1_curves.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set1_sigalgs.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set1_sigalgs.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set1_sigalgs.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set1_sigalgs.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set1_verify_cert_store.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set1_verify_cert_store.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set1_verify_cert_store.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set1_verify_cert_store.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_alpn_select_cb.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_alpn_select_cb.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_alpn_select_cb.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_alpn_select_cb.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_cert_cb.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_cert_cb.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_cert_cb.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_cert_cb.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_cert_store.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_cert_store.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_cert_store.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_cert_store.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_cert_verify_callback.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_cert_verify_callback.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_cert_verify_callback.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_cert_verify_callback.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_cipher_list.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_cipher_list.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_cipher_list.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_cipher_list.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_client_cert_cb.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_client_cert_cb.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_client_cert_cb.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_client_cert_cb.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_client_hello_cb.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_client_hello_cb.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_client_hello_cb.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_client_hello_cb.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_ct_validation_callback.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_ct_validation_callback.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_ct_validation_callback.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_ct_validation_callback.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_ctlog_list_file.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_ctlog_list_file.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_ctlog_list_file.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_ctlog_list_file.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_default_passwd_cb.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_default_passwd_cb.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_default_passwd_cb.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_default_passwd_cb.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_ex_data.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_ex_data.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_ex_data.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_ex_data.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_generate_session_id.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_generate_session_id.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_generate_session_id.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_generate_session_id.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_info_callback.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_info_callback.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_info_callback.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_info_callback.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_keylog_callback.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_keylog_callback.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_keylog_callback.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_keylog_callback.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_max_cert_list.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_max_cert_list.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_max_cert_list.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_max_cert_list.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_min_proto_version.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_min_proto_version.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_min_proto_version.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_min_proto_version.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_mode.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_mode.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_mode.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_mode.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_msg_callback.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_msg_callback.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_msg_callback.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_msg_callback.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_num_tickets.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_num_tickets.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_num_tickets.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_num_tickets.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_options.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_options.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_options.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_options.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_psk_client_callback.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_psk_client_callback.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_psk_client_callback.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_psk_client_callback.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_quiet_shutdown.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_quiet_shutdown.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_quiet_shutdown.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_quiet_shutdown.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_read_ahead.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_read_ahead.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_read_ahead.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_read_ahead.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_record_padding_callback.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_record_padding_callback.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_record_padding_callback.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_record_padding_callback.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_security_level.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_security_level.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_security_level.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_security_level.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_session_cache_mode.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_session_cache_mode.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_session_cache_mode.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_session_cache_mode.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_session_id_context.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_session_id_context.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_session_id_context.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_session_id_context.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_session_ticket_cb.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_session_ticket_cb.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_session_ticket_cb.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_session_ticket_cb.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_split_send_fragment.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_split_send_fragment.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_split_send_fragment.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_split_send_fragment.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_ssl_version.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_ssl_version.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_ssl_version.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_ssl_version.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_stateless_cookie_generate_cb.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_stateless_cookie_generate_cb.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_stateless_cookie_generate_cb.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_stateless_cookie_generate_cb.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_timeout.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_timeout.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_timeout.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_timeout.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_tlsext_servername_callback.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_tlsext_servername_callback.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_tlsext_servername_callback.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_tlsext_servername_callback.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_tlsext_status_cb.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_tlsext_status_cb.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_tlsext_status_cb.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_tlsext_status_cb.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_tlsext_use_srtp.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_tlsext_use_srtp.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_tlsext_use_srtp.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_tlsext_use_srtp.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_tmp_dh_callback.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_tmp_dh_callback.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_tmp_dh_callback.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_tmp_dh_callback.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_verify.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_verify.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_set_verify.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_set_verify.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_use_certificate.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_use_certificate.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_use_certificate.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_use_certificate.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_use_psk_identity_hint.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_use_psk_identity_hint.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_use_psk_identity_hint.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_use_psk_identity_hint.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_use_serverinfo.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_use_serverinfo.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_CTX_use_serverinfo.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_CTX_use_serverinfo.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_free.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_free.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_free.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_free.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get0_cipher.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get0_cipher.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get0_cipher.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get0_cipher.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get0_hostname.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get0_hostname.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get0_hostname.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get0_hostname.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get0_id_context.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get0_id_context.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get0_id_context.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get0_id_context.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get0_peer.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get0_peer.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get0_peer.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get0_peer.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get_compress_id.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get_compress_id.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get_compress_id.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get_compress_id.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get_ex_data.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get_ex_data.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get_ex_data.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get_ex_data.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get_protocol_version.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get_protocol_version.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get_protocol_version.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get_protocol_version.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get_time.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get_time.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_get_time.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_get_time.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_has_ticket.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_has_ticket.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_has_ticket.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_has_ticket.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_is_resumable.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_is_resumable.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_is_resumable.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_is_resumable.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_print.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_print.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_print.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_print.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_set1_id.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_set1_id.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_SESSION_set1_id.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_SESSION_set1_id.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_accept.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_accept.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_accept.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_accept.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_alert_type_string.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_alert_type_string.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_alert_type_string.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_alert_type_string.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_alloc_buffers.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_alloc_buffers.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_alloc_buffers.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_alloc_buffers.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_check_chain.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_check_chain.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_check_chain.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_check_chain.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_clear.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_clear.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_clear.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_clear.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_connect.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_connect.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_connect.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_connect.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_do_handshake.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_do_handshake.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_do_handshake.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_do_handshake.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_export_keying_material.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_export_keying_material.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_export_keying_material.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_export_keying_material.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_extension_supported.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_extension_supported.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_extension_supported.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_extension_supported.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_free.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_free.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_free.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_free.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get0_peer_scts.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get0_peer_scts.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get0_peer_scts.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get0_peer_scts.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_SSL_CTX.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_SSL_CTX.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_SSL_CTX.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_SSL_CTX.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_all_async_fds.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_all_async_fds.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_all_async_fds.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_all_async_fds.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_ciphers.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_ciphers.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_ciphers.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_ciphers.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_client_random.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_client_random.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_client_random.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_client_random.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_current_cipher.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_current_cipher.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_current_cipher.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_current_cipher.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_default_timeout.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_default_timeout.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_default_timeout.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_default_timeout.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_error.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_error.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_error.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_error.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_extms_support.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_extms_support.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_extms_support.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_extms_support.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_fd.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_fd.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_fd.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_fd.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_peer_cert_chain.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_peer_cert_chain.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_peer_cert_chain.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_peer_cert_chain.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_peer_certificate.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_peer_certificate.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_peer_certificate.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_peer_certificate.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_peer_signature_nid.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_peer_signature_nid.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_peer_signature_nid.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_peer_signature_nid.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_peer_tmp_key.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_peer_tmp_key.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_peer_tmp_key.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_peer_tmp_key.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_psk_identity.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_psk_identity.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_psk_identity.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_psk_identity.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_rbio.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_rbio.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_rbio.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_rbio.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_session.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_session.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_session.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_session.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_shared_sigalgs.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_shared_sigalgs.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_shared_sigalgs.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_shared_sigalgs.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_verify_result.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_verify_result.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_verify_result.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_verify_result.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_get_version.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_get_version.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_get_version.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_get_version.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_in_init.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_in_init.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_in_init.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_in_init.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_key_update.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_key_update.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_key_update.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_key_update.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_library_init.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_library_init.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_library_init.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_library_init.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_load_client_CA_file.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_load_client_CA_file.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_load_client_CA_file.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_load_client_CA_file.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_pending.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_pending.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_pending.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_pending.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_read.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_read.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_read.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_read.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_read_early_data.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_read_early_data.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_read_early_data.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_read_early_data.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_rstate_string.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_rstate_string.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_rstate_string.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_rstate_string.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_session_reused.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_session_reused.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_session_reused.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_session_reused.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_set1_host.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_set1_host.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_set1_host.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_set1_host.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_set_bio.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_set_bio.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_set_bio.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_set_bio.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_set_connect_state.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_set_connect_state.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_set_connect_state.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_set_connect_state.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_set_fd.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_set_fd.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_set_fd.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_set_fd.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_set_session.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_set_session.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_set_session.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_set_session.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_set_shutdown.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_set_shutdown.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_set_shutdown.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_set_shutdown.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_set_verify_result.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_set_verify_result.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_set_verify_result.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_set_verify_result.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_shutdown.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_shutdown.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_shutdown.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_shutdown.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_state_string.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_state_string.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_state_string.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_state_string.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_want.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_want.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_want.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_want.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/SSL_write.pod b/src/openssl/openssl-1.1.1w/doc/man3/SSL_write.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/SSL_write.pod rename to src/openssl/openssl-1.1.1w/doc/man3/SSL_write.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/UI_STRING.pod b/src/openssl/openssl-1.1.1w/doc/man3/UI_STRING.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/UI_STRING.pod rename to src/openssl/openssl-1.1.1w/doc/man3/UI_STRING.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/UI_UTIL_read_pw.pod b/src/openssl/openssl-1.1.1w/doc/man3/UI_UTIL_read_pw.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/UI_UTIL_read_pw.pod rename to src/openssl/openssl-1.1.1w/doc/man3/UI_UTIL_read_pw.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/UI_create_method.pod b/src/openssl/openssl-1.1.1w/doc/man3/UI_create_method.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/UI_create_method.pod rename to src/openssl/openssl-1.1.1w/doc/man3/UI_create_method.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/UI_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/UI_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/UI_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/UI_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509V3_get_d2i.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509V3_get_d2i.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509V3_get_d2i.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509V3_get_d2i.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_ALGOR_dup.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_ALGOR_dup.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_ALGOR_dup.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_ALGOR_dup.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_CRL_get0_by_serial.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_CRL_get0_by_serial.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_CRL_get0_by_serial.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_CRL_get0_by_serial.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_EXTENSION_set_object.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_EXTENSION_set_object.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_EXTENSION_set_object.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_EXTENSION_set_object.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_LOOKUP.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_LOOKUP.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_LOOKUP.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_LOOKUP.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_LOOKUP_hash_dir.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_LOOKUP_hash_dir.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_LOOKUP_hash_dir.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_LOOKUP_hash_dir.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_LOOKUP_meth_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_LOOKUP_meth_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_LOOKUP_meth_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_LOOKUP_meth_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_NAME_ENTRY_get_object.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_NAME_ENTRY_get_object.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_NAME_ENTRY_get_object.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_NAME_ENTRY_get_object.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_NAME_add_entry_by_txt.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_NAME_add_entry_by_txt.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_NAME_add_entry_by_txt.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_NAME_add_entry_by_txt.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_NAME_get0_der.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_NAME_get0_der.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_NAME_get0_der.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_NAME_get0_der.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_NAME_get_index_by_NID.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_NAME_get_index_by_NID.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_NAME_get_index_by_NID.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_NAME_get_index_by_NID.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_NAME_print_ex.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_NAME_print_ex.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_NAME_print_ex.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_NAME_print_ex.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_PUBKEY_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_PUBKEY_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_PUBKEY_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_PUBKEY_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_SIG_get0.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_SIG_get0.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_SIG_get0.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_SIG_get0.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_STORE_CTX_get_error.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_STORE_CTX_get_error.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_STORE_CTX_get_error.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_STORE_CTX_get_error.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_STORE_CTX_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_STORE_CTX_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_STORE_CTX_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_STORE_CTX_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_STORE_CTX_set_verify_cb.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_STORE_CTX_set_verify_cb.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_STORE_CTX_set_verify_cb.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_STORE_CTX_set_verify_cb.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_STORE_add_cert.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_STORE_add_cert.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_STORE_add_cert.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_STORE_add_cert.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_STORE_get0_param.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_STORE_get0_param.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_STORE_get0_param.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_STORE_get0_param.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_STORE_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_STORE_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_STORE_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_STORE_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_STORE_set_verify_cb_func.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_STORE_set_verify_cb_func.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_STORE_set_verify_cb_func.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_STORE_set_verify_cb_func.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_VERIFY_PARAM_set_flags.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_VERIFY_PARAM_set_flags.pod similarity index 97% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_VERIFY_PARAM_set_flags.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_VERIFY_PARAM_set_flags.pod index f6f304bf7..6c79b4296 100644 --- a/src/openssl/openssl-1.1.1t/doc/man3/X509_VERIFY_PARAM_set_flags.pod +++ b/src/openssl/openssl-1.1.1w/doc/man3/X509_VERIFY_PARAM_set_flags.pod @@ -92,8 +92,9 @@ B. X509_VERIFY_PARAM_set_time() sets the verification time in B to B. Normally the current time is used. -X509_VERIFY_PARAM_add0_policy() enables policy checking (it is disabled -by default) and adds B to the acceptable policy set. +X509_VERIFY_PARAM_add0_policy() adds B to the acceptable policy set. +Contrary to preexisting documentation of this function it does not enable +policy checking. X509_VERIFY_PARAM_set1_policies() enables policy checking (it is disabled by default) and sets the acceptable policy set to B. Any existing @@ -377,9 +378,13 @@ and has no effect. The X509_VERIFY_PARAM_get_hostflags() function was added in OpenSSL 1.1.0i. +The function X509_VERIFY_PARAM_add0_policy() was historically documented as +enabling policy checking however the implementation has never done this. +The documentation was changed to align with the implementation. + =head1 COPYRIGHT -Copyright 2009-2020 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2009-2023 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_check_ca.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_check_ca.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_check_ca.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_check_ca.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_check_host.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_check_host.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_check_host.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_check_host.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_check_issued.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_check_issued.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_check_issued.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_check_issued.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_check_private_key.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_check_private_key.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_check_private_key.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_check_private_key.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_check_purpose.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_check_purpose.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_check_purpose.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_check_purpose.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_cmp.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_cmp.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_cmp.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_cmp.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_cmp_time.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_cmp_time.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_cmp_time.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_cmp_time.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_digest.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_digest.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_digest.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_digest.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_dup.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_dup.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_dup.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_dup.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_get0_notBefore.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_get0_notBefore.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_get0_notBefore.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_get0_notBefore.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_get0_signature.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_get0_signature.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_get0_signature.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_get0_signature.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_get0_uids.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_get0_uids.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_get0_uids.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_get0_uids.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_get_extension_flags.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_get_extension_flags.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_get_extension_flags.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_get_extension_flags.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_get_pubkey.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_get_pubkey.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_get_pubkey.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_get_pubkey.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_get_serialNumber.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_get_serialNumber.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_get_serialNumber.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_get_serialNumber.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_get_subject_name.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_get_subject_name.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_get_subject_name.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_get_subject_name.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_get_version.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_get_version.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_get_version.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_get_version.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_new.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_new.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_new.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_new.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_sign.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_sign.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_sign.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_sign.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509_verify_cert.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509_verify_cert.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509_verify_cert.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509_verify_cert.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/X509v3_get_ext_by_NID.pod b/src/openssl/openssl-1.1.1w/doc/man3/X509v3_get_ext_by_NID.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/X509v3_get_ext_by_NID.pod rename to src/openssl/openssl-1.1.1w/doc/man3/X509v3_get_ext_by_NID.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/d2i_DHparams.pod b/src/openssl/openssl-1.1.1w/doc/man3/d2i_DHparams.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/d2i_DHparams.pod rename to src/openssl/openssl-1.1.1w/doc/man3/d2i_DHparams.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/d2i_PKCS8PrivateKey_bio.pod b/src/openssl/openssl-1.1.1w/doc/man3/d2i_PKCS8PrivateKey_bio.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/d2i_PKCS8PrivateKey_bio.pod rename to src/openssl/openssl-1.1.1w/doc/man3/d2i_PKCS8PrivateKey_bio.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/d2i_PrivateKey.pod b/src/openssl/openssl-1.1.1w/doc/man3/d2i_PrivateKey.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/d2i_PrivateKey.pod rename to src/openssl/openssl-1.1.1w/doc/man3/d2i_PrivateKey.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/d2i_SSL_SESSION.pod b/src/openssl/openssl-1.1.1w/doc/man3/d2i_SSL_SESSION.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/d2i_SSL_SESSION.pod rename to src/openssl/openssl-1.1.1w/doc/man3/d2i_SSL_SESSION.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/d2i_X509.pod b/src/openssl/openssl-1.1.1w/doc/man3/d2i_X509.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/d2i_X509.pod rename to src/openssl/openssl-1.1.1w/doc/man3/d2i_X509.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/i2d_CMS_bio_stream.pod b/src/openssl/openssl-1.1.1w/doc/man3/i2d_CMS_bio_stream.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/i2d_CMS_bio_stream.pod rename to src/openssl/openssl-1.1.1w/doc/man3/i2d_CMS_bio_stream.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/i2d_PKCS7_bio_stream.pod b/src/openssl/openssl-1.1.1w/doc/man3/i2d_PKCS7_bio_stream.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/i2d_PKCS7_bio_stream.pod rename to src/openssl/openssl-1.1.1w/doc/man3/i2d_PKCS7_bio_stream.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/i2d_re_X509_tbs.pod b/src/openssl/openssl-1.1.1w/doc/man3/i2d_re_X509_tbs.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/i2d_re_X509_tbs.pod rename to src/openssl/openssl-1.1.1w/doc/man3/i2d_re_X509_tbs.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man3/o2i_SCT_LIST.pod b/src/openssl/openssl-1.1.1w/doc/man3/o2i_SCT_LIST.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man3/o2i_SCT_LIST.pod rename to src/openssl/openssl-1.1.1w/doc/man3/o2i_SCT_LIST.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man5/config.pod b/src/openssl/openssl-1.1.1w/doc/man5/config.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man5/config.pod rename to src/openssl/openssl-1.1.1w/doc/man5/config.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man5/x509v3_config.pod b/src/openssl/openssl-1.1.1w/doc/man5/x509v3_config.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man5/x509v3_config.pod rename to src/openssl/openssl-1.1.1w/doc/man5/x509v3_config.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/Ed25519.pod b/src/openssl/openssl-1.1.1w/doc/man7/Ed25519.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/Ed25519.pod rename to src/openssl/openssl-1.1.1w/doc/man7/Ed25519.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/RAND.pod b/src/openssl/openssl-1.1.1w/doc/man7/RAND.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/RAND.pod rename to src/openssl/openssl-1.1.1w/doc/man7/RAND.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/RAND_DRBG.pod b/src/openssl/openssl-1.1.1w/doc/man7/RAND_DRBG.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/RAND_DRBG.pod rename to src/openssl/openssl-1.1.1w/doc/man7/RAND_DRBG.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/RSA-PSS.pod b/src/openssl/openssl-1.1.1w/doc/man7/RSA-PSS.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/RSA-PSS.pod rename to src/openssl/openssl-1.1.1w/doc/man7/RSA-PSS.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/SM2.pod b/src/openssl/openssl-1.1.1w/doc/man7/SM2.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/SM2.pod rename to src/openssl/openssl-1.1.1w/doc/man7/SM2.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/X25519.pod b/src/openssl/openssl-1.1.1w/doc/man7/X25519.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/X25519.pod rename to src/openssl/openssl-1.1.1w/doc/man7/X25519.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/bio.pod b/src/openssl/openssl-1.1.1w/doc/man7/bio.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/bio.pod rename to src/openssl/openssl-1.1.1w/doc/man7/bio.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/crypto.pod b/src/openssl/openssl-1.1.1w/doc/man7/crypto.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/crypto.pod rename to src/openssl/openssl-1.1.1w/doc/man7/crypto.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/ct.pod b/src/openssl/openssl-1.1.1w/doc/man7/ct.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/ct.pod rename to src/openssl/openssl-1.1.1w/doc/man7/ct.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/des_modes.pod b/src/openssl/openssl-1.1.1w/doc/man7/des_modes.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/des_modes.pod rename to src/openssl/openssl-1.1.1w/doc/man7/des_modes.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/evp.pod b/src/openssl/openssl-1.1.1w/doc/man7/evp.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/evp.pod rename to src/openssl/openssl-1.1.1w/doc/man7/evp.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/ossl_store-file.pod b/src/openssl/openssl-1.1.1w/doc/man7/ossl_store-file.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/ossl_store-file.pod rename to src/openssl/openssl-1.1.1w/doc/man7/ossl_store-file.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/ossl_store.pod b/src/openssl/openssl-1.1.1w/doc/man7/ossl_store.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/ossl_store.pod rename to src/openssl/openssl-1.1.1w/doc/man7/ossl_store.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/passphrase-encoding.pod b/src/openssl/openssl-1.1.1w/doc/man7/passphrase-encoding.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/passphrase-encoding.pod rename to src/openssl/openssl-1.1.1w/doc/man7/passphrase-encoding.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/proxy-certificates.pod b/src/openssl/openssl-1.1.1w/doc/man7/proxy-certificates.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/proxy-certificates.pod rename to src/openssl/openssl-1.1.1w/doc/man7/proxy-certificates.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/scrypt.pod b/src/openssl/openssl-1.1.1w/doc/man7/scrypt.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/scrypt.pod rename to src/openssl/openssl-1.1.1w/doc/man7/scrypt.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/ssl.pod b/src/openssl/openssl-1.1.1w/doc/man7/ssl.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/ssl.pod rename to src/openssl/openssl-1.1.1w/doc/man7/ssl.pod diff --git a/src/openssl/openssl-1.1.1t/doc/man7/x509.pod b/src/openssl/openssl-1.1.1w/doc/man7/x509.pod similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/man7/x509.pod rename to src/openssl/openssl-1.1.1w/doc/man7/x509.pod diff --git a/src/openssl/openssl-1.1.1t/doc/openssl-c-indent.el b/src/openssl/openssl-1.1.1w/doc/openssl-c-indent.el similarity index 100% rename from src/openssl/openssl-1.1.1t/doc/openssl-c-indent.el rename to src/openssl/openssl-1.1.1w/doc/openssl-c-indent.el diff --git a/src/openssl/openssl-1.1.1t/e_os.h b/src/openssl/openssl-1.1.1w/e_os.h similarity index 100% rename from src/openssl/openssl-1.1.1t/e_os.h rename to src/openssl/openssl-1.1.1w/e_os.h diff --git a/src/openssl/openssl-1.1.1t/engines/asm/e_padlock-x86.pl b/src/openssl/openssl-1.1.1w/engines/asm/e_padlock-x86.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/asm/e_padlock-x86.pl rename to src/openssl/openssl-1.1.1w/engines/asm/e_padlock-x86.pl diff --git a/src/openssl/openssl-1.1.1t/engines/asm/e_padlock-x86_64.pl b/src/openssl/openssl-1.1.1w/engines/asm/e_padlock-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/asm/e_padlock-x86_64.pl rename to src/openssl/openssl-1.1.1w/engines/asm/e_padlock-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/engines/build.info b/src/openssl/openssl-1.1.1w/engines/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/build.info rename to src/openssl/openssl-1.1.1w/engines/build.info diff --git a/src/openssl/openssl-1.1.1t/engines/e_afalg.c b/src/openssl/openssl-1.1.1w/engines/e_afalg.c similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_afalg.c rename to src/openssl/openssl-1.1.1w/engines/e_afalg.c diff --git a/src/openssl/openssl-1.1.1t/engines/e_afalg.ec b/src/openssl/openssl-1.1.1w/engines/e_afalg.ec similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_afalg.ec rename to src/openssl/openssl-1.1.1w/engines/e_afalg.ec diff --git a/src/openssl/openssl-1.1.1t/engines/e_afalg.h b/src/openssl/openssl-1.1.1w/engines/e_afalg.h similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_afalg.h rename to src/openssl/openssl-1.1.1w/engines/e_afalg.h diff --git a/src/openssl/openssl-1.1.1t/engines/e_afalg.txt b/src/openssl/openssl-1.1.1w/engines/e_afalg.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_afalg.txt rename to src/openssl/openssl-1.1.1w/engines/e_afalg.txt diff --git a/src/openssl/openssl-1.1.1t/engines/e_afalg_err.c b/src/openssl/openssl-1.1.1w/engines/e_afalg_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_afalg_err.c rename to src/openssl/openssl-1.1.1w/engines/e_afalg_err.c diff --git a/src/openssl/openssl-1.1.1t/engines/e_afalg_err.h b/src/openssl/openssl-1.1.1w/engines/e_afalg_err.h similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_afalg_err.h rename to src/openssl/openssl-1.1.1w/engines/e_afalg_err.h diff --git a/src/openssl/openssl-1.1.1t/engines/e_capi.c b/src/openssl/openssl-1.1.1w/engines/e_capi.c similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_capi.c rename to src/openssl/openssl-1.1.1w/engines/e_capi.c diff --git a/src/openssl/openssl-1.1.1t/engines/e_capi.ec b/src/openssl/openssl-1.1.1w/engines/e_capi.ec similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_capi.ec rename to src/openssl/openssl-1.1.1w/engines/e_capi.ec diff --git a/src/openssl/openssl-1.1.1t/engines/e_capi.txt b/src/openssl/openssl-1.1.1w/engines/e_capi.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_capi.txt rename to src/openssl/openssl-1.1.1w/engines/e_capi.txt diff --git a/src/openssl/openssl-1.1.1t/engines/e_capi_err.c b/src/openssl/openssl-1.1.1w/engines/e_capi_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_capi_err.c rename to src/openssl/openssl-1.1.1w/engines/e_capi_err.c diff --git a/src/openssl/openssl-1.1.1t/engines/e_capi_err.h b/src/openssl/openssl-1.1.1w/engines/e_capi_err.h similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_capi_err.h rename to src/openssl/openssl-1.1.1w/engines/e_capi_err.h diff --git a/src/openssl/openssl-1.1.1t/engines/e_dasync.c b/src/openssl/openssl-1.1.1w/engines/e_dasync.c similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_dasync.c rename to src/openssl/openssl-1.1.1w/engines/e_dasync.c diff --git a/src/openssl/openssl-1.1.1t/engines/e_dasync.ec b/src/openssl/openssl-1.1.1w/engines/e_dasync.ec similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_dasync.ec rename to src/openssl/openssl-1.1.1w/engines/e_dasync.ec diff --git a/src/openssl/openssl-1.1.1t/engines/e_dasync.txt b/src/openssl/openssl-1.1.1w/engines/e_dasync.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_dasync.txt rename to src/openssl/openssl-1.1.1w/engines/e_dasync.txt diff --git a/src/openssl/openssl-1.1.1t/engines/e_dasync_err.c b/src/openssl/openssl-1.1.1w/engines/e_dasync_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_dasync_err.c rename to src/openssl/openssl-1.1.1w/engines/e_dasync_err.c diff --git a/src/openssl/openssl-1.1.1t/engines/e_dasync_err.h b/src/openssl/openssl-1.1.1w/engines/e_dasync_err.h similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_dasync_err.h rename to src/openssl/openssl-1.1.1w/engines/e_dasync_err.h diff --git a/src/openssl/openssl-1.1.1t/engines/e_ossltest.c b/src/openssl/openssl-1.1.1w/engines/e_ossltest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_ossltest.c rename to src/openssl/openssl-1.1.1w/engines/e_ossltest.c diff --git a/src/openssl/openssl-1.1.1t/engines/e_ossltest.ec b/src/openssl/openssl-1.1.1w/engines/e_ossltest.ec similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_ossltest.ec rename to src/openssl/openssl-1.1.1w/engines/e_ossltest.ec diff --git a/src/openssl/openssl-1.1.1t/engines/e_ossltest.txt b/src/openssl/openssl-1.1.1w/engines/e_ossltest.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_ossltest.txt rename to src/openssl/openssl-1.1.1w/engines/e_ossltest.txt diff --git a/src/openssl/openssl-1.1.1t/engines/e_ossltest_err.c b/src/openssl/openssl-1.1.1w/engines/e_ossltest_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_ossltest_err.c rename to src/openssl/openssl-1.1.1w/engines/e_ossltest_err.c diff --git a/src/openssl/openssl-1.1.1t/engines/e_ossltest_err.h b/src/openssl/openssl-1.1.1w/engines/e_ossltest_err.h similarity index 100% rename from src/openssl/openssl-1.1.1t/engines/e_ossltest_err.h rename to src/openssl/openssl-1.1.1w/engines/e_ossltest_err.h diff --git a/src/openssl/openssl-1.1.1t/engines/e_padlock.c b/src/openssl/openssl-1.1.1w/engines/e_padlock.c similarity index 97% rename from src/openssl/openssl-1.1.1t/engines/e_padlock.c rename to src/openssl/openssl-1.1.1w/engines/e_padlock.c index a82c07e81..80756e82b 100644 --- a/src/openssl/openssl-1.1.1t/engines/e_padlock.c +++ b/src/openssl/openssl-1.1.1w/engines/e_padlock.c @@ -1,5 +1,5 @@ /* - * Copyright 2004-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2004-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -144,6 +144,19 @@ static int padlock_init(ENGINE *e) return (padlock_use_rng || padlock_use_ace); } +# ifndef AES_ASM +static int padlock_aes_set_encrypt_key(const unsigned char *userKey, + const int bits, + AES_KEY *key); +static int padlock_aes_set_decrypt_key(const unsigned char *userKey, + const int bits, + AES_KEY *key); +# define AES_ASM +# define AES_set_encrypt_key padlock_aes_set_encrypt_key +# define AES_set_decrypt_key padlock_aes_set_decrypt_key +# include "../crypto/aes/aes_core.c" +# endif + /* * This stuff is needed if this ENGINE is being compiled into a * self-contained shared-library. @@ -639,12 +652,10 @@ padlock_aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, AES_set_decrypt_key(key, key_len, &cdata->ks); else AES_set_encrypt_key(key, key_len, &cdata->ks); -# ifndef AES_ASM /* * OpenSSL C functions use byte-swapped extended key. */ padlock_key_bswap(&cdata->ks); -# endif cdata->cword.b.keygen = 1; break; diff --git a/src/openssl/openssl-1.1.1t/external/perl/Downloaded.txt b/src/openssl/openssl-1.1.1w/external/perl/Downloaded.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Downloaded.txt rename to src/openssl/openssl-1.1.1w/external/perl/Downloaded.txt diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/Artistic b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/Artistic similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/Artistic rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/Artistic diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/COPYING b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/COPYING similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/COPYING rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/COPYING diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/INSTALL b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/INSTALL similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/INSTALL rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/INSTALL diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/MANIFEST b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/MANIFEST similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/MANIFEST rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/MANIFEST diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/META.json b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/META.json similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/META.json rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/META.json diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/META.yml b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/META.yml similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/META.yml rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/META.yml diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/Makefile.PL b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/Makefile.PL similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/Makefile.PL rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/Makefile.PL diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/README b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/README similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/README rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/README diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/lib/Text/Template.pm b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/lib/Text/Template.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/lib/Text/Template.pm rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/lib/Text/Template.pm diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/lib/Text/Template/Preprocess.pm b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/lib/Text/Template/Preprocess.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/lib/Text/Template/Preprocess.pm rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/lib/Text/Template/Preprocess.pm diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/00-version.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/00-version.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/00-version.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/00-version.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/01-basic.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/01-basic.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/01-basic.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/01-basic.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/02-hash.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/02-hash.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/02-hash.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/02-hash.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/03-out.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/03-out.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/03-out.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/03-out.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/04-safe.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/04-safe.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/04-safe.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/04-safe.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/05-safe2.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/05-safe2.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/05-safe2.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/05-safe2.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/06-ofh.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/06-ofh.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/06-ofh.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/06-ofh.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/07-safe3.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/07-safe3.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/07-safe3.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/07-safe3.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/08-exported.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/08-exported.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/08-exported.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/08-exported.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/09-error.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/09-error.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/09-error.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/09-error.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/10-delimiters.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/10-delimiters.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/10-delimiters.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/10-delimiters.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/11-prepend.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/11-prepend.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/11-prepend.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/11-prepend.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/12-preprocess.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/12-preprocess.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/12-preprocess.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/12-preprocess.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/13-taint.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/13-taint.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/13-taint.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/13-taint.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/14-broken.t b/src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/14-broken.t similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/Text-Template-1.46/t/14-broken.t rename to src/openssl/openssl-1.1.1w/external/perl/Text-Template-1.46/t/14-broken.t diff --git a/src/openssl/openssl-1.1.1t/external/perl/transfer/Text/Template.pm b/src/openssl/openssl-1.1.1w/external/perl/transfer/Text/Template.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/external/perl/transfer/Text/Template.pm rename to src/openssl/openssl-1.1.1w/external/perl/transfer/Text/Template.pm diff --git a/src/openssl/openssl-1.1.1t/fuzz/README.md b/src/openssl/openssl-1.1.1w/fuzz/README.md similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/README.md rename to src/openssl/openssl-1.1.1w/fuzz/README.md diff --git a/src/openssl/openssl-1.1.1t/fuzz/asn1.c b/src/openssl/openssl-1.1.1w/fuzz/asn1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/asn1.c rename to src/openssl/openssl-1.1.1w/fuzz/asn1.c diff --git a/src/openssl/openssl-1.1.1t/fuzz/asn1parse.c b/src/openssl/openssl-1.1.1w/fuzz/asn1parse.c similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/asn1parse.c rename to src/openssl/openssl-1.1.1w/fuzz/asn1parse.c diff --git a/src/openssl/openssl-1.1.1t/fuzz/bignum.c b/src/openssl/openssl-1.1.1w/fuzz/bignum.c similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/bignum.c rename to src/openssl/openssl-1.1.1w/fuzz/bignum.c diff --git a/src/openssl/openssl-1.1.1t/fuzz/bndiv.c b/src/openssl/openssl-1.1.1w/fuzz/bndiv.c similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/bndiv.c rename to src/openssl/openssl-1.1.1w/fuzz/bndiv.c diff --git a/src/openssl/openssl-1.1.1t/fuzz/build.info b/src/openssl/openssl-1.1.1w/fuzz/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/build.info rename to src/openssl/openssl-1.1.1w/fuzz/build.info diff --git a/src/openssl/openssl-1.1.1t/fuzz/client.c b/src/openssl/openssl-1.1.1w/fuzz/client.c similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/client.c rename to src/openssl/openssl-1.1.1w/fuzz/client.c diff --git a/src/openssl/openssl-1.1.1t/fuzz/cms.c b/src/openssl/openssl-1.1.1w/fuzz/cms.c similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/cms.c rename to src/openssl/openssl-1.1.1w/fuzz/cms.c diff --git a/src/openssl/openssl-1.1.1t/fuzz/conf.c b/src/openssl/openssl-1.1.1w/fuzz/conf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/conf.c rename to src/openssl/openssl-1.1.1w/fuzz/conf.c diff --git a/src/openssl/openssl-1.1.1t/fuzz/crl.c b/src/openssl/openssl-1.1.1w/fuzz/crl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/crl.c rename to src/openssl/openssl-1.1.1w/fuzz/crl.c diff --git a/src/openssl/openssl-1.1.1t/fuzz/ct.c b/src/openssl/openssl-1.1.1w/fuzz/ct.c similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/ct.c rename to src/openssl/openssl-1.1.1w/fuzz/ct.c diff --git a/src/openssl/openssl-1.1.1t/fuzz/driver.c b/src/openssl/openssl-1.1.1w/fuzz/driver.c similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/driver.c rename to src/openssl/openssl-1.1.1w/fuzz/driver.c diff --git a/src/openssl/openssl-1.1.1t/fuzz/fuzzer.h b/src/openssl/openssl-1.1.1w/fuzz/fuzzer.h similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/fuzzer.h rename to src/openssl/openssl-1.1.1w/fuzz/fuzzer.h diff --git a/src/openssl/openssl-1.1.1t/fuzz/helper.py b/src/openssl/openssl-1.1.1w/fuzz/helper.py similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/helper.py rename to src/openssl/openssl-1.1.1w/fuzz/helper.py diff --git a/src/openssl/openssl-1.1.1t/fuzz/mkfuzzoids.pl b/src/openssl/openssl-1.1.1w/fuzz/mkfuzzoids.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/mkfuzzoids.pl rename to src/openssl/openssl-1.1.1w/fuzz/mkfuzzoids.pl diff --git a/src/openssl/openssl-1.1.1t/fuzz/oids.txt b/src/openssl/openssl-1.1.1w/fuzz/oids.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/oids.txt rename to src/openssl/openssl-1.1.1w/fuzz/oids.txt diff --git a/src/openssl/openssl-1.1.1t/fuzz/rand.inc b/src/openssl/openssl-1.1.1w/fuzz/rand.inc similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/rand.inc rename to src/openssl/openssl-1.1.1w/fuzz/rand.inc diff --git a/src/openssl/openssl-1.1.1t/fuzz/server.c b/src/openssl/openssl-1.1.1w/fuzz/server.c similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/server.c rename to src/openssl/openssl-1.1.1w/fuzz/server.c diff --git a/src/openssl/openssl-1.1.1t/fuzz/test-corpus.c b/src/openssl/openssl-1.1.1w/fuzz/test-corpus.c similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/test-corpus.c rename to src/openssl/openssl-1.1.1w/fuzz/test-corpus.c diff --git a/src/openssl/openssl-1.1.1t/fuzz/x509.c b/src/openssl/openssl-1.1.1w/fuzz/x509.c similarity index 100% rename from src/openssl/openssl-1.1.1t/fuzz/x509.c rename to src/openssl/openssl-1.1.1w/fuzz/x509.c diff --git a/src/openssl/openssl-1.1.1t/include/crypto/__DECC_INCLUDE_EPILOGUE.H b/src/openssl/openssl-1.1.1w/include/crypto/__DECC_INCLUDE_EPILOGUE.H similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/__DECC_INCLUDE_EPILOGUE.H rename to src/openssl/openssl-1.1.1w/include/crypto/__DECC_INCLUDE_EPILOGUE.H diff --git a/src/openssl/openssl-1.1.1t/include/crypto/__DECC_INCLUDE_PROLOGUE.H b/src/openssl/openssl-1.1.1w/include/crypto/__DECC_INCLUDE_PROLOGUE.H similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/__DECC_INCLUDE_PROLOGUE.H rename to src/openssl/openssl-1.1.1w/include/crypto/__DECC_INCLUDE_PROLOGUE.H diff --git a/src/openssl/openssl-1.1.1t/include/crypto/aria.h b/src/openssl/openssl-1.1.1w/include/crypto/aria.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/aria.h rename to src/openssl/openssl-1.1.1w/include/crypto/aria.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/asn1.h b/src/openssl/openssl-1.1.1w/include/crypto/asn1.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/asn1.h rename to src/openssl/openssl-1.1.1w/include/crypto/asn1.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/async.h b/src/openssl/openssl-1.1.1w/include/crypto/async.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/async.h rename to src/openssl/openssl-1.1.1w/include/crypto/async.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/bn.h b/src/openssl/openssl-1.1.1w/include/crypto/bn.h similarity index 92% rename from src/openssl/openssl-1.1.1t/include/crypto/bn.h rename to src/openssl/openssl-1.1.1w/include/crypto/bn.h index 9f866ed71..250914c46 100644 --- a/src/openssl/openssl-1.1.1t/include/crypto/bn.h +++ b/src/openssl/openssl-1.1.1w/include/crypto/bn.h @@ -86,10 +86,5 @@ int bn_lshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); int bn_rshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); -int ossl_bn_rsa_do_unblind(const BIGNUM *intermediate, - const BN_BLINDING *blinding, - const BIGNUM *possible_arg2, - const BIGNUM *to_mod, BN_CTX *ctx, - unsigned char *buf, int num); #endif diff --git a/src/openssl/openssl-1.1.1t/include/crypto/bn_conf.h.in b/src/openssl/openssl-1.1.1w/include/crypto/bn_conf.h.in similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/bn_conf.h.in rename to src/openssl/openssl-1.1.1w/include/crypto/bn_conf.h.in diff --git a/src/openssl/openssl-1.1.1t/include/crypto/bn_dh.h b/src/openssl/openssl-1.1.1w/include/crypto/bn_dh.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/bn_dh.h rename to src/openssl/openssl-1.1.1w/include/crypto/bn_dh.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/bn_srp.h b/src/openssl/openssl-1.1.1w/include/crypto/bn_srp.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/bn_srp.h rename to src/openssl/openssl-1.1.1w/include/crypto/bn_srp.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/chacha.h b/src/openssl/openssl-1.1.1w/include/crypto/chacha.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/chacha.h rename to src/openssl/openssl-1.1.1w/include/crypto/chacha.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/cryptlib.h b/src/openssl/openssl-1.1.1w/include/crypto/cryptlib.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/cryptlib.h rename to src/openssl/openssl-1.1.1w/include/crypto/cryptlib.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/ctype.h b/src/openssl/openssl-1.1.1w/include/crypto/ctype.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/ctype.h rename to src/openssl/openssl-1.1.1w/include/crypto/ctype.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/dso_conf.h.in b/src/openssl/openssl-1.1.1w/include/crypto/dso_conf.h.in similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/dso_conf.h.in rename to src/openssl/openssl-1.1.1w/include/crypto/dso_conf.h.in diff --git a/src/openssl/openssl-1.1.1t/include/crypto/ec.h b/src/openssl/openssl-1.1.1w/include/crypto/ec.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/ec.h rename to src/openssl/openssl-1.1.1w/include/crypto/ec.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/engine.h b/src/openssl/openssl-1.1.1w/include/crypto/engine.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/engine.h rename to src/openssl/openssl-1.1.1w/include/crypto/engine.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/err.h b/src/openssl/openssl-1.1.1w/include/crypto/err.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/err.h rename to src/openssl/openssl-1.1.1w/include/crypto/err.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/evp.h b/src/openssl/openssl-1.1.1w/include/crypto/evp.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/evp.h rename to src/openssl/openssl-1.1.1w/include/crypto/evp.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/lhash.h b/src/openssl/openssl-1.1.1w/include/crypto/lhash.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/lhash.h rename to src/openssl/openssl-1.1.1w/include/crypto/lhash.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/md32_common.h b/src/openssl/openssl-1.1.1w/include/crypto/md32_common.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/md32_common.h rename to src/openssl/openssl-1.1.1w/include/crypto/md32_common.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/objects.h b/src/openssl/openssl-1.1.1w/include/crypto/objects.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/objects.h rename to src/openssl/openssl-1.1.1w/include/crypto/objects.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/poly1305.h b/src/openssl/openssl-1.1.1w/include/crypto/poly1305.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/poly1305.h rename to src/openssl/openssl-1.1.1w/include/crypto/poly1305.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/rand.h b/src/openssl/openssl-1.1.1w/include/crypto/rand.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/rand.h rename to src/openssl/openssl-1.1.1w/include/crypto/rand.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/sha.h b/src/openssl/openssl-1.1.1w/include/crypto/sha.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/sha.h rename to src/openssl/openssl-1.1.1w/include/crypto/sha.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/siphash.h b/src/openssl/openssl-1.1.1w/include/crypto/siphash.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/siphash.h rename to src/openssl/openssl-1.1.1w/include/crypto/siphash.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/sm2.h b/src/openssl/openssl-1.1.1w/include/crypto/sm2.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/sm2.h rename to src/openssl/openssl-1.1.1w/include/crypto/sm2.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/sm2err.h b/src/openssl/openssl-1.1.1w/include/crypto/sm2err.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/sm2err.h rename to src/openssl/openssl-1.1.1w/include/crypto/sm2err.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/sm3.h b/src/openssl/openssl-1.1.1w/include/crypto/sm3.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/sm3.h rename to src/openssl/openssl-1.1.1w/include/crypto/sm3.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/sm4.h b/src/openssl/openssl-1.1.1w/include/crypto/sm4.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/sm4.h rename to src/openssl/openssl-1.1.1w/include/crypto/sm4.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/store.h b/src/openssl/openssl-1.1.1w/include/crypto/store.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/store.h rename to src/openssl/openssl-1.1.1w/include/crypto/store.h diff --git a/src/openssl/openssl-1.1.1t/include/crypto/x509.h b/src/openssl/openssl-1.1.1w/include/crypto/x509.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/crypto/x509.h rename to src/openssl/openssl-1.1.1w/include/crypto/x509.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/__DECC_INCLUDE_EPILOGUE.H b/src/openssl/openssl-1.1.1w/include/internal/__DECC_INCLUDE_EPILOGUE.H similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/__DECC_INCLUDE_EPILOGUE.H rename to src/openssl/openssl-1.1.1w/include/internal/__DECC_INCLUDE_EPILOGUE.H diff --git a/src/openssl/openssl-1.1.1t/include/internal/__DECC_INCLUDE_PROLOGUE.H b/src/openssl/openssl-1.1.1w/include/internal/__DECC_INCLUDE_PROLOGUE.H similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/__DECC_INCLUDE_PROLOGUE.H rename to src/openssl/openssl-1.1.1w/include/internal/__DECC_INCLUDE_PROLOGUE.H diff --git a/src/openssl/openssl-1.1.1t/include/internal/bio.h b/src/openssl/openssl-1.1.1w/include/internal/bio.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/bio.h rename to src/openssl/openssl-1.1.1w/include/internal/bio.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/comp.h b/src/openssl/openssl-1.1.1w/include/internal/comp.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/comp.h rename to src/openssl/openssl-1.1.1w/include/internal/comp.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/conf.h b/src/openssl/openssl-1.1.1w/include/internal/conf.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/conf.h rename to src/openssl/openssl-1.1.1w/include/internal/conf.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/constant_time.h b/src/openssl/openssl-1.1.1w/include/internal/constant_time.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/constant_time.h rename to src/openssl/openssl-1.1.1w/include/internal/constant_time.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/cryptlib.h b/src/openssl/openssl-1.1.1w/include/internal/cryptlib.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/cryptlib.h rename to src/openssl/openssl-1.1.1w/include/internal/cryptlib.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/dane.h b/src/openssl/openssl-1.1.1w/include/internal/dane.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/dane.h rename to src/openssl/openssl-1.1.1w/include/internal/dane.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/dso.h b/src/openssl/openssl-1.1.1w/include/internal/dso.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/dso.h rename to src/openssl/openssl-1.1.1w/include/internal/dso.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/dsoerr.h b/src/openssl/openssl-1.1.1w/include/internal/dsoerr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/dsoerr.h rename to src/openssl/openssl-1.1.1w/include/internal/dsoerr.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/err.h b/src/openssl/openssl-1.1.1w/include/internal/err.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/err.h rename to src/openssl/openssl-1.1.1w/include/internal/err.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/nelem.h b/src/openssl/openssl-1.1.1w/include/internal/nelem.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/nelem.h rename to src/openssl/openssl-1.1.1w/include/internal/nelem.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/numbers.h b/src/openssl/openssl-1.1.1w/include/internal/numbers.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/numbers.h rename to src/openssl/openssl-1.1.1w/include/internal/numbers.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/o_dir.h b/src/openssl/openssl-1.1.1w/include/internal/o_dir.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/o_dir.h rename to src/openssl/openssl-1.1.1w/include/internal/o_dir.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/o_str.h b/src/openssl/openssl-1.1.1w/include/internal/o_str.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/o_str.h rename to src/openssl/openssl-1.1.1w/include/internal/o_str.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/refcount.h b/src/openssl/openssl-1.1.1w/include/internal/refcount.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/refcount.h rename to src/openssl/openssl-1.1.1w/include/internal/refcount.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/sockets.h b/src/openssl/openssl-1.1.1w/include/internal/sockets.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/sockets.h rename to src/openssl/openssl-1.1.1w/include/internal/sockets.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/sslconf.h b/src/openssl/openssl-1.1.1w/include/internal/sslconf.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/sslconf.h rename to src/openssl/openssl-1.1.1w/include/internal/sslconf.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/thread_once.h b/src/openssl/openssl-1.1.1w/include/internal/thread_once.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/thread_once.h rename to src/openssl/openssl-1.1.1w/include/internal/thread_once.h diff --git a/src/openssl/openssl-1.1.1t/include/internal/tsan_assist.h b/src/openssl/openssl-1.1.1w/include/internal/tsan_assist.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/internal/tsan_assist.h rename to src/openssl/openssl-1.1.1w/include/internal/tsan_assist.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/__DECC_INCLUDE_EPILOGUE.H b/src/openssl/openssl-1.1.1w/include/openssl/__DECC_INCLUDE_EPILOGUE.H similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/__DECC_INCLUDE_EPILOGUE.H rename to src/openssl/openssl-1.1.1w/include/openssl/__DECC_INCLUDE_EPILOGUE.H diff --git a/src/openssl/openssl-1.1.1t/include/openssl/__DECC_INCLUDE_PROLOGUE.H b/src/openssl/openssl-1.1.1w/include/openssl/__DECC_INCLUDE_PROLOGUE.H similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/__DECC_INCLUDE_PROLOGUE.H rename to src/openssl/openssl-1.1.1w/include/openssl/__DECC_INCLUDE_PROLOGUE.H diff --git a/src/openssl/openssl-1.1.1t/include/openssl/aes.h b/src/openssl/openssl-1.1.1w/include/openssl/aes.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/aes.h rename to src/openssl/openssl-1.1.1w/include/openssl/aes.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/asn1.h b/src/openssl/openssl-1.1.1w/include/openssl/asn1.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/asn1.h rename to src/openssl/openssl-1.1.1w/include/openssl/asn1.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/asn1_mac.h b/src/openssl/openssl-1.1.1w/include/openssl/asn1_mac.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/asn1_mac.h rename to src/openssl/openssl-1.1.1w/include/openssl/asn1_mac.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/asn1err.h b/src/openssl/openssl-1.1.1w/include/openssl/asn1err.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/asn1err.h rename to src/openssl/openssl-1.1.1w/include/openssl/asn1err.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/asn1t.h b/src/openssl/openssl-1.1.1w/include/openssl/asn1t.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/asn1t.h rename to src/openssl/openssl-1.1.1w/include/openssl/asn1t.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/async.h b/src/openssl/openssl-1.1.1w/include/openssl/async.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/async.h rename to src/openssl/openssl-1.1.1w/include/openssl/async.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/asyncerr.h b/src/openssl/openssl-1.1.1w/include/openssl/asyncerr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/asyncerr.h rename to src/openssl/openssl-1.1.1w/include/openssl/asyncerr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/bio.h b/src/openssl/openssl-1.1.1w/include/openssl/bio.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/bio.h rename to src/openssl/openssl-1.1.1w/include/openssl/bio.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/bioerr.h b/src/openssl/openssl-1.1.1w/include/openssl/bioerr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/bioerr.h rename to src/openssl/openssl-1.1.1w/include/openssl/bioerr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/blowfish.h b/src/openssl/openssl-1.1.1w/include/openssl/blowfish.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/blowfish.h rename to src/openssl/openssl-1.1.1w/include/openssl/blowfish.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/bn.h b/src/openssl/openssl-1.1.1w/include/openssl/bn.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/bn.h rename to src/openssl/openssl-1.1.1w/include/openssl/bn.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/bnerr.h b/src/openssl/openssl-1.1.1w/include/openssl/bnerr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/bnerr.h rename to src/openssl/openssl-1.1.1w/include/openssl/bnerr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/buffer.h b/src/openssl/openssl-1.1.1w/include/openssl/buffer.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/buffer.h rename to src/openssl/openssl-1.1.1w/include/openssl/buffer.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/buffererr.h b/src/openssl/openssl-1.1.1w/include/openssl/buffererr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/buffererr.h rename to src/openssl/openssl-1.1.1w/include/openssl/buffererr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/camellia.h b/src/openssl/openssl-1.1.1w/include/openssl/camellia.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/camellia.h rename to src/openssl/openssl-1.1.1w/include/openssl/camellia.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/cast.h b/src/openssl/openssl-1.1.1w/include/openssl/cast.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/cast.h rename to src/openssl/openssl-1.1.1w/include/openssl/cast.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/cmac.h b/src/openssl/openssl-1.1.1w/include/openssl/cmac.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/cmac.h rename to src/openssl/openssl-1.1.1w/include/openssl/cmac.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/cms.h b/src/openssl/openssl-1.1.1w/include/openssl/cms.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/cms.h rename to src/openssl/openssl-1.1.1w/include/openssl/cms.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/cmserr.h b/src/openssl/openssl-1.1.1w/include/openssl/cmserr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/cmserr.h rename to src/openssl/openssl-1.1.1w/include/openssl/cmserr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/comp.h b/src/openssl/openssl-1.1.1w/include/openssl/comp.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/comp.h rename to src/openssl/openssl-1.1.1w/include/openssl/comp.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/comperr.h b/src/openssl/openssl-1.1.1w/include/openssl/comperr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/comperr.h rename to src/openssl/openssl-1.1.1w/include/openssl/comperr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/conf.h b/src/openssl/openssl-1.1.1w/include/openssl/conf.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/conf.h rename to src/openssl/openssl-1.1.1w/include/openssl/conf.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/conf_api.h b/src/openssl/openssl-1.1.1w/include/openssl/conf_api.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/conf_api.h rename to src/openssl/openssl-1.1.1w/include/openssl/conf_api.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/conferr.h b/src/openssl/openssl-1.1.1w/include/openssl/conferr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/conferr.h rename to src/openssl/openssl-1.1.1w/include/openssl/conferr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/crypto.h b/src/openssl/openssl-1.1.1w/include/openssl/crypto.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/crypto.h rename to src/openssl/openssl-1.1.1w/include/openssl/crypto.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/cryptoerr.h b/src/openssl/openssl-1.1.1w/include/openssl/cryptoerr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/cryptoerr.h rename to src/openssl/openssl-1.1.1w/include/openssl/cryptoerr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ct.h b/src/openssl/openssl-1.1.1w/include/openssl/ct.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ct.h rename to src/openssl/openssl-1.1.1w/include/openssl/ct.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/cterr.h b/src/openssl/openssl-1.1.1w/include/openssl/cterr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/cterr.h rename to src/openssl/openssl-1.1.1w/include/openssl/cterr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/des.h b/src/openssl/openssl-1.1.1w/include/openssl/des.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/des.h rename to src/openssl/openssl-1.1.1w/include/openssl/des.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/dh.h b/src/openssl/openssl-1.1.1w/include/openssl/dh.h similarity index 98% rename from src/openssl/openssl-1.1.1t/include/openssl/dh.h rename to src/openssl/openssl-1.1.1w/include/openssl/dh.h index 3527540cd..6c6ff3636 100644 --- a/src/openssl/openssl-1.1.1t/include/openssl/dh.h +++ b/src/openssl/openssl-1.1.1w/include/openssl/dh.h @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -29,6 +29,9 @@ extern "C" { # ifndef OPENSSL_DH_MAX_MODULUS_BITS # define OPENSSL_DH_MAX_MODULUS_BITS 10000 # endif +# ifndef OPENSSL_DH_CHECK_MAX_MODULUS_BITS +# define OPENSSL_DH_CHECK_MAX_MODULUS_BITS 32768 +# endif # define OPENSSL_DH_FIPS_MIN_MODULUS_BITS 1024 diff --git a/src/openssl/openssl-1.1.1t/include/openssl/dherr.h b/src/openssl/openssl-1.1.1w/include/openssl/dherr.h similarity index 96% rename from src/openssl/openssl-1.1.1t/include/openssl/dherr.h rename to src/openssl/openssl-1.1.1w/include/openssl/dherr.h index 916b3bed0..528c81985 100644 --- a/src/openssl/openssl-1.1.1t/include/openssl/dherr.h +++ b/src/openssl/openssl-1.1.1w/include/openssl/dherr.h @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -30,6 +30,7 @@ int ERR_load_DH_strings(void); # define DH_F_COMPUTE_KEY 102 # define DH_F_DHPARAMS_PRINT_FP 101 # define DH_F_DH_BUILTIN_GENPARAMS 106 +# define DH_F_DH_CHECK 126 # define DH_F_DH_CHECK_EX 121 # define DH_F_DH_CHECK_PARAMS_EX 122 # define DH_F_DH_CHECK_PUB_KEY_EX 123 diff --git a/src/openssl/openssl-1.1.1t/include/openssl/dsa.h b/src/openssl/openssl-1.1.1w/include/openssl/dsa.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/dsa.h rename to src/openssl/openssl-1.1.1w/include/openssl/dsa.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/dsaerr.h b/src/openssl/openssl-1.1.1w/include/openssl/dsaerr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/dsaerr.h rename to src/openssl/openssl-1.1.1w/include/openssl/dsaerr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/dtls1.h b/src/openssl/openssl-1.1.1w/include/openssl/dtls1.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/dtls1.h rename to src/openssl/openssl-1.1.1w/include/openssl/dtls1.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/e_os2.h b/src/openssl/openssl-1.1.1w/include/openssl/e_os2.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/e_os2.h rename to src/openssl/openssl-1.1.1w/include/openssl/e_os2.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ebcdic.h b/src/openssl/openssl-1.1.1w/include/openssl/ebcdic.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ebcdic.h rename to src/openssl/openssl-1.1.1w/include/openssl/ebcdic.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ec.h b/src/openssl/openssl-1.1.1w/include/openssl/ec.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ec.h rename to src/openssl/openssl-1.1.1w/include/openssl/ec.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ecdh.h b/src/openssl/openssl-1.1.1w/include/openssl/ecdh.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ecdh.h rename to src/openssl/openssl-1.1.1w/include/openssl/ecdh.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ecdsa.h b/src/openssl/openssl-1.1.1w/include/openssl/ecdsa.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ecdsa.h rename to src/openssl/openssl-1.1.1w/include/openssl/ecdsa.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ecerr.h b/src/openssl/openssl-1.1.1w/include/openssl/ecerr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ecerr.h rename to src/openssl/openssl-1.1.1w/include/openssl/ecerr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/engine.h b/src/openssl/openssl-1.1.1w/include/openssl/engine.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/engine.h rename to src/openssl/openssl-1.1.1w/include/openssl/engine.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/engineerr.h b/src/openssl/openssl-1.1.1w/include/openssl/engineerr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/engineerr.h rename to src/openssl/openssl-1.1.1w/include/openssl/engineerr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/err.h b/src/openssl/openssl-1.1.1w/include/openssl/err.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/err.h rename to src/openssl/openssl-1.1.1w/include/openssl/err.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/evp.h b/src/openssl/openssl-1.1.1w/include/openssl/evp.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/evp.h rename to src/openssl/openssl-1.1.1w/include/openssl/evp.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/evperr.h b/src/openssl/openssl-1.1.1w/include/openssl/evperr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/evperr.h rename to src/openssl/openssl-1.1.1w/include/openssl/evperr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/hmac.h b/src/openssl/openssl-1.1.1w/include/openssl/hmac.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/hmac.h rename to src/openssl/openssl-1.1.1w/include/openssl/hmac.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/idea.h b/src/openssl/openssl-1.1.1w/include/openssl/idea.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/idea.h rename to src/openssl/openssl-1.1.1w/include/openssl/idea.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/kdf.h b/src/openssl/openssl-1.1.1w/include/openssl/kdf.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/kdf.h rename to src/openssl/openssl-1.1.1w/include/openssl/kdf.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/kdferr.h b/src/openssl/openssl-1.1.1w/include/openssl/kdferr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/kdferr.h rename to src/openssl/openssl-1.1.1w/include/openssl/kdferr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/lhash.h b/src/openssl/openssl-1.1.1w/include/openssl/lhash.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/lhash.h rename to src/openssl/openssl-1.1.1w/include/openssl/lhash.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/md2.h b/src/openssl/openssl-1.1.1w/include/openssl/md2.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/md2.h rename to src/openssl/openssl-1.1.1w/include/openssl/md2.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/md4.h b/src/openssl/openssl-1.1.1w/include/openssl/md4.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/md4.h rename to src/openssl/openssl-1.1.1w/include/openssl/md4.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/md5.h b/src/openssl/openssl-1.1.1w/include/openssl/md5.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/md5.h rename to src/openssl/openssl-1.1.1w/include/openssl/md5.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/mdc2.h b/src/openssl/openssl-1.1.1w/include/openssl/mdc2.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/mdc2.h rename to src/openssl/openssl-1.1.1w/include/openssl/mdc2.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/modes.h b/src/openssl/openssl-1.1.1w/include/openssl/modes.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/modes.h rename to src/openssl/openssl-1.1.1w/include/openssl/modes.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/obj_mac.h b/src/openssl/openssl-1.1.1w/include/openssl/obj_mac.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/obj_mac.h rename to src/openssl/openssl-1.1.1w/include/openssl/obj_mac.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/objects.h b/src/openssl/openssl-1.1.1w/include/openssl/objects.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/objects.h rename to src/openssl/openssl-1.1.1w/include/openssl/objects.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/objectserr.h b/src/openssl/openssl-1.1.1w/include/openssl/objectserr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/objectserr.h rename to src/openssl/openssl-1.1.1w/include/openssl/objectserr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ocsp.h b/src/openssl/openssl-1.1.1w/include/openssl/ocsp.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ocsp.h rename to src/openssl/openssl-1.1.1w/include/openssl/ocsp.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ocsperr.h b/src/openssl/openssl-1.1.1w/include/openssl/ocsperr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ocsperr.h rename to src/openssl/openssl-1.1.1w/include/openssl/ocsperr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/opensslconf.h.in b/src/openssl/openssl-1.1.1w/include/openssl/opensslconf.h.in similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/opensslconf.h.in rename to src/openssl/openssl-1.1.1w/include/openssl/opensslconf.h.in diff --git a/src/openssl/openssl-1.1.1t/include/openssl/opensslv.h b/src/openssl/openssl-1.1.1w/include/openssl/opensslv.h similarity index 95% rename from src/openssl/openssl-1.1.1t/include/openssl/opensslv.h rename to src/openssl/openssl-1.1.1w/include/openssl/opensslv.h index 7b6c212fa..5667d4712 100644 --- a/src/openssl/openssl-1.1.1t/include/openssl/opensslv.h +++ b/src/openssl/openssl-1.1.1w/include/openssl/opensslv.h @@ -1,5 +1,5 @@ /* - * Copyright 1999-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -39,8 +39,8 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x1010114fL -# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1t 7 Feb 2023" +# define OPENSSL_VERSION_NUMBER 0x1010117fL +# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1w 11 Sep 2023" /*- * The macros below are to be used for shared library (.so, .dll, ...) diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ossl_typ.h b/src/openssl/openssl-1.1.1w/include/openssl/ossl_typ.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ossl_typ.h rename to src/openssl/openssl-1.1.1w/include/openssl/ossl_typ.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/pem.h b/src/openssl/openssl-1.1.1w/include/openssl/pem.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/pem.h rename to src/openssl/openssl-1.1.1w/include/openssl/pem.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/pem2.h b/src/openssl/openssl-1.1.1w/include/openssl/pem2.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/pem2.h rename to src/openssl/openssl-1.1.1w/include/openssl/pem2.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/pemerr.h b/src/openssl/openssl-1.1.1w/include/openssl/pemerr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/pemerr.h rename to src/openssl/openssl-1.1.1w/include/openssl/pemerr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/pkcs12.h b/src/openssl/openssl-1.1.1w/include/openssl/pkcs12.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/pkcs12.h rename to src/openssl/openssl-1.1.1w/include/openssl/pkcs12.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/pkcs12err.h b/src/openssl/openssl-1.1.1w/include/openssl/pkcs12err.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/pkcs12err.h rename to src/openssl/openssl-1.1.1w/include/openssl/pkcs12err.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/pkcs7.h b/src/openssl/openssl-1.1.1w/include/openssl/pkcs7.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/pkcs7.h rename to src/openssl/openssl-1.1.1w/include/openssl/pkcs7.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/pkcs7err.h b/src/openssl/openssl-1.1.1w/include/openssl/pkcs7err.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/pkcs7err.h rename to src/openssl/openssl-1.1.1w/include/openssl/pkcs7err.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/rand.h b/src/openssl/openssl-1.1.1w/include/openssl/rand.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/rand.h rename to src/openssl/openssl-1.1.1w/include/openssl/rand.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/rand_drbg.h b/src/openssl/openssl-1.1.1w/include/openssl/rand_drbg.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/rand_drbg.h rename to src/openssl/openssl-1.1.1w/include/openssl/rand_drbg.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/randerr.h b/src/openssl/openssl-1.1.1w/include/openssl/randerr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/randerr.h rename to src/openssl/openssl-1.1.1w/include/openssl/randerr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/rc2.h b/src/openssl/openssl-1.1.1w/include/openssl/rc2.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/rc2.h rename to src/openssl/openssl-1.1.1w/include/openssl/rc2.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/rc4.h b/src/openssl/openssl-1.1.1w/include/openssl/rc4.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/rc4.h rename to src/openssl/openssl-1.1.1w/include/openssl/rc4.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/rc5.h b/src/openssl/openssl-1.1.1w/include/openssl/rc5.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/rc5.h rename to src/openssl/openssl-1.1.1w/include/openssl/rc5.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ripemd.h b/src/openssl/openssl-1.1.1w/include/openssl/ripemd.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ripemd.h rename to src/openssl/openssl-1.1.1w/include/openssl/ripemd.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/rsa.h b/src/openssl/openssl-1.1.1w/include/openssl/rsa.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/rsa.h rename to src/openssl/openssl-1.1.1w/include/openssl/rsa.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/rsaerr.h b/src/openssl/openssl-1.1.1w/include/openssl/rsaerr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/rsaerr.h rename to src/openssl/openssl-1.1.1w/include/openssl/rsaerr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/safestack.h b/src/openssl/openssl-1.1.1w/include/openssl/safestack.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/safestack.h rename to src/openssl/openssl-1.1.1w/include/openssl/safestack.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/seed.h b/src/openssl/openssl-1.1.1w/include/openssl/seed.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/seed.h rename to src/openssl/openssl-1.1.1w/include/openssl/seed.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/sha.h b/src/openssl/openssl-1.1.1w/include/openssl/sha.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/sha.h rename to src/openssl/openssl-1.1.1w/include/openssl/sha.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/srp.h b/src/openssl/openssl-1.1.1w/include/openssl/srp.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/srp.h rename to src/openssl/openssl-1.1.1w/include/openssl/srp.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/srtp.h b/src/openssl/openssl-1.1.1w/include/openssl/srtp.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/srtp.h rename to src/openssl/openssl-1.1.1w/include/openssl/srtp.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ssl.h b/src/openssl/openssl-1.1.1w/include/openssl/ssl.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ssl.h rename to src/openssl/openssl-1.1.1w/include/openssl/ssl.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ssl2.h b/src/openssl/openssl-1.1.1w/include/openssl/ssl2.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ssl2.h rename to src/openssl/openssl-1.1.1w/include/openssl/ssl2.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ssl3.h b/src/openssl/openssl-1.1.1w/include/openssl/ssl3.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ssl3.h rename to src/openssl/openssl-1.1.1w/include/openssl/ssl3.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/sslerr.h b/src/openssl/openssl-1.1.1w/include/openssl/sslerr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/sslerr.h rename to src/openssl/openssl-1.1.1w/include/openssl/sslerr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/stack.h b/src/openssl/openssl-1.1.1w/include/openssl/stack.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/stack.h rename to src/openssl/openssl-1.1.1w/include/openssl/stack.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/store.h b/src/openssl/openssl-1.1.1w/include/openssl/store.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/store.h rename to src/openssl/openssl-1.1.1w/include/openssl/store.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/storeerr.h b/src/openssl/openssl-1.1.1w/include/openssl/storeerr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/storeerr.h rename to src/openssl/openssl-1.1.1w/include/openssl/storeerr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/symhacks.h b/src/openssl/openssl-1.1.1w/include/openssl/symhacks.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/symhacks.h rename to src/openssl/openssl-1.1.1w/include/openssl/symhacks.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/tls1.h b/src/openssl/openssl-1.1.1w/include/openssl/tls1.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/tls1.h rename to src/openssl/openssl-1.1.1w/include/openssl/tls1.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ts.h b/src/openssl/openssl-1.1.1w/include/openssl/ts.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ts.h rename to src/openssl/openssl-1.1.1w/include/openssl/ts.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/tserr.h b/src/openssl/openssl-1.1.1w/include/openssl/tserr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/tserr.h rename to src/openssl/openssl-1.1.1w/include/openssl/tserr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/txt_db.h b/src/openssl/openssl-1.1.1w/include/openssl/txt_db.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/txt_db.h rename to src/openssl/openssl-1.1.1w/include/openssl/txt_db.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/ui.h b/src/openssl/openssl-1.1.1w/include/openssl/ui.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/ui.h rename to src/openssl/openssl-1.1.1w/include/openssl/ui.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/uierr.h b/src/openssl/openssl-1.1.1w/include/openssl/uierr.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/uierr.h rename to src/openssl/openssl-1.1.1w/include/openssl/uierr.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/whrlpool.h b/src/openssl/openssl-1.1.1w/include/openssl/whrlpool.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/whrlpool.h rename to src/openssl/openssl-1.1.1w/include/openssl/whrlpool.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/x509.h b/src/openssl/openssl-1.1.1w/include/openssl/x509.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/x509.h rename to src/openssl/openssl-1.1.1w/include/openssl/x509.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/x509_vfy.h b/src/openssl/openssl-1.1.1w/include/openssl/x509_vfy.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/x509_vfy.h rename to src/openssl/openssl-1.1.1w/include/openssl/x509_vfy.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/x509err.h b/src/openssl/openssl-1.1.1w/include/openssl/x509err.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/x509err.h rename to src/openssl/openssl-1.1.1w/include/openssl/x509err.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/x509v3.h b/src/openssl/openssl-1.1.1w/include/openssl/x509v3.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/x509v3.h rename to src/openssl/openssl-1.1.1w/include/openssl/x509v3.h diff --git a/src/openssl/openssl-1.1.1t/include/openssl/x509v3err.h b/src/openssl/openssl-1.1.1w/include/openssl/x509v3err.h similarity index 100% rename from src/openssl/openssl-1.1.1t/include/openssl/x509v3err.h rename to src/openssl/openssl-1.1.1w/include/openssl/x509v3err.h diff --git a/src/openssl/openssl-1.1.1t/ms/applink.c b/src/openssl/openssl-1.1.1w/ms/applink.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ms/applink.c rename to src/openssl/openssl-1.1.1w/ms/applink.c diff --git a/src/openssl/openssl-1.1.1t/ms/cmp.pl b/src/openssl/openssl-1.1.1w/ms/cmp.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/ms/cmp.pl rename to src/openssl/openssl-1.1.1w/ms/cmp.pl diff --git a/src/openssl/openssl-1.1.1t/ms/uplink-common.pl b/src/openssl/openssl-1.1.1w/ms/uplink-common.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/ms/uplink-common.pl rename to src/openssl/openssl-1.1.1w/ms/uplink-common.pl diff --git a/src/openssl/openssl-1.1.1t/ms/uplink-ia64.pl b/src/openssl/openssl-1.1.1w/ms/uplink-ia64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/ms/uplink-ia64.pl rename to src/openssl/openssl-1.1.1w/ms/uplink-ia64.pl diff --git a/src/openssl/openssl-1.1.1t/ms/uplink-x86.pl b/src/openssl/openssl-1.1.1w/ms/uplink-x86.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/ms/uplink-x86.pl rename to src/openssl/openssl-1.1.1w/ms/uplink-x86.pl diff --git a/src/openssl/openssl-1.1.1t/ms/uplink-x86_64.pl b/src/openssl/openssl-1.1.1w/ms/uplink-x86_64.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/ms/uplink-x86_64.pl rename to src/openssl/openssl-1.1.1w/ms/uplink-x86_64.pl diff --git a/src/openssl/openssl-1.1.1t/ms/uplink.c b/src/openssl/openssl-1.1.1w/ms/uplink.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ms/uplink.c rename to src/openssl/openssl-1.1.1w/ms/uplink.c diff --git a/src/openssl/openssl-1.1.1t/ms/uplink.h b/src/openssl/openssl-1.1.1w/ms/uplink.h similarity index 100% rename from src/openssl/openssl-1.1.1t/ms/uplink.h rename to src/openssl/openssl-1.1.1w/ms/uplink.h diff --git a/src/openssl/openssl-1.1.1t/os-dep/haiku.h b/src/openssl/openssl-1.1.1w/os-dep/haiku.h similarity index 100% rename from src/openssl/openssl-1.1.1t/os-dep/haiku.h rename to src/openssl/openssl-1.1.1w/os-dep/haiku.h diff --git a/src/openssl/openssl-1.1.1t/ssl/bio_ssl.c b/src/openssl/openssl-1.1.1w/ssl/bio_ssl.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/bio_ssl.c rename to src/openssl/openssl-1.1.1w/ssl/bio_ssl.c diff --git a/src/openssl/openssl-1.1.1t/ssl/build.info b/src/openssl/openssl-1.1.1w/ssl/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/build.info rename to src/openssl/openssl-1.1.1w/ssl/build.info diff --git a/src/openssl/openssl-1.1.1t/ssl/d1_lib.c b/src/openssl/openssl-1.1.1w/ssl/d1_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/d1_lib.c rename to src/openssl/openssl-1.1.1w/ssl/d1_lib.c diff --git a/src/openssl/openssl-1.1.1t/ssl/d1_msg.c b/src/openssl/openssl-1.1.1w/ssl/d1_msg.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/d1_msg.c rename to src/openssl/openssl-1.1.1w/ssl/d1_msg.c diff --git a/src/openssl/openssl-1.1.1t/ssl/d1_srtp.c b/src/openssl/openssl-1.1.1w/ssl/d1_srtp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/d1_srtp.c rename to src/openssl/openssl-1.1.1w/ssl/d1_srtp.c diff --git a/src/openssl/openssl-1.1.1t/ssl/methods.c b/src/openssl/openssl-1.1.1w/ssl/methods.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/methods.c rename to src/openssl/openssl-1.1.1w/ssl/methods.c diff --git a/src/openssl/openssl-1.1.1t/ssl/packet.c b/src/openssl/openssl-1.1.1w/ssl/packet.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/packet.c rename to src/openssl/openssl-1.1.1w/ssl/packet.c diff --git a/src/openssl/openssl-1.1.1t/ssl/packet_local.h b/src/openssl/openssl-1.1.1w/ssl/packet_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/packet_local.h rename to src/openssl/openssl-1.1.1w/ssl/packet_local.h diff --git a/src/openssl/openssl-1.1.1t/ssl/pqueue.c b/src/openssl/openssl-1.1.1w/ssl/pqueue.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/pqueue.c rename to src/openssl/openssl-1.1.1w/ssl/pqueue.c diff --git a/src/openssl/openssl-1.1.1t/ssl/record/README b/src/openssl/openssl-1.1.1w/ssl/record/README similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/record/README rename to src/openssl/openssl-1.1.1w/ssl/record/README diff --git a/src/openssl/openssl-1.1.1t/ssl/record/dtls1_bitmap.c b/src/openssl/openssl-1.1.1w/ssl/record/dtls1_bitmap.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/record/dtls1_bitmap.c rename to src/openssl/openssl-1.1.1w/ssl/record/dtls1_bitmap.c diff --git a/src/openssl/openssl-1.1.1t/ssl/record/rec_layer_d1.c b/src/openssl/openssl-1.1.1w/ssl/record/rec_layer_d1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/record/rec_layer_d1.c rename to src/openssl/openssl-1.1.1w/ssl/record/rec_layer_d1.c diff --git a/src/openssl/openssl-1.1.1t/ssl/record/rec_layer_s3.c b/src/openssl/openssl-1.1.1w/ssl/record/rec_layer_s3.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/record/rec_layer_s3.c rename to src/openssl/openssl-1.1.1w/ssl/record/rec_layer_s3.c diff --git a/src/openssl/openssl-1.1.1t/ssl/record/record.h b/src/openssl/openssl-1.1.1w/ssl/record/record.h similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/record/record.h rename to src/openssl/openssl-1.1.1w/ssl/record/record.h diff --git a/src/openssl/openssl-1.1.1t/ssl/record/record_local.h b/src/openssl/openssl-1.1.1w/ssl/record/record_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/record/record_local.h rename to src/openssl/openssl-1.1.1w/ssl/record/record_local.h diff --git a/src/openssl/openssl-1.1.1t/ssl/record/ssl3_buffer.c b/src/openssl/openssl-1.1.1w/ssl/record/ssl3_buffer.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/record/ssl3_buffer.c rename to src/openssl/openssl-1.1.1w/ssl/record/ssl3_buffer.c diff --git a/src/openssl/openssl-1.1.1t/ssl/record/ssl3_record.c b/src/openssl/openssl-1.1.1w/ssl/record/ssl3_record.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/record/ssl3_record.c rename to src/openssl/openssl-1.1.1w/ssl/record/ssl3_record.c diff --git a/src/openssl/openssl-1.1.1t/ssl/record/ssl3_record_tls13.c b/src/openssl/openssl-1.1.1w/ssl/record/ssl3_record_tls13.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/record/ssl3_record_tls13.c rename to src/openssl/openssl-1.1.1w/ssl/record/ssl3_record_tls13.c diff --git a/src/openssl/openssl-1.1.1t/ssl/s3_cbc.c b/src/openssl/openssl-1.1.1w/ssl/s3_cbc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/s3_cbc.c rename to src/openssl/openssl-1.1.1w/ssl/s3_cbc.c diff --git a/src/openssl/openssl-1.1.1t/ssl/s3_enc.c b/src/openssl/openssl-1.1.1w/ssl/s3_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/s3_enc.c rename to src/openssl/openssl-1.1.1w/ssl/s3_enc.c diff --git a/src/openssl/openssl-1.1.1t/ssl/s3_lib.c b/src/openssl/openssl-1.1.1w/ssl/s3_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/s3_lib.c rename to src/openssl/openssl-1.1.1w/ssl/s3_lib.c diff --git a/src/openssl/openssl-1.1.1t/ssl/s3_msg.c b/src/openssl/openssl-1.1.1w/ssl/s3_msg.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/s3_msg.c rename to src/openssl/openssl-1.1.1w/ssl/s3_msg.c diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_asn1.c b/src/openssl/openssl-1.1.1w/ssl/ssl_asn1.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/ssl_asn1.c rename to src/openssl/openssl-1.1.1w/ssl/ssl_asn1.c diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_cert.c b/src/openssl/openssl-1.1.1w/ssl/ssl_cert.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/ssl_cert.c rename to src/openssl/openssl-1.1.1w/ssl/ssl_cert.c diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_cert_table.h b/src/openssl/openssl-1.1.1w/ssl/ssl_cert_table.h similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/ssl_cert_table.h rename to src/openssl/openssl-1.1.1w/ssl/ssl_cert_table.h diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_ciph.c b/src/openssl/openssl-1.1.1w/ssl/ssl_ciph.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/ssl_ciph.c rename to src/openssl/openssl-1.1.1w/ssl/ssl_ciph.c diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_conf.c b/src/openssl/openssl-1.1.1w/ssl/ssl_conf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/ssl_conf.c rename to src/openssl/openssl-1.1.1w/ssl/ssl_conf.c diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_err.c b/src/openssl/openssl-1.1.1w/ssl/ssl_err.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/ssl_err.c rename to src/openssl/openssl-1.1.1w/ssl/ssl_err.c diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_init.c b/src/openssl/openssl-1.1.1w/ssl/ssl_init.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/ssl_init.c rename to src/openssl/openssl-1.1.1w/ssl/ssl_init.c diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_lib.c b/src/openssl/openssl-1.1.1w/ssl/ssl_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/ssl_lib.c rename to src/openssl/openssl-1.1.1w/ssl/ssl_lib.c diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_local.h b/src/openssl/openssl-1.1.1w/ssl/ssl_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/ssl_local.h rename to src/openssl/openssl-1.1.1w/ssl/ssl_local.h diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_mcnf.c b/src/openssl/openssl-1.1.1w/ssl/ssl_mcnf.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/ssl_mcnf.c rename to src/openssl/openssl-1.1.1w/ssl/ssl_mcnf.c diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_rsa.c b/src/openssl/openssl-1.1.1w/ssl/ssl_rsa.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/ssl_rsa.c rename to src/openssl/openssl-1.1.1w/ssl/ssl_rsa.c diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_sess.c b/src/openssl/openssl-1.1.1w/ssl/ssl_sess.c similarity index 99% rename from src/openssl/openssl-1.1.1t/ssl/ssl_sess.c rename to src/openssl/openssl-1.1.1w/ssl/ssl_sess.c index cda6b7cc5..68d1737ac 100644 --- a/src/openssl/openssl-1.1.1t/ssl/ssl_sess.c +++ b/src/openssl/openssl-1.1.1w/ssl/ssl_sess.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * Copyright 2005 Nokia. All rights reserved. * * Licensed under the OpenSSL license (the "License"). You may not use @@ -139,8 +139,11 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket) dest->references = 1; dest->lock = CRYPTO_THREAD_lock_new(); - if (dest->lock == NULL) + if (dest->lock == NULL) { + OPENSSL_free(dest); + dest = NULL; goto err; + } if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, dest, &dest->ex_data)) goto err; diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_stat.c b/src/openssl/openssl-1.1.1w/ssl/ssl_stat.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/ssl_stat.c rename to src/openssl/openssl-1.1.1w/ssl/ssl_stat.c diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_txt.c b/src/openssl/openssl-1.1.1w/ssl/ssl_txt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/ssl_txt.c rename to src/openssl/openssl-1.1.1w/ssl/ssl_txt.c diff --git a/src/openssl/openssl-1.1.1t/ssl/ssl_utst.c b/src/openssl/openssl-1.1.1w/ssl/ssl_utst.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/ssl_utst.c rename to src/openssl/openssl-1.1.1w/ssl/ssl_utst.c diff --git a/src/openssl/openssl-1.1.1t/ssl/statem/README b/src/openssl/openssl-1.1.1w/ssl/statem/README similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/statem/README rename to src/openssl/openssl-1.1.1w/ssl/statem/README diff --git a/src/openssl/openssl-1.1.1t/ssl/statem/extensions.c b/src/openssl/openssl-1.1.1w/ssl/statem/extensions.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/statem/extensions.c rename to src/openssl/openssl-1.1.1w/ssl/statem/extensions.c diff --git a/src/openssl/openssl-1.1.1t/ssl/statem/extensions_clnt.c b/src/openssl/openssl-1.1.1w/ssl/statem/extensions_clnt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/statem/extensions_clnt.c rename to src/openssl/openssl-1.1.1w/ssl/statem/extensions_clnt.c diff --git a/src/openssl/openssl-1.1.1t/ssl/statem/extensions_cust.c b/src/openssl/openssl-1.1.1w/ssl/statem/extensions_cust.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/statem/extensions_cust.c rename to src/openssl/openssl-1.1.1w/ssl/statem/extensions_cust.c diff --git a/src/openssl/openssl-1.1.1t/ssl/statem/extensions_srvr.c b/src/openssl/openssl-1.1.1w/ssl/statem/extensions_srvr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/statem/extensions_srvr.c rename to src/openssl/openssl-1.1.1w/ssl/statem/extensions_srvr.c diff --git a/src/openssl/openssl-1.1.1t/ssl/statem/statem.c b/src/openssl/openssl-1.1.1w/ssl/statem/statem.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/statem/statem.c rename to src/openssl/openssl-1.1.1w/ssl/statem/statem.c diff --git a/src/openssl/openssl-1.1.1t/ssl/statem/statem.h b/src/openssl/openssl-1.1.1w/ssl/statem/statem.h similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/statem/statem.h rename to src/openssl/openssl-1.1.1w/ssl/statem/statem.h diff --git a/src/openssl/openssl-1.1.1t/ssl/statem/statem_clnt.c b/src/openssl/openssl-1.1.1w/ssl/statem/statem_clnt.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/statem/statem_clnt.c rename to src/openssl/openssl-1.1.1w/ssl/statem/statem_clnt.c diff --git a/src/openssl/openssl-1.1.1t/ssl/statem/statem_dtls.c b/src/openssl/openssl-1.1.1w/ssl/statem/statem_dtls.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/statem/statem_dtls.c rename to src/openssl/openssl-1.1.1w/ssl/statem/statem_dtls.c diff --git a/src/openssl/openssl-1.1.1t/ssl/statem/statem_lib.c b/src/openssl/openssl-1.1.1w/ssl/statem/statem_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/statem/statem_lib.c rename to src/openssl/openssl-1.1.1w/ssl/statem/statem_lib.c diff --git a/src/openssl/openssl-1.1.1t/ssl/statem/statem_local.h b/src/openssl/openssl-1.1.1w/ssl/statem/statem_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/statem/statem_local.h rename to src/openssl/openssl-1.1.1w/ssl/statem/statem_local.h diff --git a/src/openssl/openssl-1.1.1t/ssl/statem/statem_srvr.c b/src/openssl/openssl-1.1.1w/ssl/statem/statem_srvr.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/statem/statem_srvr.c rename to src/openssl/openssl-1.1.1w/ssl/statem/statem_srvr.c diff --git a/src/openssl/openssl-1.1.1t/ssl/t1_enc.c b/src/openssl/openssl-1.1.1w/ssl/t1_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/t1_enc.c rename to src/openssl/openssl-1.1.1w/ssl/t1_enc.c diff --git a/src/openssl/openssl-1.1.1t/ssl/t1_lib.c b/src/openssl/openssl-1.1.1w/ssl/t1_lib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/t1_lib.c rename to src/openssl/openssl-1.1.1w/ssl/t1_lib.c diff --git a/src/openssl/openssl-1.1.1t/ssl/t1_trce.c b/src/openssl/openssl-1.1.1w/ssl/t1_trce.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/t1_trce.c rename to src/openssl/openssl-1.1.1w/ssl/t1_trce.c diff --git a/src/openssl/openssl-1.1.1t/ssl/tls13_enc.c b/src/openssl/openssl-1.1.1w/ssl/tls13_enc.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/tls13_enc.c rename to src/openssl/openssl-1.1.1w/ssl/tls13_enc.c diff --git a/src/openssl/openssl-1.1.1t/ssl/tls_srp.c b/src/openssl/openssl-1.1.1w/ssl/tls_srp.c similarity index 100% rename from src/openssl/openssl-1.1.1t/ssl/tls_srp.c rename to src/openssl/openssl-1.1.1w/ssl/tls_srp.c diff --git a/src/openssl/openssl-1.1.1t/test/CAss.cnf b/src/openssl/openssl-1.1.1w/test/CAss.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/CAss.cnf rename to src/openssl/openssl-1.1.1w/test/CAss.cnf diff --git a/src/openssl/openssl-1.1.1t/test/CAssdh.cnf b/src/openssl/openssl-1.1.1w/test/CAssdh.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/CAssdh.cnf rename to src/openssl/openssl-1.1.1w/test/CAssdh.cnf diff --git a/src/openssl/openssl-1.1.1t/test/CAssdsa.cnf b/src/openssl/openssl-1.1.1w/test/CAssdsa.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/CAssdsa.cnf rename to src/openssl/openssl-1.1.1w/test/CAssdsa.cnf diff --git a/src/openssl/openssl-1.1.1t/test/CAssrsa.cnf b/src/openssl/openssl-1.1.1w/test/CAssrsa.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/CAssrsa.cnf rename to src/openssl/openssl-1.1.1w/test/CAssrsa.cnf diff --git a/src/openssl/openssl-1.1.1t/test/CAtsa.cnf b/src/openssl/openssl-1.1.1w/test/CAtsa.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/CAtsa.cnf rename to src/openssl/openssl-1.1.1w/test/CAtsa.cnf diff --git a/src/openssl/openssl-1.1.1t/test/P1ss.cnf b/src/openssl/openssl-1.1.1w/test/P1ss.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/P1ss.cnf rename to src/openssl/openssl-1.1.1w/test/P1ss.cnf diff --git a/src/openssl/openssl-1.1.1t/test/P2ss.cnf b/src/openssl/openssl-1.1.1w/test/P2ss.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/P2ss.cnf rename to src/openssl/openssl-1.1.1w/test/P2ss.cnf diff --git a/src/openssl/openssl-1.1.1t/test/README b/src/openssl/openssl-1.1.1w/test/README similarity index 100% rename from src/openssl/openssl-1.1.1t/test/README rename to src/openssl/openssl-1.1.1w/test/README diff --git a/src/openssl/openssl-1.1.1t/test/README.external b/src/openssl/openssl-1.1.1w/test/README.external similarity index 100% rename from src/openssl/openssl-1.1.1t/test/README.external rename to src/openssl/openssl-1.1.1w/test/README.external diff --git a/src/openssl/openssl-1.1.1t/test/README.ssltest.md b/src/openssl/openssl-1.1.1w/test/README.ssltest.md similarity index 100% rename from src/openssl/openssl-1.1.1t/test/README.ssltest.md rename to src/openssl/openssl-1.1.1w/test/README.ssltest.md diff --git a/src/openssl/openssl-1.1.1t/test/Sssdsa.cnf b/src/openssl/openssl-1.1.1w/test/Sssdsa.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/Sssdsa.cnf rename to src/openssl/openssl-1.1.1w/test/Sssdsa.cnf diff --git a/src/openssl/openssl-1.1.1t/test/Sssrsa.cnf b/src/openssl/openssl-1.1.1w/test/Sssrsa.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/Sssrsa.cnf rename to src/openssl/openssl-1.1.1w/test/Sssrsa.cnf diff --git a/src/openssl/openssl-1.1.1t/test/Uss.cnf b/src/openssl/openssl-1.1.1w/test/Uss.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/Uss.cnf rename to src/openssl/openssl-1.1.1w/test/Uss.cnf diff --git a/src/openssl/openssl-1.1.1t/test/aborttest.c b/src/openssl/openssl-1.1.1w/test/aborttest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/aborttest.c rename to src/openssl/openssl-1.1.1w/test/aborttest.c diff --git a/src/openssl/openssl-1.1.1t/test/afalgtest.c b/src/openssl/openssl-1.1.1w/test/afalgtest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/afalgtest.c rename to src/openssl/openssl-1.1.1w/test/afalgtest.c diff --git a/src/openssl/openssl-1.1.1t/test/asn1_decode_test.c b/src/openssl/openssl-1.1.1w/test/asn1_decode_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/asn1_decode_test.c rename to src/openssl/openssl-1.1.1w/test/asn1_decode_test.c diff --git a/src/openssl/openssl-1.1.1t/test/asn1_encode_test.c b/src/openssl/openssl-1.1.1w/test/asn1_encode_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/asn1_encode_test.c rename to src/openssl/openssl-1.1.1w/test/asn1_encode_test.c diff --git a/src/openssl/openssl-1.1.1t/test/asn1_internal_test.c b/src/openssl/openssl-1.1.1w/test/asn1_internal_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/asn1_internal_test.c rename to src/openssl/openssl-1.1.1w/test/asn1_internal_test.c diff --git a/src/openssl/openssl-1.1.1t/test/asn1_string_table_test.c b/src/openssl/openssl-1.1.1w/test/asn1_string_table_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/asn1_string_table_test.c rename to src/openssl/openssl-1.1.1w/test/asn1_string_table_test.c diff --git a/src/openssl/openssl-1.1.1t/test/asn1_time_test.c b/src/openssl/openssl-1.1.1w/test/asn1_time_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/asn1_time_test.c rename to src/openssl/openssl-1.1.1w/test/asn1_time_test.c diff --git a/src/openssl/openssl-1.1.1t/test/asynciotest.c b/src/openssl/openssl-1.1.1w/test/asynciotest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/asynciotest.c rename to src/openssl/openssl-1.1.1w/test/asynciotest.c diff --git a/src/openssl/openssl-1.1.1t/test/asynctest.c b/src/openssl/openssl-1.1.1w/test/asynctest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/asynctest.c rename to src/openssl/openssl-1.1.1w/test/asynctest.c diff --git a/src/openssl/openssl-1.1.1t/test/bad_dtls_test.c b/src/openssl/openssl-1.1.1w/test/bad_dtls_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/bad_dtls_test.c rename to src/openssl/openssl-1.1.1w/test/bad_dtls_test.c diff --git a/src/openssl/openssl-1.1.1t/test/bftest.c b/src/openssl/openssl-1.1.1w/test/bftest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/bftest.c rename to src/openssl/openssl-1.1.1w/test/bftest.c diff --git a/src/openssl/openssl-1.1.1t/test/bio_callback_test.c b/src/openssl/openssl-1.1.1w/test/bio_callback_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/bio_callback_test.c rename to src/openssl/openssl-1.1.1w/test/bio_callback_test.c diff --git a/src/openssl/openssl-1.1.1t/test/bio_enc_test.c b/src/openssl/openssl-1.1.1w/test/bio_enc_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/bio_enc_test.c rename to src/openssl/openssl-1.1.1w/test/bio_enc_test.c diff --git a/src/openssl/openssl-1.1.1t/test/bio_memleak_test.c b/src/openssl/openssl-1.1.1w/test/bio_memleak_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/bio_memleak_test.c rename to src/openssl/openssl-1.1.1w/test/bio_memleak_test.c diff --git a/src/openssl/openssl-1.1.1t/test/bioprinttest.c b/src/openssl/openssl-1.1.1w/test/bioprinttest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/bioprinttest.c rename to src/openssl/openssl-1.1.1w/test/bioprinttest.c diff --git a/src/openssl/openssl-1.1.1t/test/bntest.c b/src/openssl/openssl-1.1.1w/test/bntest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/bntest.c rename to src/openssl/openssl-1.1.1w/test/bntest.c diff --git a/src/openssl/openssl-1.1.1t/test/bntests.pl b/src/openssl/openssl-1.1.1w/test/bntests.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/test/bntests.pl rename to src/openssl/openssl-1.1.1w/test/bntests.pl diff --git a/src/openssl/openssl-1.1.1t/test/build.info b/src/openssl/openssl-1.1.1w/test/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/test/build.info rename to src/openssl/openssl-1.1.1w/test/build.info diff --git a/src/openssl/openssl-1.1.1t/test/casttest.c b/src/openssl/openssl-1.1.1w/test/casttest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/casttest.c rename to src/openssl/openssl-1.1.1w/test/casttest.c diff --git a/src/openssl/openssl-1.1.1t/test/certs/alt1-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/alt1-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/alt1-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/alt1-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/alt1-key.pem b/src/openssl/openssl-1.1.1w/test/certs/alt1-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/alt1-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/alt1-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/alt2-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/alt2-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/alt2-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/alt2-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/alt2-key.pem b/src/openssl/openssl-1.1.1w/test/certs/alt2-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/alt2-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/alt2-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/alt3-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/alt3-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/alt3-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/alt3-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/alt3-key.pem b/src/openssl/openssl-1.1.1w/test/certs/alt3-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/alt3-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/alt3-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/bad-pc3-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/bad-pc3-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/bad-pc3-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/bad-pc3-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/bad-pc3-key.pem b/src/openssl/openssl-1.1.1w/test/certs/bad-pc3-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/bad-pc3-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/bad-pc3-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/bad-pc4-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/bad-pc4-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/bad-pc4-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/bad-pc4-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/bad-pc4-key.pem b/src/openssl/openssl-1.1.1w/test/certs/bad-pc4-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/bad-pc4-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/bad-pc4-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/bad-pc6-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/bad-pc6-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/bad-pc6-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/bad-pc6-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/bad-pc6-key.pem b/src/openssl/openssl-1.1.1w/test/certs/bad-pc6-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/bad-pc6-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/bad-pc6-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/bad.key b/src/openssl/openssl-1.1.1w/test/certs/bad.key similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/bad.key rename to src/openssl/openssl-1.1.1w/test/certs/bad.key diff --git a/src/openssl/openssl-1.1.1t/test/certs/bad.pem b/src/openssl/openssl-1.1.1w/test/certs/bad.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/bad.pem rename to src/openssl/openssl-1.1.1w/test/certs/bad.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt1-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt1-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt1-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt1-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt1-key.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt1-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt1-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt1-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt10-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt10-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt10-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt10-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt10-key.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt10-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt10-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt10-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt2-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt2-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt2-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt2-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt2-key.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt2-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt2-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt2-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt3-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt3-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt3-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt3-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt3-key.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt3-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt3-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt3-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt4-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt4-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt4-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt4-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt4-key.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt4-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt4-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt4-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt5-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt5-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt5-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt5-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt5-key.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt5-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt5-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt5-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt6-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt6-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt6-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt6-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt6-key.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt6-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt6-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt6-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt7-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt7-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt7-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt7-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt7-key.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt7-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt7-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt7-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt8-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt8-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt8-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt8-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt8-key.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt8-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt8-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt8-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt9-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt9-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt9-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt9-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badalt9-key.pem b/src/openssl/openssl-1.1.1w/test/certs/badalt9-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badalt9-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/badalt9-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badcn1-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/badcn1-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badcn1-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/badcn1-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/badcn1-key.pem b/src/openssl/openssl-1.1.1w/test/certs/badcn1-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/badcn1-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/badcn1-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca+anyEKU.pem b/src/openssl/openssl-1.1.1w/test/certs/ca+anyEKU.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca+anyEKU.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca+anyEKU.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca+clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/ca+clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca+clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca+clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca+serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/ca+serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca+serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca+serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-anyEKU.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-anyEKU.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-anyEKU.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-anyEKU.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-cert-768.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-cert-768.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-cert-768.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-cert-768.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-cert-768i.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-cert-768i.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-cert-768i.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-cert-768i.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-cert-ec-explicit.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-cert-ec-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-cert-ec-explicit.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-cert-ec-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-cert-ec-named.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-cert-ec-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-cert-ec-named.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-cert-ec-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-cert-md5-any.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-cert-md5-any.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-cert-md5-any.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-cert-md5-any.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-cert-md5.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-cert-md5.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-cert-md5.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-cert-md5.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-cert2.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-cert2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-cert2.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-cert2.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-expired.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-expired.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-expired.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-expired.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-key-768.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-key-768.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-key-768.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-key-768.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-key-ec-explicit.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-key-ec-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-key-ec-explicit.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-key-ec-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-key-ec-named.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-key-ec-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-key-ec-named.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-key-ec-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-key.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-key2.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-key2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-key2.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-key2.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-name2.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-name2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-name2.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-name2.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-nonbc.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-nonbc.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-nonbc.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-nonbc.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-nonca.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-nonca.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-nonca.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-nonca.pem diff --git a/src/openssl/openssl-1.1.1w/test/certs/ca-pol-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-pol-cert.pem new file mode 100644 index 000000000..244af3292 --- /dev/null +++ b/src/openssl/openssl-1.1.1w/test/certs/ca-pol-cert.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDFzCCAf+gAwIBAgIBAjANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDDAdSb290 +IENBMCAXDTIzMDMwODEyMjMxNloYDzIxMjMwMzA5MTIyMzE2WjANMQswCQYDVQQD +DAJDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJadpD0ASxxfxsvd +j9IxsogVzMSGLFziaYuE9KejU9+R479RifvwfBANO62sNWJ19X//9G5UjwWmkiOz +n1k50DkYsBBA3mJzik6wjt/c58lBIlSEgAgpvDU8ht8w3t20JP9+YqXAeugqFj/W +l9rFQtsvaWSRywjXVlp5fxuEQelNnXcJEKhsKTNExsBUZebo4/J1BWpklWzA9P0l +YW5INvDAAwcF1nzlEf0Y6Eot03IMNyg2MTE4hehxjdgCSci8GYnFirE/ojXqqpAc +ZGh7r2dqWgZUD1Dh+bT2vjrUzj8eTH3GdzI+oljt29102JIUaqj3yzRYkah8FLF9 +CLNNsUcCAwEAAaN7MHkwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYwHQYD +VR0OBBYEFLQRM/HX4l73U54gIhBPhga/H8leMB8GA1UdIwQYMBaAFI71Ja8em2uE +PXyAmslTnE1y96NSMBkGA1UdIAQSMBAwDgYMKwYBBAGBgVy8+0cBMA0GCSqGSIb3 +DQEBCwUAA4IBAQBbE+MO9mewWIUY2kt85yhl0oZtvVxbn9K2Hty59ItwJGRNfzx7 +Ge7KgawkvNzMOXmj6qf8TpbJnf41ZLWdRyVZBVyIwrAKIVw1VxfGh8aEifHKN97H +unZkBPcUkAhUJSiC1BOD/euaMYqOi8QwiI702Q6q1NBY1/UKnV/ZIBLecnqfj9vZ +7T0wKxrwGYBztP4pNcxCmBoD9Dg+Dx3ZElo0WXyO4SOh/BgrsKJHKyhbuTpjrI/g +DhcINRp6+lIzuFBtJ67+YXnAEspb3lKMk0YL/LXrCNF2scdmNfOPwHi+OKBqt69C +9FJyWFEMxx2qm/ENE9sbOswgJRnKkaAqHBHx +-----END CERTIFICATE----- diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-pss-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-pss-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-pss-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-pss-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-pss-key.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-pss-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-pss-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-pss-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-root2.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-root2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-root2.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-root2.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ca-serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/ca-serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ca-serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/ca-serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/cca+anyEKU.pem b/src/openssl/openssl-1.1.1w/test/certs/cca+anyEKU.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/cca+anyEKU.pem rename to src/openssl/openssl-1.1.1w/test/certs/cca+anyEKU.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/cca+clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/cca+clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/cca+clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/cca+clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/cca+serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/cca+serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/cca+serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/cca+serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/cca-anyEKU.pem b/src/openssl/openssl-1.1.1w/test/certs/cca-anyEKU.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/cca-anyEKU.pem rename to src/openssl/openssl-1.1.1w/test/certs/cca-anyEKU.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/cca-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/cca-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/cca-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/cca-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/cca-clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/cca-clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/cca-clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/cca-clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/cca-serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/cca-serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/cca-serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/cca-serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/client-ed25519-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/client-ed25519-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/client-ed25519-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/client-ed25519-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/client-ed25519-key.pem b/src/openssl/openssl-1.1.1w/test/certs/client-ed25519-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/client-ed25519-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/client-ed25519-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/client-ed448-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/client-ed448-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/client-ed448-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/client-ed448-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/client-ed448-key.pem b/src/openssl/openssl-1.1.1w/test/certs/client-ed448-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/client-ed448-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/client-ed448-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/croot+anyEKU.pem b/src/openssl/openssl-1.1.1w/test/certs/croot+anyEKU.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/croot+anyEKU.pem rename to src/openssl/openssl-1.1.1w/test/certs/croot+anyEKU.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/croot+clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/croot+clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/croot+clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/croot+clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/croot+serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/croot+serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/croot+serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/croot+serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/croot-anyEKU.pem b/src/openssl/openssl-1.1.1w/test/certs/croot-anyEKU.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/croot-anyEKU.pem rename to src/openssl/openssl-1.1.1w/test/certs/croot-anyEKU.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/croot-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/croot-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/croot-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/croot-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/croot-clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/croot-clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/croot-clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/croot-clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/croot-serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/croot-serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/croot-serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/croot-serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/cross-key.pem b/src/openssl/openssl-1.1.1w/test/certs/cross-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/cross-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/cross-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/cross-root.pem b/src/openssl/openssl-1.1.1w/test/certs/cross-root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/cross-root.pem rename to src/openssl/openssl-1.1.1w/test/certs/cross-root.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/cyrillic.msb b/src/openssl/openssl-1.1.1w/test/certs/cyrillic.msb similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/cyrillic.msb rename to src/openssl/openssl-1.1.1w/test/certs/cyrillic.msb diff --git a/src/openssl/openssl-1.1.1t/test/certs/cyrillic.pem b/src/openssl/openssl-1.1.1w/test/certs/cyrillic.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/cyrillic.pem rename to src/openssl/openssl-1.1.1w/test/certs/cyrillic.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/cyrillic.utf8 b/src/openssl/openssl-1.1.1w/test/certs/cyrillic.utf8 similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/cyrillic.utf8 rename to src/openssl/openssl-1.1.1w/test/certs/cyrillic.utf8 diff --git a/src/openssl/openssl-1.1.1t/test/certs/cyrillic_crl.pem b/src/openssl/openssl-1.1.1w/test/certs/cyrillic_crl.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/cyrillic_crl.pem rename to src/openssl/openssl-1.1.1w/test/certs/cyrillic_crl.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/cyrillic_crl.utf8 b/src/openssl/openssl-1.1.1w/test/certs/cyrillic_crl.utf8 similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/cyrillic_crl.utf8 rename to src/openssl/openssl-1.1.1w/test/certs/cyrillic_crl.utf8 diff --git a/src/openssl/openssl-1.1.1t/test/certs/dhp2048.pem b/src/openssl/openssl-1.1.1w/test/certs/dhp2048.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/dhp2048.pem rename to src/openssl/openssl-1.1.1w/test/certs/dhp2048.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee+clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/ee+clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee+clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee+clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee+serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/ee+serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee+serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee+serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-cert-768.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-cert-768.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-cert-768.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-cert-768.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-cert-768i.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-cert-768i.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-cert-768i.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-cert-768i.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-cert-ec-explicit.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-cert-ec-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-cert-ec-explicit.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-cert-ec-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-cert-ec-named-explicit.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-cert-ec-named-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-cert-ec-named-explicit.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-cert-ec-named-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-cert-ec-named-named.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-cert-ec-named-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-cert-ec-named-named.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-cert-ec-named-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-cert-md5.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-cert-md5.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-cert-md5.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-cert-md5.pem diff --git a/src/openssl/openssl-1.1.1w/test/certs/ee-cert-policies-bad.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-cert-policies-bad.pem new file mode 100644 index 000000000..0fcd6372b --- /dev/null +++ b/src/openssl/openssl-1.1.1w/test/certs/ee-cert-policies-bad.pem @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDTTCCAjWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADANMQswCQYDVQQDDAJDQTAg +Fw0yMzAzMDgxMjIzMzJaGA8yMTIzMDMwOTEyMjMzMlowGTEXMBUGA1UEAwwOc2Vy +dmVyLmV4YW1wbGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCo/4lY +YYWu3tssD9Vz++K3qBt6dWAr1H08c3a1rt6TL38kkG3JHPSKOM2fooAWVsu0LLuT +5Rcf/w3GQ/4xNPgo2HXpo7uIgu+jcuJTYgVFTeAxl++qnRDSWA2eBp4yuxsIVl1l +Dz9mjsI2oBH/wFk1/Ukc3RxCMwZ4rgQ4I+XndWfTlK1aqUAfrFkQ9QzBZK1KxMY1 +U7OWaoIbFYvRmavknm+UqtKW5Vf7jJFkijwkFsbSGb6CYBM7YrDtPh2zyvlr3zG5 +ep5LR2inKcc/SuIiJ7TvkGPX79ByST5brbkb1Ctvhmjd1XMSuEPJ3EEPoqNGT4tn +iIQPYf55NB9KiR+3AgMBAAGjgakwgaYwHQYDVR0OBBYEFOeb4iqtimw6y3ZR5Y4H +mCKX4XOiMB8GA1UdIwQYMBaAFLQRM/HX4l73U54gIhBPhga/H8leMAkGA1UdEwQC +MAAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwGQYDVR0RBBIwEIIOc2VydmVyLmV4YW1w +bGUwKQYDVR0gBCIwIDAOBgwrBgEEAYGBXLz7RwEwDgYMKwYBBAGBgVy8+0cBMA0G +CSqGSIb3DQEBCwUAA4IBAQArwtwNO++7kStcJeMg3ekz2D/m/8UEjTA1rknBjQiQ +P0FK7tNeRqus9i8PxthNWk+biRayvDzaGIBV7igpDBPfXemDgmW9Adc4MKyiQDfs +YfkHi3xJKvsK2fQmyCs2InVDaKpVAkNFcgAW8nSOhGliqIxLb0EOLoLNwaktou0N +XQHmRzY8S7aIr8K9Qo9y/+MLar+PS4h8l6FkLLkTICiFzE4/wje5S3NckAnadRJa +QpjwM2S6NuA+tYWuOcN//r7BSpW/AZKanYWPzHMrKlqCh+9o7sthPd72+hObG9kx +wSGdzfStNK1I1zM5LiI08WtXCvR6AfLANTo2x1AYhSxF +-----END CERTIFICATE----- diff --git a/src/openssl/openssl-1.1.1w/test/certs/ee-cert-policies.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-cert-policies.pem new file mode 100644 index 000000000..2f06d7433 --- /dev/null +++ b/src/openssl/openssl-1.1.1w/test/certs/ee-cert-policies.pem @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDPTCCAiWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADANMQswCQYDVQQDDAJDQTAg +Fw0yMzAzMDgxMjIzMjNaGA8yMTIzMDMwOTEyMjMyM1owGTEXMBUGA1UEAwwOc2Vy +dmVyLmV4YW1wbGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCo/4lY +YYWu3tssD9Vz++K3qBt6dWAr1H08c3a1rt6TL38kkG3JHPSKOM2fooAWVsu0LLuT +5Rcf/w3GQ/4xNPgo2HXpo7uIgu+jcuJTYgVFTeAxl++qnRDSWA2eBp4yuxsIVl1l +Dz9mjsI2oBH/wFk1/Ukc3RxCMwZ4rgQ4I+XndWfTlK1aqUAfrFkQ9QzBZK1KxMY1 +U7OWaoIbFYvRmavknm+UqtKW5Vf7jJFkijwkFsbSGb6CYBM7YrDtPh2zyvlr3zG5 +ep5LR2inKcc/SuIiJ7TvkGPX79ByST5brbkb1Ctvhmjd1XMSuEPJ3EEPoqNGT4tn +iIQPYf55NB9KiR+3AgMBAAGjgZkwgZYwHQYDVR0OBBYEFOeb4iqtimw6y3ZR5Y4H +mCKX4XOiMB8GA1UdIwQYMBaAFLQRM/HX4l73U54gIhBPhga/H8leMAkGA1UdEwQC +MAAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwGQYDVR0RBBIwEIIOc2VydmVyLmV4YW1w +bGUwGQYDVR0gBBIwEDAOBgwrBgEEAYGBXLz7RwEwDQYJKoZIhvcNAQELBQADggEB +AGbWslmAAdMX3+5ChcnFrX+NqDGoyhb3PTgWdtlQB5qtWdIt4rSxN50OcQxFTX0D +QOBabSzR0DDKrgfBe4waL19WsdEvR9GyO4M7ASze/A3IEZue9C9k0n7Vq8zDaAZl +CiR/Zqo9nAOuhKHMgmC/NjUlX7STv5pJVgc4SH8VEKmSRZDmNihaOalUtK5X8/Oa +dawKxsZcaP5IKnOEPPKjtVNJxBu5CXywJHsO0GcoDEnEx1/NLdFoJ6WFw8NuTyDK +NGLq2MHEdyKaigHQlptEs9bXyu9McJjzbx0uXj3BenRULASreccFej0L1RU6jDlk +D3brBn24UISaFRZoB7jsjok= +-----END CERTIFICATE----- diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-cert2.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-cert2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-cert2.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-cert2.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-client-chain.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-client-chain.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-client-chain.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-client-chain.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-client.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-client.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-client.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-client.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-ecdsa-client-chain.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-ecdsa-client-chain.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-ecdsa-client-chain.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-ecdsa-client-chain.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-ecdsa-key.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-ecdsa-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-ecdsa-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-ecdsa-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-ed25519.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-ed25519.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-ed25519.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-ed25519.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-expired.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-expired.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-expired.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-expired.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-key-768.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-key-768.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-key-768.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-key-768.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-key-ec-explicit.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-key-ec-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-key-ec-explicit.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-key-ec-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-key-ec-named-explicit.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-key-ec-named-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-key-ec-named-explicit.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-key-ec-named-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-key-ec-named-named.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-key-ec-named-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-key-ec-named-named.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-key-ec-named-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-key.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-name2.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-name2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-name2.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-name2.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-pathlen.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-pathlen.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-pathlen.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-pathlen.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-pss-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-pss-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-pss-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-pss-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-pss-sha1-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-pss-sha1-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-pss-sha1-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-pss-sha1-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-pss-sha256-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-pss-sha256-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-pss-sha256-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-pss-sha256-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-self-signed.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-self-signed.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-self-signed.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-self-signed.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ee-serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/ee-serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ee-serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/ee-serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs1-key.pem b/src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs1-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs1-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs1-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs1.pem b/src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs1.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs1.pem rename to src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs1.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs1.sct b/src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs1.sct similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs1.sct rename to src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs1.sct diff --git a/src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs1_issuer-key.pem b/src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs1_issuer-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs1_issuer-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs1_issuer-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs1_issuer.pem b/src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs1_issuer.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs1_issuer.pem rename to src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs1_issuer.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs3.pem b/src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs3.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs3.pem rename to src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs3.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs3.sct b/src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs3.sct similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs3.sct rename to src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs3.sct diff --git a/src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs3_issuer.pem b/src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs3_issuer.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/embeddedSCTs3_issuer.pem rename to src/openssl/openssl-1.1.1w/test/certs/embeddedSCTs3_issuer.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/goodcn1-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/goodcn1-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/goodcn1-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/goodcn1-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/goodcn1-key.pem b/src/openssl/openssl-1.1.1w/test/certs/goodcn1-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/goodcn1-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/goodcn1-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/interCA.key b/src/openssl/openssl-1.1.1w/test/certs/interCA.key similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/interCA.key rename to src/openssl/openssl-1.1.1w/test/certs/interCA.key diff --git a/src/openssl/openssl-1.1.1t/test/certs/interCA.pem b/src/openssl/openssl-1.1.1w/test/certs/interCA.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/interCA.pem rename to src/openssl/openssl-1.1.1w/test/certs/interCA.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/invalid-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/invalid-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/invalid-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/invalid-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/leaf.key b/src/openssl/openssl-1.1.1w/test/certs/leaf.key similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/leaf.key rename to src/openssl/openssl-1.1.1w/test/certs/leaf.key diff --git a/src/openssl/openssl-1.1.1t/test/certs/leaf.pem b/src/openssl/openssl-1.1.1w/test/certs/leaf.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/leaf.pem rename to src/openssl/openssl-1.1.1w/test/certs/leaf.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/many-constraints.pem b/src/openssl/openssl-1.1.1w/test/certs/many-constraints.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/many-constraints.pem rename to src/openssl/openssl-1.1.1w/test/certs/many-constraints.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/many-names1.pem b/src/openssl/openssl-1.1.1w/test/certs/many-names1.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/many-names1.pem rename to src/openssl/openssl-1.1.1w/test/certs/many-names1.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/many-names2.pem b/src/openssl/openssl-1.1.1w/test/certs/many-names2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/many-names2.pem rename to src/openssl/openssl-1.1.1w/test/certs/many-names2.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/many-names3.pem b/src/openssl/openssl-1.1.1w/test/certs/many-names3.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/many-names3.pem rename to src/openssl/openssl-1.1.1w/test/certs/many-names3.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/mkcert.sh b/src/openssl/openssl-1.1.1w/test/certs/mkcert.sh similarity index 96% rename from src/openssl/openssl-1.1.1t/test/certs/mkcert.sh rename to src/openssl/openssl-1.1.1w/test/certs/mkcert.sh index d8e704239..f7aec416e 100755 --- a/src/openssl/openssl-1.1.1t/test/certs/mkcert.sh +++ b/src/openssl/openssl-1.1.1w/test/certs/mkcert.sh @@ -1,6 +1,6 @@ #! /bin/bash # -# Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2023 The OpenSSL Project Authors. All Rights Reserved. # Copyright (c) 2016 Viktor Dukhovni . # All rights reserved. # @@ -117,11 +117,12 @@ genca() { local OPTIND=1 local purpose= - while getopts p: o + while getopts p:c: o do case $o in p) purpose="$OPTARG";; - *) echo "Usage: $0 genca [-p EKU] cn keyname certname cakeyname cacertname" >&2 + c) certpol="$OPTARG";; + *) echo "Usage: $0 genca [-p EKU][-c policyoid] cn keyname certname cakeyname cacertname" >&2 return 1;; esac done @@ -142,6 +143,10 @@ genca() { if [ -n "$NC" ]; then exts=$(printf "%s\nnameConstraints = %s\n" "$exts" "$NC") fi + if [ -n "$certpol" ]; then + exts=$(printf "%s\ncertificatePolicies = %s\n" "$exts" "$certpol") + fi + csr=$(req "$key" "CN = $cn") || return 1 echo "$csr" | cert "$cert" "$exts" -CA "${cacert}.pem" -CAkey "${cakey}.pem" \ diff --git a/src/openssl/openssl-1.1.1t/test/certs/nca+anyEKU.pem b/src/openssl/openssl-1.1.1w/test/certs/nca+anyEKU.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/nca+anyEKU.pem rename to src/openssl/openssl-1.1.1w/test/certs/nca+anyEKU.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/nca+serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/nca+serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/nca+serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/nca+serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ncca-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/ncca-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ncca-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/ncca-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ncca-key.pem b/src/openssl/openssl-1.1.1w/test/certs/ncca-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ncca-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/ncca-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ncca1-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/ncca1-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ncca1-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/ncca1-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ncca1-key.pem b/src/openssl/openssl-1.1.1w/test/certs/ncca1-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ncca1-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/ncca1-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ncca2-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/ncca2-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ncca2-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/ncca2-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ncca2-key.pem b/src/openssl/openssl-1.1.1w/test/certs/ncca2-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ncca2-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/ncca2-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ncca3-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/ncca3-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ncca3-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/ncca3-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/ncca3-key.pem b/src/openssl/openssl-1.1.1w/test/certs/ncca3-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/ncca3-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/ncca3-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/nroot+anyEKU.pem b/src/openssl/openssl-1.1.1w/test/certs/nroot+anyEKU.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/nroot+anyEKU.pem rename to src/openssl/openssl-1.1.1w/test/certs/nroot+anyEKU.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/nroot+serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/nroot+serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/nroot+serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/nroot+serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/p256-server-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/p256-server-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/p256-server-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/p256-server-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/p256-server-key.pem b/src/openssl/openssl-1.1.1w/test/certs/p256-server-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/p256-server-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/p256-server-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/p384-root-key.pem b/src/openssl/openssl-1.1.1w/test/certs/p384-root-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/p384-root-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/p384-root-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/p384-root.pem b/src/openssl/openssl-1.1.1w/test/certs/p384-root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/p384-root.pem rename to src/openssl/openssl-1.1.1w/test/certs/p384-root.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/p384-server-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/p384-server-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/p384-server-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/p384-server-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/p384-server-key.pem b/src/openssl/openssl-1.1.1w/test/certs/p384-server-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/p384-server-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/p384-server-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/pathlen.pem b/src/openssl/openssl-1.1.1w/test/certs/pathlen.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/pathlen.pem rename to src/openssl/openssl-1.1.1w/test/certs/pathlen.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/pc1-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/pc1-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/pc1-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/pc1-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/pc1-key.pem b/src/openssl/openssl-1.1.1w/test/certs/pc1-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/pc1-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/pc1-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/pc2-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/pc2-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/pc2-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/pc2-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/pc2-key.pem b/src/openssl/openssl-1.1.1w/test/certs/pc2-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/pc2-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/pc2-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/pc5-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/pc5-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/pc5-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/pc5-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/pc5-key.pem b/src/openssl/openssl-1.1.1w/test/certs/pc5-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/pc5-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/pc5-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root+anyEKU.pem b/src/openssl/openssl-1.1.1w/test/certs/root+anyEKU.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root+anyEKU.pem rename to src/openssl/openssl-1.1.1w/test/certs/root+anyEKU.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root+clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/root+clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root+clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/root+clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root+serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/root+serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root+serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/root+serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-anyEKU.pem b/src/openssl/openssl-1.1.1w/test/certs/root-anyEKU.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-anyEKU.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-anyEKU.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-cert-768.pem b/src/openssl/openssl-1.1.1w/test/certs/root-cert-768.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-cert-768.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-cert-768.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-cert-md5.pem b/src/openssl/openssl-1.1.1w/test/certs/root-cert-md5.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-cert-md5.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-cert-md5.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-cert-rsa2.pem b/src/openssl/openssl-1.1.1w/test/certs/root-cert-rsa2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-cert-rsa2.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-cert-rsa2.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/root-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-cert2.pem b/src/openssl/openssl-1.1.1w/test/certs/root-cert2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-cert2.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-cert2.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/root-clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-cross-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/root-cross-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-cross-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-cross-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-ed25519.pem b/src/openssl/openssl-1.1.1w/test/certs/root-ed25519.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-ed25519.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-ed25519.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-ed448-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/root-ed448-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-ed448-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-ed448-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-ed448-key.pem b/src/openssl/openssl-1.1.1w/test/certs/root-ed448-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-ed448-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-ed448-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-expired.pem b/src/openssl/openssl-1.1.1w/test/certs/root-expired.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-expired.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-expired.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-key-768.pem b/src/openssl/openssl-1.1.1w/test/certs/root-key-768.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-key-768.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-key-768.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-key.pem b/src/openssl/openssl-1.1.1w/test/certs/root-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-key2.pem b/src/openssl/openssl-1.1.1w/test/certs/root-key2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-key2.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-key2.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-name2.pem b/src/openssl/openssl-1.1.1w/test/certs/root-name2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-name2.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-name2.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-nonca.pem b/src/openssl/openssl-1.1.1w/test/certs/root-nonca.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-nonca.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-nonca.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-noserver.pem b/src/openssl/openssl-1.1.1w/test/certs/root-noserver.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-noserver.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-noserver.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root-serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/root-serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root-serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/root-serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root2+clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/root2+clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root2+clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/root2+clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root2+serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/root2+serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root2+serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/root2+serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/root2-serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/root2-serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/root2-serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/root2-serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/rootCA.key b/src/openssl/openssl-1.1.1w/test/certs/rootCA.key similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/rootCA.key rename to src/openssl/openssl-1.1.1w/test/certs/rootCA.key diff --git a/src/openssl/openssl-1.1.1t/test/certs/rootCA.pem b/src/openssl/openssl-1.1.1w/test/certs/rootCA.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/rootCA.pem rename to src/openssl/openssl-1.1.1w/test/certs/rootCA.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/rootcert.pem b/src/openssl/openssl-1.1.1w/test/certs/rootcert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/rootcert.pem rename to src/openssl/openssl-1.1.1w/test/certs/rootcert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/rootkey.pem b/src/openssl/openssl-1.1.1w/test/certs/rootkey.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/rootkey.pem rename to src/openssl/openssl-1.1.1w/test/certs/rootkey.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/roots.pem b/src/openssl/openssl-1.1.1w/test/certs/roots.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/roots.pem rename to src/openssl/openssl-1.1.1w/test/certs/roots.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/sca+anyEKU.pem b/src/openssl/openssl-1.1.1w/test/certs/sca+anyEKU.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/sca+anyEKU.pem rename to src/openssl/openssl-1.1.1w/test/certs/sca+anyEKU.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/sca+clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/sca+clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/sca+clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/sca+clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/sca+serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/sca+serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/sca+serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/sca+serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/sca-anyEKU.pem b/src/openssl/openssl-1.1.1w/test/certs/sca-anyEKU.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/sca-anyEKU.pem rename to src/openssl/openssl-1.1.1w/test/certs/sca-anyEKU.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/sca-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/sca-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/sca-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/sca-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/sca-clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/sca-clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/sca-clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/sca-clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/sca-serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/sca-serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/sca-serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/sca-serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-cecdsa-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/server-cecdsa-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-cecdsa-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-cecdsa-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-cecdsa-key.pem b/src/openssl/openssl-1.1.1w/test/certs/server-cecdsa-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-cecdsa-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-cecdsa-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-dsa-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/server-dsa-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-dsa-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-dsa-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-dsa-key.pem b/src/openssl/openssl-1.1.1w/test/certs/server-dsa-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-dsa-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-dsa-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-ecdsa-brainpoolP256r1-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/server-ecdsa-brainpoolP256r1-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-ecdsa-brainpoolP256r1-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-ecdsa-brainpoolP256r1-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-ecdsa-brainpoolP256r1-key.pem b/src/openssl/openssl-1.1.1w/test/certs/server-ecdsa-brainpoolP256r1-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-ecdsa-brainpoolP256r1-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-ecdsa-brainpoolP256r1-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-ecdsa-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/server-ecdsa-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-ecdsa-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-ecdsa-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-ecdsa-key.pem b/src/openssl/openssl-1.1.1w/test/certs/server-ecdsa-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-ecdsa-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-ecdsa-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-ed25519-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/server-ed25519-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-ed25519-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-ed25519-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-ed25519-key.pem b/src/openssl/openssl-1.1.1w/test/certs/server-ed25519-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-ed25519-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-ed25519-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-ed448-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/server-ed448-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-ed448-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-ed448-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-ed448-key.pem b/src/openssl/openssl-1.1.1w/test/certs/server-ed448-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-ed448-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-ed448-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-pss-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/server-pss-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-pss-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-pss-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-pss-key.pem b/src/openssl/openssl-1.1.1w/test/certs/server-pss-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-pss-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-pss-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-pss-restrict-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/server-pss-restrict-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-pss-restrict-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-pss-restrict-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-pss-restrict-key.pem b/src/openssl/openssl-1.1.1w/test/certs/server-pss-restrict-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-pss-restrict-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-pss-restrict-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/server-trusted.pem b/src/openssl/openssl-1.1.1w/test/certs/server-trusted.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/server-trusted.pem rename to src/openssl/openssl-1.1.1w/test/certs/server-trusted.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/servercert.pem b/src/openssl/openssl-1.1.1w/test/certs/servercert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/servercert.pem rename to src/openssl/openssl-1.1.1w/test/certs/servercert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/serverkey.pem b/src/openssl/openssl-1.1.1w/test/certs/serverkey.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/serverkey.pem rename to src/openssl/openssl-1.1.1w/test/certs/serverkey.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/setup.sh b/src/openssl/openssl-1.1.1w/test/certs/setup.sh similarity index 97% rename from src/openssl/openssl-1.1.1t/test/certs/setup.sh rename to src/openssl/openssl-1.1.1w/test/certs/setup.sh index 020f6ce97..1cbef67ae 100755 --- a/src/openssl/openssl-1.1.1t/test/certs/setup.sh +++ b/src/openssl/openssl-1.1.1w/test/certs/setup.sh @@ -405,3 +405,9 @@ OPENSSL_SIGALG=ED448 OPENSSL_KEYALG=ed448 ./mkcert.sh genroot "Root Ed448" \ root-ed448-key root-ed448-cert OPENSSL_SIGALG=ED448 OPENSSL_KEYALG=ed448 ./mkcert.sh genee ed448 \ server-ed448-key server-ed448-cert root-ed448-key root-ed448-cert + +# certificatePolicies extension +./mkcert.sh genca -c "1.3.6.1.4.1.16604.998855.1" "CA" ca-key ca-pol-cert root-key root-cert +./mkcert.sh geneeextra server.example ee-key ee-cert-policies ca-key ca-cert "certificatePolicies=1.3.6.1.4.1.16604.998855.1" +# We can create a cert with a duplicate policy oid - but its actually invalid! +./mkcert.sh geneeextra server.example ee-key ee-cert-policies-bad ca-key ca-cert "certificatePolicies=1.3.6.1.4.1.16604.998855.1,1.3.6.1.4.1.16604.998855.1" diff --git a/src/openssl/openssl-1.1.1t/test/certs/some-names1.pem b/src/openssl/openssl-1.1.1w/test/certs/some-names1.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/some-names1.pem rename to src/openssl/openssl-1.1.1w/test/certs/some-names1.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/some-names2.pem b/src/openssl/openssl-1.1.1w/test/certs/some-names2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/some-names2.pem rename to src/openssl/openssl-1.1.1w/test/certs/some-names2.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/some-names3.pem b/src/openssl/openssl-1.1.1w/test/certs/some-names3.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/some-names3.pem rename to src/openssl/openssl-1.1.1w/test/certs/some-names3.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/sroot+anyEKU.pem b/src/openssl/openssl-1.1.1w/test/certs/sroot+anyEKU.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/sroot+anyEKU.pem rename to src/openssl/openssl-1.1.1w/test/certs/sroot+anyEKU.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/sroot+clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/sroot+clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/sroot+clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/sroot+clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/sroot+serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/sroot+serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/sroot+serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/sroot+serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/sroot-anyEKU.pem b/src/openssl/openssl-1.1.1w/test/certs/sroot-anyEKU.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/sroot-anyEKU.pem rename to src/openssl/openssl-1.1.1w/test/certs/sroot-anyEKU.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/sroot-cert.pem b/src/openssl/openssl-1.1.1w/test/certs/sroot-cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/sroot-cert.pem rename to src/openssl/openssl-1.1.1w/test/certs/sroot-cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/sroot-clientAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/sroot-clientAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/sroot-clientAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/sroot-clientAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/sroot-serverAuth.pem b/src/openssl/openssl-1.1.1w/test/certs/sroot-serverAuth.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/sroot-serverAuth.pem rename to src/openssl/openssl-1.1.1w/test/certs/sroot-serverAuth.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/subinterCA-ss.pem b/src/openssl/openssl-1.1.1w/test/certs/subinterCA-ss.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/subinterCA-ss.pem rename to src/openssl/openssl-1.1.1w/test/certs/subinterCA-ss.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/subinterCA.key b/src/openssl/openssl-1.1.1w/test/certs/subinterCA.key similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/subinterCA.key rename to src/openssl/openssl-1.1.1w/test/certs/subinterCA.key diff --git a/src/openssl/openssl-1.1.1t/test/certs/subinterCA.pem b/src/openssl/openssl-1.1.1w/test/certs/subinterCA.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/subinterCA.pem rename to src/openssl/openssl-1.1.1w/test/certs/subinterCA.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/untrusted.pem b/src/openssl/openssl-1.1.1w/test/certs/untrusted.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/untrusted.pem rename to src/openssl/openssl-1.1.1w/test/certs/untrusted.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/wrongcert.pem b/src/openssl/openssl-1.1.1w/test/certs/wrongcert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/wrongcert.pem rename to src/openssl/openssl-1.1.1w/test/certs/wrongcert.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/wrongkey.pem b/src/openssl/openssl-1.1.1w/test/certs/wrongkey.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/wrongkey.pem rename to src/openssl/openssl-1.1.1w/test/certs/wrongkey.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/x509-check-key.pem b/src/openssl/openssl-1.1.1w/test/certs/x509-check-key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/x509-check-key.pem rename to src/openssl/openssl-1.1.1w/test/certs/x509-check-key.pem diff --git a/src/openssl/openssl-1.1.1t/test/certs/x509-check.csr b/src/openssl/openssl-1.1.1w/test/certs/x509-check.csr similarity index 100% rename from src/openssl/openssl-1.1.1t/test/certs/x509-check.csr rename to src/openssl/openssl-1.1.1w/test/certs/x509-check.csr diff --git a/src/openssl/openssl-1.1.1t/test/chacha_internal_test.c b/src/openssl/openssl-1.1.1w/test/chacha_internal_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/chacha_internal_test.c rename to src/openssl/openssl-1.1.1w/test/chacha_internal_test.c diff --git a/src/openssl/openssl-1.1.1t/test/cipher_overhead_test.c b/src/openssl/openssl-1.1.1w/test/cipher_overhead_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/cipher_overhead_test.c rename to src/openssl/openssl-1.1.1w/test/cipher_overhead_test.c diff --git a/src/openssl/openssl-1.1.1t/test/cipherbytes_test.c b/src/openssl/openssl-1.1.1w/test/cipherbytes_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/cipherbytes_test.c rename to src/openssl/openssl-1.1.1w/test/cipherbytes_test.c diff --git a/src/openssl/openssl-1.1.1t/test/cipherlist_test.c b/src/openssl/openssl-1.1.1w/test/cipherlist_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/cipherlist_test.c rename to src/openssl/openssl-1.1.1w/test/cipherlist_test.c diff --git a/src/openssl/openssl-1.1.1t/test/ciphername_test.c b/src/openssl/openssl-1.1.1w/test/ciphername_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ciphername_test.c rename to src/openssl/openssl-1.1.1w/test/ciphername_test.c diff --git a/src/openssl/openssl-1.1.1t/test/clienthellotest.c b/src/openssl/openssl-1.1.1w/test/clienthellotest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/clienthellotest.c rename to src/openssl/openssl-1.1.1w/test/clienthellotest.c diff --git a/src/openssl/openssl-1.1.1t/test/cmactest.c b/src/openssl/openssl-1.1.1w/test/cmactest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/cmactest.c rename to src/openssl/openssl-1.1.1w/test/cmactest.c diff --git a/src/openssl/openssl-1.1.1t/test/cms-examples.pl b/src/openssl/openssl-1.1.1w/test/cms-examples.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/test/cms-examples.pl rename to src/openssl/openssl-1.1.1w/test/cms-examples.pl diff --git a/src/openssl/openssl-1.1.1t/test/cmsapitest.c b/src/openssl/openssl-1.1.1w/test/cmsapitest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/cmsapitest.c rename to src/openssl/openssl-1.1.1w/test/cmsapitest.c diff --git a/src/openssl/openssl-1.1.1t/test/conf_include_test.c b/src/openssl/openssl-1.1.1w/test/conf_include_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/conf_include_test.c rename to src/openssl/openssl-1.1.1w/test/conf_include_test.c diff --git a/src/openssl/openssl-1.1.1t/test/constant_time_test.c b/src/openssl/openssl-1.1.1w/test/constant_time_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/constant_time_test.c rename to src/openssl/openssl-1.1.1w/test/constant_time_test.c diff --git a/src/openssl/openssl-1.1.1t/test/crltest.c b/src/openssl/openssl-1.1.1w/test/crltest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/crltest.c rename to src/openssl/openssl-1.1.1w/test/crltest.c diff --git a/src/openssl/openssl-1.1.1t/test/ct/log_list.conf b/src/openssl/openssl-1.1.1w/test/ct/log_list.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ct/log_list.conf rename to src/openssl/openssl-1.1.1w/test/ct/log_list.conf diff --git a/src/openssl/openssl-1.1.1t/test/ct/tls1.sct b/src/openssl/openssl-1.1.1w/test/ct/tls1.sct similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ct/tls1.sct rename to src/openssl/openssl-1.1.1w/test/ct/tls1.sct diff --git a/src/openssl/openssl-1.1.1t/test/ct_test.c b/src/openssl/openssl-1.1.1w/test/ct_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ct_test.c rename to src/openssl/openssl-1.1.1w/test/ct_test.c diff --git a/src/openssl/openssl-1.1.1t/test/ctype_internal_test.c b/src/openssl/openssl-1.1.1w/test/ctype_internal_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ctype_internal_test.c rename to src/openssl/openssl-1.1.1w/test/ctype_internal_test.c diff --git a/src/openssl/openssl-1.1.1t/test/curve448_internal_test.c b/src/openssl/openssl-1.1.1w/test/curve448_internal_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/curve448_internal_test.c rename to src/openssl/openssl-1.1.1w/test/curve448_internal_test.c diff --git a/src/openssl/openssl-1.1.1t/test/d2i-tests/bad-cms.der b/src/openssl/openssl-1.1.1w/test/d2i-tests/bad-cms.der similarity index 100% rename from src/openssl/openssl-1.1.1t/test/d2i-tests/bad-cms.der rename to src/openssl/openssl-1.1.1w/test/d2i-tests/bad-cms.der diff --git a/src/openssl/openssl-1.1.1t/test/d2i-tests/bad-int-pad0.der b/src/openssl/openssl-1.1.1w/test/d2i-tests/bad-int-pad0.der similarity index 100% rename from src/openssl/openssl-1.1.1t/test/d2i-tests/bad-int-pad0.der rename to src/openssl/openssl-1.1.1w/test/d2i-tests/bad-int-pad0.der diff --git a/src/openssl/openssl-1.1.1t/test/d2i-tests/bad-int-padminus1.der b/src/openssl/openssl-1.1.1w/test/d2i-tests/bad-int-padminus1.der similarity index 100% rename from src/openssl/openssl-1.1.1t/test/d2i-tests/bad-int-padminus1.der rename to src/openssl/openssl-1.1.1w/test/d2i-tests/bad-int-padminus1.der diff --git a/src/openssl/openssl-1.1.1t/test/d2i-tests/bad_bio.der b/src/openssl/openssl-1.1.1w/test/d2i-tests/bad_bio.der similarity index 100% rename from src/openssl/openssl-1.1.1t/test/d2i-tests/bad_bio.der rename to src/openssl/openssl-1.1.1w/test/d2i-tests/bad_bio.der diff --git a/src/openssl/openssl-1.1.1t/test/d2i-tests/bad_cert.der b/src/openssl/openssl-1.1.1w/test/d2i-tests/bad_cert.der similarity index 100% rename from src/openssl/openssl-1.1.1t/test/d2i-tests/bad_cert.der rename to src/openssl/openssl-1.1.1w/test/d2i-tests/bad_cert.der diff --git a/src/openssl/openssl-1.1.1t/test/d2i-tests/bad_generalname.der b/src/openssl/openssl-1.1.1w/test/d2i-tests/bad_generalname.der similarity index 100% rename from src/openssl/openssl-1.1.1t/test/d2i-tests/bad_generalname.der rename to src/openssl/openssl-1.1.1w/test/d2i-tests/bad_generalname.der diff --git a/src/openssl/openssl-1.1.1t/test/d2i-tests/high_tag.der b/src/openssl/openssl-1.1.1w/test/d2i-tests/high_tag.der similarity index 100% rename from src/openssl/openssl-1.1.1t/test/d2i-tests/high_tag.der rename to src/openssl/openssl-1.1.1w/test/d2i-tests/high_tag.der diff --git a/src/openssl/openssl-1.1.1t/test/d2i-tests/int0.der b/src/openssl/openssl-1.1.1w/test/d2i-tests/int0.der similarity index 100% rename from src/openssl/openssl-1.1.1t/test/d2i-tests/int0.der rename to src/openssl/openssl-1.1.1w/test/d2i-tests/int0.der diff --git a/src/openssl/openssl-1.1.1t/test/d2i-tests/int1.der b/src/openssl/openssl-1.1.1w/test/d2i-tests/int1.der similarity index 100% rename from src/openssl/openssl-1.1.1t/test/d2i-tests/int1.der rename to src/openssl/openssl-1.1.1w/test/d2i-tests/int1.der diff --git a/src/openssl/openssl-1.1.1t/test/d2i-tests/intminus1.der b/src/openssl/openssl-1.1.1w/test/d2i-tests/intminus1.der similarity index 100% rename from src/openssl/openssl-1.1.1t/test/d2i-tests/intminus1.der rename to src/openssl/openssl-1.1.1w/test/d2i-tests/intminus1.der diff --git a/src/openssl/openssl-1.1.1t/test/d2i_test.c b/src/openssl/openssl-1.1.1w/test/d2i_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/d2i_test.c rename to src/openssl/openssl-1.1.1w/test/d2i_test.c diff --git a/src/openssl/openssl-1.1.1t/test/dane-cross.in b/src/openssl/openssl-1.1.1w/test/dane-cross.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/dane-cross.in rename to src/openssl/openssl-1.1.1w/test/dane-cross.in diff --git a/src/openssl/openssl-1.1.1t/test/danetest.c b/src/openssl/openssl-1.1.1w/test/danetest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/danetest.c rename to src/openssl/openssl-1.1.1w/test/danetest.c diff --git a/src/openssl/openssl-1.1.1t/test/danetest.in b/src/openssl/openssl-1.1.1w/test/danetest.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/danetest.in rename to src/openssl/openssl-1.1.1w/test/danetest.in diff --git a/src/openssl/openssl-1.1.1t/test/danetest.pem b/src/openssl/openssl-1.1.1w/test/danetest.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/danetest.pem rename to src/openssl/openssl-1.1.1w/test/danetest.pem diff --git a/src/openssl/openssl-1.1.1t/test/data.bin b/src/openssl/openssl-1.1.1w/test/data.bin similarity index 100% rename from src/openssl/openssl-1.1.1t/test/data.bin rename to src/openssl/openssl-1.1.1w/test/data.bin diff --git a/src/openssl/openssl-1.1.1t/test/destest.c b/src/openssl/openssl-1.1.1w/test/destest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/destest.c rename to src/openssl/openssl-1.1.1w/test/destest.c diff --git a/src/openssl/openssl-1.1.1t/test/dhtest.c b/src/openssl/openssl-1.1.1w/test/dhtest.c similarity index 97% rename from src/openssl/openssl-1.1.1t/test/dhtest.c rename to src/openssl/openssl-1.1.1w/test/dhtest.c index 9d5609b94..20132201a 100644 --- a/src/openssl/openssl-1.1.1t/test/dhtest.c +++ b/src/openssl/openssl-1.1.1w/test/dhtest.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -63,7 +63,7 @@ static int dh_test(void) || !TEST_true(DH_set0_pqg(dh, p, q, g))) goto err1; - if (!DH_check(dh, &i)) + if (!TEST_true(DH_check(dh, &i))) goto err2; if (!TEST_false(i & DH_CHECK_P_NOT_PRIME) || !TEST_false(i & DH_CHECK_P_NOT_SAFE_PRIME) @@ -123,6 +123,29 @@ static int dh_test(void) /* check whether the public key was calculated correctly */ TEST_uint_eq(BN_get_word(pub_key2), 3331L); + if (!TEST_ptr(BN_copy(q, p)) || !TEST_true(BN_add(q, q, BN_value_one()))) + goto err3; + + if (!TEST_true(DH_check(dh, &i))) + goto err3; + if (!TEST_true(i & DH_CHECK_INVALID_Q_VALUE) + || !TEST_false(i & DH_CHECK_Q_NOT_PRIME)) + goto err3; + + /* Modulus of size: dh check max modulus bits + 1 */ + if (!TEST_true(BN_set_word(p, 1)) + || !TEST_true(BN_lshift(p, p, OPENSSL_DH_CHECK_MAX_MODULUS_BITS))) + goto err3; + + /* + * We expect no checks at all for an excessively large modulus + */ + if (!TEST_false(DH_check(dh, &i))) + goto err3; + + /* We'll have a stale error on the queue from the above test so clear it */ + ERR_clear_error(); + /* * II) key generation */ @@ -137,7 +160,7 @@ static int dh_test(void) goto err3; /* ... and check whether it is valid */ - if (!DH_check(a, &i)) + if (!TEST_true(DH_check(a, &i))) goto err3; if (!TEST_false(i & DH_CHECK_P_NOT_PRIME) || !TEST_false(i & DH_CHECK_P_NOT_SAFE_PRIME) diff --git a/src/openssl/openssl-1.1.1t/test/drbg_cavs_data.c b/src/openssl/openssl-1.1.1w/test/drbg_cavs_data.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/drbg_cavs_data.c rename to src/openssl/openssl-1.1.1w/test/drbg_cavs_data.c diff --git a/src/openssl/openssl-1.1.1t/test/drbg_cavs_data.h b/src/openssl/openssl-1.1.1w/test/drbg_cavs_data.h similarity index 100% rename from src/openssl/openssl-1.1.1t/test/drbg_cavs_data.h rename to src/openssl/openssl-1.1.1w/test/drbg_cavs_data.h diff --git a/src/openssl/openssl-1.1.1t/test/drbg_cavs_test.c b/src/openssl/openssl-1.1.1w/test/drbg_cavs_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/drbg_cavs_test.c rename to src/openssl/openssl-1.1.1w/test/drbg_cavs_test.c diff --git a/src/openssl/openssl-1.1.1t/test/drbgtest.c b/src/openssl/openssl-1.1.1w/test/drbgtest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/drbgtest.c rename to src/openssl/openssl-1.1.1w/test/drbgtest.c diff --git a/src/openssl/openssl-1.1.1t/test/drbgtest.h b/src/openssl/openssl-1.1.1w/test/drbgtest.h similarity index 100% rename from src/openssl/openssl-1.1.1t/test/drbgtest.h rename to src/openssl/openssl-1.1.1w/test/drbgtest.h diff --git a/src/openssl/openssl-1.1.1t/test/dsa_no_digest_size_test.c b/src/openssl/openssl-1.1.1w/test/dsa_no_digest_size_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/dsa_no_digest_size_test.c rename to src/openssl/openssl-1.1.1w/test/dsa_no_digest_size_test.c diff --git a/src/openssl/openssl-1.1.1t/test/dsatest.c b/src/openssl/openssl-1.1.1w/test/dsatest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/dsatest.c rename to src/openssl/openssl-1.1.1w/test/dsatest.c diff --git a/src/openssl/openssl-1.1.1t/test/dtls_mtu_test.c b/src/openssl/openssl-1.1.1w/test/dtls_mtu_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/dtls_mtu_test.c rename to src/openssl/openssl-1.1.1w/test/dtls_mtu_test.c diff --git a/src/openssl/openssl-1.1.1t/test/dtlstest.c b/src/openssl/openssl-1.1.1w/test/dtlstest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/dtlstest.c rename to src/openssl/openssl-1.1.1w/test/dtlstest.c diff --git a/src/openssl/openssl-1.1.1t/test/dtlsv1listentest.c b/src/openssl/openssl-1.1.1w/test/dtlsv1listentest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/dtlsv1listentest.c rename to src/openssl/openssl-1.1.1w/test/dtlsv1listentest.c diff --git a/src/openssl/openssl-1.1.1t/test/ec_internal_test.c b/src/openssl/openssl-1.1.1w/test/ec_internal_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ec_internal_test.c rename to src/openssl/openssl-1.1.1w/test/ec_internal_test.c diff --git a/src/openssl/openssl-1.1.1t/test/ecdsatest.c b/src/openssl/openssl-1.1.1w/test/ecdsatest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ecdsatest.c rename to src/openssl/openssl-1.1.1w/test/ecdsatest.c diff --git a/src/openssl/openssl-1.1.1t/test/ecdsatest.h b/src/openssl/openssl-1.1.1w/test/ecdsatest.h similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ecdsatest.h rename to src/openssl/openssl-1.1.1w/test/ecdsatest.h diff --git a/src/openssl/openssl-1.1.1t/test/ecstresstest.c b/src/openssl/openssl-1.1.1w/test/ecstresstest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ecstresstest.c rename to src/openssl/openssl-1.1.1w/test/ecstresstest.c diff --git a/src/openssl/openssl-1.1.1t/test/ectest.c b/src/openssl/openssl-1.1.1w/test/ectest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ectest.c rename to src/openssl/openssl-1.1.1w/test/ectest.c diff --git a/src/openssl/openssl-1.1.1t/test/enginetest.c b/src/openssl/openssl-1.1.1w/test/enginetest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/enginetest.c rename to src/openssl/openssl-1.1.1w/test/enginetest.c diff --git a/src/openssl/openssl-1.1.1t/test/errtest.c b/src/openssl/openssl-1.1.1w/test/errtest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/errtest.c rename to src/openssl/openssl-1.1.1w/test/errtest.c diff --git a/src/openssl/openssl-1.1.1t/test/evp_extra_test.c b/src/openssl/openssl-1.1.1w/test/evp_extra_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/evp_extra_test.c rename to src/openssl/openssl-1.1.1w/test/evp_extra_test.c diff --git a/src/openssl/openssl-1.1.1t/test/evp_test.c b/src/openssl/openssl-1.1.1w/test/evp_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/evp_test.c rename to src/openssl/openssl-1.1.1w/test/evp_test.c diff --git a/src/openssl/openssl-1.1.1t/test/evp_test.h b/src/openssl/openssl-1.1.1w/test/evp_test.h similarity index 100% rename from src/openssl/openssl-1.1.1t/test/evp_test.h rename to src/openssl/openssl-1.1.1w/test/evp_test.h diff --git a/src/openssl/openssl-1.1.1t/test/exdatatest.c b/src/openssl/openssl-1.1.1w/test/exdatatest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/exdatatest.c rename to src/openssl/openssl-1.1.1w/test/exdatatest.c diff --git a/src/openssl/openssl-1.1.1t/test/exptest.c b/src/openssl/openssl-1.1.1w/test/exptest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/exptest.c rename to src/openssl/openssl-1.1.1w/test/exptest.c diff --git a/src/openssl/openssl-1.1.1t/test/fatalerrtest.c b/src/openssl/openssl-1.1.1w/test/fatalerrtest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/fatalerrtest.c rename to src/openssl/openssl-1.1.1w/test/fatalerrtest.c diff --git a/src/openssl/openssl-1.1.1t/test/generate_buildtest.pl b/src/openssl/openssl-1.1.1w/test/generate_buildtest.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/test/generate_buildtest.pl rename to src/openssl/openssl-1.1.1w/test/generate_buildtest.pl diff --git a/src/openssl/openssl-1.1.1t/test/generate_ssl_tests.pl b/src/openssl/openssl-1.1.1w/test/generate_ssl_tests.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/test/generate_ssl_tests.pl rename to src/openssl/openssl-1.1.1w/test/generate_ssl_tests.pl diff --git a/src/openssl/openssl-1.1.1t/test/gmdifftest.c b/src/openssl/openssl-1.1.1w/test/gmdifftest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/gmdifftest.c rename to src/openssl/openssl-1.1.1w/test/gmdifftest.c diff --git a/src/openssl/openssl-1.1.1t/test/gosttest.c b/src/openssl/openssl-1.1.1w/test/gosttest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/gosttest.c rename to src/openssl/openssl-1.1.1w/test/gosttest.c diff --git a/src/openssl/openssl-1.1.1t/test/handshake_helper.c b/src/openssl/openssl-1.1.1w/test/handshake_helper.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/handshake_helper.c rename to src/openssl/openssl-1.1.1w/test/handshake_helper.c diff --git a/src/openssl/openssl-1.1.1t/test/handshake_helper.h b/src/openssl/openssl-1.1.1w/test/handshake_helper.h similarity index 100% rename from src/openssl/openssl-1.1.1t/test/handshake_helper.h rename to src/openssl/openssl-1.1.1w/test/handshake_helper.h diff --git a/src/openssl/openssl-1.1.1t/test/hmactest.c b/src/openssl/openssl-1.1.1w/test/hmactest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/hmactest.c rename to src/openssl/openssl-1.1.1w/test/hmactest.c diff --git a/src/openssl/openssl-1.1.1t/test/ideatest.c b/src/openssl/openssl-1.1.1w/test/ideatest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ideatest.c rename to src/openssl/openssl-1.1.1w/test/ideatest.c diff --git a/src/openssl/openssl-1.1.1t/test/igetest.c b/src/openssl/openssl-1.1.1w/test/igetest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/igetest.c rename to src/openssl/openssl-1.1.1w/test/igetest.c diff --git a/src/openssl/openssl-1.1.1t/test/lhash_test.c b/src/openssl/openssl-1.1.1w/test/lhash_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/lhash_test.c rename to src/openssl/openssl-1.1.1w/test/lhash_test.c diff --git a/src/openssl/openssl-1.1.1t/test/md2test.c b/src/openssl/openssl-1.1.1w/test/md2test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/md2test.c rename to src/openssl/openssl-1.1.1w/test/md2test.c diff --git a/src/openssl/openssl-1.1.1t/test/mdc2_internal_test.c b/src/openssl/openssl-1.1.1w/test/mdc2_internal_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/mdc2_internal_test.c rename to src/openssl/openssl-1.1.1w/test/mdc2_internal_test.c diff --git a/src/openssl/openssl-1.1.1t/test/mdc2test.c b/src/openssl/openssl-1.1.1w/test/mdc2test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/mdc2test.c rename to src/openssl/openssl-1.1.1w/test/mdc2test.c diff --git a/src/openssl/openssl-1.1.1t/test/memleaktest.c b/src/openssl/openssl-1.1.1w/test/memleaktest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/memleaktest.c rename to src/openssl/openssl-1.1.1w/test/memleaktest.c diff --git a/src/openssl/openssl-1.1.1t/test/modes_internal_test.c b/src/openssl/openssl-1.1.1w/test/modes_internal_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/modes_internal_test.c rename to src/openssl/openssl-1.1.1w/test/modes_internal_test.c diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/D1.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/D1.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/D1.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/D1.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/D1_Cert_EE.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/D1_Cert_EE.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/D1_Cert_EE.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/D1_Cert_EE.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/D1_Issuer_ICA.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/D1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/D1_Issuer_ICA.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/D1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/D2.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/D2.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/D2.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/D2.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/D2_Cert_ICA.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/D2_Cert_ICA.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/D2_Cert_ICA.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/D2_Cert_ICA.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/D2_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/D2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/D2_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/D2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/D3.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/D3.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/D3.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/D3.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/D3_Cert_EE.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/D3_Cert_EE.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/D3_Cert_EE.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/D3_Cert_EE.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/D3_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/D3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/D3_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/D3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISDOSC_D1.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISDOSC_D1.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISDOSC_D1.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISDOSC_D1.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISDOSC_D2.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISDOSC_D2.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISDOSC_D2.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISDOSC_D2.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISDOSC_D3.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISDOSC_D3.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISDOSC_D3.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISDOSC_D3.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISIC_D1_Issuer_ICA.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISIC_D1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISIC_D1_Issuer_ICA.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISIC_D1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISIC_D2_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISIC_D2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISIC_D2_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISIC_D2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISIC_D3_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISIC_D3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISIC_D3_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISIC_D3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISIC_ND1_Issuer_ICA.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISIC_ND1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISIC_ND1_Issuer_ICA.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISIC_ND1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISIC_ND2_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISIC_ND2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISIC_ND2_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISIC_ND2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISIC_ND3_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISIC_ND3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISIC_ND3_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISIC_ND3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISOP_D1.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISOP_D1.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISOP_D1.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISOP_D1.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISOP_D2.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISOP_D2.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISOP_D2.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISOP_D2.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISOP_D3.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISOP_D3.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISOP_D3.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISOP_D3.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISOP_ND1.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISOP_ND1.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISOP_ND1.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISOP_ND1.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISOP_ND2.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISOP_ND2.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISOP_ND2.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISOP_ND2.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ISOP_ND3.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ISOP_ND3.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ISOP_ND3.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ISOP_ND3.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ND1.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ND1.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ND1.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ND1.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ND1_Cert_EE.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ND1_Cert_EE.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ND1_Cert_EE.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ND1_Cert_EE.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ND1_Cross_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ND1_Cross_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ND1_Cross_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ND1_Cross_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ND1_Issuer_ICA-Cross.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ND1_Issuer_ICA-Cross.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ND1_Issuer_ICA-Cross.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ND1_Issuer_ICA-Cross.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ND1_Issuer_ICA.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ND1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ND1_Issuer_ICA.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ND1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ND2.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ND2.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ND2.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ND2.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ND2_Cert_ICA.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ND2_Cert_ICA.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ND2_Cert_ICA.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ND2_Cert_ICA.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ND2_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ND2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ND2_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ND2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ND3.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ND3.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ND3.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ND3.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ND3_Cert_EE.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ND3_Cert_EE.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ND3_Cert_EE.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ND3_Cert_EE.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/ND3_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/ND3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/ND3_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/ND3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WIKH_D1.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WIKH_D1.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WIKH_D1.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WIKH_D1.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WIKH_D2.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WIKH_D2.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WIKH_D2.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WIKH_D2.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WIKH_D3.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WIKH_D3.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WIKH_D3.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WIKH_D3.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WIKH_ND1.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WIKH_ND1.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WIKH_ND1.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WIKH_ND1.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WIKH_ND2.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WIKH_ND2.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WIKH_ND2.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WIKH_ND2.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WIKH_ND3.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WIKH_ND3.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WIKH_ND3.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WIKH_ND3.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WINH_D1.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WINH_D1.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WINH_D1.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WINH_D1.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WINH_D2.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WINH_D2.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WINH_D2.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WINH_D2.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WINH_D3.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WINH_D3.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WINH_D3.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WINH_D3.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WINH_ND1.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WINH_ND1.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WINH_ND1.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WINH_ND1.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WINH_ND2.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WINH_ND2.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WINH_ND2.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WINH_ND2.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WINH_ND3.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WINH_ND3.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WINH_ND3.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WINH_ND3.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WKDOSC_D1.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WKDOSC_D1.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WKDOSC_D1.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WKDOSC_D1.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WKDOSC_D2.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WKDOSC_D2.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WKDOSC_D2.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WKDOSC_D2.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WKDOSC_D3.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WKDOSC_D3.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WKDOSC_D3.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WKDOSC_D3.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WKIC_D1_Issuer_ICA.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WKIC_D1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WKIC_D1_Issuer_ICA.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WKIC_D1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WKIC_D2_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WKIC_D2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WKIC_D2_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WKIC_D2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WKIC_D3_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WKIC_D3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WKIC_D3_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WKIC_D3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WKIC_ND1_Issuer_ICA.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WKIC_ND1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WKIC_ND1_Issuer_ICA.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WKIC_ND1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WKIC_ND2_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WKIC_ND2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WKIC_ND2_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WKIC_ND2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WKIC_ND3_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WKIC_ND3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WKIC_ND3_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WKIC_ND3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WRID_D1.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WRID_D1.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WRID_D1.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WRID_D1.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WRID_D2.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WRID_D2.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WRID_D2.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WRID_D2.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WRID_D3.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WRID_D3.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WRID_D3.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WRID_D3.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WRID_ND1.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WRID_ND1.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WRID_ND1.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WRID_ND1.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WRID_ND2.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WRID_ND2.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WRID_ND2.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WRID_ND2.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WRID_ND3.ors b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WRID_ND3.ors similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WRID_ND3.ors rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WRID_ND3.ors diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WSNIC_D1_Issuer_ICA.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WSNIC_D1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WSNIC_D1_Issuer_ICA.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WSNIC_D1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WSNIC_D2_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WSNIC_D2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WSNIC_D2_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WSNIC_D2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WSNIC_D3_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WSNIC_D3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WSNIC_D3_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WSNIC_D3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WSNIC_ND1_Issuer_ICA.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WSNIC_ND1_Issuer_ICA.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WSNIC_ND1_Issuer_ICA.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WSNIC_ND1_Issuer_ICA.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WSNIC_ND2_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WSNIC_ND2_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WSNIC_ND2_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WSNIC_ND2_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocsp-tests/WSNIC_ND3_Issuer_Root.pem b/src/openssl/openssl-1.1.1w/test/ocsp-tests/WSNIC_ND3_Issuer_Root.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocsp-tests/WSNIC_ND3_Issuer_Root.pem rename to src/openssl/openssl-1.1.1w/test/ocsp-tests/WSNIC_ND3_Issuer_Root.pem diff --git a/src/openssl/openssl-1.1.1t/test/ocspapitest.c b/src/openssl/openssl-1.1.1w/test/ocspapitest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ocspapitest.c rename to src/openssl/openssl-1.1.1w/test/ocspapitest.c diff --git a/src/openssl/openssl-1.1.1t/test/ossl_shim/async_bio.cc b/src/openssl/openssl-1.1.1w/test/ossl_shim/async_bio.cc similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ossl_shim/async_bio.cc rename to src/openssl/openssl-1.1.1w/test/ossl_shim/async_bio.cc diff --git a/src/openssl/openssl-1.1.1t/test/ossl_shim/async_bio.h b/src/openssl/openssl-1.1.1w/test/ossl_shim/async_bio.h similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ossl_shim/async_bio.h rename to src/openssl/openssl-1.1.1w/test/ossl_shim/async_bio.h diff --git a/src/openssl/openssl-1.1.1t/test/ossl_shim/build.info b/src/openssl/openssl-1.1.1w/test/ossl_shim/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ossl_shim/build.info rename to src/openssl/openssl-1.1.1w/test/ossl_shim/build.info diff --git a/src/openssl/openssl-1.1.1t/test/ossl_shim/include/openssl/base.h b/src/openssl/openssl-1.1.1w/test/ossl_shim/include/openssl/base.h similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ossl_shim/include/openssl/base.h rename to src/openssl/openssl-1.1.1w/test/ossl_shim/include/openssl/base.h diff --git a/src/openssl/openssl-1.1.1t/test/ossl_shim/ossl_config.json b/src/openssl/openssl-1.1.1w/test/ossl_shim/ossl_config.json similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ossl_shim/ossl_config.json rename to src/openssl/openssl-1.1.1w/test/ossl_shim/ossl_config.json diff --git a/src/openssl/openssl-1.1.1t/test/ossl_shim/ossl_shim.cc b/src/openssl/openssl-1.1.1w/test/ossl_shim/ossl_shim.cc similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ossl_shim/ossl_shim.cc rename to src/openssl/openssl-1.1.1w/test/ossl_shim/ossl_shim.cc diff --git a/src/openssl/openssl-1.1.1t/test/ossl_shim/packeted_bio.cc b/src/openssl/openssl-1.1.1w/test/ossl_shim/packeted_bio.cc similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ossl_shim/packeted_bio.cc rename to src/openssl/openssl-1.1.1w/test/ossl_shim/packeted_bio.cc diff --git a/src/openssl/openssl-1.1.1t/test/ossl_shim/packeted_bio.h b/src/openssl/openssl-1.1.1w/test/ossl_shim/packeted_bio.h similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ossl_shim/packeted_bio.h rename to src/openssl/openssl-1.1.1w/test/ossl_shim/packeted_bio.h diff --git a/src/openssl/openssl-1.1.1t/test/ossl_shim/test_config.cc b/src/openssl/openssl-1.1.1w/test/ossl_shim/test_config.cc similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ossl_shim/test_config.cc rename to src/openssl/openssl-1.1.1w/test/ossl_shim/test_config.cc diff --git a/src/openssl/openssl-1.1.1t/test/ossl_shim/test_config.h b/src/openssl/openssl-1.1.1w/test/ossl_shim/test_config.h similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ossl_shim/test_config.h rename to src/openssl/openssl-1.1.1w/test/ossl_shim/test_config.h diff --git a/src/openssl/openssl-1.1.1t/test/packettest.c b/src/openssl/openssl-1.1.1w/test/packettest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/packettest.c rename to src/openssl/openssl-1.1.1w/test/packettest.c diff --git a/src/openssl/openssl-1.1.1t/test/pbelutest.c b/src/openssl/openssl-1.1.1w/test/pbelutest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/pbelutest.c rename to src/openssl/openssl-1.1.1w/test/pbelutest.c diff --git a/src/openssl/openssl-1.1.1t/test/pemtest.c b/src/openssl/openssl-1.1.1w/test/pemtest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/pemtest.c rename to src/openssl/openssl-1.1.1w/test/pemtest.c diff --git a/src/openssl/openssl-1.1.1t/test/pkcs7-1.pem b/src/openssl/openssl-1.1.1w/test/pkcs7-1.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/pkcs7-1.pem rename to src/openssl/openssl-1.1.1w/test/pkcs7-1.pem diff --git a/src/openssl/openssl-1.1.1t/test/pkcs7.pem b/src/openssl/openssl-1.1.1w/test/pkcs7.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/pkcs7.pem rename to src/openssl/openssl-1.1.1w/test/pkcs7.pem diff --git a/src/openssl/openssl-1.1.1t/test/pkey_meth_kdf_test.c b/src/openssl/openssl-1.1.1w/test/pkey_meth_kdf_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/pkey_meth_kdf_test.c rename to src/openssl/openssl-1.1.1w/test/pkey_meth_kdf_test.c diff --git a/src/openssl/openssl-1.1.1t/test/pkey_meth_test.c b/src/openssl/openssl-1.1.1w/test/pkey_meth_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/pkey_meth_test.c rename to src/openssl/openssl-1.1.1w/test/pkey_meth_test.c diff --git a/src/openssl/openssl-1.1.1t/test/pkits-test.pl b/src/openssl/openssl-1.1.1w/test/pkits-test.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/test/pkits-test.pl rename to src/openssl/openssl-1.1.1w/test/pkits-test.pl diff --git a/src/openssl/openssl-1.1.1t/test/poly1305_internal_test.c b/src/openssl/openssl-1.1.1w/test/poly1305_internal_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/poly1305_internal_test.c rename to src/openssl/openssl-1.1.1w/test/poly1305_internal_test.c diff --git a/src/openssl/openssl-1.1.1t/test/rc2test.c b/src/openssl/openssl-1.1.1w/test/rc2test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/rc2test.c rename to src/openssl/openssl-1.1.1w/test/rc2test.c diff --git a/src/openssl/openssl-1.1.1t/test/rc4test.c b/src/openssl/openssl-1.1.1w/test/rc4test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/rc4test.c rename to src/openssl/openssl-1.1.1w/test/rc4test.c diff --git a/src/openssl/openssl-1.1.1t/test/rc5test.c b/src/openssl/openssl-1.1.1w/test/rc5test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/rc5test.c rename to src/openssl/openssl-1.1.1w/test/rc5test.c diff --git a/src/openssl/openssl-1.1.1t/test/rdrand_sanitytest.c b/src/openssl/openssl-1.1.1w/test/rdrand_sanitytest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/rdrand_sanitytest.c rename to src/openssl/openssl-1.1.1w/test/rdrand_sanitytest.c diff --git a/src/openssl/openssl-1.1.1t/test/recipes/01-test_abort.t b/src/openssl/openssl-1.1.1w/test/recipes/01-test_abort.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/01-test_abort.t rename to src/openssl/openssl-1.1.1w/test/recipes/01-test_abort.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/01-test_sanity.t b/src/openssl/openssl-1.1.1w/test/recipes/01-test_sanity.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/01-test_sanity.t rename to src/openssl/openssl-1.1.1w/test/recipes/01-test_sanity.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/01-test_symbol_presence.t b/src/openssl/openssl-1.1.1w/test/recipes/01-test_symbol_presence.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/01-test_symbol_presence.t rename to src/openssl/openssl-1.1.1w/test/recipes/01-test_symbol_presence.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/01-test_test.t b/src/openssl/openssl-1.1.1w/test/recipes/01-test_test.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/01-test_test.t rename to src/openssl/openssl-1.1.1w/test/recipes/01-test_test.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/02-test_errstr.t b/src/openssl/openssl-1.1.1w/test/recipes/02-test_errstr.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/02-test_errstr.t rename to src/openssl/openssl-1.1.1w/test/recipes/02-test_errstr.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/02-test_internal_ctype.t b/src/openssl/openssl-1.1.1w/test/recipes/02-test_internal_ctype.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/02-test_internal_ctype.t rename to src/openssl/openssl-1.1.1w/test/recipes/02-test_internal_ctype.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/02-test_lhash.t b/src/openssl/openssl-1.1.1w/test/recipes/02-test_lhash.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/02-test_lhash.t rename to src/openssl/openssl-1.1.1w/test/recipes/02-test_lhash.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/02-test_ordinals.t b/src/openssl/openssl-1.1.1w/test/recipes/02-test_ordinals.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/02-test_ordinals.t rename to src/openssl/openssl-1.1.1w/test/recipes/02-test_ordinals.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/02-test_stack.t b/src/openssl/openssl-1.1.1w/test/recipes/02-test_stack.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/02-test_stack.t rename to src/openssl/openssl-1.1.1w/test/recipes/02-test_stack.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/03-test_exdata.t b/src/openssl/openssl-1.1.1w/test/recipes/03-test_exdata.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/03-test_exdata.t rename to src/openssl/openssl-1.1.1w/test/recipes/03-test_exdata.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_asn1.t b/src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_asn1.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_asn1.t rename to src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_asn1.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_chacha.t b/src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_chacha.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_chacha.t rename to src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_chacha.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_curve448.t b/src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_curve448.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_curve448.t rename to src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_curve448.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_ec.t b/src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_ec.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_ec.t rename to src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_ec.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_mdc2.t b/src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_mdc2.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_mdc2.t rename to src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_mdc2.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_modes.t b/src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_modes.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_modes.t rename to src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_modes.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_poly1305.t b/src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_poly1305.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_poly1305.t rename to src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_poly1305.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_siphash.t b/src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_siphash.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_siphash.t rename to src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_siphash.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_sm2.t b/src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_sm2.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_sm2.t rename to src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_sm2.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_sm4.t b/src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_sm4.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_sm4.t rename to src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_sm4.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_ssl_cert_table.t b/src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_ssl_cert_table.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_ssl_cert_table.t rename to src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_ssl_cert_table.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_x509.t b/src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_x509.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/03-test_internal_x509.t rename to src/openssl/openssl-1.1.1w/test/recipes/03-test_internal_x509.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/03-test_ui.t b/src/openssl/openssl-1.1.1w/test/recipes/03-test_ui.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/03-test_ui.t rename to src/openssl/openssl-1.1.1w/test/recipes/03-test_ui.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_asn1_decode.t b/src/openssl/openssl-1.1.1w/test/recipes/04-test_asn1_decode.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_asn1_decode.t rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_asn1_decode.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_asn1_encode.t b/src/openssl/openssl-1.1.1w/test/recipes/04-test_asn1_encode.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_asn1_encode.t rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_asn1_encode.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_asn1_string_table.t b/src/openssl/openssl-1.1.1w/test/recipes/04-test_asn1_string_table.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_asn1_string_table.t rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_asn1_string_table.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_bio_callback.t b/src/openssl/openssl-1.1.1w/test/recipes/04-test_bio_callback.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_bio_callback.t rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_bio_callback.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_bioprint.t b/src/openssl/openssl-1.1.1w/test/recipes/04-test_bioprint.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_bioprint.t rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_bioprint.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_err.t b/src/openssl/openssl-1.1.1w/test/recipes/04-test_err.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_err.t rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_err.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem.t b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem.t rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/NOTES b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/NOTES similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/NOTES rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/NOTES diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/beermug.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/beermug.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/beermug.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/beermug.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-1023line.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-1023line.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-1023line.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-1023line.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-1024line.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-1024line.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-1024line.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-1024line.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-1025line.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-1025line.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-1025line.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-1025line.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-254-chars-at-the-end.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-254-chars-at-the-end.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-254-chars-at-the-end.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-254-chars-at-the-end.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-254-chars-in-the-middle.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-254-chars-in-the-middle.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-254-chars-in-the-middle.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-254-chars-in-the-middle.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-255line.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-255line.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-255line.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-255line.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-256line.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-256line.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-256line.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-256line.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-257line.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-257line.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-257line.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-257line.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-blankline.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-blankline.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-blankline.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-blankline.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-comment.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-comment.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-comment.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-comment.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-earlypad.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-earlypad.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-earlypad.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-earlypad.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-extrapad.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-extrapad.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-extrapad.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-extrapad.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-infixwhitespace.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-infixwhitespace.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-infixwhitespace.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-infixwhitespace.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-junk.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-junk.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-junk.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-junk.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-leadingwhitespace.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-leadingwhitespace.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-leadingwhitespace.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-leadingwhitespace.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-longline.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-longline.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-longline.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-longline.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-misalignedpad.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-misalignedpad.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-misalignedpad.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-misalignedpad.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-onecolumn.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-onecolumn.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-onecolumn.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-onecolumn.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-oneline-multiple-of-254.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-oneline-multiple-of-254.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-oneline-multiple-of-254.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-oneline-multiple-of-254.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-oneline.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-oneline.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-oneline.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-oneline.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-shortandlongline.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-shortandlongline.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-shortandlongline.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-shortandlongline.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-shortline.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-shortline.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-shortline.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-shortline.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-threecolumn.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-threecolumn.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-threecolumn.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-threecolumn.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-trailingwhitespace.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-trailingwhitespace.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert-trailingwhitespace.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert-trailingwhitespace.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/cert.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/csr.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/csr.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/csr.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/csr.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-1023line.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-1023line.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-1023line.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-1023line.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-1024line.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-1024line.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-1024line.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-1024line.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-1025line.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-1025line.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-1025line.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-1025line.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-255line.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-255line.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-255line.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-255line.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-256line.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-256line.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-256line.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-256line.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-257line.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-257line.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-257line.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-257line.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-blankline.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-blankline.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-blankline.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-blankline.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-comment.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-comment.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-comment.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-comment.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-corruptedheader.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-corruptedheader.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-corruptedheader.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-corruptedheader.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-corruptiv.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-corruptiv.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-corruptiv.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-corruptiv.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-earlypad.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-earlypad.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-earlypad.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-earlypad.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-extrapad.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-extrapad.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-extrapad.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-extrapad.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-infixwhitespace.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-infixwhitespace.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-infixwhitespace.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-infixwhitespace.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-junk.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-junk.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-junk.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-junk.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-leadingwhitespace.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-leadingwhitespace.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-leadingwhitespace.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-leadingwhitespace.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-longline.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-longline.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-longline.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-longline.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-misalignedpad.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-misalignedpad.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-misalignedpad.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-misalignedpad.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-onecolumn.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-onecolumn.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-onecolumn.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-onecolumn.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-oneline.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-oneline.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-oneline.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-oneline.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-onelineheader.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-onelineheader.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-onelineheader.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-onelineheader.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-shortandlongline.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-shortandlongline.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-shortandlongline.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-shortandlongline.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-shortline.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-shortline.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-shortline.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-shortline.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-threecolumn.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-threecolumn.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-threecolumn.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-threecolumn.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-trailingwhitespace.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-trailingwhitespace.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa-trailingwhitespace.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa-trailingwhitespace.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsa.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsa.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsaparam.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsaparam.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/dsaparam.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/dsaparam.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/key.pem b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/key.pem rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/key.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/wellknown b/src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/wellknown similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/04-test_pem_data/wellknown rename to src/openssl/openssl-1.1.1w/test/recipes/04-test_pem_data/wellknown diff --git a/src/openssl/openssl-1.1.1t/test/recipes/05-test_bf.t b/src/openssl/openssl-1.1.1w/test/recipes/05-test_bf.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/05-test_bf.t rename to src/openssl/openssl-1.1.1w/test/recipes/05-test_bf.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/05-test_cast.t b/src/openssl/openssl-1.1.1w/test/recipes/05-test_cast.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/05-test_cast.t rename to src/openssl/openssl-1.1.1w/test/recipes/05-test_cast.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/05-test_cmac.t b/src/openssl/openssl-1.1.1w/test/recipes/05-test_cmac.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/05-test_cmac.t rename to src/openssl/openssl-1.1.1w/test/recipes/05-test_cmac.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/05-test_des.t b/src/openssl/openssl-1.1.1w/test/recipes/05-test_des.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/05-test_des.t rename to src/openssl/openssl-1.1.1w/test/recipes/05-test_des.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/05-test_hmac.t b/src/openssl/openssl-1.1.1w/test/recipes/05-test_hmac.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/05-test_hmac.t rename to src/openssl/openssl-1.1.1w/test/recipes/05-test_hmac.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/05-test_idea.t b/src/openssl/openssl-1.1.1w/test/recipes/05-test_idea.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/05-test_idea.t rename to src/openssl/openssl-1.1.1w/test/recipes/05-test_idea.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/05-test_md2.t b/src/openssl/openssl-1.1.1w/test/recipes/05-test_md2.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/05-test_md2.t rename to src/openssl/openssl-1.1.1w/test/recipes/05-test_md2.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/05-test_mdc2.t b/src/openssl/openssl-1.1.1w/test/recipes/05-test_mdc2.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/05-test_mdc2.t rename to src/openssl/openssl-1.1.1w/test/recipes/05-test_mdc2.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/05-test_rand.t b/src/openssl/openssl-1.1.1w/test/recipes/05-test_rand.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/05-test_rand.t rename to src/openssl/openssl-1.1.1w/test/recipes/05-test_rand.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/05-test_rc2.t b/src/openssl/openssl-1.1.1w/test/recipes/05-test_rc2.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/05-test_rc2.t rename to src/openssl/openssl-1.1.1w/test/recipes/05-test_rc2.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/05-test_rc4.t b/src/openssl/openssl-1.1.1w/test/recipes/05-test_rc4.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/05-test_rc4.t rename to src/openssl/openssl-1.1.1w/test/recipes/05-test_rc4.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/05-test_rc5.t b/src/openssl/openssl-1.1.1w/test/recipes/05-test_rc5.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/05-test_rc5.t rename to src/openssl/openssl-1.1.1w/test/recipes/05-test_rc5.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/06-test-rdrand.t b/src/openssl/openssl-1.1.1w/test/recipes/06-test-rdrand.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/06-test-rdrand.t rename to src/openssl/openssl-1.1.1w/test/recipes/06-test-rdrand.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/10-test_bn.t b/src/openssl/openssl-1.1.1w/test/recipes/10-test_bn.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/10-test_bn.t rename to src/openssl/openssl-1.1.1w/test/recipes/10-test_bn.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/10-test_bn_data/bnexp.txt b/src/openssl/openssl-1.1.1w/test/recipes/10-test_bn_data/bnexp.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/10-test_bn_data/bnexp.txt rename to src/openssl/openssl-1.1.1w/test/recipes/10-test_bn_data/bnexp.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/10-test_bn_data/bngcd.txt b/src/openssl/openssl-1.1.1w/test/recipes/10-test_bn_data/bngcd.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/10-test_bn_data/bngcd.txt rename to src/openssl/openssl-1.1.1w/test/recipes/10-test_bn_data/bngcd.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/10-test_bn_data/bnmod.txt b/src/openssl/openssl-1.1.1w/test/recipes/10-test_bn_data/bnmod.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/10-test_bn_data/bnmod.txt rename to src/openssl/openssl-1.1.1w/test/recipes/10-test_bn_data/bnmod.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/10-test_bn_data/bnmul.txt b/src/openssl/openssl-1.1.1w/test/recipes/10-test_bn_data/bnmul.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/10-test_bn_data/bnmul.txt rename to src/openssl/openssl-1.1.1w/test/recipes/10-test_bn_data/bnmul.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/10-test_bn_data/bnshift.txt b/src/openssl/openssl-1.1.1w/test/recipes/10-test_bn_data/bnshift.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/10-test_bn_data/bnshift.txt rename to src/openssl/openssl-1.1.1w/test/recipes/10-test_bn_data/bnshift.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/10-test_bn_data/bnsum.txt b/src/openssl/openssl-1.1.1w/test/recipes/10-test_bn_data/bnsum.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/10-test_bn_data/bnsum.txt rename to src/openssl/openssl-1.1.1w/test/recipes/10-test_bn_data/bnsum.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/10-test_exp.t b/src/openssl/openssl-1.1.1w/test/recipes/10-test_exp.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/10-test_exp.t rename to src/openssl/openssl-1.1.1w/test/recipes/10-test_exp.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_dh.t b/src/openssl/openssl-1.1.1w/test/recipes/15-test_dh.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_dh.t rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_dh.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_dsa.t b/src/openssl/openssl-1.1.1w/test/recipes/15-test_dsa.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_dsa.t rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_dsa.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ec.t b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ec.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ec.t rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ec.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecdsa.t b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecdsa.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecdsa.t rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecdsa.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam.t b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam.t rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/invalid/c2pnb208w1-reducible.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/invalid/c2pnb208w1-reducible.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/invalid/c2pnb208w1-reducible.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/invalid/c2pnb208w1-reducible.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/invalid/nistp256-nonprime.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/invalid/nistp256-nonprime.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/invalid/nistp256-nonprime.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/invalid/nistp256-nonprime.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/invalid/nistp256-offcurve.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/invalid/nistp256-offcurve.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/invalid/nistp256-offcurve.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/invalid/nistp256-offcurve.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/invalid/nistp256-wrongorder.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/invalid/nistp256-wrongorder.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/invalid/nistp256-wrongorder.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/invalid/nistp256-wrongorder.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb163v1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb163v1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb163v1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb163v1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb163v1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb163v1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb163v1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb163v1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb163v2-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb163v2-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb163v2-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb163v2-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb163v2-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb163v2-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb163v2-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb163v2-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb163v3-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb163v3-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb163v3-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb163v3-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb163v3-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb163v3-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb163v3-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb163v3-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb176v1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb176v1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb176v1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb176v1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb176v1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb176v1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb176v1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb176v1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb208w1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb208w1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb208w1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb208w1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb208w1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb208w1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb208w1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb208w1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb272w1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb272w1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb272w1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb272w1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb272w1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb272w1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb272w1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb272w1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb304w1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb304w1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb304w1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb304w1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb304w1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb304w1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb304w1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb304w1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb368w1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb368w1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb368w1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb368w1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb368w1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb368w1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2pnb368w1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2pnb368w1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb191v1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb191v1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb191v1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb191v1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb191v1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb191v1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb191v1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb191v1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb191v2-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb191v2-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb191v2-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb191v2-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb191v2-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb191v2-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb191v2-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb191v2-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb191v3-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb191v3-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb191v3-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb191v3-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb191v3-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb191v3-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb191v3-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb191v3-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb239v1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb239v1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb239v1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb239v1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb239v1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb239v1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb239v1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb239v1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb239v2-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb239v2-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb239v2-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb239v2-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb239v2-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb239v2-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb239v2-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb239v2-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb239v3-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb239v3-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb239v3-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb239v3-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb239v3-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb239v3-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb239v3-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb239v3-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb359v1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb359v1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb359v1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb359v1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb359v1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb359v1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb359v1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb359v1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb431r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb431r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb431r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb431r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb431r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb431r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/c2tnb431r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/c2tnb431r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime192v1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime192v1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime192v1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime192v1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime192v1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime192v1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime192v1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime192v1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime192v2-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime192v2-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime192v2-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime192v2-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime192v2-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime192v2-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime192v2-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime192v2-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime192v3-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime192v3-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime192v3-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime192v3-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime192v3-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime192v3-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime192v3-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime192v3-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime239v1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime239v1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime239v1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime239v1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime239v1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime239v1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime239v1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime239v1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime239v2-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime239v2-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime239v2-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime239v2-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime239v2-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime239v2-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime239v2-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime239v2-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime239v3-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime239v3-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime239v3-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime239v3-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime239v3-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime239v3-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime239v3-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime239v3-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime256v1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime256v1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime256v1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime256v1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime256v1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime256v1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/prime256v1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/prime256v1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp112r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp112r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp112r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp112r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp112r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp112r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp112r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp112r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp112r2-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp112r2-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp112r2-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp112r2-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp112r2-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp112r2-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp112r2-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp112r2-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp128r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp128r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp128r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp128r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp128r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp128r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp128r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp128r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp128r2-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp128r2-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp128r2-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp128r2-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp128r2-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp128r2-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp128r2-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp128r2-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp160k1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp160k1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp160k1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp160k1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp160k1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp160k1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp160k1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp160k1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp160r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp160r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp160r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp160r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp160r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp160r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp160r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp160r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp160r2-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp160r2-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp160r2-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp160r2-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp160r2-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp160r2-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp160r2-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp160r2-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp192k1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp192k1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp192k1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp192k1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp192k1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp192k1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp192k1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp192k1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp224k1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp224k1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp224k1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp224k1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp224k1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp224k1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp224k1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp224k1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp224r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp224r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp224r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp224r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp224r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp224r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp224r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp224r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp256k1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp256k1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp256k1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp256k1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp256k1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp256k1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp256k1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp256k1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp384r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp384r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp384r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp384r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp384r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp384r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp384r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp384r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp521r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp521r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp521r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp521r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp521r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp521r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/secp521r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/secp521r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect113r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect113r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect113r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect113r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect113r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect113r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect113r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect113r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect113r2-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect113r2-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect113r2-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect113r2-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect113r2-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect113r2-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect113r2-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect113r2-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect131r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect131r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect131r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect131r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect131r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect131r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect131r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect131r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect131r2-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect131r2-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect131r2-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect131r2-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect131r2-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect131r2-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect131r2-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect131r2-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect163k1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect163k1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect163k1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect163k1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect163k1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect163k1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect163k1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect163k1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect163r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect163r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect163r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect163r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect163r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect163r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect163r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect163r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect163r2-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect163r2-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect163r2-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect163r2-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect163r2-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect163r2-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect163r2-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect163r2-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect193r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect193r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect193r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect193r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect193r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect193r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect193r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect193r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect193r2-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect193r2-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect193r2-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect193r2-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect193r2-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect193r2-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect193r2-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect193r2-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect233k1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect233k1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect233k1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect233k1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect233k1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect233k1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect233k1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect233k1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect233r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect233r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect233r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect233r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect233r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect233r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect233r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect233r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect239k1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect239k1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect239k1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect239k1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect239k1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect239k1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect239k1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect239k1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect283k1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect283k1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect283k1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect283k1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect283k1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect283k1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect283k1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect283k1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect283r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect283r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect283r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect283r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect283r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect283r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect283r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect283r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect409k1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect409k1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect409k1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect409k1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect409k1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect409k1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect409k1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect409k1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect409r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect409r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect409r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect409r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect409r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect409r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect409r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect409r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect571k1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect571k1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect571k1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect571k1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect571k1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect571k1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect571k1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect571k1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect571r1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect571r1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect571r1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect571r1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect571r1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect571r1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/sect571r1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/sect571r1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls1-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls1-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls1-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls1-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls1-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls1-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls1-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls1-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls10-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls10-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls10-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls10-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls10-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls10-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls10-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls10-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls11-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls11-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls11-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls11-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls11-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls11-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls11-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls11-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls12-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls12-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls12-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls12-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls12-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls12-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls12-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls12-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls3-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls3-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls3-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls3-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls3-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls3-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls3-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls3-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls4-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls4-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls4-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls4-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls4-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls4-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls4-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls4-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls5-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls5-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls5-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls5-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls5-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls5-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls5-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls5-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls6-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls6-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls6-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls6-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls6-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls6-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls6-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls6-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls7-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls7-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls7-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls7-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls7-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls7-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls7-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls7-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls8-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls8-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls8-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls8-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls8-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls8-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls8-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls8-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls9-explicit.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls9-explicit.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls9-explicit.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls9-explicit.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls9-named.pem b/src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls9-named.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls9-named.pem rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_ecparam_data/valid/wap-wsg-idm-ecid-wtls9-named.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_genec.t b/src/openssl/openssl-1.1.1w/test/recipes/15-test_genec.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_genec.t rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_genec.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_genrsa.t b/src/openssl/openssl-1.1.1w/test/recipes/15-test_genrsa.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_genrsa.t rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_genrsa.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_mp_rsa.t b/src/openssl/openssl-1.1.1w/test/recipes/15-test_mp_rsa.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_mp_rsa.t rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_mp_rsa.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_mp_rsa_data/plain_text b/src/openssl/openssl-1.1.1w/test/recipes/15-test_mp_rsa_data/plain_text similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_mp_rsa_data/plain_text rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_mp_rsa_data/plain_text diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_out_option.t b/src/openssl/openssl-1.1.1w/test/recipes/15-test_out_option.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_out_option.t rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_out_option.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_rsa.t b/src/openssl/openssl-1.1.1w/test/recipes/15-test_rsa.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_rsa.t rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_rsa.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/15-test_rsapss.t b/src/openssl/openssl-1.1.1w/test/recipes/15-test_rsapss.t similarity index 81% rename from src/openssl/openssl-1.1.1t/test/recipes/15-test_rsapss.t rename to src/openssl/openssl-1.1.1w/test/recipes/15-test_rsapss.t index 65ec6f3d7..cea72ce98 100644 --- a/src/openssl/openssl-1.1.1t/test/recipes/15-test_rsapss.t +++ b/src/openssl/openssl-1.1.1w/test/recipes/15-test_rsapss.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2017-2023 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -16,7 +16,7 @@ use OpenSSL::Test::Utils; setup("test_rsapss"); -plan tests => 5; +plan tests => 7; #using test/testrsa.pem which happens to be a 512 bit RSA ok(run(app(['openssl', 'dgst', '-sign', srctop_file('test', 'testrsa.pem'), '-sha1', @@ -47,3 +47,11 @@ ok(run(app(['openssl', 'dgst', '-prverify', srctop_file('test', 'testrsa.pem'), srctop_file('test', 'testrsa.pem')])), "openssl dgst -prverify"); unlink 'testrsapss.sig'; + +ok(run(app(['openssl', 'genpkey', '-algorithm', 'RSA-PSS', '-pkeyopt', 'rsa_keygen_bits:1024', + '-pkeyopt', 'rsa_pss_keygen_md:SHA256', '-pkeyopt', 'rsa_pss_keygen_saltlen:10', + '-out', 'testrsapss.pem'])), + "openssl genpkey RSA-PSS with pss parameters"); +ok(run(app(['openssl', 'pkey', '-in', 'testrsapss.pem', '-pubout', '-text'])), + "openssl pkey, execute rsa_pub_encode with pss parameters"); +unlink 'testrsapss.pem'; diff --git a/src/openssl/openssl-1.1.1t/test/recipes/20-test_dgst.t b/src/openssl/openssl-1.1.1w/test/recipes/20-test_dgst.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/20-test_dgst.t rename to src/openssl/openssl-1.1.1w/test/recipes/20-test_dgst.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/20-test_enc.t b/src/openssl/openssl-1.1.1w/test/recipes/20-test_enc.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/20-test_enc.t rename to src/openssl/openssl-1.1.1w/test/recipes/20-test_enc.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/20-test_enc_more.t b/src/openssl/openssl-1.1.1w/test/recipes/20-test_enc_more.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/20-test_enc_more.t rename to src/openssl/openssl-1.1.1w/test/recipes/20-test_enc_more.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/20-test_passwd.t b/src/openssl/openssl-1.1.1w/test/recipes/20-test_passwd.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/20-test_passwd.t rename to src/openssl/openssl-1.1.1w/test/recipes/20-test_passwd.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/25-test_crl.t b/src/openssl/openssl-1.1.1w/test/recipes/25-test_crl.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/25-test_crl.t rename to src/openssl/openssl-1.1.1w/test/recipes/25-test_crl.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/25-test_d2i.t b/src/openssl/openssl-1.1.1w/test/recipes/25-test_d2i.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/25-test_d2i.t rename to src/openssl/openssl-1.1.1w/test/recipes/25-test_d2i.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/25-test_pkcs7.t b/src/openssl/openssl-1.1.1w/test/recipes/25-test_pkcs7.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/25-test_pkcs7.t rename to src/openssl/openssl-1.1.1w/test/recipes/25-test_pkcs7.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/25-test_req.t b/src/openssl/openssl-1.1.1w/test/recipes/25-test_req.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/25-test_req.t rename to src/openssl/openssl-1.1.1w/test/recipes/25-test_req.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/25-test_sid.t b/src/openssl/openssl-1.1.1w/test/recipes/25-test_sid.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/25-test_sid.t rename to src/openssl/openssl-1.1.1w/test/recipes/25-test_sid.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/25-test_verify.t b/src/openssl/openssl-1.1.1w/test/recipes/25-test_verify.t similarity index 97% rename from src/openssl/openssl-1.1.1t/test/recipes/25-test_verify.t rename to src/openssl/openssl-1.1.1w/test/recipes/25-test_verify.t index ffa48ed20..0084dd234 100644 --- a/src/openssl/openssl-1.1.1t/test/recipes/25-test_verify.t +++ b/src/openssl/openssl-1.1.1w/test/recipes/25-test_verify.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2015-2021 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2015-2023 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -27,7 +27,7 @@ sub verify { run(app([@args])); } -plan tests => 146; +plan tests => 148; # Canonical success ok(verify("ee-cert", "sslserver", ["root-cert"], ["ca-cert"]), @@ -409,3 +409,14 @@ SKIP: { "ED25519 signature"); } + +# Certificate Policies +ok(verify("ee-cert-policies", "sslserver", ["root-cert"], ["ca-pol-cert"], + "-policy_check", "-policy", "1.3.6.1.4.1.16604.998855.1", + "-explicit_policy"), + "Certificate policy"); + +ok(!verify("ee-cert-policies-bad", "sslserver", ["root-cert"], ["ca-pol-cert"], + "-policy_check", "-policy", "1.3.6.1.4.1.16604.998855.1", + "-explicit_policy"), + "Bad certificate policy"); diff --git a/src/openssl/openssl-1.1.1t/test/recipes/25-test_x509.t b/src/openssl/openssl-1.1.1w/test/recipes/25-test_x509.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/25-test_x509.t rename to src/openssl/openssl-1.1.1w/test/recipes/25-test_x509.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_afalg.t b/src/openssl/openssl-1.1.1w/test/recipes/30-test_afalg.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_afalg.t rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_afalg.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_engine.t b/src/openssl/openssl-1.1.1w/test/recipes/30-test_engine.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_engine.t rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_engine.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_evp.t b/src/openssl/openssl-1.1.1w/test/recipes/30-test_evp.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_evp.t rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_evp.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evpcase.txt b/src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evpcase.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evpcase.txt rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evpcase.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evpccmcavs.txt b/src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evpccmcavs.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evpccmcavs.txt rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evpccmcavs.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evpciph.txt b/src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evpciph.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evpciph.txt rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evpciph.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evpdigest.txt b/src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evpdigest.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evpdigest.txt rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evpdigest.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evpencod.txt b/src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evpencod.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evpencod.txt rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evpencod.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evpkdf.txt b/src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evpkdf.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evpkdf.txt rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evpkdf.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evpmac.txt b/src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evpmac.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evpmac.txt rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evpmac.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evppbe.txt b/src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evppbe.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evppbe.txt rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evppbe.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evppkey.txt b/src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evppkey.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evppkey.txt rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evppkey.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evppkey_ecc.txt b/src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evppkey_ecc.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_data/evppkey_ecc.txt rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_data/evppkey_ecc.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_extra.t b/src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_extra.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_evp_extra.t rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_evp_extra.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_pbelu.t b/src/openssl/openssl-1.1.1w/test/recipes/30-test_pbelu.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_pbelu.t rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_pbelu.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_pkey_meth.t b/src/openssl/openssl-1.1.1w/test/recipes/30-test_pkey_meth.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_pkey_meth.t rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_pkey_meth.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/30-test_pkey_meth_kdf.t b/src/openssl/openssl-1.1.1w/test/recipes/30-test_pkey_meth_kdf.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/30-test_pkey_meth_kdf.t rename to src/openssl/openssl-1.1.1w/test/recipes/30-test_pkey_meth_kdf.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/40-test_rehash.t b/src/openssl/openssl-1.1.1w/test/recipes/40-test_rehash.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/40-test_rehash.t rename to src/openssl/openssl-1.1.1w/test/recipes/40-test_rehash.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/60-test_x509_check_cert_pkey.t b/src/openssl/openssl-1.1.1w/test/recipes/60-test_x509_check_cert_pkey.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/60-test_x509_check_cert_pkey.t rename to src/openssl/openssl-1.1.1w/test/recipes/60-test_x509_check_cert_pkey.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/60-test_x509_dup_cert.t b/src/openssl/openssl-1.1.1w/test/recipes/60-test_x509_dup_cert.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/60-test_x509_dup_cert.t rename to src/openssl/openssl-1.1.1w/test/recipes/60-test_x509_dup_cert.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/60-test_x509_store.t b/src/openssl/openssl-1.1.1w/test/recipes/60-test_x509_store.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/60-test_x509_store.t rename to src/openssl/openssl-1.1.1w/test/recipes/60-test_x509_store.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/60-test_x509_time.t b/src/openssl/openssl-1.1.1w/test/recipes/60-test_x509_time.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/60-test_x509_time.t rename to src/openssl/openssl-1.1.1w/test/recipes/60-test_x509_time.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_asyncio.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_asyncio.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_asyncio.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_asyncio.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_bad_dtls.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_bad_dtls.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_bad_dtls.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_bad_dtls.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_clienthello.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_clienthello.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_clienthello.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_clienthello.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_comp.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_comp.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_comp.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_comp.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_key_share.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_key_share.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_key_share.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_key_share.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_packet.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_packet.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_packet.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_packet.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_recordlen.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_recordlen.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_recordlen.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_recordlen.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_renegotiation.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_renegotiation.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_renegotiation.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_renegotiation.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_servername.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_servername.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_servername.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_servername.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_sslcbcpadding.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_sslcbcpadding.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_sslcbcpadding.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_sslcbcpadding.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_sslcertstatus.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_sslcertstatus.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_sslcertstatus.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_sslcertstatus.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_sslextension.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_sslextension.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_sslextension.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_sslextension.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_sslmessages.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_sslmessages.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_sslmessages.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_sslmessages.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_sslrecords.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_sslrecords.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_sslrecords.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_sslrecords.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_sslsessiontick.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_sslsessiontick.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_sslsessiontick.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_sslsessiontick.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_sslsigalgs.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_sslsigalgs.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_sslsigalgs.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_sslsigalgs.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_sslsignature.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_sslsignature.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_sslsignature.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_sslsignature.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_sslskewith0p.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_sslskewith0p.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_sslskewith0p.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_sslskewith0p.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_sslversions.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_sslversions.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_sslversions.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_sslversions.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_sslvertol.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_sslvertol.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_sslvertol.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_sslvertol.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_tls13alerts.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_tls13alerts.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_tls13alerts.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_tls13alerts.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_tls13cookie.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_tls13cookie.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_tls13cookie.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_tls13cookie.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_tls13downgrade.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_tls13downgrade.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_tls13downgrade.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_tls13downgrade.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_tls13hrr.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_tls13hrr.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_tls13hrr.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_tls13hrr.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_tls13kexmodes.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_tls13kexmodes.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_tls13kexmodes.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_tls13kexmodes.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_tls13messages.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_tls13messages.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_tls13messages.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_tls13messages.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_tls13psk.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_tls13psk.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_tls13psk.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_tls13psk.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_tlsextms.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_tlsextms.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_tlsextms.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_tlsextms.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_verify_extra.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_verify_extra.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_verify_extra.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_verify_extra.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/70-test_wpacket.t b/src/openssl/openssl-1.1.1w/test/recipes/70-test_wpacket.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/70-test_wpacket.t rename to src/openssl/openssl-1.1.1w/test/recipes/70-test_wpacket.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_ca.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_ca.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_ca.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_ca.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_cipherbytes.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_cipherbytes.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_cipherbytes.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_cipherbytes.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_cipherlist.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_cipherlist.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_cipherlist.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_cipherlist.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_ciphername.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_ciphername.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_ciphername.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_ciphername.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_cms.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_cms.t similarity index 98% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_cms.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_cms.t index 79ae1308e..544d4466b 100644 --- a/src/openssl/openssl-1.1.1t/test/recipes/80-test_cms.t +++ b/src/openssl/openssl-1.1.1w/test/recipes/80-test_cms.t @@ -288,6 +288,13 @@ my @smime_cms_tests = ( "-secretkey", "000102030405060708090A0B0C0D0E0F", "-out", "smtst.txt" ] ], + [ "encrypted content test streaming PEM format -noout, 128 bit AES key", + [ "-EncryptedData_encrypt", "-in", $smcont, "-outform", "PEM", + "-aes128", "-secretkey", "000102030405060708090A0B0C0D0E0F", + "-stream", "-noout" ], + [ "-help" ] + ], + ); my @smime_cms_comp_tests = ( @@ -590,7 +597,7 @@ with({ exit_checker => sub { return shift == 6; } }, sub { ok(run(app(['openssl', 'cms', '-encrypt', '-in', srctop_file("test", "smcont.txt"), - '-stream', '-recip', + '-aes128', '-stream', '-recip', srctop_file("test/smime-certs", "badrsa.pem"), ])), "Check failure during BIO setup with -stream is handled correctly"); diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_cms_data/bad_signtime_attr.cms b/src/openssl/openssl-1.1.1w/test/recipes/80-test_cms_data/bad_signtime_attr.cms similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_cms_data/bad_signtime_attr.cms rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_cms_data/bad_signtime_attr.cms diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_cms_data/ct_multiple_attr.cms b/src/openssl/openssl-1.1.1w/test/recipes/80-test_cms_data/ct_multiple_attr.cms similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_cms_data/ct_multiple_attr.cms rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_cms_data/ct_multiple_attr.cms diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_cms_data/no_ct_attr.cms b/src/openssl/openssl-1.1.1w/test/recipes/80-test_cms_data/no_ct_attr.cms similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_cms_data/no_ct_attr.cms rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_cms_data/no_ct_attr.cms diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_cms_data/no_md_attr.cms b/src/openssl/openssl-1.1.1w/test/recipes/80-test_cms_data/no_md_attr.cms similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_cms_data/no_md_attr.cms rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_cms_data/no_md_attr.cms diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_cmsapi.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_cmsapi.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_cmsapi.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_cmsapi.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_ct.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_ct.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_ct.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_ct.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_dane.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_dane.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_dane.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_dane.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_dtls.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_dtls.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_dtls.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_dtls.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_dtls_mtu.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_dtls_mtu.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_dtls_mtu.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_dtls_mtu.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_dtlsv1listen.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_dtlsv1listen.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_dtlsv1listen.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_dtlsv1listen.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_ocsp.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_ocsp.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_ocsp.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_ocsp.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_ocsp_data/cert.pem b/src/openssl/openssl-1.1.1w/test/recipes/80-test_ocsp_data/cert.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_ocsp_data/cert.pem rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_ocsp_data/cert.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_ocsp_data/key.pem b/src/openssl/openssl-1.1.1w/test/recipes/80-test_ocsp_data/key.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_ocsp_data/key.pem rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_ocsp_data/key.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_pkcs12.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_pkcs12.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_pkcs12.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_pkcs12.t diff --git a/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree.t new file mode 100644 index 000000000..1ddd65e89 --- /dev/null +++ b/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree.t @@ -0,0 +1,43 @@ +#! /usr/bin/env perl +# Copyright 2023 The OpenSSL Project Authors. All Rights Reserved. +# +# Licensed under the Apache License 2.0 (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html + + +use strict; +use warnings; + +use POSIX; +use OpenSSL::Test qw/:DEFAULT srctop_file with data_file/; + +use OpenSSL::Test::Utils; +use OpenSSL::Glob; + +setup("test_policy_tree"); + +plan skip_all => "No EC support" if disabled("ec"); + +plan tests => 2; + +# The small pathological tree is expected to work +my $small_chain = srctop_file("test", "recipes", "80-test_policy_tree_data", + "small_policy_tree.pem"); +my $small_leaf = srctop_file("test", "recipes", "80-test_policy_tree_data", + "small_leaf.pem"); + +ok(run(app(["openssl", "verify", "-CAfile", $small_chain, + "-policy_check", $small_leaf])), + "test small policy tree"); + +# The large pathological tree is expected to fail +my $large_chain = srctop_file("test", "recipes", "80-test_policy_tree_data", + "large_policy_tree.pem"); +my $large_leaf = srctop_file("test", "recipes", "80-test_policy_tree_data", + "large_leaf.pem"); + +ok(!run(app(["openssl", "verify", "-CAfile", $large_chain, + "-policy_check", $large_leaf])), + "test large policy tree"); diff --git a/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree_data/large_leaf.pem b/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree_data/large_leaf.pem new file mode 100644 index 000000000..39ed6a7fa --- /dev/null +++ b/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree_data/large_leaf.pem @@ -0,0 +1,11 @@ +-----BEGIN CERTIFICATE----- +MIIBmTCCAT+gAwIBAgIBADAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgMTAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowGjEYMBYGA1UE +AxMPd3d3LmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEp6Qe +jrN6A0ZjqaFbX/zO01aVYXH5kthBDTEO/fU4H0CdwqrfyMsFrObwssrTJcsmSFKP +x1FYr8wT2wCACs19lqN4MHYwDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMAwGA1UdEwEB/wQCMAAwGgYDVR0RBBMwEYIPd3d3LmV4YW1wbGUuY29t +MCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMAoGCCqGSM49 +BAMCA0gAMEUCIDGT8SVBkWJEZ2EzXm8M895NrNRmfc8uoheP0KKv+ndHAiEA2Onr +20J+zTaR7vONY/1DleMm7fGY3UxTobSHSvOKbfY= +-----END CERTIFICATE----- diff --git a/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree_data/large_policy_tree.pem b/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree_data/large_policy_tree.pem new file mode 100644 index 000000000..5cd31c355 --- /dev/null +++ b/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree_data/large_policy_tree.pem @@ -0,0 +1,434 @@ +-----BEGIN CERTIFICATE----- +MIICEDCCAbagAwIBAgIBATAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgMjAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowFjEUMBIGA1UE +AxMLUG9saWN5IENBIDEwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATgyLz1C0dD +ib5J/QmoE4d+Nf5yvvlzjVZHWIu7iCMEqK67cnA1RtMp1d0xdiNQS6si3ExNPBF+ +ELdkP0E6x26Jo4HyMIHvMA4GA1UdDwEB/wQEAwICBDATBgNVHSUEDDAKBggrBgEF +BQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSs+ml5upH1h25oUB0Ep4vd +SUdZ/DAlBgNVHSAEHjAcMAwGCmCGSAFlAwIBMAEwDAYKYIZIAWUDAgEwAjBxBgNV +HSEEajBoMBgGCmCGSAFlAwIBMAEGCmCGSAFlAwIBMAEwGAYKYIZIAWUDAgEwAQYK +YIZIAWUDAgEwAjAYBgpghkgBZQMCATACBgpghkgBZQMCATABMBgGCmCGSAFlAwIB +MAIGCmCGSAFlAwIBMAIwCgYIKoZIzj0EAwIDSAAwRQIhAOME8j1/cMogNnuNCb0O +RIOE9pLP4je78KJiP8CZm0iOAiALr8NI67orD/VpfRptkjCmOd7rTWMVOOJfBr6N +VJFLjw== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICDzCCAbagAwIBAgIBAjAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgMzAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowFjEUMBIGA1UE +AxMLUG9saWN5IENBIDIwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASIdzU/FF3Y +rTsTX04fRIN2yrZwxvOAfZ6DuEgKRxEimJx1nCyETuMmfDowm52mx/Cyk08xorp8 +PhGEbacMd9kio4HyMIHvMA4GA1UdDwEB/wQEAwICBDATBgNVHSUEDDAKBggrBgEF +BQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSwok/8RfJbVGTzyF5jhWLc +hO7pcDAlBgNVHSAEHjAcMAwGCmCGSAFlAwIBMAEwDAYKYIZIAWUDAgEwAjBxBgNV +HSEEajBoMBgGCmCGSAFlAwIBMAEGCmCGSAFlAwIBMAEwGAYKYIZIAWUDAgEwAQYK +YIZIAWUDAgEwAjAYBgpghkgBZQMCATACBgpghkgBZQMCATABMBgGCmCGSAFlAwIB +MAIGCmCGSAFlAwIBMAIwCgYIKoZIzj0EAwIDRwAwRAIgYVF7bXxUuOzAZF6SmeIJ +s+iL15bLSQ2rW7QDc6QYp9MCIAup6YokIcr8JaGttHmLaKbASQLxYDGHhfFIVZuI +BDvT +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEDCCAbagAwIBAgIBAzAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgNDAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowFjEUMBIGA1UE +AxMLUG9saWN5IENBIDMwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQ38Llxxj32 +H3NN4Z1V8IuRKXLNhdU4z+NbT1rahusEyAHF+z9VTjim+HHfqFKV1QyNOJZ4rMA9 +J/gODWsNCT4po4HyMIHvMA4GA1UdDwEB/wQEAwICBDATBgNVHSUEDDAKBggrBgEF +BQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS11YgFNKTx3a6kssIijnA9 +DiOhoTAlBgNVHSAEHjAcMAwGCmCGSAFlAwIBMAEwDAYKYIZIAWUDAgEwAjBxBgNV +HSEEajBoMBgGCmCGSAFlAwIBMAEGCmCGSAFlAwIBMAEwGAYKYIZIAWUDAgEwAQYK +YIZIAWUDAgEwAjAYBgpghkgBZQMCATACBgpghkgBZQMCATABMBgGCmCGSAFlAwIB +MAIGCmCGSAFlAwIBMAIwCgYIKoZIzj0EAwIDSAAwRQIhAJXNZHMpvlnMfxhcG6EF +Vw1pEXJ+iZnWT+Yu02a2zhamAiAiOKNhALBw/iKhQrwLo0cdx6UEfUKbaqTSGiax +tHUylA== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEDCCAbagAwIBAgIBBDAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgNTAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowFjEUMBIGA1UE +AxMLUG9saWN5IENBIDQwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATo81HWQ/we +egmoO/LMntQK1VQ9YzU627nblv/XWoOjEd/tBeE8+Un4jUnhZqNrP2TAzy48jEaT +1DShCQNQGek7o4HyMIHvMA4GA1UdDwEB/wQEAwICBDATBgNVHSUEDDAKBggrBgEF +BQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS6/F38QgbZSHib0W1XtMfs +4O5DTDAlBgNVHSAEHjAcMAwGCmCGSAFlAwIBMAEwDAYKYIZIAWUDAgEwAjBxBgNV +HSEEajBoMBgGCmCGSAFlAwIBMAEGCmCGSAFlAwIBMAEwGAYKYIZIAWUDAgEwAQYK +YIZIAWUDAgEwAjAYBgpghkgBZQMCATACBgpghkgBZQMCATABMBgGCmCGSAFlAwIB +MAIGCmCGSAFlAwIBMAIwCgYIKoZIzj0EAwIDSAAwRQIgXMYCQWi5/6iQw+zqyEav +CE7kOfTpm9GN4bZX5Eau5AACIQD0rDZwsjWf6hI2Hn8IlpwYVVC9bpxrAM/JmYuu +79V/uw== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEDCCAbagAwIBAgIBBTAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgNjAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowFjEUMBIGA1UE +AxMLUG9saWN5IENBIDUwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARsPMjOkmzJ +2jwT30mKUvAFYVgOlgcoXxYr61p54mbQMmmH49ABmJQMu5rjwjwYlYA3UzbEN9ki +hMsJz/4JIrJGo4HyMIHvMA4GA1UdDwEB/wQEAwICBDATBgNVHSUEDDAKBggrBgEF +BQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQeflZRWUze+7jne9MkYYy5 +iWFgJDAlBgNVHSAEHjAcMAwGCmCGSAFlAwIBMAEwDAYKYIZIAWUDAgEwAjBxBgNV +HSEEajBoMBgGCmCGSAFlAwIBMAEGCmCGSAFlAwIBMAEwGAYKYIZIAWUDAgEwAQYK +YIZIAWUDAgEwAjAYBgpghkgBZQMCATACBgpghkgBZQMCATABMBgGCmCGSAFlAwIB +MAIGCmCGSAFlAwIBMAIwCgYIKoZIzj0EAwIDSAAwRQIhAIN6BjMnPlixl3i6Z1Xa +pZQt52MOCHPm0XzXDn2XlC9+AiAn146u8rbppdEGMFr21vfFZaktwEb0cZkC9fBp +S1uKwQ== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEDCCAbagAwIBAgIBBjAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgNzAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowFjEUMBIGA1UE +AxMLUG9saWN5IENBIDYwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASVmpozZzxX +f6rFinkqS0y8sfbOwcM0gNuR0x83mmZH5+a8W4ug5W80QiBaS3rHtwTsFHpCeQKq +eJvfb/esgJu8o4HyMIHvMA4GA1UdDwEB/wQEAwICBDATBgNVHSUEDDAKBggrBgEF +BQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQPuF2sXR0vOHJynh57qefK ++h7RGDAlBgNVHSAEHjAcMAwGCmCGSAFlAwIBMAEwDAYKYIZIAWUDAgEwAjBxBgNV +HSEEajBoMBgGCmCGSAFlAwIBMAEGCmCGSAFlAwIBMAEwGAYKYIZIAWUDAgEwAQYK +YIZIAWUDAgEwAjAYBgpghkgBZQMCATACBgpghkgBZQMCATABMBgGCmCGSAFlAwIB +MAIGCmCGSAFlAwIBMAIwCgYIKoZIzj0EAwIDSAAwRQIgDX0jHPq1alZoMbPDmbZp +QYuM9UQagQ5KJgVU1B0Mh2ECIQCtdyfT2h5jZvz3lLKkQ9a6LddIuqsyNKDAxbpb +PlBOOA== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEDCCAbagAwIBAgIBBzAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgODAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowFjEUMBIGA1UE +AxMLUG9saWN5IENBIDcwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASb+9fN9RLe +SHGynsKXhLWGhIS/kZ6Yl97+h23xpjLaZUOzhn5VafXdmLrQ4BmqSMHqIKzcc8IB +STV3NwO4NxPBo4HyMIHvMA4GA1UdDwEB/wQEAwICBDATBgNVHSUEDDAKBggrBgEF +BQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTBF9x+MrsyqoCaTQ2kB7Bn +tpK2qDAlBgNVHSAEHjAcMAwGCmCGSAFlAwIBMAEwDAYKYIZIAWUDAgEwAjBxBgNV +HSEEajBoMBgGCmCGSAFlAwIBMAEGCmCGSAFlAwIBMAEwGAYKYIZIAWUDAgEwAQYK +YIZIAWUDAgEwAjAYBgpghkgBZQMCATACBgpghkgBZQMCATABMBgGCmCGSAFlAwIB +MAIGCmCGSAFlAwIBMAIwCgYIKoZIzj0EAwIDSAAwRQIhAI37Di/5MrSj2clr+2pX +iXzeDIvlaxzVetyH3ibUZZBSAiA41aPIssHi9evv2mZonEvXY8g+DKbh/3L2mSub +/AyLoA== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICETCCAbagAwIBAgIBCDAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgOTAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowFjEUMBIGA1UE +AxMLUG9saWN5IENBIDgwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASrRS12/zEP +RUNye9SLadN4xK+xfTwyXfxeC+jam+J98lOMcHz6abnLpk5tJ7wab4Pkygsbj1V2 +STxeW+YH23dto4HyMIHvMA4GA1UdDwEB/wQEAwICBDATBgNVHSUEDDAKBggrBgEF +BQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQYpYFLhosbir7KoyYdehsQ +6DdLfzAlBgNVHSAEHjAcMAwGCmCGSAFlAwIBMAEwDAYKYIZIAWUDAgEwAjBxBgNV +HSEEajBoMBgGCmCGSAFlAwIBMAEGCmCGSAFlAwIBMAEwGAYKYIZIAWUDAgEwAQYK +YIZIAWUDAgEwAjAYBgpghkgBZQMCATACBgpghkgBZQMCATABMBgGCmCGSAFlAwIB +MAIGCmCGSAFlAwIBMAIwCgYIKoZIzj0EAwIDSQAwRgIhAPTCN+zWFG2cFzJ+nlfg +JMY4U2e3vqTQmFeBXYlBASb9AiEA0KvsyNwloF1YeeaYcP5iHoRGRo8UMD3QWKEE +vWI14Uk= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEDCCAbegAwIBAgIBCTAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMTAwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBYxFDASBgNV +BAMTC1BvbGljeSBDQSA5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEoR4udEgt +usb9f946+Xznm7Q3OaW4DTZjO7wqX1I+27zDp0JrUbCZwtm0Cw+pYkG5kPpNcFTK +7yG3YgqM1sT+6aOB8jCB7zAOBgNVHQ8BAf8EBAMCAgQwEwYDVR0lBAwwCgYIKwYB +BQUHAwEwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUjgtOHvFBcUQ03AKUbvuJ +IWO5lzUwJQYDVR0gBB4wHDAMBgpghkgBZQMCATABMAwGCmCGSAFlAwIBMAIwcQYD +VR0hBGowaDAYBgpghkgBZQMCATABBgpghkgBZQMCATABMBgGCmCGSAFlAwIBMAEG +CmCGSAFlAwIBMAIwGAYKYIZIAWUDAgEwAgYKYIZIAWUDAgEwATAYBgpghkgBZQMC +ATACBgpghkgBZQMCATACMAoGCCqGSM49BAMCA0cAMEQCICIboTAzG1DvCY/0tA/o +l18zrW9qKVnt4mxih5JQe4fOAiBOF2ZeUT2/ZtdFhZmg+zl/fGrQ1xEx09/S956k +Ig4S9Q== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEjCCAbigAwIBAgIBCjAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMTEwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAxMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABLxetqJp +VR6apJytboxFCCooQ7jVcc7yoHhjlH8HsaJS3GrWpyMgiqOfyWt4KFMynKkgCU1K +1QcU9aC5BfRQpyWjgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFD6etMtD6Qpa7TjVQBgV +/4PhZP4DMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNIADBFAiEA+5uiOjJoq5nU7lKN +rZtBdYNqUKvHuYB+jiNEfWvxx2cCIFZEJCGw8fzqkAyGWkLe10w8PUzPM64nh757 +pEtxCzZh +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEjCCAbigAwIBAgIBCzAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMTIwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAxMTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPQuXEeo +BrbyENdz9HqAoWMSQx1BErsUcQaneq3L0/VHHJBPKihb8s4nB/2yZaEarr8LFAvi +ofx+4egydkP0mJ+jgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFIoC4qL79Uy3+m26Y+ch ++sE6gCOMMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNIADBFAiEAx/vMDhaH4EYTM2v9 +GeM1xTP9pNRgak69JQLKLu1VM1YCIF1RYC8Fma5Bc0cZAYY+Gj7dEf9qHj1TODA5 +C9es2CPY +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICETCCAbigAwIBAgIBDDAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMTMwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAxMjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABDlEv73o +ej8Xvc3UodhSHkech80DbuBKdeldOTrRp6ZaVUP3vMgjNUJkh4WkvP3UVTe5SV4D +zQXDIiwAEJu+zdmjgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFCAn0wYXyRdliJOBFvvJ +eZoGTiyOMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNHADBEAiAo2PPmLBZpcT0bst/C +SXvnl3gztIZu89O1MKsNwFcM9QIgIzqZx/o9MF/fP7zbLWErVcUQViOGiCRBLVh7 +ppb7CoA= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEzCCAbigAwIBAgIBDTAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMTQwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAxMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABB8mgAoN +rmFo937IBKXKuxHedUjOL7y3cpDYD1H3C4HRDBQDVOL31lC5kJUhS4HBLvJQwebR +2kW35E3AnhbY/oKjgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFBGbO20Xp/q0fPChjLHL +WuJwSNc1MCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNJADBGAiEA3qGzdevdYfmiSBj9 +t9oE8hfEP+APqGiStlOLKD6xVK0CIQDq9cVa2KXMEz7YwmMO3lxoQFDPEXftbRaC +edFB7q/YXg== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEzCCAbigAwIBAgIBDjAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMTUwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAxNDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABHDiOMtx +5sfJs/WDnw0xS5NYlkbgy2eOZHAmC/jhRp6cjShZrr2/S4IJsH8B2VMcYAHgum6a +eMjqWFIMxIjN5xyjgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOWtYUeAPk66m0o6Z7ax +1RN42wmkMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNJADBGAiEA+AcazVKKPfqkpcJw +rkXWIyZrTe+1PNETQzaJCooGNGkCIQDdfHf1I78e+ogaDcjkDe0s3R9VhkvjCty6 +uKKFtNGHMQ== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEjCCAbigAwIBAgIBDzAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMTYwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAxNTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABKCkdSYz ++zyHItG2rQSyCh018b4bu9Zrw8nzkCBgkT2IyycNtpabYkWhxcEL29ZFqBnB+l7N +5fYmHl5CmflJPh+jgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNanrmjMEN3PndPGeucm +mST9ucNWMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNIADBFAiAFt48yhTTv0rP29N8H +yRhAQGfnV4t1b8JucixLSfe32QIhAOef6iiwLxbBOMUn5ZN/WAK5TERem6DLSzWN +/PTXHAAt +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICETCCAbigAwIBAgIBEDAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMTcwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAxNjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABH5txyDp +DfRsIyYPTAQ+fuxk08E3/tpChVWoog4XQvod61wcUO1/nhoTGNKZZOhN5uhKWJWb +1futz+XxV2QxTCyjgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFHSlcxgh3gxgVag1JvAk +zbHlgMbEMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNHADBEAiA9Ee47PnxqW0QmELB+ +dd90Fz8wcQFZlNmkPW4Oq2xr/wIgGlxfutQq7l3TU5hyyO0Lh01AHn2DC5KPFPwE +l8S9VeY= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEzCCAbigAwIBAgIBETAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMTgwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAxNzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABAJvlQKB +gJZ+Tysa6iwhllPXCeJrkan6WUm+oqOIY02/SpI5Mba1Kwg73Fsswx3Eywt8sxA2 +4fiaqwg+xZoil06jgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFM/udZ1ib8qDfShdfdfX +8gL6w7VMMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNJADBGAiEA6kK7vAYF2TPXzywn ++SDLsiGbU6Sj8aTtsJZf9DmhKr4CIQCt4FfI7IWinqNlURXe4HSBPsekcQkOpwjK +PuJRx3fuFw== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEzCCAbigAwIBAgIBEjAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMTkwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAxODBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEerejCw +gAy7GecLVbQw6eL8k1cGWwLt+wl3sn8he8fA0I+KoFfcOCgtvOF59RMXnjZ1+7OC +kz3mNDVSbKY6KO2jgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFM0OUOtOKTcTMRXGQwbw +GOoLCOEYMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNJADBGAiEAziPsm2dArB/3ILqm +04mZl8/DX6dB4EmU+FPF2UpAeLwCIQCofc27tisg3L1mPNeiwZ26+rDe5SdixiUc +S3KWOJ1cTg== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEjCCAbigAwIBAgIBEzAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMjAwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAxOTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPmB5spr +C64/21ssufcbshGnQtAWbk2o2l+ej6pMMPIZhmNyvM450L3dFX12UBNcaERCABmr +BEJL7IubGWE9CVOjgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJCh/1mh0Hl2+LE0osUv +OJCmV3IYMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNIADBFAiEAtxMIkO4xCRSQCU6d +0jt+Go4xj/R4bQFWbZrlS9+fYUECICuWAgT3evhoo34o04pU84UaYOvO5V0GJsTt +hrS1v3hT +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEzCCAbigAwIBAgIBFDAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMjEwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAyMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABHdvTDYo +M/padIV3LdTnrzwMy1HSTeJ2aTUalkVV17uL2i3C51rWM2pl+qlRordq6W2GboMz +/+78HhKMcCrMWKCjgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFAbZN0eSPw3MyvWIEix6 +GnYRIiFkMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNJADBGAiEAlaapLXHwGNkeEwc0 +jsY2XhuR3RlVhD4T2k/QyJRQ0s0CIQD5E+e+5QTe5s+534Lwcxe2iFb3oFm+8g81 +OBVtfmSMGg== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEjCCAbigAwIBAgIBFTAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMjIwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAyMTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABLTu8R5Y +7Po4W05hWperfod6mXezwWgAVk2RW2EG2vy4NeZeML2EFhg2geNc6N5Goep9t7pn +d+BtORRvR75oCDijgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNs0d2vXsRj3YYsBrWDo +jrvcEA+eMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNIADBFAiBB603Ui+L60FcUWPrB +Ch06hmgle2u0P07Go/XjTk00ZQIhALGhNArJFEY0gu+XUtyKEZt7BZ0/sh5dtLDP +xkRgR6Wh +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEzCCAbigAwIBAgIBFjAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMjMwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAyMjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPXpzC9/ +KGblQyjhdcS0a8KBPAiS7c0n+V0i9JItbyze38Ncrctp0wIGHZLjRoB4DZYX1I8e +K5C7KVeUPEE9eOGjgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFISsw9orkX/cBVWcK5KA +//kldz8HMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNJADBGAiEA1gazdApLS91ql8Am +4gb4Ku7Lgll4jV+BrLkbABE2cI0CIQCEH1GUJ6ARJB1GdcHrPyaLgeZ5jV2p63UW +UV2QL6aETA== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEjCCAbigAwIBAgIBFzAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMjQwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAyMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABKdweprb +RZmuUk4og1Xa9Skb1vu7jsLozlm9CtDhKLbJ+cDX/VeKj/b8FuvakBO3L1QV5XU0 +iFswsIVBVZ3m+TyjgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFPgcEbHfKHt0o/PCS0kD +XWW9XkqMMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNIADBFAiEA9XDj0w5qMS/tLlr9 +Z2j8JtVR4M7pF/Wx2U43vmPFJEACIBAlAiUnCm1Nfj16t2cojrW+m2t1cU80ihmj +Ld1U+dRD +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICETCCAbigAwIBAgIBGDAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMjUwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAyNDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABAq2PphK +4oVsc+ml3zskBLiMa+dz64k+PrrfKIGSG2Ri5Du/orj0dO9639LeCkkMwWpXAfSx +wxHHQX0I1KwsudGjgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFEqcfkso+ynKq2eFaJy8 +mzNBdN2PMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNHADBEAiBZ71jDD33HFFqMkLAW +gTAGMmzh9b/vZ8jAclPDKHRghQIgf2GBOF1eEF8Ino9F1n1ia5c3EryvXnvVoklw +cjMIQ5g= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEjCCAbigAwIBAgIBGTAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMjYwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAyNTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJRoDkj7 +iDlIygt4YmMgw4pizu2sx4436MGtw5fFHhjy7T+pPMGjYFg3dixxUOu1NHORpdJq +8Y7SN8p8Y0XsDpijgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOutMoKSOv5lEGZaqYZM +zNFwpX3KMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNIADBFAiEAks62lsAHmN6xkZsF +6ocGONpH/XmHLpoO6RfMoRCnWkICIFNFD+W6pSSvdDB96sn8jnZ7W/Y0hyLzscBO +WtkzqqJJ +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEzCCAbigAwIBAgIBGjAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMjcwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAyNjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABE3seRj5 +LVNKi9sZk7qv5cBVUG8BLXXfDRUhCUzT10YAU1J0yd2wmLTbwPyYm65GaecvAHSR +SExOzX6bC35nNt6jgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNx5XhDdoflDgPrW/HyU +tCokuJ0AMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNJADBGAiEApAQVb0KQedyAw1SJ +J8At4uxxm2b8W13s6ENapxw+lwwCIQC7326NFPsDjbfBKhFDQhCIMkAkYq2wzRJ7 +ubTwkdT19g== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEzCCAbigAwIBAgIBGzAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMjgwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAyNzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABC+FQF2E +TrZ4YGNyxFxzpTQBjlu9QUrwgHzabAn47toqRkWUGAS68jBfSdR+j2c7/oehQHhO +relHcbQilhZnh4ijgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFIOlwsa4FjZWhzQYTAY3 +c2TSYhsEMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNJADBGAiEAwxNBi+8baAU76yng ++XvMpY62aqPO4bAe/uedaxBb2jMCIQDJHXqibgIAm1T4/YHimllVlLQudQL5OkbF +Krj3uVHtBg== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEjCCAbigAwIBAgIBHDAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMjkwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAyODBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABBmhjGvk +C3QfSVdY5zuHEY4Rf3eKVro6vcKymgdBPFjjDggZNktR3OMnayCabJB51g2VL7Fg +MegdwzJWzPvQreyjgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFEvevGIfitXek0IStYIR +5ne2SkJwMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNIADBFAiBzlv0TggDJWUWx0UHl +cqxuMpoNdy+ifizQIlcjWcrzvgIhAJdQfkPaZdc4/j/HfGaVNN9InJuBWGrPYU6A +iwsSB0jY +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEzCCAbigAwIBAgIBHTAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMzAwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAyOTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCrC5p+Z +ywMukm1LRuXeJ5V1M6V+8A8PjqB3tgHVeEn973HOfia8lt2/7EoKaLKzP8A7D3eC +aBJUmTgHauaolYOjgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFGG5D5h1FRA+aZMbSXfZ +Mp8pjYUEMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNJADBGAiEAnI2IhyXtBCRiv+Xs +EzsO497oVf1U8SJiVR8SaEx0gzgCIQC0+un/Hcb0OWvpvoeHKcRi7e8SZkX+vn2i +u+KsPqlfzA== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEjCCAbigAwIBAgIBHjAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMzEwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAzMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABHg1qbhT +bpV0agLQkk6di7EdwrrqIn7yCiBCfPwoDI7czY1bHwkR2E8EdrG4ZLBHHFXYNHau +kEo9nueljxbA6MGjgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFGXSqDk/Zov8a62kkXDr +8YhtqdkTMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNIADBFAiEA1D2Fm3D8REQtj8o4 +ZrnDyWam0Rx6cEMsvmeoafOBUeUCIBW0IoUYmF46faRQWKN7R8wnvbjUw0bxztzy +okUR5Pma +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEjCCAbigAwIBAgIBHzAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxQb2xpY3kg +Q0EgMzEwIBcNMDAwMTAxMDAwMDAwWhgPMjEwMDAxMDEwMDAwMDBaMBcxFTATBgNV +BAMTDFBvbGljeSBDQSAzMTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIwGMmHl +/QJSpu6KHakSe4gkf3L+NpsrtQpxu6sNfmSjO++dGv6sj2v3+DZNeyagVUJRVHaD +IZzpoyVVrBBO6vijgfIwge8wDgYDVR0PAQH/BAQDAgIEMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFA+f9g1sP2kM5sOT/8Ge +IDKq5FcUMCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMHEG +A1UdIQRqMGgwGAYKYIZIAWUDAgEwAQYKYIZIAWUDAgEwATAYBgpghkgBZQMCATAB +BgpghkgBZQMCATACMBgGCmCGSAFlAwIBMAIGCmCGSAFlAwIBMAEwGAYKYIZIAWUD +AgEwAgYKYIZIAWUDAgEwAjAKBggqhkjOPQQDAgNIADBFAiEAvQlbAmF3pS041Zo2 +eHrxMO3j8thB+XqHU8RatCZ60WACIG1vUFPH7UwzTTann7Sgp4s+Gd/jLOkrJnEk +W3De9dSX +-----END CERTIFICATE----- diff --git a/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree_data/small_leaf.pem b/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree_data/small_leaf.pem new file mode 100644 index 000000000..c40ddff9e --- /dev/null +++ b/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree_data/small_leaf.pem @@ -0,0 +1,11 @@ +-----BEGIN CERTIFICATE----- +MIIBmjCCAT+gAwIBAgIBADAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgMTAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowGjEYMBYGA1UE +AxMPd3d3LmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAER7oh +z+MnwilNhyEB2bZTuYBpeiwW4QlpYZU6b/8uWOldyMXCaPmaXwY60nrMznfFJX6F +h8dC6XIzvQmjUMdSoqN4MHYwDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoGCCsG +AQUFBwMBMAwGA1UdEwEB/wQCMAAwGgYDVR0RBBMwEYIPd3d3LmV4YW1wbGUuY29t +MCUGA1UdIAQeMBwwDAYKYIZIAWUDAgEwATAMBgpghkgBZQMCATACMAoGCCqGSM49 +BAMCA0kAMEYCIQC2km5juUULIRYsRgHuLFEiABBR0pDAyTbl9LRjlkSeEQIhAO9b +ye60dMNbhY1OOzrr4mDRv0tuNmbGBErcFs61YZkC +-----END CERTIFICATE----- diff --git a/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree_data/small_policy_tree.pem b/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree_data/small_policy_tree.pem new file mode 100644 index 000000000..040542d16 --- /dev/null +++ b/src/openssl/openssl-1.1.1w/test/recipes/80-test_policy_tree_data/small_policy_tree.pem @@ -0,0 +1,70 @@ +-----BEGIN CERTIFICATE----- +MIICETCCAbagAwIBAgIBATAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgMjAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowFjEUMBIGA1UE +AxMLUG9saWN5IENBIDEwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQu7GyNFjN6 +Sqwk1CZAt+lzTC/Us6ZkO5nsmb8yAuPb6RJ0A2LvUbsmZea+UyBFq3VuEbbuCoeE +KRbKkS6wefAzo4HyMIHvMA4GA1UdDwEB/wQEAwICBDATBgNVHSUEDDAKBggrBgEF +BQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSQkJvfn8gFHIXVTBJ4hrtP +ypA9QTAlBgNVHSAEHjAcMAwGCmCGSAFlAwIBMAEwDAYKYIZIAWUDAgEwAjBxBgNV +HSEEajBoMBgGCmCGSAFlAwIBMAEGCmCGSAFlAwIBMAEwGAYKYIZIAWUDAgEwAQYK +YIZIAWUDAgEwAjAYBgpghkgBZQMCATACBgpghkgBZQMCATABMBgGCmCGSAFlAwIB +MAIGCmCGSAFlAwIBMAIwCgYIKoZIzj0EAwIDSQAwRgIhALn6/b3H+jLusJE5QiaS +PiwrLcl+NDguWCnxo0c6AfduAiEApkXUN+7vRfXeFFd9CfA1BnTW3eUzBOsukZoN +zaj+utk= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICDzCCAbagAwIBAgIBAjAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgMzAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowFjEUMBIGA1UE +AxMLUG9saWN5IENBIDIwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAT+p+A+K6MI +R3eVP/+2O7lam32HU10frEKpyQslZAabYJwkc9iq5WatMbTMPQibuOIWHFl02uJ8 +cxGKy/Hke8P5o4HyMIHvMA4GA1UdDwEB/wQEAwICBDATBgNVHSUEDDAKBggrBgEF +BQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSSOt6HCXw+L/4uzJsInqqA +XrWt8DAlBgNVHSAEHjAcMAwGCmCGSAFlAwIBMAEwDAYKYIZIAWUDAgEwAjBxBgNV +HSEEajBoMBgGCmCGSAFlAwIBMAEGCmCGSAFlAwIBMAEwGAYKYIZIAWUDAgEwAQYK +YIZIAWUDAgEwAjAYBgpghkgBZQMCATACBgpghkgBZQMCATABMBgGCmCGSAFlAwIB +MAIGCmCGSAFlAwIBMAIwCgYIKoZIzj0EAwIDRwAwRAIgS/vh3osFy+q1MLuVnAdg +gMINfiIJw1+3zbYsJYlNhWgCICu6Qgzee4NwIrJagcdVA0RAfnCOo6wfvikpl0ts +EepA +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEDCCAbagAwIBAgIBAzAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgNDAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowFjEUMBIGA1UE +AxMLUG9saWN5IENBIDMwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQONHKgpAJ6 +vE41FYBekpLzybpBQp/gUmgRPKrcL0z4lLTDjCG3j6yIbZma8u2bPM1MBXw5otZ7 +xVFhQ1AkZIOco4HyMIHvMA4GA1UdDwEB/wQEAwICBDATBgNVHSUEDDAKBggrBgEF +BQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQ69465BL89BXORf4sSnneU +exkm0jAlBgNVHSAEHjAcMAwGCmCGSAFlAwIBMAEwDAYKYIZIAWUDAgEwAjBxBgNV +HSEEajBoMBgGCmCGSAFlAwIBMAEGCmCGSAFlAwIBMAEwGAYKYIZIAWUDAgEwAQYK +YIZIAWUDAgEwAjAYBgpghkgBZQMCATACBgpghkgBZQMCATABMBgGCmCGSAFlAwIB +MAIGCmCGSAFlAwIBMAIwCgYIKoZIzj0EAwIDSAAwRQIhAPK9PqPxgme9x6TPFh2z +vv+qVEM2WxOTdRKOPgUYzCp9AiBl8qO3szv5jNDzb0fRIqVp37v9yBjWcgO9Wl02 +QDCpGw== +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICETCCAbagAwIBAgIBBDAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgNTAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowFjEUMBIGA1UE +AxMLUG9saWN5IENBIDQwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASLrUP7BFi7 ++LE2uDVCZ2Z2HK6BpL/kjBbwKkLxlJe+LqNolzu53b8+WtHwrvPPVkD9t3KMdWXU +K7NtHYgXUz07o4HyMIHvMA4GA1UdDwEB/wQEAwICBDATBgNVHSUEDDAKBggrBgEF +BQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS0kaY2oJVEBLtjkqI8pXsv +eqm3VDAlBgNVHSAEHjAcMAwGCmCGSAFlAwIBMAEwDAYKYIZIAWUDAgEwAjBxBgNV +HSEEajBoMBgGCmCGSAFlAwIBMAEGCmCGSAFlAwIBMAEwGAYKYIZIAWUDAgEwAQYK +YIZIAWUDAgEwAjAYBgpghkgBZQMCATACBgpghkgBZQMCATABMBgGCmCGSAFlAwIB +MAIGCmCGSAFlAwIBMAIwCgYIKoZIzj0EAwIDSQAwRgIhAJuTMvMUda4Y29V1Tm5O +jCqBThR2NwdQfnET1sjch3Q7AiEA7nEudfXKMljjz608aWtafTkw5V5I2/SbuUKr +vjprfIo= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICEDCCAbagAwIBAgIBBTAKBggqhkjOPQQDAjAWMRQwEgYDVQQDEwtQb2xpY3kg +Q0EgNTAgFw0wMDAxMDEwMDAwMDBaGA8yMTAwMDEwMTAwMDAwMFowFjEUMBIGA1UE +AxMLUG9saWN5IENBIDUwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQ9RuYVzUGB +FkAEM9kHe9xynDo/NcsiaAO3+E2u7jJQQN50d6hVEDHf9961omldhKhP4HTNfhqj +VMIHKGMhXCgKo4HyMIHvMA4GA1UdDwEB/wQEAwICBDATBgNVHSUEDDAKBggrBgEF +BQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTVrjWaVjkfMpilq5tGZ4zZ +iJtaSDAlBgNVHSAEHjAcMAwGCmCGSAFlAwIBMAEwDAYKYIZIAWUDAgEwAjBxBgNV +HSEEajBoMBgGCmCGSAFlAwIBMAEGCmCGSAFlAwIBMAEwGAYKYIZIAWUDAgEwAQYK +YIZIAWUDAgEwAjAYBgpghkgBZQMCATACBgpghkgBZQMCATABMBgGCmCGSAFlAwIB +MAIGCmCGSAFlAwIBMAIwCgYIKoZIzj0EAwIDSAAwRQIhAPVgPpACX2ylQMEMSntw +izxKHTSPhXuF6IHhNHRz7KFnAiB8y/QcF7N2iXNZEqffWSkVted/XOw3Xrck0sJ6 +4eXNcw== +-----END CERTIFICATE----- diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_ssl_new.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_ssl_new.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_ssl_new.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_ssl_new.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_ssl_old.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_ssl_old.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_ssl_old.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_ssl_old.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_ssl_test_ctx.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_ssl_test_ctx.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_ssl_test_ctx.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_ssl_test_ctx.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_sslcorrupt.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_sslcorrupt.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_sslcorrupt.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_sslcorrupt.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_tsa.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_tsa.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_tsa.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_tsa.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/80-test_x509aux.t b/src/openssl/openssl-1.1.1w/test/recipes/80-test_x509aux.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/80-test_x509aux.t rename to src/openssl/openssl-1.1.1w/test/recipes/80-test_x509aux.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_asn1_time.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_asn1_time.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_asn1_time.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_asn1_time.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_async.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_async.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_async.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_async.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_bio_enc.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_bio_enc.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_bio_enc.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_bio_enc.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_bio_memleak.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_bio_memleak.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_bio_memleak.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_bio_memleak.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_constant_time.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_constant_time.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_constant_time.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_constant_time.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_fatalerr.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_fatalerr.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_fatalerr.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_fatalerr.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_gmdiff.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_gmdiff.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_gmdiff.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_gmdiff.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_gost.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_gost.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_gost.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_gost.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_gost_data/gost.conf b/src/openssl/openssl-1.1.1w/test/recipes/90-test_gost_data/gost.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_gost_data/gost.conf rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_gost_data/gost.conf diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_gost_data/server-cert2001.pem b/src/openssl/openssl-1.1.1w/test/recipes/90-test_gost_data/server-cert2001.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_gost_data/server-cert2001.pem rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_gost_data/server-cert2001.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_gost_data/server-cert2012.pem b/src/openssl/openssl-1.1.1w/test/recipes/90-test_gost_data/server-cert2012.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_gost_data/server-cert2012.pem rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_gost_data/server-cert2012.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_gost_data/server-key2001.pem b/src/openssl/openssl-1.1.1w/test/recipes/90-test_gost_data/server-key2001.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_gost_data/server-key2001.pem rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_gost_data/server-key2001.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_gost_data/server-key2012.pem b/src/openssl/openssl-1.1.1w/test/recipes/90-test_gost_data/server-key2012.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_gost_data/server-key2012.pem rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_gost_data/server-key2012.pem diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_ige.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_ige.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_ige.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_ige.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_includes.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_includes.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_includes.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_includes.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/conf-includes/includes1.cnf b/src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/conf-includes/includes1.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/conf-includes/includes1.cnf rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/conf-includes/includes1.cnf diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/conf-includes/includes2.cnf b/src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/conf-includes/includes2.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/conf-includes/includes2.cnf rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/conf-includes/includes2.cnf diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/includes-broken.cnf b/src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/includes-broken.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/includes-broken.cnf rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/includes-broken.cnf diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/includes-eq-ws.cnf b/src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/includes-eq-ws.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/includes-eq-ws.cnf rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/includes-eq-ws.cnf diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/includes-eq.cnf b/src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/includes-eq.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/includes-eq.cnf rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/includes-eq.cnf diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/includes-file.cnf b/src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/includes-file.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/includes-file.cnf rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/includes-file.cnf diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/includes.cnf b/src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/includes.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/includes.cnf rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/includes.cnf diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/vms-includes-file.cnf b/src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/vms-includes-file.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/vms-includes-file.cnf rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/vms-includes-file.cnf diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/vms-includes.cnf b/src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/vms-includes.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_includes_data/vms-includes.cnf rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_includes_data/vms-includes.cnf diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_memleak.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_memleak.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_memleak.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_memleak.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_overhead.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_overhead.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_overhead.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_overhead.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_secmem.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_secmem.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_secmem.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_secmem.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_shlibload.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_shlibload.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_shlibload.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_shlibload.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_srp.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_srp.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_srp.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_srp.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_sslapi.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_sslapi.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_sslapi.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_sslapi.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_sslapi_data/passwd.txt b/src/openssl/openssl-1.1.1w/test/recipes/90-test_sslapi_data/passwd.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_sslapi_data/passwd.txt rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_sslapi_data/passwd.txt diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_sslbuffers.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_sslbuffers.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_sslbuffers.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_sslbuffers.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_store.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_store.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_store.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_store.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_store_data/ca.cnf b/src/openssl/openssl-1.1.1w/test/recipes/90-test_store_data/ca.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_store_data/ca.cnf rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_store_data/ca.cnf diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_store_data/user.cnf b/src/openssl/openssl-1.1.1w/test/recipes/90-test_store_data/user.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_store_data/user.cnf rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_store_data/user.cnf diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_sysdefault.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_sysdefault.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_sysdefault.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_sysdefault.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_threads.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_threads.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_threads.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_threads.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_time_offset.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_time_offset.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_time_offset.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_time_offset.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_tls13ccs.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_tls13ccs.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_tls13ccs.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_tls13ccs.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_tls13encryption.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_tls13encryption.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_tls13encryption.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_tls13encryption.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_tls13secrets.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_tls13secrets.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_tls13secrets.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_tls13secrets.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/90-test_v3name.t b/src/openssl/openssl-1.1.1w/test/recipes/90-test_v3name.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/90-test_v3name.t rename to src/openssl/openssl-1.1.1w/test/recipes/90-test_v3name.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/95-test_external_boringssl.t b/src/openssl/openssl-1.1.1w/test/recipes/95-test_external_boringssl.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/95-test_external_boringssl.t rename to src/openssl/openssl-1.1.1w/test/recipes/95-test_external_boringssl.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/95-test_external_krb5.t b/src/openssl/openssl-1.1.1w/test/recipes/95-test_external_krb5.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/95-test_external_krb5.t rename to src/openssl/openssl-1.1.1w/test/recipes/95-test_external_krb5.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/95-test_external_krb5_data/krb5.sh b/src/openssl/openssl-1.1.1w/test/recipes/95-test_external_krb5_data/krb5.sh similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/95-test_external_krb5_data/krb5.sh rename to src/openssl/openssl-1.1.1w/test/recipes/95-test_external_krb5_data/krb5.sh diff --git a/src/openssl/openssl-1.1.1t/test/recipes/95-test_external_pyca.t b/src/openssl/openssl-1.1.1w/test/recipes/95-test_external_pyca.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/95-test_external_pyca.t rename to src/openssl/openssl-1.1.1w/test/recipes/95-test_external_pyca.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/95-test_external_pyca_data/cryptography.sh b/src/openssl/openssl-1.1.1w/test/recipes/95-test_external_pyca_data/cryptography.sh similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/95-test_external_pyca_data/cryptography.sh rename to src/openssl/openssl-1.1.1w/test/recipes/95-test_external_pyca_data/cryptography.sh diff --git a/src/openssl/openssl-1.1.1t/test/recipes/99-test_ecstress.t b/src/openssl/openssl-1.1.1w/test/recipes/99-test_ecstress.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/99-test_ecstress.t rename to src/openssl/openssl-1.1.1w/test/recipes/99-test_ecstress.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/99-test_fuzz.t b/src/openssl/openssl-1.1.1w/test/recipes/99-test_fuzz.t similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/99-test_fuzz.t rename to src/openssl/openssl-1.1.1w/test/recipes/99-test_fuzz.t diff --git a/src/openssl/openssl-1.1.1t/test/recipes/ocsp-response.der b/src/openssl/openssl-1.1.1w/test/recipes/ocsp-response.der similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/ocsp-response.der rename to src/openssl/openssl-1.1.1w/test/recipes/ocsp-response.der diff --git a/src/openssl/openssl-1.1.1t/test/recipes/tconversion.pl b/src/openssl/openssl-1.1.1w/test/recipes/tconversion.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recipes/tconversion.pl rename to src/openssl/openssl-1.1.1w/test/recipes/tconversion.pl diff --git a/src/openssl/openssl-1.1.1t/test/recordlentest.c b/src/openssl/openssl-1.1.1w/test/recordlentest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/recordlentest.c rename to src/openssl/openssl-1.1.1w/test/recordlentest.c diff --git a/src/openssl/openssl-1.1.1t/test/rsa_complex.c b/src/openssl/openssl-1.1.1w/test/rsa_complex.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/rsa_complex.c rename to src/openssl/openssl-1.1.1w/test/rsa_complex.c diff --git a/src/openssl/openssl-1.1.1t/test/rsa_mp_test.c b/src/openssl/openssl-1.1.1w/test/rsa_mp_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/rsa_mp_test.c rename to src/openssl/openssl-1.1.1w/test/rsa_mp_test.c diff --git a/src/openssl/openssl-1.1.1t/test/rsa_test.c b/src/openssl/openssl-1.1.1w/test/rsa_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/rsa_test.c rename to src/openssl/openssl-1.1.1w/test/rsa_test.c diff --git a/src/openssl/openssl-1.1.1t/test/run_tests.pl b/src/openssl/openssl-1.1.1w/test/run_tests.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/test/run_tests.pl rename to src/openssl/openssl-1.1.1w/test/run_tests.pl diff --git a/src/openssl/openssl-1.1.1t/test/sanitytest.c b/src/openssl/openssl-1.1.1w/test/sanitytest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/sanitytest.c rename to src/openssl/openssl-1.1.1w/test/sanitytest.c diff --git a/src/openssl/openssl-1.1.1t/test/secmemtest.c b/src/openssl/openssl-1.1.1w/test/secmemtest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/secmemtest.c rename to src/openssl/openssl-1.1.1w/test/secmemtest.c diff --git a/src/openssl/openssl-1.1.1t/test/serverinfo.pem b/src/openssl/openssl-1.1.1w/test/serverinfo.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/serverinfo.pem rename to src/openssl/openssl-1.1.1w/test/serverinfo.pem diff --git a/src/openssl/openssl-1.1.1t/test/serverinfo2.pem b/src/openssl/openssl-1.1.1w/test/serverinfo2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/serverinfo2.pem rename to src/openssl/openssl-1.1.1w/test/serverinfo2.pem diff --git a/src/openssl/openssl-1.1.1t/test/servername_test.c b/src/openssl/openssl-1.1.1w/test/servername_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/servername_test.c rename to src/openssl/openssl-1.1.1w/test/servername_test.c diff --git a/src/openssl/openssl-1.1.1t/test/session.pem b/src/openssl/openssl-1.1.1w/test/session.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/session.pem rename to src/openssl/openssl-1.1.1w/test/session.pem diff --git a/src/openssl/openssl-1.1.1t/test/shibboleth.pfx b/src/openssl/openssl-1.1.1w/test/shibboleth.pfx similarity index 100% rename from src/openssl/openssl-1.1.1t/test/shibboleth.pfx rename to src/openssl/openssl-1.1.1w/test/shibboleth.pfx diff --git a/src/openssl/openssl-1.1.1t/test/shlibloadtest.c b/src/openssl/openssl-1.1.1w/test/shlibloadtest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/shlibloadtest.c rename to src/openssl/openssl-1.1.1w/test/shlibloadtest.c diff --git a/src/openssl/openssl-1.1.1t/test/siphash_internal_test.c b/src/openssl/openssl-1.1.1w/test/siphash_internal_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/siphash_internal_test.c rename to src/openssl/openssl-1.1.1w/test/siphash_internal_test.c diff --git a/src/openssl/openssl-1.1.1t/test/sm2_internal_test.c b/src/openssl/openssl-1.1.1w/test/sm2_internal_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/sm2_internal_test.c rename to src/openssl/openssl-1.1.1w/test/sm2_internal_test.c diff --git a/src/openssl/openssl-1.1.1t/test/sm4_internal_test.c b/src/openssl/openssl-1.1.1w/test/sm4_internal_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/sm4_internal_test.c rename to src/openssl/openssl-1.1.1w/test/sm4_internal_test.c diff --git a/src/openssl/openssl-1.1.1t/test/smcont.txt b/src/openssl/openssl-1.1.1w/test/smcont.txt similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smcont.txt rename to src/openssl/openssl-1.1.1w/test/smcont.txt diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/badrsa.pem b/src/openssl/openssl-1.1.1w/test/smime-certs/badrsa.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/badrsa.pem rename to src/openssl/openssl-1.1.1w/test/smime-certs/badrsa.pem diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/ca.cnf b/src/openssl/openssl-1.1.1w/test/smime-certs/ca.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/ca.cnf rename to src/openssl/openssl-1.1.1w/test/smime-certs/ca.cnf diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/mksmime-certs.sh b/src/openssl/openssl-1.1.1w/test/smime-certs/mksmime-certs.sh similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/mksmime-certs.sh rename to src/openssl/openssl-1.1.1w/test/smime-certs/mksmime-certs.sh diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/smdh.pem b/src/openssl/openssl-1.1.1w/test/smime-certs/smdh.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/smdh.pem rename to src/openssl/openssl-1.1.1w/test/smime-certs/smdh.pem diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/smdsa1.pem b/src/openssl/openssl-1.1.1w/test/smime-certs/smdsa1.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/smdsa1.pem rename to src/openssl/openssl-1.1.1w/test/smime-certs/smdsa1.pem diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/smdsa2.pem b/src/openssl/openssl-1.1.1w/test/smime-certs/smdsa2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/smdsa2.pem rename to src/openssl/openssl-1.1.1w/test/smime-certs/smdsa2.pem diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/smdsa3.pem b/src/openssl/openssl-1.1.1w/test/smime-certs/smdsa3.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/smdsa3.pem rename to src/openssl/openssl-1.1.1w/test/smime-certs/smdsa3.pem diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/smdsap.pem b/src/openssl/openssl-1.1.1w/test/smime-certs/smdsap.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/smdsap.pem rename to src/openssl/openssl-1.1.1w/test/smime-certs/smdsap.pem diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/smec1.pem b/src/openssl/openssl-1.1.1w/test/smime-certs/smec1.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/smec1.pem rename to src/openssl/openssl-1.1.1w/test/smime-certs/smec1.pem diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/smec2.pem b/src/openssl/openssl-1.1.1w/test/smime-certs/smec2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/smec2.pem rename to src/openssl/openssl-1.1.1w/test/smime-certs/smec2.pem diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/smec3.pem b/src/openssl/openssl-1.1.1w/test/smime-certs/smec3.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/smec3.pem rename to src/openssl/openssl-1.1.1w/test/smime-certs/smec3.pem diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/smroot.pem b/src/openssl/openssl-1.1.1w/test/smime-certs/smroot.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/smroot.pem rename to src/openssl/openssl-1.1.1w/test/smime-certs/smroot.pem diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/smrsa1.pem b/src/openssl/openssl-1.1.1w/test/smime-certs/smrsa1.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/smrsa1.pem rename to src/openssl/openssl-1.1.1w/test/smime-certs/smrsa1.pem diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/smrsa2.pem b/src/openssl/openssl-1.1.1w/test/smime-certs/smrsa2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/smrsa2.pem rename to src/openssl/openssl-1.1.1w/test/smime-certs/smrsa2.pem diff --git a/src/openssl/openssl-1.1.1t/test/smime-certs/smrsa3.pem b/src/openssl/openssl-1.1.1w/test/smime-certs/smrsa3.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/smime-certs/smrsa3.pem rename to src/openssl/openssl-1.1.1w/test/smime-certs/smrsa3.pem diff --git a/src/openssl/openssl-1.1.1t/test/srptest.c b/src/openssl/openssl-1.1.1w/test/srptest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/srptest.c rename to src/openssl/openssl-1.1.1w/test/srptest.c diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/01-simple.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/01-simple.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/01-simple.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/01-simple.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/01-simple.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/01-simple.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/01-simple.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/01-simple.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/02-protocol-version.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/02-protocol-version.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/02-protocol-version.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/02-protocol-version.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/02-protocol-version.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/02-protocol-version.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/02-protocol-version.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/02-protocol-version.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/03-custom_verify.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/03-custom_verify.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/03-custom_verify.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/03-custom_verify.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/03-custom_verify.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/03-custom_verify.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/03-custom_verify.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/03-custom_verify.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/04-client_auth.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/04-client_auth.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/04-client_auth.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/04-client_auth.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/04-client_auth.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/04-client_auth.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/04-client_auth.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/04-client_auth.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/05-sni.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/05-sni.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/05-sni.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/05-sni.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/05-sni.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/05-sni.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/05-sni.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/05-sni.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/06-sni-ticket.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/06-sni-ticket.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/06-sni-ticket.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/06-sni-ticket.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/06-sni-ticket.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/06-sni-ticket.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/06-sni-ticket.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/06-sni-ticket.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/07-dtls-protocol-version.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/07-dtls-protocol-version.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/07-dtls-protocol-version.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/07-dtls-protocol-version.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/07-dtls-protocol-version.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/07-dtls-protocol-version.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/07-dtls-protocol-version.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/07-dtls-protocol-version.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/08-npn.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/08-npn.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/08-npn.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/08-npn.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/08-npn.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/08-npn.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/08-npn.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/08-npn.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/09-alpn.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/09-alpn.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/09-alpn.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/09-alpn.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/09-alpn.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/09-alpn.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/09-alpn.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/09-alpn.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/10-resumption.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/10-resumption.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/10-resumption.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/10-resumption.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/10-resumption.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/10-resumption.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/10-resumption.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/10-resumption.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/11-dtls_resumption.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/11-dtls_resumption.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/11-dtls_resumption.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/11-dtls_resumption.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/11-dtls_resumption.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/11-dtls_resumption.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/11-dtls_resumption.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/11-dtls_resumption.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/12-ct.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/12-ct.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/12-ct.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/12-ct.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/12-ct.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/12-ct.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/12-ct.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/12-ct.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/13-fragmentation.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/13-fragmentation.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/13-fragmentation.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/13-fragmentation.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/13-fragmentation.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/13-fragmentation.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/13-fragmentation.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/13-fragmentation.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/14-curves.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/14-curves.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/14-curves.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/14-curves.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/14-curves.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/14-curves.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/14-curves.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/14-curves.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/15-certstatus.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/15-certstatus.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/15-certstatus.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/15-certstatus.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/15-certstatus.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/15-certstatus.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/15-certstatus.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/15-certstatus.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/16-dtls-certstatus.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/16-dtls-certstatus.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/16-dtls-certstatus.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/16-dtls-certstatus.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/16-dtls-certstatus.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/16-dtls-certstatus.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/16-dtls-certstatus.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/16-dtls-certstatus.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/17-renegotiate.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/17-renegotiate.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/17-renegotiate.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/17-renegotiate.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/17-renegotiate.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/17-renegotiate.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/17-renegotiate.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/17-renegotiate.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/18-dtls-renegotiate.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/18-dtls-renegotiate.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/18-dtls-renegotiate.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/18-dtls-renegotiate.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/18-dtls-renegotiate.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/18-dtls-renegotiate.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/18-dtls-renegotiate.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/18-dtls-renegotiate.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/19-mac-then-encrypt.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/19-mac-then-encrypt.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/19-mac-then-encrypt.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/19-mac-then-encrypt.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/19-mac-then-encrypt.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/19-mac-then-encrypt.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/19-mac-then-encrypt.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/19-mac-then-encrypt.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/20-cert-select.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/20-cert-select.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/20-cert-select.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/20-cert-select.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/20-cert-select.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/20-cert-select.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/20-cert-select.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/20-cert-select.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/21-key-update.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/21-key-update.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/21-key-update.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/21-key-update.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/21-key-update.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/21-key-update.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/21-key-update.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/21-key-update.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/22-compression.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/22-compression.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/22-compression.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/22-compression.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/22-compression.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/22-compression.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/22-compression.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/22-compression.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/23-srp.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/23-srp.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/23-srp.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/23-srp.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/23-srp.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/23-srp.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/23-srp.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/23-srp.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/24-padding.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/24-padding.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/24-padding.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/24-padding.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/24-padding.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/24-padding.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/24-padding.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/24-padding.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/25-cipher.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/25-cipher.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/25-cipher.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/25-cipher.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/25-cipher.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/25-cipher.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/25-cipher.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/25-cipher.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/26-tls13_client_auth.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/26-tls13_client_auth.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/26-tls13_client_auth.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/26-tls13_client_auth.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/26-tls13_client_auth.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/26-tls13_client_auth.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/26-tls13_client_auth.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/26-tls13_client_auth.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/27-ticket-appdata.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/27-ticket-appdata.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/27-ticket-appdata.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/27-ticket-appdata.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/27-ticket-appdata.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/27-ticket-appdata.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/27-ticket-appdata.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/27-ticket-appdata.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/28-seclevel.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/28-seclevel.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/28-seclevel.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/28-seclevel.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/28-seclevel.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/28-seclevel.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/28-seclevel.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/28-seclevel.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/29-dtls-sctp-label-bug.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/29-dtls-sctp-label-bug.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/29-dtls-sctp-label-bug.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/29-dtls-sctp-label-bug.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/29-dtls-sctp-label-bug.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/29-dtls-sctp-label-bug.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/29-dtls-sctp-label-bug.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/29-dtls-sctp-label-bug.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/30-supported-groups.conf b/src/openssl/openssl-1.1.1w/test/ssl-tests/30-supported-groups.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/30-supported-groups.conf rename to src/openssl/openssl-1.1.1w/test/ssl-tests/30-supported-groups.conf diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/30-supported-groups.conf.in b/src/openssl/openssl-1.1.1w/test/ssl-tests/30-supported-groups.conf.in similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/30-supported-groups.conf.in rename to src/openssl/openssl-1.1.1w/test/ssl-tests/30-supported-groups.conf.in diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/protocol_version.pm b/src/openssl/openssl-1.1.1w/test/ssl-tests/protocol_version.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/protocol_version.pm rename to src/openssl/openssl-1.1.1w/test/ssl-tests/protocol_version.pm diff --git a/src/openssl/openssl-1.1.1t/test/ssl-tests/ssltests_base.pm b/src/openssl/openssl-1.1.1w/test/ssl-tests/ssltests_base.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl-tests/ssltests_base.pm rename to src/openssl/openssl-1.1.1w/test/ssl-tests/ssltests_base.pm diff --git a/src/openssl/openssl-1.1.1t/test/ssl_cert_table_internal_test.c b/src/openssl/openssl-1.1.1w/test/ssl_cert_table_internal_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl_cert_table_internal_test.c rename to src/openssl/openssl-1.1.1w/test/ssl_cert_table_internal_test.c diff --git a/src/openssl/openssl-1.1.1t/test/ssl_ctx_test.c b/src/openssl/openssl-1.1.1w/test/ssl_ctx_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl_ctx_test.c rename to src/openssl/openssl-1.1.1w/test/ssl_ctx_test.c diff --git a/src/openssl/openssl-1.1.1t/test/ssl_test.c b/src/openssl/openssl-1.1.1w/test/ssl_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl_test.c rename to src/openssl/openssl-1.1.1w/test/ssl_test.c diff --git a/src/openssl/openssl-1.1.1t/test/ssl_test.tmpl b/src/openssl/openssl-1.1.1w/test/ssl_test.tmpl similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl_test.tmpl rename to src/openssl/openssl-1.1.1w/test/ssl_test.tmpl diff --git a/src/openssl/openssl-1.1.1t/test/ssl_test_ctx.c b/src/openssl/openssl-1.1.1w/test/ssl_test_ctx.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl_test_ctx.c rename to src/openssl/openssl-1.1.1w/test/ssl_test_ctx.c diff --git a/src/openssl/openssl-1.1.1t/test/ssl_test_ctx.h b/src/openssl/openssl-1.1.1w/test/ssl_test_ctx.h similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl_test_ctx.h rename to src/openssl/openssl-1.1.1w/test/ssl_test_ctx.h diff --git a/src/openssl/openssl-1.1.1t/test/ssl_test_ctx_test.c b/src/openssl/openssl-1.1.1w/test/ssl_test_ctx_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl_test_ctx_test.c rename to src/openssl/openssl-1.1.1w/test/ssl_test_ctx_test.c diff --git a/src/openssl/openssl-1.1.1t/test/ssl_test_ctx_test.conf b/src/openssl/openssl-1.1.1w/test/ssl_test_ctx_test.conf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssl_test_ctx_test.conf rename to src/openssl/openssl-1.1.1w/test/ssl_test_ctx_test.conf diff --git a/src/openssl/openssl-1.1.1t/test/sslapitest.c b/src/openssl/openssl-1.1.1w/test/sslapitest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/sslapitest.c rename to src/openssl/openssl-1.1.1w/test/sslapitest.c diff --git a/src/openssl/openssl-1.1.1t/test/sslbuffertest.c b/src/openssl/openssl-1.1.1w/test/sslbuffertest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/sslbuffertest.c rename to src/openssl/openssl-1.1.1w/test/sslbuffertest.c diff --git a/src/openssl/openssl-1.1.1t/test/sslcorrupttest.c b/src/openssl/openssl-1.1.1w/test/sslcorrupttest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/sslcorrupttest.c rename to src/openssl/openssl-1.1.1w/test/sslcorrupttest.c diff --git a/src/openssl/openssl-1.1.1t/test/ssltest_old.c b/src/openssl/openssl-1.1.1w/test/ssltest_old.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssltest_old.c rename to src/openssl/openssl-1.1.1w/test/ssltest_old.c diff --git a/src/openssl/openssl-1.1.1t/test/ssltestlib.c b/src/openssl/openssl-1.1.1w/test/ssltestlib.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssltestlib.c rename to src/openssl/openssl-1.1.1w/test/ssltestlib.c diff --git a/src/openssl/openssl-1.1.1t/test/ssltestlib.h b/src/openssl/openssl-1.1.1w/test/ssltestlib.h similarity index 100% rename from src/openssl/openssl-1.1.1t/test/ssltestlib.h rename to src/openssl/openssl-1.1.1w/test/ssltestlib.h diff --git a/src/openssl/openssl-1.1.1t/test/stack_test.c b/src/openssl/openssl-1.1.1w/test/stack_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/stack_test.c rename to src/openssl/openssl-1.1.1w/test/stack_test.c diff --git a/src/openssl/openssl-1.1.1t/test/sysdefault.cnf b/src/openssl/openssl-1.1.1w/test/sysdefault.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/sysdefault.cnf rename to src/openssl/openssl-1.1.1w/test/sysdefault.cnf diff --git a/src/openssl/openssl-1.1.1t/test/sysdefaulttest.c b/src/openssl/openssl-1.1.1w/test/sysdefaulttest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/sysdefaulttest.c rename to src/openssl/openssl-1.1.1w/test/sysdefaulttest.c diff --git a/src/openssl/openssl-1.1.1t/test/test.cnf b/src/openssl/openssl-1.1.1w/test/test.cnf similarity index 100% rename from src/openssl/openssl-1.1.1t/test/test.cnf rename to src/openssl/openssl-1.1.1w/test/test.cnf diff --git a/src/openssl/openssl-1.1.1t/test/test_test.c b/src/openssl/openssl-1.1.1w/test/test_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/test_test.c rename to src/openssl/openssl-1.1.1w/test/test_test.c diff --git a/src/openssl/openssl-1.1.1t/test/testcrl.pem b/src/openssl/openssl-1.1.1w/test/testcrl.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testcrl.pem rename to src/openssl/openssl-1.1.1w/test/testcrl.pem diff --git a/src/openssl/openssl-1.1.1t/test/testdsa.pem b/src/openssl/openssl-1.1.1w/test/testdsa.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testdsa.pem rename to src/openssl/openssl-1.1.1w/test/testdsa.pem diff --git a/src/openssl/openssl-1.1.1t/test/testdsapub.pem b/src/openssl/openssl-1.1.1w/test/testdsapub.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testdsapub.pem rename to src/openssl/openssl-1.1.1w/test/testdsapub.pem diff --git a/src/openssl/openssl-1.1.1t/test/testec-p256.pem b/src/openssl/openssl-1.1.1w/test/testec-p256.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testec-p256.pem rename to src/openssl/openssl-1.1.1w/test/testec-p256.pem diff --git a/src/openssl/openssl-1.1.1t/test/testecpub-p256.pem b/src/openssl/openssl-1.1.1w/test/testecpub-p256.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testecpub-p256.pem rename to src/openssl/openssl-1.1.1w/test/testecpub-p256.pem diff --git a/src/openssl/openssl-1.1.1t/test/tested25519.pem b/src/openssl/openssl-1.1.1w/test/tested25519.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/tested25519.pem rename to src/openssl/openssl-1.1.1w/test/tested25519.pem diff --git a/src/openssl/openssl-1.1.1t/test/tested25519pub.pem b/src/openssl/openssl-1.1.1w/test/tested25519pub.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/tested25519pub.pem rename to src/openssl/openssl-1.1.1w/test/tested25519pub.pem diff --git a/src/openssl/openssl-1.1.1t/test/tested448.pem b/src/openssl/openssl-1.1.1w/test/tested448.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/tested448.pem rename to src/openssl/openssl-1.1.1w/test/tested448.pem diff --git a/src/openssl/openssl-1.1.1t/test/tested448pub.pem b/src/openssl/openssl-1.1.1w/test/tested448pub.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/tested448pub.pem rename to src/openssl/openssl-1.1.1w/test/tested448pub.pem diff --git a/src/openssl/openssl-1.1.1t/test/testp7.pem b/src/openssl/openssl-1.1.1w/test/testp7.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testp7.pem rename to src/openssl/openssl-1.1.1w/test/testp7.pem diff --git a/src/openssl/openssl-1.1.1t/test/testreq2.pem b/src/openssl/openssl-1.1.1w/test/testreq2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testreq2.pem rename to src/openssl/openssl-1.1.1w/test/testreq2.pem diff --git a/src/openssl/openssl-1.1.1t/test/testrsa.pem b/src/openssl/openssl-1.1.1w/test/testrsa.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testrsa.pem rename to src/openssl/openssl-1.1.1w/test/testrsa.pem diff --git a/src/openssl/openssl-1.1.1t/test/testrsa_withattrs.der b/src/openssl/openssl-1.1.1w/test/testrsa_withattrs.der similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testrsa_withattrs.der rename to src/openssl/openssl-1.1.1w/test/testrsa_withattrs.der diff --git a/src/openssl/openssl-1.1.1t/test/testrsa_withattrs.pem b/src/openssl/openssl-1.1.1w/test/testrsa_withattrs.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testrsa_withattrs.pem rename to src/openssl/openssl-1.1.1w/test/testrsa_withattrs.pem diff --git a/src/openssl/openssl-1.1.1t/test/testrsapub.pem b/src/openssl/openssl-1.1.1w/test/testrsapub.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testrsapub.pem rename to src/openssl/openssl-1.1.1w/test/testrsapub.pem diff --git a/src/openssl/openssl-1.1.1t/test/testsid.pem b/src/openssl/openssl-1.1.1w/test/testsid.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testsid.pem rename to src/openssl/openssl-1.1.1w/test/testsid.pem diff --git a/src/openssl/openssl-1.1.1t/test/testutil.h b/src/openssl/openssl-1.1.1w/test/testutil.h similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil.h rename to src/openssl/openssl-1.1.1w/test/testutil.h diff --git a/src/openssl/openssl-1.1.1t/test/testutil/basic_output.c b/src/openssl/openssl-1.1.1w/test/testutil/basic_output.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil/basic_output.c rename to src/openssl/openssl-1.1.1w/test/testutil/basic_output.c diff --git a/src/openssl/openssl-1.1.1t/test/testutil/cb.c b/src/openssl/openssl-1.1.1w/test/testutil/cb.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil/cb.c rename to src/openssl/openssl-1.1.1w/test/testutil/cb.c diff --git a/src/openssl/openssl-1.1.1t/test/testutil/driver.c b/src/openssl/openssl-1.1.1w/test/testutil/driver.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil/driver.c rename to src/openssl/openssl-1.1.1w/test/testutil/driver.c diff --git a/src/openssl/openssl-1.1.1t/test/testutil/format_output.c b/src/openssl/openssl-1.1.1w/test/testutil/format_output.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil/format_output.c rename to src/openssl/openssl-1.1.1w/test/testutil/format_output.c diff --git a/src/openssl/openssl-1.1.1t/test/testutil/main.c b/src/openssl/openssl-1.1.1w/test/testutil/main.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil/main.c rename to src/openssl/openssl-1.1.1w/test/testutil/main.c diff --git a/src/openssl/openssl-1.1.1t/test/testutil/output.h b/src/openssl/openssl-1.1.1w/test/testutil/output.h similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil/output.h rename to src/openssl/openssl-1.1.1w/test/testutil/output.h diff --git a/src/openssl/openssl-1.1.1t/test/testutil/output_helpers.c b/src/openssl/openssl-1.1.1w/test/testutil/output_helpers.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil/output_helpers.c rename to src/openssl/openssl-1.1.1w/test/testutil/output_helpers.c diff --git a/src/openssl/openssl-1.1.1t/test/testutil/random.c b/src/openssl/openssl-1.1.1w/test/testutil/random.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil/random.c rename to src/openssl/openssl-1.1.1w/test/testutil/random.c diff --git a/src/openssl/openssl-1.1.1t/test/testutil/stanza.c b/src/openssl/openssl-1.1.1w/test/testutil/stanza.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil/stanza.c rename to src/openssl/openssl-1.1.1w/test/testutil/stanza.c diff --git a/src/openssl/openssl-1.1.1t/test/testutil/tap_bio.c b/src/openssl/openssl-1.1.1w/test/testutil/tap_bio.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil/tap_bio.c rename to src/openssl/openssl-1.1.1w/test/testutil/tap_bio.c diff --git a/src/openssl/openssl-1.1.1t/test/testutil/test_cleanup.c b/src/openssl/openssl-1.1.1w/test/testutil/test_cleanup.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil/test_cleanup.c rename to src/openssl/openssl-1.1.1w/test/testutil/test_cleanup.c diff --git a/src/openssl/openssl-1.1.1t/test/testutil/tests.c b/src/openssl/openssl-1.1.1w/test/testutil/tests.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil/tests.c rename to src/openssl/openssl-1.1.1w/test/testutil/tests.c diff --git a/src/openssl/openssl-1.1.1t/test/testutil/testutil_init.c b/src/openssl/openssl-1.1.1w/test/testutil/testutil_init.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil/testutil_init.c rename to src/openssl/openssl-1.1.1w/test/testutil/testutil_init.c diff --git a/src/openssl/openssl-1.1.1t/test/testutil/tu_local.h b/src/openssl/openssl-1.1.1w/test/testutil/tu_local.h similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testutil/tu_local.h rename to src/openssl/openssl-1.1.1w/test/testutil/tu_local.h diff --git a/src/openssl/openssl-1.1.1t/test/testx509.pem b/src/openssl/openssl-1.1.1w/test/testx509.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/testx509.pem rename to src/openssl/openssl-1.1.1w/test/testx509.pem diff --git a/src/openssl/openssl-1.1.1t/test/threadstest.c b/src/openssl/openssl-1.1.1w/test/threadstest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/threadstest.c rename to src/openssl/openssl-1.1.1w/test/threadstest.c diff --git a/src/openssl/openssl-1.1.1t/test/time_offset_test.c b/src/openssl/openssl-1.1.1w/test/time_offset_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/time_offset_test.c rename to src/openssl/openssl-1.1.1w/test/time_offset_test.c diff --git a/src/openssl/openssl-1.1.1t/test/tls13ccstest.c b/src/openssl/openssl-1.1.1w/test/tls13ccstest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/tls13ccstest.c rename to src/openssl/openssl-1.1.1w/test/tls13ccstest.c diff --git a/src/openssl/openssl-1.1.1t/test/tls13encryptiontest.c b/src/openssl/openssl-1.1.1w/test/tls13encryptiontest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/tls13encryptiontest.c rename to src/openssl/openssl-1.1.1w/test/tls13encryptiontest.c diff --git a/src/openssl/openssl-1.1.1t/test/tls13secretstest.c b/src/openssl/openssl-1.1.1w/test/tls13secretstest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/tls13secretstest.c rename to src/openssl/openssl-1.1.1w/test/tls13secretstest.c diff --git a/src/openssl/openssl-1.1.1t/test/uitest.c b/src/openssl/openssl-1.1.1w/test/uitest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/uitest.c rename to src/openssl/openssl-1.1.1w/test/uitest.c diff --git a/src/openssl/openssl-1.1.1t/test/v3-cert1.pem b/src/openssl/openssl-1.1.1w/test/v3-cert1.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/v3-cert1.pem rename to src/openssl/openssl-1.1.1w/test/v3-cert1.pem diff --git a/src/openssl/openssl-1.1.1t/test/v3-cert2.pem b/src/openssl/openssl-1.1.1w/test/v3-cert2.pem similarity index 100% rename from src/openssl/openssl-1.1.1t/test/v3-cert2.pem rename to src/openssl/openssl-1.1.1w/test/v3-cert2.pem diff --git a/src/openssl/openssl-1.1.1t/test/v3ext.c b/src/openssl/openssl-1.1.1w/test/v3ext.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/v3ext.c rename to src/openssl/openssl-1.1.1w/test/v3ext.c diff --git a/src/openssl/openssl-1.1.1t/test/v3nametest.c b/src/openssl/openssl-1.1.1w/test/v3nametest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/v3nametest.c rename to src/openssl/openssl-1.1.1w/test/v3nametest.c diff --git a/src/openssl/openssl-1.1.1t/test/verify_extra_test.c b/src/openssl/openssl-1.1.1w/test/verify_extra_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/verify_extra_test.c rename to src/openssl/openssl-1.1.1w/test/verify_extra_test.c diff --git a/src/openssl/openssl-1.1.1t/test/versions.c b/src/openssl/openssl-1.1.1w/test/versions.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/versions.c rename to src/openssl/openssl-1.1.1w/test/versions.c diff --git a/src/openssl/openssl-1.1.1t/test/wpackettest.c b/src/openssl/openssl-1.1.1w/test/wpackettest.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/wpackettest.c rename to src/openssl/openssl-1.1.1w/test/wpackettest.c diff --git a/src/openssl/openssl-1.1.1t/test/x509_check_cert_pkey_test.c b/src/openssl/openssl-1.1.1w/test/x509_check_cert_pkey_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/x509_check_cert_pkey_test.c rename to src/openssl/openssl-1.1.1w/test/x509_check_cert_pkey_test.c diff --git a/src/openssl/openssl-1.1.1t/test/x509_dup_cert_test.c b/src/openssl/openssl-1.1.1w/test/x509_dup_cert_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/x509_dup_cert_test.c rename to src/openssl/openssl-1.1.1w/test/x509_dup_cert_test.c diff --git a/src/openssl/openssl-1.1.1t/test/x509_internal_test.c b/src/openssl/openssl-1.1.1w/test/x509_internal_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/x509_internal_test.c rename to src/openssl/openssl-1.1.1w/test/x509_internal_test.c diff --git a/src/openssl/openssl-1.1.1t/test/x509_time_test.c b/src/openssl/openssl-1.1.1w/test/x509_time_test.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/x509_time_test.c rename to src/openssl/openssl-1.1.1w/test/x509_time_test.c diff --git a/src/openssl/openssl-1.1.1t/test/x509aux.c b/src/openssl/openssl-1.1.1w/test/x509aux.c similarity index 100% rename from src/openssl/openssl-1.1.1t/test/x509aux.c rename to src/openssl/openssl-1.1.1w/test/x509aux.c diff --git a/src/openssl/openssl-1.1.1t/tools/build.info b/src/openssl/openssl-1.1.1w/tools/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/tools/build.info rename to src/openssl/openssl-1.1.1w/tools/build.info diff --git a/src/openssl/openssl-1.1.1t/tools/c_rehash.in b/src/openssl/openssl-1.1.1w/tools/c_rehash.in similarity index 100% rename from src/openssl/openssl-1.1.1t/tools/c_rehash.in rename to src/openssl/openssl-1.1.1w/tools/c_rehash.in diff --git a/src/openssl/openssl-1.1.1t/util/add-depends.pl b/src/openssl/openssl-1.1.1w/util/add-depends.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/util/add-depends.pl rename to src/openssl/openssl-1.1.1w/util/add-depends.pl diff --git a/src/openssl/openssl-1.1.1t/util/build.info b/src/openssl/openssl-1.1.1w/util/build.info similarity index 100% rename from src/openssl/openssl-1.1.1t/util/build.info rename to src/openssl/openssl-1.1.1w/util/build.info diff --git a/src/openssl/openssl-1.1.1t/util/cavs-to-evptest.pl b/src/openssl/openssl-1.1.1w/util/cavs-to-evptest.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/util/cavs-to-evptest.pl rename to src/openssl/openssl-1.1.1w/util/cavs-to-evptest.pl diff --git a/src/openssl/openssl-1.1.1t/util/check-malloc-errs b/src/openssl/openssl-1.1.1w/util/check-malloc-errs similarity index 100% rename from src/openssl/openssl-1.1.1t/util/check-malloc-errs rename to src/openssl/openssl-1.1.1w/util/check-malloc-errs diff --git a/src/openssl/openssl-1.1.1t/util/ck_errf.pl b/src/openssl/openssl-1.1.1w/util/ck_errf.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/util/ck_errf.pl rename to src/openssl/openssl-1.1.1w/util/ck_errf.pl diff --git a/src/openssl/openssl-1.1.1t/util/copy.pl b/src/openssl/openssl-1.1.1w/util/copy.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/util/copy.pl rename to src/openssl/openssl-1.1.1w/util/copy.pl diff --git a/src/openssl/openssl-1.1.1t/util/dofile.pl b/src/openssl/openssl-1.1.1w/util/dofile.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/util/dofile.pl rename to src/openssl/openssl-1.1.1w/util/dofile.pl diff --git a/src/openssl/openssl-1.1.1t/util/echo.pl b/src/openssl/openssl-1.1.1w/util/echo.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/util/echo.pl rename to src/openssl/openssl-1.1.1w/util/echo.pl diff --git a/src/openssl/openssl-1.1.1t/util/find-doc-nits b/src/openssl/openssl-1.1.1w/util/find-doc-nits similarity index 100% rename from src/openssl/openssl-1.1.1t/util/find-doc-nits rename to src/openssl/openssl-1.1.1w/util/find-doc-nits diff --git a/src/openssl/openssl-1.1.1t/util/find-unused-errs b/src/openssl/openssl-1.1.1w/util/find-unused-errs similarity index 100% rename from src/openssl/openssl-1.1.1t/util/find-unused-errs rename to src/openssl/openssl-1.1.1w/util/find-unused-errs diff --git a/src/openssl/openssl-1.1.1t/util/fix-includes b/src/openssl/openssl-1.1.1w/util/fix-includes similarity index 100% rename from src/openssl/openssl-1.1.1t/util/fix-includes rename to src/openssl/openssl-1.1.1w/util/fix-includes diff --git a/src/openssl/openssl-1.1.1t/util/fix-includes.sed b/src/openssl/openssl-1.1.1w/util/fix-includes.sed similarity index 100% rename from src/openssl/openssl-1.1.1t/util/fix-includes.sed rename to src/openssl/openssl-1.1.1w/util/fix-includes.sed diff --git a/src/openssl/openssl-1.1.1t/util/indent.pro b/src/openssl/openssl-1.1.1w/util/indent.pro similarity index 100% rename from src/openssl/openssl-1.1.1t/util/indent.pro rename to src/openssl/openssl-1.1.1w/util/indent.pro diff --git a/src/openssl/openssl-1.1.1t/util/libcrypto.num b/src/openssl/openssl-1.1.1w/util/libcrypto.num similarity index 100% rename from src/openssl/openssl-1.1.1t/util/libcrypto.num rename to src/openssl/openssl-1.1.1w/util/libcrypto.num diff --git a/src/openssl/openssl-1.1.1t/util/libssl.num b/src/openssl/openssl-1.1.1w/util/libssl.num similarity index 100% rename from src/openssl/openssl-1.1.1t/util/libssl.num rename to src/openssl/openssl-1.1.1w/util/libssl.num diff --git a/src/openssl/openssl-1.1.1t/util/local_shlib.com.in b/src/openssl/openssl-1.1.1w/util/local_shlib.com.in similarity index 100% rename from src/openssl/openssl-1.1.1t/util/local_shlib.com.in rename to src/openssl/openssl-1.1.1w/util/local_shlib.com.in diff --git a/src/openssl/openssl-1.1.1t/util/mkbuildinf.pl b/src/openssl/openssl-1.1.1w/util/mkbuildinf.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/util/mkbuildinf.pl rename to src/openssl/openssl-1.1.1w/util/mkbuildinf.pl diff --git a/src/openssl/openssl-1.1.1t/util/mkdef.pl b/src/openssl/openssl-1.1.1w/util/mkdef.pl similarity index 99% rename from src/openssl/openssl-1.1.1t/util/mkdef.pl rename to src/openssl/openssl-1.1.1w/util/mkdef.pl index 3ac79821b..2486412f7 100755 --- a/src/openssl/openssl-1.1.1t/util/mkdef.pl +++ b/src/openssl/openssl-1.1.1w/util/mkdef.pl @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -197,6 +197,7 @@ } $libname = $unified_info{sharednames}->{libcrypto} if $do_crypto; $libname = $unified_info{sharednames}->{libssl} if $do_ssl; +$libname .= $target{shlib_variant} || ""; if (!$libname) { if ($do_ssl) { diff --git a/src/openssl/openssl-1.1.1t/util/mkdir-p.pl b/src/openssl/openssl-1.1.1w/util/mkdir-p.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/util/mkdir-p.pl rename to src/openssl/openssl-1.1.1w/util/mkdir-p.pl diff --git a/src/openssl/openssl-1.1.1t/util/mkerr.pl b/src/openssl/openssl-1.1.1w/util/mkerr.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/util/mkerr.pl rename to src/openssl/openssl-1.1.1w/util/mkerr.pl diff --git a/src/openssl/openssl-1.1.1t/util/mkrc.pl b/src/openssl/openssl-1.1.1w/util/mkrc.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/util/mkrc.pl rename to src/openssl/openssl-1.1.1w/util/mkrc.pl diff --git a/src/openssl/openssl-1.1.1t/util/openssl-format-source b/src/openssl/openssl-1.1.1w/util/openssl-format-source similarity index 100% rename from src/openssl/openssl-1.1.1t/util/openssl-format-source rename to src/openssl/openssl-1.1.1w/util/openssl-format-source diff --git a/src/openssl/openssl-1.1.1t/util/openssl-update-copyright b/src/openssl/openssl-1.1.1w/util/openssl-update-copyright similarity index 100% rename from src/openssl/openssl-1.1.1t/util/openssl-update-copyright rename to src/openssl/openssl-1.1.1w/util/openssl-update-copyright diff --git a/src/openssl/openssl-1.1.1t/util/opensslwrap.sh b/src/openssl/openssl-1.1.1w/util/opensslwrap.sh similarity index 100% rename from src/openssl/openssl-1.1.1t/util/opensslwrap.sh rename to src/openssl/openssl-1.1.1w/util/opensslwrap.sh diff --git a/src/openssl/openssl-1.1.1t/util/perl/OpenSSL/Glob.pm b/src/openssl/openssl-1.1.1w/util/perl/OpenSSL/Glob.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/OpenSSL/Glob.pm rename to src/openssl/openssl-1.1.1w/util/perl/OpenSSL/Glob.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/OpenSSL/Test.pm b/src/openssl/openssl-1.1.1w/util/perl/OpenSSL/Test.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/OpenSSL/Test.pm rename to src/openssl/openssl-1.1.1w/util/perl/OpenSSL/Test.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/OpenSSL/Test/Simple.pm b/src/openssl/openssl-1.1.1w/util/perl/OpenSSL/Test/Simple.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/OpenSSL/Test/Simple.pm rename to src/openssl/openssl-1.1.1w/util/perl/OpenSSL/Test/Simple.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/OpenSSL/Test/Utils.pm b/src/openssl/openssl-1.1.1w/util/perl/OpenSSL/Test/Utils.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/OpenSSL/Test/Utils.pm rename to src/openssl/openssl-1.1.1w/util/perl/OpenSSL/Test/Utils.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/OpenSSL/Util/Pod.pm b/src/openssl/openssl-1.1.1w/util/perl/OpenSSL/Util/Pod.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/OpenSSL/Util/Pod.pm rename to src/openssl/openssl-1.1.1w/util/perl/OpenSSL/Util/Pod.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/OpenSSL/copyright.pm b/src/openssl/openssl-1.1.1w/util/perl/OpenSSL/copyright.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/OpenSSL/copyright.pm rename to src/openssl/openssl-1.1.1w/util/perl/OpenSSL/copyright.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/TLSProxy/Alert.pm b/src/openssl/openssl-1.1.1w/util/perl/TLSProxy/Alert.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/TLSProxy/Alert.pm rename to src/openssl/openssl-1.1.1w/util/perl/TLSProxy/Alert.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/TLSProxy/Certificate.pm b/src/openssl/openssl-1.1.1w/util/perl/TLSProxy/Certificate.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/TLSProxy/Certificate.pm rename to src/openssl/openssl-1.1.1w/util/perl/TLSProxy/Certificate.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/TLSProxy/CertificateRequest.pm b/src/openssl/openssl-1.1.1w/util/perl/TLSProxy/CertificateRequest.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/TLSProxy/CertificateRequest.pm rename to src/openssl/openssl-1.1.1w/util/perl/TLSProxy/CertificateRequest.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/TLSProxy/CertificateVerify.pm b/src/openssl/openssl-1.1.1w/util/perl/TLSProxy/CertificateVerify.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/TLSProxy/CertificateVerify.pm rename to src/openssl/openssl-1.1.1w/util/perl/TLSProxy/CertificateVerify.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/TLSProxy/ClientHello.pm b/src/openssl/openssl-1.1.1w/util/perl/TLSProxy/ClientHello.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/TLSProxy/ClientHello.pm rename to src/openssl/openssl-1.1.1w/util/perl/TLSProxy/ClientHello.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/TLSProxy/EncryptedExtensions.pm b/src/openssl/openssl-1.1.1w/util/perl/TLSProxy/EncryptedExtensions.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/TLSProxy/EncryptedExtensions.pm rename to src/openssl/openssl-1.1.1w/util/perl/TLSProxy/EncryptedExtensions.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/TLSProxy/Message.pm b/src/openssl/openssl-1.1.1w/util/perl/TLSProxy/Message.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/TLSProxy/Message.pm rename to src/openssl/openssl-1.1.1w/util/perl/TLSProxy/Message.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/TLSProxy/NewSessionTicket.pm b/src/openssl/openssl-1.1.1w/util/perl/TLSProxy/NewSessionTicket.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/TLSProxy/NewSessionTicket.pm rename to src/openssl/openssl-1.1.1w/util/perl/TLSProxy/NewSessionTicket.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/TLSProxy/Proxy.pm b/src/openssl/openssl-1.1.1w/util/perl/TLSProxy/Proxy.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/TLSProxy/Proxy.pm rename to src/openssl/openssl-1.1.1w/util/perl/TLSProxy/Proxy.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/TLSProxy/Record.pm b/src/openssl/openssl-1.1.1w/util/perl/TLSProxy/Record.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/TLSProxy/Record.pm rename to src/openssl/openssl-1.1.1w/util/perl/TLSProxy/Record.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/TLSProxy/ServerHello.pm b/src/openssl/openssl-1.1.1w/util/perl/TLSProxy/ServerHello.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/TLSProxy/ServerHello.pm rename to src/openssl/openssl-1.1.1w/util/perl/TLSProxy/ServerHello.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/TLSProxy/ServerKeyExchange.pm b/src/openssl/openssl-1.1.1w/util/perl/TLSProxy/ServerKeyExchange.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/TLSProxy/ServerKeyExchange.pm rename to src/openssl/openssl-1.1.1w/util/perl/TLSProxy/ServerKeyExchange.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/checkhandshake.pm b/src/openssl/openssl-1.1.1w/util/perl/checkhandshake.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/checkhandshake.pm rename to src/openssl/openssl-1.1.1w/util/perl/checkhandshake.pm diff --git a/src/openssl/openssl-1.1.1t/util/perl/with_fallback.pm b/src/openssl/openssl-1.1.1w/util/perl/with_fallback.pm similarity index 100% rename from src/openssl/openssl-1.1.1t/util/perl/with_fallback.pm rename to src/openssl/openssl-1.1.1w/util/perl/with_fallback.pm diff --git a/src/openssl/openssl-1.1.1t/util/private.num b/src/openssl/openssl-1.1.1w/util/private.num similarity index 100% rename from src/openssl/openssl-1.1.1t/util/private.num rename to src/openssl/openssl-1.1.1w/util/private.num diff --git a/src/openssl/openssl-1.1.1t/util/process_docs.pl b/src/openssl/openssl-1.1.1w/util/process_docs.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/util/process_docs.pl rename to src/openssl/openssl-1.1.1w/util/process_docs.pl diff --git a/src/openssl/openssl-1.1.1t/util/shlib_wrap.sh.in b/src/openssl/openssl-1.1.1w/util/shlib_wrap.sh.in similarity index 100% rename from src/openssl/openssl-1.1.1t/util/shlib_wrap.sh.in rename to src/openssl/openssl-1.1.1w/util/shlib_wrap.sh.in diff --git a/src/openssl/openssl-1.1.1t/util/su-filter.pl b/src/openssl/openssl-1.1.1w/util/su-filter.pl similarity index 100% rename from src/openssl/openssl-1.1.1t/util/su-filter.pl rename to src/openssl/openssl-1.1.1w/util/su-filter.pl diff --git a/src/openssl/openssl-1.1.1t/util/unlocal_shlib.com.in b/src/openssl/openssl-1.1.1w/util/unlocal_shlib.com.in similarity index 100% rename from src/openssl/openssl-1.1.1t/util/unlocal_shlib.com.in rename to src/openssl/openssl-1.1.1w/util/unlocal_shlib.com.in diff --git a/src/python/CVE-2023-24329.diff b/src/python/CVE-2023-24329.diff new file mode 100644 index 000000000..00c35914e --- /dev/null +++ b/src/python/CVE-2023-24329.diff @@ -0,0 +1,104 @@ +diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py +index e00fb7af..70bb451b 100644 +--- a/Lib/test/test_urlparse.py ++++ b/Lib/test/test_urlparse.py +@@ -602,6 +602,64 @@ class UrlParseTestCase(unittest.TestCase): + self.assertEqual(p.port, None) + self.assertEqual(p.geturl(), u"http://www.python.org/javascript:alert('msg')/#frag") + ++ def test_urlsplit_strip_url(self): ++ noise = "".join([chr(i) for i in range(0, 0x20 + 1)]) ++ base_url = "http://User:Pass@www.python.org:080/doc/?query=yes#frag" ++ ++ url = noise.decode("utf-8") + base_url ++ p = urlparse.urlsplit(url) ++ self.assertEqual(p.scheme, "http") ++ self.assertEqual(p.netloc, "User:Pass@www.python.org:080") ++ self.assertEqual(p.path, "/doc/") ++ self.assertEqual(p.query, "query=yes") ++ self.assertEqual(p.fragment, "frag") ++ self.assertEqual(p.username, "User") ++ self.assertEqual(p.password, "Pass") ++ self.assertEqual(p.hostname, "www.python.org") ++ self.assertEqual(p.port, 80) ++ self.assertEqual(p.geturl(), base_url) ++ ++ url = noise + base_url.encode("utf-8") ++ p = urlparse.urlsplit(url) ++ self.assertEqual(p.scheme, b"http") ++ self.assertEqual(p.netloc, b"User:Pass@www.python.org:080") ++ self.assertEqual(p.path, b"/doc/") ++ self.assertEqual(p.query, b"query=yes") ++ self.assertEqual(p.fragment, b"frag") ++ self.assertEqual(p.username, b"User") ++ self.assertEqual(p.password, b"Pass") ++ self.assertEqual(p.hostname, b"www.python.org") ++ self.assertEqual(p.port, 80) ++ self.assertEqual(p.geturl(), base_url.encode("utf-8")) ++ ++ # Test that trailing space is preserved as some applications rely on ++ # this within query strings. ++ query_spaces_url = "https://www.python.org:88/doc/?query= " ++ p = urlparse.urlsplit(noise.decode("utf-8") + query_spaces_url) ++ self.assertEqual(p.scheme, "https") ++ self.assertEqual(p.netloc, "www.python.org:88") ++ self.assertEqual(p.path, "/doc/") ++ self.assertEqual(p.query, "query= ") ++ self.assertEqual(p.port, 88) ++ self.assertEqual(p.geturl(), query_spaces_url) ++ ++ p = urlparse.urlsplit("www.pypi.org ") ++ # That "hostname" gets considered a "path" due to the ++ # trailing space and our existing logic... YUCK... ++ # and re-assembles via geturl aka unurlsplit into the original. ++ # django.core.validators.URLValidator (at least through v3.2) relies on ++ # this, for better or worse, to catch it in a ValidationError via its ++ # regular expressions. ++ # Here we test the basic round trip concept of such a trailing space. ++ self.assertEqual(urlparse.urlunsplit(p), "www.pypi.org ") ++ ++ # with scheme as cache-key ++ url = "//www.python.org/" ++ scheme = noise.decode("utf-8") + "https" + noise.decode("utf-8") ++ for _ in range(2): ++ p = urlparse.urlsplit(url, scheme=scheme) ++ self.assertEqual(p.scheme, "https") ++ self.assertEqual(p.geturl(), "https://www.python.org/") + + def test_attributes_bad_port(self): + """Check handling of non-integer ports.""" +diff --git a/Lib/urlparse.py b/Lib/urlparse.py +index 914ccd2c..5a3b322d 100644 +--- a/Lib/urlparse.py ++++ b/Lib/urlparse.py +@@ -30,6 +30,10 @@ scenarios for parsing, and for backward compatibility purposes, some + parsing quirks from older RFCs are retained. The testcases in + test_urlparse.py provides a good indicator of parsing behavior. + ++The WHATWG URL Parser spec should also be considered. We are not compliant with ++it either due to existing user code API behavior expectations (Hyrum's Law). ++It serves as a useful guide when making changes. ++ + """ + + import re +@@ -66,6 +70,10 @@ scheme_chars = ('abcdefghijklmnopqrstuvwxyz' + '0123456789' + '+-.') + ++# Leading and trailing C0 control and space to be stripped per WHATWG spec. ++# == "".join([chr(i) for i in range(0, 0x20 + 1)]) ++_WHATWG_C0_CONTROL_OR_SPACE = '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f ' ++ + # Unsafe bytes to be removed per WHATWG spec + _UNSAFE_URL_BYTES_TO_REMOVE = ['\t', '\r', '\n'] + +@@ -197,6 +205,8 @@ def urlsplit(url, scheme='', allow_fragments=True): + Return a 5-tuple: (scheme, netloc, path, query, fragment). + Note that we don't break the components up in smaller bits + (e.g. netloc is a single string) and we don't expand % escapes.""" ++ url = url.lstrip(_WHATWG_C0_CONTROL_OR_SPACE) ++ scheme = scheme.strip(_WHATWG_C0_CONTROL_OR_SPACE) + allow_fragments = bool(allow_fragments) + key = url, scheme, allow_fragments, type(url), type(scheme) + cached = _parse_cache.get(key, None) diff --git a/src/python/Python-2.7.18/Lib/ctypes/test/test_parameters.py b/src/python/Python-2.7.18/Lib/ctypes/test/test_parameters.py index 23c1b6e22..3399703d4 100644 --- a/src/python/Python-2.7.18/Lib/ctypes/test/test_parameters.py +++ b/src/python/Python-2.7.18/Lib/ctypes/test/test_parameters.py @@ -21,6 +21,49 @@ def tearDown(self): else: set_conversion_mode(*self.prev_conv_mode) + def test_parameter_repr(self): + from ctypes import ( + c_bool, + c_char, + c_wchar, + c_byte, + c_ubyte, + c_short, + c_ushort, + c_int, + c_uint, + c_long, + c_ulong, + c_longlong, + c_ulonglong, + c_float, + c_double, + c_longdouble, + c_char_p, + c_wchar_p, + c_void_p, + ) + self.assertRegexpMatches(repr(c_bool.from_param(True)), r"^$") + self.assertEqual(repr(c_char.from_param('a')), "") + self.assertRegexpMatches(repr(c_wchar.from_param('a')), r"^$") + self.assertEqual(repr(c_byte.from_param(98)), "") + self.assertEqual(repr(c_ubyte.from_param(98)), "") + self.assertEqual(repr(c_short.from_param(511)), "") + self.assertEqual(repr(c_ushort.from_param(511)), "") + self.assertRegexpMatches(repr(c_int.from_param(20000)), r"^$") + self.assertRegexpMatches(repr(c_uint.from_param(20000)), r"^$") + self.assertRegexpMatches(repr(c_long.from_param(20000)), r"^$") + self.assertRegexpMatches(repr(c_ulong.from_param(20000)), r"^$") + self.assertRegexpMatches(repr(c_longlong.from_param(20000)), r"^$") + self.assertRegexpMatches(repr(c_ulonglong.from_param(20000)), r"^$") + self.assertEqual(repr(c_float.from_param(1.5)), "") + self.assertEqual(repr(c_double.from_param(1.5)), "") + self.assertEqual(repr(c_double.from_param(1e300)), "") + self.assertRegexpMatches(repr(c_longdouble.from_param(1.5)), r"^$") + self.assertRegexpMatches(repr(c_char_p.from_param(b'hihi')), "^$") + self.assertRegexpMatches(repr(c_wchar_p.from_param('hihi')), "^$") + self.assertRegexpMatches(repr(c_void_p.from_param(0x12)), r"^$") + def test_subclasses(self): from ctypes import c_void_p, c_char_p diff --git a/src/python/Python-2.7.18/Lib/test/test_urlparse.py b/src/python/Python-2.7.18/Lib/test/test_urlparse.py index e00fb7af6..70bb451b7 100644 --- a/src/python/Python-2.7.18/Lib/test/test_urlparse.py +++ b/src/python/Python-2.7.18/Lib/test/test_urlparse.py @@ -602,6 +602,64 @@ def test_urlsplit_remove_unsafe_bytes(self): self.assertEqual(p.port, None) self.assertEqual(p.geturl(), u"http://www.python.org/javascript:alert('msg')/#frag") + def test_urlsplit_strip_url(self): + noise = "".join([chr(i) for i in range(0, 0x20 + 1)]) + base_url = "http://User:Pass@www.python.org:080/doc/?query=yes#frag" + + url = noise.decode("utf-8") + base_url + p = urlparse.urlsplit(url) + self.assertEqual(p.scheme, "http") + self.assertEqual(p.netloc, "User:Pass@www.python.org:080") + self.assertEqual(p.path, "/doc/") + self.assertEqual(p.query, "query=yes") + self.assertEqual(p.fragment, "frag") + self.assertEqual(p.username, "User") + self.assertEqual(p.password, "Pass") + self.assertEqual(p.hostname, "www.python.org") + self.assertEqual(p.port, 80) + self.assertEqual(p.geturl(), base_url) + + url = noise + base_url.encode("utf-8") + p = urlparse.urlsplit(url) + self.assertEqual(p.scheme, b"http") + self.assertEqual(p.netloc, b"User:Pass@www.python.org:080") + self.assertEqual(p.path, b"/doc/") + self.assertEqual(p.query, b"query=yes") + self.assertEqual(p.fragment, b"frag") + self.assertEqual(p.username, b"User") + self.assertEqual(p.password, b"Pass") + self.assertEqual(p.hostname, b"www.python.org") + self.assertEqual(p.port, 80) + self.assertEqual(p.geturl(), base_url.encode("utf-8")) + + # Test that trailing space is preserved as some applications rely on + # this within query strings. + query_spaces_url = "https://www.python.org:88/doc/?query= " + p = urlparse.urlsplit(noise.decode("utf-8") + query_spaces_url) + self.assertEqual(p.scheme, "https") + self.assertEqual(p.netloc, "www.python.org:88") + self.assertEqual(p.path, "/doc/") + self.assertEqual(p.query, "query= ") + self.assertEqual(p.port, 88) + self.assertEqual(p.geturl(), query_spaces_url) + + p = urlparse.urlsplit("www.pypi.org ") + # That "hostname" gets considered a "path" due to the + # trailing space and our existing logic... YUCK... + # and re-assembles via geturl aka unurlsplit into the original. + # django.core.validators.URLValidator (at least through v3.2) relies on + # this, for better or worse, to catch it in a ValidationError via its + # regular expressions. + # Here we test the basic round trip concept of such a trailing space. + self.assertEqual(urlparse.urlunsplit(p), "www.pypi.org ") + + # with scheme as cache-key + url = "//www.python.org/" + scheme = noise.decode("utf-8") + "https" + noise.decode("utf-8") + for _ in range(2): + p = urlparse.urlsplit(url, scheme=scheme) + self.assertEqual(p.scheme, "https") + self.assertEqual(p.geturl(), "https://www.python.org/") def test_attributes_bad_port(self): """Check handling of non-integer ports.""" diff --git a/src/python/Python-2.7.18/Lib/urlparse.py b/src/python/Python-2.7.18/Lib/urlparse.py index 914ccd2c6..5a3b322d8 100644 --- a/src/python/Python-2.7.18/Lib/urlparse.py +++ b/src/python/Python-2.7.18/Lib/urlparse.py @@ -30,6 +30,10 @@ parsing quirks from older RFCs are retained. The testcases in test_urlparse.py provides a good indicator of parsing behavior. +The WHATWG URL Parser spec should also be considered. We are not compliant with +it either due to existing user code API behavior expectations (Hyrum's Law). +It serves as a useful guide when making changes. + """ import re @@ -66,6 +70,10 @@ '0123456789' '+-.') +# Leading and trailing C0 control and space to be stripped per WHATWG spec. +# == "".join([chr(i) for i in range(0, 0x20 + 1)]) +_WHATWG_C0_CONTROL_OR_SPACE = '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f ' + # Unsafe bytes to be removed per WHATWG spec _UNSAFE_URL_BYTES_TO_REMOVE = ['\t', '\r', '\n'] @@ -197,6 +205,8 @@ def urlsplit(url, scheme='', allow_fragments=True): Return a 5-tuple: (scheme, netloc, path, query, fragment). Note that we don't break the components up in smaller bits (e.g. netloc is a single string) and we don't expand % escapes.""" + url = url.lstrip(_WHATWG_C0_CONTROL_OR_SPACE) + scheme = scheme.strip(_WHATWG_C0_CONTROL_OR_SPACE) allow_fragments = bool(allow_fragments) key = url, scheme, allow_fragments, type(url), type(scheme) cached = _parse_cache.get(key, None) diff --git a/src/python/Python-2.7.18/Modules/_ctypes/callproc.c b/src/python/Python-2.7.18/Modules/_ctypes/callproc.c index 066fefc0c..5cc3c4cf6 100644 --- a/src/python/Python-2.7.18/Modules/_ctypes/callproc.c +++ b/src/python/Python-2.7.18/Modules/_ctypes/callproc.c @@ -460,50 +460,62 @@ PyCArg_dealloc(PyCArgObject *self) static PyObject * PyCArg_repr(PyCArgObject *self) { - char buffer[256]; switch(self->tag) { case 'b': case 'B': - sprintf(buffer, "", + return PyString_FromFormat("", self->tag, self->value.b); - break; case 'h': case 'H': - sprintf(buffer, "", + return PyString_FromFormat("", self->tag, self->value.h); - break; case 'i': case 'I': - sprintf(buffer, "", + return PyString_FromFormat("", self->tag, self->value.i); - break; case 'l': case 'L': - sprintf(buffer, "", + return PyString_FromFormat("", self->tag, self->value.l); - break; #ifdef HAVE_LONG_LONG case 'q': case 'Q': - sprintf(buffer, - "", + return PyString_FromFormat("", self->tag, self->value.q); - break; #endif case 'd': - sprintf(buffer, "", - self->tag, self->value.d); - break; - case 'f': - sprintf(buffer, "", - self->tag, self->value.f); - break; - + case 'f': { + PyObject *s = PyString_FromFormat("tag); + if (s == NULL) { + return NULL; + } + PyObject *f = PyFloat_FromDouble((self->tag == 'f') ? self->value.f : self->value.d); + if (f == NULL) { + Py_DECREF(s); + return NULL; + } + PyObject *r = PyObject_Repr(f); + Py_DECREF(f); + if (r == NULL) { + Py_DECREF(s); + return NULL; + } + PyString_ConcatAndDel(&s, r); + if (s == NULL) { + return NULL; + } + r = PyString_FromString(")>"); + if (r == NULL) { + Py_DECREF(s); + return NULL; + } + PyString_ConcatAndDel(&s, r); + return s; + } case 'c': - sprintf(buffer, "", + return PyString_FromFormat("", self->tag, self->value.c); - break; /* Hm, are these 'z' and 'Z' codes useful at all? Shouldn't they be replaced by the functionality of c_string @@ -512,16 +524,13 @@ PyCArg_repr(PyCArgObject *self) case 'z': case 'Z': case 'P': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.p); - break; default: - sprintf(buffer, "", - self->tag, self); - break; + return PyString_FromFormat("", + (unsigned char)self->tag, (void *)self); } - return PyString_FromString(buffer); } static PyMemberDef PyCArgType_members[] = { diff --git a/src/python/README b/src/python/README index a03dd805b..73969b6b4 100644 --- a/src/python/README +++ b/src/python/README @@ -3,7 +3,9 @@ Building Python on Linux/Unix On these OS'es, we build Python from its sources ourselves. As Python 2.7 is no longer maintained upstream, security patches are lifted from -ActiveState's fork: https://github.com/ActiveState/cpython/commits/2.7. +ActiveState's fork: https://github.com/ActiveState/cpython/commits/2.7 and +https://git.centos.org/rpms/python/blob/c7/f/SOURCES. Another relevant source: +https://packages.debian.org/bullseye/python2.7-minimal. E.g. to fix CVE-2020-10735 from https://github.com/ActiveState/cpython/pull/18, use https://github.com/ActiveState/cpython/pull/18.diff to save the patch diff --git a/src/sqlite/SQLite-3.40.1/sqlite3.1 b/src/sqlite/SQLite-3.40.1/sqlite3.1 deleted file mode 100644 index 80353b0ee..000000000 --- a/src/sqlite/SQLite-3.40.1/sqlite3.1 +++ /dev/null @@ -1,286 +0,0 @@ -.\" Hey, EMACS: -*- nroff -*- -.\" First parameter, NAME, should be all caps -.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection -.\" other parameters are allowed: see man(7), man(1) -.TH SQLITE3 1 "Fri Oct 31 10:41:31 EDT 2014" -.\" Please adjust this date whenever revising the manpage. -.\" -.\" Some roff macros, for reference: -.\" .nh disable hyphenation -.\" .hy enable hyphenation -.\" .ad l left justify -.\" .ad b justify to both left and right margins -.\" .nf disable filling -.\" .fi enable filling -.\" .br insert line break -.\" .sp insert n+1 empty lines -.\" for manpage-specific macros, see man(7) -.SH NAME -.B sqlite3 -\- A command line interface for SQLite version 3 - -.SH SYNOPSIS -.B sqlite3 -.RI [ options ] -.RI [ databasefile ] -.RI [ SQL ] - -.SH SUMMARY -.PP -.B sqlite3 -is a terminal-based front-end to the SQLite library that can evaluate -queries interactively and display the results in multiple formats. -.B sqlite3 -can also be used within shell scripts and other applications to provide -batch processing features. - -.SH DESCRIPTION -To start a -.B sqlite3 -interactive session, invoke the -.B sqlite3 -command and optionally provide the name of a database file. If the -database file does not exist, it will be created. If the database file -does exist, it will be opened. - -For example, to create a new database file named "mydata.db", create -a table named "memos" and insert a couple of records into that table: -.sp -$ -.B sqlite3 mydata.db -.br -SQLite version 3.8.8 -.br -Enter ".help" for instructions -.br -sqlite> -.B create table memos(text, priority INTEGER); -.br -sqlite> -.B insert into memos values('deliver project description', 10); -.br -sqlite> -.B insert into memos values('lunch with Christine', 100); -.br -sqlite> -.B select * from memos; -.br -deliver project description|10 -.br -lunch with Christine|100 -.br -sqlite> -.sp - -If no database name is supplied, the ATTACH sql command can be used -to attach to existing or create new database files. ATTACH can also -be used to attach to multiple databases within the same interactive -session. This is useful for migrating data between databases, -possibly changing the schema along the way. - -Optionally, a SQL statement or set of SQL statements can be supplied as -a single argument. Multiple statements should be separated by -semi-colons. - -For example: -.sp -$ -.B sqlite3 -line mydata.db 'select * from memos where priority > 20;' -.br - text = lunch with Christine -.br -priority = 100 -.br -.sp - -.SS SQLITE META-COMMANDS -.PP -The interactive interpreter offers a set of meta-commands that can be -used to control the output format, examine the currently attached -database files, or perform administrative operations upon the -attached databases (such as rebuilding indices). Meta-commands are -always prefixed with a dot (.). - -A list of available meta-commands can be viewed at any time by issuing -the '.help' command. For example: -.sp -sqlite> -.B .help -.nf -.tr %. -%backup ?DB? FILE Backup DB (default "main") to FILE -%bail on|off Stop after hitting an error. Default OFF -%clone NEWDB Clone data into NEWDB from the existing database -%databases List names and files of attached databases -%dump ?TABLE? ... Dump the database in an SQL text format - If TABLE specified, only dump tables matching - LIKE pattern TABLE. -%echo on|off Turn command echo on or off -%eqp on|off Enable or disable automatic EXPLAIN QUERY PLAN -%exit Exit this program -%explain ?on|off? Turn output mode suitable for EXPLAIN on or off. - With no args, it turns EXPLAIN on. -%fullschema Show schema and the content of sqlite_stat tables -%headers on|off Turn display of headers on or off -%help Show this message -%import FILE TABLE Import data from FILE into TABLE -%indices ?TABLE? Show names of all indices - If TABLE specified, only show indices for tables - matching LIKE pattern TABLE. -%load FILE ?ENTRY? Load an extension library -%log FILE|off Turn logging on or off. FILE can be stderr/stdout -%mode MODE ?TABLE? Set output mode where MODE is one of: - csv Comma-separated values - column Left-aligned columns. (See .width) - html HTML code - insert SQL insert statements for TABLE - line One value per line - list Values delimited by .separator string - tabs Tab-separated values - tcl TCL list elements -%nullvalue STRING Use STRING in place of NULL values -%once FILENAME Output for the next SQL command only to FILENAME -%open ?FILENAME? Close existing database and reopen FILENAME -%output ?FILENAME? Send output to FILENAME or stdout -%print STRING... Print literal STRING -%prompt MAIN CONTINUE Replace the standard prompts -%quit Exit this program -%read FILENAME Execute SQL in FILENAME -%restore ?DB? FILE Restore content of DB (default "main") from FILE -%save FILE Write in-memory database into FILE -%schema ?TABLE? Show the CREATE statements - If TABLE specified, only show tables matching - LIKE pattern TABLE. -%separator STRING ?NL? Change separator used by output mode and .import - NL is the end-of-line mark for CSV -%shell CMD ARGS... Run CMD ARGS... in a system shell -%show Show the current values for various settings -%stats on|off Turn stats on or off -%system CMD ARGS... Run CMD ARGS... in a system shell -%tables ?TABLE? List names of tables - If TABLE specified, only list tables matching - LIKE pattern TABLE. -%timeout MS Try opening locked tables for MS milliseconds -%timer on|off Turn SQL timer on or off -%trace FILE|off Output each SQL statement as it is run -%vfsname ?AUX? Print the name of the VFS stack -%width NUM1 NUM2 ... Set column widths for "column" mode - Negative values right-justify -sqlite> -.sp -.fi -.SH OPTIONS -.B sqlite3 -has the following options: -.TP -.B \-bail -Stop after hitting an error. -.TP -.B \-batch -Force batch I/O. -.TP -.B \-column -Query results will be displayed in a table like form, using -whitespace characters to separate the columns and align the -output. -.TP -.BI \-cmd\ command -run -.I command -before reading stdin -.TP -.B \-csv -Set output mode to CSV (comma separated values). -.TP -.B \-echo -Print commands before execution. -.TP -.BI \-init\ file -Read and execute commands from -.I file -, which can contain a mix of SQL statements and meta-commands. -.TP -.B \-[no]header -Turn headers on or off. -.TP -.B \-help -Show help on options and exit. -.TP -.B \-html -Query results will be output as simple HTML tables. -.TP -.B \-interactive -Force interactive I/O. -.TP -.B \-line -Query results will be displayed with one value per line, rows -separated by a blank line. Designed to be easily parsed by -scripts or other programs -.TP -.B \-list -Query results will be displayed with the separator (|, by default) -character between each field value. The default. -.TP -.BI \-mmap\ N -Set default mmap size to -.I N -\. -.TP -.BI \-nullvalue\ string -Set string used to represent NULL values. Default is '' -(empty string). -.TP -.BI \-separator\ separator -Set output field separator. Default is '|'. -.TP -.B \-stats -Print memory stats before each finalize. -.TP -.B \-version -Show SQLite version. -.TP -.BI \-vfs\ name -Use -.I name -as the default VFS. - - -.SH INIT FILE -.B sqlite3 -reads an initialization file to set the configuration of the -interactive environment. Throughout initialization, any previously -specified setting can be overridden. The sequence of initialization is -as follows: - -o The default configuration is established as follows: - -.sp -.nf -.cc | -mode = LIST -separator = "|" -main prompt = "sqlite> " -continue prompt = " ...> " -|cc . -.sp -.fi - -o If the file -.B ~/.sqliterc -exists, it is processed first. -can be found in the user's home directory, it is -read and processed. It should generally only contain meta-commands. - -o If the -init option is present, the specified file is processed. - -o All other command line options are processed. - -.SH SEE ALSO -http://www.sqlite.org/cli.html -.br -The sqlite3-doc package. -.SH AUTHOR -This manual page was originally written by Andreas Rottmann -, for the Debian GNU/Linux system (but may be used -by others). It was subsequently revised by Bill Bumgarner and -further updated by Laszlo Boszormenyi . diff --git a/src/sqlite/SQLite-3.40.1/INSTALL b/src/sqlite/SQLite-3.43.1/INSTALL similarity index 100% rename from src/sqlite/SQLite-3.40.1/INSTALL rename to src/sqlite/SQLite-3.43.1/INSTALL diff --git a/src/sqlite/SQLite-3.40.1/Makefile.am b/src/sqlite/SQLite-3.43.1/Makefile.am similarity index 85% rename from src/sqlite/SQLite-3.40.1/Makefile.am rename to src/sqlite/SQLite-3.43.1/Makefile.am index 694419b27..1eaa560ff 100644 --- a/src/sqlite/SQLite-3.40.1/Makefile.am +++ b/src/sqlite/SQLite-3.43.1/Makefile.am @@ -9,7 +9,7 @@ sqlite3_SOURCES = shell.c sqlite3.h EXTRA_sqlite3_SOURCES = sqlite3.c sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@ sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@ -sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) +sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_DQS=0 -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) include_HEADERS = sqlite3.h sqlite3ext.h diff --git a/src/sqlite/SQLite-3.40.1/Makefile.fallback b/src/sqlite/SQLite-3.43.1/Makefile.fallback similarity index 100% rename from src/sqlite/SQLite-3.40.1/Makefile.fallback rename to src/sqlite/SQLite-3.43.1/Makefile.fallback diff --git a/src/sqlite/SQLite-3.40.1/Makefile.in b/src/sqlite/SQLite-3.43.1/Makefile.in similarity index 99% rename from src/sqlite/SQLite-3.40.1/Makefile.in rename to src/sqlite/SQLite-3.43.1/Makefile.in index d45c6b8f4..fe708a0a9 100644 --- a/src/sqlite/SQLite-3.40.1/Makefile.in +++ b/src/sqlite/SQLite-3.43.1/Makefile.in @@ -371,7 +371,7 @@ sqlite3_SOURCES = shell.c sqlite3.h EXTRA_sqlite3_SOURCES = sqlite3.c sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@ sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@ -sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) +sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_DQS=0 -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB $(SHELL_CFLAGS) include_HEADERS = sqlite3.h sqlite3ext.h EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc sqlite3rc.h README.txt Replace.cs Makefile.fallback pkgconfigdir = ${libdir}/pkgconfig diff --git a/src/sqlite/SQLite-3.40.1/Makefile.msc b/src/sqlite/SQLite-3.43.1/Makefile.msc similarity index 98% rename from src/sqlite/SQLite-3.40.1/Makefile.msc rename to src/sqlite/SQLite-3.43.1/Makefile.msc index e36eb21ea..13663d877 100644 --- a/src/sqlite/SQLite-3.40.1/Makefile.msc +++ b/src/sqlite/SQLite-3.43.1/Makefile.msc @@ -52,6 +52,13 @@ MINIMAL_AMALGAMATION = 0 USE_STDCALL = 0 !ENDIF +# Set this non-0 to use structured exception handling (SEH) for WAL mode +# in the core library. +# +!IFNDEF USE_SEH +USE_SEH = 1 +!ENDIF + # Set this non-0 to have the shell executable link against the core dynamic # link library. # @@ -180,6 +187,12 @@ WIN32HEAP = 0 OSTRACE = 0 !ENDIF +# enable address sanitizer using ASAN=1 on the command-line. +# +!IFNDEF ASAN +ASAN = 0 +!ENDIF + # Set this to one of the following values to enable various debugging # features. Each level includes the debugging options from the previous # levels. Currently, the recognized values for DEBUG are: @@ -311,6 +324,13 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_MATH_FUNCTIONS OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RBU=1 !ENDIF +# Should structured exception handling (SEH) be enabled for WAL mode in +# the core library? +# +!IF $(USE_SEH)!=0 +OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_USE_SEH=1 +!ENDIF + # These are the "extended" SQLite compilation options used when compiling for # the Windows 10 platform. # @@ -718,6 +738,13 @@ RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1 !ENDIF +# Address sanitizer if ASAN=1 +# +!IF $(ASAN)>0 +TCC = $(TCC) /fsanitize=address +!ENDIF + + # Compiler options needed for programs that use the readline() library. # !IFNDEF READLINE_FLAGS @@ -955,6 +982,7 @@ LIBRESOBJS = # when the shell is not being dynamically linked. # !IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0 +SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_DQS=0 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_FTS4=1 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC=1 diff --git a/src/sqlite/SQLite-3.40.1/README.txt b/src/sqlite/SQLite-3.43.1/README.txt similarity index 100% rename from src/sqlite/SQLite-3.40.1/README.txt rename to src/sqlite/SQLite-3.43.1/README.txt diff --git a/src/sqlite/SQLite-3.40.1/Replace.cs b/src/sqlite/SQLite-3.43.1/Replace.cs similarity index 100% rename from src/sqlite/SQLite-3.40.1/Replace.cs rename to src/sqlite/SQLite-3.43.1/Replace.cs diff --git a/src/sqlite/SQLite-3.40.1/aclocal.m4 b/src/sqlite/SQLite-3.43.1/aclocal.m4 similarity index 100% rename from src/sqlite/SQLite-3.40.1/aclocal.m4 rename to src/sqlite/SQLite-3.43.1/aclocal.m4 diff --git a/src/sqlite/SQLite-3.40.1/compile b/src/sqlite/SQLite-3.43.1/compile similarity index 100% rename from src/sqlite/SQLite-3.40.1/compile rename to src/sqlite/SQLite-3.43.1/compile diff --git a/src/sqlite/SQLite-3.40.1/config.guess b/src/sqlite/SQLite-3.43.1/config.guess similarity index 100% rename from src/sqlite/SQLite-3.40.1/config.guess rename to src/sqlite/SQLite-3.43.1/config.guess diff --git a/src/sqlite/SQLite-3.40.1/config.sub b/src/sqlite/SQLite-3.43.1/config.sub similarity index 100% rename from src/sqlite/SQLite-3.40.1/config.sub rename to src/sqlite/SQLite-3.43.1/config.sub diff --git a/src/sqlite/SQLite-3.40.1/configure b/src/sqlite/SQLite-3.43.1/configure similarity index 99% rename from src/sqlite/SQLite-3.40.1/configure rename to src/sqlite/SQLite-3.43.1/configure index 13ff272ad..39694c067 100755 --- a/src/sqlite/SQLite-3.40.1/configure +++ b/src/sqlite/SQLite-3.43.1/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.40.1. +# Generated by GNU Autoconf 2.71 for sqlite 3.43.1. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.40.1' -PACKAGE_STRING='sqlite 3.40.1' +PACKAGE_VERSION='3.43.1' +PACKAGE_STRING='sqlite 3.43.1' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1367,7 +1367,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.40.1 to adapt to many kinds of systems. +\`configure' configures sqlite 3.43.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1438,7 +1438,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.40.1:";; + short | recursive ) echo "Configuration of sqlite 3.43.1:";; esac cat <<\_ACEOF @@ -1563,7 +1563,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.40.1 +sqlite configure 3.43.1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1833,7 +1833,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.40.1, which was +It was created by sqlite $as_me 3.43.1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3106,7 +3106,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.40.1' + VERSION='3.43.1' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15314,7 +15314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.40.1, which was +This file was extended by sqlite $as_me 3.43.1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15373,7 +15373,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.40.1 +sqlite config.status 3.43.1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/src/sqlite/SQLite-3.40.1/configure.ac b/src/sqlite/SQLite-3.43.1/configure.ac similarity index 99% rename from src/sqlite/SQLite-3.40.1/configure.ac rename to src/sqlite/SQLite-3.43.1/configure.ac index bb8a90eba..3d7da8b98 100644 --- a/src/sqlite/SQLite-3.40.1/configure.ac +++ b/src/sqlite/SQLite-3.43.1/configure.ac @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.40.1, http://www.sqlite.org) +AC_INIT(sqlite, 3.43.1, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) diff --git a/src/sqlite/SQLite-3.40.1/depcomp b/src/sqlite/SQLite-3.43.1/depcomp similarity index 100% rename from src/sqlite/SQLite-3.40.1/depcomp rename to src/sqlite/SQLite-3.43.1/depcomp diff --git a/src/sqlite/SQLite-3.40.1/install-sh b/src/sqlite/SQLite-3.43.1/install-sh similarity index 100% rename from src/sqlite/SQLite-3.40.1/install-sh rename to src/sqlite/SQLite-3.43.1/install-sh diff --git a/src/sqlite/SQLite-3.40.1/ltmain.sh b/src/sqlite/SQLite-3.43.1/ltmain.sh similarity index 100% rename from src/sqlite/SQLite-3.40.1/ltmain.sh rename to src/sqlite/SQLite-3.43.1/ltmain.sh diff --git a/src/sqlite/SQLite-3.40.1/missing b/src/sqlite/SQLite-3.43.1/missing similarity index 100% rename from src/sqlite/SQLite-3.40.1/missing rename to src/sqlite/SQLite-3.43.1/missing diff --git a/src/sqlite/SQLite-3.40.1/shell.c b/src/sqlite/SQLite-3.43.1/shell.c similarity index 90% rename from src/sqlite/SQLite-3.40.1/shell.c rename to src/sqlite/SQLite-3.43.1/shell.c index 63f708c0b..6b2cdca83 100644 --- a/src/sqlite/SQLite-3.40.1/shell.c +++ b/src/sqlite/SQLite-3.43.1/shell.c @@ -39,7 +39,7 @@ typedef unsigned short int u16; /* ** Optionally #include a user-defined header, whereby compilation options -** may be set prior to where they take effect, but after platform setup. +** may be set prior to where they take effect, but after platform setup. ** If SQLITE_CUSTOM_INCLUDE=? is defined, its value names the #include ** file. Note that this macro has a like effect on sqlite3.c compilation. */ @@ -117,6 +117,7 @@ typedef unsigned short int u16; #include #include #include +#include #include "sqlite3.h" typedef sqlite3_int64 i64; typedef sqlite3_uint64 u64; @@ -129,7 +130,7 @@ typedef unsigned char u8; #if !defined(_WIN32) && !defined(WIN32) # include -# if !defined(__RTP__) && !defined(_WRS_KERNEL) +# if !defined(__RTP__) && !defined(_WRS_KERNEL) && !defined(SQLITE_WASI) # include # endif #endif @@ -184,6 +185,14 @@ typedef unsigned char u8; # define SHELL_USE_LOCAL_GETLINE 1 #endif +#ifndef deliberate_fall_through +/* Quiet some compilers about some of our intentional code. */ +# if defined(GCC_VERSION) && GCC_VERSION>=7000000 +# define deliberate_fall_through __attribute__((fallthrough)); +# else +# define deliberate_fall_through +# endif +#endif #if defined(_WIN32) || defined(WIN32) # if SQLITE_OS_WINRT @@ -210,7 +219,7 @@ typedef unsigned char u8; /* Make sure isatty() has a prototype. */ extern int isatty(int); -# if !defined(__RTP__) && !defined(_WRS_KERNEL) +# if !defined(__RTP__) && !defined(_WRS_KERNEL) && !defined(SQLITE_WASI) /* popen and pclose are not C89 functions and so are ** sometimes omitted from the header */ extern FILE *popen(const char*,const char*); @@ -237,6 +246,8 @@ typedef unsigned char u8; #if SQLITE_OS_WINRT #include #endif +#undef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN #include /* string conversion routines only needed on Win32 */ @@ -451,11 +462,25 @@ static void endTimer(void){ static int bail_on_error = 0; /* -** Threat stdin as an interactive input if the following variable +** Treat stdin as an interactive input if the following variable ** is true. Otherwise, assume stdin is connected to a file or pipe. */ static int stdin_is_interactive = 1; +#if (defined(_WIN32) || defined(WIN32)) && SHELL_USE_LOCAL_GETLINE \ + && !defined(SHELL_OMIT_WIN_UTF8) +# define SHELL_WIN_UTF8_OPT 1 +#else +# define SHELL_WIN_UTF8_OPT 0 +#endif + +#if SHELL_WIN_UTF8_OPT +/* +** Setup console for UTF-8 input/output when following variable true. +*/ +static int console_utf8 = 0; +#endif + /* ** On Windows systems we have to know if standard output is a console ** in order to translate UTF-8 into MBCS. The following variable is @@ -485,19 +510,253 @@ static char *Argv0; ** Prompt strings. Initialized in main. Settable with ** .prompt main continue */ -static char mainPrompt[20]; /* First line prompt. default: "sqlite> "*/ -static char continuePrompt[20]; /* Continuation prompt. default: " ...> " */ +#define PROMPT_LEN_MAX 20 +/* First line prompt. default: "sqlite> " */ +static char mainPrompt[PROMPT_LEN_MAX]; +/* Continuation prompt. default: " ...> " */ +static char continuePrompt[PROMPT_LEN_MAX]; + +/* This is variant of the standard-library strncpy() routine with the +** one change that the destination string is always zero-terminated, even +** if there is no zero-terminator in the first n-1 characters of the source +** string. +*/ +static char *shell_strncpy(char *dest, const char *src, size_t n){ + size_t i; + for(i=0; iinParenLevel += ni; + if( ni==0 ) p->inParenLevel = 0; + p->zScannerAwaits = 0; +} + +/* Record that a lexeme is opened, or closed with args==0. */ +static void setLexemeOpen(struct DynaPrompt *p, char *s, char c){ + if( s!=0 || c==0 ){ + p->zScannerAwaits = s; + p->acAwait[0] = 0; + }else{ + p->acAwait[0] = c; + p->zScannerAwaits = p->acAwait; + } +} + +/* Upon demand, derive the continuation prompt to display. */ +static char *dynamicContinuePrompt(void){ + if( continuePrompt[0]==0 + || (dynPrompt.zScannerAwaits==0 && dynPrompt.inParenLevel == 0) ){ + return continuePrompt; + }else{ + if( dynPrompt.zScannerAwaits ){ + size_t ncp = strlen(continuePrompt); + size_t ndp = strlen(dynPrompt.zScannerAwaits); + if( ndp > ncp-3 ) return continuePrompt; + strcpy(dynPrompt.dynamicPrompt, dynPrompt.zScannerAwaits); + while( ndp<3 ) dynPrompt.dynamicPrompt[ndp++] = ' '; + shell_strncpy(dynPrompt.dynamicPrompt+3, continuePrompt+3, + PROMPT_LEN_MAX-4); + }else{ + if( dynPrompt.inParenLevel>9 ){ + shell_strncpy(dynPrompt.dynamicPrompt, "(..", 4); + }else if( dynPrompt.inParenLevel<0 ){ + shell_strncpy(dynPrompt.dynamicPrompt, ")x!", 4); + }else{ + shell_strncpy(dynPrompt.dynamicPrompt, "(x.", 4); + dynPrompt.dynamicPrompt[2] = (char)('0'+dynPrompt.inParenLevel); + } + shell_strncpy(dynPrompt.dynamicPrompt+3, continuePrompt+3, PROMPT_LEN_MAX-4); + } + } + return dynPrompt.dynamicPrompt; +} +#endif /* !defined(SQLITE_OMIT_DYNAPROMPT) */ + +#if SHELL_WIN_UTF8_OPT +/* Following struct is used for -utf8 operation. */ +static struct ConsoleState { + int stdinEof; /* EOF has been seen on console input */ + int infsMode; /* Input file stream mode upon shell start */ + UINT inCodePage; /* Input code page upon shell start */ + UINT outCodePage; /* Output code page upon shell start */ + HANDLE hConsoleIn; /* Console input handle */ + DWORD consoleMode; /* Console mode upon shell start */ +} conState = { 0, 0, 0, 0, INVALID_HANDLE_VALUE, 0 }; + +#ifndef _O_U16TEXT /* For build environments lacking this constant: */ +# define _O_U16TEXT 0x20000 +#endif + +/* +** Prepare console, (if known to be a WIN32 console), for UTF-8 +** input (from either typing or suitable paste operations) and for +** UTF-8 rendering. This may "fail" with a message to stderr, where +** the preparation is not done and common "code page" issues occur. +*/ +static void console_prepare(void){ + HANDLE hCI = GetStdHandle(STD_INPUT_HANDLE); + DWORD consoleMode = 0; + if( isatty(0) && GetFileType(hCI)==FILE_TYPE_CHAR + && GetConsoleMode( hCI, &consoleMode) ){ + if( !IsValidCodePage(CP_UTF8) ){ + fprintf(stderr, "Cannot use UTF-8 code page.\n"); + console_utf8 = 0; + return; + } + conState.hConsoleIn = hCI; + conState.consoleMode = consoleMode; + conState.inCodePage = GetConsoleCP(); + conState.outCodePage = GetConsoleOutputCP(); + SetConsoleCP(CP_UTF8); + SetConsoleOutputCP(CP_UTF8); + consoleMode |= ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT; + SetConsoleMode(conState.hConsoleIn, consoleMode); + conState.infsMode = _setmode(_fileno(stdin), _O_U16TEXT); + console_utf8 = 1; + }else{ + console_utf8 = 0; + } +} + +/* +** Undo the effects of console_prepare(), if any. +*/ +static void SQLITE_CDECL console_restore(void){ + if( console_utf8 && conState.inCodePage!=0 + && conState.hConsoleIn!=INVALID_HANDLE_VALUE ){ + _setmode(_fileno(stdin), conState.infsMode); + SetConsoleCP(conState.inCodePage); + SetConsoleOutputCP(conState.outCodePage); + SetConsoleMode(conState.hConsoleIn, conState.consoleMode); + /* Avoid multiple calls. */ + conState.hConsoleIn = INVALID_HANDLE_VALUE; + conState.consoleMode = 0; + console_utf8 = 0; + } +} + +/* +** Collect input like fgets(...) with special provisions for input +** from the Windows console to get around its strange coding issues. +** Defers to plain fgets() when input is not interactive or when the +** startup option, -utf8, has not been provided or taken effect. +*/ +static char* utf8_fgets(char *buf, int ncmax, FILE *fin){ + if( fin==0 ) fin = stdin; + if( fin==stdin && stdin_is_interactive && console_utf8 ){ +# define SQLITE_IALIM 150 + wchar_t wbuf[SQLITE_IALIM]; + int lend = 0; + int noc = 0; + if( ncmax==0 || conState.stdinEof ) return 0; + buf[0] = 0; + while( noc SQLITE_IALIM*4+1 + noc) + ? SQLITE_IALIM : (ncmax-1 - noc)/4; +# undef SQLITE_IALIM + DWORD nbr = 0; + BOOL bRC = ReadConsoleW(conState.hConsoleIn, wbuf, na, &nbr, 0); + if( !bRC || (noc==0 && nbr==0) ) return 0; + if( nbr > 0 ){ + int nmb = WideCharToMultiByte(CP_UTF8,WC_COMPOSITECHECK|WC_DEFAULTCHAR, + wbuf,nbr,0,0,0,0); + if( nmb !=0 && noc+nmb <= ncmax ){ + int iseg = noc; + nmb = WideCharToMultiByte(CP_UTF8,WC_COMPOSITECHECK|WC_DEFAULTCHAR, + wbuf,nbr,buf+noc,nmb,0,0); + noc += nmb; + /* Fixup line-ends as coded by Windows for CR (or "Enter".)*/ + if( noc > 0 ){ + if( buf[noc-1]=='\n' ){ + lend = 1; + if( noc > 1 && buf[noc-2]=='\r' ){ + buf[noc-2] = '\n'; + --noc; + } + } + } + /* Check for ^Z (anywhere in line) too. */ + while( iseg < noc ){ + if( buf[iseg]==0x1a ){ + conState.stdinEof = 1; + noc = iseg; /* Chop ^Z and anything following. */ + break; + } + ++iseg; + } + }else break; /* Drop apparent garbage in. (Could assert.) */ + }else break; + } + /* If got nothing, (after ^Z chop), must be at end-of-file. */ + if( noc == 0 ) return 0; + buf[noc] = 0; + return buf; + }else{ + return fgets(buf, ncmax, fin); + } +} + +# define fgets(b,n,f) utf8_fgets(b,n,f) +#endif /* SHELL_WIN_UTF8_OPT */ /* ** Render output like fprintf(). Except, if the output is going to the -** console and if this is running on a Windows machine, translate the -** output from UTF-8 into MBCS. +** console and if this is running on a Windows machine, and if the -utf8 +** option is unavailable or (available and inactive), translate the +** output from UTF-8 into MBCS for output through 8-bit stdout stream. +** (With -utf8 active, no translation is needed and must not be done.) */ #if defined(_WIN32) || defined(WIN32) void utf8_printf(FILE *out, const char *zFormat, ...){ va_list ap; va_start(ap, zFormat); - if( stdout_is_console && (out==stdout || out==stderr) ){ + if( stdout_is_console && (out==stdout || out==stderr) +# if SHELL_WIN_UTF8_OPT + && !console_utf8 +# endif + ){ char *z1 = sqlite3_vmprintf(zFormat, ap); char *z2 = sqlite3_win32_utf8_to_mbcs_v2(z1, 0); sqlite3_free(z1); @@ -529,7 +788,7 @@ static void shell_out_of_memory(void){ /* Check a pointer to see if it is NULL. If it is NULL, exit with an ** out-of-memory error. */ -static void shell_check_oom(void *p){ +static void shell_check_oom(const void *p){ if( p==0 ) shell_out_of_memory(); } @@ -708,9 +967,14 @@ static char *local_getline(char *zLine, FILE *in){ } } #if defined(_WIN32) || defined(WIN32) - /* For interactive input on Windows systems, translate the - ** multi-byte characterset characters into UTF-8. */ - if( stdin_is_interactive && in==stdin ){ + /* For interactive input on Windows systems, without -utf8, + ** translate the multi-byte characterset characters into UTF-8. + ** This is the translation that predates the -utf8 option. */ + if( stdin_is_interactive && in==stdin +# if SHELL_WIN_UTF8_OPT + && !console_utf8 +# endif /* SHELL_WIN_UTF8_OPT */ + ){ char *zTrans = sqlite3_win32_mbcs_to_utf8_v2(zLine, 0); if( zTrans ){ i64 nTrans = strlen(zTrans)+1; @@ -747,14 +1011,25 @@ static char *one_input_line(FILE *in, char *zPrior, int isContinuation){ if( in!=0 ){ zResult = local_getline(zPrior, in); }else{ - zPrompt = isContinuation ? continuePrompt : mainPrompt; + zPrompt = isContinuation ? CONTINUATION_PROMPT : mainPrompt; #if SHELL_USE_LOCAL_GETLINE printf("%s", zPrompt); fflush(stdout); - zResult = local_getline(zPrior, stdin); + do{ + zResult = local_getline(zPrior, stdin); + zPrior = 0; + /* ^C trap creates a false EOF, so let "interrupt" thread catch up. */ + if( zResult==0 ) sqlite3_sleep(50); + }while( zResult==0 && seenInterrupt>0 ); #else free(zPrior); zResult = shell_readline(zPrompt); + while( zResult==0 ){ + /* ^C trap creates a false EOF, so let "interrupt" thread catch up. */ + sqlite3_sleep(50); + if( seenInterrupt==0 ) break; + zResult = shell_readline(""); + } if( zResult && *zResult ) shell_add_history(zResult); #endif } @@ -894,6 +1169,7 @@ static void appendText(ShellText *p, const char *zAppend, char quote){ */ static char quoteChar(const char *zName){ int i; + if( zName==0 ) return '"'; if( !isalpha((unsigned char)zName[0]) && zName[0]!='_' ) return '"'; for(i=0; zName[i]; i++){ if( !isalnum((unsigned char)zName[i]) && zName[i]!='_' ) return '"'; @@ -949,6 +1225,46 @@ static char *shellFakeSchema( return s.z; } +/* +** SQL function: strtod(X) +** +** Use the C-library strtod() function to convert string X into a double. +** Used for comparing the accuracy of SQLite's internal text-to-float conversion +** routines against the C-library. +*/ +static void shellStrtod( + sqlite3_context *pCtx, + int nVal, + sqlite3_value **apVal +){ + char *z = (char*)sqlite3_value_text(apVal[0]); + UNUSED_PARAMETER(nVal); + if( z==0 ) return; + sqlite3_result_double(pCtx, strtod(z,0)); +} + +/* +** SQL function: dtostr(X) +** +** Use the C-library printf() function to convert real value X into a string. +** Used for comparing the accuracy of SQLite's internal float-to-text conversion +** routines against the C-library. +*/ +static void shellDtostr( + sqlite3_context *pCtx, + int nVal, + sqlite3_value **apVal +){ + double r = sqlite3_value_double(apVal[0]); + int n = nVal>=2 ? sqlite3_value_int(apVal[1]) : 26; + char z[400]; + if( n<1 ) n = 1; + if( n>350 ) n = 350; + sprintf(z, "%#+.*e", n, r); + sqlite3_result_text(pCtx, z, -1, SQLITE_TRANSIENT); +} + + /* ** SQL function: shell_module_schema(X) ** @@ -964,7 +1280,7 @@ static void shellModuleSchema( char *zFake; UNUSED_PARAMETER(nVal); zName = (const char*)sqlite3_value_text(apVal[0]); - zFake = zName ? shellFakeSchema(sqlite3_context_db_handle(pCtx), 0, zName) : 0; + zFake = zName? shellFakeSchema(sqlite3_context_db_handle(pCtx), 0, zName) : 0; if( zFake ){ sqlite3_result_text(pCtx, sqlite3_mprintf("/* %s */", zFake), -1, sqlite3_free); @@ -1198,7 +1514,7 @@ struct DIR { #endif /* -** Provide the function prototype for the POSIX compatiable getenv() +** Provide the function prototype for the POSIX compatible getenv() ** function. This function is not thread-safe. */ @@ -1524,6 +1840,188 @@ int sqlite3MemTraceDeactivate(void){ } /************************* End ../ext/misc/memtrace.c ********************/ +/************************* Begin ../ext/misc/pcachetrace.c ******************/ +/* +** 2023-06-21 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +** +** This file implements an extension that uses the SQLITE_CONFIG_PCACHE2 +** mechanism to add a tracing layer on top of pluggable page cache of +** SQLite. If this extension is registered prior to sqlite3_initialize(), +** it will cause all page cache activities to be logged on standard output, +** or to some other FILE specified by the initializer. +** +** This file needs to be compiled into the application that uses it. +** +** This extension is used to implement the --pcachetrace option of the +** command-line shell. +*/ +#include +#include +#include + +/* The original page cache routines */ +static sqlite3_pcache_methods2 pcacheBase; +static FILE *pcachetraceOut; + +/* Methods that trace pcache activity */ +static int pcachetraceInit(void *pArg){ + int nRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xInit(%p)\n", pArg); + } + nRes = pcacheBase.xInit(pArg); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xInit(%p) -> %d\n", pArg, nRes); + } + return nRes; +} +static void pcachetraceShutdown(void *pArg){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xShutdown(%p)\n", pArg); + } + pcacheBase.xShutdown(pArg); +} +static sqlite3_pcache *pcachetraceCreate(int szPage, int szExtra, int bPurge){ + sqlite3_pcache *pRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xCreate(%d,%d,%d)\n", + szPage, szExtra, bPurge); + } + pRes = pcacheBase.xCreate(szPage, szExtra, bPurge); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xCreate(%d,%d,%d) -> %p\n", + szPage, szExtra, bPurge, pRes); + } + return pRes; +} +static void pcachetraceCachesize(sqlite3_pcache *p, int nCachesize){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xCachesize(%p, %d)\n", p, nCachesize); + } + pcacheBase.xCachesize(p, nCachesize); +} +static int pcachetracePagecount(sqlite3_pcache *p){ + int nRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xPagecount(%p)\n", p); + } + nRes = pcacheBase.xPagecount(p); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xPagecount(%p) -> %d\n", p, nRes); + } + return nRes; +} +static sqlite3_pcache_page *pcachetraceFetch( + sqlite3_pcache *p, + unsigned key, + int crFg +){ + sqlite3_pcache_page *pRes; + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xFetch(%p,%u,%d)\n", p, key, crFg); + } + pRes = pcacheBase.xFetch(p, key, crFg); + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xFetch(%p,%u,%d) -> %p\n", + p, key, crFg, pRes); + } + return pRes; +} +static void pcachetraceUnpin( + sqlite3_pcache *p, + sqlite3_pcache_page *pPg, + int bDiscard +){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xUnpin(%p, %p, %d)\n", + p, pPg, bDiscard); + } + pcacheBase.xUnpin(p, pPg, bDiscard); +} +static void pcachetraceRekey( + sqlite3_pcache *p, + sqlite3_pcache_page *pPg, + unsigned oldKey, + unsigned newKey +){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xRekey(%p, %p, %u, %u)\n", + p, pPg, oldKey, newKey); + } + pcacheBase.xRekey(p, pPg, oldKey, newKey); +} +static void pcachetraceTruncate(sqlite3_pcache *p, unsigned n){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xTruncate(%p, %u)\n", p, n); + } + pcacheBase.xTruncate(p, n); +} +static void pcachetraceDestroy(sqlite3_pcache *p){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xDestroy(%p)\n", p); + } + pcacheBase.xDestroy(p); +} +static void pcachetraceShrink(sqlite3_pcache *p){ + if( pcachetraceOut ){ + fprintf(pcachetraceOut, "PCACHETRACE: xShrink(%p)\n", p); + } + pcacheBase.xShrink(p); +} + +/* The substitute pcache methods */ +static sqlite3_pcache_methods2 ersaztPcacheMethods = { + 0, + 0, + pcachetraceInit, + pcachetraceShutdown, + pcachetraceCreate, + pcachetraceCachesize, + pcachetracePagecount, + pcachetraceFetch, + pcachetraceUnpin, + pcachetraceRekey, + pcachetraceTruncate, + pcachetraceDestroy, + pcachetraceShrink +}; + +/* Begin tracing memory allocations to out. */ +int sqlite3PcacheTraceActivate(FILE *out){ + int rc = SQLITE_OK; + if( pcacheBase.xFetch==0 ){ + rc = sqlite3_config(SQLITE_CONFIG_GETPCACHE2, &pcacheBase); + if( rc==SQLITE_OK ){ + rc = sqlite3_config(SQLITE_CONFIG_PCACHE2, &ersaztPcacheMethods); + } + } + pcachetraceOut = out; + return rc; +} + +/* Deactivate memory tracing */ +int sqlite3PcacheTraceDeactivate(void){ + int rc = SQLITE_OK; + if( pcacheBase.xFetch!=0 ){ + rc = sqlite3_config(SQLITE_CONFIG_PCACHE2, &pcacheBase); + if( rc==SQLITE_OK ){ + memset(&pcacheBase, 0, sizeof(pcacheBase)); + } + } + pcachetraceOut = 0; + return rc; +} + +/************************* End ../ext/misc/pcachetrace.c ********************/ /************************* Begin ../ext/misc/shathree.c ******************/ /* ** 2017-03-08 @@ -1537,7 +2035,8 @@ int sqlite3MemTraceDeactivate(void){ ** ****************************************************************************** ** -** This SQLite extension implements functions that compute SHA3 hashes. +** This SQLite extension implements functions that compute SHA3 hashes +** in the way described by the (U.S.) NIST FIPS 202 SHA-3 Standard. ** Two SQL functions are implemented: ** ** sha3(X,SIZE) @@ -2058,7 +2557,7 @@ static void sha3Func( /* Compute a string using sqlite3_vsnprintf() with a maximum length ** of 50 bytes and add it to the hash. */ -static void hash_step_vformat( +static void sha3_step_vformat( SHA3Context *p, /* Add content to this context */ const char *zFormat, ... @@ -2154,7 +2653,7 @@ static void sha3QueryFunc( z = sqlite3_sql(pStmt); if( z ){ n = (int)strlen(z); - hash_step_vformat(&cx,"S%d:",n); + sha3_step_vformat(&cx,"S%d:",n); SHA3Update(&cx,(unsigned char*)z,n); } @@ -2198,14 +2697,14 @@ static void sha3QueryFunc( case SQLITE_TEXT: { int n2 = sqlite3_column_bytes(pStmt, i); const unsigned char *z2 = sqlite3_column_text(pStmt, i); - hash_step_vformat(&cx,"T%d:",n2); + sha3_step_vformat(&cx,"T%d:",n2); SHA3Update(&cx, z2, n2); break; } case SQLITE_BLOB: { int n2 = sqlite3_column_bytes(pStmt, i); const unsigned char *z2 = sqlite3_column_blob(pStmt, i); - hash_step_vformat(&cx,"B%d:",n2); + sha3_step_vformat(&cx,"B%d:",n2); SHA3Update(&cx, z2, n2); break; } @@ -2407,41 +2906,24 @@ static void decimal_free(Decimal *p){ } /* -** Allocate a new Decimal object. Initialize it to the number given -** by the input string. +** Allocate a new Decimal object initialized to the text in zIn[]. +** Return NULL if any kind of error occurs. */ -static Decimal *decimal_new( - sqlite3_context *pCtx, - sqlite3_value *pIn, - int nAlt, - const unsigned char *zAlt -){ - Decimal *p; - int n, i; - const unsigned char *zIn; +static Decimal *decimalNewFromText(const char *zIn, int n){ + Decimal *p = 0; + int i; int iExp = 0; + p = sqlite3_malloc( sizeof(*p) ); - if( p==0 ) goto new_no_mem; + if( p==0 ) goto new_from_text_failed; p->sign = 0; p->oom = 0; p->isInit = 1; p->isNull = 0; p->nDigit = 0; p->nFrac = 0; - if( zAlt ){ - n = nAlt, - zIn = zAlt; - }else{ - if( sqlite3_value_type(pIn)==SQLITE_NULL ){ - p->a = 0; - p->isNull = 1; - return p; - } - n = sqlite3_value_bytes(pIn); - zIn = sqlite3_value_text(pIn); - } p->a = sqlite3_malloc64( n+1 ); - if( p->a==0 ) goto new_no_mem; + if( p->a==0 ) goto new_from_text_failed; for(i=0; isspace(zIn[i]); i++){} if( zIn[i]=='-' ){ p->sign = 1; @@ -2492,7 +2974,7 @@ static Decimal *decimal_new( } if( iExp>0 ){ p->a = sqlite3_realloc64(p->a, p->nDigit + iExp + 1 ); - if( p->a==0 ) goto new_no_mem; + if( p->a==0 ) goto new_from_text_failed; memset(p->a+p->nDigit, 0, iExp); p->nDigit += iExp; } @@ -2511,7 +2993,7 @@ static Decimal *decimal_new( } if( iExp>0 ){ p->a = sqlite3_realloc64(p->a, p->nDigit + iExp + 1 ); - if( p->a==0 ) goto new_no_mem; + if( p->a==0 ) goto new_from_text_failed; memmove(p->a+iExp, p->a, p->nDigit); memset(p->a, 0, iExp); p->nDigit += iExp; @@ -2520,7 +3002,76 @@ static Decimal *decimal_new( } return p; -new_no_mem: +new_from_text_failed: + if( p ){ + if( p->a ) sqlite3_free(p->a); + sqlite3_free(p); + } + return 0; +} + +/* Forward reference */ +static Decimal *decimalFromDouble(double); + +/* +** Allocate a new Decimal object from an sqlite3_value. Return a pointer +** to the new object, or NULL if there is an error. If the pCtx argument +** is not NULL, then errors are reported on it as well. +** +** If the pIn argument is SQLITE_TEXT or SQLITE_INTEGER, it is converted +** directly into a Decimal. For SQLITE_FLOAT or for SQLITE_BLOB of length +** 8 bytes, the resulting double value is expanded into its decimal equivalent. +** If pIn is NULL or if it is a BLOB that is not exactly 8 bytes in length, +** then NULL is returned. +*/ +static Decimal *decimal_new( + sqlite3_context *pCtx, /* Report error here, if not null */ + sqlite3_value *pIn, /* Construct the decimal object from this */ + int bTextOnly /* Always interpret pIn as text if true */ +){ + Decimal *p = 0; + int eType = sqlite3_value_type(pIn); + if( bTextOnly && (eType==SQLITE_FLOAT || eType==SQLITE_BLOB) ){ + eType = SQLITE_TEXT; + } + switch( eType ){ + case SQLITE_TEXT: + case SQLITE_INTEGER: { + const char *zIn = (const char*)sqlite3_value_text(pIn); + int n = sqlite3_value_bytes(pIn); + p = decimalNewFromText(zIn, n); + if( p==0 ) goto new_failed; + break; + } + + case SQLITE_FLOAT: { + p = decimalFromDouble(sqlite3_value_double(pIn)); + break; + } + + case SQLITE_BLOB: { + const unsigned char *x; + unsigned int i; + sqlite3_uint64 v = 0; + double r; + + if( sqlite3_value_bytes(pIn)!=sizeof(r) ) break; + x = sqlite3_value_blob(pIn); + for(i=0; ioom ){ + sqlite3_result_error_nomem(pCtx); + return; + } + if( p->isNull ){ + sqlite3_result_null(pCtx); + return; + } + for(nDigit=p->nDigit; nDigit>0 && p->a[nDigit-1]==0; nDigit--){} + for(nZero=0; nZeroa[nZero]==0; nZero++){} + nFrac = p->nFrac + (nDigit - p->nDigit); + nDigit -= nZero; + z = sqlite3_malloc( nDigit+20 ); + if( z==0 ){ + sqlite3_result_error_nomem(pCtx); + return; + } + if( nDigit==0 ){ + zero = 0; + a = &zero; + nDigit = 1; + nFrac = 0; + }else{ + a = &p->a[nZero]; + } + if( p->sign && nDigit>0 ){ + z[0] = '-'; + }else{ + z[0] = '+'; + } + z[1] = a[0]+'0'; + z[2] = '.'; + if( nDigit==1 ){ + z[3] = '0'; + i = 4; + }else{ + for(i=1; iisNull ) goto cmp_done; - pB = decimal_new(context, argv[1], 0, 0); + pB = decimal_new(context, argv[1], 1); if( pB==0 || pB->isNull ) goto cmp_done; rc = decimal_cmp(pA, pB); if( rc<0 ) rc = -1; @@ -2687,7 +3283,7 @@ static void decimal_expand(Decimal *p, int nDigit, int nFrac){ } /* -** Add the value pB into pA. +** Add the value pB into pA. A := A + B. ** ** Both pA and pB might become denormalized by this routine. */ @@ -2757,58 +3353,224 @@ static void decimal_add(Decimal *pA, Decimal *pB){ } /* -** Compare text in decimal order. -*/ -static int decimalCollFunc( - void *notUsed, - int nKey1, const void *pKey1, - int nKey2, const void *pKey2 -){ - const unsigned char *zA = (const unsigned char*)pKey1; - const unsigned char *zB = (const unsigned char*)pKey2; - Decimal *pA = decimal_new(0, 0, nKey1, zA); - Decimal *pB = decimal_new(0, 0, nKey2, zB); - int rc; - UNUSED_PARAMETER(notUsed); - if( pA==0 || pB==0 ){ - rc = 0; - }else{ - rc = decimal_cmp(pA, pB); - } - decimal_free(pA); - decimal_free(pB); - return rc; -} - - -/* -** SQL Function: decimal_add(X, Y) -** decimal_sub(X, Y) +** Multiply A by B. A := A * B ** -** Return the sum or difference of X and Y. +** All significant digits after the decimal point are retained. +** Trailing zeros after the decimal point are omitted as long as +** the number of digits after the decimal point is no less than +** either the number of digits in either input. */ -static void decimalAddFunc( - sqlite3_context *context, - int argc, - sqlite3_value **argv -){ - Decimal *pA = decimal_new(context, argv[0], 0, 0); - Decimal *pB = decimal_new(context, argv[1], 0, 0); - UNUSED_PARAMETER(argc); - decimal_add(pA, pB); - decimal_result(context, pA); - decimal_free(pA); - decimal_free(pB); -} -static void decimalSubFunc( - sqlite3_context *context, - int argc, - sqlite3_value **argv -){ - Decimal *pA = decimal_new(context, argv[0], 0, 0); - Decimal *pB = decimal_new(context, argv[1], 0, 0); - UNUSED_PARAMETER(argc); - if( pB ){ +static void decimalMul(Decimal *pA, Decimal *pB){ + signed char *acc = 0; + int i, j, k; + int minFrac; + + if( pA==0 || pA->oom || pA->isNull + || pB==0 || pB->oom || pB->isNull + ){ + goto mul_end; + } + acc = sqlite3_malloc64( pA->nDigit + pB->nDigit + 2 ); + if( acc==0 ){ + pA->oom = 1; + goto mul_end; + } + memset(acc, 0, pA->nDigit + pB->nDigit + 2); + minFrac = pA->nFrac; + if( pB->nFracnFrac; + for(i=pA->nDigit-1; i>=0; i--){ + signed char f = pA->a[i]; + int carry = 0, x; + for(j=pB->nDigit-1, k=i+j+3; j>=0; j--, k--){ + x = acc[k] + f*pB->a[j] + carry; + acc[k] = x%10; + carry = x/10; + } + x = acc[k] + carry; + acc[k] = x%10; + acc[k-1] += x/10; + } + sqlite3_free(pA->a); + pA->a = acc; + acc = 0; + pA->nDigit += pB->nDigit + 2; + pA->nFrac += pB->nFrac; + pA->sign ^= pB->sign; + while( pA->nFrac>minFrac && pA->a[pA->nDigit-1]==0 ){ + pA->nFrac--; + pA->nDigit--; + } + +mul_end: + sqlite3_free(acc); +} + +/* +** Create a new Decimal object that contains an integer power of 2. +*/ +static Decimal *decimalPow2(int N){ + Decimal *pA = 0; /* The result to be returned */ + Decimal *pX = 0; /* Multiplier */ + if( N<-20000 || N>20000 ) goto pow2_fault; + pA = decimalNewFromText("1.0", 3); + if( pA==0 || pA->oom ) goto pow2_fault; + if( N==0 ) return pA; + if( N>0 ){ + pX = decimalNewFromText("2.0", 3); + }else{ + N = -N; + pX = decimalNewFromText("0.5", 3); + } + if( pX==0 || pX->oom ) goto pow2_fault; + while( 1 /* Exit by break */ ){ + if( N & 1 ){ + decimalMul(pA, pX); + if( pA->oom ) goto pow2_fault; + } + N >>= 1; + if( N==0 ) break; + decimalMul(pX, pX); + } + decimal_free(pX); + return pA; + +pow2_fault: + decimal_free(pA); + decimal_free(pX); + return 0; +} + +/* +** Use an IEEE754 binary64 ("double") to generate a new Decimal object. +*/ +static Decimal *decimalFromDouble(double r){ + sqlite3_int64 m, a; + int e; + int isNeg; + Decimal *pA; + Decimal *pX; + char zNum[100]; + if( r<0.0 ){ + isNeg = 1; + r = -r; + }else{ + isNeg = 0; + } + memcpy(&a,&r,sizeof(a)); + if( a==0 ){ + e = 0; + m = 0; + }else{ + e = a>>52; + m = a & ((((sqlite3_int64)1)<<52)-1); + if( e==0 ){ + m <<= 1; + }else{ + m |= ((sqlite3_int64)1)<<52; + } + while( e<1075 && m>0 && (m&1)==0 ){ + m >>= 1; + e++; + } + if( isNeg ) m = -m; + e = e - 1075; + if( e>971 ){ + return 0; /* A NaN or an Infinity */ + } + } + + /* At this point m is the integer significand and e is the exponent */ + sqlite3_snprintf(sizeof(zNum), zNum, "%lld", m); + pA = decimalNewFromText(zNum, (int)strlen(zNum)); + pX = decimalPow2(e); + decimalMul(pA, pX); + decimal_free(pX); + return pA; +} + +/* +** SQL Function: decimal(X) +** OR: decimal_exp(X) +** +** Convert input X into decimal and then back into text. +** +** If X is originally a float, then a full decimal expansion of that floating +** point value is done. Or if X is an 8-byte blob, it is interpreted +** as a float and similarly expanded. +** +** The decimal_exp(X) function returns the result in exponential notation. +** decimal(X) returns a complete decimal, without the e+NNN at the end. +*/ +static void decimalFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *p = decimal_new(context, argv[0], 0); + UNUSED_PARAMETER(argc); + if( p ){ + if( sqlite3_user_data(context)!=0 ){ + decimal_result_sci(context, p); + }else{ + decimal_result(context, p); + } + decimal_free(p); + } +} + +/* +** Compare text in decimal order. +*/ +static int decimalCollFunc( + void *notUsed, + int nKey1, const void *pKey1, + int nKey2, const void *pKey2 +){ + const unsigned char *zA = (const unsigned char*)pKey1; + const unsigned char *zB = (const unsigned char*)pKey2; + Decimal *pA = decimalNewFromText((const char*)zA, nKey1); + Decimal *pB = decimalNewFromText((const char*)zB, nKey2); + int rc; + UNUSED_PARAMETER(notUsed); + if( pA==0 || pB==0 ){ + rc = 0; + }else{ + rc = decimal_cmp(pA, pB); + } + decimal_free(pA); + decimal_free(pB); + return rc; +} + + +/* +** SQL Function: decimal_add(X, Y) +** decimal_sub(X, Y) +** +** Return the sum or difference of X and Y. +*/ +static void decimalAddFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *pA = decimal_new(context, argv[0], 1); + Decimal *pB = decimal_new(context, argv[1], 1); + UNUSED_PARAMETER(argc); + decimal_add(pA, pB); + decimal_result(context, pA); + decimal_free(pA); + decimal_free(pB); +} +static void decimalSubFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + Decimal *pA = decimal_new(context, argv[0], 1); + Decimal *pB = decimal_new(context, argv[1], 1); + UNUSED_PARAMETER(argc); + if( pB ){ pB->sign = !pB->sign; decimal_add(pA, pB); decimal_result(context, pA); @@ -2844,7 +3606,7 @@ static void decimalSumStep( p->nFrac = 0; } if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; - pArg = decimal_new(context, argv[0], 0, 0); + pArg = decimal_new(context, argv[0], 1); decimal_add(p, pArg); decimal_free(pArg); } @@ -2859,7 +3621,7 @@ static void decimalSumInverse( p = sqlite3_aggregate_context(context, sizeof(*p)); if( p==0 ) return; if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; - pArg = decimal_new(context, argv[0], 0, 0); + pArg = decimal_new(context, argv[0], 1); if( pArg ) pArg->sign = !pArg->sign; decimal_add(p, pArg); decimal_free(pArg); @@ -2880,66 +3642,49 @@ static void decimalSumFinalize(sqlite3_context *context){ ** SQL Function: decimal_mul(X, Y) ** ** Return the product of X and Y. -** -** All significant digits after the decimal point are retained. -** Trailing zeros after the decimal point are omitted as long as -** the number of digits after the decimal point is no less than -** either the number of digits in either input. */ static void decimalMulFunc( sqlite3_context *context, int argc, sqlite3_value **argv ){ - Decimal *pA = decimal_new(context, argv[0], 0, 0); - Decimal *pB = decimal_new(context, argv[1], 0, 0); - signed char *acc = 0; - int i, j, k; - int minFrac; + Decimal *pA = decimal_new(context, argv[0], 1); + Decimal *pB = decimal_new(context, argv[1], 1); UNUSED_PARAMETER(argc); if( pA==0 || pA->oom || pA->isNull || pB==0 || pB->oom || pB->isNull ){ goto mul_end; } - acc = sqlite3_malloc64( pA->nDigit + pB->nDigit + 2 ); - if( acc==0 ){ - sqlite3_result_error_nomem(context); + decimalMul(pA, pB); + if( pA->oom ){ goto mul_end; } - memset(acc, 0, pA->nDigit + pB->nDigit + 2); - minFrac = pA->nFrac; - if( pB->nFracnFrac; - for(i=pA->nDigit-1; i>=0; i--){ - signed char f = pA->a[i]; - int carry = 0, x; - for(j=pB->nDigit-1, k=i+j+3; j>=0; j--, k--){ - x = acc[k] + f*pB->a[j] + carry; - acc[k] = x%10; - carry = x/10; - } - x = acc[k] + carry; - acc[k] = x%10; - acc[k-1] += x/10; - } - sqlite3_free(pA->a); - pA->a = acc; - acc = 0; - pA->nDigit += pB->nDigit + 2; - pA->nFrac += pB->nFrac; - pA->sign ^= pB->sign; - while( pA->nFrac>minFrac && pA->a[pA->nDigit-1]==0 ){ - pA->nFrac--; - pA->nDigit--; - } decimal_result(context, pA); mul_end: - sqlite3_free(acc); decimal_free(pA); decimal_free(pB); } +/* +** SQL Function: decimal_pow2(N) +** +** Return the N-th power of 2. N must be an integer. +*/ +static void decimalPow2Func( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + UNUSED_PARAMETER(argc); + if( sqlite3_value_type(argv[0])==SQLITE_INTEGER ){ + Decimal *pA = decimalPow2(sqlite3_value_int(argv[0])); + decimal_result_sci(context, pA); + decimal_free(pA); + } +} + #ifdef _WIN32 #endif @@ -2952,23 +3697,26 @@ int sqlite3_decimal_init( static const struct { const char *zFuncName; int nArg; + int iArg; void (*xFunc)(sqlite3_context*,int,sqlite3_value**); } aFunc[] = { - { "decimal", 1, decimalFunc }, - { "decimal_cmp", 2, decimalCmpFunc }, - { "decimal_add", 2, decimalAddFunc }, - { "decimal_sub", 2, decimalSubFunc }, - { "decimal_mul", 2, decimalMulFunc }, + { "decimal", 1, 0, decimalFunc }, + { "decimal_exp", 1, 1, decimalFunc }, + { "decimal_cmp", 2, 0, decimalCmpFunc }, + { "decimal_add", 2, 0, decimalAddFunc }, + { "decimal_sub", 2, 0, decimalSubFunc }, + { "decimal_mul", 2, 0, decimalMulFunc }, + { "decimal_pow2", 1, 0, decimalPow2Func }, }; unsigned int i; (void)pzErrMsg; /* Unused parameter */ SQLITE_EXTENSION_INIT2(pApi); - for(i=0; i +** *Nix: gcc -O2 -shared -I$SQDIR -fPIC -o base64.so base64.c +** OSX: gcc -O2 -dynamiclib -fPIC -I$SQDIR -o base64.dylib base64.c +** Win32: gcc -O2 -shared -I%SQDIR% -o base64.dll base64.c +** Win32: cl /Os -I%SQDIR% base64.c -link -dll -out:base64.dll +*/ + +#include + +/* #include "sqlite3ext.h" */ + +#ifndef deliberate_fall_through +/* Quiet some compilers about some of our intentional code. */ +# if GCC_VERSION>=7000000 +# define deliberate_fall_through __attribute__((fallthrough)); +# else +# define deliberate_fall_through +# endif +#endif + +SQLITE_EXTENSION_INIT1; + +#define PC 0x80 /* pad character */ +#define WS 0x81 /* whitespace */ +#define ND 0x82 /* Not above or digit-value */ +#define PAD_CHAR '=' + +#ifndef U8_TYPEDEF +/* typedef unsigned char u8; */ +#define U8_TYPEDEF +#endif + +/* Decoding table, ASCII (7-bit) value to base 64 digit value or other */ +static const u8 b64DigitValues[128] = { + /* HT LF VT FF CR */ + ND,ND,ND,ND, ND,ND,ND,ND, ND,WS,WS,WS, WS,WS,ND,ND, + /* US */ + ND,ND,ND,ND, ND,ND,ND,ND, ND,ND,ND,ND, ND,ND,ND,ND, + /*sp + / */ + WS,ND,ND,ND, ND,ND,ND,ND, ND,ND,ND,62, ND,ND,ND,63, + /* 0 1 5 9 = */ + 52,53,54,55, 56,57,58,59, 60,61,ND,ND, ND,PC,ND,ND, + /* A O */ + ND, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14, + /* P Z */ + 15,16,17,18, 19,20,21,22, 23,24,25,ND, ND,ND,ND,ND, + /* a o */ + ND,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40, + /* p z */ + 41,42,43,44, 45,46,47,48, 49,50,51,ND, ND,ND,ND,ND +}; + +static const char b64Numerals[64+1] += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +#define BX_DV_PROTO(c) \ + ((((u8)(c))<0x80)? (u8)(b64DigitValues[(u8)(c)]) : 0x80) +#define IS_BX_DIGIT(bdp) (((u8)(bdp))<0x80) +#define IS_BX_WS(bdp) ((bdp)==WS) +#define IS_BX_PAD(bdp) ((bdp)==PC) +#define BX_NUMERAL(dv) (b64Numerals[(u8)(dv)]) +/* Width of base64 lines. Should be an integer multiple of 4. */ +#define B64_DARK_MAX 72 + +/* Encode a byte buffer into base64 text with linefeeds appended to limit +** encoded group lengths to B64_DARK_MAX or to terminate the last group. +*/ +static char* toBase64( u8 *pIn, int nbIn, char *pOut ){ + int nCol = 0; + while( nbIn >= 3 ){ + /* Do the bit-shuffle, exploiting unsigned input to avoid masking. */ + pOut[0] = BX_NUMERAL(pIn[0]>>2); + pOut[1] = BX_NUMERAL(((pIn[0]<<4)|(pIn[1]>>4))&0x3f); + pOut[2] = BX_NUMERAL(((pIn[1]&0xf)<<2)|(pIn[2]>>6)); + pOut[3] = BX_NUMERAL(pIn[2]&0x3f); + pOut += 4; + nbIn -= 3; + pIn += 3; + if( (nCol += 4)>=B64_DARK_MAX || nbIn<=0 ){ + *pOut++ = '\n'; + nCol = 0; + } + } + if( nbIn > 0 ){ + signed char nco = nbIn+1; + int nbe; + unsigned long qv = *pIn++; + for( nbe=1; nbe<3; ++nbe ){ + qv <<= 8; + if( nbe=0; --nbe ){ + char ce = (nbe>= 6; + pOut[nbe] = ce; + } + pOut += 4; + *pOut++ = '\n'; + } + *pOut = 0; + return pOut; +} + +/* Skip over text which is not base64 numeral(s). */ +static char * skipNonB64( char *s, int nc ){ + char c; + while( nc-- > 0 && (c = *s) && !IS_BX_DIGIT(BX_DV_PROTO(c)) ) ++s; + return s; +} + +/* Decode base64 text into a byte buffer. */ +static u8* fromBase64( char *pIn, int ncIn, u8 *pOut ){ + if( ncIn>0 && pIn[ncIn-1]=='\n' ) --ncIn; + while( ncIn>0 && *pIn!=PAD_CHAR ){ + static signed char nboi[] = { 0, 0, 1, 2, 3 }; + char *pUse = skipNonB64(pIn, ncIn); + unsigned long qv = 0L; + int nti, nbo, nac; + ncIn -= (pUse - pIn); + pIn = pUse; + nti = (ncIn>4)? 4 : ncIn; + ncIn -= nti; + nbo = nboi[nti]; + if( nbo==0 ) break; + for( nac=0; nac<4; ++nac ){ + char c = (nac>8) & 0xff; + case 1: + pOut[0] = (qv>>16) & 0xff; + } + pOut += nbo; + } + return pOut; +} + +/* This function does the work for the SQLite base64(x) UDF. */ +static void base64(sqlite3_context *context, int na, sqlite3_value *av[]){ + int nb, nc, nv = sqlite3_value_bytes(av[0]); + int nvMax = sqlite3_limit(sqlite3_context_db_handle(context), + SQLITE_LIMIT_LENGTH, -1); + char *cBuf; + u8 *bBuf; + assert(na==1); + switch( sqlite3_value_type(av[0]) ){ + case SQLITE_BLOB: + nb = nv; + nc = 4*(nv+2/3); /* quads needed */ + nc += (nc+(B64_DARK_MAX-1))/B64_DARK_MAX + 1; /* LFs and a 0-terminator */ + if( nvMax < nc ){ + sqlite3_result_error(context, "blob expanded to base64 too big", -1); + return; + } + bBuf = (u8*)sqlite3_value_blob(av[0]); + if( !bBuf ){ + if( SQLITE_NOMEM==sqlite3_errcode(sqlite3_context_db_handle(context)) ){ + goto memFail; + } + sqlite3_result_text(context,"",-1,SQLITE_STATIC); + break; + } + cBuf = sqlite3_malloc(nc); + if( !cBuf ) goto memFail; + nc = (int)(toBase64(bBuf, nb, cBuf) - cBuf); + sqlite3_result_text(context, cBuf, nc, sqlite3_free); + break; + case SQLITE_TEXT: + nc = nv; + nb = 3*((nv+3)/4); /* may overestimate due to LF and padding */ + if( nvMax < nb ){ + sqlite3_result_error(context, "blob from base64 may be too big", -1); + return; + }else if( nb<1 ){ + nb = 1; + } + cBuf = (char *)sqlite3_value_text(av[0]); + if( !cBuf ){ + if( SQLITE_NOMEM==sqlite3_errcode(sqlite3_context_db_handle(context)) ){ + goto memFail; + } + sqlite3_result_zeroblob(context, 0); + break; + } + bBuf = sqlite3_malloc(nb); + if( !bBuf ) goto memFail; + nb = (int)(fromBase64(cBuf, nc, bBuf) - bBuf); + sqlite3_result_blob(context, bBuf, nb, sqlite3_free); + break; + default: + sqlite3_result_error(context, "base64 accepts only blob or text", -1); + return; + } + return; + memFail: + sqlite3_result_error(context, "base64 OOM", -1); +} + +/* +** Establish linkage to running SQLite library. +*/ +#ifndef SQLITE_SHELL_EXTFUNCS +#ifdef _WIN32 + +#endif +int sqlite3_base_init +#else +static int sqlite3_base64_init +#endif +(sqlite3 *db, char **pzErr, const sqlite3_api_routines *pApi){ + SQLITE_EXTENSION_INIT2(pApi); + (void)pzErr; + return sqlite3_create_function + (db, "base64", 1, + SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS|SQLITE_DIRECTONLY|SQLITE_UTF8, + 0, base64, 0, 0); +} + +/* +** Define some macros to allow this extension to be built into the shell +** conveniently, in conjunction with use of SQLITE_SHELL_EXTFUNCS. This +** allows shell.c, as distributed, to have this extension built in. +*/ +#define BASE64_INIT(db) sqlite3_base64_init(db, 0, 0) +#define BASE64_EXPOSE(db, pzErr) /* Not needed, ..._init() does this. */ + +/************************* End ../ext/misc/base64.c ********************/ +#undef sqlite3_base_init +#define sqlite3_base_init sqlite3_base85_init +#define OMIT_BASE85_CHECKER +/************************* Begin ../ext/misc/base85.c ******************/ +/* +** 2022-11-16 ** -** ieee754(X) -** ieee754(Y,Z) +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: ** -** In the first form, the value X should be a floating-point number. +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +** +** This is a utility for converting binary to base85 or vice-versa. +** It can be built as a standalone program or an SQLite3 extension. +** +** Much like base64 representations, base85 can be sent through a +** sane USASCII channel unmolested. It also plays nicely in CSV or +** written as TCL brace-enclosed literals or SQL string literals. +** It is not suited for unmodified use in XML-like documents. +** +** The encoding used resembles Ascii85, but was devised by the author +** (Larry Brasfield) before Mozilla, Adobe, ZMODEM or other Ascii85 +** variant sources existed, in the 1984 timeframe on a VAX mainframe. +** Further, this is an independent implementation of a base85 system. +** Hence, the author has rightfully put this into the public domain. +** +** Base85 numerals are taken from the set of 7-bit USASCII codes, +** excluding control characters and Space ! " ' ( ) { | } ~ Del +** in code order representing digit values 0 to 84 (base 10.) +** +** Groups of 4 bytes, interpreted as big-endian 32-bit values, +** are represented as 5-digit base85 numbers with MS to LS digit +** order. Groups of 1-3 bytes are represented with 2-4 digits, +** still big-endian but 8-24 bit values. (Using big-endian yields +** the simplest transition to byte groups smaller than 4 bytes. +** These byte groups can also be considered base-256 numbers.) +** Groups of 0 bytes are represented with 0 digits and vice-versa. +** No pad characters are used; Encoded base85 numeral sequence +** (aka "group") length maps 1-to-1 to the decoded binary length. +** +** Any character not in the base85 numeral set delimits groups. +** When base85 is streamed or stored in containers of indefinite +** size, newline is used to separate it into sub-sequences of no +** more than 80 digits so that fgets() can be used to read it. +** +** Length limitations are not imposed except that the runtime +** SQLite string or blob length limits are respected. Otherwise, +** any length binary sequence can be represented and recovered. +** Base85 sequences can be concatenated by separating them with +** a non-base85 character; the conversion to binary will then +** be the concatenation of the represented binary sequences. + +** The standalone program either converts base85 on stdin to create +** a binary file or converts a binary file to base85 on stdout. +** Read or make it blurt its help for invocation details. +** +** The SQLite3 extension creates a function, base85(x), which will +** either convert text base85 to a blob or a blob to text base85 +** and return the result (or throw an error for other types.) +** Unless built with OMIT_BASE85_CHECKER defined, it also creates a +** function, is_base85(t), which returns 1 iff the text t contains +** nothing other than base85 numerals and whitespace, or 0 otherwise. +** +** To build the extension: +** Set shell variable SQDIR= +** and variable OPTS to -DOMIT_BASE85_CHECKER if is_base85() unwanted. +** *Nix: gcc -O2 -shared -I$SQDIR $OPTS -fPIC -o base85.so base85.c +** OSX: gcc -O2 -dynamiclib -fPIC -I$SQDIR $OPTS -o base85.dylib base85.c +** Win32: gcc -O2 -shared -I%SQDIR% %OPTS% -o base85.dll base85.c +** Win32: cl /Os -I%SQDIR% %OPTS% base85.c -link -dll -out:base85.dll +** +** To build the standalone program, define PP symbol BASE85_STANDALONE. Eg. +** *Nix or OSX: gcc -O2 -DBASE85_STANDALONE base85.c -o base85 +** Win32: gcc -O2 -DBASE85_STANDALONE -o base85.exe base85.c +** Win32: cl /Os /MD -DBASE85_STANDALONE base85.c +*/ + +#include +#include +#include +#include +#ifndef OMIT_BASE85_CHECKER +# include +#endif + +#ifndef BASE85_STANDALONE + +/* # include "sqlite3ext.h" */ + +SQLITE_EXTENSION_INIT1; + +#else + +# ifdef _WIN32 +# include +# include +# else +# define setmode(fd,m) +# endif + +static char *zHelp = + "Usage: base85 \n" + " is either -r to read or -w to write ,\n" + " content to be converted to/from base85 on stdout/stdin.\n" + " names a binary file to be rendered or created.\n" + " Or, the name '-' refers to the stdin or stdout stream.\n" + ; + +static void sayHelp(){ + printf("%s", zHelp); +} +#endif + +#ifndef U8_TYPEDEF +/* typedef unsigned char u8; */ +#define U8_TYPEDEF +#endif + +/* Classify c according to interval within USASCII set w.r.t. base85 + * Values of 1 and 3 are base85 numerals. Values of 0, 2, or 4 are not. + */ +#define B85_CLASS( c ) (((c)>='#')+((c)>'&')+((c)>='*')+((c)>'z')) + +/* Provide digitValue to b85Numeral offset as a function of above class. */ +static u8 b85_cOffset[] = { 0, '#', 0, '*'-4, 0 }; +#define B85_DNOS( c ) b85_cOffset[B85_CLASS(c)] + +/* Say whether c is a base85 numeral. */ +#define IS_B85( c ) (B85_CLASS(c) & 1) + +#if 0 /* Not used, */ +static u8 base85DigitValue( char c ){ + u8 dv = (u8)(c - '#'); + if( dv>87 ) return 0xff; + return (dv > 3)? dv-3 : dv; +} +#endif + +/* Width of base64 lines. Should be an integer multiple of 5. */ +#define B85_DARK_MAX 80 + + +static char * skipNonB85( char *s, int nc ){ + char c; + while( nc-- > 0 && (c = *s) && !IS_B85(c) ) ++s; + return s; +} + +/* Convert small integer, known to be in 0..84 inclusive, to base85 numeral. + * Do not use the macro form with argument expression having a side-effect.*/ +#if 0 +static char base85Numeral( u8 b ){ + return (b < 4)? (char)(b + '#') : (char)(b - 4 + '*'); +} +#else +# define base85Numeral( dn )\ + ((char)(((dn) < 4)? (char)((dn) + '#') : (char)((dn) - 4 + '*'))) +#endif + +static char *putcs(char *pc, char *s){ + char c; + while( (c = *s++)!=0 ) *pc++ = c; + return pc; +} + +/* Encode a byte buffer into base85 text. If pSep!=0, it's a C string +** to be appended to encoded groups to limit their length to B85_DARK_MAX +** or to terminate the last group (to aid concatenation.) +*/ +static char* toBase85( u8 *pIn, int nbIn, char *pOut, char *pSep ){ + int nCol = 0; + while( nbIn >= 4 ){ + int nco = 5; + unsigned long qbv = (((unsigned long)pIn[0])<<24) | + (pIn[1]<<16) | (pIn[2]<<8) | pIn[3]; + while( nco > 0 ){ + unsigned nqv = (unsigned)(qbv/85UL); + unsigned char dv = qbv - 85UL*nqv; + qbv = nqv; + pOut[--nco] = base85Numeral(dv); + } + nbIn -= 4; + pIn += 4; + pOut += 5; + if( pSep && (nCol += 5)>=B85_DARK_MAX ){ + pOut = putcs(pOut, pSep); + nCol = 0; + } + } + if( nbIn > 0 ){ + int nco = nbIn + 1; + unsigned long qv = *pIn++; + int nbe = 1; + while( nbe++ < nbIn ){ + qv = (qv<<8) | *pIn++; + } + nCol += nco; + while( nco > 0 ){ + u8 dv = (u8)(qv % 85); + qv /= 85; + pOut[--nco] = base85Numeral(dv); + } + pOut += (nbIn+1); + } + if( pSep && nCol>0 ) pOut = putcs(pOut, pSep); + *pOut = 0; + return pOut; +} + +/* Decode base85 text into a byte buffer. */ +static u8* fromBase85( char *pIn, int ncIn, u8 *pOut ){ + if( ncIn>0 && pIn[ncIn-1]=='\n' ) --ncIn; + while( ncIn>0 ){ + static signed char nboi[] = { 0, 0, 1, 2, 3, 4 }; + char *pUse = skipNonB85(pIn, ncIn); + unsigned long qv = 0L; + int nti, nbo; + ncIn -= (pUse - pIn); + pIn = pUse; + nti = (ncIn>5)? 5 : ncIn; + nbo = nboi[nti]; + if( nbo==0 ) break; + while( nti>0 ){ + char c = *pIn++; + u8 cdo = B85_DNOS(c); + --ncIn; + if( cdo==0 ) break; + qv = 85 * qv + (c - cdo); + --nti; + } + nbo -= nti; /* Adjust for early (non-digit) end of group. */ + switch( nbo ){ + case 4: + *pOut++ = (qv >> 24)&0xff; + case 3: + *pOut++ = (qv >> 16)&0xff; + case 2: + *pOut++ = (qv >> 8)&0xff; + case 1: + *pOut++ = qv&0xff; + case 0: + break; + } + } + return pOut; +} + +#ifndef OMIT_BASE85_CHECKER +/* Say whether input char sequence is all (base85 and/or whitespace).*/ +static int allBase85( char *p, int len ){ + char c; + while( len-- > 0 && (c = *p++) != 0 ){ + if( !IS_B85(c) && !isspace(c) ) return 0; + } + return 1; +} +#endif + +#ifndef BASE85_STANDALONE + +# ifndef OMIT_BASE85_CHECKER +/* This function does the work for the SQLite is_base85(t) UDF. */ +static void is_base85(sqlite3_context *context, int na, sqlite3_value *av[]){ + assert(na==1); + switch( sqlite3_value_type(av[0]) ){ + case SQLITE_TEXT: + { + int rv = allBase85( (char *)sqlite3_value_text(av[0]), + sqlite3_value_bytes(av[0]) ); + sqlite3_result_int(context, rv); + } + break; + case SQLITE_NULL: + sqlite3_result_null(context); + break; + default: + sqlite3_result_error(context, "is_base85 accepts only text or NULL", -1); + return; + } +} +# endif + +/* This function does the work for the SQLite base85(x) UDF. */ +static void base85(sqlite3_context *context, int na, sqlite3_value *av[]){ + int nb, nc, nv = sqlite3_value_bytes(av[0]); + int nvMax = sqlite3_limit(sqlite3_context_db_handle(context), + SQLITE_LIMIT_LENGTH, -1); + char *cBuf; + u8 *bBuf; + assert(na==1); + switch( sqlite3_value_type(av[0]) ){ + case SQLITE_BLOB: + nb = nv; + /* ulongs tail newlines tailenc+nul*/ + nc = 5*(nv/4) + nv%4 + nv/64+1 + 2; + if( nvMax < nc ){ + sqlite3_result_error(context, "blob expanded to base85 too big", -1); + return; + } + bBuf = (u8*)sqlite3_value_blob(av[0]); + if( !bBuf ){ + if( SQLITE_NOMEM==sqlite3_errcode(sqlite3_context_db_handle(context)) ){ + goto memFail; + } + sqlite3_result_text(context,"",-1,SQLITE_STATIC); + break; + } + cBuf = sqlite3_malloc(nc); + if( !cBuf ) goto memFail; + nc = (int)(toBase85(bBuf, nb, cBuf, "\n") - cBuf); + sqlite3_result_text(context, cBuf, nc, sqlite3_free); + break; + case SQLITE_TEXT: + nc = nv; + nb = 4*(nv/5) + nv%5; /* may overestimate */ + if( nvMax < nb ){ + sqlite3_result_error(context, "blob from base85 may be too big", -1); + return; + }else if( nb<1 ){ + nb = 1; + } + cBuf = (char *)sqlite3_value_text(av[0]); + if( !cBuf ){ + if( SQLITE_NOMEM==sqlite3_errcode(sqlite3_context_db_handle(context)) ){ + goto memFail; + } + sqlite3_result_zeroblob(context, 0); + break; + } + bBuf = sqlite3_malloc(nb); + if( !bBuf ) goto memFail; + nb = (int)(fromBase85(cBuf, nc, bBuf) - bBuf); + sqlite3_result_blob(context, bBuf, nb, sqlite3_free); + break; + default: + sqlite3_result_error(context, "base85 accepts only blob or text.", -1); + return; + } + return; + memFail: + sqlite3_result_error(context, "base85 OOM", -1); +} + +/* +** Establish linkage to running SQLite library. +*/ +#ifndef SQLITE_SHELL_EXTFUNCS +#ifdef _WIN32 + +#endif +int sqlite3_base_init +#else +static int sqlite3_base85_init +#endif +(sqlite3 *db, char **pzErr, const sqlite3_api_routines *pApi){ + SQLITE_EXTENSION_INIT2(pApi); + (void)pzErr; +# ifndef OMIT_BASE85_CHECKER + { + int rc = sqlite3_create_function + (db, "is_base85", 1, + SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS|SQLITE_UTF8, + 0, is_base85, 0, 0); + if( rc!=SQLITE_OK ) return rc; + } +# endif + return sqlite3_create_function + (db, "base85", 1, + SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS|SQLITE_DIRECTONLY|SQLITE_UTF8, + 0, base85, 0, 0); +} + +/* +** Define some macros to allow this extension to be built into the shell +** conveniently, in conjunction with use of SQLITE_SHELL_EXTFUNCS. This +** allows shell.c, as distributed, to have this extension built in. +*/ +# define BASE85_INIT(db) sqlite3_base85_init(db, 0, 0) +# define BASE85_EXPOSE(db, pzErr) /* Not needed, ..._init() does this. */ + +#else /* standalone program */ + +int main(int na, char *av[]){ + int cin; + int rc = 0; + u8 bBuf[4*(B85_DARK_MAX/5)]; + char cBuf[5*(sizeof(bBuf)/4)+2]; + size_t nio; +# ifndef OMIT_BASE85_CHECKER + int b85Clean = 1; +# endif + char rw; + FILE *fb = 0, *foc = 0; + char fmode[3] = "xb"; + if( na < 3 || av[1][0]!='-' || (rw = av[1][1])==0 || (rw!='r' && rw!='w') ){ + sayHelp(); + return 0; + } + fmode[0] = rw; + if( av[2][0]=='-' && av[2][1]==0 ){ + switch( rw ){ + case 'r': + fb = stdin; + setmode(fileno(stdin), O_BINARY); + break; + case 'w': + fb = stdout; + setmode(fileno(stdout), O_BINARY); + break; + } + }else{ + fb = fopen(av[2], fmode); + foc = fb; + } + if( !fb ){ + fprintf(stderr, "Cannot open %s for %c\n", av[2], rw); + rc = 1; + }else{ + switch( rw ){ + case 'r': + while( (nio = fread( bBuf, 1, sizeof(bBuf), fb))>0 ){ + toBase85( bBuf, (int)nio, cBuf, 0 ); + fprintf(stdout, "%s\n", cBuf); + } + break; + case 'w': + while( 0 != fgets(cBuf, sizeof(cBuf), stdin) ){ + int nc = strlen(cBuf); + size_t nbo = fromBase85( cBuf, nc, bBuf ) - bBuf; + if( 1 != fwrite(bBuf, nbo, 1, fb) ) rc = 1; +# ifndef OMIT_BASE85_CHECKER + b85Clean &= allBase85( cBuf, nc ); +# endif + } + break; + default: + sayHelp(); + rc = 1; + } + if( foc ) fclose(foc); + } +# ifndef OMIT_BASE85_CHECKER + if( !b85Clean ){ + fprintf(stderr, "Base85 input had non-base85 dark or control content.\n"); + } +# endif + return rc; +} + +#endif + +/************************* End ../ext/misc/base85.c ********************/ +/************************* Begin ../ext/misc/ieee754.c ******************/ +/* +** 2013-04-17 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +****************************************************************************** +** +** This SQLite extension implements functions for the exact display +** and input of IEEE754 Binary64 floating-point numbers. +** +** ieee754(X) +** ieee754(Y,Z) +** +** In the first form, the value X should be a floating-point number. ** The function will return a string of the form 'ieee754(Y,Z)' where ** Y and Z are integers such that X==Y*pow(2,Z). ** @@ -3243,6 +4744,37 @@ static void ieee754func_to_blob( } } +/* +** SQL Function: ieee754_inc(r,N) +** +** Move the floating point value r by N quantums and return the new +** values. +** +** Behind the scenes: this routine merely casts r into a 64-bit unsigned +** integer, adds N, then casts the value back into float. +** +** Example: To find the smallest positive number: +** +** SELECT ieee754_inc(0.0,+1); +*/ +static void ieee754inc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + double r; + sqlite3_int64 N; + sqlite3_uint64 m1, m2; + double r2; + UNUSED_PARAMETER(argc); + r = sqlite3_value_double(argv[0]); + N = sqlite3_value_int64(argv[1]); + memcpy(&m1, &r, 8); + m2 = m1 + N; + memcpy(&r2, &m2, 8); + sqlite3_result_double(context, r2); +} + #ifdef _WIN32 @@ -3264,7 +4796,7 @@ int sqlite3_ieee_init( { "ieee754_exponent", 1, 2, ieee754func }, { "ieee754_to_blob", 1, 0, ieee754func_to_blob }, { "ieee754_from_blob", 1, 0, ieee754func_from_blob }, - + { "ieee754_inc", 2, 0, ieee754inc }, }; unsigned int i; int rc = SQLITE_OK; @@ -3282,7 +4814,7 @@ int sqlite3_ieee_init( /************************* End ../ext/misc/ieee754.c ********************/ /************************* Begin ../ext/misc/series.c ******************/ /* -** 2015-08-18 +** 2015-08-18, 2023-04-28 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: @@ -3295,7 +4827,19 @@ int sqlite3_ieee_init( ** ** This file demonstrates how to create a table-valued-function using ** a virtual table. This demo implements the generate_series() function -** which gives similar results to the eponymous function in PostgreSQL. +** which gives the same results as the eponymous function in PostgreSQL, +** within the limitation that its arguments are signed 64-bit integers. +** +** Considering its equivalents to generate_series(start,stop,step): A +** value V[n] sequence is produced for integer n ascending from 0 where +** ( V[n] == start + n * step && sgn(V[n] - stop) * sgn(step) >= 0 ) +** for each produced value (independent of production time ordering.) +** +** All parameters must be either integer or convertable to integer. +** The start parameter is required. +** The stop parameter defaults to (1<<32)-1 (aka 4294967295 or 0xffffffff) +** The step parameter defaults to 1 and 0 is treated as 1. +** ** Examples: ** ** SELECT * FROM generate_series(0,100,5); @@ -3311,6 +4855,14 @@ int sqlite3_ieee_init( ** ** Integers 20 through 29. ** +** SELECT * FROM generate_series(0,-100,-5); +** +** Integers 0 -5 -10 ... -100. +** +** SELECT * FROM generate_series(0,-1); +** +** Empty sequence. +** ** HOW IT WORKS ** ** The generate_series "function" is really a virtual table with the @@ -3323,6 +4875,9 @@ int sqlite3_ieee_init( ** step HIDDEN ** ); ** +** The virtual table also has a rowid, logically equivalent to n+1 where +** "n" is the ascending integer in the aforesaid production definition. +** ** Function arguments in queries against this virtual table are translated ** into equality constraints against successive hidden columns. In other ** words, the following pairs of queries are equivalent to each other: @@ -3355,9 +4910,126 @@ int sqlite3_ieee_init( SQLITE_EXTENSION_INIT1 #include #include +#include #ifndef SQLITE_OMIT_VIRTUALTABLE +/* +** Return that member of a generate_series(...) sequence whose 0-based +** index is ix. The 0th member is given by smBase. The sequence members +** progress per ix increment by smStep. +*/ +static sqlite3_int64 genSeqMember(sqlite3_int64 smBase, + sqlite3_int64 smStep, + sqlite3_uint64 ix){ + if( ix>=(sqlite3_uint64)LLONG_MAX ){ + /* Get ix into signed i64 range. */ + ix -= (sqlite3_uint64)LLONG_MAX; + /* With 2's complement ALU, this next can be 1 step, but is split into + * 2 for UBSAN's satisfaction (and hypothetical 1's complement ALUs.) */ + smBase += (LLONG_MAX/2) * smStep; + smBase += (LLONG_MAX - LLONG_MAX/2) * smStep; + } + /* Under UBSAN (or on 1's complement machines), must do this last term + * in steps to avoid the dreaded (and harmless) signed multiply overlow. */ + if( ix>=2 ){ + sqlite3_int64 ix2 = (sqlite3_int64)ix/2; + smBase += ix2*smStep; + ix -= ix2; + } + return smBase + ((sqlite3_int64)ix)*smStep; +} + +/* typedef unsigned char u8; */ + +typedef struct SequenceSpec { + sqlite3_int64 iBase; /* Starting value ("start") */ + sqlite3_int64 iTerm; /* Given terminal value ("stop") */ + sqlite3_int64 iStep; /* Increment ("step") */ + sqlite3_uint64 uSeqIndexMax; /* maximum sequence index (aka "n") */ + sqlite3_uint64 uSeqIndexNow; /* Current index during generation */ + sqlite3_int64 iValueNow; /* Current value during generation */ + u8 isNotEOF; /* Sequence generation not exhausted */ + u8 isReversing; /* Sequence is being reverse generated */ +} SequenceSpec; + +/* +** Prepare a SequenceSpec for use in generating an integer series +** given initialized iBase, iTerm and iStep values. Sequence is +** initialized per given isReversing. Other members are computed. +*/ +static void setupSequence( SequenceSpec *pss ){ + int bSameSigns; + pss->uSeqIndexMax = 0; + pss->isNotEOF = 0; + bSameSigns = (pss->iBase < 0)==(pss->iTerm < 0); + if( pss->iTerm < pss->iBase ){ + sqlite3_uint64 nuspan = 0; + if( bSameSigns ){ + nuspan = (sqlite3_uint64)(pss->iBase - pss->iTerm); + }else{ + /* Under UBSAN (or on 1's complement machines), must do this in steps. + * In this clause, iBase>=0 and iTerm<0 . */ + nuspan = 1; + nuspan += pss->iBase; + nuspan += -(pss->iTerm+1); + } + if( pss->iStep<0 ){ + pss->isNotEOF = 1; + if( nuspan==ULONG_MAX ){ + pss->uSeqIndexMax = ( pss->iStep>LLONG_MIN )? nuspan/-pss->iStep : 1; + }else if( pss->iStep>LLONG_MIN ){ + pss->uSeqIndexMax = nuspan/-pss->iStep; + } + } + }else if( pss->iTerm > pss->iBase ){ + sqlite3_uint64 puspan = 0; + if( bSameSigns ){ + puspan = (sqlite3_uint64)(pss->iTerm - pss->iBase); + }else{ + /* Under UBSAN (or on 1's complement machines), must do this in steps. + * In this clause, iTerm>=0 and iBase<0 . */ + puspan = 1; + puspan += pss->iTerm; + puspan += -(pss->iBase+1); + } + if( pss->iStep>0 ){ + pss->isNotEOF = 1; + pss->uSeqIndexMax = puspan/pss->iStep; + } + }else if( pss->iTerm == pss->iBase ){ + pss->isNotEOF = 1; + pss->uSeqIndexMax = 0; + } + pss->uSeqIndexNow = (pss->isReversing)? pss->uSeqIndexMax : 0; + pss->iValueNow = (pss->isReversing) + ? genSeqMember(pss->iBase, pss->iStep, pss->uSeqIndexMax) + : pss->iBase; +} +/* +** Progress sequence generator to yield next value, if any. +** Leave its state to either yield next value or be at EOF. +** Return whether there is a next value, or 0 at EOF. +*/ +static int progressSequence( SequenceSpec *pss ){ + if( !pss->isNotEOF ) return 0; + if( pss->isReversing ){ + if( pss->uSeqIndexNow > 0 ){ + pss->uSeqIndexNow--; + pss->iValueNow -= pss->iStep; + }else{ + pss->isNotEOF = 0; + } + }else{ + if( pss->uSeqIndexNow < pss->uSeqIndexMax ){ + pss->uSeqIndexNow++; + pss->iValueNow += pss->iStep; + }else{ + pss->isNotEOF = 0; + } + } + return pss->isNotEOF; +} /* series_cursor is a subclass of sqlite3_vtab_cursor which will ** serve as the underlying representation of a cursor that scans @@ -3366,12 +5038,7 @@ SQLITE_EXTENSION_INIT1 typedef struct series_cursor series_cursor; struct series_cursor { sqlite3_vtab_cursor base; /* Base class - must be first */ - int isDesc; /* True to count down rather than up */ - sqlite3_int64 iRowid; /* The rowid */ - sqlite3_int64 iValue; /* Current value ("value") */ - sqlite3_int64 mnValue; /* Mimimum value ("start") */ - sqlite3_int64 mxValue; /* Maximum value ("stop") */ - sqlite3_int64 iStep; /* Increment ("step") */ + SequenceSpec ss; /* (this) Derived class data */ }; /* @@ -3453,12 +5120,7 @@ static int seriesClose(sqlite3_vtab_cursor *cur){ */ static int seriesNext(sqlite3_vtab_cursor *cur){ series_cursor *pCur = (series_cursor*)cur; - if( pCur->isDesc ){ - pCur->iValue -= pCur->iStep; - }else{ - pCur->iValue += pCur->iStep; - } - pCur->iRowid++; + progressSequence( & pCur->ss ); return SQLITE_OK; } @@ -3474,23 +5136,27 @@ static int seriesColumn( series_cursor *pCur = (series_cursor*)cur; sqlite3_int64 x = 0; switch( i ){ - case SERIES_COLUMN_START: x = pCur->mnValue; break; - case SERIES_COLUMN_STOP: x = pCur->mxValue; break; - case SERIES_COLUMN_STEP: x = pCur->iStep; break; - default: x = pCur->iValue; break; + case SERIES_COLUMN_START: x = pCur->ss.iBase; break; + case SERIES_COLUMN_STOP: x = pCur->ss.iTerm; break; + case SERIES_COLUMN_STEP: x = pCur->ss.iStep; break; + default: x = pCur->ss.iValueNow; break; } sqlite3_result_int64(ctx, x); return SQLITE_OK; } +#ifndef LARGEST_UINT64 +#define LARGEST_UINT64 (0xffffffff|(((sqlite3_uint64)0xffffffff)<<32)) +#endif + /* -** Return the rowid for the current row. In this implementation, the -** first row returned is assigned rowid value 1, and each subsequent -** row a value 1 more than that of the previous. +** Return the rowid for the current row, logically equivalent to n+1 where +** "n" is the ascending integer in the aforesaid production definition. */ static int seriesRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){ series_cursor *pCur = (series_cursor*)cur; - *pRowid = pCur->iRowid; + sqlite3_uint64 n = pCur->ss.uSeqIndexNow; + *pRowid = (sqlite3_int64)((nisDesc ){ - return pCur->iValue < pCur->mnValue; - }else{ - return pCur->iValue > pCur->mxValue; - } + return !pCur->ss.isNotEOF; } -/* True to cause run-time checking of the start=, stop=, and/or step= +/* True to cause run-time checking of the start=, stop=, and/or step= ** parameters. The only reason to do this is for testing the ** constraint checking logic for virtual tables in the SQLite core. */ @@ -3518,7 +5180,7 @@ static int seriesEof(sqlite3_vtab_cursor *cur){ /* ** This method is called to "rewind" the series_cursor object back ** to the first row of output. This method is always called at least -** once prior to any call to seriesColumn() or seriesRowid() or +** once prior to any call to seriesColumn() or seriesRowid() or ** seriesEof(). ** ** The query plan selected by seriesBestIndex is passed in the idxNum @@ -3538,7 +5200,7 @@ static int seriesEof(sqlite3_vtab_cursor *cur){ ** (so that seriesEof() will return true) if the table is empty. */ static int seriesFilter( - sqlite3_vtab_cursor *pVtabCursor, + sqlite3_vtab_cursor *pVtabCursor, int idxNum, const char *idxStrUnused, int argc, sqlite3_value **argv ){ @@ -3546,46 +5208,41 @@ static int seriesFilter( int i = 0; (void)idxStrUnused; if( idxNum & 1 ){ - pCur->mnValue = sqlite3_value_int64(argv[i++]); + pCur->ss.iBase = sqlite3_value_int64(argv[i++]); }else{ - pCur->mnValue = 0; + pCur->ss.iBase = 0; } if( idxNum & 2 ){ - pCur->mxValue = sqlite3_value_int64(argv[i++]); + pCur->ss.iTerm = sqlite3_value_int64(argv[i++]); }else{ - pCur->mxValue = 0xffffffff; + pCur->ss.iTerm = 0xffffffff; } if( idxNum & 4 ){ - pCur->iStep = sqlite3_value_int64(argv[i++]); - if( pCur->iStep==0 ){ - pCur->iStep = 1; - }else if( pCur->iStep<0 ){ - pCur->iStep = -pCur->iStep; + pCur->ss.iStep = sqlite3_value_int64(argv[i++]); + if( pCur->ss.iStep==0 ){ + pCur->ss.iStep = 1; + }else if( pCur->ss.iStep<0 ){ if( (idxNum & 16)==0 ) idxNum |= 8; } }else{ - pCur->iStep = 1; + pCur->ss.iStep = 1; } for(i=0; imnValue = 1; - pCur->mxValue = 0; + pCur->ss.iBase = 1; + pCur->ss.iTerm = 0; + pCur->ss.iStep = 1; break; } } if( idxNum & 8 ){ - pCur->isDesc = 1; - pCur->iValue = pCur->mxValue; - if( pCur->iStep>0 ){ - pCur->iValue -= (pCur->mxValue - pCur->mnValue)%pCur->iStep; - } + pCur->ss.isReversing = pCur->ss.iStep > 0; }else{ - pCur->isDesc = 0; - pCur->iValue = pCur->mnValue; + pCur->ss.isReversing = pCur->ss.iStep < 0; } - pCur->iRowid = 1; + setupSequence( &pCur->ss ); return SQLITE_OK; } @@ -4340,7 +5997,7 @@ static const char *re_subcompile_string(ReCompiled *p){ break; } case '[': { - int iFirst = p->nState; + unsigned int iFirst = p->nState; if( rePeek(p)=='^' ){ re_append(p, RE_OP_CC_EXC, 0); p->sIn.i++; @@ -4364,7 +6021,7 @@ static const char *re_subcompile_string(ReCompiled *p){ if( rePeek(p)==']' ){ p->sIn.i++; break; } } if( c==0 ) return "unclosed '['"; - p->aArg[iFirst] = p->nState - iFirst; + if( p->nState>iFirst ) p->aArg[iFirst] = p->nState - iFirst; break; } case '\\': { @@ -4548,6 +6205,7 @@ static void re_bytecode_func( int i; int n; char *z; + (void)argc; zPattern = (const char*)sqlite3_value_text(argv[0]); if( zPattern==0 ) return; @@ -7195,6 +8853,7 @@ static int zipfileConnect( const char *zFile = 0; ZipfileTab *pNew = 0; int rc; + (void)pAux; /* If the table name is not "zipfile", require that the argument be ** specified. This stops zipfile tables from being created as: @@ -7651,6 +9310,7 @@ static int zipfileGetEntry( u8 *aRead; char **pzErr = &pTab->base.zErrMsg; int rc = SQLITE_OK; + (void)nBlob; if( aBlob==0 ){ aRead = pTab->aBuffer; @@ -7938,7 +9598,10 @@ static int zipfileColumn( ** it to be a directory either if the mode suggests so, or if ** the final character in the name is '/'. */ u32 mode = pCDS->iExternalAttr >> 16; - if( !(mode & S_IFDIR) && pCDS->zFile[pCDS->nFile-1]!='/' ){ + if( !(mode & S_IFDIR) + && pCDS->nFile>=1 + && pCDS->zFile[pCDS->nFile-1]!='/' + ){ sqlite3_result_blob(ctx, "", 0, SQLITE_STATIC); } } @@ -8097,6 +9760,9 @@ static int zipfileFilter( int rc = SQLITE_OK; /* Return Code */ int bInMemory = 0; /* True for an in-memory zipfile */ + (void)idxStr; + (void)argc; + zipfileResetCursor(pCsr); if( pTab->zFile ){ @@ -8123,7 +9789,7 @@ static int zipfileFilter( } if( 0==pTab->pWriteFd && 0==bInMemory ){ - pCsr->pFile = fopen(zFile, "rb"); + pCsr->pFile = zFile ? fopen(zFile, "rb") : 0; if( pCsr->pFile==0 ){ zipfileCursorErr(pCsr, "cannot open file: %s", zFile); rc = SQLITE_ERROR; @@ -8157,6 +9823,7 @@ static int zipfileBestIndex( int i; int idx = -1; int unusable = 0; + (void)tab; for(i=0; inConstraint; i++){ const struct sqlite3_index_constraint *pCons = &pIdxInfo->aConstraint[i]; @@ -8371,9 +10038,19 @@ static u32 zipfileGetTime(sqlite3_value *pVal){ */ static void zipfileRemoveEntryFromList(ZipfileTab *pTab, ZipfileEntry *pOld){ if( pOld ){ - ZipfileEntry **pp; - for(pp=&pTab->pFirstEntry; (*pp)!=pOld; pp=&((*pp)->pNext)); - *pp = (*pp)->pNext; + if( pTab->pFirstEntry==pOld ){ + pTab->pFirstEntry = pOld->pNext; + if( pTab->pLastEntry==pOld ) pTab->pLastEntry = 0; + }else{ + ZipfileEntry *p; + for(p=pTab->pFirstEntry; p; p=p->pNext){ + if( p->pNext==pOld ){ + p->pNext = pOld->pNext; + if( pTab->pLastEntry==pOld ) pTab->pLastEntry = p; + break; + } + } + } zipfileEntryFree(pOld); } } @@ -8407,6 +10084,8 @@ static int zipfileUpdate( int bIsDir = 0; u32 iCrc32 = 0; + (void)pRowid; + if( pTab->pWriteFd==0 ){ rc = zipfileBegin(pVtab); if( rc!=SQLITE_OK ) return rc; @@ -8741,6 +10420,7 @@ static int zipfileFindFunction( void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), /* OUT: Result */ void **ppArg /* OUT: User data for *pxFunc */ ){ + (void)nArg; if( sqlite3_stricmp("zipfile_cds", zName)==0 ){ *pxFunc = zipfileFunctionCds; *ppArg = (void*)pVtab; @@ -9149,7 +10829,9 @@ static void sqlarUncompressFunc( }else{ const Bytef *pData= sqlite3_value_blob(argv[0]); Bytef *pOut = sqlite3_malloc(sz); - if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){ + if( pOut==0 ){ + sqlite3_result_error_nomem(context); + }else if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){ sqlite3_result_error(context, "error in uncompress()", -1); }else{ sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT); @@ -9158,7 +10840,6 @@ static void sqlarUncompressFunc( } } - #ifdef _WIN32 #endif @@ -11412,9 +13093,9 @@ void sqlite3_expert_destroy(sqlite3expert *p){ #define SQLITE_SHELL_HAVE_RECOVER 0 #endif #if SQLITE_SHELL_HAVE_RECOVER -/************************* Begin ../ext/recover/dbdata.c ******************/ +/************************* Begin ../ext/recover/sqlite3recover.h ******************/ /* -** 2019-04-17 +** 2022-08-27 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: @@ -11423,13 +13104,266 @@ void sqlite3_expert_destroy(sqlite3expert *p){ ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** -****************************************************************************** +************************************************************************* ** -** This file contains an implementation of two eponymous virtual tables, -** "sqlite_dbdata" and "sqlite_dbptr". Both modules require that the -** "sqlite_dbpage" eponymous virtual table be available. +** This file contains the public interface to the "recover" extension - +** an SQLite extension designed to recover data from corrupted database +** files. +*/ + +/* +** OVERVIEW: ** -** SQLITE_DBDATA: +** To use the API to recover data from a corrupted database, an +** application: +** +** 1) Creates an sqlite3_recover handle by calling either +** sqlite3_recover_init() or sqlite3_recover_init_sql(). +** +** 2) Configures the new handle using one or more calls to +** sqlite3_recover_config(). +** +** 3) Executes the recovery by repeatedly calling sqlite3_recover_step() on +** the handle until it returns something other than SQLITE_OK. If it +** returns SQLITE_DONE, then the recovery operation completed without +** error. If it returns some other non-SQLITE_OK value, then an error +** has occurred. +** +** 4) Retrieves any error code and English language error message using the +** sqlite3_recover_errcode() and sqlite3_recover_errmsg() APIs, +** respectively. +** +** 5) Destroys the sqlite3_recover handle and frees all resources +** using sqlite3_recover_finish(). +** +** The application may abandon the recovery operation at any point +** before it is finished by passing the sqlite3_recover handle to +** sqlite3_recover_finish(). This is not an error, but the final state +** of the output database, or the results of running the partial script +** delivered to the SQL callback, are undefined. +*/ + +#ifndef _SQLITE_RECOVER_H +#define _SQLITE_RECOVER_H + +/* #include "sqlite3.h" */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** An instance of the sqlite3_recover object represents a recovery +** operation in progress. +** +** Constructors: +** +** sqlite3_recover_init() +** sqlite3_recover_init_sql() +** +** Destructor: +** +** sqlite3_recover_finish() +** +** Methods: +** +** sqlite3_recover_config() +** sqlite3_recover_errcode() +** sqlite3_recover_errmsg() +** sqlite3_recover_run() +** sqlite3_recover_step() +*/ +typedef struct sqlite3_recover sqlite3_recover; + +/* +** These two APIs attempt to create and return a new sqlite3_recover object. +** In both cases the first two arguments identify the (possibly +** corrupt) database to recover data from. The first argument is an open +** database handle and the second the name of a database attached to that +** handle (i.e. "main", "temp" or the name of an attached database). +** +** If sqlite3_recover_init() is used to create the new sqlite3_recover +** handle, then data is recovered into a new database, identified by +** string parameter zUri. zUri may be an absolute or relative file path, +** or may be an SQLite URI. If the identified database file already exists, +** it is overwritten. +** +** If sqlite3_recover_init_sql() is invoked, then any recovered data will +** be returned to the user as a series of SQL statements. Executing these +** SQL statements results in the same database as would have been created +** had sqlite3_recover_init() been used. For each SQL statement in the +** output, the callback function passed as the third argument (xSql) is +** invoked once. The first parameter is a passed a copy of the fourth argument +** to this function (pCtx) as its first parameter, and a pointer to a +** nul-terminated buffer containing the SQL statement formated as UTF-8 as +** the second. If the xSql callback returns any value other than SQLITE_OK, +** then processing is immediately abandoned and the value returned used as +** the recover handle error code (see below). +** +** If an out-of-memory error occurs, NULL may be returned instead of +** a valid handle. In all other cases, it is the responsibility of the +** application to avoid resource leaks by ensuring that +** sqlite3_recover_finish() is called on all allocated handles. +*/ +sqlite3_recover *sqlite3_recover_init( + sqlite3* db, + const char *zDb, + const char *zUri +); +sqlite3_recover *sqlite3_recover_init_sql( + sqlite3* db, + const char *zDb, + int (*xSql)(void*, const char*), + void *pCtx +); + +/* +** Configure an sqlite3_recover object that has just been created using +** sqlite3_recover_init() or sqlite3_recover_init_sql(). This function +** may only be called before the first call to sqlite3_recover_step() +** or sqlite3_recover_run() on the object. +** +** The second argument passed to this function must be one of the +** SQLITE_RECOVER_* symbols defined below. Valid values for the third argument +** depend on the specific SQLITE_RECOVER_* symbol in use. +** +** SQLITE_OK is returned if the configuration operation was successful, +** or an SQLite error code otherwise. +*/ +int sqlite3_recover_config(sqlite3_recover*, int op, void *pArg); + +/* +** SQLITE_RECOVER_LOST_AND_FOUND: +** The pArg argument points to a string buffer containing the name +** of a "lost-and-found" table in the output database, or NULL. If +** the argument is non-NULL and the database contains seemingly +** valid pages that cannot be associated with any table in the +** recovered part of the schema, data is extracted from these +** pages to add to the lost-and-found table. +** +** SQLITE_RECOVER_FREELIST_CORRUPT: +** The pArg value must actually be a pointer to a value of type +** int containing value 0 or 1 cast as a (void*). If this option is set +** (argument is 1) and a lost-and-found table has been configured using +** SQLITE_RECOVER_LOST_AND_FOUND, then is assumed that the freelist is +** corrupt and an attempt is made to recover records from pages that +** appear to be linked into the freelist. Otherwise, pages on the freelist +** are ignored. Setting this option can recover more data from the +** database, but often ends up "recovering" deleted records. The default +** value is 0 (clear). +** +** SQLITE_RECOVER_ROWIDS: +** The pArg value must actually be a pointer to a value of type +** int containing value 0 or 1 cast as a (void*). If this option is set +** (argument is 1), then an attempt is made to recover rowid values +** that are not also INTEGER PRIMARY KEY values. If this option is +** clear, then new rowids are assigned to all recovered rows. The +** default value is 1 (set). +** +** SQLITE_RECOVER_SLOWINDEXES: +** The pArg value must actually be a pointer to a value of type +** int containing value 0 or 1 cast as a (void*). If this option is clear +** (argument is 0), then when creating an output database, the recover +** module creates and populates non-UNIQUE indexes right at the end of the +** recovery operation - after all recoverable data has been inserted +** into the new database. This is faster overall, but means that the +** final call to sqlite3_recover_step() for a recovery operation may +** be need to create a large number of indexes, which may be very slow. +** +** Or, if this option is set (argument is 1), then non-UNIQUE indexes +** are created in the output database before it is populated with +** recovered data. This is slower overall, but avoids the slow call +** to sqlite3_recover_step() at the end of the recovery operation. +** +** The default option value is 0. +*/ +#define SQLITE_RECOVER_LOST_AND_FOUND 1 +#define SQLITE_RECOVER_FREELIST_CORRUPT 2 +#define SQLITE_RECOVER_ROWIDS 3 +#define SQLITE_RECOVER_SLOWINDEXES 4 + +/* +** Perform a unit of work towards the recovery operation. This function +** must normally be called multiple times to complete database recovery. +** +** If no error occurs but the recovery operation is not completed, this +** function returns SQLITE_OK. If recovery has been completed successfully +** then SQLITE_DONE is returned. If an error has occurred, then an SQLite +** error code (e.g. SQLITE_IOERR or SQLITE_NOMEM) is returned. It is not +** considered an error if some or all of the data cannot be recovered +** due to database corruption. +** +** Once sqlite3_recover_step() has returned a value other than SQLITE_OK, +** all further such calls on the same recover handle are no-ops that return +** the same non-SQLITE_OK value. +*/ +int sqlite3_recover_step(sqlite3_recover*); + +/* +** Run the recovery operation to completion. Return SQLITE_OK if successful, +** or an SQLite error code otherwise. Calling this function is the same +** as executing: +** +** while( SQLITE_OK==sqlite3_recover_step(p) ); +** return sqlite3_recover_errcode(p); +*/ +int sqlite3_recover_run(sqlite3_recover*); + +/* +** If an error has been encountered during a prior call to +** sqlite3_recover_step(), then this function attempts to return a +** pointer to a buffer containing an English language explanation of +** the error. If no error message is available, or if an out-of memory +** error occurs while attempting to allocate a buffer in which to format +** the error message, NULL is returned. +** +** The returned buffer remains valid until the sqlite3_recover handle is +** destroyed using sqlite3_recover_finish(). +*/ +const char *sqlite3_recover_errmsg(sqlite3_recover*); + +/* +** If this function is called on an sqlite3_recover handle after +** an error occurs, an SQLite error code is returned. Otherwise, SQLITE_OK. +*/ +int sqlite3_recover_errcode(sqlite3_recover*); + +/* +** Clean up a recovery object created by a call to sqlite3_recover_init(). +** The results of using a recovery object with any API after it has been +** passed to this function are undefined. +** +** This function returns the same value as sqlite3_recover_errcode(). +*/ +int sqlite3_recover_finish(sqlite3_recover*); + + +#ifdef __cplusplus +} /* end of the 'extern "C"' block */ +#endif + +#endif /* ifndef _SQLITE_RECOVER_H */ + +/************************* End ../ext/recover/sqlite3recover.h ********************/ +# ifndef SQLITE_HAVE_SQLITE3R +/************************* Begin ../ext/recover/dbdata.c ******************/ +/* +** 2019-04-17 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +****************************************************************************** +** +** This file contains an implementation of two eponymous virtual tables, +** "sqlite_dbdata" and "sqlite_dbptr". Both modules require that the +** "sqlite_dbpage" eponymous virtual table be available. +** +** SQLITE_DBDATA: ** sqlite_dbdata is used to extract data directly from a database b-tree ** page and its associated overflow pages, bypassing the b-tree layer. ** The table schema is equivalent to: @@ -11488,13 +13422,12 @@ void sqlite3_expert_destroy(sqlite3expert *p){ */ #if !defined(SQLITEINT_H) -/* #include "sqlite3ext.h" */ +/* #include "sqlite3.h" */ /* typedef unsigned char u8; */ /* typedef unsigned int u32; */ #endif -SQLITE_EXTENSION_INIT1 #include #include @@ -11579,6 +13512,10 @@ static int dbdataConnect( DbdataTable *pTab = 0; int rc = sqlite3_declare_vtab(db, pAux ? DBPTR_SCHEMA : DBDATA_SCHEMA); + (void)argc; + (void)argv; + (void)pzErr; + sqlite3_vtab_config(db, SQLITE_VTAB_USES_ALL_SCHEMAS); if( rc==SQLITE_OK ){ pTab = (DbdataTable*)sqlite3_malloc64(sizeof(DbdataTable)); if( pTab==0 ){ @@ -11924,10 +13861,14 @@ static int dbdataNext(sqlite3_vtab_cursor *pCursor){ if( pCsr->bOnePage==0 && pCsr->iPgno>pCsr->szDb ) return SQLITE_OK; rc = dbdataLoadPage(pCsr, pCsr->iPgno, &pCsr->aPage, &pCsr->nPage); if( rc!=SQLITE_OK ) return rc; - if( pCsr->aPage ) break; - if( pCsr->bOnePage ) return SQLITE_OK; + if( pCsr->aPage && pCsr->nPage>=256 ) break; + sqlite3_free(pCsr->aPage); + pCsr->aPage = 0; + if( pCsr->bOnePage ) return SQLITE_OK; pCsr->iPgno++; } + + assert( iOff+3+2<=pCsr->nPage ); pCsr->iCell = pTab->bPtr ? -2 : 0; pCsr->nCell = get_uint16(&pCsr->aPage[iOff+3]); } @@ -12071,8 +14012,14 @@ static int dbdataNext(sqlite3_vtab_cursor *pCursor){ if( pCsr->pHdrPtr>&pCsr->pRec[pCsr->nRec] ){ bNextPage = 1; }else{ + int szField = 0; pCsr->pHdrPtr += dbdataGetVarintU32(pCsr->pHdrPtr, &iType); - pCsr->pPtr += dbdataValueBytes(iType); + szField = dbdataValueBytes(iType); + if( (pCsr->nRec - (pCsr->pPtr - pCsr->pRec))pPtr = &pCsr->pRec[pCsr->nRec]; + }else{ + pCsr->pPtr += szField; + } } } } @@ -12162,8 +14109,7 @@ static int dbdataGetEncoding(DbdataCursor *pCsr){ int nPg1 = 0; u8 *aPg1 = 0; rc = dbdataLoadPage(pCsr, 1, &aPg1, &nPg1); - assert( rc!=SQLITE_OK || nPg1==0 || nPg1>=512 ); - if( rc==SQLITE_OK && nPg1>0 ){ + if( rc==SQLITE_OK && nPg1>=(56+4) ){ pCsr->enc = get_uint32(&aPg1[56]); } sqlite3_free(aPg1); @@ -12183,6 +14129,8 @@ static int dbdataFilter( DbdataTable *pTab = (DbdataTable*)pCursor->pVtab; int rc = SQLITE_OK; const char *zSchema = "main"; + (void)idxStr; + (void)argc; dbdataResetCursor(pCsr); assert( pCsr->iPgno==1 ); @@ -12219,8 +14167,6 @@ static int dbdataFilter( } if( rc==SQLITE_OK ){ rc = sqlite3_bind_text(pCsr->pStmt, 1, zSchema, -1, SQLITE_TRANSIENT); - }else{ - pTab->base.zErrMsg = sqlite3_mprintf("%s", sqlite3_errmsg(pTab->db)); } /* Try to determine the encoding of the db by inspecting the header @@ -12229,6 +14175,10 @@ static int dbdataFilter( rc = dbdataGetEncoding(pCsr); } + if( rc!=SQLITE_OK ){ + pTab->base.zErrMsg = sqlite3_mprintf("%s", sqlite3_errmsg(pTab->db)); + } + if( rc==SQLITE_OK ){ rc = dbdataNext(pCursor); } @@ -12295,320 +14245,65 @@ static int dbdataColumn( } /* -** Return the rowid for an sqlite_dbdata or sqlite_dptr table. -*/ -static int dbdataRowid(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){ - DbdataCursor *pCsr = (DbdataCursor*)pCursor; - *pRowid = pCsr->iRowid; - return SQLITE_OK; -} - - -/* -** Invoke this routine to register the "sqlite_dbdata" virtual table module -*/ -static int sqlite3DbdataRegister(sqlite3 *db){ - static sqlite3_module dbdata_module = { - 0, /* iVersion */ - 0, /* xCreate */ - dbdataConnect, /* xConnect */ - dbdataBestIndex, /* xBestIndex */ - dbdataDisconnect, /* xDisconnect */ - 0, /* xDestroy */ - dbdataOpen, /* xOpen - open a cursor */ - dbdataClose, /* xClose - close a cursor */ - dbdataFilter, /* xFilter - configure scan constraints */ - dbdataNext, /* xNext - advance a cursor */ - dbdataEof, /* xEof - check for end of scan */ - dbdataColumn, /* xColumn - read data */ - dbdataRowid, /* xRowid - read data */ - 0, /* xUpdate */ - 0, /* xBegin */ - 0, /* xSync */ - 0, /* xCommit */ - 0, /* xRollback */ - 0, /* xFindMethod */ - 0, /* xRename */ - 0, /* xSavepoint */ - 0, /* xRelease */ - 0, /* xRollbackTo */ - 0 /* xShadowName */ - }; - - int rc = sqlite3_create_module(db, "sqlite_dbdata", &dbdata_module, 0); - if( rc==SQLITE_OK ){ - rc = sqlite3_create_module(db, "sqlite_dbptr", &dbdata_module, (void*)1); - } - return rc; -} - -#ifdef _WIN32 - -#endif -int sqlite3_dbdata_init( - sqlite3 *db, - char **pzErrMsg, - const sqlite3_api_routines *pApi -){ - SQLITE_EXTENSION_INIT2(pApi); - return sqlite3DbdataRegister(db); -} - -#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ - -/************************* End ../ext/recover/dbdata.c ********************/ -/************************* Begin ../ext/recover/sqlite3recover.h ******************/ -/* -** 2022-08-27 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** -** This file contains the public interface to the "recover" extension - -** an SQLite extension designed to recover data from corrupted database -** files. -*/ - -/* -** OVERVIEW: -** -** To use the API to recover data from a corrupted database, an -** application: -** -** 1) Creates an sqlite3_recover handle by calling either -** sqlite3_recover_init() or sqlite3_recover_init_sql(). -** -** 2) Configures the new handle using one or more calls to -** sqlite3_recover_config(). -** -** 3) Executes the recovery by repeatedly calling sqlite3_recover_step() on -** the handle until it returns something other than SQLITE_OK. If it -** returns SQLITE_DONE, then the recovery operation completed without -** error. If it returns some other non-SQLITE_OK value, then an error -** has occurred. -** -** 4) Retrieves any error code and English language error message using the -** sqlite3_recover_errcode() and sqlite3_recover_errmsg() APIs, -** respectively. -** -** 5) Destroys the sqlite3_recover handle and frees all resources -** using sqlite3_recover_finish(). -** -** The application may abandon the recovery operation at any point -** before it is finished by passing the sqlite3_recover handle to -** sqlite3_recover_finish(). This is not an error, but the final state -** of the output database, or the results of running the partial script -** delivered to the SQL callback, are undefined. -*/ - -#ifndef _SQLITE_RECOVER_H -#define _SQLITE_RECOVER_H - -/* #include "sqlite3.h" */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** An instance of the sqlite3_recover object represents a recovery -** operation in progress. -** -** Constructors: -** -** sqlite3_recover_init() -** sqlite3_recover_init_sql() -** -** Destructor: -** -** sqlite3_recover_finish() -** -** Methods: -** -** sqlite3_recover_config() -** sqlite3_recover_errcode() -** sqlite3_recover_errmsg() -** sqlite3_recover_run() -** sqlite3_recover_step() -*/ -typedef struct sqlite3_recover sqlite3_recover; - -/* -** These two APIs attempt to create and return a new sqlite3_recover object. -** In both cases the first two arguments identify the (possibly -** corrupt) database to recover data from. The first argument is an open -** database handle and the second the name of a database attached to that -** handle (i.e. "main", "temp" or the name of an attached database). -** -** If sqlite3_recover_init() is used to create the new sqlite3_recover -** handle, then data is recovered into a new database, identified by -** string parameter zUri. zUri may be an absolute or relative file path, -** or may be an SQLite URI. If the identified database file already exists, -** it is overwritten. -** -** If sqlite3_recover_init_sql() is invoked, then any recovered data will -** be returned to the user as a series of SQL statements. Executing these -** SQL statements results in the same database as would have been created -** had sqlite3_recover_init() been used. For each SQL statement in the -** output, the callback function passed as the third argument (xSql) is -** invoked once. The first parameter is a passed a copy of the fourth argument -** to this function (pCtx) as its first parameter, and a pointer to a -** nul-terminated buffer containing the SQL statement formated as UTF-8 as -** the second. If the xSql callback returns any value other than SQLITE_OK, -** then processing is immediately abandoned and the value returned used as -** the recover handle error code (see below). -** -** If an out-of-memory error occurs, NULL may be returned instead of -** a valid handle. In all other cases, it is the responsibility of the -** application to avoid resource leaks by ensuring that -** sqlite3_recover_finish() is called on all allocated handles. -*/ -sqlite3_recover *sqlite3_recover_init( - sqlite3* db, - const char *zDb, - const char *zUri -); -sqlite3_recover *sqlite3_recover_init_sql( - sqlite3* db, - const char *zDb, - int (*xSql)(void*, const char*), - void *pCtx -); - -/* -** Configure an sqlite3_recover object that has just been created using -** sqlite3_recover_init() or sqlite3_recover_init_sql(). This function -** may only be called before the first call to sqlite3_recover_step() -** or sqlite3_recover_run() on the object. -** -** The second argument passed to this function must be one of the -** SQLITE_RECOVER_* symbols defined below. Valid values for the third argument -** depend on the specific SQLITE_RECOVER_* symbol in use. -** -** SQLITE_OK is returned if the configuration operation was successful, -** or an SQLite error code otherwise. -*/ -int sqlite3_recover_config(sqlite3_recover*, int op, void *pArg); - -/* -** SQLITE_RECOVER_LOST_AND_FOUND: -** The pArg argument points to a string buffer containing the name -** of a "lost-and-found" table in the output database, or NULL. If -** the argument is non-NULL and the database contains seemingly -** valid pages that cannot be associated with any table in the -** recovered part of the schema, data is extracted from these -** pages to add to the lost-and-found table. -** -** SQLITE_RECOVER_FREELIST_CORRUPT: -** The pArg value must actually be a pointer to a value of type -** int containing value 0 or 1 cast as a (void*). If this option is set -** (argument is 1) and a lost-and-found table has been configured using -** SQLITE_RECOVER_LOST_AND_FOUND, then is assumed that the freelist is -** corrupt and an attempt is made to recover records from pages that -** appear to be linked into the freelist. Otherwise, pages on the freelist -** are ignored. Setting this option can recover more data from the -** database, but often ends up "recovering" deleted records. The default -** value is 0 (clear). -** -** SQLITE_RECOVER_ROWIDS: -** The pArg value must actually be a pointer to a value of type -** int containing value 0 or 1 cast as a (void*). If this option is set -** (argument is 1), then an attempt is made to recover rowid values -** that are not also INTEGER PRIMARY KEY values. If this option is -** clear, then new rowids are assigned to all recovered rows. The -** default value is 1 (set). -** -** SQLITE_RECOVER_SLOWINDEXES: -** The pArg value must actually be a pointer to a value of type -** int containing value 0 or 1 cast as a (void*). If this option is clear -** (argument is 0), then when creating an output database, the recover -** module creates and populates non-UNIQUE indexes right at the end of the -** recovery operation - after all recoverable data has been inserted -** into the new database. This is faster overall, but means that the -** final call to sqlite3_recover_step() for a recovery operation may -** be need to create a large number of indexes, which may be very slow. -** -** Or, if this option is set (argument is 1), then non-UNIQUE indexes -** are created in the output database before it is populated with -** recovered data. This is slower overall, but avoids the slow call -** to sqlite3_recover_step() at the end of the recovery operation. -** -** The default option value is 0. -*/ -#define SQLITE_RECOVER_LOST_AND_FOUND 1 -#define SQLITE_RECOVER_FREELIST_CORRUPT 2 -#define SQLITE_RECOVER_ROWIDS 3 -#define SQLITE_RECOVER_SLOWINDEXES 4 - -/* -** Perform a unit of work towards the recovery operation. This function -** must normally be called multiple times to complete database recovery. -** -** If no error occurs but the recovery operation is not completed, this -** function returns SQLITE_OK. If recovery has been completed successfully -** then SQLITE_DONE is returned. If an error has occurred, then an SQLite -** error code (e.g. SQLITE_IOERR or SQLITE_NOMEM) is returned. It is not -** considered an error if some or all of the data cannot be recovered -** due to database corruption. -** -** Once sqlite3_recover_step() has returned a value other than SQLITE_OK, -** all further such calls on the same recover handle are no-ops that return -** the same non-SQLITE_OK value. -*/ -int sqlite3_recover_step(sqlite3_recover*); - -/* -** Run the recovery operation to completion. Return SQLITE_OK if successful, -** or an SQLite error code otherwise. Calling this function is the same -** as executing: -** -** while( SQLITE_OK==sqlite3_recover_step(p) ); -** return sqlite3_recover_errcode(p); +** Return the rowid for an sqlite_dbdata or sqlite_dptr table. */ -int sqlite3_recover_run(sqlite3_recover*); +static int dbdataRowid(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){ + DbdataCursor *pCsr = (DbdataCursor*)pCursor; + *pRowid = pCsr->iRowid; + return SQLITE_OK; +} -/* -** If an error has been encountered during a prior call to -** sqlite3_recover_step(), then this function attempts to return a -** pointer to a buffer containing an English language explanation of -** the error. If no error message is available, or if an out-of memory -** error occurs while attempting to allocate a buffer in which to format -** the error message, NULL is returned. -** -** The returned buffer remains valid until the sqlite3_recover handle is -** destroyed using sqlite3_recover_finish(). -*/ -const char *sqlite3_recover_errmsg(sqlite3_recover*); /* -** If this function is called on an sqlite3_recover handle after -** an error occurs, an SQLite error code is returned. Otherwise, SQLITE_OK. -*/ -int sqlite3_recover_errcode(sqlite3_recover*); - -/* -** Clean up a recovery object created by a call to sqlite3_recover_init(). -** The results of using a recovery object with any API after it has been -** passed to this function are undefined. -** -** This function returns the same value as sqlite3_recover_errcode(). +** Invoke this routine to register the "sqlite_dbdata" virtual table module */ -int sqlite3_recover_finish(sqlite3_recover*); +static int sqlite3DbdataRegister(sqlite3 *db){ + static sqlite3_module dbdata_module = { + 0, /* iVersion */ + 0, /* xCreate */ + dbdataConnect, /* xConnect */ + dbdataBestIndex, /* xBestIndex */ + dbdataDisconnect, /* xDisconnect */ + 0, /* xDestroy */ + dbdataOpen, /* xOpen - open a cursor */ + dbdataClose, /* xClose - close a cursor */ + dbdataFilter, /* xFilter - configure scan constraints */ + dbdataNext, /* xNext - advance a cursor */ + dbdataEof, /* xEof - check for end of scan */ + dbdataColumn, /* xColumn - read data */ + dbdataRowid, /* xRowid - read data */ + 0, /* xUpdate */ + 0, /* xBegin */ + 0, /* xSync */ + 0, /* xCommit */ + 0, /* xRollback */ + 0, /* xFindMethod */ + 0, /* xRename */ + 0, /* xSavepoint */ + 0, /* xRelease */ + 0, /* xRollbackTo */ + 0 /* xShadowName */ + }; + int rc = sqlite3_create_module(db, "sqlite_dbdata", &dbdata_module, 0); + if( rc==SQLITE_OK ){ + rc = sqlite3_create_module(db, "sqlite_dbptr", &dbdata_module, (void*)1); + } + return rc; +} -#ifdef __cplusplus -} /* end of the 'extern "C"' block */ -#endif +int sqlite3_dbdata_init( + sqlite3 *db, + char **pzErrMsg, + const sqlite3_api_routines *pApi +){ + (void)pzErrMsg; + return sqlite3DbdataRegister(db); +} -#endif /* ifndef _SQLITE_RECOVER_H */ +#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ -/************************* End ../ext/recover/sqlite3recover.h ********************/ +/************************* End ../ext/recover/dbdata.c ********************/ /************************* Begin ../ext/recover/sqlite3recover.c ******************/ /* ** 2022-08-27 @@ -13373,6 +15068,7 @@ static void recoverEscapeCrnl( sqlite3_value **argv ){ const char *zText = (const char*)sqlite3_value_text(argv[0]); + (void)argc; if( zText && zText[0]=='\'' ){ int nText = sqlite3_value_bytes(argv[0]); int i; @@ -13525,7 +15221,7 @@ static void recoverTransferSettings(sqlite3_recover *p){ return; } - for(ii=0; iidbIn, "PRAGMA %Q.%s", p->zDb, zPrag); @@ -13603,7 +15299,9 @@ static int recoverOpenOutput(sqlite3_recover *p){ } /* Register the custom user-functions with the output handle. */ - for(ii=0; p->errCode==SQLITE_OK && iierrCode==SQLITE_OK && ii<(int)(sizeof(aFunc)/sizeof(aFunc[0])); + ii++){ p->errCode = sqlite3_create_function(db, aFunc[ii].zName, aFunc[ii].nArg, SQLITE_UTF8, (void*)p, aFunc[ii].xFunc, 0, 0 ); @@ -13715,7 +15413,7 @@ static void recoverAddTable( int iField = sqlite3_column_int(pStmt, 0); int iCol = sqlite3_column_int(pStmt, 1); - assert( iFieldnCol && iColnCol ); + assert( iColnCol ); pNew->aCol[iCol].iField = iField; pNew->bIntkey = 0; @@ -14712,7 +16410,7 @@ static int recoverIsValidPage(u8 *aTmp, const u8 *a, int n){ if( iFree>(n-4) ) return 0; iNext = recoverGetU16(&a[iFree]); nByte = recoverGetU16(&a[iFree+2]); - if( iFree+nByte>n ) return 0; + if( iFree+nByte>n || nByte<4 ) return 0; if( iNext && iNext2 ) exit(1); + if( ++seenInterrupt>1 ) exit(1); if( globalDb ) sqlite3_interrupt(globalDb); } @@ -16372,6 +18084,7 @@ static void printSchemaLine(FILE *out, const char *z, const char *zTail){ int i; for(i=0; isGraph.pRow; if( pRow ){ if( pRow->zText[0]=='-' ){ @@ -16492,6 +18205,8 @@ static void eqp_render(ShellState *p){ utf8_printf(p->out, "%s\n", pRow->zText+3); p->sGraph.pRow = pRow->pNext; sqlite3_free(pRow); + }else if( nCycle>0 ){ + utf8_printf(p->out, "QUERY PLAN (cycles=%lld [100%%])\n", nCycle); }else{ utf8_printf(p->out, "QUERY PLAN\n"); } @@ -16589,38 +18304,58 @@ static int shell_callback( } break; } + case MODE_ScanExp: case MODE_Explain: { - static const int aExplainWidth[] = {4, 13, 4, 4, 4, 13, 2, 13}; - if( nArg>ArraySize(aExplainWidth) ){ - nArg = ArraySize(aExplainWidth); + static const int aExplainWidth[] = {4, 13, 4, 4, 4, 13, 2, 13}; + static const int aExplainMap[] = {0, 1, 2, 3, 4, 5, 6, 7 }; + static const int aScanExpWidth[] = {4, 6, 6, 13, 4, 4, 4, 13, 2, 13}; + static const int aScanExpMap[] = {0, 9, 8, 1, 2, 3, 4, 5, 6, 7 }; + + const int *aWidth = aExplainWidth; + const int *aMap = aExplainMap; + int nWidth = ArraySize(aExplainWidth); + int iIndent = 1; + + if( p->cMode==MODE_ScanExp ){ + aWidth = aScanExpWidth; + aMap = aScanExpMap; + nWidth = ArraySize(aScanExpWidth); + iIndent = 3; } + if( nArg>nWidth ) nArg = nWidth; + + /* If this is the first row seen, print out the headers */ if( p->cnt++==0 ){ for(i=0; iout, w, azCol[i]); + utf8_width_print(p->out, aWidth[i], azCol[ aMap[i] ]); fputs(i==nArg-1 ? "\n" : " ", p->out); } for(i=0; iout, w); + print_dashes(p->out, aWidth[i]); fputs(i==nArg-1 ? "\n" : " ", p->out); } } + + /* If there is no data, exit early. */ if( azArg==0 ) break; + for(i=0; iw ){ - w = strlenChar(azArg[i]); + if( zVal && strlenChar(zVal)>w ){ + w = strlenChar(zVal); + zSep = " "; } - if( i==1 && p->aiIndent && p->pStmt ){ + if( i==iIndent && p->aiIndent && p->pStmt ){ if( p->iIndentnIndent ){ utf8_printf(p->out, "%*.s", p->aiIndent[p->iIndent], ""); } p->iIndent++; } - utf8_width_print(p->out, w, azArg[i] ? azArg[i] : p->nullValue); - fputs(i==nArg-1 ? "\n" : " ", p->out); + utf8_width_print(p->out, w, zVal ? zVal : p->nullValue); + fputs(i==nArg-1 ? "\n" : zSep, p->out); } break; } @@ -16804,9 +18539,9 @@ static int shell_callback( sqlite3_uint64 ur; memcpy(&ur,&r,sizeof(r)); if( ur==0x7ff0000000000000LL ){ - raw_printf(p->out, "1e999"); + raw_printf(p->out, "9.0e+999"); }else if( ur==0xfff0000000000000LL ){ - raw_printf(p->out, "-1e999"); + raw_printf(p->out, "-9.0e+999"); }else{ sqlite3_int64 ir = (sqlite3_int64)r; if( r==(double)ir ){ @@ -16850,9 +18585,9 @@ static int shell_callback( sqlite3_uint64 ur; memcpy(&ur,&r,sizeof(r)); if( ur==0x7ff0000000000000LL ){ - raw_printf(p->out, "1e999"); + raw_printf(p->out, "9.0e+999"); }else if( ur==0xfff0000000000000LL ){ - raw_printf(p->out, "-1e999"); + raw_printf(p->out, "-9.0e+999"); }else{ sqlite3_snprintf(50,z,"%!.20g", r); raw_printf(p->out, "%s", z); @@ -17056,6 +18791,7 @@ static char *shell_error_context(const char *zSql, sqlite3 *db){ if( db==0 || zSql==0 || (iOffset = sqlite3_error_offset(db))<0 + || iOffset>=(int)strlen(zSql) ){ return sqlite3_mprintf(""); } @@ -17067,15 +18803,15 @@ static char *shell_error_context(const char *zSql, sqlite3 *db){ len = strlen(zSql); if( len>78 ){ len = 78; - while( (zSql[len]&0xc0)==0x80 ) len--; + while( len>0 && (zSql[len]&0xc0)==0x80 ) len--; } zCode = sqlite3_mprintf("%.*s", len, zSql); shell_check_oom(zCode); for(i=0; zCode[i]; i++){ if( IsSpace(zSql[i]) ) zCode[i] = ' '; } if( iOffset<25 ){ - zMsg = sqlite3_mprintf("\n %z\n %*s^--- error here", zCode, iOffset, ""); + zMsg = sqlite3_mprintf("\n %z\n %*s^--- error here", zCode,iOffset,""); }else{ - zMsg = sqlite3_mprintf("\n %z\n %*serror here ---^", zCode, iOffset-14, ""); + zMsg = sqlite3_mprintf("\n %z\n %*serror here ---^", zCode,iOffset-14,""); } return zMsg; } @@ -17140,7 +18876,7 @@ static int run_table_dump_query( */ static char *save_err_msg( sqlite3 *db, /* Database to query */ - const char *zPhase, /* When the error occcurs */ + const char *zPhase, /* When the error occurs */ int rc, /* Error code returned from API */ const char *zSql /* SQL string, or NULL */ ){ @@ -17263,7 +18999,7 @@ static int display_stats( if( pArg->statsOn==3 ){ if( pArg->pStmt ){ - iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_VM_STEP, bReset); + iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_VM_STEP,bReset); raw_printf(pArg->out, "VM-steps: %d\n", iCur); } return 0; @@ -17344,8 +19080,10 @@ static int display_stats( raw_printf(pArg->out, "Sort Operations: %d\n", iCur); iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_AUTOINDEX,bReset); raw_printf(pArg->out, "Autoindex Inserts: %d\n", iCur); - iHit = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_FILTER_HIT, bReset); - iMiss = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_FILTER_MISS, bReset); + iHit = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_FILTER_HIT, + bReset); + iMiss = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_FILTER_MISS, + bReset); if( iHit || iMiss ){ raw_printf(pArg->out, "Bloom filter bypass taken: %d/%d\n", iHit, iHit+iMiss); @@ -17369,53 +19107,114 @@ static int display_stats( return 0; } -/* -** Display scan stats. -*/ -static void display_scanstats( + +#ifdef SQLITE_ENABLE_STMT_SCANSTATUS +static int scanStatsHeight(sqlite3_stmt *p, int iEntry){ + int iPid = 0; + int ret = 1; + sqlite3_stmt_scanstatus_v2(p, iEntry, + SQLITE_SCANSTAT_SELECTID, SQLITE_SCANSTAT_COMPLEX, (void*)&iPid + ); + while( iPid!=0 ){ + int ii; + for(ii=0; 1; ii++){ + int iId; + int res; + res = sqlite3_stmt_scanstatus_v2(p, ii, + SQLITE_SCANSTAT_SELECTID, SQLITE_SCANSTAT_COMPLEX, (void*)&iId + ); + if( res ) break; + if( iId==iPid ){ + sqlite3_stmt_scanstatus_v2(p, ii, + SQLITE_SCANSTAT_PARENTID, SQLITE_SCANSTAT_COMPLEX, (void*)&iPid + ); + } + } + ret++; + } + return ret; +} +#endif + +#ifdef SQLITE_ENABLE_STMT_SCANSTATUS +static void display_explain_scanstats( sqlite3 *db, /* Database to query */ ShellState *pArg /* Pointer to ShellState */ ){ -#ifndef SQLITE_ENABLE_STMT_SCANSTATUS - UNUSED_PARAMETER(db); - UNUSED_PARAMETER(pArg); -#else - int i, k, n, mx; - raw_printf(pArg->out, "-------- scanstats --------\n"); - mx = 0; - for(k=0; k<=mx; k++){ - double rEstLoop = 1.0; - for(i=n=0; 1; i++){ - sqlite3_stmt *p = pArg->pStmt; - sqlite3_int64 nLoop, nVisit; - double rEst; - int iSid; - const char *zExplain; - if( sqlite3_stmt_scanstatus(p, i, SQLITE_SCANSTAT_NLOOP, (void*)&nLoop) ){ - break; + static const int f = SQLITE_SCANSTAT_COMPLEX; + sqlite3_stmt *p = pArg->pStmt; + int ii = 0; + i64 nTotal = 0; + int nWidth = 0; + eqp_reset(pArg); + + for(ii=0; 1; ii++){ + const char *z = 0; + int n = 0; + if( sqlite3_stmt_scanstatus_v2(p,ii,SQLITE_SCANSTAT_EXPLAIN,f,(void*)&z) ){ + break; + } + n = strlen(z) + scanStatsHeight(p, ii)*3; + if( n>nWidth ) nWidth = n; + } + nWidth += 4; + + sqlite3_stmt_scanstatus_v2(p, -1, SQLITE_SCANSTAT_NCYCLE, f, (void*)&nTotal); + for(ii=0; 1; ii++){ + i64 nLoop = 0; + i64 nRow = 0; + i64 nCycle = 0; + int iId = 0; + int iPid = 0; + const char *z = 0; + const char *zName = 0; + char *zText = 0; + double rEst = 0.0; + + if( sqlite3_stmt_scanstatus_v2(p,ii,SQLITE_SCANSTAT_EXPLAIN,f,(void*)&z) ){ + break; + } + sqlite3_stmt_scanstatus_v2(p, ii, SQLITE_SCANSTAT_EST,f,(void*)&rEst); + sqlite3_stmt_scanstatus_v2(p, ii, SQLITE_SCANSTAT_NLOOP,f,(void*)&nLoop); + sqlite3_stmt_scanstatus_v2(p, ii, SQLITE_SCANSTAT_NVISIT,f,(void*)&nRow); + sqlite3_stmt_scanstatus_v2(p, ii, SQLITE_SCANSTAT_NCYCLE,f,(void*)&nCycle); + sqlite3_stmt_scanstatus_v2(p, ii, SQLITE_SCANSTAT_SELECTID,f,(void*)&iId); + sqlite3_stmt_scanstatus_v2(p, ii, SQLITE_SCANSTAT_PARENTID,f,(void*)&iPid); + sqlite3_stmt_scanstatus_v2(p, ii, SQLITE_SCANSTAT_NAME,f,(void*)&zName); + + zText = sqlite3_mprintf("%s", z); + if( nCycle>=0 || nLoop>=0 || nRow>=0 ){ + char *z = 0; + if( nCycle>=0 && nTotal>0 ){ + z = sqlite3_mprintf("%zcycles=%lld [%d%%]", z, + nCycle, ((nCycle*100)+nTotal/2) / nTotal + ); } - sqlite3_stmt_scanstatus(p, i, SQLITE_SCANSTAT_SELECTID, (void*)&iSid); - if( iSid>mx ) mx = iSid; - if( iSid!=k ) continue; - if( n==0 ){ - rEstLoop = (double)nLoop; - if( k>0 ) raw_printf(pArg->out, "-------- subquery %d -------\n", k); + if( nLoop>=0 ){ + z = sqlite3_mprintf("%z%sloops=%lld", z, z ? " " : "", nLoop); } - n++; - sqlite3_stmt_scanstatus(p, i, SQLITE_SCANSTAT_NVISIT, (void*)&nVisit); - sqlite3_stmt_scanstatus(p, i, SQLITE_SCANSTAT_EST, (void*)&rEst); - sqlite3_stmt_scanstatus(p, i, SQLITE_SCANSTAT_EXPLAIN, (void*)&zExplain); - utf8_printf(pArg->out, "Loop %2d: %s\n", n, zExplain); - rEstLoop *= rEst; - raw_printf(pArg->out, - " nLoop=%-8lld nRow=%-8lld estRow=%-8lld estRow/Loop=%-8g\n", - nLoop, nVisit, (sqlite3_int64)(rEstLoop+0.5), rEst + if( nRow>=0 ){ + z = sqlite3_mprintf("%z%srows=%lld", z, z ? " " : "", nRow); + } + + if( zName && pArg->scanstatsOn>1 ){ + double rpl = (double)nRow / (double)nLoop; + z = sqlite3_mprintf("%z rpl=%.1f est=%.1f", z, rpl, rEst); + } + + zText = sqlite3_mprintf( + "% *z (%z)", -1*(nWidth-scanStatsHeight(p, ii)*3), zText, z ); } + + eqp_append(pArg, iId, iPid, zText); + sqlite3_free(zText); } - raw_printf(pArg->out, "---------------------------\n"); -#endif + + eqp_render(pArg, nTotal); } +#endif + /* ** Parameter azArray points to a zero-terminated array of strings. zStr @@ -17453,8 +19252,6 @@ static int str_in_array(const char *zStr, const char **azArray){ ** and "Goto" by 2 spaces. */ static void explain_data_prepare(ShellState *p, sqlite3_stmt *pSql){ - const char *zSql; /* The text of the SQL statement */ - const char *z; /* Used to check if this is an EXPLAIN */ int *abYield = 0; /* True if op is an OP_Yield */ int nAlloc = 0; /* Allocated size of p->aiIndent[], abYield */ int iOp; /* Index of operation in p->aiIndent[] */ @@ -17465,65 +19262,45 @@ static void explain_data_prepare(ShellState *p, sqlite3_stmt *pSql){ "Rewind", 0 }; const char *azGoto[] = { "Goto", 0 }; - /* Try to figure out if this is really an EXPLAIN statement. If this - ** cannot be verified, return early. */ - if( sqlite3_column_count(pSql)!=8 ){ - p->cMode = p->mode; - return; - } - zSql = sqlite3_sql(pSql); - if( zSql==0 ) return; - for(z=zSql; *z==' ' || *z=='\t' || *z=='\n' || *z=='\f' || *z=='\r'; z++); - if( sqlite3_strnicmp(z, "explain", 7) ){ - p->cMode = p->mode; - return; - } + /* The caller guarantees that the leftmost 4 columns of the statement + ** passed to this function are equivalent to the leftmost 4 columns + ** of EXPLAIN statement output. In practice the statement may be + ** an EXPLAIN, or it may be a query on the bytecode() virtual table. */ + assert( sqlite3_column_count(pSql)>=4 ); + assert( 0==sqlite3_stricmp( sqlite3_column_name(pSql, 0), "addr" ) ); + assert( 0==sqlite3_stricmp( sqlite3_column_name(pSql, 1), "opcode" ) ); + assert( 0==sqlite3_stricmp( sqlite3_column_name(pSql, 2), "p1" ) ); + assert( 0==sqlite3_stricmp( sqlite3_column_name(pSql, 3), "p2" ) ); for(iOp=0; SQLITE_ROW==sqlite3_step(pSql); iOp++){ int i; int iAddr = sqlite3_column_int(pSql, 0); const char *zOp = (const char*)sqlite3_column_text(pSql, 1); - - /* Set p2 to the P2 field of the current opcode. Then, assuming that - ** p2 is an instruction address, set variable p2op to the index of that - ** instruction in the aiIndent[] array. p2 and p2op may be different if - ** the current instruction is part of a sub-program generated by an - ** SQL trigger or foreign key. */ + int p1 = sqlite3_column_int(pSql, 2); int p2 = sqlite3_column_int(pSql, 3); + + /* Assuming that p2 is an instruction address, set variable p2op to the + ** index of that instruction in the aiIndent[] array. p2 and p2op may be + ** different if the current instruction is part of a sub-program generated + ** by an SQL trigger or foreign key. */ int p2op = (p2 + (iOp-iAddr)); /* Grow the p->aiIndent array as required */ if( iOp>=nAlloc ){ - if( iOp==0 ){ - /* Do further verfication that this is explain output. Abort if - ** it is not */ - static const char *explainCols[] = { - "addr", "opcode", "p1", "p2", "p3", "p4", "p5", "comment" }; - int jj; - for(jj=0; jjcMode = p->mode; - sqlite3_reset(pSql); - return; - } - } - } nAlloc += 100; p->aiIndent = (int*)sqlite3_realloc64(p->aiIndent, nAlloc*sizeof(int)); shell_check_oom(p->aiIndent); abYield = (int*)sqlite3_realloc64(abYield, nAlloc*sizeof(int)); shell_check_oom(abYield); } + abYield[iOp] = str_in_array(zOp, azYield); p->aiIndent[iOp] = 0; p->nIndent = iOp+1; - if( str_in_array(zOp, azNext) && p2op>0 ){ for(i=p2op; iaiIndent[i] += 2; } - if( str_in_array(zOp, azGoto) && p2opnIndent - && (abYield[p2op] || sqlite3_column_int(pSql, 2)) - ){ + if( str_in_array(zOp, azGoto) && p2opaiIndent[i] += 2; } } @@ -17543,6 +19320,48 @@ static void explain_data_delete(ShellState *p){ p->iIndent = 0; } +static void exec_prepared_stmt(ShellState*, sqlite3_stmt*); + +/* +** Display scan stats. +*/ +static void display_scanstats( + sqlite3 *db, /* Database to query */ + ShellState *pArg /* Pointer to ShellState */ +){ +#ifndef SQLITE_ENABLE_STMT_SCANSTATUS + UNUSED_PARAMETER(db); + UNUSED_PARAMETER(pArg); +#else + if( pArg->scanstatsOn==3 ){ + const char *zSql = + " SELECT addr, opcode, p1, p2, p3, p4, p5, comment, nexec," + " round(ncycle*100.0 / (sum(ncycle) OVER ()), 2)||'%' AS cycles" + " FROM bytecode(?)"; + + int rc = SQLITE_OK; + sqlite3_stmt *pStmt = 0; + rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0); + if( rc==SQLITE_OK ){ + sqlite3_stmt *pSave = pArg->pStmt; + pArg->pStmt = pStmt; + sqlite3_bind_pointer(pStmt, 1, pSave, "stmt-pointer", 0); + + pArg->cnt = 0; + pArg->cMode = MODE_ScanExp; + explain_data_prepare(pArg, pStmt); + exec_prepared_stmt(pArg, pStmt); + explain_data_delete(pArg); + + sqlite3_finalize(pStmt); + pArg->pStmt = pSave; + } + }else{ + display_explain_scanstats(db, pArg); + } +#endif +} + /* ** Disable and restore .wheretrace and .treetrace/.selecttrace settings. */ @@ -17600,12 +19419,13 @@ static void bind_prepared_stmt(ShellState *pArg, sqlite3_stmt *pStmt){ if( nVar==0 ) return; /* Nothing to do */ if( sqlite3_table_column_metadata(pArg->db, "TEMP", "sqlite_parameters", "key", 0, 0, 0, 0, 0)!=SQLITE_OK ){ - return; /* Parameter table does not exist */ + rc = SQLITE_NOTFOUND; + pQ = 0; + }else{ + rc = sqlite3_prepare_v2(pArg->db, + "SELECT value FROM temp.sqlite_parameters" + " WHERE key=?1", -1, &pQ, 0); } - rc = sqlite3_prepare_v2(pArg->db, - "SELECT value FROM temp.sqlite_parameters" - " WHERE key=?1", -1, &pQ, 0); - if( rc || pQ==0 ) return; for(i=1; i<=nVar; i++){ char zNum[30]; const char *zVar = sqlite3_bind_parameter_name(pStmt, i); @@ -17614,8 +19434,16 @@ static void bind_prepared_stmt(ShellState *pArg, sqlite3_stmt *pStmt){ zVar = zNum; } sqlite3_bind_text(pQ, 1, zVar, -1, SQLITE_STATIC); - if( sqlite3_step(pQ)==SQLITE_ROW ){ + if( rc==SQLITE_OK && pQ && sqlite3_step(pQ)==SQLITE_ROW ){ sqlite3_bind_value(pStmt, i, sqlite3_column_value(pQ, 0)); +#ifdef NAN + }else if( sqlite3_strlike("_NAN", zVar, 0)==0 ){ + sqlite3_bind_double(pStmt, i, NAN); +#endif +#ifdef INFINITY + }else if( sqlite3_strlike("_INF", zVar, 0)==0 ){ + sqlite3_bind_double(pStmt, i, INFINITY); +#endif }else{ sqlite3_bind_null(pStmt, i); } @@ -17653,7 +19481,7 @@ static void bind_prepared_stmt(ShellState *pArg, sqlite3_stmt *pStmt){ ** characters */ static void print_box_line(FILE *out, int N){ - const char zDash[] = + const char zDash[] = BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24 BOX_24; const int nDash = sizeof(zDash) - 1; @@ -17782,7 +19610,7 @@ static char *translateForDisplayAndDup( break; } zOut[j] = 0; - return (char*)zOut; + return (char*)zOut; } /* Extract the value of the i-th current column for pStmt as an SQL literal @@ -17829,7 +19657,7 @@ static char *quoted_column(sqlite3_stmt *pStmt, int i){ */ static void exec_prepared_stmt_columnar( ShellState *p, /* Pointer to ShellState */ - sqlite3_stmt *pStmt /* Statment to run */ + sqlite3_stmt *pStmt /* Statement to run */ ){ sqlite3_int64 nRow = 0; int nColumn = 0; @@ -17859,7 +19687,7 @@ static void exec_prepared_stmt_columnar( azData = sqlite3_malloc64( nAlloc*sizeof(char*) ); shell_check_oom(azData); azNextLine = sqlite3_malloc64( nColumn*sizeof(char*) ); - shell_check_oom((void*)azNextLine); + shell_check_oom(azNextLine); memset((void*)azNextLine, 0, nColumn*sizeof(char*) ); if( p->cmOpts.bQuote ){ azQuoted = sqlite3_malloc64( nColumn*sizeof(char*) ); @@ -17889,6 +19717,7 @@ static void exec_prepared_stmt_columnar( } if( wx<0 ) wx = -wx; uz = (const unsigned char*)sqlite3_column_name(pStmt,i); + if( uz==0 ) uz = (u8*)""; azData[i] = translateForDisplayAndDup(uz, &zNotUsed, wx, bw); } do{ @@ -18054,7 +19883,7 @@ static void exec_prepared_stmt_columnar( */ static void exec_prepared_stmt( ShellState *pArg, /* Pointer to ShellState */ - sqlite3_stmt *pStmt /* Statment to run */ + sqlite3_stmt *pStmt /* Statement to run */ ){ int rc; sqlite3_uint64 nRow = 0; @@ -18143,8 +19972,8 @@ static void exec_prepared_stmt( ** caller to eventually free this buffer using sqlite3_free(). */ static int expertHandleSQL( - ShellState *pState, - const char *zSql, + ShellState *pState, + const char *zSql, char **pzErr ){ assert( pState->expert.pExpert ); @@ -18154,7 +19983,7 @@ static int expertHandleSQL( /* ** This function is called either to silently clean up the object -** created by the ".expert" command (if bCancel==1), or to generate a +** created by the ".expert" command (if bCancel==1), or to generate a ** report from it and then clean it up (if bCancel==0). ** ** If successful, SQLITE_OK is returned. Otherwise, an SQLite error @@ -18249,7 +20078,8 @@ static int expertDotCommand( if( rc==SQLITE_OK ){ pState->expert.pExpert = sqlite3_expert_new(pState->db, &zErr); if( pState->expert.pExpert==0 ){ - raw_printf(stderr, "sqlite3_expert_new: %s\n", zErr ? zErr : "out of memory"); + raw_printf(stderr, "sqlite3_expert_new: %s\n", + zErr ? zErr : "out of memory"); rc = SQLITE_ERROR; }else{ sqlite3_expert_config( @@ -18312,7 +20142,7 @@ static int shell_exec( if( zStmtSql==0 ) zStmtSql = ""; while( IsSpace(zStmtSql[0]) ) zStmtSql++; - /* save off the prepared statment handle and reset row count */ + /* save off the prepared statement handle and reset row count */ if( pArg ){ pArg->pStmt = pStmt; pArg->cnt = 0; @@ -18321,57 +20151,51 @@ static int shell_exec( /* Show the EXPLAIN QUERY PLAN if .eqp is on */ if( pArg && pArg->autoEQP && sqlite3_stmt_isexplain(pStmt)==0 ){ sqlite3_stmt *pExplain; - char *zEQP; int triggerEQP = 0; disable_debug_trace_modes(); sqlite3_db_config(db, SQLITE_DBCONFIG_TRIGGER_EQP, -1, &triggerEQP); if( pArg->autoEQP>=AUTOEQP_trigger ){ sqlite3_db_config(db, SQLITE_DBCONFIG_TRIGGER_EQP, 1, 0); } - zEQP = sqlite3_mprintf("EXPLAIN QUERY PLAN %s", zStmtSql); - shell_check_oom(zEQP); - rc = sqlite3_prepare_v2(db, zEQP, -1, &pExplain, 0); + pExplain = pStmt; + sqlite3_reset(pExplain); + rc = sqlite3_stmt_explain(pExplain, 2); if( rc==SQLITE_OK ){ while( sqlite3_step(pExplain)==SQLITE_ROW ){ const char *zEQPLine = (const char*)sqlite3_column_text(pExplain,3); int iEqpId = sqlite3_column_int(pExplain, 0); int iParentId = sqlite3_column_int(pExplain, 1); if( zEQPLine==0 ) zEQPLine = ""; - if( zEQPLine[0]=='-' ) eqp_render(pArg); + if( zEQPLine[0]=='-' ) eqp_render(pArg, 0); eqp_append(pArg, iEqpId, iParentId, zEQPLine); } - eqp_render(pArg); + eqp_render(pArg, 0); } - sqlite3_finalize(pExplain); - sqlite3_free(zEQP); if( pArg->autoEQP>=AUTOEQP_full ){ /* Also do an EXPLAIN for ".eqp full" mode */ - zEQP = sqlite3_mprintf("EXPLAIN %s", zStmtSql); - shell_check_oom(zEQP); - rc = sqlite3_prepare_v2(db, zEQP, -1, &pExplain, 0); + sqlite3_reset(pExplain); + rc = sqlite3_stmt_explain(pExplain, 1); if( rc==SQLITE_OK ){ pArg->cMode = MODE_Explain; + assert( sqlite3_stmt_isexplain(pExplain)==1 ); explain_data_prepare(pArg, pExplain); exec_prepared_stmt(pArg, pExplain); explain_data_delete(pArg); } - sqlite3_finalize(pExplain); - sqlite3_free(zEQP); } if( pArg->autoEQP>=AUTOEQP_trigger && triggerEQP==0 ){ sqlite3_db_config(db, SQLITE_DBCONFIG_TRIGGER_EQP, 0, 0); - /* Reprepare pStmt before reactiving trace modes */ - sqlite3_finalize(pStmt); - sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0); - if( pArg ) pArg->pStmt = pStmt; } + sqlite3_reset(pStmt); + sqlite3_stmt_explain(pStmt, 0); restore_debug_trace_modes(); } if( pArg ){ + int bIsExplain = (sqlite3_stmt_isexplain(pStmt)==1); pArg->cMode = pArg->mode; if( pArg->autoExplain ){ - if( sqlite3_stmt_isexplain(pStmt)==1 ){ + if( bIsExplain ){ pArg->cMode = MODE_Explain; } if( sqlite3_stmt_isexplain(pStmt)==2 ){ @@ -18381,7 +20205,7 @@ static int shell_exec( /* If the shell is currently in ".explain" mode, gather the extra ** data required to add indents to the output.*/ - if( pArg->cMode==MODE_Explain ){ + if( pArg->cMode==MODE_Explain && bIsExplain ){ explain_data_prepare(pArg, pStmt); } } @@ -18389,7 +20213,7 @@ static int shell_exec( bind_prepared_stmt(pArg, pStmt); exec_prepared_stmt(pArg, pStmt); explain_data_delete(pArg); - eqp_render(pArg); + eqp_render(pArg, 0); /* print usage stats if stats on */ if( pArg && pArg->statsOn ){ @@ -18497,7 +20321,7 @@ static char **tableColumnList(ShellState *p, const char *zTab){ */ if( preserveRowid && isIPK ){ /* If a single PRIMARY KEY column with type INTEGER was seen, then it - ** might be an alise for the ROWID. But it might also be a WITHOUT ROWID + ** might be an alias for the ROWID. But it might also be a WITHOUT ROWID ** table or a INTEGER PRIMARY KEY DESC column, neither of which are ** ROWID aliases. To distinguish these cases, check to see if ** there is a "pk" entry in "PRAGMA index_list". There will be @@ -18758,7 +20582,6 @@ static const char *(azHelp[]) = { " --async Write to FILE without journal and fsync()", #endif ".bail on|off Stop after hitting an error. Default OFF", - ".binary on|off Turn binary output on or off. Default OFF", #ifndef SQLITE_SHELL_FIDDLE ".cd DIRECTORY Change the working directory to DIRECTORY", #endif @@ -18768,6 +20591,9 @@ static const char *(azHelp[]) = { ".clone NEWDB Clone data into NEWDB from the existing database", #endif ".connection [close] [#] Open or close an auxiliary database connection", +#if defined(_WIN32) || defined(WIN32) + ".crnl on|off Translate \\n to \\r\\n. Default ON", +#endif ".databases List names and files of attached databases", ".dbconfig ?op? ?val? List or change sqlite3_db_config() options", #if SQLITE_SHELL_HAVE_RECOVER @@ -18821,13 +20647,13 @@ static const char *(azHelp[]) = { " input text.", #endif #ifndef SQLITE_OMIT_TEST_CONTROL - ".imposter INDEX TABLE Create imposter table TABLE on index INDEX", + ",imposter INDEX TABLE Create imposter table TABLE on index INDEX", #endif ".indexes ?TABLE? Show names of indexes", " If TABLE is specified, only show indexes for", " tables matching TABLE using the LIKE operator.", #ifdef SQLITE_ENABLE_IOTRACE - ".iotrace FILE Enable I/O diagnostic logging to FILE", + ",iotrace FILE Enable I/O diagnostic logging to FILE", #endif ".limit ?LIMIT? ?VAL? Display or change the value of an SQLITE_LIMIT", ".lint OPTIONS Report potential schema issues.", @@ -18836,8 +20662,10 @@ static const char *(azHelp[]) = { #if !defined(SQLITE_OMIT_LOAD_EXTENSION) && !defined(SQLITE_SHELL_FIDDLE) ".load FILE ?ENTRY? Load an extension library", #endif -#ifndef SQLITE_SHELL_FIDDLE - ".log FILE|off Turn logging on or off. FILE can be stderr/stdout", +#if !defined(SQLITE_SHELL_FIDDLE) + ".log FILE|on|off Turn logging on or off. FILE can be stderr/stdout", +#else + ".log on|off Turn logging on or off.", #endif ".mode MODE ?OPTIONS? Set output mode", " MODE is one of:", @@ -18914,7 +20742,7 @@ static const char *(azHelp[]) = { #endif ".prompt MAIN CONTINUE Replace the standard prompts", #ifndef SQLITE_SHELL_FIDDLE - ".quit Exit this program", + ".quit Stop interpreting input stream, exit if primary.", ".read FILE Read input from FILE or command output", " If FILE begins with \"|\", it is a command that generates the input.", #endif @@ -18929,12 +20757,12 @@ static const char *(azHelp[]) = { ".restore ?DB? FILE Restore content of DB (default \"main\") from FILE", ".save ?OPTIONS? FILE Write database to FILE (an alias for .backup ...)", #endif - ".scanstats on|off Turn sqlite3_stmt_scanstatus() metrics on or off", + ".scanstats on|off|est Turn sqlite3_stmt_scanstatus() metrics on or off", ".schema ?PATTERN? Show the CREATE statements matching PATTERN", " Options:", " --indent Try to pretty-print the schema", " --nosys Omit objects whose names start with \"sqlite_\"", - ".selftest ?OPTIONS? Run tests defined in the SELFTEST table", + ",selftest ?OPTIONS? Run tests defined in the SELFTEST table", " Options:", " --init Create a new SELFTEST table", " -v Verbose output", @@ -18976,9 +20804,9 @@ static const char *(azHelp[]) = { #endif ".tables ?TABLE? List names of tables matching LIKE pattern TABLE", #ifndef SQLITE_SHELL_FIDDLE - ".testcase NAME Begin redirecting output to 'testcase-out.txt'", + ",testcase NAME Begin redirecting output to 'testcase-out.txt'", #endif - ".testctrl CMD ... Run various sqlite3_test_control() operations", + ",testctrl CMD ... Run various sqlite3_test_control() operations", " Run \".testctrl\" with no arguments for details", ".timeout MS Try opening locked tables for MS milliseconds", ".timer on|off Turn SQL timer on or off", @@ -19002,6 +20830,7 @@ static const char *(azHelp[]) = { ".unmodule NAME ... Unregister virtual table modules", " --allexcept Unregister everything except those named", #endif + ".version Show source, library and compiler versions", ".vfsinfo ?AUX? Information about the top-level VFS", ".vfslist List all available VFSes", ".vfsname ?AUX? Print the name of the VFS stack", @@ -19029,16 +20858,41 @@ static int showHelp(FILE *out, const char *zPattern){ || cli_strcmp(zPattern,"-all")==0 || cli_strcmp(zPattern,"--all")==0 ){ - /* Show all commands, but only one line per command */ - if( zPattern==0 ) zPattern = ""; + enum HelpWanted { HW_NoCull = 0, HW_SummaryOnly = 1, HW_Undoc = 2 }; + enum HelpHave { HH_Undoc = 2, HH_Summary = 1, HH_More = 0 }; + /* Show all or most commands + ** *zPattern==0 => summary of documented commands only + ** *zPattern=='0' => whole help for undocumented commands + ** Otherwise => whole help for documented commands + */ + enum HelpWanted hw = HW_SummaryOnly; + enum HelpHave hh = HH_More; + if( zPattern!=0 ){ + hw = (*zPattern=='0')? HW_NoCull|HW_Undoc : HW_NoCull; + } for(i=0; iin ){ - fclose(in); - }else{ - p->lineno = nLine; - } - return a; - -readHexDb_error: - if( in!=p->in ){ - fclose(in); - }else{ - while( fgets(zLine, sizeof(zLine), p->in)!=0 ){ - nLine++; - if(cli_strncmp(zLine, "| end ", 6)==0 ) break; - } - p->lineno = nLine; - } - sqlite3_free(a); - utf8_printf(stderr,"Error on line %d of --hexdb input\n", nLine); - return 0; -} -#endif /* SQLITE_OMIT_DESERIALIZE */ - -/* -** Scalar function "shell_int32". The first argument to this function -** must be a blob. The second a non-negative integer. This function -** reads and returns a 32-bit big-endian integer from byte -** offset (4*) of the blob. -*/ -static void shellInt32( - sqlite3_context *context, - int argc, - sqlite3_value **argv -){ - const unsigned char *pBlob; - int nBlob; - int iInt; - - UNUSED_PARAMETER(argc); - nBlob = sqlite3_value_bytes(argv[0]); - pBlob = (const unsigned char*)sqlite3_value_blob(argv[0]); - iInt = sqlite3_value_int(argv[1]); - - if( iInt>=0 && (iInt+1)*4<=nBlob ){ - const unsigned char *a = &pBlob[iInt*4]; - sqlite3_int64 iVal = ((sqlite3_int64)a[0]<<24) - + ((sqlite3_int64)a[1]<<16) - + ((sqlite3_int64)a[2]<< 8) - + ((sqlite3_int64)a[3]<< 0); - sqlite3_result_int64(context, iVal); + if( in!=p->in ){ + fclose(in); + }else{ + p->lineno = nLine; } -} + return a; -/* -** Scalar function "shell_idquote(X)" returns string X quoted as an identifier, -** using "..." with internal double-quote characters doubled. -*/ -static void shellIdQuote( - sqlite3_context *context, - int argc, - sqlite3_value **argv -){ - const char *zName = (const char*)sqlite3_value_text(argv[0]); - UNUSED_PARAMETER(argc); - if( zName ){ - char *z = sqlite3_mprintf("\"%w\"", zName); - sqlite3_result_text(context, z, -1, sqlite3_free); +readHexDb_error: + if( in!=p->in ){ + fclose(in); + }else{ + while( fgets(zLine, sizeof(zLine), p->in)!=0 ){ + nLine++; + if(cli_strncmp(zLine, "| end ", 6)==0 ) break; + } + p->lineno = nLine; } + sqlite3_free(a); + utf8_printf(stderr,"Error on line %d of --hexdb input\n", nLine); + return 0; } +#endif /* SQLITE_OMIT_DESERIALIZE */ /* ** Scalar function "usleep(X)" invokes sqlite3_sleep(X) and returns X. */ static void shellUSleepFunc( - sqlite3_context *context, - int argcUnused, + sqlite3_context *context, + int argcUnused, sqlite3_value **argv ){ int sleep = sqlite3_value_int(argv[0]); @@ -19363,97 +21185,6 @@ static void shellUSleepFunc( sqlite3_result_int(context, sleep); } -/* -** Scalar function "shell_escape_crnl" used by the .recover command. -** The argument passed to this function is the output of built-in -** function quote(). If the first character of the input is "'", -** indicating that the value passed to quote() was a text value, -** then this function searches the input for "\n" and "\r" characters -** and adds a wrapper similar to the following: -** -** replace(replace(, '\n', char(10), '\r', char(13)); -** -** Or, if the first character of the input is not "'", then a copy -** of the input is returned. -*/ -static void shellEscapeCrnl( - sqlite3_context *context, - int argc, - sqlite3_value **argv -){ - const char *zText = (const char*)sqlite3_value_text(argv[0]); - UNUSED_PARAMETER(argc); - if( zText && zText[0]=='\'' ){ - i64 nText = sqlite3_value_bytes(argv[0]); - i64 i; - char zBuf1[20]; - char zBuf2[20]; - const char *zNL = 0; - const char *zCR = 0; - i64 nCR = 0; - i64 nNL = 0; - - for(i=0; zText[i]; i++){ - if( zNL==0 && zText[i]=='\n' ){ - zNL = unused_string(zText, "\\n", "\\012", zBuf1); - nNL = strlen(zNL); - } - if( zCR==0 && zText[i]=='\r' ){ - zCR = unused_string(zText, "\\r", "\\015", zBuf2); - nCR = strlen(zCR); - } - } - - if( zNL || zCR ){ - i64 iOut = 0; - i64 nMax = (nNL > nCR) ? nNL : nCR; - i64 nAlloc = nMax * nText + (nMax+64)*2; - char *zOut = (char*)sqlite3_malloc64(nAlloc); - if( zOut==0 ){ - sqlite3_result_error_nomem(context); - return; - } - - if( zNL && zCR ){ - memcpy(&zOut[iOut], "replace(replace(", 16); - iOut += 16; - }else{ - memcpy(&zOut[iOut], "replace(", 8); - iOut += 8; - } - for(i=0; zText[i]; i++){ - if( zText[i]=='\n' ){ - memcpy(&zOut[iOut], zNL, nNL); - iOut += nNL; - }else if( zText[i]=='\r' ){ - memcpy(&zOut[iOut], zCR, nCR); - iOut += nCR; - }else{ - zOut[iOut] = zText[i]; - iOut++; - } - } - - if( zNL ){ - memcpy(&zOut[iOut], ",'", 2); iOut += 2; - memcpy(&zOut[iOut], zNL, nNL); iOut += nNL; - memcpy(&zOut[iOut], "', char(10))", 12); iOut += 12; - } - if( zCR ){ - memcpy(&zOut[iOut], ",'", 2); iOut += 2; - memcpy(&zOut[iOut], zCR, nCR); iOut += nCR; - memcpy(&zOut[iOut], "', char(13))", 12); iOut += 12; - } - - sqlite3_result_text(context, zOut, iOut, SQLITE_TRANSIENT); - sqlite3_free(zOut); - return; - } - } - - sqlite3_result_value(context, argv[0]); -} - /* Flags for open_db(). ** ** The default behavior of open_db() is to exit(1) if the database fails to @@ -19478,13 +21209,13 @@ static void open_db(ShellState *p, int openFlags){ if( zDbFilename==0 || zDbFilename[0]==0 ){ p->openMode = SHELL_OPEN_NORMAL; }else{ - p->openMode = (u8)deduceDatabaseType(zDbFilename, + p->openMode = (u8)deduceDatabaseType(zDbFilename, (openFlags & OPEN_DB_ZIPFILE)!=0); } } switch( p->openMode ){ case SHELL_OPEN_APPENDVFS: { - sqlite3_open_v2(zDbFilename, &p->db, + sqlite3_open_v2(zDbFilename, &p->db, SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|p->openFlags, "apndvfs"); break; } @@ -19513,18 +21244,39 @@ static void open_db(ShellState *p, int openFlags){ if( p->db==0 || SQLITE_OK!=sqlite3_errcode(p->db) ){ utf8_printf(stderr,"Error: unable to open database \"%s\": %s\n", zDbFilename, sqlite3_errmsg(p->db)); - if( openFlags & OPEN_DB_KEEPALIVE ){ - sqlite3_open(":memory:", &p->db); - return; + if( (openFlags & OPEN_DB_KEEPALIVE)==0 ){ + exit(1); + } + sqlite3_close(p->db); + sqlite3_open(":memory:", &p->db); + if( p->db==0 || SQLITE_OK!=sqlite3_errcode(p->db) ){ + utf8_printf(stderr, + "Also: unable to open substitute in-memory database.\n" + ); + exit(1); + }else{ + utf8_printf(stderr, + "Notice: using substitute in-memory database instead of \"%s\"\n", + zDbFilename); } - exit(1); } + sqlite3_db_config(p->db, SQLITE_DBCONFIG_STMT_SCANSTATUS, (int)0, (int*)0); + + /* Reflect the use or absence of --unsafe-testing invocation. */ + { + int testmode_on = ShellHasFlag(p,SHFLG_TestingMode); + sqlite3_db_config(p->db, SQLITE_DBCONFIG_TRUSTED_SCHEMA, testmode_on,0); + sqlite3_db_config(p->db, SQLITE_DBCONFIG_DEFENSIVE, !testmode_on,0); + } + #ifndef SQLITE_OMIT_LOAD_EXTENSION sqlite3_enable_load_extension(p->db, 1); #endif sqlite3_shathree_init(p->db, 0, 0); sqlite3_uint_init(p->db, 0, 0); sqlite3_decimal_init(p->db, 0, 0); + sqlite3_base64_init(p->db, 0, 0); + sqlite3_base85_init(p->db, 0, 0); sqlite3_regexp_init(p->db, 0, 0); sqlite3_ieee_init(p->db, 0, 0); sqlite3_series_init(p->db, 0, 0); @@ -19532,27 +21284,52 @@ static void open_db(ShellState *p, int openFlags){ sqlite3_fileio_init(p->db, 0, 0); sqlite3_completion_init(p->db, 0, 0); #endif -#if SQLITE_SHELL_HAVE_RECOVER - sqlite3_dbdata_init(p->db, 0, 0); -#endif #ifdef SQLITE_HAVE_ZLIB if( !p->bSafeModePersist ){ sqlite3_zipfile_init(p->db, 0, 0); sqlite3_sqlar_init(p->db, 0, 0); } #endif +#ifdef SQLITE_SHELL_EXTFUNCS + /* Create a preprocessing mechanism for extensions to make + * their own provisions for being built into the shell. + * This is a short-span macro. See further below for usage. + */ +#define SHELL_SUB_MACRO(base, variant) base ## _ ## variant +#define SHELL_SUBMACRO(base, variant) SHELL_SUB_MACRO(base, variant) + /* Let custom-included extensions get their ..._init() called. + * The WHATEVER_INIT( db, pzErrorMsg, pApi ) macro should cause + * the extension's sqlite3_*_init( db, pzErrorMsg, pApi ) + * initialization routine to be called. + */ + { + int irc = SHELL_SUBMACRO(SQLITE_SHELL_EXTFUNCS, INIT)(p->db); + /* Let custom-included extensions expose their functionality. + * The WHATEVER_EXPOSE( db, pzErrorMsg ) macro should cause + * the SQL functions, virtual tables, collating sequences or + * VFS's implemented by the extension to be registered. + */ + if( irc==SQLITE_OK + || irc==SQLITE_OK_LOAD_PERMANENTLY ){ + SHELL_SUBMACRO(SQLITE_SHELL_EXTFUNCS, EXPOSE)(p->db, 0); + } +#undef SHELL_SUB_MACRO +#undef SHELL_SUBMACRO + } +#endif + + sqlite3_create_function(p->db, "strtod", 1, SQLITE_UTF8, 0, + shellStrtod, 0, 0); + sqlite3_create_function(p->db, "dtostr", 1, SQLITE_UTF8, 0, + shellDtostr, 0, 0); + sqlite3_create_function(p->db, "dtostr", 2, SQLITE_UTF8, 0, + shellDtostr, 0, 0); sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0, shellAddSchemaName, 0, 0); sqlite3_create_function(p->db, "shell_module_schema", 1, SQLITE_UTF8, 0, shellModuleSchema, 0, 0); sqlite3_create_function(p->db, "shell_putsnl", 1, SQLITE_UTF8, p, shellPutsFunc, 0, 0); - sqlite3_create_function(p->db, "shell_escape_crnl", 1, SQLITE_UTF8, 0, - shellEscapeCrnl, 0, 0); - sqlite3_create_function(p->db, "shell_int32", 2, SQLITE_UTF8, 0, - shellInt32, 0, 0); - sqlite3_create_function(p->db, "shell_idquote", 1, SQLITE_UTF8, 0, - shellIdQuote, 0, 0); sqlite3_create_function(p->db, "usleep",1,SQLITE_UTF8,0, shellUSleepFunc, 0, 0); #ifndef SQLITE_NOHAVE_SYSTEM @@ -19561,6 +21338,7 @@ static void open_db(ShellState *p, int openFlags){ sqlite3_create_function(p->db, "edit", 2, SQLITE_UTF8, 0, editFunc, 0, 0); #endif + if( p->openMode==SHELL_OPEN_ZIPFILE ){ char *zSql = sqlite3_mprintf( "CREATE VIRTUAL TABLE zip USING zipfile(%Q);", zDbFilename); @@ -19578,9 +21356,9 @@ static void open_db(ShellState *p, int openFlags){ aData = (unsigned char*)readFile(zDbFilename, &nData); }else{ aData = readHexDb(p, &nData); - if( aData==0 ){ - return; - } + } + if( aData==0 ){ + return; } rc = sqlite3_deserialize(p->db, "main", aData, nData, nData, SQLITE_DESERIALIZE_RESIZEABLE | @@ -19594,20 +21372,25 @@ static void open_db(ShellState *p, int openFlags){ } #endif } - if( p->bSafeModePersist && p->db!=0 ){ - sqlite3_set_authorizer(p->db, safeModeAuth, p); + if( p->db!=0 ){ + if( p->bSafeModePersist ){ + sqlite3_set_authorizer(p->db, safeModeAuth, p); + } + sqlite3_db_config( + p->db, SQLITE_DBCONFIG_STMT_SCANSTATUS, p->scanstatsOn, (int*)0 + ); } } /* -** Attempt to close the databaes connection. Report errors. +** Attempt to close the database connection. Report errors. */ void close_db(sqlite3 *db){ int rc = sqlite3_close(db); if( rc ){ utf8_printf(stderr, "Error: sqlite3_close() returns %d: %s\n", rc, sqlite3_errmsg(db)); - } + } } #if HAVE_READLINE || HAVE_EDITLINE @@ -19637,6 +21420,8 @@ static char *readline_completion_generator(const char *text, int state){ return zRet; } static char **readline_completion(const char *zText, int iStart, int iEnd){ + (void)iStart; + (void)iEnd; rl_attempted_completion_over = 1; return rl_completion_matches(zText, readline_completion_generator); } @@ -19652,7 +21437,7 @@ static void linenoise_completion(const char *zLine, linenoiseCompletions *lc){ char *zSql; char zBuf[1000]; - if( nLine>sizeof(zBuf)-30 ) return; + if( nLine>(i64)sizeof(zBuf)-30 ) return; if( zLine[0]=='.' || zLine[0]=='#') return; for(i=nLine-1; i>=0 && (isalnum(zLine[i]) || zLine[i]=='_'); i--){} if( i==nLine-1 ) return; @@ -19668,7 +21453,7 @@ static void linenoise_completion(const char *zLine, linenoiseCompletions *lc){ while( sqlite3_step(pStmt)==SQLITE_ROW ){ const char *zCompletion = (const char*)sqlite3_column_text(pStmt, 0); int nCompletion = sqlite3_column_bytes(pStmt, 0); - if( iStart+nCompletion < sizeof(zBuf)-1 && zCompletion ){ + if( iStart+nCompletion < (i64)sizeof(zBuf)-1 && zCompletion ){ memcpy(zBuf+iStart, zCompletion, nCompletion+1); linenoiseAddCompletion(lc, zBuf); } @@ -19692,6 +21477,7 @@ static void linenoise_completion(const char *zLine, linenoiseCompletions *lc){ ** \' -> ' ** \\ -> backslash ** \NNN -> ascii character NNN in octal +** \xHH -> ascii character HH in hexadecimal */ static void resolve_backslashes(char *z){ int i, j; @@ -19720,6 +21506,15 @@ static void resolve_backslashes(char *z){ c = '\''; }else if( c=='\\' ){ c = '\\'; + }else if( c=='x' ){ + int nhd = 0, hdv; + u8 hv = 0; + while( nhd<2 && (c=z[i+1+nhd])!=0 && (hdv=hexDigitValue(c))>=0 ){ + hv = (u8)((hv<<4)|hdv); + ++nhd; + } + i += nhd; + c = (u8)hv; }else if( c>='0' && c<='7' ){ c -= '0'; if( z[i+1]>='0' && z[i+1]<='7' ){ @@ -19819,7 +21614,7 @@ static int sql_trace_callback( utf8_printf(p->traceOut, "-- closing database connection\n"); return 0; } - if( mType!=SQLITE_TRACE_ROW && ((const char*)pX)[0]=='-' ){ + if( mType!=SQLITE_TRACE_ROW && pX!=0 && ((const char*)pX)[0]=='-' ){ zSql = (const char*)pX; }else{ pStmt = (sqlite3_stmt*)pP; @@ -19851,7 +21646,7 @@ static int sql_trace_callback( break; } case SQLITE_TRACE_PROFILE: { - sqlite3_int64 nNanosec = *(sqlite3_int64*)pX; + sqlite3_int64 nNanosec = pX ? *(sqlite3_int64*)pX : 0; utf8_printf(p->traceOut, "%.*s; -- %lld ns\n", (int)nSql, zSql, nNanosec); break; } @@ -19863,10 +21658,13 @@ static int sql_trace_callback( /* ** A no-op routine that runs with the ".breakpoint" doc-command. This is ** a useful spot to set a debugger breakpoint. +** +** This routine does not do anything practical. The code are there simply +** to prevent the compiler from optimizing this routine out. */ static void test_breakpoint(void){ - static int nCall = 0; - nCall++; + static unsigned int nCall = 0; + if( (nCall++)==0xffffffff ) printf("Many .breakpoints have run\n"); } /* @@ -19924,8 +21722,8 @@ static void import_append_char(ImportCtx *p, int c){ */ static char *SQLITE_CDECL csv_read_one_field(ImportCtx *p){ int c; - int cSep = p->cColSep; - int rSep = p->cRowSep; + int cSep = (u8)p->cColSep; + int rSep = (u8)p->cRowSep; p->n = 0; c = fgetc(p->in); if( c==EOF || seenInterrupt ){ @@ -20014,8 +21812,8 @@ static char *SQLITE_CDECL csv_read_one_field(ImportCtx *p){ */ static char *SQLITE_CDECL ascii_read_one_field(ImportCtx *p){ int c; - int cSep = p->cColSep; - int rSep = p->cRowSep; + int cSep = (u8)p->cColSep; + int rSep = (u8)p->cRowSep; p->n = 0; c = fgetc(p->in); if( c==EOF || seenInterrupt ){ @@ -20079,7 +21877,7 @@ static void tryToCloneData( if( rc ){ utf8_printf(stderr, "Error %d: %s on [%s]\n", sqlite3_extended_errcode(newDb), sqlite3_errmsg(newDb), - zQuery); + zInsert); goto end_data_xfer; } for(k=0; k<2; k++){ @@ -20165,7 +21963,7 @@ static void tryToCloneSchema( char *zErrMsg = 0; zQuery = sqlite3_mprintf("SELECT name, sql FROM sqlite_schema" - " WHERE %s", zWhere); + " WHERE %s ORDER BY rowid ASC", zWhere); shell_check_oom(zQuery); rc = sqlite3_prepare_v2(p->db, zQuery, -1, &pQuery, 0); if( rc ){ @@ -20178,12 +21976,14 @@ static void tryToCloneSchema( zName = sqlite3_column_text(pQuery, 0); zSql = sqlite3_column_text(pQuery, 1); if( zName==0 || zSql==0 ) continue; - printf("%s... ", zName); fflush(stdout); - sqlite3_exec(newDb, (const char*)zSql, 0, 0, &zErrMsg); - if( zErrMsg ){ - utf8_printf(stderr, "Error: %s\nSQL: [%s]\n", zErrMsg, zSql); - sqlite3_free(zErrMsg); - zErrMsg = 0; + if( sqlite3_stricmp((char*)zName, "sqlite_sequence")!=0 ){ + printf("%s... ", zName); fflush(stdout); + sqlite3_exec(newDb, (const char*)zSql, 0, 0, &zErrMsg); + if( zErrMsg ){ + utf8_printf(stderr, "Error: %s\nSQL: [%s]\n", zErrMsg, zSql); + sqlite3_free(zErrMsg); + zErrMsg = 0; + } } if( xForEach ){ xForEach(p, newDb, (const char*)zName); @@ -20207,6 +22007,7 @@ static void tryToCloneSchema( zName = sqlite3_column_text(pQuery, 0); zSql = sqlite3_column_text(pQuery, 1); if( zName==0 || zSql==0 ) continue; + if( sqlite3_stricmp((char*)zName, "sqlite_sequence")==0 ) continue; printf("%s... ", zName); fflush(stdout); sqlite3_exec(newDb, (const char*)zSql, 0, 0, &zErrMsg); if( zErrMsg ){ @@ -20310,7 +22111,7 @@ static int db_int(sqlite3 *db, const char *zSql){ return res; } -#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB) +#if SQLITE_SHELL_HAVE_RECOVER /* ** Convert a 2-byte or 4-byte big-endian integer into a native integer */ @@ -20373,7 +22174,9 @@ static int shell_dbinfo_command(ShellState *p, int nArg, char **azArg){ if( sqlite3_step(pStmt)==SQLITE_ROW && sqlite3_column_bytes(pStmt,0)>100 ){ - memcpy(aHdr, sqlite3_column_blob(pStmt,0), 100); + const u8 *pb = sqlite3_column_blob(pStmt,0); + shell_check_oom(pb); + memcpy(aHdr, pb, 100); sqlite3_finalize(pStmt); }else{ raw_printf(stderr, "unable to read database header\n"); @@ -20848,16 +22651,16 @@ static int lintDotCommand( #if !defined SQLITE_OMIT_VIRTUALTABLE static void shellPrepare( - sqlite3 *db, - int *pRc, - const char *zSql, + sqlite3 *db, + int *pRc, + const char *zSql, sqlite3_stmt **ppStmt ){ *ppStmt = 0; if( *pRc==SQLITE_OK ){ int rc = sqlite3_prepare_v2(db, zSql, -1, ppStmt, 0); if( rc!=SQLITE_OK ){ - raw_printf(stderr, "sql error: %s (%d)\n", + raw_printf(stderr, "sql error: %s (%d)\n", sqlite3_errmsg(db), sqlite3_errcode(db) ); *pRc = rc; @@ -20873,10 +22676,10 @@ static void shellPrepare( ** nuisance compiler warnings about "defined but not used". */ void shellPreparePrintf( - sqlite3 *db, - int *pRc, + sqlite3 *db, + int *pRc, sqlite3_stmt **ppStmt, - const char *zFmt, + const char *zFmt, ... ){ *ppStmt = 0; @@ -20902,7 +22705,7 @@ void shellPreparePrintf( ** nuisance compiler warnings about "defined but not used". */ void shellFinalize( - int *pRc, + int *pRc, sqlite3_stmt *pStmt ){ if( pStmt ){ @@ -20924,7 +22727,7 @@ void shellFinalize( ** nuisance compiler warnings about "defined but not used". */ void shellReset( - int *pRc, + int *pRc, sqlite3_stmt *pStmt ){ int rc = sqlite3_reset(pStmt); @@ -20972,7 +22775,7 @@ static int arUsage(FILE *f){ } /* -** Print an error message for the .ar command to stderr and return +** Print an error message for the .ar command to stderr and return ** SQLITE_ERROR. */ static int arErrorMsg(ArCommand *pAr, const char *zFmt, ...){ @@ -21038,7 +22841,7 @@ static int arProcessSwitch(ArCommand *pAr, int eSwitch, const char *zArg){ break; case AR_SWITCH_APPEND: pAr->bAppend = 1; - /* Fall thru into --file */ + deliberate_fall_through; case AR_SWITCH_FILE: pAr->zFile = zArg; break; @@ -21053,7 +22856,7 @@ static int arProcessSwitch(ArCommand *pAr, int eSwitch, const char *zArg){ /* ** Parse the command line for an ".ar" command. The results are written into ** structure (*pAr). SQLITE_OK is returned if the command line is parsed -** successfully, otherwise an error message is written to stderr and +** successfully, otherwise an error message is written to stderr and ** SQLITE_ERROR returned. */ static int arParseCommand( @@ -21190,7 +22993,10 @@ static int arParseCommand( } } } - + if( pAr->eCmd==0 ){ + utf8_printf(stderr, "Required argument missing. Usage:\n"); + return arUsage(stderr); + } return SQLITE_OK; } @@ -21249,7 +23055,7 @@ static int arCheckEntries(ArCommand *pAr){ ** when pAr->bGlob is false and GLOB match when pAr->bGlob is true. */ static void arWhereClause( - int *pRc, + int *pRc, ArCommand *pAr, char **pzWhere /* OUT: New WHERE clause */ ){ @@ -21264,7 +23070,7 @@ static void arWhereClause( for(i=0; inArg; i++){ const char *z = pAr->azArg[i]; zWhere = sqlite3_mprintf( - "%z%s name %s '%q' OR substr(name,1,%d) %s '%q/'", + "%z%s name %s '%q' OR substr(name,1,%d) %s '%q/'", zWhere, zSep, zSameOp, z, strlen30(z)+1, zSameOp, z ); if( zWhere==0 ){ @@ -21279,10 +23085,10 @@ static void arWhereClause( } /* -** Implementation of .ar "lisT" command. +** Implementation of .ar "lisT" command. */ static int arListCommand(ArCommand *pAr){ - const char *zSql = "SELECT %s FROM %s WHERE %s"; + const char *zSql = "SELECT %s FROM %s WHERE %s"; const char *azCols[] = { "name", "lsmode(mode), sz, datetime(mtime, 'unixepoch'), name" @@ -21304,7 +23110,7 @@ static int arListCommand(ArCommand *pAr){ if( pAr->bVerbose ){ utf8_printf(pAr->p->out, "%s % 10d %s %s\n", sqlite3_column_text(pSql, 0), - sqlite3_column_int(pSql, 1), + sqlite3_column_int(pSql, 1), sqlite3_column_text(pSql, 2), sqlite3_column_text(pSql, 3) ); @@ -21361,17 +23167,17 @@ static int arRemoveCommand(ArCommand *pAr){ } /* -** Implementation of .ar "eXtract" command. +** Implementation of .ar "eXtract" command. */ static int arExtractCommand(ArCommand *pAr){ - const char *zSql1 = + const char *zSql1 = "SELECT " " ($dir || name)," " writefile(($dir || name), %s, mode, mtime) " "FROM %s WHERE (%s) AND (data IS NULL OR $dirOnly = 0)" " AND name NOT GLOB '*..[/\\]*'"; - const char *azExtraArg[] = { + const char *azExtraArg[] = { "sqlar_uncompress(data, sz)", "data" }; @@ -21397,7 +23203,7 @@ static int arExtractCommand(ArCommand *pAr){ if( zDir==0 ) rc = SQLITE_NOMEM; } - shellPreparePrintf(pAr->db, &rc, &pSql, zSql1, + shellPreparePrintf(pAr->db, &rc, &pSql, zSql1, azExtraArg[pAr->bZip], pAr->zSrcTable, zWhere ); @@ -21475,7 +23281,7 @@ static int arCreateOrUpdateCommand( int bUpdate, /* true for a --create. */ int bOnlyIfChanged /* Only update if file has changed */ ){ - const char *zCreate = + const char *zCreate = "CREATE TABLE IF NOT EXISTS sqlar(\n" " name TEXT PRIMARY KEY, -- name of the file\n" " mode INT, -- access permissions\n" @@ -21517,7 +23323,7 @@ static int arCreateOrUpdateCommand( arExecSql(pAr, "PRAGMA page_size=512"); rc = arExecSql(pAr, "SAVEPOINT ar;"); if( rc!=SQLITE_OK ) return rc; - zTemp[0] = 0; + zTemp[0] = 0; if( pAr->bZip ){ /* Initialize the zipfile virtual table, if necessary */ if( pAr->zFile ){ @@ -21611,7 +23417,7 @@ static int arDotCommand( }else if( cmd.zFile ){ int flags; if( cmd.bAppend ) eDbType = SHELL_OPEN_APPENDVFS; - if( cmd.eCmd==AR_CMD_CREATE || cmd.eCmd==AR_CMD_INSERT + if( cmd.eCmd==AR_CMD_CREATE || cmd.eCmd==AR_CMD_INSERT || cmd.eCmd==AR_CMD_REMOVE || cmd.eCmd==AR_CMD_UPDATE ){ flags = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE; }else{ @@ -21622,10 +23428,10 @@ static int arDotCommand( utf8_printf(pState->out, "-- open database '%s'%s\n", cmd.zFile, eDbType==SHELL_OPEN_APPENDVFS ? " using 'apndvfs'" : ""); } - rc = sqlite3_open_v2(cmd.zFile, &cmd.db, flags, + rc = sqlite3_open_v2(cmd.zFile, &cmd.db, flags, eDbType==SHELL_OPEN_APPENDVFS ? "apndvfs" : 0); if( rc!=SQLITE_OK ){ - utf8_printf(stderr, "cannot open file: %s (%s)\n", + utf8_printf(stderr, "cannot open file: %s (%s)\n", cmd.zFile, sqlite3_errmsg(cmd.db) ); goto end_ar_command; @@ -21741,7 +23547,7 @@ static int recoverDatabaseCmd(ShellState *pState, int nArg, char **azArg){ bRowids = 0; } else{ - utf8_printf(stderr, "unexpected option: %s\n", azArg[i]); + utf8_printf(stderr, "unexpected option: %s\n", azArg[i]); showHelp(pState->out, azArg[0]); return 1; } @@ -21956,7 +23762,7 @@ FROM (\ sqlite3_bind_int(pStmt, 1, nDigits); rc = sqlite3_step(pStmt); sqlite3_finalize(pStmt); - assert(rc==SQLITE_DONE); + if( rc!=SQLITE_DONE ) rc_err_oom_die(SQLITE_NOMEM); } assert(db_int(*pDb, zHasDupes)==0); /* Consider: remove this */ rc = sqlite3_prepare_v2(*pDb, zCollectVar, -1, &pStmt, 0); @@ -22104,7 +23910,7 @@ static int do_meta_command(char *zLine, ShellState *p){ return 1; } if( zDb==0 ) zDb = "main"; - rc = sqlite3_open_v2(zDestFile, &pDest, + rc = sqlite3_open_v2(zDestFile, &pDest, SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, zVfs); if( rc!=SQLITE_OK ){ utf8_printf(stderr, "Error: cannot open \"%s\"\n", zDestFile); @@ -22143,6 +23949,7 @@ static int do_meta_command(char *zLine, ShellState *p){ } }else + /* Undocumented. Legacy only. See "crnl" below */ if( c=='b' && n>=3 && cli_strncmp(azArg[0], "binary", n)==0 ){ if( nArg==2 ){ if( booleanValue(azArg[1]) ){ @@ -22151,6 +23958,8 @@ static int do_meta_command(char *zLine, ShellState *p){ setTextMode(p->out, 1); } }else{ + raw_printf(stderr, "The \".binary\" command is deprecated." + " Use \".crnl\" instead.\n"); raw_printf(stderr, "Usage: .binary on|off\n"); rc = 1; } @@ -22206,7 +24015,6 @@ static int do_meta_command(char *zLine, ShellState *p){ raw_printf(stderr, "Usage: .check GLOB-PATTERN\n"); rc = 2; }else if( (zRes = readFile("testcase-out.txt", 0))==0 ){ - raw_printf(stderr, "Error: cannot read 'testcase-out.txt'\n"); rc = 2; }else if( testcase_glob(azArg[1],zRes)==0 ){ utf8_printf(stderr, @@ -22279,6 +24087,22 @@ static int do_meta_command(char *zLine, ShellState *p){ } }else + if( c=='c' && n==4 && cli_strncmp(azArg[0], "crnl", n)==0 ){ + if( nArg==2 ){ + if( booleanValue(azArg[1]) ){ + setTextMode(p->out, 1); + }else{ + setBinaryMode(p->out, 1); + } + }else{ +#if !defined(_WIN32) && !defined(WIN32) + raw_printf(stderr, "The \".crnl\" is a no-op on non-Windows machines.\n"); +#endif + raw_printf(stderr, "Usage: .crnl on|off\n"); + rc = 1; + } + }else + if( c=='d' && n>1 && cli_strncmp(azArg[0], "databases", n)==0 ){ char **azName = 0; int nName = 0; @@ -22336,6 +24160,8 @@ static int do_meta_command(char *zLine, ShellState *p){ { "load_extension", SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION }, { "no_ckpt_on_close", SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE }, { "reset_database", SQLITE_DBCONFIG_RESET_DATABASE }, + { "reverse_scanorder", SQLITE_DBCONFIG_REVERSE_SCANORDER }, + { "stmt_scanstatus", SQLITE_DBCONFIG_STMT_SCANSTATUS }, { "trigger_eqp", SQLITE_DBCONFIG_TRIGGER_EQP }, { "trusted_schema", SQLITE_DBCONFIG_TRUSTED_SCHEMA }, { "writable_schema", SQLITE_DBCONFIG_WRITABLE_SCHEMA }, @@ -22354,7 +24180,7 @@ static int do_meta_command(char *zLine, ShellState *p){ if( nArg>1 && ii==ArraySize(aDbConfig) ){ utf8_printf(stderr, "Error: unknown dbconfig \"%s\"\n", azArg[1]); utf8_printf(stderr, "Enter \".dbconfig\" with no arguments for a list\n"); - } + } }else #if SQLITE_SHELL_HAVE_RECOVER @@ -22421,7 +24247,7 @@ static int do_meta_command(char *zLine, ShellState *p){ " substr(o.name, 1, length(name)+1) == (name||'_')" ")", azArg[i], azArg[i] ); - + if( zLike ){ zLike = sqlite3_mprintf("%z OR %z", zLike, zExpr); }else{ @@ -22554,7 +24380,7 @@ static int do_meta_command(char *zLine, ShellState *p){ #ifndef SQLITE_OMIT_VIRTUALTABLE if( c=='e' && cli_strncmp(azArg[0], "expert", n)==0 ){ if( p->bSafeMode ){ - raw_printf(stderr, + raw_printf(stderr, "Cannot run experimental commands such as \"%s\" in safe mode\n", azArg[0]); rc = 1; @@ -22573,7 +24399,7 @@ static int do_meta_command(char *zLine, ShellState *p){ } aCtrl[] = { { "chunk_size", SQLITE_FCNTL_CHUNK_SIZE, "SIZE" }, { "data_version", SQLITE_FCNTL_DATA_VERSION, "" }, - { "has_moved", SQLITE_FCNTL_HAS_MOVED, "" }, + { "has_moved", SQLITE_FCNTL_HAS_MOVED, "" }, { "lock_timeout", SQLITE_FCNTL_LOCK_TIMEOUT, "MILLISEC" }, { "persist_wal", SQLITE_FCNTL_PERSIST_WAL, "[BOOLEAN]" }, /* { "pragma", SQLITE_FCNTL_PRAGMA, "NAME ARG" },*/ @@ -22594,7 +24420,7 @@ static int do_meta_command(char *zLine, ShellState *p){ open_db(p, 0); zCmd = nArg>=2 ? azArg[1] : "help"; - if( zCmd[0]=='-' + if( zCmd[0]=='-' && (cli_strcmp(zCmd,"--schema")==0 || cli_strcmp(zCmd,"-schema")==0) && nArg>=4 ){ @@ -22887,8 +24713,8 @@ static int do_meta_command(char *zLine, ShellState *p){ " for import\n"); goto meta_command_exit; } - sCtx.cColSep = p->colSeparator[0]; - sCtx.cRowSep = p->rowSeparator[0]; + sCtx.cColSep = (u8)p->colSeparator[0]; + sCtx.cRowSep = (u8)p->rowSeparator[0]; } sCtx.zFile = zFile; sCtx.nLine = 1; @@ -23084,6 +24910,12 @@ static int do_meta_command(char *zLine, ShellState *p){ int isWO = 0; /* True if making an imposter of a WITHOUT ROWID table */ int lenPK = 0; /* Length of the PRIMARY KEY string for isWO tables */ int i; + if( !ShellHasFlag(p,SHFLG_TestingMode) ){ + utf8_printf(stderr, ".%s unavailable without --unsafe-testing\n", + "imposter"); + rc = 1; + goto meta_command_exit; + } if( !(nArg==3 || (nArg==2 && sqlite3_stricmp(azArg[1],"off")==0)) ){ utf8_printf(stderr, "Usage: .imposter INDEX IMPOSTER\n" " .imposter off\n"); @@ -23268,7 +25100,8 @@ static int do_meta_command(char *zLine, ShellState *p){ const char *zFile, *zProc; char *zErrMsg = 0; failIfSafeMode(p, "cannot run .load in safe mode"); - if( nArg<2 ){ + if( nArg<2 || azArg[1][0]==0 ){ + /* Must have a non-empty FILE. (Will not load self.) */ raw_printf(stderr, "Usage: .load FILE ?ENTRYPOINT?\n"); rc = 1; goto meta_command_exit; @@ -23285,19 +25118,25 @@ static int do_meta_command(char *zLine, ShellState *p){ }else #endif -#ifndef SQLITE_SHELL_FIDDLE if( c=='l' && cli_strncmp(azArg[0], "log", n)==0 ){ - failIfSafeMode(p, "cannot run .log in safe mode"); if( nArg!=2 ){ raw_printf(stderr, "Usage: .log FILENAME\n"); rc = 1; }else{ const char *zFile = azArg[1]; + if( p->bSafeMode + && cli_strcmp(zFile,"on")!=0 + && cli_strcmp(zFile,"off")!=0 + ){ + raw_printf(stdout, "cannot set .log to anything other " + "than \"on\" or \"off\"\n"); + zFile = "off"; + } output_file_close(p->pLog); + if( cli_strcmp(zFile,"on")==0 ) zFile = "stdout"; p->pLog = output_file_open(zFile, 0); } }else -#endif if( c=='m' && cli_strncmp(azArg[0], "mode", n)==0 ){ const char *zMode = 0; @@ -23822,10 +25661,10 @@ static int do_meta_command(char *zLine, ShellState *p){ if( c=='p' && cli_strncmp(azArg[0], "prompt", n)==0 ){ if( nArg >= 2) { - strncpy(mainPrompt,azArg[1],(int)ArraySize(mainPrompt)-1); + shell_strncpy(mainPrompt,azArg[1],(int)ArraySize(mainPrompt)-1); } if( nArg >= 3) { - strncpy(continuePrompt,azArg[2],(int)ArraySize(continuePrompt)-1); + shell_strncpy(continuePrompt,azArg[2],(int)ArraySize(continuePrompt)-1); } }else @@ -23928,12 +25767,23 @@ static int do_meta_command(char *zLine, ShellState *p){ if( c=='s' && cli_strncmp(azArg[0], "scanstats", n)==0 ){ if( nArg==2 ){ - p->scanstatsOn = (u8)booleanValue(azArg[1]); + if( cli_strcmp(azArg[1], "vm")==0 ){ + p->scanstatsOn = 3; + }else + if( cli_strcmp(azArg[1], "est")==0 ){ + p->scanstatsOn = 2; + }else{ + p->scanstatsOn = (u8)booleanValue(azArg[1]); + } + open_db(p, 0); + sqlite3_db_config( + p->db, SQLITE_DBCONFIG_STMT_SCANSTATUS, p->scanstatsOn, (int*)0 + ); #ifndef SQLITE_ENABLE_STMT_SCANSTATUS raw_printf(stderr, "Warning: .scanstats not available in this build.\n"); #endif }else{ - raw_printf(stderr, "Usage: .scanstats on|off\n"); + raw_printf(stderr, "Usage: .scanstats on|off|est\n"); rc = 1; } }else @@ -23968,7 +25818,8 @@ static int do_meta_command(char *zLine, ShellState *p){ }else if( zName==0 ){ zName = azArg[ii]; }else{ - raw_printf(stderr, "Usage: .schema ?--indent? ?--nosys? ?LIKE-PATTERN?\n"); + raw_printf(stderr, + "Usage: .schema ?--indent? ?--nosys? ?LIKE-PATTERN?\n"); rc = 1; goto meta_command_exit; } @@ -24084,7 +25935,7 @@ static int do_meta_command(char *zLine, ShellState *p){ if( (c=='s' && n==11 && cli_strncmp(azArg[0], "selecttrace", n)==0) || (c=='t' && n==9 && cli_strncmp(azArg[0], "treetrace", n)==0) ){ - unsigned int x = nArg>=2 ? (unsigned int)integerValue(azArg[1]) : 0xffffffff; + unsigned int x = nArg>=2? (unsigned int)integerValue(azArg[1]) : 0xffffffff; sqlite3_test_control(SQLITE_TESTCTRL_TRACEFLAGS, 1, &x); }else @@ -24269,7 +26120,8 @@ static int do_meta_command(char *zLine, ShellState *p){ } } if( pAuxDb->nSession>=ArraySize(pAuxDb->aSession) ){ - raw_printf(stderr, "Maximum of %d sessions\n", ArraySize(pAuxDb->aSession)); + raw_printf(stderr, + "Maximum of %d sessions\n", ArraySize(pAuxDb->aSession)); goto meta_command_exit; } pSession = &pAuxDb->aSession[pAuxDb->nSession]; @@ -24483,12 +26335,12 @@ static int do_meta_command(char *zLine, ShellState *p){ } } if( bSchema ){ - zSql = "SELECT lower(name) FROM sqlite_schema" + zSql = "SELECT lower(name) as tname FROM sqlite_schema" " WHERE type='table' AND coalesce(rootpage,0)>1" " UNION ALL SELECT 'sqlite_schema'" " ORDER BY 1 collate nocase"; }else{ - zSql = "SELECT lower(name) FROM sqlite_schema" + zSql = "SELECT lower(name) as tname FROM sqlite_schema" " WHERE type='table' AND coalesce(rootpage,0)>1" " AND name NOT LIKE 'sqlite_%'" " ORDER BY 1 collate nocase"; @@ -24549,6 +26401,67 @@ static int do_meta_command(char *zLine, ShellState *p){ }else{ shell_exec(p, zSql, 0); } +#if !defined(SQLITE_OMIT_SCHEMA_PRAGMAS) && !defined(SQLITE_OMIT_VIRTUALTABLE) + { + int lrc; + char *zRevText = /* Query for reversible to-blob-to-text check */ + "SELECT lower(name) as tname FROM sqlite_schema\n" + "WHERE type='table' AND coalesce(rootpage,0)>1\n" + "AND name NOT LIKE 'sqlite_%%'%s\n" + "ORDER BY 1 collate nocase"; + zRevText = sqlite3_mprintf(zRevText, zLike? " AND name LIKE $tspec" : ""); + zRevText = sqlite3_mprintf( + /* lower-case query is first run, producing upper-case query. */ + "with tabcols as materialized(\n" + "select tname, cname\n" + "from (" + " select printf('\"%%w\"',ss.tname) as tname," + " printf('\"%%w\"',ti.name) as cname\n" + " from (%z) ss\n inner join pragma_table_info(tname) ti))\n" + "select 'SELECT total(bad_text_count) AS bad_text_count\n" + "FROM ('||group_concat(query, ' UNION ALL ')||')' as btc_query\n" + " from (select 'SELECT COUNT(*) AS bad_text_count\n" + "FROM '||tname||' WHERE '\n" + "||group_concat('CAST(CAST('||cname||' AS BLOB) AS TEXT)<>'||cname\n" + "|| ' AND typeof('||cname||')=''text'' ',\n" + "' OR ') as query, tname from tabcols group by tname)" + , zRevText); + shell_check_oom(zRevText); + if( bDebug ) utf8_printf(p->out, "%s\n", zRevText); + lrc = sqlite3_prepare_v2(p->db, zRevText, -1, &pStmt, 0); + if( lrc!=SQLITE_OK ){ + /* assert(lrc==SQLITE_NOMEM); // might also be SQLITE_ERROR if the + ** user does cruel and unnatural things like ".limit expr_depth 0". */ + rc = 1; + }else{ + if( zLike ) sqlite3_bind_text(pStmt,1,zLike,-1,SQLITE_STATIC); + lrc = SQLITE_ROW==sqlite3_step(pStmt); + if( lrc ){ + const char *zGenQuery = (char*)sqlite3_column_text(pStmt,0); + sqlite3_stmt *pCheckStmt; + lrc = sqlite3_prepare_v2(p->db, zGenQuery, -1, &pCheckStmt, 0); + if( bDebug ) utf8_printf(p->out, "%s\n", zGenQuery); + if( lrc!=SQLITE_OK ){ + rc = 1; + }else{ + if( SQLITE_ROW==sqlite3_step(pCheckStmt) ){ + double countIrreversible = sqlite3_column_double(pCheckStmt, 0); + if( countIrreversible>0 ){ + int sz = (int)(countIrreversible + 0.5); + utf8_printf(stderr, + "Digest includes %d invalidly encoded text field%s.\n", + sz, (sz>1)? "s": ""); + } + } + sqlite3_finalize(pCheckStmt); + } + sqlite3_finalize(pStmt); + } + } + if( rc ) utf8_printf(stderr, ".sha3sum failed.\n"); + sqlite3_free(zRevText); + } +#endif /* !defined(*_OMIT_SCHEMA_PRAGMAS) && !defined(*_OMIT_VIRTUALTABLE) */ sqlite3_free(zSql); }else @@ -24775,31 +26688,32 @@ static int do_meta_command(char *zLine, ShellState *p){ static const struct { const char *zCtrlName; /* Name of a test-control option */ int ctrlCode; /* Integer code for that option */ - int unSafe; /* Not valid for --safe mode */ + int unSafe; /* Not valid unless --unsafe-testing */ const char *zUsage; /* Usage notes */ } aCtrl[] = { - { "always", SQLITE_TESTCTRL_ALWAYS, 1, "BOOLEAN" }, - { "assert", SQLITE_TESTCTRL_ASSERT, 1, "BOOLEAN" }, - /*{ "benign_malloc_hooks",SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS,1, "" },*/ - /*{ "bitvec_test", SQLITE_TESTCTRL_BITVEC_TEST, 1, "" },*/ - { "byteorder", SQLITE_TESTCTRL_BYTEORDER, 0, "" }, - { "extra_schema_checks",SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS,0,"BOOLEAN" }, - /*{ "fault_install", SQLITE_TESTCTRL_FAULT_INSTALL, 1,"" },*/ - { "imposter", SQLITE_TESTCTRL_IMPOSTER,1,"SCHEMA ON/OFF ROOTPAGE"}, - { "internal_functions", SQLITE_TESTCTRL_INTERNAL_FUNCTIONS,0,"" }, - { "localtime_fault", SQLITE_TESTCTRL_LOCALTIME_FAULT,0,"BOOLEAN" }, - { "never_corrupt", SQLITE_TESTCTRL_NEVER_CORRUPT,1, "BOOLEAN" }, - { "optimizations", SQLITE_TESTCTRL_OPTIMIZATIONS,0,"DISABLE-MASK" }, + {"always", SQLITE_TESTCTRL_ALWAYS, 1, "BOOLEAN" }, + {"assert", SQLITE_TESTCTRL_ASSERT, 1, "BOOLEAN" }, + /*{"benign_malloc_hooks",SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS,1, "" },*/ + /*{"bitvec_test", SQLITE_TESTCTRL_BITVEC_TEST, 1, "" },*/ + {"byteorder", SQLITE_TESTCTRL_BYTEORDER, 0, "" }, + {"extra_schema_checks",SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS,0,"BOOLEAN" }, + /*{"fault_install", SQLITE_TESTCTRL_FAULT_INSTALL, 1,"" },*/ + {"imposter", SQLITE_TESTCTRL_IMPOSTER,1,"SCHEMA ON/OFF ROOTPAGE"}, + {"internal_functions", SQLITE_TESTCTRL_INTERNAL_FUNCTIONS,0,"" }, + {"localtime_fault", SQLITE_TESTCTRL_LOCALTIME_FAULT,0,"BOOLEAN" }, + {"never_corrupt", SQLITE_TESTCTRL_NEVER_CORRUPT,1, "BOOLEAN" }, + {"optimizations", SQLITE_TESTCTRL_OPTIMIZATIONS,0,"DISABLE-MASK" }, #ifdef YYCOVERAGE - { "parser_coverage", SQLITE_TESTCTRL_PARSER_COVERAGE,0,"" }, -#endif - { "pending_byte", SQLITE_TESTCTRL_PENDING_BYTE,0, "OFFSET " }, - { "prng_restore", SQLITE_TESTCTRL_PRNG_RESTORE,0, "" }, - { "prng_save", SQLITE_TESTCTRL_PRNG_SAVE, 0, "" }, - { "prng_seed", SQLITE_TESTCTRL_PRNG_SEED, 0, "SEED ?db?" }, - { "seek_count", SQLITE_TESTCTRL_SEEK_COUNT, 0, "" }, - { "sorter_mmap", SQLITE_TESTCTRL_SORTER_MMAP, 0, "NMAX" }, - { "tune", SQLITE_TESTCTRL_TUNE, 1, "ID VALUE" }, + {"parser_coverage", SQLITE_TESTCTRL_PARSER_COVERAGE,0,"" }, +#endif + {"pending_byte", SQLITE_TESTCTRL_PENDING_BYTE,0, "OFFSET " }, + {"prng_restore", SQLITE_TESTCTRL_PRNG_RESTORE,0, "" }, + {"prng_save", SQLITE_TESTCTRL_PRNG_SAVE, 0, "" }, + {"prng_seed", SQLITE_TESTCTRL_PRNG_SEED, 0, "SEED ?db?" }, + {"seek_count", SQLITE_TESTCTRL_SEEK_COUNT, 0, "" }, + {"sorter_mmap", SQLITE_TESTCTRL_SORTER_MMAP, 0, "NMAX" }, + {"tune", SQLITE_TESTCTRL_TUNE, 1, "ID VALUE" }, + {"uselongdouble", SQLITE_TESTCTRL_USELONGDOUBLE,0,"?BOOLEAN|\"default\"?"}, }; int testctrl = -1; int iCtrl = -1; @@ -24821,6 +26735,7 @@ static int do_meta_command(char *zLine, ShellState *p){ if( cli_strcmp(zCmd,"help")==0 ){ utf8_printf(p->out, "Available test-controls:\n"); for(i=0; iout, " .testctrl %s %s\n", aCtrl[i].zCtrlName, aCtrl[i].zUsage); } @@ -24832,6 +26747,7 @@ static int do_meta_command(char *zLine, ShellState *p){ ** of the option name, or a numerical value. */ n2 = strlen30(zCmd); for(i=0; ibSafeMode ){ - utf8_printf(stderr, - "line %d: \".testctrl %s\" may not be used in safe mode\n", - p->lineno, aCtrl[iCtrl].zCtrlName); - exit(1); }else{ switch(testctrl){ @@ -24924,6 +26835,21 @@ static int do_meta_command(char *zLine, ShellState *p){ } break; + /* sqlite3_test_control(int, int) */ + case SQLITE_TESTCTRL_USELONGDOUBLE: { + int opt = -1; + if( nArg==3 ){ + if( cli_strcmp(azArg[2],"default")==0 ){ + opt = 2; + }else{ + opt = booleanValue(azArg[2]); + } + } + rc2 = sqlite3_test_control(testctrl, opt); + isOk = 1; + break; + } + /* sqlite3_test_control(sqlite3*) */ case SQLITE_TESTCTRL_INTERNAL_FUNCTIONS: rc2 = sqlite3_test_control(testctrl, p->db); @@ -25060,7 +26986,7 @@ static int do_meta_command(char *zLine, ShellState *p){ } }else{ output_file_close(p->traceOut); - p->traceOut = output_file_open(azArg[1], 0); + p->traceOut = output_file_open(z, 0); } } if( p->traceOut==0 ){ @@ -25161,6 +27087,7 @@ static int do_meta_command(char *zLine, ShellState *p){ #endif /* SQLITE_USER_AUTHENTICATION */ if( c=='v' && cli_strncmp(azArg[0], "version", n)==0 ){ + char *zPtrSz = sizeof(void*)==8 ? "64-bit" : "32-bit"; utf8_printf(p->out, "SQLite %s %s\n" /*extra-version-info*/, sqlite3_libversion(), sqlite3_sourceid()); #if SQLITE_HAVE_ZLIB @@ -25171,11 +27098,11 @@ static int do_meta_command(char *zLine, ShellState *p){ #if defined(__clang__) && defined(__clang_major__) utf8_printf(p->out, "clang-" CTIMEOPT_VAL(__clang_major__) "." CTIMEOPT_VAL(__clang_minor__) "." - CTIMEOPT_VAL(__clang_patchlevel__) "\n"); + CTIMEOPT_VAL(__clang_patchlevel__) " (%s)\n", zPtrSz); #elif defined(_MSC_VER) - utf8_printf(p->out, "msvc-" CTIMEOPT_VAL(_MSC_VER) "\n"); + utf8_printf(p->out, "msvc-" CTIMEOPT_VAL(_MSC_VER) " (%s)\n", zPtrSz); #elif defined(__GNUC__) && defined(__VERSION__) - utf8_printf(p->out, "gcc-" __VERSION__ "\n"); + utf8_printf(p->out, "gcc-" __VERSION__ " (%s)\n", zPtrSz); #endif }else @@ -25224,7 +27151,7 @@ static int do_meta_command(char *zLine, ShellState *p){ }else if( c=='w' && cli_strncmp(azArg[0], "wheretrace", n)==0 ){ - unsigned int x = nArg>=2 ? (unsigned int)integerValue(azArg[1]) : 0xffffffff; + unsigned int x = nArg>=2? (unsigned int)integerValue(azArg[1]) : 0xffffffff; sqlite3_test_control(SQLITE_TESTCTRL_TRACEFLAGS, 3, &x); }else @@ -25276,7 +27203,8 @@ typedef enum { ** The scan is resumable for subsequent lines when prior ** return values are passed as the 2nd argument. */ -static QuickScanState quickscan(char *zLine, QuickScanState qss){ +static QuickScanState quickscan(char *zLine, QuickScanState qss, + SCAN_TRACKER_REFTYPE pst){ char cin; char cWait = (char)qss; /* intentional narrowing loss */ if( cWait==0 ){ @@ -25300,17 +27228,25 @@ static QuickScanState quickscan(char *zLine, QuickScanState qss){ if( *zLine=='*' ){ ++zLine; cWait = '*'; + CONTINUE_PROMPT_AWAITS(pst, "/*"); qss = QSS_SETV(qss, cWait); goto TermScan; } break; case '[': cin = ']'; - /* fall thru */ + deliberate_fall_through; case '`': case '\'': case '"': cWait = cin; qss = QSS_HasDark | cWait; + CONTINUE_PROMPT_AWAITC(pst, cin); goto TermScan; + case '(': + CONTINUE_PAREN_INCR(pst, 1); + break; + case ')': + CONTINUE_PAREN_INCR(pst, -1); + break; default: break; } @@ -25326,16 +27262,19 @@ static QuickScanState quickscan(char *zLine, QuickScanState qss){ continue; ++zLine; cWait = 0; + CONTINUE_PROMPT_AWAITC(pst, 0); qss = QSS_SETV(qss, 0); goto PlainScan; case '`': case '\'': case '"': if(*zLine==cWait){ + /* Swallow doubled end-delimiter.*/ ++zLine; continue; } - /* fall thru */ + deliberate_fall_through; case ']': cWait = 0; + CONTINUE_PROMPT_AWAITC(pst, 0); qss = QSS_SETV(qss, 0); goto PlainScan; default: assert(0); @@ -25359,17 +27298,15 @@ static int line_is_command_terminator(char *zLine){ zLine += 2; /* SQL Server */ else return 0; - return quickscan(zLine, QSS_Start)==QSS_Start; + return quickscan(zLine, QSS_Start, 0)==QSS_Start; } /* -** We need a default sqlite3_complete() implementation to use in case -** the shell is compiled with SQLITE_OMIT_COMPLETE. The default assumes -** any arbitrary text is a complete SQL statement. This is not very -** user-friendly, but it does seem to work. +** The CLI needs a working sqlite3_complete() to work properly. So error +** out of the build if compiling with SQLITE_OMIT_COMPLETE. */ #ifdef SQLITE_OMIT_COMPLETE -#define sqlite3_complete(x) 1 +# error the CLI application is imcompatable with SQLITE_OMIT_COMPLETE. #endif /* @@ -25442,9 +27379,9 @@ static void echo_group_input(ShellState *p, const char *zDo){ #ifdef SQLITE_SHELL_FIDDLE /* -** Alternate one_input_line() impl for wasm mode. This is not in the primary impl -** because we need the global shellState and cannot access it from that function -** without moving lots of code around (creating a larger/messier diff). +** Alternate one_input_line() impl for wasm mode. This is not in the primary +** impl because we need the global shellState and cannot access it from that +** function without moving lots of code around (creating a larger/messier diff). */ static char *one_input_line(FILE *in, char *zPrior, int isContinuation){ /* Parse the next line from shellState.wasm.zInput. */ @@ -25501,6 +27438,7 @@ static int process_input(ShellState *p){ } ++p->inputNesting; p->lineno = 0; + CONTINUE_PROMPT_RESET; while( errCnt==0 || !bail_on_error || (p->in==0 && stdin_is_interactive) ){ fflush(p->out); zLine = one_input_line(p->in, zLine, nSql>0); @@ -25519,7 +27457,7 @@ static int process_input(ShellState *p){ && line_is_complete(zSql, nSql) ){ memcpy(zLine,";",2); } - qss = quickscan(zLine, qss); + qss = quickscan(zLine, qss, CONTINUE_PROMPT_PSTATE); if( QSS_PLAINWHITE(qss) && nSql==0 ){ /* Just swallow single-line whitespace */ echo_group_input(p, zLine); @@ -25527,6 +27465,7 @@ static int process_input(ShellState *p){ continue; } if( zLine && (zLine[0]=='.' || zLine[0]=='#') && nSql==0 ){ + CONTINUE_PROMPT_RESET; echo_group_input(p, zLine); if( zLine[0]=='.' ){ rc = do_meta_command(zLine, p); @@ -25562,6 +27501,7 @@ static int process_input(ShellState *p){ if( nSql && QSS_SEMITERM(qss) && sqlite3_complete(zSql) ){ echo_group_input(p, zSql); errCnt += runOneSqlLine(p, zSql, p->in, startline); + CONTINUE_PROMPT_RESET; nSql = 0; if( p->outCount ){ output_reset(p); @@ -25581,6 +27521,7 @@ static int process_input(ShellState *p){ /* This may be incomplete. Let the SQL parser deal with that. */ echo_group_input(p, zSql); errCnt += runOneSqlLine(p, zSql, p->in, startline); + CONTINUE_PROMPT_RESET; } free(zSql); free(zLine); @@ -25602,7 +27543,7 @@ static char *find_home_dir(int clearFlag){ if( home_dir ) return home_dir; #if !defined(_WIN32) && !defined(WIN32) && !defined(_WIN32_WCE) \ - && !defined(__RTP__) && !defined(_WRS_KERNEL) + && !defined(__RTP__) && !defined(_WRS_KERNEL) && !defined(SQLITE_WASI) { struct passwd *pwent; uid_t uid = getuid(); @@ -25657,9 +27598,43 @@ static char *find_home_dir(int clearFlag){ return home_dir; } +/* +** On non-Windows platforms, look for $XDG_CONFIG_HOME. +** If ${XDG_CONFIG_HOME}/sqlite3/sqliterc is found, return +** the path to it, else return 0. The result is cached for +** subsequent calls. +*/ +static const char *find_xdg_config(void){ +#if defined(_WIN32) || defined(WIN32) || defined(_WIN32_WCE) \ + || defined(__RTP__) || defined(_WRS_KERNEL) + return 0; +#else + static int alreadyTried = 0; + static char *zConfig = 0; + const char *zXdgHome; + + if( alreadyTried!=0 ){ + return zConfig; + } + alreadyTried = 1; + zXdgHome = getenv("XDG_CONFIG_HOME"); + if( zXdgHome==0 ){ + return 0; + } + zConfig = sqlite3_mprintf("%s/sqlite3/sqliterc", zXdgHome); + shell_check_oom(zConfig); + if( access(zConfig,0)!=0 ){ + sqlite3_free(zConfig); + zConfig = 0; + } + return zConfig; +#endif +} + /* ** Read input from the file given by sqliterc_override. Or if that -** parameter is NULL, take input from ~/.sqliterc +** parameter is NULL, take input from the first of find_xdg_config() +** or ~/.sqliterc which is found. ** ** Returns the number of errors. */ @@ -25673,7 +27648,10 @@ static void process_sqliterc( FILE *inSaved = p->in; int savedLineno = p->lineno; - if (sqliterc == NULL) { + if( sqliterc == NULL ){ + sqliterc = find_xdg_config(); + } + if( sqliterc == NULL ){ home_dir = find_home_dir(0); if( home_dir==0 ){ raw_printf(stderr, "-- warning: cannot find home directory;" @@ -25704,6 +27682,7 @@ static void process_sqliterc( ** Show available command line options */ static const char zOptions[] = + " -- treat no subsequent arguments as options\n" #if defined(SQLITE_HAVE_ZLIB) && !defined(SQLITE_OMIT_VIRTUALTABLE) " -A ARGS... run \".archive ARGS\" and exit\n" #endif @@ -25745,6 +27724,7 @@ static const char zOptions[] = " -nonce STRING set the safe-mode escape nonce\n" " -nullvalue TEXT set text string for NULL values. Default ''\n" " -pagecache SIZE N use N slots of SZ bytes each for page cache memory\n" + " -pcachetrace trace all page cache operations\n" " -quote set output mode to 'quote'\n" " -readonly open the database read-only\n" " -safe enable safe-mode\n" @@ -25755,6 +27735,10 @@ static const char zOptions[] = " -stats print memory stats before each finalize\n" " -table set output mode to 'table'\n" " -tabs set output mode to 'tabs'\n" + " -unsafe-testing allow unsafe commands and modes for testing\n" +#if SHELL_WIN_UTF8_OPT + " -utf8 setup interactive console code page for UTF-8\n" +#endif " -version show SQLite version\n" " -vfs NAME use NAME as the default VFS\n" #ifdef SQLITE_ENABLE_VFSTRACE @@ -25766,9 +27750,9 @@ static const char zOptions[] = ; static void usage(int showDetail){ utf8_printf(stderr, - "Usage: %s [OPTIONS] FILENAME [SQL]\n" + "Usage: %s [OPTIONS] [FILENAME [SQL]]\n" "FILENAME is the name of an SQLite database. A new database is created\n" - "if the file does not previously exist.\n", Argv0); + "if the file does not previously exist. Defaults to :memory:.\n", Argv0); if( showDetail ){ utf8_printf(stderr, "OPTIONS include:\n%s", zOptions); }else{ @@ -25800,9 +27784,11 @@ static void main_init(ShellState *data) { memcpy(data->rowSeparator,SEP_Row, 2); data->showHeader = 0; data->shellFlgs = SHFLG_Lookaside; + sqlite3_config(SQLITE_CONFIG_LOG, shellLog, data); +#if !defined(SQLITE_SHELL_FIDDLE) verify_uninitialized(); +#endif sqlite3_config(SQLITE_CONFIG_URI, 1); - sqlite3_config(SQLITE_CONFIG_LOG, shellLog, data); sqlite3_config(SQLITE_CONFIG_MULTITHREAD); sqlite3_snprintf(sizeof(mainPrompt), mainPrompt,"sqlite> "); sqlite3_snprintf(sizeof(continuePrompt), continuePrompt," ...> "); @@ -25845,6 +27831,10 @@ static char *cmdline_option_value(int argc, char **argv, int i){ return argv[i]; } +static void sayAbnormalExit(void){ + if( seenInterrupt ) fprintf(stderr, "Program interrupted.\n"); +} + #ifndef SQLITE_SHELL_IS_UTF8 # if (defined(_WIN32) || defined(WIN32)) \ && (defined(_MSC_VER) || (defined(UNICODE) && defined(__GNUC__))) @@ -25865,7 +27855,7 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ char **argv; #endif #ifdef SQLITE_DEBUG - sqlite3_int64 mem_main_enter = sqlite3_memory_used(); + sqlite3_int64 mem_main_enter = 0; #endif char *zErrMsg = 0; #ifdef SQLITE_SHELL_FIDDLE @@ -25879,15 +27869,15 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ int warnInmemoryDb = 0; int readStdin = 1; int nCmd = 0; + int nOptsEnd = argc; char **azCmd = 0; const char *zVfs = 0; /* Value of -vfs command-line option */ #if !SQLITE_SHELL_IS_UTF8 char **argvToFree = 0; int argcToFree = 0; #endif - - setBinaryMode(stdin, 0); setvbuf(stderr, 0, _IONBF, 0); /* Make sure stderr is unbuffered */ + #ifdef SQLITE_SHELL_FIDDLE stdin_is_interactive = 0; stdout_is_console = 1; @@ -25896,7 +27886,13 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ stdin_is_interactive = isatty(0); stdout_is_console = isatty(1); #endif - +#if SHELL_WIN_UTF8_OPT + atexit(console_restore); /* Needs revision for CLI as library call */ +#endif + atexit(sayAbnormalExit); +#ifdef SQLITE_DEBUG + mem_main_enter = sqlite3_memory_used(); +#endif #if !defined(_WIN32_WCE) if( getenv("SQLITE_DEBUG_BREAK") ){ if( isatty(0) && isatty(2) ){ @@ -25917,6 +27913,14 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ } } #endif + /* Register a valid signal handler early, before much else is done. */ +#ifdef SIGINT + signal(SIGINT, interrupt_handler); +#elif (defined(_WIN32) || defined(WIN32)) && !defined(_WIN32_WCE) + if( !SetConsoleCtrlHandler(ConsoleCtrlHandler, TRUE) ){ + fprintf(stderr, "No ^C handler.\n"); + } +#endif #if USE_SYSTEM_SQLITE+0!=1 if( cli_strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,60)!=0 ){ @@ -25956,15 +27960,6 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ assert( argc>=1 && argv && argv[0] ); Argv0 = argv[0]; - /* Make sure we have a valid signal handler early, before anything - ** else is done. - */ -#ifdef SIGINT - signal(SIGINT, interrupt_handler); -#elif (defined(_WIN32) || defined(WIN32)) && !defined(_WIN32_WCE) - SetConsoleCtrlHandler(ConsoleCtrlHandler, TRUE); -#endif - #ifdef SQLITE_SHELL_DBNAME_PROC { /* If the SQLITE_SHELL_DBNAME_PROC macro is defined, then it is the name @@ -25982,15 +27977,17 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ ** the size of the alternative malloc heap, ** and the first command to execute. */ +#ifndef SQLITE_SHELL_FIDDLE verify_uninitialized(); +#endif for(i=1; inOptsEnd ){ if( data.aAuxDb->zDbFilename==0 ){ data.aAuxDb->zDbFilename = z; }else{ - /* Excesss arguments are interpreted as SQL (or dot-commands) and + /* Excess arguments are interpreted as SQL (or dot-commands) and ** mean that nothing is read from stdin */ readStdin = 0; nCmd++; @@ -25998,9 +27995,13 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ shell_check_oom(azCmd); azCmd[nCmd-1] = z; } + continue; } if( z[1]=='-' ) z++; - if( cli_strcmp(z,"-separator")==0 + if( cli_strcmp(z, "-")==0 ){ + nOptsEnd = i; + continue; + }else if( cli_strcmp(z,"-separator")==0 || cli_strcmp(z,"-nullvalue")==0 || cli_strcmp(z,"-newline")==0 || cli_strcmp(z,"-cmd")==0 @@ -26022,6 +28023,7 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ zSize = cmdline_option_value(argc, argv, ++i); szHeap = integerValue(zSize); if( szHeap>0x7fff0000 ) szHeap = 0x7fff0000; + verify_uninitialized(); sqlite3_config(SQLITE_CONFIG_HEAP, malloc((int)szHeap), (int)szHeap, 64); #else (void)cmdline_option_value(argc, argv, ++i); @@ -26035,6 +28037,7 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ if( sz>0 && n>0 && 0xffffffffffffLL/sz0 && sz>0) ? malloc(n*sz) : 0, sz, n); data.shellFlgs |= SHFLG_Pagecache; @@ -26044,11 +28047,13 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ if( sz<0 ) sz = 0; n = (int)integerValue(cmdline_option_value(argc,argv,++i)); if( n<0 ) n = 0; + verify_uninitialized(); sqlite3_config(SQLITE_CONFIG_LOOKASIDE, sz, n); if( sz*n==0 ) data.shellFlgs &= ~SHFLG_Lookaside; }else if( cli_strcmp(z,"-threadsafe")==0 ){ int n; n = (int)integerValue(cmdline_option_value(argc,argv,++i)); + verify_uninitialized(); switch( n ){ case 0: sqlite3_config(SQLITE_CONFIG_SINGLETHREAD); break; case 2: sqlite3_config(SQLITE_CONFIG_MULTITHREAD); break; @@ -26067,15 +28072,17 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ #endif #ifdef SQLITE_ENABLE_MULTIPLEX }else if( cli_strcmp(z,"-multiplex")==0 ){ - extern int sqlite3_multiple_initialize(const char*,int); + extern int sqlite3_multiplex_initialize(const char*,int); sqlite3_multiplex_initialize(0, 1); #endif }else if( cli_strcmp(z,"-mmap")==0 ){ sqlite3_int64 sz = integerValue(cmdline_option_value(argc,argv,++i)); + verify_uninitialized(); sqlite3_config(SQLITE_CONFIG_MMAP_SIZE, sz, sz); -#ifdef SQLITE_ENABLE_SORTER_REFERENCES +#if defined(SQLITE_ENABLE_SORTER_REFERENCES) }else if( cli_strcmp(z,"-sorterref")==0 ){ sqlite3_int64 sz = integerValue(cmdline_option_value(argc,argv,++i)); + verify_uninitialized(); sqlite3_config(SQLITE_CONFIG_SORTERREF_SIZE, (int)sz); #endif }else if( cli_strcmp(z,"-vfs")==0 ){ @@ -26104,16 +28111,22 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ #endif }else if( cli_strcmp(z, "-memtrace")==0 ){ sqlite3MemTraceActivate(stderr); + }else if( cli_strcmp(z, "-pcachetrace")==0 ){ + sqlite3PcacheTraceActivate(stderr); }else if( cli_strcmp(z,"-bail")==0 ){ bail_on_error = 1; }else if( cli_strcmp(z,"-nonce")==0 ){ free(data.zNonce); - data.zNonce = strdup(argv[++i]); + data.zNonce = strdup(cmdline_option_value(argc, argv, ++i)); + }else if( cli_strcmp(z,"-unsafe-testing")==0 ){ + ShellSetFlag(&data,SHFLG_TestingMode); }else if( cli_strcmp(z,"-safe")==0 ){ /* no-op - catch this on the second pass */ } } +#ifndef SQLITE_SHELL_FIDDLE verify_uninitialized(); +#endif #ifdef SQLITE_SHELL_INIT_PROC @@ -26177,7 +28190,7 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ */ for(i=1; i=nOptsEnd ) continue; if( z[1]=='-' ){ z++; } if( cli_strcmp(z,"-init")==0 ){ i++; @@ -26222,12 +28235,12 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ data.openFlags |= SQLITE_OPEN_NOFOLLOW; }else if( cli_strcmp(z,"-ascii")==0 ){ data.mode = MODE_Ascii; - sqlite3_snprintf(sizeof(data.colSeparator), data.colSeparator, SEP_Unit); - sqlite3_snprintf(sizeof(data.rowSeparator), data.rowSeparator, SEP_Record); + sqlite3_snprintf(sizeof(data.colSeparator), data.colSeparator,SEP_Unit); + sqlite3_snprintf(sizeof(data.rowSeparator), data.rowSeparator,SEP_Record); }else if( cli_strcmp(z,"-tabs")==0 ){ data.mode = MODE_List; - sqlite3_snprintf(sizeof(data.colSeparator), data.colSeparator, SEP_Tab); - sqlite3_snprintf(sizeof(data.rowSeparator), data.rowSeparator, SEP_Row); + sqlite3_snprintf(sizeof(data.colSeparator), data.colSeparator,SEP_Tab); + sqlite3_snprintf(sizeof(data.rowSeparator), data.rowSeparator,SEP_Row); }else if( cli_strcmp(z,"-separator")==0 ){ sqlite3_snprintf(sizeof(data.colSeparator), data.colSeparator, "%s",cmdline_option_value(argc,argv,++i)); @@ -26263,12 +28276,17 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ }else if( cli_strcmp(z,"-bail")==0 ){ /* No-op. The bail_on_error flag should already be set. */ }else if( cli_strcmp(z,"-version")==0 ){ - printf("%s %s\n", sqlite3_libversion(), sqlite3_sourceid()); + printf("%s %s (%d-bit)\n", sqlite3_libversion(), sqlite3_sourceid(), + 8*(int)sizeof(char*)); return 0; }else if( cli_strcmp(z,"-interactive")==0 ){ stdin_is_interactive = 1; }else if( cli_strcmp(z,"-batch")==0 ){ stdin_is_interactive = 0; + }else if( cli_strcmp(z,"-utf8")==0 ){ +#if SHELL_WIN_UTF8_OPT + console_utf8 = 1; +#endif /* SHELL_WIN_UTF8_OPT */ }else if( cli_strcmp(z,"-heap")==0 ){ i++; }else if( cli_strcmp(z,"-pagecache")==0 ){ @@ -26283,6 +28301,8 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ i++; }else if( cli_strcmp(z,"-memtrace")==0 ){ i++; + }else if( cli_strcmp(z,"-pcachetrace")==0 ){ + i++; #ifdef SQLITE_ENABLE_SORTER_REFERENCES }else if( cli_strcmp(z,"-sorterref")==0 ){ i++; @@ -26339,6 +28359,8 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ #endif }else if( cli_strcmp(z,"-safe")==0 ){ data.bSafeMode = data.bSafeModePersist = 1; + }else if( cli_strcmp(z,"-unsafe-testing")==0 ){ + /* Acted upon in first pass. */ }else{ utf8_printf(stderr,"%s: Error: unknown option: %s\n", Argv0, z); raw_printf(stderr,"Use -help for a list of options.\n"); @@ -26346,6 +28368,14 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ } data.cMode = data.mode; } +#if SHELL_WIN_UTF8_OPT + if( console_utf8 && stdin_is_interactive ){ + console_prepare(); + }else{ + setBinaryMode(stdin, 0); + console_utf8 = 0; + } +#endif if( !readStdin ){ /* Run all arguments that do not begin with '-' as if they were separate @@ -26361,6 +28391,7 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ } }else{ open_db(&data, 0); + echo_group_input(&data, azCmd[i]); rc = shell_exec(&data, azCmd[i], &zErrMsg); if( zErrMsg || rc ){ if( zErrMsg!=0 ){ diff --git a/src/sqlite/SQLite-3.43.1/sqlite3.1 b/src/sqlite/SQLite-3.43.1/sqlite3.1 new file mode 100644 index 000000000..08b1ff262 --- /dev/null +++ b/src/sqlite/SQLite-3.43.1/sqlite3.1 @@ -0,0 +1,161 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH SQLITE3 1 "Fri Aug 11 23:50:12 CET 2023" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +.B sqlite3 +\- A command line interface for SQLite version 3 + +.SH SYNOPSIS +.B sqlite3 +.RI [ options ] +.RI [ databasefile ] +.RI [ SQL ] + +.SH SUMMARY +.PP +.B sqlite3 +is a terminal-based front-end to the SQLite library that can evaluate +queries interactively and display the results in multiple formats. +.B sqlite3 +can also be used within shell scripts and other applications to provide +batch processing features. + +.SH DESCRIPTION +To start a +.B sqlite3 +interactive session, invoke the +.B sqlite3 +command and optionally provide the name of a database file. If the +database file does not exist, it will be created. If the database file +does exist, it will be opened. + +For example, to create a new database file named "mydata.db", create +a table named "memos" and insert a couple of records into that table: +.sp +$ +.B sqlite3 mydata.db +.br +SQLite version 3.43.0 2023-08-11 17:45:23 +.br +Enter ".help" for usage hints. +.br +sqlite> +.B create table memos(text, priority INTEGER); +.br +sqlite> +.B insert into memos values('deliver project description', 10); +.br +sqlite> +.B insert into memos values('lunch with Christine', 100); +.br +sqlite> +.B select * from memos; +.br +deliver project description|10 +.br +lunch with Christine|100 +.br +sqlite> +.sp + +If no database name is supplied, the ATTACH sql command can be used +to attach to existing or create new database files. ATTACH can also +be used to attach to multiple databases within the same interactive +session. This is useful for migrating data between databases, +possibly changing the schema along the way. + +Optionally, a SQL statement or set of SQL statements can be supplied as +a single argument. Multiple statements should be separated by +semi-colons. + +For example: +.sp +$ +.B sqlite3 -line mydata.db 'select * from memos where priority > 20;' +.br + text = lunch with Christine +.br +priority = 100 +.br +.sp + +.SS SQLITE META-COMMANDS +.PP +The interactive interpreter offers a set of meta-commands that can be +used to control the output format, examine the currently attached +database files, or perform administrative operations upon the +attached databases (such as rebuilding indices). Meta-commands are +always prefixed with a dot (.). + +A list of available meta-commands can be viewed at any time by issuing +the '.help' command. For example: +.sp +sqlite> +.B .help +.nf +.tr %. +... +.sp +.fi + +The available commands differ by version and build options, so they +are not listed here. Please refer to your local copy for all available +options. + + +.SH INIT FILE +.B sqlite3 +reads an initialization file to set the configuration of the +interactive environment. Throughout initialization, any previously +specified setting can be overridden. The sequence of initialization is +as follows: + +o The default configuration is established as follows: + +.sp +.nf +.cc | +mode = LIST +separator = "|" +main prompt = "sqlite> " +continue prompt = " ...> " +|cc . +.sp +.fi + +o If the file +.B ${XDG_CONFIG_HOME}/sqlite3/sqliterc +or +.B ~/.sqliterc +exists, the first of those to be found is processed during startup. +It should generally only contain meta-commands. + +o If the -init option is present, the specified file is processed. + +o All other command line options are processed. + +.SH SEE ALSO +https://sqlite.org/cli.html +.br +https://sqlite.org/fiddle (a WebAssembly build of the CLI app) +.br +The sqlite3-doc package. +.SH AUTHOR +This manual page was originally written by Andreas Rottmann +, for the Debian GNU/Linux system (but may be used +by others). It was subsequently revised by Bill Bumgarner , +Laszlo Boszormenyi , and the sqlite3 developers. diff --git a/src/sqlite/SQLite-3.40.1/sqlite3.c b/src/sqlite/SQLite-3.43.1/sqlite3.c similarity index 95% rename from src/sqlite/SQLite-3.40.1/sqlite3.c rename to src/sqlite/SQLite-3.43.1/sqlite3.c index a290c82d7..1884b0823 100644 --- a/src/sqlite/SQLite-3.40.1/sqlite3.c +++ b/src/sqlite/SQLite-3.43.1/sqlite3.c @@ -1,6 +1,6 @@ /****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.40.1. By combining all the individual C code files into this +** version 3.43.1. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a single translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements @@ -16,6 +16,9 @@ ** if you want a wrapper to interface SQLite with your choice of programming ** language. The code for the "sqlite3" command-line shell is also in a ** separate file. This file contains only code for the core SQLite library. +** +** The content in this amalgamation comes from Fossil check-in +** d3a40c05c49e1a49264912b1a05bc2143ac. */ #define SQLITE_CORE 1 #define SQLITE_AMALGAMATION 1 @@ -50,11 +53,11 @@ ** used on lines of code that actually ** implement parts of coverage testing. ** -** OPTIMIZATION-IF-TRUE - This branch is allowed to alway be false +** OPTIMIZATION-IF-TRUE - This branch is allowed to always be false ** and the correct answer is still obtained, ** though perhaps more slowly. ** -** OPTIMIZATION-IF-FALSE - This branch is allowed to alway be true +** OPTIMIZATION-IF-FALSE - This branch is allowed to always be true ** and the correct answer is still obtained, ** though perhaps more slowly. ** @@ -123,6 +126,10 @@ #define SQLITE_4_BYTE_ALIGNED_MALLOC #endif /* defined(_MSC_VER) && !defined(_WIN64) */ +#if !defined(HAVE_LOG2) && defined(_MSC_VER) && _MSC_VER<1800 +#define HAVE_LOG2 0 +#endif /* !defined(HAVE_LOG2) && defined(_MSC_VER) && _MSC_VER<1800 */ + #endif /* SQLITE_MSVC_H */ /************** End of msvc.h ************************************************/ @@ -452,9 +459,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.40.1" -#define SQLITE_VERSION_NUMBER 3040001 -#define SQLITE_SOURCE_ID "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" +#define SQLITE_VERSION "3.43.1" +#define SQLITE_VERSION_NUMBER 3043001 +#define SQLITE_SOURCE_ID "2023-09-11 12:01:27 2d3a40c05c49e1a49264912b1a05bc2143ac0e7c3df588276ce80a4cbc9bd1b0" /* ** CAPI3REF: Run-Time Library Version Numbers @@ -834,6 +841,7 @@ SQLITE_API int sqlite3_exec( #define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31<<8)) #define SQLITE_IOERR_DATA (SQLITE_IOERR | (32<<8)) #define SQLITE_IOERR_CORRUPTFS (SQLITE_IOERR | (33<<8)) +#define SQLITE_IOERR_IN_PAGE (SQLITE_IOERR | (34<<8)) #define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8)) #define SQLITE_LOCKED_VTAB (SQLITE_LOCKED | (2<<8)) #define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8)) @@ -869,6 +877,7 @@ SQLITE_API int sqlite3_exec( #define SQLITE_CONSTRAINT_DATATYPE (SQLITE_CONSTRAINT |(12<<8)) #define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8)) #define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8)) +#define SQLITE_NOTICE_RBU (SQLITE_NOTICE | (3<<8)) #define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8)) #define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8)) #define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1<<8)) @@ -1481,7 +1490,6 @@ struct sqlite3_io_methods { ** in wal mode after the client has finished copying pages from the wal ** file to the database file, but before the *-shm file is updated to ** record the fact that the pages have been checkpointed. -** ** **
  • [[SQLITE_FCNTL_EXTERNAL_READER]] ** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect @@ -1494,16 +1502,16 @@ struct sqlite3_io_methods { ** the database is not a wal-mode db, or if there is no such connection in any ** other process. This opcode cannot be used to detect transactions opened ** by clients within the current process, only within other processes. -** ** **
  • [[SQLITE_FCNTL_CKSM_FILE]] -** Used by the cksmvfs VFS module only. +** The [SQLITE_FCNTL_CKSM_FILE] opcode is for use internally by the +** [checksum VFS shim] only. ** **
  • [[SQLITE_FCNTL_RESET_CACHE]] ** If there is currently no transaction open on the database, and the -** database is not a temp db, then this file-control purges the contents -** of the in-memory page cache. If there is an open transaction, or if -** the db is a temp-db, it is a no-op, not an error. +** database is not a temp db, then the [SQLITE_FCNTL_RESET_CACHE] file-control +** purges the contents of the in-memory page cache. If there is an open +** transaction, or if the db is a temp-db, this opcode is a no-op, not an error. ** */ #define SQLITE_FCNTL_LOCKSTATE 1 @@ -1961,20 +1969,23 @@ SQLITE_API int sqlite3_os_end(void); ** must ensure that no other SQLite interfaces are invoked by other ** threads while sqlite3_config() is running. ** -** The sqlite3_config() interface -** may only be invoked prior to library initialization using -** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. -** ^If sqlite3_config() is called after [sqlite3_initialize()] and before -** [sqlite3_shutdown()] then it will return SQLITE_MISUSE. -** Note, however, that ^sqlite3_config() can be called as part of the -** implementation of an application-defined [sqlite3_os_init()]. -** ** The first argument to sqlite3_config() is an integer ** [configuration option] that determines ** what property of SQLite is to be configured. Subsequent arguments ** vary depending on the [configuration option] ** in the first argument. ** +** For most configuration options, the sqlite3_config() interface +** may only be invoked prior to library initialization using +** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. +** The exceptional configuration options that may be invoked at any time +** are called "anytime configuration options". +** ^If sqlite3_config() is called after [sqlite3_initialize()] and before +** [sqlite3_shutdown()] with a first argument that is not an anytime +** configuration option, then the sqlite3_config() call will return SQLITE_MISUSE. +** Note, however, that ^sqlite3_config() can be called as part of the +** implementation of an application-defined [sqlite3_os_init()]. +** ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. ** ^If the option is unknown or SQLite is unable to set the option ** then this routine returns a non-zero [error code]. @@ -2082,6 +2093,23 @@ struct sqlite3_mem_methods { ** These constants are the available integer configuration options that ** can be passed as the first argument to the [sqlite3_config()] interface. ** +** Most of the configuration options for sqlite3_config() +** will only work if invoked prior to [sqlite3_initialize()] or after +** [sqlite3_shutdown()]. The few exceptions to this rule are called +** "anytime configuration options". +** ^Calling [sqlite3_config()] with a first argument that is not an +** anytime configuration option in between calls to [sqlite3_initialize()] and +** [sqlite3_shutdown()] is a no-op that returns SQLITE_MISUSE. +** +** The set of anytime configuration options can change (by insertions +** and/or deletions) from one release of SQLite to the next. +** As of SQLite version 3.42.0, the complete set of anytime configuration +** options is: +**
      +**
    • SQLITE_CONFIG_LOG +**
    • SQLITE_CONFIG_PCACHE_HDRSZ +**
    +** ** New configuration options may be added in future releases of SQLite. ** Existing configuration options might be discontinued. Applications ** should check the return code from [sqlite3_config()] to make sure that @@ -2428,28 +2456,28 @@ struct sqlite3_mem_methods { ** compile-time option is not set, then the default maximum is 1073741824. ** */ -#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ -#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */ -#define SQLITE_CONFIG_SERIALIZED 3 /* nil */ -#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */ -#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */ -#define SQLITE_CONFIG_SCRATCH 6 /* No longer used */ -#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */ -#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */ -#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */ -#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */ -#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */ -/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ -#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ -#define SQLITE_CONFIG_PCACHE 14 /* no-op */ -#define SQLITE_CONFIG_GETPCACHE 15 /* no-op */ -#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */ -#define SQLITE_CONFIG_URI 17 /* int */ -#define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */ -#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */ +#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ +#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */ +#define SQLITE_CONFIG_SERIALIZED 3 /* nil */ +#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */ +#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */ +#define SQLITE_CONFIG_SCRATCH 6 /* No longer used */ +#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */ +#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */ +#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */ +#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */ +#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */ +/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ +#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ +#define SQLITE_CONFIG_PCACHE 14 /* no-op */ +#define SQLITE_CONFIG_GETPCACHE 15 /* no-op */ +#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */ +#define SQLITE_CONFIG_URI 17 /* int */ +#define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */ +#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */ #define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */ -#define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */ -#define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */ +#define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */ +#define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */ #define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */ #define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */ #define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */ @@ -2490,7 +2518,7 @@ struct sqlite3_mem_methods { ** configuration for a database connection can only be changed when that ** connection is not currently using lookaside memory, or in other words ** when the "current value" returned by -** [sqlite3_db_status](D,[SQLITE_CONFIG_LOOKASIDE],...) is zero. +** [sqlite3_db_status](D,[SQLITE_DBSTATUS_LOOKASIDE_USED],...) is zero. ** Any attempt to change the lookaside memory configuration when lookaside ** memory is in use leaves the configuration unchanged and returns ** [SQLITE_BUSY].)^ @@ -2640,8 +2668,12 @@ struct sqlite3_mem_methods { **
  • sqlite3_db_config(db, SQLITE_DBCONFIG_RESET_DATABASE, 0, 0); ** ** Because resetting a database is destructive and irreversible, the -** process requires the use of this obscure API and multiple steps to help -** ensure that it does not happen by accident. +** process requires the use of this obscure API and multiple steps to +** help ensure that it does not happen by accident. Because this +** feature must be capable of resetting corrupt databases, and +** shutting down virtual tables may require access to that corrupt +** storage, the library must abandon any installed virtual tables +** without calling their xDestroy() methods. ** ** [[SQLITE_DBCONFIG_DEFENSIVE]]
    SQLITE_DBCONFIG_DEFENSIVE
    **
    The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the @@ -2680,7 +2712,7 @@ struct sqlite3_mem_methods { **
    ** ** [[SQLITE_DBCONFIG_DQS_DML]] -**
    SQLITE_DBCONFIG_DQS_DML +**
    SQLITE_DBCONFIG_DQS_DML
    **
    The SQLITE_DBCONFIG_DQS_DML option activates or deactivates ** the legacy [double-quoted string literal] misfeature for DML statements ** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The @@ -2689,7 +2721,7 @@ struct sqlite3_mem_methods { **
    ** ** [[SQLITE_DBCONFIG_DQS_DDL]] -**
    SQLITE_DBCONFIG_DQS_DDL +**
    SQLITE_DBCONFIG_DQS_DDL
    **
    The SQLITE_DBCONFIG_DQS option activates or deactivates ** the legacy [double-quoted string literal] misfeature for DDL statements, ** such as CREATE TABLE and CREATE INDEX. The @@ -2698,7 +2730,7 @@ struct sqlite3_mem_methods { **
    ** ** [[SQLITE_DBCONFIG_TRUSTED_SCHEMA]] -**
    SQLITE_DBCONFIG_TRUSTED_SCHEMA +**
    SQLITE_DBCONFIG_TRUSTED_SCHEMA
    **
    The SQLITE_DBCONFIG_TRUSTED_SCHEMA option tells SQLite to ** assume that database schemas are untainted by malicious content. ** When the SQLITE_DBCONFIG_TRUSTED_SCHEMA option is disabled, SQLite @@ -2718,7 +2750,7 @@ struct sqlite3_mem_methods { **
    ** ** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]] -**
    SQLITE_DBCONFIG_LEGACY_FILE_FORMAT +**
    SQLITE_DBCONFIG_LEGACY_FILE_FORMAT
    **
    The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates ** the legacy file format flag. When activated, this flag causes all newly ** created database file to have a schema format version number (the 4-byte @@ -2727,7 +2759,7 @@ struct sqlite3_mem_methods { ** any SQLite version back to 3.0.0 ([dateof:3.0.0]). Without this setting, ** newly created databases are generally not understandable by SQLite versions ** prior to 3.3.0 ([dateof:3.3.0]). As these words are written, there -** is now scarcely any need to generated database files that are compatible +** is now scarcely any need to generate database files that are compatible ** all the way back to version 3.0.0, and so this setting is of little ** practical use, but is provided so that SQLite can continue to claim the ** ability to generate new database files that are compatible with version @@ -2736,8 +2768,40 @@ struct sqlite3_mem_methods { ** the [VACUUM] command will fail with an obscure error when attempting to ** process a table with generated columns and a descending index. This is ** not considered a bug since SQLite versions 3.3.0 and earlier do not support -** either generated columns or decending indexes. +** either generated columns or descending indexes. +**
    +** +** [[SQLITE_DBCONFIG_STMT_SCANSTATUS]] +**
    SQLITE_DBCONFIG_STMT_SCANSTATUS
    +**
    The SQLITE_DBCONFIG_STMT_SCANSTATUS option is only useful in +** SQLITE_ENABLE_STMT_SCANSTATUS builds. In this case, it sets or clears +** a flag that enables collection of the sqlite3_stmt_scanstatus_v2() +** statistics. For statistics to be collected, the flag must be set on +** the database handle both when the SQL statement is prepared and when it +** is stepped. The flag is set (collection of statistics is enabled) +** by default. This option takes two arguments: an integer and a pointer to +** an integer.. The first argument is 1, 0, or -1 to enable, disable, or +** leave unchanged the statement scanstatus option. If the second argument +** is not NULL, then the value of the statement scanstatus setting after +** processing the first argument is written into the integer that the second +** argument points to. **
    +** +** [[SQLITE_DBCONFIG_REVERSE_SCANORDER]] +**
    SQLITE_DBCONFIG_REVERSE_SCANORDER
    +**
    The SQLITE_DBCONFIG_REVERSE_SCANORDER option changes the default order +** in which tables and indexes are scanned so that the scans start at the end +** and work toward the beginning rather than starting at the beginning and +** working toward the end. Setting SQLITE_DBCONFIG_REVERSE_SCANORDER is the +** same as setting [PRAGMA reverse_unordered_selects]. This option takes +** two arguments which are an integer and a pointer to an integer. The first +** argument is 1, 0, or -1 to enable, disable, or leave unchanged the +** reverse scan order flag, respectively. If the second argument is not NULL, +** then 0 or 1 is written into the integer that the second argument points to +** depending on if the reverse scan order flag is set after processing the +** first argument. +**
    +** ** */ #define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */ @@ -2758,7 +2822,9 @@ struct sqlite3_mem_methods { #define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */ #define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */ #define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */ -#define SQLITE_DBCONFIG_MAX 1017 /* Largest DBCONFIG */ +#define SQLITE_DBCONFIG_STMT_SCANSTATUS 1018 /* int int* */ +#define SQLITE_DBCONFIG_REVERSE_SCANORDER 1019 /* int int* */ +#define SQLITE_DBCONFIG_MAX 1019 /* Largest DBCONFIG */ /* ** CAPI3REF: Enable Or Disable Extended Result Codes @@ -2980,8 +3046,13 @@ SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3*); ** ^A call to sqlite3_interrupt(D) that occurs when there are no running ** SQL statements is a no-op and has no effect on SQL statements ** that are started after the sqlite3_interrupt() call returns. +** +** ^The [sqlite3_is_interrupted(D)] interface can be used to determine whether +** or not an interrupt is currently in effect for [database connection] D. +** It returns 1 if an interrupt is currently in effect, or 0 otherwise. */ SQLITE_API void sqlite3_interrupt(sqlite3*); +SQLITE_API int sqlite3_is_interrupted(sqlite3*); /* ** CAPI3REF: Determine If An SQL Statement Is Complete @@ -3599,8 +3670,8 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*, **
    ^An SQLITE_TRACE_PROFILE callback provides approximately the same ** information as is provided by the [sqlite3_profile()] callback. ** ^The P argument is a pointer to the [prepared statement] and the -** X argument points to a 64-bit integer which is the estimated of -** the number of nanosecond that the prepared statement took to run. +** X argument points to a 64-bit integer which is approximately +** the number of nanoseconds that the prepared statement took to run. ** ^The SQLITE_TRACE_PROFILE callback is invoked when the statement finishes. ** ** [[SQLITE_TRACE_ROW]]
    SQLITE_TRACE_ROW
    @@ -3632,8 +3703,10 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*, ** M argument should be the bitwise OR-ed combination of ** zero or more [SQLITE_TRACE] constants. ** -** ^Each call to either sqlite3_trace() or sqlite3_trace_v2() overrides -** (cancels) any prior calls to sqlite3_trace() or sqlite3_trace_v2(). +** ^Each call to either sqlite3_trace(D,X,P) or sqlite3_trace_v2(D,M,X,P) +** overrides (cancels) all prior calls to sqlite3_trace(D,X,P) or +** sqlite3_trace_v2(D,M,X,P) for the [database connection] D. Each +** database connection may have at most one trace callback. ** ** ^The X callback is invoked whenever any of the events identified by ** mask M occur. ^The integer return value from the callback is currently @@ -3663,7 +3736,7 @@ SQLITE_API int sqlite3_trace_v2( ** ** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback ** function X to be invoked periodically during long running calls to -** [sqlite3_exec()], [sqlite3_step()] and [sqlite3_get_table()] for +** [sqlite3_step()] and [sqlite3_prepare()] and similar for ** database connection D. An example use for this ** interface is to keep a GUI updated during a large query. ** @@ -3688,6 +3761,13 @@ SQLITE_API int sqlite3_trace_v2( ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their ** database connections for the meaning of "modify" in this paragraph. ** +** The progress handler callback would originally only be invoked from the +** bytecode engine. It still might be invoked during [sqlite3_prepare()] +** and similar because those routines might force a reparse of the schema +** which involves running the bytecode engine. However, beginning with +** SQLite version 3.41.0, the progress handler callback might also be +** invoked directly from [sqlite3_prepare()] while analyzing and generating +** code for complex queries. */ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); @@ -3724,13 +3804,18 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); ** **
    ** ^(
    [SQLITE_OPEN_READONLY]
    -**
    The database is opened in read-only mode. If the database does not -** already exist, an error is returned.
    )^ +**
    The database is opened in read-only mode. If the database does +** not already exist, an error is returned.
    )^ ** ** ^(
    [SQLITE_OPEN_READWRITE]
    -**
    The database is opened for reading and writing if possible, or reading -** only if the file is write protected by the operating system. In either -** case the database must already exist, otherwise an error is returned.
    )^ +**
    The database is opened for reading and writing if possible, or +** reading only if the file is write protected by the operating +** system. In either case the database must already exist, otherwise +** an error is returned. For historical reasons, if opening in +** read-write mode fails due to OS-level permissions, an attempt is +** made to open it in read-only mode. [sqlite3_db_readonly()] can be +** used to determine whether the database is actually +** read-write.
    )^ ** ** ^(
    [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]
    **
    The database is opened for reading and writing, and is created if @@ -3990,7 +4075,7 @@ SQLITE_API int sqlite3_open_v2( ** as F) must be one of: **
      **
    • A database filename pointer created by the SQLite core and -** passed into the xOpen() method of a VFS implemention, or +** passed into the xOpen() method of a VFS implementation, or **
    • A filename obtained from [sqlite3_db_filename()], or **
    • A new filename constructed using [sqlite3_create_filename()]. **
    @@ -4103,7 +4188,7 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*); /* ** CAPI3REF: Create and Destroy VFS Filenames ** -** These interfces are provided for use by [VFS shim] implementations and +** These interfaces are provided for use by [VFS shim] implementations and ** are not useful outside of that context. ** ** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of @@ -4650,6 +4735,41 @@ SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); */ SQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt); +/* +** CAPI3REF: Change The EXPLAIN Setting For A Prepared Statement +** METHOD: sqlite3_stmt +** +** The sqlite3_stmt_explain(S,E) interface changes the EXPLAIN +** setting for [prepared statement] S. If E is zero, then S becomes +** a normal prepared statement. If E is 1, then S behaves as if +** its SQL text began with "[EXPLAIN]". If E is 2, then S behaves as if +** its SQL text began with "[EXPLAIN QUERY PLAN]". +** +** Calling sqlite3_stmt_explain(S,E) might cause S to be reprepared. +** SQLite tries to avoid a reprepare, but a reprepare might be necessary +** on the first transition into EXPLAIN or EXPLAIN QUERY PLAN mode. +** +** Because of the potential need to reprepare, a call to +** sqlite3_stmt_explain(S,E) will fail with SQLITE_ERROR if S cannot be +** reprepared because it was created using [sqlite3_prepare()] instead of +** the newer [sqlite3_prepare_v2()] or [sqlite3_prepare_v3()] interfaces and +** hence has no saved SQL text with which to reprepare. +** +** Changing the explain setting for a prepared statement does not change +** the original SQL text for the statement. Hence, if the SQL text originally +** began with EXPLAIN or EXPLAIN QUERY PLAN, but sqlite3_stmt_explain(S,0) +** is called to convert the statement into an ordinary statement, the EXPLAIN +** or EXPLAIN QUERY PLAN keywords will still appear in the sqlite3_sql(S) +** output, even though the statement now acts like a normal SQL statement. +** +** This routine returns SQLITE_OK if the explain mode is successfully +** changed, or an error code if the explain mode could not be changed. +** The explain mode cannot be changed while a statement is active. +** Hence, it is good practice to call [sqlite3_reset(S)] +** immediately prior to calling sqlite3_stmt_explain(S,E). +*/ +SQLITE_API int sqlite3_stmt_explain(sqlite3_stmt *pStmt, int eMode); + /* ** CAPI3REF: Determine If A Prepared Statement Has Been Reset ** METHOD: sqlite3_stmt @@ -4813,7 +4933,7 @@ typedef struct sqlite3_context sqlite3_context; ** with it may be passed. ^It is called to dispose of the BLOB or string even ** if the call to the bind API fails, except the destructor is not called if ** the third parameter is a NULL pointer or the fourth parameter is negative. -** ^ (2) The special constant, [SQLITE_STATIC], may be passsed to indicate that +** ^ (2) The special constant, [SQLITE_STATIC], may be passed to indicate that ** the application remains responsible for disposing of the object. ^In this ** case, the object and the provided pointer to it must remain valid until ** either the prepared statement is finalized or the same SQL parameter is @@ -5492,14 +5612,26 @@ SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); ** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S ** back to the beginning of its program. ** -** ^If the most recent call to [sqlite3_step(S)] for the -** [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE], -** or if [sqlite3_step(S)] has never before been called on S, -** then [sqlite3_reset(S)] returns [SQLITE_OK]. +** ^The return code from [sqlite3_reset(S)] indicates whether or not +** the previous evaluation of prepared statement S completed successfully. +** ^If [sqlite3_step(S)] has never before been called on S or if +** [sqlite3_step(S)] has not been called since the previous call +** to [sqlite3_reset(S)], then [sqlite3_reset(S)] will return +** [SQLITE_OK]. ** ** ^If the most recent call to [sqlite3_step(S)] for the ** [prepared statement] S indicated an error, then ** [sqlite3_reset(S)] returns an appropriate [error code]. +** ^The [sqlite3_reset(S)] interface might also return an [error code] +** if there were no prior errors but the process of resetting +** the prepared statement caused a new error. ^For example, if an +** [INSERT] statement with a [RETURNING] clause is only stepped one time, +** that one call to [sqlite3_step(S)] might return SQLITE_ROW but +** the overall statement might still fail and the [sqlite3_reset(S)] call +** might return SQLITE_BUSY if locking constraints prevent the +** database change from committing. Therefore, it is important that +** applications check the return code from [sqlite3_reset(S)] even if +** no prior call to [sqlite3_step(S)] indicated a problem. ** ** ^The [sqlite3_reset(S)] interface does not change the values ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. @@ -5711,10 +5843,21 @@ SQLITE_API int sqlite3_create_window_function( ** from top-level SQL, and cannot be used in VIEWs or TRIGGERs nor in ** schema structures such as [CHECK constraints], [DEFAULT clauses], ** [expression indexes], [partial indexes], or [generated columns]. -** The SQLITE_DIRECTONLY flags is a security feature which is recommended -** for all [application-defined SQL functions], and especially for functions -** that have side-effects or that could potentially leak sensitive -** information. +**

    +** The SQLITE_DIRECTONLY flag is recommended for any +** [application-defined SQL function] +** that has side-effects or that could potentially leak sensitive information. +** This will prevent attacks in which an application is tricked +** into using a database file that has had its schema surreptitiously +** modified to invoke the application-defined function in ways that are +** harmful. +**

    +** Some people say it is good practice to set SQLITE_DIRECTONLY on all +** [application-defined SQL functions], regardless of whether or not they +** are security sensitive, as doing so prevents those functions from being used +** inside of the database schema, and thus ensures that the database +** can be inspected and modified using generic tools (such as the [CLI]) +** that do not have access to the application-defined functions. **

    ** ** [[SQLITE_INNOCUOUS]]
    SQLITE_INNOCUOUS
    @@ -5855,16 +5998,6 @@ SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int6 ** then the conversion is performed. Otherwise no conversion occurs. ** The [SQLITE_INTEGER | datatype] after conversion is returned.)^ ** -** ^(The sqlite3_value_encoding(X) interface returns one of [SQLITE_UTF8], -** [SQLITE_UTF16BE], or [SQLITE_UTF16LE] according to the current encoding -** of the value X, assuming that X has type TEXT.)^ If sqlite3_value_type(X) -** returns something other than SQLITE_TEXT, then the return value from -** sqlite3_value_encoding(X) is meaningless. ^Calls to -** sqlite3_value_text(X), sqlite3_value_text16(X), sqlite3_value_text16be(X), -** sqlite3_value_text16le(X), sqlite3_value_bytes(X), or -** sqlite3_value_bytes16(X) might change the encoding of the value X and -** thus change the return from subsequent calls to sqlite3_value_encoding(X). -** ** ^Within the [xUpdate] method of a [virtual table], the ** sqlite3_value_nochange(X) interface returns true if and only if ** the column corresponding to X is unchanged by the UPDATE operation @@ -5929,6 +6062,27 @@ SQLITE_API int sqlite3_value_type(sqlite3_value*); SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*); SQLITE_API int sqlite3_value_nochange(sqlite3_value*); SQLITE_API int sqlite3_value_frombind(sqlite3_value*); + +/* +** CAPI3REF: Report the internal text encoding state of an sqlite3_value object +** METHOD: sqlite3_value +** +** ^(The sqlite3_value_encoding(X) interface returns one of [SQLITE_UTF8], +** [SQLITE_UTF16BE], or [SQLITE_UTF16LE] according to the current text encoding +** of the value X, assuming that X has type TEXT.)^ If sqlite3_value_type(X) +** returns something other than SQLITE_TEXT, then the return value from +** sqlite3_value_encoding(X) is meaningless. ^Calls to +** [sqlite3_value_text(X)], [sqlite3_value_text16(X)], [sqlite3_value_text16be(X)], +** [sqlite3_value_text16le(X)], [sqlite3_value_bytes(X)], or +** [sqlite3_value_bytes16(X)] might change the encoding of the value X and +** thus change the return from subsequent calls to sqlite3_value_encoding(X). +** +** This routine is intended for used by applications that test and validate +** the SQLite implementation. This routine is inquiring about the opaque +** internal state of an [sqlite3_value] object. Ordinary applications should +** not need to know what the internal state of an sqlite3_value object is and +** hence should not need to use this interface. +*/ SQLITE_API int sqlite3_value_encoding(sqlite3_value*); /* @@ -6465,6 +6619,13 @@ SQLITE_API void sqlite3_activate_cerod( ** of the default VFS is not implemented correctly, or not implemented at ** all, then the behavior of sqlite3_sleep() may deviate from the description ** in the previous paragraphs. +** +** If a negative argument is passed to sqlite3_sleep() the results vary by +** VFS and operating system. Some system treat a negative argument as an +** instruction to sleep forever. Others understand it to mean do not sleep +** at all. ^In SQLite version 3.42.0 and later, a negative +** argument passed into sqlite3_sleep() is changed to zero before it is relayed +** down into the xSleep method of the VFS. */ SQLITE_API int sqlite3_sleep(int); @@ -7309,15 +7470,6 @@ SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); */ SQLITE_API void sqlite3_reset_auto_extension(void); -/* -** The interface to the virtual-table mechanism is currently considered -** to be experimental. The interface might change in incompatible ways. -** If this is a problem for you, do not use the interface at this time. -** -** When the virtual-table mechanism stabilizes, we will declare the -** interface fixed, support it indefinitely, and remove this comment. -*/ - /* ** Structures used by the virtual table interface */ @@ -7436,10 +7588,10 @@ struct sqlite3_module { ** when the omit flag is true there is no guarantee that the constraint will ** not be checked again using byte code.)^ ** -** ^The idxNum and idxPtr values are recorded and passed into the +** ^The idxNum and idxStr values are recorded and passed into the ** [xFilter] method. -** ^[sqlite3_free()] is used to free idxPtr if and only if -** needToFreeIdxPtr is true. +** ^[sqlite3_free()] is used to free idxStr if and only if +** needToFreeIdxStr is true. ** ** ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in ** the correct order to satisfy the ORDER BY clause so that no separate @@ -7559,7 +7711,7 @@ struct sqlite3_index_info { ** the [sqlite3_vtab_collation()] interface. For most real-world virtual ** tables, the collating sequence of constraints does not matter (for example ** because the constraints are numeric) and so the sqlite3_vtab_collation() -** interface is no commonly needed. +** interface is not commonly needed. */ #define SQLITE_INDEX_CONSTRAINT_EQ 2 #define SQLITE_INDEX_CONSTRAINT_GT 4 @@ -7718,16 +7870,6 @@ SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL); */ SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); -/* -** The interface to the virtual-table mechanism defined above (back up -** to a comment remarkably similar to this one) is currently considered -** to be experimental. The interface might change in incompatible ways. -** If this is a problem for you, do not use the interface at this time. -** -** When the virtual-table mechanism stabilizes, we will declare the -** interface fixed, support it indefinitely, and remove this comment. -*/ - /* ** CAPI3REF: A Handle To An Open BLOB ** KEYWORDS: {BLOB handle} {BLOB handles} @@ -8111,9 +8253,9 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*); ** is undefined if the mutex is not currently entered by the ** calling thread or is not currently allocated. ** -** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or -** sqlite3_mutex_leave() is a NULL pointer, then all three routines -** behave as no-ops. +** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), +** sqlite3_mutex_leave(), or sqlite3_mutex_free() is a NULL pointer, +** then any of the four routines behaves as a no-op. ** ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. */ @@ -8383,7 +8525,8 @@ SQLITE_API int sqlite3_test_control(int op, ...); #define SQLITE_TESTCTRL_TRACEFLAGS 31 #define SQLITE_TESTCTRL_TUNE 32 #define SQLITE_TESTCTRL_LOGEST 33 -#define SQLITE_TESTCTRL_LAST 33 /* Largest TESTCTRL */ +#define SQLITE_TESTCTRL_USELONGDOUBLE 34 +#define SQLITE_TESTCTRL_LAST 34 /* Largest TESTCTRL */ /* ** CAPI3REF: SQL Keyword Checking @@ -9415,8 +9558,8 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p); ** blocked connection already has a registered unlock-notify callback, ** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is ** called with a NULL pointer as its second argument, then any existing -** unlock-notify callback is canceled. ^The blocked connections -** unlock-notify callback may also be canceled by closing the blocked +** unlock-notify callback is cancelled. ^The blocked connections +** unlock-notify callback may also be cancelled by closing the blocked ** connection using [sqlite3_close()]. ** ** The unlock-notify callback is not reentrant. If an application invokes @@ -9839,7 +9982,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); ** [[SQLITE_VTAB_DIRECTONLY]]
    SQLITE_VTAB_DIRECTONLY
    **
    Calls of the form ** [sqlite3_vtab_config](db,SQLITE_VTAB_DIRECTONLY) from within the -** the [xConnect] or [xCreate] methods of a [virtual table] implmentation +** the [xConnect] or [xCreate] methods of a [virtual table] implementation ** prohibits that virtual table from being used from within triggers and ** views. **
    @@ -9847,18 +9990,28 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); ** [[SQLITE_VTAB_INNOCUOUS]]
    SQLITE_VTAB_INNOCUOUS
    **
    Calls of the form ** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the -** the [xConnect] or [xCreate] methods of a [virtual table] implmentation +** the [xConnect] or [xCreate] methods of a [virtual table] implementation ** identify that virtual table as being safe to use from within triggers ** and views. Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the ** virtual table can do no serious harm even if it is controlled by a ** malicious hacker. Developers should avoid setting the SQLITE_VTAB_INNOCUOUS ** flag unless absolutely necessary. **
    +** +** [[SQLITE_VTAB_USES_ALL_SCHEMAS]]
    SQLITE_VTAB_USES_ALL_SCHEMAS
    +**
    Calls of the form +** [sqlite3_vtab_config](db,SQLITE_VTAB_USES_ALL_SCHEMA) from within the +** the [xConnect] or [xCreate] methods of a [virtual table] implementation +** instruct the query planner to begin at least a read transaction on +** all schemas ("main", "temp", and any ATTACH-ed databases) whenever the +** virtual table is used. +**
    **
    */ #define SQLITE_VTAB_CONSTRAINT_SUPPORT 1 #define SQLITE_VTAB_INNOCUOUS 2 #define SQLITE_VTAB_DIRECTONLY 3 +#define SQLITE_VTAB_USES_ALL_SCHEMAS 4 /* ** CAPI3REF: Determine The Virtual Table Conflict Policy @@ -9931,7 +10084,7 @@ SQLITE_API int sqlite3_vtab_nochange(sqlite3_context*); **
  • Otherwise, "BINARY" is returned. ** */ -SQLITE_API SQLITE_EXPERIMENTAL const char *sqlite3_vtab_collation(sqlite3_index_info*,int); +SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int); /* ** CAPI3REF: Determine if a virtual table query is DISTINCT @@ -10019,7 +10172,7 @@ SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info*); ** communicated to the xBestIndex method as a ** [SQLITE_INDEX_CONSTRAINT_EQ] constraint.)^ If xBestIndex wants to use ** this constraint, it must set the corresponding -** aConstraintUsage[].argvIndex to a postive integer. ^(Then, under +** aConstraintUsage[].argvIndex to a positive integer. ^(Then, under ** the usual mode of handling IN operators, SQLite generates [bytecode] ** that invokes the [xFilter|xFilter() method] once for each value ** on the right-hand side of the IN operator.)^ Thus the virtual table @@ -10088,21 +10241,20 @@ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle); ** is undefined and probably harmful. ** ** The X parameter in a call to sqlite3_vtab_in_first(X,P) or -** sqlite3_vtab_in_next(X,P) must be one of the parameters to the +** sqlite3_vtab_in_next(X,P) should be one of the parameters to the ** xFilter method which invokes these routines, and specifically ** a parameter that was previously selected for all-at-once IN constraint ** processing use the [sqlite3_vtab_in()] interface in the ** [xBestIndex|xBestIndex method]. ^(If the X parameter is not ** an xFilter argument that was selected for all-at-once IN constraint -** processing, then these routines return [SQLITE_MISUSE])^ or perhaps -** exhibit some other undefined or harmful behavior. +** processing, then these routines return [SQLITE_ERROR].)^ ** ** ^(Use these routines to access all values on the right-hand side ** of the IN constraint using code like the following: ** **

     **    for(rc=sqlite3_vtab_in_first(pList, &pVal);
    -**        rc==SQLITE_OK && pVal
    +**        rc==SQLITE_OK && pVal;
     **        rc=sqlite3_vtab_in_next(pList, &pVal)
     **    ){
     **      // do something with pVal
    @@ -10200,6 +10352,10 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
     ** managed by the prepared statement S and will be automatically freed when
     ** S is finalized.
     **
    +** Not all values are available for all query elements. When a value is
    +** not available, the output variable is set to -1 if the value is numeric,
    +** or to NULL if it is a string (SQLITE_SCANSTAT_NAME).
    +**
     ** 
    ** [[SQLITE_SCANSTAT_NLOOP]]
    SQLITE_SCANSTAT_NLOOP
    **
    ^The [sqlite3_int64] variable pointed to by the V parameter will be @@ -10227,12 +10383,24 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value ** ** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN] ** description for the X-th loop. ** -** [[SQLITE_SCANSTAT_SELECTID]]
    SQLITE_SCANSTAT_SELECT
    +** [[SQLITE_SCANSTAT_SELECTID]]
    SQLITE_SCANSTAT_SELECTID
    **
    ^The "int" variable pointed to by the V parameter will be set to the -** "select-id" for the X-th loop. The select-id identifies which query or -** subquery the loop is part of. The main query has a select-id of zero. -** The select-id is the same value as is output in the first column -** of an [EXPLAIN QUERY PLAN] query. +** id for the X-th query plan element. The id value is unique within the +** statement. The select-id is the same value as is output in the first +** column of an [EXPLAIN QUERY PLAN] query. +** +** [[SQLITE_SCANSTAT_PARENTID]]
    SQLITE_SCANSTAT_PARENTID
    +**
    The "int" variable pointed to by the V parameter will be set to the +** the id of the parent of the current query element, if applicable, or +** to zero if the query element has no parent. This is the same value as +** returned in the second column of an [EXPLAIN QUERY PLAN] query. +** +** [[SQLITE_SCANSTAT_NCYCLE]]
    SQLITE_SCANSTAT_NCYCLE
    +**
    The sqlite3_int64 output value is set to the number of cycles, +** according to the processor time-stamp counter, that elapsed while the +** query element was being processed. This value is not available for +** all query elements - if it is unavailable the output variable is +** set to -1. **
    */ #define SQLITE_SCANSTAT_NLOOP 0 @@ -10241,12 +10409,14 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value ** #define SQLITE_SCANSTAT_NAME 3 #define SQLITE_SCANSTAT_EXPLAIN 4 #define SQLITE_SCANSTAT_SELECTID 5 +#define SQLITE_SCANSTAT_PARENTID 6 +#define SQLITE_SCANSTAT_NCYCLE 7 /* ** CAPI3REF: Prepared Statement Scan Status ** METHOD: sqlite3_stmt ** -** This interface returns information about the predicted and measured +** These interfaces return information about the predicted and measured ** performance for pStmt. Advanced applications can use this ** interface to compare the predicted and the measured performance and ** issue warnings and/or rerun [ANALYZE] if discrepancies are found. @@ -10257,19 +10427,25 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value ** ** ** The "iScanStatusOp" parameter determines which status information to return. ** The "iScanStatusOp" must be one of the [scanstatus options] or the behavior -** of this interface is undefined. -** ^The requested measurement is written into a variable pointed to by -** the "pOut" parameter. -** Parameter "idx" identifies the specific loop to retrieve statistics for. -** Loops are numbered starting from zero. ^If idx is out of range - less than -** zero or greater than or equal to the total number of loops used to implement -** the statement - a non-zero value is returned and the variable that pOut -** points to is unchanged. -** -** ^Statistics might not be available for all loops in all statements. ^In cases -** where there exist loops with no available statistics, this function behaves -** as if the loop did not exist - it returns non-zero and leave the variable -** that pOut points to unchanged. +** of this interface is undefined. ^The requested measurement is written into +** a variable pointed to by the "pOut" parameter. +** +** The "flags" parameter must be passed a mask of flags. At present only +** one flag is defined - SQLITE_SCANSTAT_COMPLEX. If SQLITE_SCANSTAT_COMPLEX +** is specified, then status information is available for all elements +** of a query plan that are reported by "EXPLAIN QUERY PLAN" output. If +** SQLITE_SCANSTAT_COMPLEX is not specified, then only query plan elements +** that correspond to query loops (the "SCAN..." and "SEARCH..." elements of +** the EXPLAIN QUERY PLAN output) are available. Invoking API +** sqlite3_stmt_scanstatus() is equivalent to calling +** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter. +** +** Parameter "idx" identifies the specific query element to retrieve statistics +** for. Query elements are numbered starting from zero. A value of -1 may be +** to query for statistics regarding the entire query. ^If idx is out of range +** - less than -1 or greater than or equal to the total number of query +** elements used to implement the statement - a non-zero value is returned and +** the variable that pOut points to is unchanged. ** ** See also: [sqlite3_stmt_scanstatus_reset()] */ @@ -10279,6 +10455,19 @@ SQLITE_API int sqlite3_stmt_scanstatus( int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ void *pOut /* Result written here */ ); +SQLITE_API int sqlite3_stmt_scanstatus_v2( + sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ + int idx, /* Index of loop to report on */ + int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ + int flags, /* Mask of flags defined below */ + void *pOut /* Result written here */ +); + +/* +** CAPI3REF: Prepared Statement Scan Status +** KEYWORDS: {scan status flags} +*/ +#define SQLITE_SCANSTAT_COMPLEX 0x0001 /* ** CAPI3REF: Zero Scan-Status Counters @@ -10369,6 +10558,10 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*); ** function is not defined for operations on WITHOUT ROWID tables, or for ** DELETE operations on rowid tables. ** +** ^The sqlite3_preupdate_hook(D,C,P) function returns the P argument from +** the previous call on the same [database connection] D, or NULL for +** the first call on D. +** ** The [sqlite3_preupdate_old()], [sqlite3_preupdate_new()], ** [sqlite3_preupdate_count()], and [sqlite3_preupdate_depth()] interfaces ** provide additional information about a preupdate event. These routines @@ -10408,7 +10601,7 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*); ** When the [sqlite3_blob_write()] API is used to update a blob column, ** the pre-update hook is invoked with SQLITE_DELETE. This is because the ** in this case the new values are not available. In this case, when a -** callback made with op==SQLITE_DELETE is actuall a write using the +** callback made with op==SQLITE_DELETE is actually a write using the ** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns ** the index of the column being written. In other cases, where the ** pre-update hook is being invoked for some other reason, including a @@ -10774,6 +10967,19 @@ SQLITE_API int sqlite3_deserialize( # undef double #endif +#if defined(__wasi__) +# undef SQLITE_WASI +# define SQLITE_WASI 1 +# undef SQLITE_OMIT_WAL +# define SQLITE_OMIT_WAL 1/* because it requires shared memory APIs */ +# ifndef SQLITE_OMIT_LOAD_EXTENSION +# define SQLITE_OMIT_LOAD_EXTENSION +# endif +# ifndef SQLITE_THREADSAFE +# define SQLITE_THREADSAFE 0 +# endif +#endif + #if 0 } /* End of the 'extern "C"' block */ #endif @@ -10980,16 +11186,20 @@ SQLITE_API int sqlite3session_create( SQLITE_API void sqlite3session_delete(sqlite3_session *pSession); /* -** CAPIREF: Conigure a Session Object +** CAPI3REF: Configure a Session Object ** METHOD: sqlite3_session ** ** This method is used to configure a session object after it has been -** created. At present the only valid value for the second parameter is -** [SQLITE_SESSION_OBJCONFIG_SIZE]. +** created. At present the only valid values for the second parameter are +** [SQLITE_SESSION_OBJCONFIG_SIZE] and [SQLITE_SESSION_OBJCONFIG_ROWID]. ** -** Arguments for sqlite3session_object_config() +*/ +SQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg); + +/* +** CAPI3REF: Options for sqlite3session_object_config ** -** The following values may passed as the the 4th parameter to +** The following values may passed as the the 2nd parameter to ** sqlite3session_object_config(). ** **
    SQLITE_SESSION_OBJCONFIG_SIZE
    @@ -11005,12 +11215,21 @@ SQLITE_API void sqlite3session_delete(sqlite3_session *pSession); ** ** It is an error (SQLITE_MISUSE) to attempt to modify this setting after ** the first table has been attached to the session object. +** +**
    SQLITE_SESSION_OBJCONFIG_ROWID
    +** This option is used to set, clear or query the flag that enables +** collection of data for tables with no explicit PRIMARY KEY. +** +** Normally, tables with no explicit PRIMARY KEY are simply ignored +** by the sessions module. However, if this flag is set, it behaves +** as if such tables have a column "_rowid_ INTEGER PRIMARY KEY" inserted +** as their leftmost columns. +** +** It is an error (SQLITE_MISUSE) to attempt to modify this setting after +** the first table has been attached to the session object. */ -SQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg); - -/* -*/ -#define SQLITE_SESSION_OBJCONFIG_SIZE 1 +#define SQLITE_SESSION_OBJCONFIG_SIZE 1 +#define SQLITE_SESSION_OBJCONFIG_ROWID 2 /* ** CAPI3REF: Enable Or Disable A Session Object @@ -12143,9 +12362,23 @@ SQLITE_API int sqlite3changeset_apply_v2( ** Invert the changeset before applying it. This is equivalent to inverting ** a changeset using sqlite3changeset_invert() before applying it. It is ** an error to specify this flag with a patchset. +** +**
    SQLITE_CHANGESETAPPLY_IGNORENOOP
    +** Do not invoke the conflict handler callback for any changes that +** would not actually modify the database even if they were applied. +** Specifically, this means that the conflict handler is not invoked +** for: +**
      +**
    • a delete change if the row being deleted cannot be found, +**
    • an update change if the modified fields are already set to +** their new values in the conflicting row, or +**
    • an insert change if all fields of the conflicting row match +** the row being inserted. +**
    */ #define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001 #define SQLITE_CHANGESETAPPLY_INVERT 0x0002 +#define SQLITE_CHANGESETAPPLY_IGNORENOOP 0x0004 /* ** CAPI3REF: Constants Passed To The Conflict Handler @@ -12886,7 +13119,7 @@ struct Fts5PhraseIter { ** See xPhraseFirstColumn above. */ struct Fts5ExtensionApi { - int iVersion; /* Currently always set to 3 */ + int iVersion; /* Currently always set to 2 */ void *(*xUserData)(Fts5Context*); @@ -13115,8 +13348,8 @@ struct Fts5ExtensionApi { ** as separate queries of the FTS index are required for each synonym. ** ** When using methods (2) or (3), it is important that the tokenizer only -** provide synonyms when tokenizing document text (method (2)) or query -** text (method (3)), not both. Doing so will not cause any errors, but is +** provide synonyms when tokenizing document text (method (3)) or query +** text (method (2)), not both. Doing so will not cause any errors, but is ** inefficient. */ typedef struct Fts5Tokenizer Fts5Tokenizer; @@ -13164,7 +13397,7 @@ struct fts5_api { int (*xCreateTokenizer)( fts5_api *pApi, const char *zName, - void *pContext, + void *pUserData, fts5_tokenizer *pTokenizer, void (*xDestroy)(void*) ); @@ -13173,7 +13406,7 @@ struct fts5_api { int (*xFindTokenizer)( fts5_api *pApi, const char *zName, - void **ppContext, + void **ppUserData, fts5_tokenizer *pTokenizer ); @@ -13181,7 +13414,7 @@ struct fts5_api { int (*xCreateFunction)( fts5_api *pApi, const char *zName, - void *pContext, + void *pUserData, fts5_extension_function xFunction, void (*xDestroy)(void*) ); @@ -13292,7 +13525,7 @@ struct fts5_api { ** level of recursion for each term. A stack overflow can result ** if the number of terms is too large. In practice, most SQL ** never has more than 3 or 4 terms. Use a value of 0 to disable -** any limit on the number of terms in a compount SELECT. +** any limit on the number of terms in a compound SELECT. */ #ifndef SQLITE_MAX_COMPOUND_SELECT # define SQLITE_MAX_COMPOUND_SELECT 500 @@ -13442,8 +13675,8 @@ struct fts5_api { #endif /* -** WAL mode depends on atomic aligned 32-bit loads and stores in a few -** places. The following macros try to make this explicit. +** A few places in the code require atomic load/store of aligned +** integer values. */ #ifndef __has_extension # define __has_extension(x) 0 /* compatibility with non-clang compilers */ @@ -13499,15 +13732,22 @@ struct fts5_api { #endif /* -** A macro to hint to the compiler that a function should not be +** Macros to hint to the compiler that a function should or should not be ** inlined. */ #if defined(__GNUC__) # define SQLITE_NOINLINE __attribute__((noinline)) +# define SQLITE_INLINE __attribute__((always_inline)) inline #elif defined(_MSC_VER) && _MSC_VER>=1310 # define SQLITE_NOINLINE __declspec(noinline) +# define SQLITE_INLINE __forceinline #else # define SQLITE_NOINLINE +# define SQLITE_INLINE +#endif +#if defined(SQLITE_COVERAGE_TEST) || defined(__STRICT_ANSI__) +# undef SQLITE_INLINE +# define SQLITE_INLINE #endif /* @@ -14325,15 +14565,9 @@ typedef INT8_TYPE i8; /* 1-byte signed integer */ /* ** The datatype used to store estimates of the number of rows in a -** table or index. This is an unsigned integer type. For 99.9% of -** the world, a 32-bit integer is sufficient. But a 64-bit integer -** can be used at compile-time if desired. +** table or index. */ -#ifdef SQLITE_64BIT_STATS - typedef u64 tRowcnt; /* 64-bit only if requested at compile-time */ -#else - typedef u32 tRowcnt; /* 32-bit is the default */ -#endif +typedef u64 tRowcnt; /* ** Estimated quantities used for query planning are stored as 16-bit @@ -14394,8 +14628,31 @@ typedef INT16_TYPE LogEst; ** the end of buffer S. This macro returns true if P points to something ** contained within the buffer S. */ -#define SQLITE_WITHIN(P,S,E) (((uptr)(P)>=(uptr)(S))&&((uptr)(P)<(uptr)(E))) +#define SQLITE_WITHIN(P,S,E) (((uptr)(P)>=(uptr)(S))&&((uptr)(P)<(uptr)(E))) +/* +** P is one byte past the end of a large buffer. Return true if a span of bytes +** between S..E crosses the end of that buffer. In other words, return true +** if the sub-buffer S..E-1 overflows the buffer whose last byte is P-1. +** +** S is the start of the span. E is one byte past the end of end of span. +** +** P +** |-----------------| FALSE +** |-------| +** S E +** +** P +** |-----------------| +** |-------| TRUE +** S E +** +** P +** |-----------------| +** |-------| FALSE +** S E +*/ +#define SQLITE_OVERFLOW(P,S,E) (((uptr)(S)<(uptr)(P))&&((uptr)(E)>(uptr)(P))) /* ** Macros to determine whether the machine is big or little endian, @@ -14479,9 +14736,9 @@ typedef INT16_TYPE LogEst; ** pointers. In that case, only verify 4-byte alignment. */ #ifdef SQLITE_4_BYTE_ALIGNED_MALLOC -# define EIGHT_BYTE_ALIGNMENT(X) ((((char*)(X) - (char*)0)&3)==0) +# define EIGHT_BYTE_ALIGNMENT(X) ((((uptr)(X) - (uptr)0)&3)==0) #else -# define EIGHT_BYTE_ALIGNMENT(X) ((((char*)(X) - (char*)0)&7)==0) +# define EIGHT_BYTE_ALIGNMENT(X) ((((uptr)(X) - (uptr)0)&7)==0) #endif /* @@ -14535,15 +14792,38 @@ SQLITE_PRIVATE u32 sqlite3TreeTrace; && (defined(SQLITE_TEST) || defined(SQLITE_ENABLE_SELECTTRACE) \ || defined(SQLITE_ENABLE_TREETRACE)) # define TREETRACE_ENABLED 1 -# define SELECTTRACE(K,P,S,X) \ +# define TREETRACE(K,P,S,X) \ if(sqlite3TreeTrace&(K)) \ sqlite3DebugPrintf("%u/%d/%p: ",(S)->selId,(P)->addrExplain,(S)),\ sqlite3DebugPrintf X #else -# define SELECTTRACE(K,P,S,X) +# define TREETRACE(K,P,S,X) # define TREETRACE_ENABLED 0 #endif +/* TREETRACE flag meanings: +** +** 0x00000001 Beginning and end of SELECT processing +** 0x00000002 WHERE clause processing +** 0x00000004 Query flattener +** 0x00000008 Result-set wildcard expansion +** 0x00000010 Query name resolution +** 0x00000020 Aggregate analysis +** 0x00000040 Window functions +** 0x00000080 Generated column names +** 0x00000100 Move HAVING terms into WHERE +** 0x00000200 Count-of-view optimization +** 0x00000400 Compound SELECT processing +** 0x00000800 Drop superfluous ORDER BY +** 0x00001000 LEFT JOIN simplifies to JOIN +** 0x00002000 Constant propagation +** 0x00004000 Push-down optimization +** 0x00008000 After all FROM-clause analysis +** 0x00010000 Beginning of DELETE/INSERT/UPDATE processing +** 0x00020000 Transform DISTINCT into GROUP BY +** 0x00040000 SELECT tree dump after all code has been generated +*/ + /* ** Macros for "wheretrace" */ @@ -14556,6 +14836,36 @@ SQLITE_PRIVATE u32 sqlite3WhereTrace; # define WHERETRACE(K,X) #endif +/* +** Bits for the sqlite3WhereTrace mask: +** +** (---any--) Top-level block structure +** 0x-------F High-level debug messages +** 0x----FFF- More detail +** 0xFFFF---- Low-level debug messages +** +** 0x00000001 Code generation +** 0x00000002 Solver +** 0x00000004 Solver costs +** 0x00000008 WhereLoop inserts +** +** 0x00000010 Display sqlite3_index_info xBestIndex calls +** 0x00000020 Range an equality scan metrics +** 0x00000040 IN operator decisions +** 0x00000080 WhereLoop cost adjustements +** 0x00000100 +** 0x00000200 Covering index decisions +** 0x00000400 OR optimization +** 0x00000800 Index scanner +** 0x00001000 More details associated with code generation +** 0x00002000 +** 0x00004000 Show all WHERE terms at key points +** 0x00008000 Show the full SELECT statement at key places +** +** 0x00010000 Show more detail when printing WHERE terms +** 0x00020000 Show WHERE terms returned from whereScanNext() +*/ + /* ** An instance of the following structure is used to store the busy-handler @@ -14576,7 +14886,7 @@ struct BusyHandler { /* ** Name of table that holds the database schema. ** -** The PREFERRED names are used whereever possible. But LEGACY is also +** The PREFERRED names are used wherever possible. But LEGACY is also ** used for backwards compatibility. ** ** 1. Queries can use either the PREFERRED or the LEGACY names @@ -14690,6 +15000,7 @@ typedef struct Schema Schema; typedef struct Expr Expr; typedef struct ExprList ExprList; typedef struct FKey FKey; +typedef struct FpDecode FpDecode; typedef struct FuncDestructor FuncDestructor; typedef struct FuncDef FuncDef; typedef struct FuncDefHash FuncDefHash; @@ -14708,6 +15019,7 @@ typedef struct Parse Parse; typedef struct ParseCleanup ParseCleanup; typedef struct PreUpdate PreUpdate; typedef struct PrintfArguments PrintfArguments; +typedef struct RCStr RCStr; typedef struct RenameToken RenameToken; typedef struct Returning Returning; typedef struct RowSet RowSet; @@ -15345,6 +15657,10 @@ SQLITE_PRIVATE void sqlite3PagerRefdump(Pager*); # define enable_simulated_io_errors() #endif +#if defined(SQLITE_USE_SEH) && !defined(SQLITE_OMIT_WAL) +SQLITE_PRIVATE int sqlite3PagerWalSystemErrno(Pager*); +#endif + #endif /* SQLITE_PAGER_H */ /************** End of pager.h ***********************************************/ @@ -15536,7 +15852,7 @@ SQLITE_PRIVATE int sqlite3BtreeNewDb(Btree *p); ** reduce network bandwidth. ** ** Note that BTREE_HINT_FLAGS with BTREE_BULKLOAD is the only hint used by -** standard SQLite. The other hints are provided for extentions that use +** standard SQLite. The other hints are provided for extensions that use ** the SQLite parser and code generator but substitute their own storage ** engine. */ @@ -15674,15 +15990,21 @@ SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor*, int flags); SQLITE_PRIVATE i64 sqlite3BtreeIntegerKey(BtCursor*); SQLITE_PRIVATE void sqlite3BtreeCursorPin(BtCursor*); SQLITE_PRIVATE void sqlite3BtreeCursorUnpin(BtCursor*); -#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC SQLITE_PRIVATE i64 sqlite3BtreeOffset(BtCursor*); -#endif SQLITE_PRIVATE int sqlite3BtreePayload(BtCursor*, u32 offset, u32 amt, void*); SQLITE_PRIVATE const void *sqlite3BtreePayloadFetch(BtCursor*, u32 *pAmt); SQLITE_PRIVATE u32 sqlite3BtreePayloadSize(BtCursor*); SQLITE_PRIVATE sqlite3_int64 sqlite3BtreeMaxRecordSize(BtCursor*); -SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(sqlite3*,Btree*,Pgno*aRoot,int nRoot,int,int*); +SQLITE_PRIVATE int sqlite3BtreeIntegrityCheck( + sqlite3 *db, /* Database connection that is running the check */ + Btree *p, /* The btree to be checked */ + Pgno *aRoot, /* An array of root pages numbers for individual trees */ + int nRoot, /* Number of entries in aRoot[] */ + int mxErr, /* Stop reporting errors after this many */ + int *pnErr, /* OUT: Write number of errors seen to this variable */ + char **pzOut /* OUT: Write the error message string here */ +); SQLITE_PRIVATE struct Pager *sqlite3BtreePager(Btree*); SQLITE_PRIVATE i64 sqlite3BtreeRowCountEst(BtCursor*); @@ -15839,14 +16161,14 @@ struct VdbeOp { #ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS char *zComment; /* Comment to improve readability */ #endif -#ifdef VDBE_PROFILE - u32 cnt; /* Number of times this instruction was executed */ - u64 cycles; /* Total time spent executing this instruction */ -#endif #ifdef SQLITE_VDBE_COVERAGE u32 iSrcLine; /* Source-code line that generated this opcode ** with flags in the upper 8 bits */ #endif +#if defined(SQLITE_ENABLE_STMT_SCANSTATUS) || defined(VDBE_PROFILE) + u64 nExec; + u64 nCycle; +#endif }; typedef struct VdbeOp VdbeOp; @@ -16137,29 +16459,30 @@ typedef struct VdbeOpList VdbeOpList; #define OPFLG_IN3 0x08 /* in3: P3 is an input */ #define OPFLG_OUT2 0x10 /* out2: P2 is an output */ #define OPFLG_OUT3 0x20 /* out3: P3 is an output */ +#define OPFLG_NCYCLE 0x40 /* ncycle:Cycles count against P1 */ #define OPFLG_INITIALIZER {\ -/* 0 */ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,\ +/* 0 */ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x41, 0x00,\ /* 8 */ 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0x01, 0x01,\ -/* 16 */ 0x03, 0x03, 0x01, 0x12, 0x01, 0x09, 0x09, 0x09,\ -/* 24 */ 0x09, 0x01, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,\ -/* 32 */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\ -/* 40 */ 0x01, 0x01, 0x01, 0x26, 0x26, 0x01, 0x23, 0x0b,\ +/* 16 */ 0x03, 0x03, 0x01, 0x12, 0x01, 0x49, 0x49, 0x49,\ +/* 24 */ 0x49, 0x01, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49,\ +/* 32 */ 0x41, 0x01, 0x41, 0x41, 0x41, 0x01, 0x41, 0x41,\ +/* 40 */ 0x41, 0x41, 0x41, 0x26, 0x26, 0x41, 0x23, 0x0b,\ /* 48 */ 0x01, 0x01, 0x03, 0x03, 0x0b, 0x0b, 0x0b, 0x0b,\ -/* 56 */ 0x0b, 0x0b, 0x01, 0x03, 0x03, 0x03, 0x01, 0x01,\ +/* 56 */ 0x0b, 0x0b, 0x01, 0x03, 0x03, 0x03, 0x01, 0x41,\ /* 64 */ 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x00, 0x10,\ /* 72 */ 0x10, 0x10, 0x00, 0x10, 0x00, 0x10, 0x10, 0x00,\ /* 80 */ 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x02, 0x02,\ -/* 88 */ 0x02, 0x00, 0x00, 0x12, 0x1e, 0x20, 0x00, 0x00,\ -/* 96 */ 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x26, 0x26,\ +/* 88 */ 0x02, 0x00, 0x00, 0x12, 0x1e, 0x20, 0x40, 0x00,\ +/* 96 */ 0x00, 0x00, 0x10, 0x10, 0x00, 0x40, 0x26, 0x26,\ /* 104 */ 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26,\ -/* 112 */ 0x00, 0x00, 0x12, 0x00, 0x00, 0x10, 0x00, 0x00,\ -/* 120 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10,\ -/* 128 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,\ -/* 136 */ 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x10, 0x00,\ +/* 112 */ 0x40, 0x00, 0x12, 0x40, 0x40, 0x10, 0x40, 0x00,\ +/* 120 */ 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x10, 0x10,\ +/* 128 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x50,\ +/* 136 */ 0x00, 0x40, 0x04, 0x04, 0x00, 0x40, 0x50, 0x40,\ /* 144 */ 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,\ /* 152 */ 0x00, 0x10, 0x00, 0x00, 0x06, 0x10, 0x00, 0x04,\ /* 160 */ 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ -/* 168 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,\ +/* 168 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x50, 0x40,\ /* 176 */ 0x00, 0x10, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00,\ /* 184 */ 0x00, 0x00, 0x00,} @@ -16214,14 +16537,20 @@ SQLITE_PRIVATE void sqlite3VdbeNoJumpsOutsideSubrtn(Vdbe*,int,int,int); #endif SQLITE_PRIVATE VdbeOp *sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp,int iLineno); #ifndef SQLITE_OMIT_EXPLAIN -SQLITE_PRIVATE void sqlite3VdbeExplain(Parse*,u8,const char*,...); +SQLITE_PRIVATE int sqlite3VdbeExplain(Parse*,u8,const char*,...); SQLITE_PRIVATE void sqlite3VdbeExplainPop(Parse*); SQLITE_PRIVATE int sqlite3VdbeExplainParent(Parse*); # define ExplainQueryPlan(P) sqlite3VdbeExplain P +# ifdef SQLITE_ENABLE_STMT_SCANSTATUS +# define ExplainQueryPlan2(V,P) (V = sqlite3VdbeExplain P) +# else +# define ExplainQueryPlan2(V,P) ExplainQueryPlan(P) +# endif # define ExplainQueryPlanPop(P) sqlite3VdbeExplainPop(P) # define ExplainQueryPlanParent(P) sqlite3VdbeExplainParent(P) #else # define ExplainQueryPlan(P) +# define ExplainQueryPlan2(V,P) # define ExplainQueryPlanPop(P) # define ExplainQueryPlanParent(P) 0 # define sqlite3ExplainBreakpoint(A,B) /*no-op*/ @@ -16330,7 +16659,7 @@ SQLITE_PRIVATE void sqlite3VdbeNoopComment(Vdbe*, const char*, ...); ** The VdbeCoverage macros are used to set a coverage testing point ** for VDBE branch instructions. The coverage testing points are line ** numbers in the sqlite3.c source file. VDBE branch coverage testing -** only works with an amalagmation build. That's ok since a VDBE branch +** only works with an amalgamation build. That's ok since a VDBE branch ** coverage build designed for testing the test suite only. No application ** should ever ship with VDBE branch coverage measuring turned on. ** @@ -16348,7 +16677,7 @@ SQLITE_PRIVATE void sqlite3VdbeNoopComment(Vdbe*, const char*, ...); ** // NULL option is not possible ** ** VdbeCoverageEqNe(v) // Previous OP_Jump is only interested -** // in distingishing equal and not-equal. +** // in distinguishing equal and not-equal. ** ** Every VDBE branch operation must be tagged with one of the macros above. ** If not, then when "make test" is run with -DSQLITE_VDBE_COVERAGE and @@ -16358,7 +16687,7 @@ SQLITE_PRIVATE void sqlite3VdbeNoopComment(Vdbe*, const char*, ...); ** During testing, the test application will invoke ** sqlite3_test_control(SQLITE_TESTCTRL_VDBE_COVERAGE,...) to set a callback ** routine that is invoked as each bytecode branch is taken. The callback -** contains the sqlite3.c source line number ov the VdbeCoverage macro and +** contains the sqlite3.c source line number of the VdbeCoverage macro and ** flags to indicate whether or not the branch was taken. The test application ** is responsible for keeping track of this and reporting byte-code branches ** that are never taken. @@ -16394,14 +16723,22 @@ SQLITE_PRIVATE void sqlite3VdbeSetLineNumber(Vdbe*,int); #ifdef SQLITE_ENABLE_STMT_SCANSTATUS SQLITE_PRIVATE void sqlite3VdbeScanStatus(Vdbe*, int, int, int, LogEst, const char*); +SQLITE_PRIVATE void sqlite3VdbeScanStatusRange(Vdbe*, int, int, int); +SQLITE_PRIVATE void sqlite3VdbeScanStatusCounters(Vdbe*, int, int, int); #else -# define sqlite3VdbeScanStatus(a,b,c,d,e) +# define sqlite3VdbeScanStatus(a,b,c,d,e,f) +# define sqlite3VdbeScanStatusRange(a,b,c,d) +# define sqlite3VdbeScanStatusCounters(a,b,c,d) #endif #if defined(SQLITE_DEBUG) || defined(VDBE_PROFILE) SQLITE_PRIVATE void sqlite3VdbePrintOp(FILE*, int, VdbeOp*); #endif +#if defined(SQLITE_ENABLE_CURSOR_HINTS) && defined(SQLITE_DEBUG) +SQLITE_PRIVATE int sqlite3CursorRangeHintExprCheck(Walker *pWalker, Expr *pExpr); +#endif + #endif /* SQLITE_VDBE_H */ /************** End of vdbe.h ************************************************/ @@ -16450,7 +16787,7 @@ struct PgHdr { ** private to pcache.c and should not be accessed by other modules. ** pCache is grouped with the public elements for efficiency. */ - i16 nRef; /* Number of users of this page */ + i64 nRef; /* Number of users of this page */ PgHdr *pDirtyNext; /* Next element in list of dirty pages */ PgHdr *pDirtyPrev; /* Previous element in list of dirty pages */ /* NB: pDirtyNext and pDirtyPrev are undefined if the @@ -16531,12 +16868,12 @@ SQLITE_PRIVATE void sqlite3PcacheClearSyncFlags(PCache *); SQLITE_PRIVATE void sqlite3PcacheClear(PCache*); /* Return the total number of outstanding page references */ -SQLITE_PRIVATE int sqlite3PcacheRefCount(PCache*); +SQLITE_PRIVATE i64 sqlite3PcacheRefCount(PCache*); /* Increment the reference count of an existing page */ SQLITE_PRIVATE void sqlite3PcacheRef(PgHdr*); -SQLITE_PRIVATE int sqlite3PcachePageRefcount(PgHdr*); +SQLITE_PRIVATE i64 sqlite3PcachePageRefcount(PgHdr*); /* Return the total number of pages stored in the cache */ SQLITE_PRIVATE int sqlite3PcachePagecount(PCache*); @@ -16689,7 +17026,7 @@ SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*); /* ** Default synchronous levels. ** -** Note that (for historcal reasons) the PAGER_SYNCHRONOUS_* macros differ +** Note that (for historical reasons) the PAGER_SYNCHRONOUS_* macros differ ** from the SQLITE_DEFAULT_SYNCHRONOUS value by 1. ** ** PAGER_SYNCHRONOUS DEFAULT_SYNCHRONOUS @@ -16728,7 +17065,7 @@ struct Db { ** An instance of the following structure stores a database schema. ** ** Most Schema objects are associated with a Btree. The exception is -** the Schema for the TEMP databaes (sqlite3.aDb[1]) which is free-standing. +** the Schema for the TEMP database (sqlite3.aDb[1]) which is free-standing. ** In shared cache mode, a single Schema object can be shared by multiple ** Btrees that refer to the same underlying BtShared object. ** @@ -16839,7 +17176,7 @@ struct Lookaside { LookasideSlot *pInit; /* List of buffers not previously used */ LookasideSlot *pFree; /* List of available buffers */ #ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE - LookasideSlot *pSmallInit; /* List of small buffers not prediously used */ + LookasideSlot *pSmallInit; /* List of small buffers not previously used */ LookasideSlot *pSmallFree; /* List of available small buffers */ void *pMiddle; /* First byte past end of full-size buffers and ** the first byte of LOOKASIDE_SMALL buffers */ @@ -16856,7 +17193,7 @@ struct LookasideSlot { #define EnableLookaside db->lookaside.bDisable--;\ db->lookaside.sz=db->lookaside.bDisable?0:db->lookaside.szTrue -/* Size of the smaller allocations in two-size lookside */ +/* Size of the smaller allocations in two-size lookaside */ #ifdef SQLITE_OMIT_TWOSIZE_LOOKASIDE # define LOOKASIDE_SMALL 0 #else @@ -17111,7 +17448,7 @@ struct sqlite3 { #define SQLITE_NullCallback 0x00000100 /* Invoke the callback once if the */ /* result set is empty */ #define SQLITE_IgnoreChecks 0x00000200 /* Do not enforce check constraints */ -#define SQLITE_ReadUncommit 0x00000400 /* READ UNCOMMITTED in shared-cache */ +#define SQLITE_StmtScanStatus 0x00000400 /* Enable stmt_scanstats() counters */ #define SQLITE_NoCkptOnClose 0x00000800 /* No checkpoint on close()/DETACH */ #define SQLITE_ReverseOrder 0x00001000 /* Reverse unordered SELECTs */ #define SQLITE_RecTriggers 0x00002000 /* Enable recursive triggers */ @@ -17137,6 +17474,7 @@ struct sqlite3 { /* DELETE, or UPDATE and return */ /* the count using a callback. */ #define SQLITE_CorruptRdOnly HI(0x00002) /* Prohibit writes due to error */ +#define SQLITE_ReadUncommit HI(0x00004) /* READ UNCOMMITTED in shared-cache */ /* Flags used only if debugging */ #ifdef SQLITE_DEBUG @@ -17192,6 +17530,9 @@ struct sqlite3 { #define SQLITE_FlttnUnionAll 0x00800000 /* Disable the UNION ALL flattener */ /* TH3 expects this value ^^^^^^^^^^ See flatten04.test */ #define SQLITE_IndexedExpr 0x01000000 /* Pull exprs from index when able */ +#define SQLITE_Coroutines 0x02000000 /* Co-routines for subqueries */ +#define SQLITE_NullUnusedCols 0x04000000 /* NULL unused columns in subqueries */ +#define SQLITE_OnePass 0x08000000 /* Single-pass DELETE and UPDATE */ #define SQLITE_AllOpts 0xffffffff /* All optimizations */ /* @@ -17274,10 +17615,17 @@ struct FuncDestructor { ** SQLITE_FUNC_ANYORDER == NC_OrderAgg == SF_OrderByReqd ** SQLITE_FUNC_LENGTH == OPFLAG_LENGTHARG ** SQLITE_FUNC_TYPEOF == OPFLAG_TYPEOFARG +** SQLITE_FUNC_BYTELEN == OPFLAG_BYTELENARG ** SQLITE_FUNC_CONSTANT == SQLITE_DETERMINISTIC from the API ** SQLITE_FUNC_DIRECT == SQLITE_DIRECTONLY from the API -** SQLITE_FUNC_UNSAFE == SQLITE_INNOCUOUS +** SQLITE_FUNC_UNSAFE == SQLITE_INNOCUOUS -- opposite meanings!!! ** SQLITE_FUNC_ENCMASK depends on SQLITE_UTF* macros in the API +** +** Note that even though SQLITE_FUNC_UNSAFE and SQLITE_INNOCUOUS have the +** same bit value, their meanings are inverted. SQLITE_FUNC_UNSAFE is +** used internally and if set means that the function has side effects. +** SQLITE_INNOCUOUS is used by application code and means "not unsafe". +** See multiple instances of tag-20230109-1. */ #define SQLITE_FUNC_ENCMASK 0x0003 /* SQLITE_UTF8, SQLITE_UTF16BE or UTF16LE */ #define SQLITE_FUNC_LIKE 0x0004 /* Candidate for the LIKE optimization */ @@ -17286,6 +17634,7 @@ struct FuncDestructor { #define SQLITE_FUNC_NEEDCOLL 0x0020 /* sqlite3GetFuncCollSeq() might be called*/ #define SQLITE_FUNC_LENGTH 0x0040 /* Built-in length() function */ #define SQLITE_FUNC_TYPEOF 0x0080 /* Built-in typeof() function */ +#define SQLITE_FUNC_BYTELEN 0x00c0 /* Built-in octet_length() function */ #define SQLITE_FUNC_COUNT 0x0100 /* Built-in count(*) aggregate */ /* 0x0200 -- available for reuse */ #define SQLITE_FUNC_UNLIKELY 0x0400 /* Built-in unlikely() function */ @@ -17394,7 +17743,7 @@ struct FuncDestructor { {nArg, SQLITE_FUNC_BUILTIN|SQLITE_FUNC_CONSTANT|SQLITE_UTF8, \ xPtr, 0, xFunc, 0, 0, 0, #zName, {0} } #define JFUNCTION(zName, nArg, iArg, xFunc) \ - {nArg, SQLITE_FUNC_BUILTIN|SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS|\ + {nArg, SQLITE_FUNC_BUILTIN|SQLITE_DETERMINISTIC|\ SQLITE_FUNC_CONSTANT|SQLITE_UTF8, \ SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, 0, #zName, {0} } #define INLINE_FUNC(zName, nArg, iArg, mFlags) \ @@ -17586,6 +17935,7 @@ struct CollSeq { #define SQLITE_AFF_NUMERIC 0x43 /* 'C' */ #define SQLITE_AFF_INTEGER 0x44 /* 'D' */ #define SQLITE_AFF_REAL 0x45 /* 'E' */ +#define SQLITE_AFF_FLEXNUM 0x46 /* 'F' */ #define sqlite3IsNumericAffinity(X) ((X)>=SQLITE_AFF_NUMERIC) @@ -17656,6 +18006,7 @@ struct VTable { sqlite3_vtab *pVtab; /* Pointer to vtab instance */ int nRef; /* Number of pointers to this structure */ u8 bConstraint; /* True if constraints are supported */ + u8 bAllSchemas; /* True if might use any attached schema */ u8 eVtabRisk; /* Riskiness of allowing hacker access */ int iSavepoint; /* Depth of the SAVEPOINT stack */ VTable *pNext; /* Next in linked list (see above) */ @@ -17863,7 +18214,7 @@ struct FKey { ** foreign key. ** ** The OE_Default value is a place holder that means to use whatever -** conflict resolution algorthm is required from context. +** conflict resolution algorithm is required from context. ** ** The following symbolic values are used to record which type ** of conflict resolution action to take. @@ -18036,6 +18387,7 @@ struct Index { ** expression, or a reference to a VIRTUAL column */ #ifdef SQLITE_ENABLE_STAT4 int nSample; /* Number of elements in aSample[] */ + int mxSample; /* Number of slots allocated to aSample[] */ int nSampleCol; /* Size of IndexSample.anEq[] and so on */ tRowcnt *aAvgEq; /* Average nEq values for keys not in aSample */ IndexSample *aSample; /* Samples of the left-most key */ @@ -18117,16 +18469,15 @@ struct AggInfo { ** from source tables rather than from accumulators */ u8 useSortingIdx; /* In direct mode, reference the sorting index rather ** than the source table */ + u16 nSortingColumn; /* Number of columns in the sorting index */ int sortingIdx; /* Cursor number of the sorting index */ int sortingIdxPTab; /* Cursor number of pseudo-table */ - int nSortingColumn; /* Number of columns in the sorting index */ - int mnReg, mxReg; /* Range of registers allocated for aCol and aFunc */ + int iFirstReg; /* First register in range for aCol[] and aFunc[] */ ExprList *pGroupBy; /* The group by clause */ struct AggInfo_col { /* For each column used in source tables */ Table *pTab; /* Source table */ Expr *pCExpr; /* The original expression */ int iTable; /* Cursor number of the source table */ - int iMem; /* Memory location that acts as accumulator */ i16 iColumn; /* Column number within the source table */ i16 iSorterColumn; /* Column number in the sorting index */ } *aCol; @@ -18137,14 +18488,27 @@ struct AggInfo { struct AggInfo_func { /* For each aggregate function */ Expr *pFExpr; /* Expression encoding the function */ FuncDef *pFunc; /* The aggregate function implementation */ - int iMem; /* Memory location that acts as accumulator */ int iDistinct; /* Ephemeral table used to enforce DISTINCT */ int iDistAddr; /* Address of OP_OpenEphemeral */ } *aFunc; int nFunc; /* Number of entries in aFunc[] */ u32 selId; /* Select to which this AggInfo belongs */ +#ifdef SQLITE_DEBUG + Select *pSelect; /* SELECT statement that this AggInfo supports */ +#endif }; +/* +** Macros to compute aCol[] and aFunc[] register numbers. +** +** These macros should not be used prior to the call to +** assignAggregateRegisters() that computes the value of pAggInfo->iFirstReg. +** The assert()s that are part of this macro verify that constraint. +*/ +#define AggInfoColumnReg(A,I) (assert((A)->iFirstReg),(A)->iFirstReg+(I)) +#define AggInfoFuncReg(A,I) \ + (assert((A)->iFirstReg),(A)->iFirstReg+(A)->nColumn+(I)) + /* ** The datatype ynVar is a signed integer, either 16-bit or 32-bit. ** Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater @@ -18264,7 +18628,7 @@ struct Expr { ** TK_REGISTER: register number ** TK_TRIGGER: 1 -> new, 0 -> old ** EP_Unlikely: 134217728 times likelihood - ** TK_IN: ephemerial table holding RHS + ** TK_IN: ephemeral table holding RHS ** TK_SELECT_COLUMN: Number of columns on the LHS ** TK_SELECT: 1st register of result vector */ ynVar iColumn; /* TK_COLUMN: column index. -1 for rowid. @@ -18346,6 +18710,8 @@ struct Expr { */ #define ExprUseUToken(E) (((E)->flags&EP_IntValue)==0) #define ExprUseUValue(E) (((E)->flags&EP_IntValue)!=0) +#define ExprUseWOfst(E) (((E)->flags&(EP_InnerON|EP_OuterON))==0) +#define ExprUseWJoin(E) (((E)->flags&(EP_InnerON|EP_OuterON))!=0) #define ExprUseXList(E) (((E)->flags&EP_xIsSelect)==0) #define ExprUseXSelect(E) (((E)->flags&EP_xIsSelect)!=0) #define ExprUseYTab(E) (((E)->flags&(EP_WinFunc|EP_Subrtn))==0) @@ -18534,7 +18900,7 @@ struct SrcItem { unsigned notCte :1; /* This item may not match a CTE */ unsigned isUsing :1; /* u3.pUsing is valid */ unsigned isOn :1; /* u3.pOn was once valid and non-NULL */ - unsigned isSynthUsing :1; /* u3.pUsing is synthensized from NATURAL */ + unsigned isSynthUsing :1; /* u3.pUsing is synthesized from NATURAL */ unsigned isNestedFrom :1; /* pSelect is a SF_NestedFrom subquery */ } fg; int iCursor; /* The VDBE cursor number used to access this table */ @@ -18675,7 +19041,7 @@ struct NameContext { #define NC_HasAgg 0x000010 /* One or more aggregate functions seen */ #define NC_IdxExpr 0x000020 /* True if resolving columns of CREATE INDEX */ #define NC_SelfRef 0x00002e /* Combo: PartIdx, isCheck, GenCol, and IdxExpr */ -#define NC_VarSelect 0x000040 /* A correlated subquery has been seen */ +#define NC_Subquery 0x000040 /* A subquery has been seen */ #define NC_UEList 0x000080 /* True if uNC.pEList is used */ #define NC_UAggInfo 0x000100 /* True if uNC.pAggInfo is used */ #define NC_UUpsert 0x000200 /* True if uNC.pUpsert is used */ @@ -18804,6 +19170,7 @@ struct Select { #define SF_MultiPart 0x2000000 /* Has multiple incompatible PARTITIONs */ #define SF_CopyCte 0x4000000 /* SELECT statement is a copy of a CTE */ #define SF_OrderByReqd 0x8000000 /* The ORDER BY clause may not be omitted */ +#define SF_UpdateFrom 0x10000000 /* Query originates with UPDATE FROM */ /* True if S exists and has SF_NestedFrom */ #define IsNestedFrom(S) ((S)!=0 && ((S)->selFlags&SF_NestedFrom)!=0) @@ -18912,7 +19279,7 @@ struct SelectDest { int iSDParm2; /* A second parameter for the eDest disposal method */ int iSdst; /* Base register where results are written */ int nSdst; /* Number of registers allocated */ - char *zAffSdst; /* Affinity used for SRT_Set, SRT_Table, and similar */ + char *zAffSdst; /* Affinity used for SRT_Set */ ExprList *pOrderBy; /* Key columns for SRT_Queue and SRT_DistQueue */ }; @@ -18971,10 +19338,10 @@ struct TriggerPrg { #else typedef unsigned int yDbMask; # define DbMaskTest(M,I) (((M)&(((yDbMask)1)<<(I)))!=0) -# define DbMaskZero(M) (M)=0 -# define DbMaskSet(M,I) (M)|=(((yDbMask)1)<<(I)) -# define DbMaskAllZero(M) (M)==0 -# define DbMaskNonZero(M) (M)!=0 +# define DbMaskZero(M) ((M)=0) +# define DbMaskSet(M,I) ((M)|=(((yDbMask)1)<<(I))) +# define DbMaskAllZero(M) ((M)==0) +# define DbMaskNonZero(M) ((M)!=0) #endif /* @@ -18993,6 +19360,7 @@ struct IndexedExpr { int iIdxCur; /* The index cursor */ int iIdxCol; /* The index column that contains value of pExpr */ u8 bMaybeNullRow; /* True if we need an OP_IfNullRow check */ + u8 aff; /* Affinity of the pExpr expression */ IndexedExpr *pIENext; /* Next in a list of all indexed expressions */ #ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS const char *zIdxName; /* Name of index, used only for bytecode comments */ @@ -19044,6 +19412,9 @@ struct Parse { u8 withinRJSubrtn; /* Nesting level for RIGHT JOIN body subroutines */ #if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST) u8 earlyCleanup; /* OOM inside sqlite3ParserAddCleanup() */ +#endif +#ifdef SQLITE_DEBUG + u8 ifNotExists; /* Might be true if IF NOT EXISTS. Assert()s only */ #endif int nRangeReg; /* Size of the temporary register block */ int iRangeReg; /* First register in temporary register block */ @@ -19057,7 +19428,7 @@ struct Parse { int nLabelAlloc; /* Number of slots in aLabel */ int *aLabel; /* Space to hold the labels */ ExprList *pConstExpr;/* Constant expressions */ - IndexedExpr *pIdxExpr;/* List of expressions used by active indexes */ + IndexedExpr *pIdxEpr;/* List of expressions used by active indexes */ Token constraintName;/* Name of the constraint currently being parsed */ yDbMask writeMask; /* Start a write transaction on these databases */ yDbMask cookieMask; /* Bitmask of schema verified databases */ @@ -19065,6 +19436,9 @@ struct Parse { int regRoot; /* Register holding root page number for new objects */ int nMaxArg; /* Max args passed to user function by sub-program */ int nSelect; /* Number of SELECT stmts. Counter for Select.selId */ +#ifndef SQLITE_OMIT_PROGRESS_CALLBACK + u32 nProgressSteps; /* xProgress steps taken during sqlite3_prepare() */ +#endif #ifndef SQLITE_OMIT_SHARED_CACHE int nTableLock; /* Number of locks in aTableLock */ TableLock *aTableLock; /* Required table locks for shared-cache mode */ @@ -19078,9 +19452,9 @@ struct Parse { int addrCrTab; /* Address of OP_CreateBtree on CREATE TABLE */ Returning *pReturning; /* The RETURNING clause */ } u1; - u32 nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ u32 oldmask; /* Mask of old.* columns referenced */ u32 newmask; /* Mask of new.* columns referenced */ + LogEst nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ u8 eTriggerOp; /* TK_UPDATE, TK_INSERT or TK_DELETE */ u8 bReturning; /* Coding a RETURNING trigger */ u8 eOrconf; /* Default ON CONFLICT policy for trigger steps */ @@ -19204,6 +19578,7 @@ struct AuthContext { #define OPFLAG_ISNOOP 0x40 /* OP_Delete does pre-update-hook only */ #define OPFLAG_LENGTHARG 0x40 /* OP_Column only used for length() */ #define OPFLAG_TYPEOFARG 0x80 /* OP_Column only used for typeof() */ +#define OPFLAG_BYTELENARG 0xc0 /* OP_Column only for octet_length() */ #define OPFLAG_BULKCSR 0x01 /* OP_Open** used to open bulk cursor */ #define OPFLAG_SEEKEQ 0x02 /* OP_Open** cursor uses EQ seek only */ #define OPFLAG_FORDELETE 0x08 /* OP_Open should use BTREE_FORDELETE */ @@ -19346,6 +19721,25 @@ struct sqlite3_str { #define isMalloced(X) (((X)->printfFlags & SQLITE_PRINTF_MALLOCED)!=0) +/* +** The following object is the header for an "RCStr" or "reference-counted +** string". An RCStr is passed around and used like any other char* +** that has been dynamically allocated. The important interface +** differences: +** +** 1. RCStr strings are reference counted. They are deallocated +** when the reference count reaches zero. +** +** 2. Use sqlite3RCStrUnref() to free an RCStr string rather than +** sqlite3_free() +** +** 3. Make a (read-only) copy of a read-only RCStr string using +** sqlite3RCStrRef(). +*/ +struct RCStr { + u64 nRCRef; /* Number of references */ + /* Total structure size should be a multiple of 8 bytes for alignment */ +}; /* ** A pointer to this structure is used to communicate information @@ -19372,7 +19766,7 @@ typedef struct { /* Tuning parameters are set using SQLITE_TESTCTRL_TUNE and are controlled ** on debug-builds of the CLI using ".testctrl tune ID VALUE". Tuning ** parameters are for temporary use during development, to help find -** optimial values for parameters in the query planner. The should not +** optimal values for parameters in the query planner. The should not ** be used on trunk check-ins. They are a temporary mechanism available ** for transient development builds only. ** @@ -19398,6 +19792,7 @@ struct Sqlite3Config { u8 bUseCis; /* Use covering indices for full-scans */ u8 bSmallMalloc; /* Avoid large memory allocations if true */ u8 bExtraSchemaChecks; /* Verify type,name,tbl_name in schema */ + u8 bUseLongDouble; /* Make use of long double */ int mxStrlen; /* Maximum string length */ int neverCorrupt; /* Database is always well-formed */ int szLookaside; /* Default lookaside buffer size */ @@ -19484,6 +19879,7 @@ struct Walker { void (*xSelectCallback2)(Walker*,Select*);/* Second callback for SELECTs */ int walkerDepth; /* Number of subqueries */ u16 eCode; /* A small processing code */ + u16 mWFlags; /* Use-dependent flags */ union { /* Extra data for callback */ NameContext *pNC; /* Naming context */ int n; /* A counter */ @@ -19502,6 +19898,7 @@ struct Walker { struct CoveringIndexCheck *pCovIdxCk; /* Check for covering index */ SrcItem *pSrcItem; /* A single FROM clause item */ DbFixer *pFix; /* See sqlite3FixSelect() */ + Mem *aMem; /* See sqlite3BtreeCursorHint() */ } u; }; @@ -19522,6 +19919,7 @@ struct DbFixer { /* Forward declarations */ SQLITE_PRIVATE int sqlite3WalkExpr(Walker*, Expr*); +SQLITE_PRIVATE int sqlite3WalkExprNN(Walker*, Expr*); SQLITE_PRIVATE int sqlite3WalkExprList(Walker*, ExprList*); SQLITE_PRIVATE int sqlite3WalkSelect(Walker*, Select*); SQLITE_PRIVATE int sqlite3WalkSelectExpr(Walker*, Select*); @@ -19771,6 +20169,8 @@ SQLITE_PRIVATE int sqlite3CorruptPgnoError(int,Pgno); # define sqlite3Isxdigit(x) (sqlite3CtypeMap[(unsigned char)(x)]&0x08) # define sqlite3Tolower(x) (sqlite3UpperToLower[(unsigned char)(x)]) # define sqlite3Isquote(x) (sqlite3CtypeMap[(unsigned char)(x)]&0x80) +# define sqlite3JsonId1(x) (sqlite3CtypeMap[(unsigned char)(x)]&0x42) +# define sqlite3JsonId2(x) (sqlite3CtypeMap[(unsigned char)(x)]&0x46) #else # define sqlite3Toupper(x) toupper((unsigned char)(x)) # define sqlite3Isspace(x) isspace((unsigned char)(x)) @@ -19780,6 +20180,8 @@ SQLITE_PRIVATE int sqlite3CorruptPgnoError(int,Pgno); # define sqlite3Isxdigit(x) isxdigit((unsigned char)(x)) # define sqlite3Tolower(x) tolower((unsigned char)(x)) # define sqlite3Isquote(x) ((x)=='"'||(x)=='\''||(x)=='['||(x)=='`') +# define sqlite3JsonId1(x) (sqlite3IsIdChar(x)&&(x)<'0') +# define sqlite3JsonId2(x) sqlite3IsIdChar(x) #endif SQLITE_PRIVATE int sqlite3IsIdChar(u8); @@ -19829,13 +20231,11 @@ SQLITE_PRIVATE int sqlite3HeapNearlyFull(void); #ifdef SQLITE_USE_ALLOCA # define sqlite3StackAllocRaw(D,N) alloca(N) # define sqlite3StackAllocRawNN(D,N) alloca(N) -# define sqlite3StackAllocZero(D,N) memset(alloca(N), 0, N) # define sqlite3StackFree(D,P) # define sqlite3StackFreeNN(D,P) #else # define sqlite3StackAllocRaw(D,N) sqlite3DbMallocRaw(D,N) # define sqlite3StackAllocRawNN(D,N) sqlite3DbMallocRawNN(D,N) -# define sqlite3StackAllocZero(D,N) sqlite3DbMallocZero(D,N) # define sqlite3StackFree(D,P) sqlite3DbFree(D,P) # define sqlite3StackFreeNN(D,P) sqlite3DbFreeNN(D,P) #endif @@ -19901,6 +20301,20 @@ struct PrintfArguments { sqlite3_value **apArg; /* The argument values */ }; +/* +** An instance of this object receives the decoding of a floating point +** value into an approximate decimal representation. +*/ +struct FpDecode { + char sign; /* '+' or '-' */ + char isSpecial; /* 1: Infinity 2: NaN */ + int n; /* Significant digits in the decode */ + int iDP; /* Location of the decimal point */ + char *z; /* Start of significant digits */ + char zBuf[24]; /* Storage for significant digits */ +}; + +SQLITE_PRIVATE void sqlite3FpDecode(FpDecode*,double,int,int); SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3*,const char*, ...); SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3*,const char*, va_list); #if defined(SQLITE_DEBUG) || defined(SQLITE_HAVE_OS_TRACE) @@ -19960,6 +20374,7 @@ SQLITE_PRIVATE void sqlite3ShowWinFunc(const Window*); #endif SQLITE_PRIVATE void sqlite3SetString(char **, sqlite3*, const char*); +SQLITE_PRIVATE void sqlite3ProgressCheck(Parse*); SQLITE_PRIVATE void sqlite3ErrorMsg(Parse*, const char*, ...); SQLITE_PRIVATE int sqlite3ErrorToParser(sqlite3*,int); SQLITE_PRIVATE void sqlite3Dequote(char*); @@ -19974,6 +20389,10 @@ SQLITE_PRIVATE void sqlite3ReleaseTempReg(Parse*,int); SQLITE_PRIVATE int sqlite3GetTempRange(Parse*,int); SQLITE_PRIVATE void sqlite3ReleaseTempRange(Parse*,int,int); SQLITE_PRIVATE void sqlite3ClearTempRegCache(Parse*); +SQLITE_PRIVATE void sqlite3TouchRegister(Parse*,int); +#if defined(SQLITE_ENABLE_STAT4) || defined(SQLITE_DEBUG) +SQLITE_PRIVATE int sqlite3FirstAvailableRegister(Parse*,int); +#endif #ifdef SQLITE_DEBUG SQLITE_PRIVATE int sqlite3NoTempsInRange(Parse*,int,int); #endif @@ -20017,7 +20436,7 @@ SQLITE_PRIVATE const char *sqlite3ColumnColl(Column*); SQLITE_PRIVATE void sqlite3DeleteColumnNames(sqlite3*,Table*); SQLITE_PRIVATE void sqlite3GenerateColumnNames(Parse *pParse, Select *pSelect); SQLITE_PRIVATE int sqlite3ColumnsFromExprList(Parse*,ExprList*,i16*,Column**); -SQLITE_PRIVATE void sqlite3SelectAddColumnTypeAndCollation(Parse*,Table*,Select*,char); +SQLITE_PRIVATE void sqlite3SubqueryColumnTypes(Parse*,Table*,Select*,char); SQLITE_PRIVATE Table *sqlite3ResultSetOfSelect(Parse*,Select*,char); SQLITE_PRIVATE void sqlite3OpenSchemaTable(Parse *, int); SQLITE_PRIVATE Index *sqlite3PrimaryKeyIndex(Table*); @@ -20124,7 +20543,7 @@ SQLITE_PRIVATE Select *sqlite3SelectNew(Parse*,ExprList*,SrcList*,Expr*,ExprList Expr*,ExprList*,u32,Expr*); SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3*, Select*); SQLITE_PRIVATE Table *sqlite3SrcListLookup(Parse*, SrcList*); -SQLITE_PRIVATE int sqlite3IsReadOnly(Parse*, Table*, int); +SQLITE_PRIVATE int sqlite3IsReadOnly(Parse*, Table*, Trigger*); SQLITE_PRIVATE void sqlite3OpenTable(Parse*, int iCur, int iDb, Table*, int); #if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY) SQLITE_PRIVATE Expr *sqlite3LimitWhere(Parse*,SrcList*,Expr*,ExprList*,Expr*,char*); @@ -20186,7 +20605,7 @@ SQLITE_PRIVATE int sqlite3ExprCompare(const Parse*,const Expr*,const Expr*, int) SQLITE_PRIVATE int sqlite3ExprCompareSkip(Expr*,Expr*,int); SQLITE_PRIVATE int sqlite3ExprListCompare(const ExprList*,const ExprList*, int); SQLITE_PRIVATE int sqlite3ExprImpliesExpr(const Parse*,const Expr*,const Expr*, int); -SQLITE_PRIVATE int sqlite3ExprImpliesNonNullRow(Expr*,int); +SQLITE_PRIVATE int sqlite3ExprImpliesNonNullRow(Expr*,int,int); SQLITE_PRIVATE void sqlite3AggInfoPersistWalkerInit(Walker*,Parse*); SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext*, Expr*); SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext*,ExprList*); @@ -20213,7 +20632,7 @@ SQLITE_PRIVATE int sqlite3ExprIsConstantNotJoin(Expr*); SQLITE_PRIVATE int sqlite3ExprIsConstantOrFunction(Expr*, u8); SQLITE_PRIVATE int sqlite3ExprIsConstantOrGroupBy(Parse*, Expr*, ExprList*); SQLITE_PRIVATE int sqlite3ExprIsTableConstant(Expr*,int); -SQLITE_PRIVATE int sqlite3ExprIsTableConstraint(Expr*,const SrcItem*); +SQLITE_PRIVATE int sqlite3ExprIsSingleTableConstraint(Expr*,const SrcList*,int); #ifdef SQLITE_ENABLE_CURSOR_HINTS SQLITE_PRIVATE int sqlite3ExprContainsSubquery(Expr*); #endif @@ -20335,9 +20754,10 @@ SQLITE_PRIVATE int sqlite3FixSrcList(DbFixer*, SrcList*); SQLITE_PRIVATE int sqlite3FixSelect(DbFixer*, Select*); SQLITE_PRIVATE int sqlite3FixExpr(DbFixer*, Expr*); SQLITE_PRIVATE int sqlite3FixTriggerStep(DbFixer*, TriggerStep*); + SQLITE_PRIVATE int sqlite3RealSameAsInt(double,sqlite3_int64); SQLITE_PRIVATE i64 sqlite3RealToI64(double); -SQLITE_PRIVATE void sqlite3Int64ToText(i64,char*); +SQLITE_PRIVATE int sqlite3Int64ToText(i64,char*); SQLITE_PRIVATE int sqlite3AtoF(const char *z, double*, int, u8); SQLITE_PRIVATE int sqlite3GetInt32(const char *, int*); SQLITE_PRIVATE int sqlite3GetUInt32(const char*, u32*); @@ -20388,6 +20808,7 @@ SQLITE_PRIVATE char sqlite3CompareAffinity(const Expr *pExpr, char aff2); SQLITE_PRIVATE int sqlite3IndexAffinityOk(const Expr *pExpr, char idx_affinity); SQLITE_PRIVATE char sqlite3TableColumnAffinity(const Table*,int); SQLITE_PRIVATE char sqlite3ExprAffinity(const Expr *pExpr); +SQLITE_PRIVATE int sqlite3ExprDataType(const Expr *pExpr); SQLITE_PRIVATE int sqlite3Atoi64(const char*, i64*, int, u8); SQLITE_PRIVATE int sqlite3DecOrHexToI64(const char*, i64*); SQLITE_PRIVATE void sqlite3ErrorWithMsg(sqlite3*, int, const char*,...); @@ -20404,6 +20825,9 @@ SQLITE_PRIVATE const char *sqlite3ErrName(int); #ifndef SQLITE_OMIT_DESERIALIZE SQLITE_PRIVATE int sqlite3MemdbInit(void); +SQLITE_PRIVATE int sqlite3IsMemdb(const sqlite3_vfs*); +#else +# define sqlite3IsMemdb(X) 0 #endif SQLITE_PRIVATE const char *sqlite3ErrStr(int); @@ -20435,6 +20859,7 @@ SQLITE_PRIVATE void sqlite3FileSuffix3(const char*, char*); SQLITE_PRIVATE u8 sqlite3GetBoolean(const char *z,u8); SQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value*, u8); +SQLITE_PRIVATE int sqlite3ValueIsOfClass(const sqlite3_value*, void(*)(void*)); SQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value*, u8); SQLITE_PRIVATE void sqlite3ValueSetStr(sqlite3_value*, int, const void *,u8, void(*)(void*)); @@ -20542,8 +20967,13 @@ SQLITE_PRIVATE void sqlite3OomClear(sqlite3*); SQLITE_PRIVATE int sqlite3ApiExit(sqlite3 *db, int); SQLITE_PRIVATE int sqlite3OpenTempDatabase(Parse *); +SQLITE_PRIVATE char *sqlite3RCStrRef(char*); +SQLITE_PRIVATE void sqlite3RCStrUnref(char*); +SQLITE_PRIVATE char *sqlite3RCStrNew(u64); +SQLITE_PRIVATE char *sqlite3RCStrResize(char*,u64); + SQLITE_PRIVATE void sqlite3StrAccumInit(StrAccum*, sqlite3*, char*, int, int); -SQLITE_PRIVATE int sqlite3StrAccumEnlarge(StrAccum*, int); +SQLITE_PRIVATE int sqlite3StrAccumEnlarge(StrAccum*, i64); SQLITE_PRIVATE char *sqlite3StrAccumFinish(StrAccum*); SQLITE_PRIVATE void sqlite3StrAccumSetError(StrAccum*, u8); SQLITE_PRIVATE void sqlite3ResultStrAccum(sqlite3_context*,StrAccum*); @@ -20657,10 +21087,7 @@ SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3*, int, const char *); SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *, VTable *); SQLITE_PRIVATE FuncDef *sqlite3VtabOverloadFunction(sqlite3 *,FuncDef*, int nArg, Expr*); -#if (defined(SQLITE_ENABLE_DBPAGE_VTAB) || defined(SQLITE_TEST)) \ - && !defined(SQLITE_OMIT_VIRTUALTABLE) -SQLITE_PRIVATE void sqlite3VtabUsesAllSchemas(sqlite3_index_info*); -#endif +SQLITE_PRIVATE void sqlite3VtabUsesAllSchemas(Parse*); SQLITE_PRIVATE sqlite3_int64 sqlite3StmtCurrentTime(sqlite3_context*); SQLITE_PRIVATE int sqlite3VdbeParameterIndex(Vdbe*, const char*, int); SQLITE_PRIVATE int sqlite3TransferBindings(sqlite3_stmt *, sqlite3_stmt *); @@ -20796,6 +21223,7 @@ SQLITE_PRIVATE int sqlite3ExprCheckHeight(Parse*, int); #define sqlite3SelectExprHeight(x) 0 #define sqlite3ExprCheckHeight(x,y) #endif +SQLITE_PRIVATE void sqlite3ExprSetErrorOffset(Expr*,int); SQLITE_PRIVATE u32 sqlite3Get4byte(const u8*); SQLITE_PRIVATE void sqlite3Put4byte(u8*, u32); @@ -20901,6 +21329,18 @@ SQLITE_PRIVATE const char **sqlite3CompileOptions(int *pnOpt); SQLITE_PRIVATE int sqlite3KvvfsInit(void); #endif +#if defined(VDBE_PROFILE) \ + || defined(SQLITE_PERFORMANCE_TRACE) \ + || defined(SQLITE_ENABLE_STMT_SCANSTATUS) +SQLITE_PRIVATE sqlite3_uint64 sqlite3Hwtime(void); +#endif + +#ifdef SQLITE_ENABLE_STMT_SCANSTATUS +# define IS_STMT_SCANSTATUS(db) (db->flags & SQLITE_StmtScanStatus) +#else +# define IS_STMT_SCANSTATUS(db) 0 +#endif + #endif /* SQLITEINT_H */ /************** End of sqliteInt.h *******************************************/ @@ -20942,101 +21382,6 @@ SQLITE_PRIVATE int sqlite3KvvfsInit(void); */ #ifdef SQLITE_PERFORMANCE_TRACE -/* -** hwtime.h contains inline assembler code for implementing -** high-performance timing routines. -*/ -/************** Include hwtime.h in the middle of os_common.h ****************/ -/************** Begin file hwtime.h ******************************************/ -/* -** 2008 May 27 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -****************************************************************************** -** -** This file contains inline asm code for retrieving "high-performance" -** counters for x86 and x86_64 class CPUs. -*/ -#ifndef SQLITE_HWTIME_H -#define SQLITE_HWTIME_H - -/* -** The following routine only works on pentium-class (or newer) processors. -** It uses the RDTSC opcode to read the cycle count value out of the -** processor and returns that value. This can be used for high-res -** profiling. -*/ -#if !defined(__STRICT_ANSI__) && \ - (defined(__GNUC__) || defined(_MSC_VER)) && \ - (defined(i386) || defined(__i386__) || defined(_M_IX86)) - - #if defined(__GNUC__) - - __inline__ sqlite_uint64 sqlite3Hwtime(void){ - unsigned int lo, hi; - __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); - return (sqlite_uint64)hi << 32 | lo; - } - - #elif defined(_MSC_VER) - - __declspec(naked) __inline sqlite_uint64 __cdecl sqlite3Hwtime(void){ - __asm { - rdtsc - ret ; return value at EDX:EAX - } - } - - #endif - -#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__x86_64__)) - - __inline__ sqlite_uint64 sqlite3Hwtime(void){ - unsigned long val; - __asm__ __volatile__ ("rdtsc" : "=A" (val)); - return val; - } - -#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__ppc__)) - - __inline__ sqlite_uint64 sqlite3Hwtime(void){ - unsigned long long retval; - unsigned long junk; - __asm__ __volatile__ ("\n\ - 1: mftbu %1\n\ - mftb %L0\n\ - mftbu %0\n\ - cmpw %0,%1\n\ - bne 1b" - : "=r" (retval), "=r" (junk)); - return retval; - } - -#else - - /* - ** asm() is needed for hardware timing support. Without asm(), - ** disable the sqlite3Hwtime() routine. - ** - ** sqlite3Hwtime() is only used for some obscure debugging - ** and analysis configurations, not in any deliverable, so this - ** should not be a great loss. - */ -SQLITE_PRIVATE sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); } - -#endif - -#endif /* !defined(SQLITE_HWTIME_H) */ - -/************** End of hwtime.h **********************************************/ -/************** Continuing where we left off in os_common.h ******************/ - static sqlite_uint64 g_start; static sqlite_uint64 g_elapsed; #define TIMER_START g_start=sqlite3Hwtime() @@ -21164,9 +21509,6 @@ static const char * const sqlite3azCompileOpt[] = { #ifdef SQLITE_4_BYTE_ALIGNED_MALLOC "4_BYTE_ALIGNED_MALLOC", #endif -#ifdef SQLITE_64BIT_STATS - "64BIT_STATS", -#endif #ifdef SQLITE_ALLOW_COVERING_INDEX_SCAN # if SQLITE_ALLOW_COVERING_INDEX_SCAN != 1 "ALLOW_COVERING_INDEX_SCAN=" CTIMEOPT_VAL(SQLITE_ALLOW_COVERING_INDEX_SCAN), @@ -21503,6 +21845,9 @@ static const char * const sqlite3azCompileOpt[] = { #ifdef SQLITE_INTEGRITY_CHECK_ERROR_MAX "INTEGRITY_CHECK_ERROR_MAX=" CTIMEOPT_VAL(SQLITE_INTEGRITY_CHECK_ERROR_MAX), #endif +#ifdef SQLITE_LEGACY_JSON_VALID + "LEGACY_JSON_VALID", +#endif #ifdef SQLITE_LIKE_DOESNT_MATCH_BLOBS "LIKE_DOESNT_MATCH_BLOBS", #endif @@ -21991,7 +22336,7 @@ SQLITE_PRIVATE const unsigned char *sqlite3aGTb = &sqlite3UpperToLower[256+12-OP ** isalnum() 0x06 ** isxdigit() 0x08 ** toupper() 0x20 -** SQLite identifier character 0x40 +** SQLite identifier character 0x40 $, _, or non-ascii ** Quote character 0x80 ** ** Bit 0x20 is set if the mapped character requires translation to upper @@ -22137,6 +22482,7 @@ SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config = { SQLITE_ALLOW_COVERING_INDEX_SCAN, /* bUseCis */ 0, /* bSmallMalloc */ 1, /* bExtraSchemaChecks */ + sizeof(LONGDOUBLE_TYPE)>8, /* bUseLongDouble */ 0x7ffffffe, /* mxStrlen */ 0, /* neverCorrupt */ SQLITE_DEFAULT_LOOKASIDE, /* szLookaside, nLookaside */ @@ -22185,7 +22531,7 @@ SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config = { SQLITE_DEFAULT_SORTERREF_SIZE, /* szSorterRef */ 0, /* iPrngSeed */ #ifdef SQLITE_DEBUG - {0,0,0,0,0,0} /* aTune */ + {0,0,0,0,0,0}, /* aTune */ #endif }; @@ -22366,6 +22712,9 @@ typedef struct VdbeSorter VdbeSorter; /* Elements of the linked list at Vdbe.pAuxData */ typedef struct AuxData AuxData; +/* A cache of large TEXT or BLOB values in a VdbeCursor */ +typedef struct VdbeTxtBlbCache VdbeTxtBlbCache; + /* Types of VDBE cursors */ #define CURTYPE_BTREE 0 #define CURTYPE_SORTER 1 @@ -22397,6 +22746,7 @@ struct VdbeCursor { Bool useRandomRowid:1; /* Generate new record numbers semi-randomly */ Bool isOrdered:1; /* True if the table is not BTREE_UNORDERED */ Bool noReuse:1; /* OpenEphemeral may not reuse this cursor */ + Bool colCache:1; /* pCache pointer is initialized and non-NULL */ u16 seekHit; /* See the OP_SeekHit and OP_IfNoHope opcodes */ union { /* pBtx for isEphermeral. pAltMap otherwise */ Btree *pBtx; /* Separate file holding temporary table */ @@ -22437,6 +22787,7 @@ struct VdbeCursor { #ifdef SQLITE_ENABLE_COLUMN_USED_MASK u64 maskUsed; /* Mask of columns used by this cursor */ #endif + VdbeTxtBlbCache *pCache; /* Cache of large TEXT or BLOB values */ /* 2*nField extra array elements allocated for aType[], beyond the one ** static element declared in the structure. nField total array slots for @@ -22449,12 +22800,25 @@ struct VdbeCursor { #define IsNullCursor(P) \ ((P)->eCurType==CURTYPE_PSEUDO && (P)->nullRow && (P)->seekResult==0) - /* ** A value for VdbeCursor.cacheStatus that means the cache is always invalid. */ #define CACHE_STALE 0 +/* +** Large TEXT or BLOB values can be slow to load, so we want to avoid +** loading them more than once. For that reason, large TEXT and BLOB values +** can be stored in a cache defined by this object, and attached to the +** VdbeCursor using the pCache field. +*/ +struct VdbeTxtBlbCache { + char *pCValue; /* A RCStr buffer to hold the value */ + i64 iOffset; /* File offset of the row being cached */ + int iCol; /* Column for which the cache is valid */ + u32 cacheStatus; /* Vdbe.cacheCtr value */ + u32 colCacheCtr; /* Column cache counter */ +}; + /* ** When a sub-program is executed (OP_Program), a structure of this type ** is allocated to store the current value of the program counter, as @@ -22481,7 +22845,6 @@ struct VdbeFrame { Vdbe *v; /* VM this frame belongs to */ VdbeFrame *pParent; /* Parent of this frame, or NULL if parent is main */ Op *aOp; /* Program instructions for parent frame */ - i64 *anExec; /* Event counters from parent frame */ Mem *aMem; /* Array of memory cells for parent frame */ VdbeCursor **apCsr; /* Array of Vdbe cursors for parent frame */ u8 *aOnce; /* Bitmask used by OP_Once */ @@ -22697,10 +23060,19 @@ typedef unsigned bft; /* Bit Field Type */ /* The ScanStatus object holds a single value for the ** sqlite3_stmt_scanstatus() interface. +** +** aAddrRange[]: +** This array is used by ScanStatus elements associated with EQP +** notes that make an SQLITE_SCANSTAT_NCYCLE value available. It is +** an array of up to 3 ranges of VM addresses for which the Vdbe.anCycle[] +** values should be summed to calculate the NCYCLE value. Each pair of +** integer addresses is a start and end address (both inclusive) for a range +** instructions. A start value of 0 indicates an empty range. */ typedef struct ScanStatus ScanStatus; struct ScanStatus { int addrExplain; /* OP_Explain for loop */ + int aAddrRange[6]; int addrLoop; /* Address of "loops" counter */ int addrVisit; /* Address of "rows visited" counter */ int iSelectID; /* The "Select-ID" for this loop */ @@ -22756,7 +23128,7 @@ struct Vdbe { int nOp; /* Number of instructions in the program */ int nOpAlloc; /* Slots allocated for aOp[] */ Mem *aColName; /* Column names to return */ - Mem *pResultSet; /* Pointer to an array of results */ + Mem *pResultRow; /* Current output row */ char *zErrMsg; /* Error message written here */ VList *pVList; /* Name of variables */ #ifndef SQLITE_OMIT_TRACE @@ -22767,16 +23139,18 @@ struct Vdbe { u32 nWrite; /* Number of write operations that have occurred */ #endif u16 nResColumn; /* Number of columns in one row of the result set */ + u16 nResAlloc; /* Column slots allocated to aColName[] */ u8 errorAction; /* Recovery action to do in case of an error */ u8 minWriteFileFormat; /* Minimum file format for writable database files */ u8 prepFlags; /* SQLITE_PREPARE_* flags */ u8 eVdbeState; /* On of the VDBE_*_STATE values */ bft expired:2; /* 1: recompile VM immediately 2: when convenient */ - bft explain:2; /* True if EXPLAIN present on SQL command */ + bft explain:2; /* 0: normal, 1: EXPLAIN, 2: EXPLAIN QUERY PLAN */ bft changeCntOn:1; /* True to update the change-counter */ bft usesStmtJournal:1; /* True if uses a statement journal */ bft readOnly:1; /* True for statements that do not write */ bft bIsReader:1; /* True for statements that read */ + bft haveEqpOps:1; /* Bytecode supports EXPLAIN QUERY PLAN */ yDbMask btreeMask; /* Bitmask of db->aDb[] entries referenced */ yDbMask lockMask; /* Subset of btreeMask that requires a lock */ u32 aCounter[9]; /* Counters used by sqlite3_stmt_status() */ @@ -22793,7 +23167,6 @@ struct Vdbe { SubProgram *pProgram; /* Linked list of all sub-programs used by VM */ AuxData *pAuxData; /* Linked list of auxdata allocations */ #ifdef SQLITE_ENABLE_STMT_SCANSTATUS - i64 *anExec; /* Number of times each op has been executed */ int nScan; /* Entries in aScan[] */ ScanStatus *aScan; /* Scan definitions for sqlite3_stmt_scanstatus() */ #endif @@ -22824,7 +23197,7 @@ struct PreUpdate { i64 iKey1; /* First key value passed to hook */ i64 iKey2; /* Second key value passed to hook */ Mem *aNew; /* Array of new.* values */ - Table *pTab; /* Schema object being upated */ + Table *pTab; /* Schema object being updated */ Index *pPk; /* PK index if pTab is WITHOUT ROWID */ }; @@ -22914,6 +23287,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemSetZeroBlob(Mem*,int); SQLITE_PRIVATE int sqlite3VdbeMemIsRowSet(const Mem*); #endif SQLITE_PRIVATE int sqlite3VdbeMemSetRowSet(Mem*); +SQLITE_PRIVATE void sqlite3VdbeMemZeroTerminateIfAble(Mem*); SQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem*); SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem*, u8, u8); SQLITE_PRIVATE int sqlite3IntFloatCompare(i64,double); @@ -22960,6 +23334,8 @@ SQLITE_PRIVATE int sqlite3VdbeSorterRewind(const VdbeCursor *, int *); SQLITE_PRIVATE int sqlite3VdbeSorterWrite(const VdbeCursor *, Mem *); SQLITE_PRIVATE int sqlite3VdbeSorterCompare(const VdbeCursor *, Mem *, int, int *); +SQLITE_PRIVATE void sqlite3VdbeValueListFree(void*); + #ifdef SQLITE_DEBUG SQLITE_PRIVATE void sqlite3VdbeIncrWriteCounter(Vdbe*, VdbeCursor*); SQLITE_PRIVATE void sqlite3VdbeAssertAbortable(Vdbe*); @@ -23475,6 +23851,7 @@ struct DateTime { char validTZ; /* True (1) if tz is valid */ char tzSet; /* Timezone was set explicitly */ char isError; /* An overflow has occurred */ + char useSubsec; /* Display subsecond precision */ }; @@ -23507,8 +23884,8 @@ struct DateTime { */ static int getDigits(const char *zDate, const char *zFormat, ...){ /* The aMx[] array translates the 3rd character of each format - ** spec into a max size: a b c d e f */ - static const u16 aMx[] = { 12, 14, 24, 31, 59, 9999 }; + ** spec into a max size: a b c d e f */ + static const u16 aMx[] = { 12, 14, 24, 31, 59, 14712 }; va_list ap; int cnt = 0; char nextC; @@ -23789,6 +24166,11 @@ static int parseDateOrTime( }else if( sqlite3AtoF(zDate, &r, sqlite3Strlen30(zDate), SQLITE_UTF8)>0 ){ setRawDateNumber(p, r); return 0; + }else if( (sqlite3StrICmp(zDate,"subsec")==0 + || sqlite3StrICmp(zDate,"subsecond")==0) + && sqlite3NotPureFunc(context) ){ + p->useSubsec = 1; + return setDateTimeToCurrent(context, p); } return 1; } @@ -23844,17 +24226,14 @@ static void computeYMD(DateTime *p){ ** Compute the Hour, Minute, and Seconds from the julian day number. */ static void computeHMS(DateTime *p){ - int s; + int day_ms, day_min; /* milliseconds, minutes into the day */ if( p->validHMS ) return; computeJD(p); - s = (int)((p->iJD + 43200000) % 86400000); - p->s = s/1000.0; - s = (int)p->s; - p->s -= s; - p->h = s/3600; - s -= p->h*3600; - p->m = s/60; - p->s += s - p->m*60; + day_ms = (int)((p->iJD + 43200000) % 86400000); + p->s = (day_ms % 60000)/1000.0; + day_min = day_ms/60000; + p->m = day_min % 60; + p->h = day_min / 60; p->rawS = 0; p->validHMS = 1; } @@ -24033,6 +24412,25 @@ static const struct { { 4, "year", 14713.0, 31536000.0 }, }; +/* +** If the DateTime p is raw number, try to figure out if it is +** a julian day number of a unix timestamp. Set the p value +** appropriately. +*/ +static void autoAdjustDate(DateTime *p){ + if( !p->rawS || p->validJD ){ + p->rawS = 0; + }else if( p->s>=-21086676*(i64)10000 /* -4713-11-24 12:00:00 */ + && p->s<=(25340230*(i64)10000)+799 /* 9999-12-31 23:59:59 */ + ){ + double r = p->s*1000.0 + 210866760000000.0; + clearYMD_HMS_TZ(p); + p->iJD = (sqlite3_int64)(r + 0.5); + p->validJD = 1; + p->rawS = 0; + } +} + /* ** Process a modifier to a date-time stamp. The modifiers are ** as follows: @@ -24076,19 +24474,8 @@ static int parseModifier( */ if( sqlite3_stricmp(z, "auto")==0 ){ if( idx>1 ) return 1; /* IMP: R-33611-57934 */ - if( !p->rawS || p->validJD ){ - rc = 0; - p->rawS = 0; - }else if( p->s>=-21086676*(i64)10000 /* -4713-11-24 12:00:00 */ - && p->s<=(25340230*(i64)10000)+799 /* 9999-12-31 23:59:59 */ - ){ - r = p->s*1000.0 + 210866760000000.0; - clearYMD_HMS_TZ(p); - p->iJD = (sqlite3_int64)(r + 0.5); - p->validJD = 1; - p->rawS = 0; - rc = 0; - } + autoAdjustDate(p); + rc = 0; } break; } @@ -24147,7 +24534,7 @@ static int parseModifier( i64 iOrigJD; /* Original localtime */ i64 iGuess; /* Guess at the corresponding utc time */ int cnt = 0; /* Safety to prevent infinite loop */ - int iErr; /* Guess is off by this much */ + i64 iErr; /* Guess is off by this much */ computeJD(p); iGuess = iOrigJD = p->iJD; @@ -24203,8 +24590,22 @@ static int parseModifier( ** ** Move the date backwards to the beginning of the current day, ** or month or year. + ** + ** subsecond + ** subsec + ** + ** Show subsecond precision in the output of datetime() and + ** unixepoch() and strftime('%s'). */ - if( sqlite3_strnicmp(z, "start of ", 9)!=0 ) break; + if( sqlite3_strnicmp(z, "start of ", 9)!=0 ){ + if( sqlite3_stricmp(z, "subsec")==0 + || sqlite3_stricmp(z, "subsecond")==0 + ){ + p->useSubsec = 1; + rc = 0; + } + break; + } if( !p->validJD && !p->validYMD && !p->validHMS ) break; z += 9; computeYMD(p); @@ -24240,18 +24641,73 @@ static int parseModifier( case '9': { double rRounder; int i; - for(n=1; z[n] && z[n]!=':' && !sqlite3Isspace(z[n]); n++){} + int Y,M,D,h,m,x; + const char *z2 = z; + char z0 = z[0]; + for(n=1; z[n]; n++){ + if( z[n]==':' ) break; + if( sqlite3Isspace(z[n]) ) break; + if( z[n]=='-' ){ + if( n==5 && getDigits(&z[1], "40f", &Y)==1 ) break; + if( n==6 && getDigits(&z[1], "50f", &Y)==1 ) break; + } + } if( sqlite3AtoF(z, &r, n, SQLITE_UTF8)<=0 ){ - rc = 1; + assert( rc==1 ); break; } - if( z[n]==':' ){ + if( z[n]=='-' ){ + /* A modifier of the form (+|-)YYYY-MM-DD adds or subtracts the + ** specified number of years, months, and days. MM is limited to + ** the range 0-11 and DD is limited to 0-30. + */ + if( z0!='+' && z0!='-' ) break; /* Must start with +/- */ + if( n==5 ){ + if( getDigits(&z[1], "40f-20a-20d", &Y, &M, &D)!=3 ) break; + }else{ + assert( n==6 ); + if( getDigits(&z[1], "50f-20a-20d", &Y, &M, &D)!=3 ) break; + z++; + } + if( M>=12 ) break; /* M range 0..11 */ + if( D>=31 ) break; /* D range 0..30 */ + computeYMD_HMS(p); + p->validJD = 0; + if( z0=='-' ){ + p->Y -= Y; + p->M -= M; + D = -D; + }else{ + p->Y += Y; + p->M += M; + } + x = p->M>0 ? (p->M-1)/12 : (p->M-12)/12; + p->Y += x; + p->M -= x*12; + computeJD(p); + p->validHMS = 0; + p->validYMD = 0; + p->iJD += (i64)D*86400000; + if( z[11]==0 ){ + rc = 0; + break; + } + if( sqlite3Isspace(z[11]) + && getDigits(&z[12], "20c:20e", &h, &m)==2 + ){ + z2 = &z[12]; + n = 2; + }else{ + break; + } + } + if( z2[n]==':' ){ /* A modifier of the form (+|-)HH:MM:SS.FFF adds (or subtracts) the ** specified number of hours, minutes, seconds, and fractional seconds ** to the time. The ".FFF" may be omitted. The ":SS.FFF" may be ** omitted. */ - const char *z2 = z; + DateTime tx; sqlite3_int64 day; if( !sqlite3Isdigit(*z2) ) z2++; @@ -24261,7 +24717,7 @@ static int parseModifier( tx.iJD -= 43200000; day = tx.iJD/86400000; tx.iJD -= day*86400000; - if( z[0]=='-' ) tx.iJD = -tx.iJD; + if( z0=='-' ) tx.iJD = -tx.iJD; computeJD(p); clearYMD_HMS_TZ(p); p->iJD += tx.iJD; @@ -24277,7 +24733,7 @@ static int parseModifier( if( n>10 || n<3 ) break; if( sqlite3UpperToLower[(u8)z[n-1]]=='s' ) n--; computeJD(p); - rc = 1; + assert( rc==1 ); rRounder = r<0 ? -0.5 : +0.5; for(i=0; iM += (int)r; @@ -24402,7 +24857,11 @@ static void unixepochFunc( DateTime x; if( isDate(context, argc, argv, &x)==0 ){ computeJD(&x); - sqlite3_result_int64(context, x.iJD/1000 - 21086676*(i64)10000); + if( x.useSubsec ){ + sqlite3_result_double(context, (x.iJD - 21086676*(i64)10000000)/1000.0); + }else{ + sqlite3_result_int64(context, x.iJD/1000 - 21086676*(i64)10000); + } } } @@ -24418,8 +24877,8 @@ static void datetimeFunc( ){ DateTime x; if( isDate(context, argc, argv, &x)==0 ){ - int Y, s; - char zBuf[24]; + int Y, s, n; + char zBuf[32]; computeYMD_HMS(&x); Y = x.Y; if( Y<0 ) Y = -Y; @@ -24440,15 +24899,28 @@ static void datetimeFunc( zBuf[15] = '0' + (x.m/10)%10; zBuf[16] = '0' + (x.m)%10; zBuf[17] = ':'; - s = (int)x.s; - zBuf[18] = '0' + (s/10)%10; - zBuf[19] = '0' + (s)%10; - zBuf[20] = 0; + if( x.useSubsec ){ + s = (int)(1000.0*x.s + 0.5); + zBuf[18] = '0' + (s/10000)%10; + zBuf[19] = '0' + (s/1000)%10; + zBuf[20] = '.'; + zBuf[21] = '0' + (s/100)%10; + zBuf[22] = '0' + (s/10)%10; + zBuf[23] = '0' + (s)%10; + zBuf[24] = 0; + n = 24; + }else{ + s = (int)x.s; + zBuf[18] = '0' + (s/10)%10; + zBuf[19] = '0' + (s)%10; + zBuf[20] = 0; + n = 20; + } if( x.Y<0 ){ zBuf[0] = '-'; - sqlite3_result_text(context, zBuf, 20, SQLITE_TRANSIENT); + sqlite3_result_text(context, zBuf, n, SQLITE_TRANSIENT); }else{ - sqlite3_result_text(context, &zBuf[1], 19, SQLITE_TRANSIENT); + sqlite3_result_text(context, &zBuf[1], n-1, SQLITE_TRANSIENT); } } } @@ -24465,7 +24937,7 @@ static void timeFunc( ){ DateTime x; if( isDate(context, argc, argv, &x)==0 ){ - int s; + int s, n; char zBuf[16]; computeHMS(&x); zBuf[0] = '0' + (x.h/10)%10; @@ -24474,11 +24946,24 @@ static void timeFunc( zBuf[3] = '0' + (x.m/10)%10; zBuf[4] = '0' + (x.m)%10; zBuf[5] = ':'; - s = (int)x.s; - zBuf[6] = '0' + (s/10)%10; - zBuf[7] = '0' + (s)%10; - zBuf[8] = 0; - sqlite3_result_text(context, zBuf, 8, SQLITE_TRANSIENT); + if( x.useSubsec ){ + s = (int)(1000.0*x.s + 0.5); + zBuf[6] = '0' + (s/10000)%10; + zBuf[7] = '0' + (s/1000)%10; + zBuf[8] = '.'; + zBuf[9] = '0' + (s/100)%10; + zBuf[10] = '0' + (s/10)%10; + zBuf[11] = '0' + (s)%10; + zBuf[12] = 0; + n = 12; + }else{ + s = (int)x.s; + zBuf[6] = '0' + (s/10)%10; + zBuf[7] = '0' + (s)%10; + zBuf[8] = 0; + n = 8; + } + sqlite3_result_text(context, zBuf, n, SQLITE_TRANSIENT); } } @@ -24533,7 +25018,7 @@ static void dateFunc( ** %M minute 00-59 ** %s seconds since 1970-01-01 ** %S seconds 00-59 -** %w day of week 0-6 sunday==0 +** %w day of week 0-6 Sunday==0 ** %W week of year 00-53 ** %Y year 0000-9999 ** %% % @@ -24609,8 +25094,13 @@ static void strftimeFunc( break; } case 's': { - i64 iS = (i64)(x.iJD/1000 - 21086676*(i64)10000); - sqlite3_str_appendf(&sRes,"%lld",iS); + if( x.useSubsec ){ + sqlite3_str_appendf(&sRes,"%.3f", + (x.iJD - 21086676*(i64)10000000)/1000.0); + }else{ + i64 iS = (i64)(x.iJD/1000 - 21086676*(i64)10000); + sqlite3_str_appendf(&sRes,"%lld",iS); + } break; } case 'S': { @@ -24668,6 +25158,117 @@ static void cdateFunc( dateFunc(context, 0, 0); } +/* +** timediff(DATE1, DATE2) +** +** Return the amount of time that must be added to DATE2 in order to +** convert it into DATE2. The time difference format is: +** +** +YYYY-MM-DD HH:MM:SS.SSS +** +** The initial "+" becomes "-" if DATE1 occurs before DATE2. For +** date/time values A and B, the following invariant should hold: +** +** datetime(A) == (datetime(B, timediff(A,B)) +** +** Both DATE arguments must be either a julian day number, or an +** ISO-8601 string. The unix timestamps are not supported by this +** routine. +*/ +static void timediffFunc( + sqlite3_context *context, + int NotUsed1, + sqlite3_value **argv +){ + char sign; + int Y, M; + DateTime d1, d2; + sqlite3_str sRes; + UNUSED_PARAMETER(NotUsed1); + if( isDate(context, 1, &argv[0], &d1) ) return; + if( isDate(context, 1, &argv[1], &d2) ) return; + computeYMD_HMS(&d1); + computeYMD_HMS(&d2); + if( d1.iJD>=d2.iJD ){ + sign = '+'; + Y = d1.Y - d2.Y; + if( Y ){ + d2.Y = d1.Y; + d2.validJD = 0; + computeJD(&d2); + } + M = d1.M - d2.M; + if( M<0 ){ + Y--; + M += 12; + } + if( M!=0 ){ + d2.M = d1.M; + d2.validJD = 0; + computeJD(&d2); + } + while( d1.iJDd2.iJD ){ + M--; + if( M<0 ){ + M = 11; + Y--; + } + d2.M++; + if( d2.M>12 ){ + d2.M = 1; + d2.Y++; + } + d2.validJD = 0; + computeJD(&d2); + } + d1.iJD = d2.iJD - d1.iJD; + d1.iJD += (u64)1486995408 * (u64)100000; + } + d1.validYMD = 0; + d1.validHMS = 0; + d1.validTZ = 0; + computeYMD_HMS(&d1); + sqlite3StrAccumInit(&sRes, 0, 0, 0, 100); + sqlite3_str_appendf(&sRes, "%c%04d-%02d-%02d %02d:%02d:%06.3f", + sign, Y, M, d1.D-1, d1.h, d1.m, d1.s); + sqlite3ResultStrAccum(context, &sRes); +} + + /* ** current_timestamp() ** @@ -24742,6 +25343,7 @@ SQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void){ PURE_DATE(time, -1, 0, 0, timeFunc ), PURE_DATE(datetime, -1, 0, 0, datetimeFunc ), PURE_DATE(strftime, -1, 0, 0, strftimeFunc ), + PURE_DATE(timediff, 2, 0, 0, timediffFunc ), DFUNCTION(current_time, 0, 0, 0, ctimeFunc ), DFUNCTION(current_timestamp, 0, 0, 0, ctimestampFunc), DFUNCTION(current_date, 0, 0, 0, cdateFunc ), @@ -24895,7 +25497,7 @@ SQLITE_PRIVATE int sqlite3OsFileControl(sqlite3_file *id, int op, void *pArg){ /* Faults are not injected into COMMIT_PHASETWO because, assuming SQLite ** is using a regular VFS, it is called after the corresponding ** transaction has been committed. Injecting a fault at this point - ** confuses the test scripts - the COMMIT comand returns SQLITE_NOMEM + ** confuses the test scripts - the COMMIT command returns SQLITE_NOMEM ** but the transaction is committed anyway. ** ** The core must call OsFileControl() though, not OsFileControlHint(), @@ -25516,7 +26118,7 @@ static void *sqlite3MemMalloc(int nByte){ ** or sqlite3MemRealloc(). ** ** For this low-level routine, we already know that pPrior!=0 since -** cases where pPrior==0 will have been intecepted and dealt with +** cases where pPrior==0 will have been intercepted and dealt with ** by higher-level routines. */ static void sqlite3MemFree(void *pPrior){ @@ -25604,7 +26206,7 @@ static int sqlite3MemInit(void *NotUsed){ return SQLITE_OK; } len = sizeof(cpuCount); - /* One usually wants to use hw.acctivecpu for MT decisions, but not here */ + /* One usually wants to use hw.activecpu for MT decisions, but not here */ sysctlbyname("hw.ncpu", &cpuCount, &len, NULL, 0); if( cpuCount>1 ){ /* defer MT decisions to system malloc */ @@ -28071,7 +28673,7 @@ SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){ /* ** The sqlite3_mutex.id, sqlite3_mutex.nRef, and sqlite3_mutex.owner fields -** are necessary under two condidtions: (1) Debug builds and (2) using +** are necessary under two conditions: (1) Debug builds and (2) using ** home-grown mutexes. Encapsulate these conditions into a single #define. */ #if defined(SQLITE_DEBUG) || defined(SQLITE_HOMEGROWN_RECURSIVE_MUTEX) @@ -28572,7 +29174,7 @@ struct sqlite3_mutex { CRITICAL_SECTION mutex; /* Mutex controlling the lock */ int id; /* Mutex type */ #ifdef SQLITE_DEBUG - volatile int nRef; /* Number of enterances */ + volatile int nRef; /* Number of entrances */ volatile DWORD owner; /* Thread holding this mutex */ volatile LONG trace; /* True to trace changes */ #endif @@ -29215,7 +29817,7 @@ static void mallocWithAlarm(int n, void **pp){ ** The upper bound is slightly less than 2GiB: 0x7ffffeff == 2,147,483,391 ** This provides a 256-byte safety margin for defense against 32-bit ** signed integer overflow bugs when computing memory allocation sizes. -** Parnoid applications might want to reduce the maximum allocation size +** Paranoid applications might want to reduce the maximum allocation size ** further for an even larger safety margin. 0x3fffffff or 0x0fffffff ** or even smaller would be reasonable upper bounds on the size of a memory ** allocations for most applications. @@ -29729,9 +30331,14 @@ SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3 *db, const char *z, u64 n){ */ SQLITE_PRIVATE char *sqlite3DbSpanDup(sqlite3 *db, const char *zStart, const char *zEnd){ int n; +#ifdef SQLITE_DEBUG + /* Because of the way the parser works, the span is guaranteed to contain + ** at least one non-space character */ + for(n=0; sqlite3Isspace(zStart[n]); n++){ assert( &zStart[n]0) && sqlite3Isspace(zStart[n-1]) ) n--; + while( sqlite3Isspace(zStart[n-1]) ) n--; return sqlite3DbStrNDup(db, zStart, n); } @@ -29939,43 +30546,6 @@ static const et_info fmtinfo[] = { ** %!S Like %S but prefer the zName over the zAlias */ -/* Floating point constants used for rounding */ -static const double arRound[] = { - 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, - 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, -}; - -/* -** If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point -** conversions will work. -*/ -#ifndef SQLITE_OMIT_FLOATING_POINT -/* -** "*val" is a double such that 0.1 <= *val < 10.0 -** Return the ascii code for the leading digit of *val, then -** multiply "*val" by 10.0 to renormalize. -** -** Example: -** input: *val = 3.14159 -** output: *val = 1.4159 function return = '3' -** -** The counter *cnt is incremented each time. After counter exceeds -** 16 (the number of significant digits in a 64-bit float) '0' is -** always returned. -*/ -static char et_getdigit(LONGDOUBLE_TYPE *val, int *cnt){ - int digit; - LONGDOUBLE_TYPE d; - if( (*cnt)<=0 ) return '0'; - (*cnt)--; - digit = (int)*val; - d = digit; - digit += '0'; - *val = (*val - d)*10.0; - return (char)digit; -} -#endif /* SQLITE_OMIT_FLOATING_POINT */ - /* ** Set the StrAccum object to an error mode. */ @@ -30067,18 +30637,15 @@ SQLITE_API void sqlite3_str_vappendf( u8 bArgList; /* True for SQLITE_PRINTF_SQLFUNC */ char prefix; /* Prefix character. "+" or "-" or " " or '\0'. */ sqlite_uint64 longvalue; /* Value for integer types */ - LONGDOUBLE_TYPE realvalue; /* Value for real types */ + double realvalue; /* Value for real types */ const et_info *infop; /* Pointer to the appropriate info structure */ char *zOut; /* Rendering buffer */ int nOut; /* Size of the rendering buffer */ char *zExtra = 0; /* Malloced memory used by some conversion */ -#ifndef SQLITE_OMIT_FLOATING_POINT - int exp, e2; /* exponent of real numbers */ - int nsd; /* Number of significant digits returned */ - double rounder; /* Used for rounding floating point values */ + int exp, e2; /* exponent of real numbers */ etByte flag_dp; /* True if decimal point should be shown */ etByte flag_rtz; /* True if trailing zeros should be removed */ -#endif + PrintfArguments *pArgList = 0; /* Arguments for SQLITE_PRINTF_SQLFUNC */ char buf[etBUFSIZE]; /* Conversion buffer */ @@ -30353,73 +30920,66 @@ SQLITE_API void sqlite3_str_vappendf( break; case etFLOAT: case etEXP: - case etGENERIC: + case etGENERIC: { + FpDecode s; + int iRound; + int j; + if( bArgList ){ realvalue = getDoubleArg(pArgList); }else{ realvalue = va_arg(ap,double); } -#ifdef SQLITE_OMIT_FLOATING_POINT - length = 0; -#else if( precision<0 ) precision = 6; /* Set default precision */ #ifdef SQLITE_FP_PRECISION_LIMIT if( precision>SQLITE_FP_PRECISION_LIMIT ){ precision = SQLITE_FP_PRECISION_LIMIT; } #endif - if( realvalue<0.0 ){ - realvalue = -realvalue; - prefix = '-'; - }else{ - prefix = flag_prefix; - } - if( xtype==etGENERIC && precision>0 ) precision--; - testcase( precision>0xfff ); - idx = precision & 0xfff; - rounder = arRound[idx%10]; - while( idx>=10 ){ rounder *= 1.0e-10; idx -= 10; } if( xtype==etFLOAT ){ - double rx = (double)realvalue; - sqlite3_uint64 u; - int ex; - memcpy(&u, &rx, sizeof(u)); - ex = -1023 + (int)((u>>52)&0x7ff); - if( precision+(ex/3) < 15 ) rounder += realvalue*3e-16; - realvalue += rounder; - } - /* Normalize realvalue to within 10.0 > realvalue >= 1.0 */ - exp = 0; - if( sqlite3IsNaN((double)realvalue) ){ - bufpt = "NaN"; - length = 3; - break; + iRound = -precision; + }else if( xtype==etGENERIC ){ + iRound = precision; + }else{ + iRound = precision+1; } - if( realvalue>0.0 ){ - LONGDOUBLE_TYPE scale = 1.0; - while( realvalue>=1e100*scale && exp<=350 ){ scale *= 1e100;exp+=100;} - while( realvalue>=1e10*scale && exp<=350 ){ scale *= 1e10; exp+=10; } - while( realvalue>=10.0*scale && exp<=350 ){ scale *= 10.0; exp++; } - realvalue /= scale; - while( realvalue<1e-8 ){ realvalue *= 1e8; exp-=8; } - while( realvalue<1.0 ){ realvalue *= 10.0; exp--; } - if( exp>350 ){ + sqlite3FpDecode(&s, realvalue, iRound, flag_altform2 ? 26 : 16); + if( s.isSpecial ){ + if( s.isSpecial==2 ){ + bufpt = flag_zeropad ? "null" : "NaN"; + length = sqlite3Strlen30(bufpt); + break; + }else if( flag_zeropad ){ + s.z[0] = '9'; + s.iDP = 1000; + s.n = 1; + }else{ + memcpy(buf, "-Inf", 5); bufpt = buf; - buf[0] = prefix; - memcpy(buf+(prefix!=0),"Inf",4); - length = 3+(prefix!=0); + if( s.sign=='-' ){ + /* no-op */ + }else if( flag_prefix ){ + buf[0] = flag_prefix; + }else{ + bufpt++; + } + length = sqlite3Strlen30(bufpt); break; } } - bufpt = buf; + if( s.sign=='-' ){ + prefix = '-'; + }else{ + prefix = flag_prefix; + } + + exp = s.iDP-1; + if( xtype==etGENERIC && precision>0 ) precision--; + /* ** If the field type is etGENERIC, then convert to either etEXP ** or etFLOAT, as appropriate. */ - if( xtype!=etFLOAT ){ - realvalue += rounder; - if( realvalue>=10.0 ){ realvalue *= 0.1; exp++; } - } if( xtype==etGENERIC ){ flag_rtz = !flag_alternateform; if( exp<-4 || exp>precision ){ @@ -30434,29 +30994,32 @@ SQLITE_API void sqlite3_str_vappendf( if( xtype==etEXP ){ e2 = 0; }else{ - e2 = exp; + e2 = s.iDP - 1; } + bufpt = buf; { i64 szBufNeeded; /* Size of a temporary buffer needed */ szBufNeeded = MAX(e2,0)+(i64)precision+(i64)width+15; + if( cThousand && e2>0 ) szBufNeeded += (e2+2)/3; if( szBufNeeded > etBUFSIZE ){ bufpt = zExtra = printfTempBuf(pAccum, szBufNeeded); if( bufpt==0 ) return; } } zOut = bufpt; - nsd = 16 + flag_altform2*10; flag_dp = (precision>0 ?1:0) | flag_alternateform | flag_altform2; /* The sign in front of the number */ if( prefix ){ *(bufpt++) = prefix; } /* Digits prior to the decimal point */ + j = 0; if( e2<0 ){ *(bufpt++) = '0'; }else{ for(; e2>=0; e2--){ - *(bufpt++) = et_getdigit(&realvalue,&nsd); + *(bufpt++) = j1 ) *(bufpt++) = ','; } } /* The decimal point */ @@ -30465,13 +31028,12 @@ SQLITE_API void sqlite3_str_vappendf( } /* "0" digits after the decimal point but before the first ** significant digit of the number */ - for(e2++; e2<0; precision--, e2++){ - assert( precision>0 ); + for(e2++; e2<0 && precision>0; precision--, e2++){ *(bufpt++) = '0'; } /* Significant digits after the decimal point */ while( (precision--)>0 ){ - *(bufpt++) = et_getdigit(&realvalue,&nsd); + *(bufpt++) = jcharset]; if( exp<0 ){ *(bufpt++) = '-'; exp = -exp; @@ -30520,8 +31083,8 @@ SQLITE_API void sqlite3_str_vappendf( while( nPad-- ) bufpt[i++] = '0'; length = width; } -#endif /* !defined(SQLITE_OMIT_FLOATING_POINT) */ break; + } case etSIZE: if( !bArgList ){ *(va_arg(ap,int*)) = pAccum->nChar; @@ -30570,13 +31133,26 @@ SQLITE_API void sqlite3_str_vappendf( } } if( precision>1 ){ + i64 nPrior = 1; width -= precision-1; if( width>1 && !flag_leftjustify ){ sqlite3_str_appendchar(pAccum, width-1, ' '); width = 0; } - while( precision-- > 1 ){ - sqlite3_str_append(pAccum, buf, length); + sqlite3_str_append(pAccum, buf, length); + precision--; + while( precision > 1 ){ + i64 nCopyBytes; + if( nPrior > precision-1 ) nPrior = precision - 1; + nCopyBytes = length*nPrior; + if( nCopyBytes + pAccum->nChar >= pAccum->nAlloc ){ + sqlite3StrAccumEnlarge(pAccum, nCopyBytes); + } + if( pAccum->accError ) break; + sqlite3_str_append(pAccum, + &pAccum->zText[pAccum->nChar-nCopyBytes], nCopyBytes); + precision -= nPrior; + nPrior *= 2; } } bufpt = buf; @@ -30804,9 +31380,9 @@ SQLITE_PRIVATE void sqlite3RecordErrorOffsetOfExpr(sqlite3 *db, const Expr *pExp ** Return the number of bytes of text that StrAccum is able to accept ** after the attempted enlargement. The value returned might be zero. */ -SQLITE_PRIVATE int sqlite3StrAccumEnlarge(StrAccum *p, int N){ +SQLITE_PRIVATE int sqlite3StrAccumEnlarge(StrAccum *p, i64 N){ char *zNew; - assert( p->nChar+(i64)N >= p->nAlloc ); /* Only called if really needed */ + assert( p->nChar+N >= p->nAlloc ); /* Only called if really needed */ if( p->accError ){ testcase(p->accError==SQLITE_TOOBIG); testcase(p->accError==SQLITE_NOMEM); @@ -30817,8 +31393,7 @@ SQLITE_PRIVATE int sqlite3StrAccumEnlarge(StrAccum *p, int N){ return p->nAlloc - p->nChar - 1; }else{ char *zOld = isMalloced(p) ? p->zText : 0; - i64 szNew = p->nChar; - szNew += (sqlite3_int64)N + 1; + i64 szNew = p->nChar + N + 1; if( szNew+p->nChar<=p->mxAlloc ){ /* Force exponential buffer size growth as long as it does not overflow, ** to avoid having to call this routine too often */ @@ -30848,7 +31423,8 @@ SQLITE_PRIVATE int sqlite3StrAccumEnlarge(StrAccum *p, int N){ return 0; } } - return N; + assert( N>=0 && N<=0x7fffffff ); + return (int)N; } /* @@ -31139,12 +31715,22 @@ SQLITE_API char *sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_li return zBuf; } SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){ - char *z; + StrAccum acc; va_list ap; + if( n<=0 ) return zBuf; +#ifdef SQLITE_ENABLE_API_ARMOR + if( zBuf==0 || zFormat==0 ) { + (void)SQLITE_MISUSE_BKPT; + if( zBuf ) zBuf[0] = 0; + return zBuf; + } +#endif + sqlite3StrAccumInit(&acc, 0, zBuf, n, 0); va_start(ap,zFormat); - z = sqlite3_vsnprintf(n, zBuf, zFormat, ap); + sqlite3_str_vappendf(&acc, zFormat, ap); va_end(ap); - return z; + zBuf[acc.nChar] = 0; + return zBuf; } /* @@ -31222,6 +31808,75 @@ SQLITE_API void sqlite3_str_appendf(StrAccum *p, const char *zFormat, ...){ va_end(ap); } + +/***************************************************************************** +** Reference counted string storage +*****************************************************************************/ + +/* +** Increase the reference count of the string by one. +** +** The input parameter is returned. +*/ +SQLITE_PRIVATE char *sqlite3RCStrRef(char *z){ + RCStr *p = (RCStr*)z; + assert( p!=0 ); + p--; + p->nRCRef++; + return z; +} + +/* +** Decrease the reference count by one. Free the string when the +** reference count reaches zero. +*/ +SQLITE_PRIVATE void sqlite3RCStrUnref(char *z){ + RCStr *p = (RCStr*)z; + assert( p!=0 ); + p--; + assert( p->nRCRef>0 ); + if( p->nRCRef>=2 ){ + p->nRCRef--; + }else{ + sqlite3_free(p); + } +} + +/* +** Create a new string that is capable of holding N bytes of text, not counting +** the zero byte at the end. The string is uninitialized. +** +** The reference count is initially 1. Call sqlite3RCStrUnref() to free the +** newly allocated string. +** +** This routine returns 0 on an OOM. +*/ +SQLITE_PRIVATE char *sqlite3RCStrNew(u64 N){ + RCStr *p = sqlite3_malloc64( N + sizeof(*p) + 1 ); + if( p==0 ) return 0; + p->nRCRef = 1; + return (char*)&p[1]; +} + +/* +** Change the size of the string so that it is able to hold N bytes. +** The string might be reallocated, so return the new allocation. +*/ +SQLITE_PRIVATE char *sqlite3RCStrResize(char *z, u64 N){ + RCStr *p = (RCStr*)z; + RCStr *pNew; + assert( p!=0 ); + p--; + assert( p->nRCRef==1 ); + pNew = sqlite3_realloc64(p, N+sizeof(RCStr)+1); + if( pNew==0 ){ + sqlite3_free(p); + return 0; + }else{ + return (char*)&pNew[1]; + } +} + /************** End of printf.c **********************************************/ /************** Begin file treeview.c ****************************************/ /* @@ -31444,6 +32099,13 @@ SQLITE_PRIVATE void sqlite3TreeViewSrcList(TreeView *pView, const SrcList *pSrc) if( pItem->fg.isOn || (pItem->fg.isUsing==0 && pItem->u3.pOn!=0) ){ sqlite3_str_appendf(&x, " ON"); } + if( pItem->fg.isTabFunc ) sqlite3_str_appendf(&x, " isTabFunc"); + if( pItem->fg.isCorrelated ) sqlite3_str_appendf(&x, " isCorrelated"); + if( pItem->fg.isMaterialized ) sqlite3_str_appendf(&x, " isMaterialized"); + if( pItem->fg.viaCoroutine ) sqlite3_str_appendf(&x, " viaCoroutine"); + if( pItem->fg.notCte ) sqlite3_str_appendf(&x, " notCte"); + if( pItem->fg.isNestedFrom ) sqlite3_str_appendf(&x, " isNestedFrom"); + sqlite3StrAccumFinish(&x); sqlite3TreeViewItem(pView, zLine, inSrc-1); n = 0; @@ -31713,7 +32375,7 @@ SQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 m sqlite3TreeViewPop(&pView); return; } - if( pExpr->flags || pExpr->affExpr || pExpr->vvaFlags ){ + if( pExpr->flags || pExpr->affExpr || pExpr->vvaFlags || pExpr->pAggInfo ){ StrAccum x; sqlite3StrAccumInit(&x, 0, zFlgs, sizeof(zFlgs), 0); sqlite3_str_appendf(&x, " fg.af=%x.%c", @@ -31730,6 +32392,9 @@ SQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 m if( ExprHasVVAProperty(pExpr, EP_Immutable) ){ sqlite3_str_appendf(&x, " IMMUTABLE"); } + if( pExpr->pAggInfo!=0 ){ + sqlite3_str_appendf(&x, " agg-column[%d]", pExpr->iAgg); + } sqlite3StrAccumFinish(&x); }else{ zFlgs[0] = 0; @@ -31859,7 +32524,8 @@ SQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 m }; assert( pExpr->op2==TK_IS || pExpr->op2==TK_ISNOT ); assert( pExpr->pRight ); - assert( sqlite3ExprSkipCollate(pExpr->pRight)->op==TK_TRUEFALSE ); + assert( sqlite3ExprSkipCollateAndLikely(pExpr->pRight)->op + == TK_TRUEFALSE ); x = (pExpr->op2==TK_ISNOT)*2 + sqlite3ExprTruthValue(pExpr->pRight); zUniOp = azOp[x]; break; @@ -33518,7 +34184,7 @@ SQLITE_PRIVATE void sqlite3UtfSelfTest(void){ /* ** Calls to sqlite3FaultSim() are used to simulate a failure during testing, ** or to bypass normal error detection during testing in order to let -** execute proceed futher downstream. +** execute proceed further downstream. ** ** In deployment, sqlite3FaultSim() *always* return SQLITE_OK (0). The ** sqlite3FaultSim() function only returns non-zero during testing. @@ -33635,6 +34301,23 @@ SQLITE_PRIVATE void sqlite3ErrorClear(sqlite3 *db){ */ SQLITE_PRIVATE void sqlite3SystemError(sqlite3 *db, int rc){ if( rc==SQLITE_IOERR_NOMEM ) return; +#ifdef SQLITE_USE_SEH + if( rc==SQLITE_IOERR_IN_PAGE ){ + int ii; + int iErr; + sqlite3BtreeEnterAll(db); + for(ii=0; iinDb; ii++){ + if( db->aDb[ii].pBt ){ + iErr = sqlite3PagerWalSystemErrno(sqlite3BtreePager(db->aDb[ii].pBt)); + if( iErr ){ + db->iSysErrno = iErr; + } + } + } + sqlite3BtreeLeaveAll(db); + return; + } +#endif rc &= 0xff; if( rc==SQLITE_CANTOPEN || rc==SQLITE_IOERR ){ db->iSysErrno = sqlite3OsGetLastError(db->pVfs); @@ -33669,6 +34352,26 @@ SQLITE_PRIVATE void sqlite3ErrorWithMsg(sqlite3 *db, int err_code, const char *z } } +/* +** Check for interrupts and invoke progress callback. +*/ +SQLITE_PRIVATE void sqlite3ProgressCheck(Parse *p){ + sqlite3 *db = p->db; + if( AtomicLoad(&db->u1.isInterrupted) ){ + p->nErr++; + p->rc = SQLITE_INTERRUPT; + } +#ifndef SQLITE_OMIT_PROGRESS_CALLBACK + if( db->xProgress && (++p->nProgressSteps)>=db->nProgressOps ){ + if( db->xProgress(db->pProgressArg) ){ + p->nErr++; + p->rc = SQLITE_INTERRUPT; + } + p->nProgressSteps = 0; + } +#endif +} + /* ** Add an error message to pParse->zErrMsg and increment pParse->nErr. ** @@ -33860,43 +34563,40 @@ SQLITE_PRIVATE u8 sqlite3StrIHash(const char *z){ return h; } -/* -** Compute 10 to the E-th power. Examples: E==1 results in 10. -** E==2 results in 100. E==50 results in 1.0e50. +/* Double-Double multiplication. (x[0],x[1]) *= (y,yy) ** -** This routine only works for values of E between 1 and 341. +** Reference: +** T. J. Dekker, "A Floating-Point Technique for Extending the +** Available Precision". 1971-07-26. */ -static LONGDOUBLE_TYPE sqlite3Pow10(int E){ -#if defined(_MSC_VER) - static const LONGDOUBLE_TYPE x[] = { - 1.0e+001L, - 1.0e+002L, - 1.0e+004L, - 1.0e+008L, - 1.0e+016L, - 1.0e+032L, - 1.0e+064L, - 1.0e+128L, - 1.0e+256L - }; - LONGDOUBLE_TYPE r = 1.0; - int i; - assert( E>=0 && E<=307 ); - for(i=0; E!=0; i++, E >>=1){ - if( E & 1 ) r *= x[i]; - } - return r; -#else - LONGDOUBLE_TYPE x = 10.0; - LONGDOUBLE_TYPE r = 1.0; - while(1){ - if( E & 1 ) r *= x; - E >>= 1; - if( E==0 ) break; - x *= x; - } - return r; -#endif +static void dekkerMul2(volatile double *x, double y, double yy){ + /* + ** The "volatile" keywords on parameter x[] and on local variables + ** below are needed force intermediate results to be truncated to + ** binary64 rather than be carried around in an extended-precision + ** format. The truncation is necessary for the Dekker algorithm to + ** work. Intel x86 floating point might omit the truncation without + ** the use of volatile. + */ + volatile double tx, ty, p, q, c, cc; + double hx, hy; + u64 m; + memcpy(&m, (void*)&x[0], 8); + m &= 0xfffffffffc000000LL; + memcpy(&hx, &m, 8); + tx = x[0] - hx; + memcpy(&m, &y, 8); + m &= 0xfffffffffc000000LL; + memcpy(&hy, &m, 8); + ty = y - hy; + p = hx*hy; + q = hx*ty + tx*hy; + c = p+q; + cc = p - c + q + tx*ty; + cc = x[0]*yy + x[1]*y + cc; + x[0] = c + cc; + x[1] = c - x[0]; + x[1] += cc; } /* @@ -33937,12 +34637,11 @@ SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 en const char *zEnd; /* sign * significand * (10 ^ (esign * exponent)) */ int sign = 1; /* sign of significand */ - i64 s = 0; /* significand */ + u64 s = 0; /* significand */ int d = 0; /* adjust exponent for shifting decimal point */ int esign = 1; /* sign of exponent */ int e = 0; /* exponent */ int eValid = 1; /* True exponent is either not used or is well-formed */ - double result; int nDigit = 0; /* Number of digits processed */ int eType = 1; /* 1: pure integer, 2+: fractional -1 or less: bad UTF16 */ @@ -33982,7 +34681,7 @@ SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 en while( z=((LARGEST_INT64-9)/10) ){ + if( s>=((LARGEST_UINT64-9)/10) ){ /* skip non-significant significand digits ** (increase exponent by d to shift decimal left) */ while( z0 ){ /*OPTIMIZATION-IF-TRUE*/ - if( esign>0 ){ - if( s>=(LARGEST_INT64/10) ) break; /*OPTIMIZATION-IF-FALSE*/ - s *= 10; - }else{ - if( s%10!=0 ) break; /*OPTIMIZATION-IF-FALSE*/ - s /= 10; - } - e--; - } + /* adjust exponent by d, and update sign */ + e = (e*esign) + d; - /* adjust the sign of significand */ - s = sign<0 ? -s : s; + /* Try to adjust the exponent to make it smaller */ + while( e>0 && s<(LARGEST_UINT64/10) ){ + s *= 10; + e--; + } + while( e<0 && (s%10)==0 ){ + s /= 10; + e++; + } - if( e==0 ){ /*OPTIMIZATION-IF-TRUE*/ - result = (double)s; + if( e==0 ){ + *pResult = s; + }else if( sqlite3Config.bUseLongDouble ){ + LONGDOUBLE_TYPE r = (LONGDOUBLE_TYPE)s; + if( e>0 ){ + while( e>=100 ){ e-=100; r *= 1.0e+100L; } + while( e>=10 ){ e-=10; r *= 1.0e+10L; } + while( e>=1 ){ e-=1; r *= 1.0e+01L; } }else{ - /* attempt to handle extremely small/large numbers better */ - if( e>307 ){ /*OPTIMIZATION-IF-TRUE*/ - if( e<342 ){ /*OPTIMIZATION-IF-TRUE*/ - LONGDOUBLE_TYPE scale = sqlite3Pow10(e-308); - if( esign<0 ){ - result = s / scale; - result /= 1.0e+308; - }else{ - result = s * scale; - result *= 1.0e+308; - } - }else{ assert( e>=342 ); - if( esign<0 ){ - result = 0.0*s; - }else{ + while( e<=-100 ){ e+=100; r *= 1.0e-100L; } + while( e<=-10 ){ e+=10; r *= 1.0e-10L; } + while( e<=-1 ){ e+=1; r *= 1.0e-01L; } + } + assert( r>=0.0 ); + if( r>+1.7976931348623157081452742373e+308L ){ #ifdef INFINITY - result = INFINITY*s; + *pResult = +INFINITY; #else - result = 1e308*1e308*s; /* Infinity */ + *pResult = 1.0e308*10.0; #endif - } - } - }else{ - LONGDOUBLE_TYPE scale = sqlite3Pow10(e); - if( esign<0 ){ - result = s / scale; - }else{ - result = s * scale; - } + }else{ + *pResult = (double)r; + } + }else{ + double rr[2]; + u64 s2; + rr[0] = (double)s; + s2 = (u64)rr[0]; + rr[1] = s>=s2 ? (double)(s - s2) : -(double)(s2 - s); + if( e>0 ){ + while( e>=100 ){ + e -= 100; + dekkerMul2(rr, 1.0e+100, -1.5902891109759918046e+83); + } + while( e>=10 ){ + e -= 10; + dekkerMul2(rr, 1.0e+10, 0.0); + } + while( e>=1 ){ + e -= 1; + dekkerMul2(rr, 1.0e+01, 0.0); + } + }else{ + while( e<=-100 ){ + e += 100; + dekkerMul2(rr, 1.0e-100, -1.99918998026028836196e-117); + } + while( e<=-10 ){ + e += 10; + dekkerMul2(rr, 1.0e-10, -3.6432197315497741579e-27); + } + while( e<=-1 ){ + e += 1; + dekkerMul2(rr, 1.0e-01, -5.5511151231257827021e-18); } } + *pResult = rr[0]+rr[1]; + if( sqlite3IsNaN(*pResult) ) *pResult = 1e300*1e300; } + if( sign<0 ) *pResult = -*pResult; + assert( !sqlite3IsNaN(*pResult) ); - /* store the result */ - *pResult = result; - - /* return true if number and no extra non-whitespace chracters after */ +atof_return: + /* return true if number and no extra non-whitespace characters after */ if( z==zEnd && nDigit>0 && eValid && eType>0 ){ return eType; }else if( eType>=2 && (eType==3 || eValid) && nDigit>0 ){ @@ -34126,11 +34835,14 @@ SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 en #endif /* -** Render an signed 64-bit integer as text. Store the result in zOut[]. +** Render an signed 64-bit integer as text. Store the result in zOut[] and +** return the length of the string that was stored, in bytes. The value +** returned does not include the zero terminator at the end of the output +** string. ** ** The caller must ensure that zOut[] is at least 21 bytes in size. */ -SQLITE_PRIVATE void sqlite3Int64ToText(i64 v, char *zOut){ +SQLITE_PRIVATE int sqlite3Int64ToText(i64 v, char *zOut){ int i; u64 x; char zTemp[22]; @@ -34141,12 +34853,15 @@ SQLITE_PRIVATE void sqlite3Int64ToText(i64 v, char *zOut){ } i = sizeof(zTemp)-2; zTemp[sizeof(zTemp)-1] = 0; - do{ - zTemp[i--] = (x%10) + '0'; + while( 1 /*exit-by-break*/ ){ + zTemp[i] = (x%10) + '0'; x = x/10; - }while( x ); - if( v<0 ) zTemp[i--] = '-'; - memcpy(zOut, &zTemp[i+1], sizeof(zTemp)-1-i); + if( x==0 ) break; + i--; + }; + if( v<0 ) zTemp[--i] = '-'; + memcpy(zOut, &zTemp[i], sizeof(zTemp)-i); + return sizeof(zTemp)-1-i; } /* @@ -34239,7 +34954,7 @@ SQLITE_PRIVATE int sqlite3Atoi64(const char *zNum, i64 *pNum, int length, u8 enc /* This test and assignment is needed only to suppress UB warnings ** from clang and -fsanitize=undefined. This test and assignment make ** the code a little larger and slower, and no harm comes from omitting - ** them, but we must appaise the undefined-behavior pharisees. */ + ** them, but we must appease the undefined-behavior pharisees. */ *pNum = neg ? SMALLEST_INT64 : LARGEST_INT64; }else if( neg ){ *pNum = -(i64)u; @@ -34311,11 +35026,15 @@ SQLITE_PRIVATE int sqlite3DecOrHexToI64(const char *z, i64 *pOut){ u = u*16 + sqlite3HexToInt(z[k]); } memcpy(pOut, &u, 8); - return (z[k]==0 && k-i<=16) ? 0 : 2; + if( k-i>16 ) return 2; + if( z[k]!=0 ) return 1; + return 0; }else #endif /* SQLITE_OMIT_HEX_INTEGER */ { - return sqlite3Atoi64(z, pOut, sqlite3Strlen30(z), SQLITE_UTF8); + int n = (int)(0x3fffffff&strspn(z,"+- \n\t0123456789")); + if( z[n] ) n++; + return sqlite3Atoi64(z, pOut, n, SQLITE_UTF8); } } @@ -34347,7 +35066,7 @@ SQLITE_PRIVATE int sqlite3GetInt32(const char *zNum, int *pValue){ u32 u = 0; zNum += 2; while( zNum[0]=='0' ) zNum++; - for(i=0; sqlite3Isxdigit(zNum[i]) && i<8; i++){ + for(i=0; i<8 && sqlite3Isxdigit(zNum[i]); i++){ u = u*16 + sqlite3HexToInt(zNum[i]); } if( (u&0x80000000)==0 && sqlite3Isxdigit(zNum[i])==0 ){ @@ -34394,6 +35113,153 @@ SQLITE_PRIVATE int sqlite3Atoi(const char *z){ return x; } +/* +** Decode a floating-point value into an approximate decimal +** representation. +** +** Round the decimal representation to n significant digits if +** n is positive. Or round to -n signficant digits after the +** decimal point if n is negative. No rounding is performed if +** n is zero. +** +** The significant digits of the decimal representation are +** stored in p->z[] which is a often (but not always) a pointer +** into the middle of p->zBuf[]. There are p->n significant digits. +** The p->z[] array is *not* zero-terminated. +*/ +SQLITE_PRIVATE void sqlite3FpDecode(FpDecode *p, double r, int iRound, int mxRound){ + int i; + u64 v; + int e, exp = 0; + p->isSpecial = 0; + p->z = p->zBuf; + + /* Convert negative numbers to positive. Deal with Infinity, 0.0, and + ** NaN. */ + if( r<0.0 ){ + p->sign = '-'; + r = -r; + }else if( r==0.0 ){ + p->sign = '+'; + p->n = 1; + p->iDP = 1; + p->z = "0"; + return; + }else{ + p->sign = '+'; + } + memcpy(&v,&r,8); + e = v>>52; + if( (e&0x7ff)==0x7ff ){ + p->isSpecial = 1 + (v!=0x7ff0000000000000LL); + p->n = 0; + p->iDP = 0; + return; + } + + /* Multiply r by powers of ten until it lands somewhere in between + ** 1.0e+19 and 1.0e+17. + */ + if( sqlite3Config.bUseLongDouble ){ + LONGDOUBLE_TYPE rr = r; + if( rr>=1.0e+19 ){ + while( rr>=1.0e+119L ){ exp+=100; rr *= 1.0e-100L; } + while( rr>=1.0e+29L ){ exp+=10; rr *= 1.0e-10L; } + while( rr>=1.0e+19L ){ exp++; rr *= 1.0e-1L; } + }else{ + while( rr<1.0e-97L ){ exp-=100; rr *= 1.0e+100L; } + while( rr<1.0e+07L ){ exp-=10; rr *= 1.0e+10L; } + while( rr<1.0e+17L ){ exp--; rr *= 1.0e+1L; } + } + v = (u64)rr; + }else{ + /* If high-precision floating point is not available using "long double", + ** then use Dekker-style double-double computation to increase the + ** precision. + ** + ** The error terms on constants like 1.0e+100 computed using the + ** decimal extension, for example as follows: + ** + ** SELECT decimal_exp(decimal_sub('1.0e+100',decimal(1.0e+100))); + */ + double rr[2]; + rr[0] = r; + rr[1] = 0.0; + if( rr[0]>1.84e+19 ){ + while( rr[0]>1.84e+119 ){ + exp += 100; + dekkerMul2(rr, 1.0e-100, -1.99918998026028836196e-117); + } + while( rr[0]>1.84e+29 ){ + exp += 10; + dekkerMul2(rr, 1.0e-10, -3.6432197315497741579e-27); + } + while( rr[0]>1.84e+19 ){ + exp += 1; + dekkerMul2(rr, 1.0e-01, -5.5511151231257827021e-18); + } + }else{ + while( rr[0]<1.84e-82 ){ + exp -= 100; + dekkerMul2(rr, 1.0e+100, -1.5902891109759918046e+83); + } + while( rr[0]<1.84e+08 ){ + exp -= 10; + dekkerMul2(rr, 1.0e+10, 0.0); + } + while( rr[0]<1.84e+18 ){ + exp -= 1; + dekkerMul2(rr, 1.0e+01, 0.0); + } + } + v = rr[1]<0.0 ? (u64)rr[0]-(u64)(-rr[1]) : (u64)rr[0]+(u64)rr[1]; + } + + + /* Extract significant digits. */ + i = sizeof(p->zBuf)-1; + assert( v>0 ); + while( v ){ p->zBuf[i--] = (v%10) + '0'; v /= 10; } + assert( i>=0 && izBuf)-1 ); + p->n = sizeof(p->zBuf) - 1 - i; + assert( p->n>0 ); + assert( p->nzBuf) ); + p->iDP = p->n + exp; + if( iRound<0 ){ + iRound = p->iDP - iRound; + if( iRound==0 && p->zBuf[i+1]>='5' ){ + iRound = 1; + p->zBuf[i--] = '0'; + p->n++; + p->iDP++; + } + } + if( iRound>0 && (iRoundn || p->n>mxRound) ){ + char *z = &p->zBuf[i+1]; + if( iRound>mxRound ) iRound = mxRound; + p->n = iRound; + if( z[iRound]>='5' ){ + int j = iRound-1; + while( 1 /*exit-by-break*/ ){ + z[j]++; + if( z[j]<='9' ) break; + z[j] = '0'; + if( j==0 ){ + p->z[i--] = '1'; + p->n++; + p->iDP++; + break; + }else{ + j--; + } + } + } + } + p->z = &p->zBuf[i+1]; + assert( i+p->n < sizeof(p->zBuf) ); + while( ALWAYS(p->n>0) && p->z[p->n-1]=='0' ){ p->n--; } +} + /* ** Try to convert z into an unsigned 32-bit integer. Return true on ** success and false if there is an error. @@ -34922,7 +35788,7 @@ SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3 *db){ } /* -** Attempt to add, substract, or multiply the 64-bit signed value iB against +** Attempt to add, subtract, or multiply the 64-bit signed value iB against ** the other 64-bit signed integer at *pA and store the result in *pA. ** Return 0 on success. Or if the operation would have resulted in an ** overflow, leave *pA unchanged and return 1. @@ -35208,6 +36074,104 @@ SQLITE_PRIVATE int sqlite3VListNameToNum(VList *pIn, const char *zName, int nNam return 0; } +/* +** High-resolution hardware timer used for debugging and testing only. +*/ +#if defined(VDBE_PROFILE) \ + || defined(SQLITE_PERFORMANCE_TRACE) \ + || defined(SQLITE_ENABLE_STMT_SCANSTATUS) +/************** Include hwtime.h in the middle of util.c *********************/ +/************** Begin file hwtime.h ******************************************/ +/* +** 2008 May 27 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +****************************************************************************** +** +** This file contains inline asm code for retrieving "high-performance" +** counters for x86 and x86_64 class CPUs. +*/ +#ifndef SQLITE_HWTIME_H +#define SQLITE_HWTIME_H + +/* +** The following routine only works on Pentium-class (or newer) processors. +** It uses the RDTSC opcode to read the cycle count value out of the +** processor and returns that value. This can be used for high-res +** profiling. +*/ +#if !defined(__STRICT_ANSI__) && \ + (defined(__GNUC__) || defined(_MSC_VER)) && \ + (defined(i386) || defined(__i386__) || defined(_M_IX86)) + + #if defined(__GNUC__) + + __inline__ sqlite_uint64 sqlite3Hwtime(void){ + unsigned int lo, hi; + __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); + return (sqlite_uint64)hi << 32 | lo; + } + + #elif defined(_MSC_VER) + + __declspec(naked) __inline sqlite_uint64 __cdecl sqlite3Hwtime(void){ + __asm { + rdtsc + ret ; return value at EDX:EAX + } + } + + #endif + +#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__x86_64__)) + + __inline__ sqlite_uint64 sqlite3Hwtime(void){ + unsigned int lo, hi; + __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); + return (sqlite_uint64)hi << 32 | lo; + } + +#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__ppc__)) + + __inline__ sqlite_uint64 sqlite3Hwtime(void){ + unsigned long long retval; + unsigned long junk; + __asm__ __volatile__ ("\n\ + 1: mftbu %1\n\ + mftb %L0\n\ + mftbu %0\n\ + cmpw %0,%1\n\ + bne 1b" + : "=r" (retval), "=r" (junk)); + return retval; + } + +#else + + /* + ** asm() is needed for hardware timing support. Without asm(), + ** disable the sqlite3Hwtime() routine. + ** + ** sqlite3Hwtime() is only used for some obscure debugging + ** and analysis configurations, not in any deliverable, so this + ** should not be a great loss. + */ +SQLITE_PRIVATE sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); } + +#endif + +#endif /* !defined(SQLITE_HWTIME_H) */ + +/************** End of hwtime.h **********************************************/ +/************** Continuing where we left off in util.c ***********************/ +#endif + /************** End of util.c ************************************************/ /************** Begin file hash.c ********************************************/ /* @@ -35309,7 +36273,7 @@ static void insertElement( } -/* Resize the hash table so that it cantains "new_size" buckets. +/* Resize the hash table so that it contains "new_size" buckets. ** ** The hash table might fail to resize if sqlite3_malloc() fails or ** if the new size is the same as the prior size. @@ -35378,12 +36342,13 @@ static HashElem *findElementWithHash( count = pH->count; } if( pHash ) *pHash = h; - while( count-- ){ + while( count ){ assert( elem!=0 ); if( sqlite3StrICmp(elem->pKey,pKey)==0 ){ return elem; } elem = elem->next; + count--; } return &nullElement; } @@ -35742,7 +36707,9 @@ struct KVVfsFile { char *aJrnl; /* Journal content */ int szPage; /* Last known page size */ sqlite3_int64 szDb; /* Database file size. -1 means unknown */ + char *aData; /* Buffer to hold page data */ }; +#define SQLITE_KVOS_SZ 133073 /* ** Methods for KVVfsFile @@ -36105,8 +37072,7 @@ static int kvvfsDecode(const char *a, char *aOut, int nOut){ if( j+n>nOut ) return -1; memset(&aOut[j], 0, n); j += n; - c = aIn[i]; - if( c==0 ) break; + if( c==0 || mult==1 ) break; /* progress stalled if mult==1 */ }else{ aOut[j] = c<<4; c = kvvfsHexValue[aIn[++i]]; @@ -36183,6 +37149,7 @@ static int kvvfsClose(sqlite3_file *pProtoFile){ SQLITE_KV_LOG(("xClose %s %s\n", pFile->zClass, pFile->isJournal ? "journal" : "db")); sqlite3_free(pFile->aJrnl); + sqlite3_free(pFile->aData); return SQLITE_OK; } @@ -36231,7 +37198,7 @@ static int kvvfsReadDb( unsigned int pgno; int got, n; char zKey[30]; - char aData[133073]; + char *aData = pFile->aData; assert( iOfst>=0 ); assert( iAmt>=0 ); SQLITE_KV_LOG(("xRead('%s-db',%d,%lld)\n", pFile->zClass, iAmt, iOfst)); @@ -36248,7 +37215,8 @@ static int kvvfsReadDb( pgno = 1; } sqlite3_snprintf(sizeof(zKey), zKey, "%u", pgno); - got = sqlite3KvvfsMethods.xRead(pFile->zClass, zKey, aData, sizeof(aData)-1); + got = sqlite3KvvfsMethods.xRead(pFile->zClass, zKey, + aData, SQLITE_KVOS_SZ-1); if( got<0 ){ n = 0; }else{ @@ -36256,7 +37224,7 @@ static int kvvfsReadDb( if( iOfst+iAmt<512 ){ int k = iOfst+iAmt; aData[k*2] = 0; - n = kvvfsDecode(aData, &aData[2000], sizeof(aData)-2000); + n = kvvfsDecode(aData, &aData[2000], SQLITE_KVOS_SZ-2000); if( n>=iOfst+iAmt ){ memcpy(zBuf, &aData[2000+iOfst], iAmt); n = iAmt; @@ -36315,7 +37283,7 @@ static int kvvfsWriteDb( KVVfsFile *pFile = (KVVfsFile*)pProtoFile; unsigned int pgno; char zKey[30]; - char aData[131073]; + char *aData = pFile->aData; SQLITE_KV_LOG(("xWrite('%s-db',%d,%lld)\n", pFile->zClass, iAmt, iOfst)); assert( iAmt>=512 && iAmt<=65536 ); assert( (iAmt & (iAmt-1))==0 ); @@ -36524,6 +37492,10 @@ static int kvvfsOpen( }else{ pFile->zClass = "local"; } + pFile->aData = sqlite3_malloc64(SQLITE_KVOS_SZ); + if( pFile->aData==0 ){ + return SQLITE_NOMEM; + } pFile->aJrnl = 0; pFile->nJrnl = 0; pFile->szPage = -1; @@ -36687,7 +37659,7 @@ SQLITE_PRIVATE int sqlite3KvvfsInit(void){ ** This source file is organized into divisions where the logic for various ** subfunctions is contained within the appropriate division. PLEASE ** KEEP THE STRUCTURE OF THIS FILE INTACT. New code should be placed -** in the correct division and should be clearly labeled. +** in the correct division and should be clearly labelled. ** ** The layout of divisions is as follows: ** @@ -36737,7 +37709,7 @@ SQLITE_PRIVATE int sqlite3KvvfsInit(void){ #endif /* Use pread() and pwrite() if they are available */ -#if defined(__APPLE__) +#if defined(__APPLE__) || defined(__linux__) # define HAVE_PREAD 1 # define HAVE_PWRITE 1 #endif @@ -36760,7 +37732,8 @@ SQLITE_PRIVATE int sqlite3KvvfsInit(void){ /* #include */ #include /* amalgamator: keep */ #include -#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0 +#if (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0) \ + && !defined(SQLITE_WASI) # include #endif @@ -36848,9 +37821,46 @@ SQLITE_PRIVATE int sqlite3KvvfsInit(void){ */ #define SQLITE_MAX_SYMLINKS 100 +/* +** Remove and stub certain info for WASI (WebAssembly System +** Interface) builds. +*/ +#ifdef SQLITE_WASI +# undef HAVE_FCHMOD +# undef HAVE_FCHOWN +# undef HAVE_MREMAP +# define HAVE_MREMAP 0 +# ifndef SQLITE_DEFAULT_UNIX_VFS +# define SQLITE_DEFAULT_UNIX_VFS "unix-dotfile" + /* ^^^ should SQLITE_DEFAULT_UNIX_VFS be "unix-none"? */ +# endif +# ifndef F_RDLCK +# define F_RDLCK 0 +# define F_WRLCK 1 +# define F_UNLCK 2 +# if __LONG_MAX == 0x7fffffffL +# define F_GETLK 12 +# define F_SETLK 13 +# define F_SETLKW 14 +# else +# define F_GETLK 5 +# define F_SETLK 6 +# define F_SETLKW 7 +# endif +# endif +#else /* !SQLITE_WASI */ +# ifndef HAVE_FCHMOD +# define HAVE_FCHMOD +# endif +#endif /* SQLITE_WASI */ + +#ifdef SQLITE_WASI +# define osGetpid(X) (pid_t)1 +#else /* Always cast the getpid() return type for compatibility with ** kernel modules in VxWorks. */ -#define osGetpid(X) (pid_t)getpid() +# define osGetpid(X) (pid_t)getpid() +#endif /* ** Only set the lastErrno if the error code is a real error and not @@ -37122,7 +38132,11 @@ static struct unix_syscall { #define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off64_t))\ aSyscall[13].pCurrent) +#if defined(HAVE_FCHMOD) { "fchmod", (sqlite3_syscall_ptr)fchmod, 0 }, +#else + { "fchmod", (sqlite3_syscall_ptr)0, 0 }, +#endif #define osFchmod ((int(*)(int,mode_t))aSyscall[14].pCurrent) #if defined(HAVE_POSIX_FALLOCATE) && HAVE_POSIX_FALLOCATE @@ -37158,14 +38172,16 @@ static struct unix_syscall { #endif #define osGeteuid ((uid_t(*)(void))aSyscall[21].pCurrent) -#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0 +#if (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0) \ + && !defined(SQLITE_WASI) { "mmap", (sqlite3_syscall_ptr)mmap, 0 }, #else { "mmap", (sqlite3_syscall_ptr)0, 0 }, #endif #define osMmap ((void*(*)(void*,size_t,int,int,int,off_t))aSyscall[22].pCurrent) -#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0 +#if (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0) \ + && !defined(SQLITE_WASI) { "munmap", (sqlite3_syscall_ptr)munmap, 0 }, #else { "munmap", (sqlite3_syscall_ptr)0, 0 }, @@ -37230,7 +38246,7 @@ static int robustFchown(int fd, uid_t uid, gid_t gid){ /* ** This is the xSetSystemCall() method of sqlite3_vfs for all of the -** "unix" VFSes. Return SQLITE_OK opon successfully updating the +** "unix" VFSes. Return SQLITE_OK upon successfully updating the ** system call pointer, or SQLITE_NOTFOUND if there is no configurable ** system call named zName. */ @@ -37752,7 +38768,7 @@ static void vxworksReleaseFileId(struct vxworksFileId *pId){ ** If you close a file descriptor that points to a file that has locks, ** all locks on that file that are owned by the current process are ** released. To work around this problem, each unixInodeInfo object -** maintains a count of the number of pending locks on tha inode. +** maintains a count of the number of pending locks on the inode. ** When an attempt is made to close an unixFile, if there are ** other unixFile open on the same inode that are holding locks, the call ** to close() the file descriptor is deferred until all of the locks clear. @@ -37766,7 +38782,7 @@ static void vxworksReleaseFileId(struct vxworksFileId *pId){ ** not posix compliant. Under LinuxThreads, a lock created by thread ** A cannot be modified or overridden by a different thread B. ** Only thread A can modify the lock. Locking behavior is correct -** if the appliation uses the newer Native Posix Thread Library (NPTL) +** if the application uses the newer Native Posix Thread Library (NPTL) ** on linux - with NPTL a lock created by thread A can override locks ** in thread B. But there is no way to know at compile-time which ** threading library is being used. So there is no way to know at @@ -37968,7 +38984,7 @@ static void storeLastErrno(unixFile *pFile, int error){ } /* -** Close all file descriptors accumuated in the unixInodeInfo->pUnused list. +** Close all file descriptors accumulated in the unixInodeInfo->pUnused list. */ static void closePendingFds(unixFile *pFile){ unixInodeInfo *pInode = pFile->pInode; @@ -38316,7 +39332,7 @@ static int unixFileLock(unixFile *pFile, struct flock *pLock){ ** ** UNLOCKED -> SHARED ** SHARED -> RESERVED -** SHARED -> (PENDING) -> EXCLUSIVE +** SHARED -> EXCLUSIVE ** RESERVED -> (PENDING) -> EXCLUSIVE ** PENDING -> EXCLUSIVE ** @@ -38331,7 +39347,7 @@ static int unixLock(sqlite3_file *id, int eFileLock){ ** slightly in order to be compatible with Windows95 systems simultaneously ** accessing the same database file, in case that is ever required. ** - ** Symbols defined in os.h indentify the 'pending byte' and the 'reserved + ** Symbols defined in os.h identify the 'pending byte' and the 'reserved ** byte', each single bytes at well known offsets, and the 'shared byte ** range', a range of 510 bytes at a well known offset. ** @@ -38339,7 +39355,7 @@ static int unixLock(sqlite3_file *id, int eFileLock){ ** byte'. If this is successful, 'shared byte range' is read-locked ** and the lock on the 'pending byte' released. (Legacy note: When ** SQLite was first developed, Windows95 systems were still very common, - ** and Widnows95 lacks a shared-lock capability. So on Windows95, a + ** and Windows95 lacks a shared-lock capability. So on Windows95, a ** single randomly selected by from the 'shared byte range' is locked. ** Windows95 is now pretty much extinct, but this work-around for the ** lack of shared-locks on Windows95 lives on, for backwards @@ -38349,19 +39365,20 @@ static int unixLock(sqlite3_file *id, int eFileLock){ ** A RESERVED lock is implemented by grabbing a write-lock on the ** 'reserved byte'. ** - ** A process may only obtain a PENDING lock after it has obtained a - ** SHARED lock. A PENDING lock is implemented by obtaining a write-lock - ** on the 'pending byte'. This ensures that no new SHARED locks can be - ** obtained, but existing SHARED locks are allowed to persist. A process - ** does not have to obtain a RESERVED lock on the way to a PENDING lock. - ** This property is used by the algorithm for rolling back a journal file - ** after a crash. + ** An EXCLUSIVE lock may only be requested after either a SHARED or + ** RESERVED lock is held. An EXCLUSIVE lock is implemented by obtaining + ** a write-lock on the entire 'shared byte range'. Since all other locks + ** require a read-lock on one of the bytes within this range, this ensures + ** that no other locks are held on the database. ** - ** An EXCLUSIVE lock, obtained after a PENDING lock is held, is - ** implemented by obtaining a write-lock on the entire 'shared byte - ** range'. Since all other locks require a read-lock on one of the bytes - ** within this range, this ensures that no other locks are held on the - ** database. + ** If a process that holds a RESERVED lock requests an EXCLUSIVE, then + ** a PENDING lock is obtained first. A PENDING lock is implemented by + ** obtaining a write-lock on the 'pending byte'. This ensures that no new + ** SHARED locks can be obtained, but existing SHARED locks are allowed to + ** persist. If the call to this function fails to obtain the EXCLUSIVE + ** lock in this case, it holds the PENDING lock instead. The client may + ** then re-attempt the EXCLUSIVE lock later on, after existing SHARED + ** locks have cleared. */ int rc = SQLITE_OK; unixFile *pFile = (unixFile*)id; @@ -38387,7 +39404,7 @@ static int unixLock(sqlite3_file *id, int eFileLock){ /* Make sure the locking sequence is correct. ** (1) We never move from unlocked to anything higher than shared lock. - ** (2) SQLite never explicitly requests a pendig lock. + ** (2) SQLite never explicitly requests a pending lock. ** (3) A shared lock is always held when a reserve lock is requested. */ assert( pFile->eFileLock!=NO_LOCK || eFileLock==SHARED_LOCK ); @@ -38432,7 +39449,7 @@ static int unixLock(sqlite3_file *id, int eFileLock){ lock.l_len = 1L; lock.l_whence = SEEK_SET; if( eFileLock==SHARED_LOCK - || (eFileLock==EXCLUSIVE_LOCK && pFile->eFileLockeFileLock==RESERVED_LOCK) ){ lock.l_type = (eFileLock==SHARED_LOCK?F_RDLCK:F_WRLCK); lock.l_start = PENDING_BYTE; @@ -38443,6 +39460,9 @@ static int unixLock(sqlite3_file *id, int eFileLock){ storeLastErrno(pFile, tErrno); } goto end_lock; + }else if( eFileLock==EXCLUSIVE_LOCK ){ + pFile->eFileLock = PENDING_LOCK; + pInode->eFileLock = PENDING_LOCK; } } @@ -38530,13 +39550,9 @@ static int unixLock(sqlite3_file *id, int eFileLock){ } #endif - if( rc==SQLITE_OK ){ pFile->eFileLock = eFileLock; pInode->eFileLock = eFileLock; - }else if( eFileLock==EXCLUSIVE_LOCK ){ - pFile->eFileLock = PENDING_LOCK; - pInode->eFileLock = PENDING_LOCK; } end_lock: @@ -39606,7 +40622,7 @@ static int afpLock(sqlite3_file *id, int eFileLock){ /* Make sure the locking sequence is correct ** (1) We never move from unlocked to anything higher than shared lock. - ** (2) SQLite never explicitly requests a pendig lock. + ** (2) SQLite never explicitly requests a pending lock. ** (3) A shared lock is always held when a reserve lock is requested. */ assert( pFile->eFileLock!=NO_LOCK || eFileLock==SHARED_LOCK ); @@ -39722,7 +40738,7 @@ static int afpLock(sqlite3_file *id, int eFileLock){ if( !(failed = afpSetLock(context->dbPath, pFile, SHARED_FIRST + pInode->sharedByte, 1, 0)) ){ int failed2 = SQLITE_OK; - /* now attemmpt to get the exclusive lock range */ + /* now attempt to get the exclusive lock range */ failed = afpSetLock(context->dbPath, pFile, SHARED_FIRST, SHARED_SIZE, 1); if( failed && (failed2 = afpSetLock(context->dbPath, pFile, @@ -39943,12 +40959,6 @@ static int nfsUnlock(sqlite3_file *id, int eFileLock){ ** Seek to the offset passed as the second argument, then read cnt ** bytes into pBuf. Return the number of bytes actually read. ** -** NB: If you define USE_PREAD or USE_PREAD64, then it might also -** be necessary to define _XOPEN_SOURCE to be 500. This varies from -** one system to another. Since SQLite does not define USE_PREAD -** in any form by default, we will not attempt to define _XOPEN_SOURCE. -** See tickets #2741 and #2681. -** ** To avoid stomping the errno value on a failed read the lastErrno value ** is set before returning. */ @@ -40023,7 +41033,7 @@ static int unixRead( #endif #if SQLITE_MAX_MMAP_SIZE>0 - /* Deal with as much of this read request as possible by transfering + /* Deal with as much of this read request as possible by transferring ** data from the memory mapping using memcpy(). */ if( offsetmmapSize ){ if( offset+amt <= pFile->mmapSize ){ @@ -40175,7 +41185,7 @@ static int unixWrite( #endif #if defined(SQLITE_MMAP_READWRITE) && SQLITE_MAX_MMAP_SIZE>0 - /* Deal with as much of this write request as possible by transfering + /* Deal with as much of this write request as possible by transferring ** data from the memory mapping using memcpy(). */ if( offsetmmapSize ){ if( offset+amt <= pFile->mmapSize ){ @@ -40297,7 +41307,7 @@ static int full_fsync(int fd, int fullSync, int dataOnly){ /* If we compiled with the SQLITE_NO_SYNC flag, then syncing is a ** no-op. But go ahead and call fstat() to validate the file ** descriptor as we need a method to provoke a failure during - ** coverate testing. + ** coverage testing. */ #ifdef SQLITE_NO_SYNC { @@ -43127,12 +44137,10 @@ static void appendOnePathElement( if( zName[0]=='.' ){ if( nName==1 ) return; if( zName[1]=='.' && nName==2 ){ - if( pPath->nUsed<=1 ){ - pPath->rc = SQLITE_ERROR; - return; + if( pPath->nUsed>1 ){ + assert( pPath->zOut[0]=='/' ); + while( pPath->zOut[--pPath->nUsed]!='/' ){} } - assert( pPath->zOut[0]=='/' ); - while( pPath->zOut[--pPath->nUsed]!='/' ){} return; } } @@ -43344,12 +44352,17 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nBuf, char *zBuf){ ** than the argument. */ static int unixSleep(sqlite3_vfs *NotUsed, int microseconds){ -#if OS_VXWORKS +#if !defined(HAVE_NANOSLEEP) || HAVE_NANOSLEEP+0 struct timespec sp; - sp.tv_sec = microseconds / 1000000; sp.tv_nsec = (microseconds % 1000000) * 1000; + + /* Almost all modern unix systems support nanosleep(). But if you are + ** compiling for one of the rare exceptions, you can use + ** -DHAVE_NANOSLEEP=0 (perhaps in conjuction with -DHAVE_USLEEP if + ** usleep() is available) in order to bypass the use of nanosleep() */ nanosleep(&sp, NULL); + UNUSED_PARAMETER(NotUsed); return microseconds; #elif defined(HAVE_USLEEP) && HAVE_USLEEP @@ -45939,7 +46952,7 @@ static struct win_syscall { /* ** This is the xSetSystemCall() method of sqlite3_vfs for all of the -** "win32" VFSes. Return SQLITE_OK opon successfully updating the +** "win32" VFSes. Return SQLITE_OK upon successfully updating the ** system call pointer, or SQLITE_NOTFOUND if there is no configurable ** system call named zName. */ @@ -47519,7 +48532,7 @@ static int winRead( pFile->h, pBuf, amt, offset, pFile->locktype)); #if SQLITE_MAX_MMAP_SIZE>0 - /* Deal with as much of this read request as possible by transfering + /* Deal with as much of this read request as possible by transferring ** data from the memory mapping using memcpy(). */ if( offsetmmapSize ){ if( offset+amt <= pFile->mmapSize ){ @@ -47597,7 +48610,7 @@ static int winWrite( pFile->h, pBuf, amt, offset, pFile->locktype)); #if defined(SQLITE_MMAP_READWRITE) && SQLITE_MAX_MMAP_SIZE>0 - /* Deal with as much of this write request as possible by transfering + /* Deal with as much of this write request as possible by transferring ** data from the memory mapping using memcpy(). */ if( offsetmmapSize ){ if( offset+amt <= pFile->mmapSize ){ @@ -47707,7 +48720,7 @@ static int winTruncate(sqlite3_file *id, sqlite3_int64 nByte){ ** all references to memory-mapped content are closed. That is doable, ** but involves adding a few branches in the common write code path which ** could slow down normal operations slightly. Hence, we have decided for - ** now to simply make trancations a no-op if there are pending reads. We + ** now to simply make transactions a no-op if there are pending reads. We ** can maybe revisit this decision in the future. */ return SQLITE_OK; @@ -47766,7 +48779,7 @@ static int winTruncate(sqlite3_file *id, sqlite3_int64 nByte){ #ifdef SQLITE_TEST /* ** Count the number of fullsyncs and normal syncs. This is used to test -** that syncs and fullsyncs are occuring at the right times. +** that syncs and fullsyncs are occurring at the right times. */ SQLITE_API int sqlite3_sync_count = 0; SQLITE_API int sqlite3_fullsync_count = 0; @@ -48123,7 +49136,7 @@ static int winLock(sqlite3_file *id, int locktype){ */ if( locktype==EXCLUSIVE_LOCK && res ){ assert( pFile->locktype>=SHARED_LOCK ); - res = winUnlockReadLock(pFile); + (void)winUnlockReadLock(pFile); res = winLockFile(&pFile->h, SQLITE_LOCKFILE_FLAGS, SHARED_FIRST, 0, SHARED_SIZE, 0); if( res ){ @@ -49527,6 +50540,7 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789"; size_t i, j; + DWORD pid; int nPre = sqlite3Strlen30(SQLITE_TEMP_FILE_PREFIX); int nMax, nBuf, nDir, nLen; char *zBuf; @@ -49739,7 +50753,10 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){ j = sqlite3Strlen30(zBuf); sqlite3_randomness(15, &zBuf[j]); + pid = osGetCurrentProcessId(); for(i=0; i<15; i++, j++){ + zBuf[j] += pid & 0xff; + pid >>= 8; zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ]; } zBuf[j] = 0; @@ -49977,7 +50994,7 @@ static int winOpen( if( isReadWrite ){ int rc2, isRO = 0; sqlite3BeginBenignMalloc(); - rc2 = winAccess(pVfs, zName, SQLITE_ACCESS_READ, &isRO); + rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ, &isRO); sqlite3EndBenignMalloc(); if( rc2==SQLITE_OK && isRO ) break; } @@ -49994,7 +51011,7 @@ static int winOpen( if( isReadWrite ){ int rc2, isRO = 0; sqlite3BeginBenignMalloc(); - rc2 = winAccess(pVfs, zName, SQLITE_ACCESS_READ, &isRO); + rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ, &isRO); sqlite3EndBenignMalloc(); if( rc2==SQLITE_OK && isRO ) break; } @@ -50014,7 +51031,7 @@ static int winOpen( if( isReadWrite ){ int rc2, isRO = 0; sqlite3BeginBenignMalloc(); - rc2 = winAccess(pVfs, zName, SQLITE_ACCESS_READ, &isRO); + rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ, &isRO); sqlite3EndBenignMalloc(); if( rc2==SQLITE_OK && isRO ) break; } @@ -50237,6 +51254,13 @@ static int winAccess( OSTRACE(("ACCESS name=%s, flags=%x, pResOut=%p\n", zFilename, flags, pResOut)); + if( zFilename==0 ){ + *pResOut = 0; + OSTRACE(("ACCESS name=%s, pResOut=%p, *pResOut=%d, rc=SQLITE_OK\n", + zFilename, pResOut, *pResOut)); + return SQLITE_OK; + } + zConverted = winConvertFromUtf8Filename(zFilename); if( zConverted==0 ){ OSTRACE(("ACCESS name=%s, rc=SQLITE_IOERR_NOMEM\n", zFilename)); @@ -52097,7 +53121,7 @@ SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec *p, u32 i){ h = BITVEC_HASH(i++); /* if there wasn't a hash collision, and this doesn't */ /* completely fill the hash, then just add it without */ - /* worring about sub-dividing and re-hashing. */ + /* worrying about sub-dividing and re-hashing. */ if( !p->u.aHash[h] ){ if (p->nSet<(BITVEC_NINT-1)) { goto bitvec_set_end; @@ -52364,7 +53388,7 @@ SQLITE_PRIVATE int sqlite3BitvecBuiltinTest(int sz, int *aOp){ struct PCache { PgHdr *pDirty, *pDirtyTail; /* List of dirty pages in LRU order */ PgHdr *pSynced; /* Last synced page in dirty page list */ - int nRefSum; /* Sum of ref counts over all pages */ + i64 nRefSum; /* Sum of ref counts over all pages */ int szCache; /* Configured cache size */ int szSpill; /* Size before spilling occurs */ int szPage; /* Size of every page in this cache */ @@ -52393,11 +53417,15 @@ struct PCache { PgHdr *pPg; unsigned char *a; int j; - pPg = (PgHdr*)pLower->pExtra; - printf("%3d: nRef %2d flgs %02x data ", i, pPg->nRef, pPg->flags); - a = (unsigned char *)pLower->pBuf; - for(j=0; j<12; j++) printf("%02x", a[j]); - printf(" ptr %p\n", pPg); + if( pLower==0 ){ + printf("%3d: NULL\n", i); + }else{ + pPg = (PgHdr*)pLower->pExtra; + printf("%3d: nRef %2lld flgs %02x data ", i, pPg->nRef, pPg->flags); + a = (unsigned char *)pLower->pBuf; + for(j=0; j<12; j++) printf("%02x", a[j]); + printf(" ptr %p\n", pPg); + } } static void pcacheDump(PCache *pCache){ int N; @@ -52410,9 +53438,8 @@ struct PCache { if( N>sqlite3PcacheMxDump ) N = sqlite3PcacheMxDump; for(i=1; i<=N; i++){ pLower = sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache, i, 0); - if( pLower==0 ) continue; pcachePageTrace(i, pLower); - if( ((PgHdr*)pLower)->pPage==0 ){ + if( pLower && ((PgHdr*)pLower)->pPage==0 ){ sqlite3GlobalConfig.pcache2.xUnpin(pCache->pCache, pLower, 0); } } @@ -52427,7 +53454,7 @@ struct PCache { ** Return 1 if pPg is on the dirty list for pCache. Return 0 if not. ** This routine runs inside of assert() statements only. */ -#ifdef SQLITE_DEBUG +#if defined(SQLITE_ENABLE_EXPENSIVE_ASSERT) static int pageOnDirtyList(PCache *pCache, PgHdr *pPg){ PgHdr *p; for(p=pCache->pDirty; p; p=p->pDirtyNext){ @@ -52435,6 +53462,16 @@ static int pageOnDirtyList(PCache *pCache, PgHdr *pPg){ } return 0; } +static int pageNotOnDirtyList(PCache *pCache, PgHdr *pPg){ + PgHdr *p; + for(p=pCache->pDirty; p; p=p->pDirtyNext){ + if( p==pPg ) return 0; + } + return 1; +} +#else +# define pageOnDirtyList(A,B) 1 +# define pageNotOnDirtyList(A,B) 1 #endif /* @@ -52455,7 +53492,7 @@ SQLITE_PRIVATE int sqlite3PcachePageSanity(PgHdr *pPg){ assert( pCache!=0 ); /* Every page has an associated PCache */ if( pPg->flags & PGHDR_CLEAN ){ assert( (pPg->flags & PGHDR_DIRTY)==0 );/* Cannot be both CLEAN and DIRTY */ - assert( !pageOnDirtyList(pCache, pPg) );/* CLEAN pages not on dirty list */ + assert( pageNotOnDirtyList(pCache, pPg) );/* CLEAN pages not on dirtylist */ }else{ assert( (pPg->flags & PGHDR_DIRTY)!=0 );/* If not CLEAN must be DIRTY */ assert( pPg->pDirtyNext==0 || pPg->pDirtyNext->pDirtyPrev==pPg ); @@ -52591,7 +53628,7 @@ static int numberOfCachePages(PCache *p){ return p->szCache; }else{ i64 n; - /* IMPLEMANTATION-OF: R-59858-46238 If the argument N is negative, then the + /* IMPLEMENTATION-OF: R-59858-46238 If the argument N is negative, then the ** number of cache pages is adjusted to be a number of pages that would ** use approximately abs(N*1024) bytes of memory based on the current ** page size. */ @@ -53079,7 +54116,7 @@ static PgHdr *pcacheMergeDirtyList(PgHdr *pA, PgHdr *pB){ } /* -** Sort the list of pages in accending order by pgno. Pages are +** Sort the list of pages in ascending order by pgno. Pages are ** connected by pDirty pointers. The pDirtyPrev pointers are ** corrupted by this sort. ** @@ -53138,14 +54175,14 @@ SQLITE_PRIVATE PgHdr *sqlite3PcacheDirtyList(PCache *pCache){ ** This is not the total number of pages referenced, but the sum of the ** reference count for all pages. */ -SQLITE_PRIVATE int sqlite3PcacheRefCount(PCache *pCache){ +SQLITE_PRIVATE i64 sqlite3PcacheRefCount(PCache *pCache){ return pCache->nRefSum; } /* ** Return the number of references to the page supplied as an argument. */ -SQLITE_PRIVATE int sqlite3PcachePageRefcount(PgHdr *p){ +SQLITE_PRIVATE i64 sqlite3PcachePageRefcount(PgHdr *p){ return p->nRef; } @@ -53319,7 +54356,7 @@ SQLITE_PRIVATE void sqlite3PcacheIterateDirty(PCache *pCache, void (*xIter)(PgHd ** If N is positive, then N pages worth of memory are allocated using a single ** sqlite3Malloc() call and that memory is used for the first N pages allocated. ** Or if N is negative, then -1024*N bytes of memory are allocated and used -** for as many pages as can be accomodated. +** for as many pages as can be accommodated. ** ** Only one of (2) or (3) can be used. Once the memory available to (2) or ** (3) is exhausted, subsequent allocations fail over to the general-purpose @@ -53353,7 +54390,7 @@ typedef struct PGroup PGroup; ** in memory directly after the associated page data, if the database is ** corrupt, code at the b-tree layer may overread the page buffer and ** read part of this structure before the corruption is detected. This -** can cause a valgrind error if the unitialized gap is accessed. Using u16 +** can cause a valgrind error if the uninitialized gap is accessed. Using u16 ** ensures there is no such gap, and therefore no bytes of uninitialized ** memory in the structure. ** @@ -54573,7 +55610,7 @@ SQLITE_PRIVATE void sqlite3PcacheStats( ** The TEST primitive includes a "batch" number. The TEST primitive ** will only see elements that were inserted before the last change ** in the batch number. In other words, if an INSERT occurs between -** two TESTs where the TESTs have the same batch nubmer, then the +** two TESTs where the TESTs have the same batch number, then the ** value added by the INSERT will not be visible to the second TEST. ** The initial batch number is zero, so if the very first TEST contains ** a non-zero batch number, it will see all prior INSERTs. @@ -55105,6 +56142,7 @@ SQLITE_PRIVATE int sqlite3RowSetTest(RowSet *pRowSet, int iBatch, sqlite3_int64 # define sqlite3WalFramesize(z) 0 # define sqlite3WalFindFrame(x,y,z) 0 # define sqlite3WalFile(x) 0 +# undef SQLITE_USE_SEH #else #define WAL_SAVEPOINT_NDATA 4 @@ -55211,6 +56249,10 @@ SQLITE_PRIVATE int sqlite3WalWriteLock(Wal *pWal, int bLock); SQLITE_PRIVATE void sqlite3WalDb(Wal *pWal, sqlite3 *db); #endif +#ifdef SQLITE_USE_SEH +SQLITE_PRIVATE int sqlite3WalSystemErrno(Wal*); +#endif + #endif /* ifndef SQLITE_OMIT_WAL */ #endif /* SQLITE_WAL_H */ @@ -55496,7 +56538,7 @@ int sqlite3PagerTrace=1; /* True to enable tracing */ ** outstanding transactions have been abandoned, the pager is able to ** transition back to OPEN state, discarding the contents of the ** page-cache and any other in-memory state at the same time. Everything -** is reloaded from disk (and, if necessary, hot-journal rollback peformed) +** is reloaded from disk (and, if necessary, hot-journal rollback performed) ** when a read-transaction is next opened on the pager (transitioning ** the pager into READER state). At that point the system has recovered ** from the error. @@ -56869,7 +57911,7 @@ static int readJournalHdr( ** + 4 bytes: super-journal name checksum. ** + 8 bytes: aJournalMagic[]. ** -** The super-journal page checksum is the sum of the bytes in thesuper-journal +** The super-journal page checksum is the sum of the bytes in the super-journal ** name, where each byte is interpreted as a signed 8-bit integer. ** ** If zSuper is a NULL pointer (occurs for a single database transaction), @@ -56922,7 +57964,7 @@ static int writeSuperJournal(Pager *pPager, const char *zSuper){ } pPager->journalOff += (nSuper+20); - /* If the pager is in peristent-journal mode, then the physical + /* If the pager is in persistent-journal mode, then the physical ** journal-file may extend past the end of the super-journal name ** and 8 bytes of magic data just written to the file. This is ** dangerous because the code to rollback a hot-journal file @@ -57092,7 +58134,7 @@ static void pager_unlock(Pager *pPager){ /* ** This function is called whenever an IOERR or FULL error that requires -** the pager to transition into the ERROR state may ahve occurred. +** the pager to transition into the ERROR state may have occurred. ** The first argument is a pointer to the pager structure, the second ** the error-code about to be returned by a pager API function. The ** value returned is a copy of the second argument to this function. @@ -57367,7 +58409,7 @@ static void pagerUnlockAndRollback(Pager *pPager){ /* ** Parameter aData must point to a buffer of pPager->pageSize bytes -** of data. Compute and return a checksum based ont the contents of the +** of data. Compute and return a checksum based on the contents of the ** page of data and the current value of pPager->cksumInit. ** ** This is not a real checksum. It is really just the sum of the @@ -57800,6 +58842,8 @@ static int pager_truncate(Pager *pPager, Pgno nPage){ int rc = SQLITE_OK; assert( pPager->eState!=PAGER_ERROR ); assert( pPager->eState!=PAGER_READER ); + PAGERTRACE(("Truncate %d npage %u\n", PAGERID(pPager), nPage)); + if( isOpen(pPager->fd) && (pPager->eState>=PAGER_WRITER_DBMOD || pPager->eState==PAGER_OPEN) @@ -58130,7 +59174,7 @@ static int pager_playback(Pager *pPager, int isHot){ ** see if it is possible to delete the super-journal. */ assert( zSuper==&pPager->pTmpSpace[4] ); - memset(&zSuper[-4], 0, 4); + memset(pPager->pTmpSpace, 0, 4); rc = pager_delsuper(pPager, zSuper); testcase( rc!=SQLITE_OK ); } @@ -58331,7 +59375,7 @@ static int pagerWalFrames( assert( pPager->pWal ); assert( pList ); #ifdef SQLITE_DEBUG - /* Verify that the page list is in accending order */ + /* Verify that the page list is in ascending order */ for(p=pList; p && p->pDirty; p=p->pDirty){ assert( p->pgno < p->pDirty->pgno ); } @@ -58462,7 +59506,7 @@ static int pagerPagecount(Pager *pPager, Pgno *pnPage){ #ifndef SQLITE_OMIT_WAL /* ** Check if the *-wal file that corresponds to the database opened by pPager -** exists if the database is not empy, or verify that the *-wal file does +** exists if the database is not empty, or verify that the *-wal file does ** not exist (by deleting it) if the database file is empty. ** ** If the database is not empty and the *-wal file exists, open the pager @@ -58751,7 +59795,6 @@ SQLITE_PRIVATE void sqlite3PagerShrink(Pager *pPager){ ** Numeric values associated with these states are OFF==1, NORMAL=2, ** and FULL=3. */ -#ifndef SQLITE_OMIT_PAGER_PRAGMAS SQLITE_PRIVATE void sqlite3PagerSetFlags( Pager *pPager, /* The pager to set safety level for */ unsigned pgFlags /* Various flags */ @@ -58786,7 +59829,6 @@ SQLITE_PRIVATE void sqlite3PagerSetFlags( pPager->doNotSpill |= SPILLFLAG_OFF; } } -#endif /* ** The following global variable is incremented whenever the library @@ -59874,11 +60916,7 @@ SQLITE_PRIVATE int sqlite3PagerOpen( int rc = SQLITE_OK; /* Return code */ int tempFile = 0; /* True for temp files (incl. in-memory files) */ int memDb = 0; /* True if this is an in-memory file */ -#ifndef SQLITE_OMIT_DESERIALIZE int memJM = 0; /* Memory journal mode */ -#else -# define memJM 0 -#endif int readOnly = 0; /* True if this is a read-only file */ int journalFileSize; /* Bytes to allocate for each journal fd */ char *zPathname = 0; /* Full path to database file */ @@ -59888,7 +60926,6 @@ SQLITE_PRIVATE int sqlite3PagerOpen( u32 szPageDflt = SQLITE_DEFAULT_PAGE_SIZE; /* Default page size */ const char *zUri = 0; /* URI args to copy */ int nUriByte = 1; /* Number of bytes of URI args at *zUri */ - int nUri = 0; /* Number of URI parameters */ /* Figure out how much space is required for each journal file-handle ** (there are two of them, the main journal and the sub-journal). */ @@ -59936,7 +60973,6 @@ SQLITE_PRIVATE int sqlite3PagerOpen( while( *z ){ z += strlen(z)+1; z += strlen(z)+1; - nUri++; } nUriByte = (int)(&z[1] - zUri); assert( nUriByte>=1 ); @@ -59999,12 +61035,13 @@ SQLITE_PRIVATE int sqlite3PagerOpen( ** specific formatting and order of the various filenames, so if the format ** changes here, be sure to change it there as well. */ + assert( SQLITE_PTRSIZE==sizeof(Pager*) ); pPtr = (u8 *)sqlite3MallocZero( ROUND8(sizeof(*pPager)) + /* Pager structure */ ROUND8(pcacheSize) + /* PCache object */ ROUND8(pVfs->szOsFile) + /* The main db file */ journalFileSize * 2 + /* The two journal files */ - sizeof(pPager) + /* Space to hold a pointer */ + SQLITE_PTRSIZE + /* Space to hold a pointer */ 4 + /* Database prefix */ nPathname + 1 + /* database filename */ nUriByte + /* query parameters */ @@ -60025,7 +61062,7 @@ SQLITE_PRIVATE int sqlite3PagerOpen( pPager->sjfd = (sqlite3_file*)pPtr; pPtr += journalFileSize; pPager->jfd = (sqlite3_file*)pPtr; pPtr += journalFileSize; assert( EIGHT_BYTE_ALIGNMENT(pPager->jfd) ); - memcpy(pPtr, &pPager, sizeof(pPager)); pPtr += sizeof(pPager); + memcpy(pPtr, &pPager, SQLITE_PTRSIZE); pPtr += SQLITE_PTRSIZE; /* Fill in the Pager.zFilename and pPager.zQueryParam fields */ pPtr += 4; /* Skip zero prefix */ @@ -60079,9 +61116,7 @@ SQLITE_PRIVATE int sqlite3PagerOpen( int fout = 0; /* VFS flags returned by xOpen() */ rc = sqlite3OsOpen(pVfs, pPager->zFilename, pPager->fd, vfsFlags, &fout); assert( !memDb ); -#ifndef SQLITE_OMIT_DESERIALIZE pPager->memVfs = memJM = (fout&SQLITE_OPEN_MEMORY)!=0; -#endif readOnly = (fout&SQLITE_OPEN_READONLY)!=0; /* If the file was successfully opened for read/write access, @@ -60192,18 +61227,7 @@ SQLITE_PRIVATE int sqlite3PagerOpen( pPager->memDb = (u8)memDb; pPager->readOnly = (u8)readOnly; assert( useJournal || pPager->tempFile ); - pPager->noSync = pPager->tempFile; - if( pPager->noSync ){ - assert( pPager->fullSync==0 ); - assert( pPager->extraSync==0 ); - assert( pPager->syncFlags==0 ); - assert( pPager->walSyncFlags==0 ); - }else{ - pPager->fullSync = 1; - pPager->extraSync = 0; - pPager->syncFlags = SQLITE_SYNC_NORMAL; - pPager->walSyncFlags = SQLITE_SYNC_NORMAL | (SQLITE_SYNC_NORMAL<<2); - } + sqlite3PagerSetFlags(pPager, (SQLITE_DEFAULT_SYNCHRONOUS+1)|PAGER_CACHESPILL); /* pPager->pFirst = 0; */ /* pPager->pFirstSynced = 0; */ /* pPager->pLast = 0; */ @@ -60229,7 +61253,7 @@ SQLITE_PRIVATE int sqlite3PagerOpen( /* ** Return the sqlite3_file for the main database given the name -** of the corresonding WAL or Journal name as passed into +** of the corresponding WAL or Journal name as passed into ** xOpen. */ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char *zName){ @@ -60732,6 +61756,10 @@ static int getPageNormal( if( !isOpen(pPager->fd) || pPager->dbSizepPager->mxPgno ){ rc = SQLITE_FULL; + if( pgno<=pPager->dbSize ){ + sqlite3PcacheRelease(pPg); + pPg = 0; + } goto pager_acquire_err; } if( noContent ){ @@ -60896,10 +61924,12 @@ SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno){ /* ** Release a page reference. ** -** The sqlite3PagerUnref() and sqlite3PagerUnrefNotNull() may only be -** used if we know that the page being released is not the last page. +** The sqlite3PagerUnref() and sqlite3PagerUnrefNotNull() may only be used +** if we know that the page being released is not the last reference to page1. ** The btree layer always holds page1 open until the end, so these first -** to routines can be used to release any page other than BtShared.pPage1. +** two routines can be used to release any page other than BtShared.pPage1. +** The assert() at tag-20230419-2 proves that this constraint is always +** honored. ** ** Use sqlite3PagerUnrefPageOne() to release page1. This latter routine ** checks the total number of outstanding pages and if the number of @@ -60915,7 +61945,7 @@ SQLITE_PRIVATE void sqlite3PagerUnrefNotNull(DbPage *pPg){ sqlite3PcacheRelease(pPg); } /* Do not use this routine to release the last reference to page1 */ - assert( sqlite3PcacheRefCount(pPager->pPCache)>0 ); + assert( sqlite3PcacheRefCount(pPager->pPCache)>0 ); /* tag-20230419-2 */ } SQLITE_PRIVATE void sqlite3PagerUnref(DbPage *pPg){ if( pPg ) sqlite3PagerUnrefNotNull(pPg); @@ -61464,7 +62494,7 @@ static int pager_incr_changecounter(Pager *pPager, int isDirectMode){ # define DIRECT_MODE isDirectMode #endif - if( !pPager->changeCountDone && ALWAYS(pPager->dbSize>0) ){ + if( !pPager->changeCountDone && pPager->dbSize>0 ){ PgHdr *pPgHdr; /* Reference to page 1 */ assert( !pPager->tempFile && isOpen(pPager->fd) ); @@ -62204,7 +63234,11 @@ SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint){ */ SQLITE_PRIVATE const char *sqlite3PagerFilename(const Pager *pPager, int nullIfMemDb){ static const char zFake[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - return (nullIfMemDb && pPager->memDb) ? &zFake[4] : pPager->zFilename; + if( nullIfMemDb && (pPager->memDb || sqlite3IsMemdb(pPager->pVfs)) ){ + return &zFake[4]; + }else{ + return pPager->zFilename; + } } /* @@ -62504,7 +63538,7 @@ SQLITE_PRIVATE int sqlite3PagerSetJournalMode(Pager *pPager, int eMode){ assert( pPager->eState!=PAGER_ERROR ); pPager->journalMode = (u8)eMode; - /* When transistioning from TRUNCATE or PERSIST to any other journal + /* When transitioning from TRUNCATE or PERSIST to any other journal ** mode except WAL, unless the pager is in locking_mode=exclusive mode, ** delete the journal file. */ @@ -62671,13 +63705,15 @@ SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager){ */ static int pagerExclusiveLock(Pager *pPager){ int rc; /* Return code */ + u8 eOrigLock; /* Original lock */ - assert( pPager->eLock==SHARED_LOCK || pPager->eLock==EXCLUSIVE_LOCK ); + assert( pPager->eLock>=SHARED_LOCK ); + eOrigLock = pPager->eLock; rc = pagerLockDb(pPager, EXCLUSIVE_LOCK); if( rc!=SQLITE_OK ){ /* If the attempt to grab the exclusive lock failed, release the ** pending lock that may have been obtained instead. */ - pagerUnlockDb(pPager, SHARED_LOCK); + pagerUnlockDb(pPager, eOrigLock); } return rc; @@ -62930,6 +63966,12 @@ SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager){ } #endif +#ifdef SQLITE_USE_SEH +SQLITE_PRIVATE int sqlite3PagerWalSystemErrno(Pager *pPager){ + return sqlite3WalSystemErrno(pPager->pWal); +} +#endif + #endif /* SQLITE_OMIT_DISKIO */ /************** End of pager.c ***********************************************/ @@ -63220,7 +64262,7 @@ SQLITE_PRIVATE int sqlite3WalTrace = 0; ** ** Technically, the various VFSes are free to implement these locks however ** they see fit. However, compatibility is encouraged so that VFSes can -** interoperate. The standard implemention used on both unix and windows +** interoperate. The standard implementation used on both unix and windows ** is for the index number to indicate a byte offset into the ** WalCkptInfo.aLock[] array in the wal-index header. In other words, all ** locks are on the shm file. The WALINDEX_LOCK_OFFSET constant (which @@ -63296,7 +64338,7 @@ struct WalIndexHdr { ** the mxFrame for that reader. The value READMARK_NOT_USED (0xffffffff) ** for any aReadMark[] means that entry is unused. aReadMark[0] is ** a special case; its value is never used and it exists as a place-holder -** to avoid having to offset aReadMark[] indexs by one. Readers holding +** to avoid having to offset aReadMark[] indexes by one. Readers holding ** WAL_READ_LOCK(0) always ignore the entire WAL and read all content ** directly from the database. ** @@ -63464,7 +64506,15 @@ struct Wal { u32 iReCksum; /* On commit, recalculate checksums from here */ const char *zWalName; /* Name of WAL file */ u32 nCkpt; /* Checkpoint sequence counter in the wal-header */ +#ifdef SQLITE_USE_SEH + u32 lockMask; /* Mask of locks held */ + void *pFree; /* Pointer to sqlite3_free() if exception thrown */ + u32 *pWiValue; /* Value to write into apWiData[iWiPg] */ + int iWiPg; /* Write pWiValue into apWiData[iWiPg] */ + int iSysErrno; /* System error code following exception */ +#endif #ifdef SQLITE_DEBUG + int nSehTry; /* Number of nested SEH_TRY{} blocks */ u8 lockError; /* True if a locking error has occurred */ #endif #ifdef SQLITE_ENABLE_SNAPSHOT @@ -63546,6 +64596,113 @@ struct WalIterator { sizeof(ht_slot)*HASHTABLE_NSLOT + HASHTABLE_NPAGE*sizeof(u32) \ ) +/* +** Structured Exception Handling (SEH) is a Windows-specific technique +** for catching exceptions raised while accessing memory-mapped files. +** +** The -DSQLITE_USE_SEH compile-time option means to use SEH to catch and +** deal with system-level errors that arise during WAL -shm file processing. +** Without this compile-time option, any system-level faults that appear +** while accessing the memory-mapped -shm file will cause a process-wide +** signal to be deliver, which will more than likely cause the entire +** process to exit. +*/ +#ifdef SQLITE_USE_SEH +#include + +/* Beginning of a block of code in which an exception might occur */ +# define SEH_TRY __try { \ + assert( walAssertLockmask(pWal) && pWal->nSehTry==0 ); \ + VVA_ONLY(pWal->nSehTry++); + +/* The end of a block of code in which an exception might occur */ +# define SEH_EXCEPT(X) \ + VVA_ONLY(pWal->nSehTry--); \ + assert( pWal->nSehTry==0 ); \ + } __except( sehExceptionFilter(pWal, GetExceptionCode(), GetExceptionInformation() ) ){ X } + +/* Simulate a memory-mapping fault in the -shm file for testing purposes */ +# define SEH_INJECT_FAULT sehInjectFault(pWal) + +/* +** The second argument is the return value of GetExceptionCode() for the +** current exception. Return EXCEPTION_EXECUTE_HANDLER if the exception code +** indicates that the exception may have been caused by accessing the *-shm +** file mapping. Or EXCEPTION_CONTINUE_SEARCH otherwise. +*/ +static int sehExceptionFilter(Wal *pWal, int eCode, EXCEPTION_POINTERS *p){ + VVA_ONLY(pWal->nSehTry--); + if( eCode==EXCEPTION_IN_PAGE_ERROR ){ + if( p && p->ExceptionRecord && p->ExceptionRecord->NumberParameters>=3 ){ + /* From MSDN: For this type of exception, the first element of the + ** ExceptionInformation[] array is a read-write flag - 0 if the exception + ** was thrown while reading, 1 if while writing. The second element is + ** the virtual address being accessed. The "third array element specifies + ** the underlying NTSTATUS code that resulted in the exception". */ + pWal->iSysErrno = (int)p->ExceptionRecord->ExceptionInformation[2]; + } + return EXCEPTION_EXECUTE_HANDLER; + } + return EXCEPTION_CONTINUE_SEARCH; +} + +/* +** If one is configured, invoke the xTestCallback callback with 650 as +** the argument. If it returns true, throw the same exception that is +** thrown by the system if the *-shm file mapping is accessed after it +** has been invalidated. +*/ +static void sehInjectFault(Wal *pWal){ + int res; + assert( pWal->nSehTry>0 ); + + res = sqlite3FaultSim(650); + if( res!=0 ){ + ULONG_PTR aArg[3]; + aArg[0] = 0; + aArg[1] = 0; + aArg[2] = (ULONG_PTR)res; + RaiseException(EXCEPTION_IN_PAGE_ERROR, 0, 3, (const ULONG_PTR*)aArg); + } +} + +/* +** There are two ways to use this macro. To set a pointer to be freed +** if an exception is thrown: +** +** SEH_FREE_ON_ERROR(0, pPtr); +** +** and to cancel the same: +** +** SEH_FREE_ON_ERROR(pPtr, 0); +** +** In the first case, there must not already be a pointer registered to +** be freed. In the second case, pPtr must be the registered pointer. +*/ +#define SEH_FREE_ON_ERROR(X,Y) \ + assert( (X==0 || Y==0) && pWal->pFree==X ); pWal->pFree = Y + +/* +** There are two ways to use this macro. To arrange for pWal->apWiData[iPg] +** to be set to pValue if an exception is thrown: +** +** SEH_SET_ON_ERROR(iPg, pValue); +** +** and to cancel the same: +** +** SEH_SET_ON_ERROR(0, 0); +*/ +#define SEH_SET_ON_ERROR(X,Y) pWal->iWiPg = X; pWal->pWiValue = Y + +#else +# define SEH_TRY VVA_ONLY(pWal->nSehTry++); +# define SEH_EXCEPT(X) VVA_ONLY(pWal->nSehTry--); assert( pWal->nSehTry==0 ); +# define SEH_INJECT_FAULT assert( pWal->nSehTry>0 ); +# define SEH_FREE_ON_ERROR(X,Y) +# define SEH_SET_ON_ERROR(X,Y) +#endif /* ifdef SQLITE_USE_SEH */ + + /* ** Obtain a pointer to the iPage'th page of the wal-index. The wal-index ** is broken into pages of WALINDEX_PGSZ bytes. Wal-index pages are @@ -63618,6 +64775,7 @@ static int walIndexPage( int iPage, /* The page we seek */ volatile u32 **ppPage /* Write the page pointer here */ ){ + SEH_INJECT_FAULT; if( pWal->nWiData<=iPage || (*ppPage = pWal->apWiData[iPage])==0 ){ return walIndexPageRealloc(pWal, iPage, ppPage); } @@ -63629,6 +64787,7 @@ static int walIndexPage( */ static volatile WalCkptInfo *walCkptInfo(Wal *pWal){ assert( pWal->nWiData>0 && pWal->apWiData[0] ); + SEH_INJECT_FAULT; return (volatile WalCkptInfo*)&(pWal->apWiData[0][sizeof(WalIndexHdr)/2]); } @@ -63637,6 +64796,7 @@ static volatile WalCkptInfo *walCkptInfo(Wal *pWal){ */ static volatile WalIndexHdr *walIndexHdr(Wal *pWal){ assert( pWal->nWiData>0 && pWal->apWiData[0] ); + SEH_INJECT_FAULT; return (volatile WalIndexHdr*)pWal->apWiData[0]; } @@ -63682,19 +64842,40 @@ static void walChecksumBytes( assert( nByte>=8 ); assert( (nByte&0x00000007)==0 ); assert( nByte<=65536 ); + assert( nByte%4==0 ); - if( nativeCksum ){ + if( !nativeCksum ){ + do { + s1 += BYTESWAP32(aData[0]) + s2; + s2 += BYTESWAP32(aData[1]) + s1; + aData += 2; + }while( aDatalockError = (u8)(rc!=SQLITE_OK && (rc&0xFF)!=SQLITE_BUSY); ) +#ifdef SQLITE_USE_SEH + if( rc==SQLITE_OK ) pWal->lockMask |= (1 << lockIdx); +#endif return rc; } static void walUnlockShared(Wal *pWal, int lockIdx){ if( pWal->exclusiveMode ) return; (void)sqlite3OsShmLock(pWal->pDbFd, lockIdx, 1, SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED); +#ifdef SQLITE_USE_SEH + pWal->lockMask &= ~(1 << lockIdx); +#endif WALTRACE(("WAL%p: release SHARED-%s\n", pWal, walLockName(lockIdx))); } static int walLockExclusive(Wal *pWal, int lockIdx, int n){ @@ -63889,12 +65076,20 @@ static int walLockExclusive(Wal *pWal, int lockIdx, int n){ WALTRACE(("WAL%p: acquire EXCLUSIVE-%s cnt=%d %s\n", pWal, walLockName(lockIdx), n, rc ? "failed" : "ok")); VVA_ONLY( pWal->lockError = (u8)(rc!=SQLITE_OK && (rc&0xFF)!=SQLITE_BUSY); ) +#ifdef SQLITE_USE_SEH + if( rc==SQLITE_OK ){ + pWal->lockMask |= (((1<exclusiveMode ) return; (void)sqlite3OsShmLock(pWal->pDbFd, lockIdx, n, SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE); +#ifdef SQLITE_USE_SEH + pWal->lockMask &= ~(((1<apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1]; } @@ -64245,6 +65441,7 @@ static int walIndexRecover(Wal *pWal){ /* Malloc a buffer to read frames into. */ szFrame = szPage + WAL_FRAME_HDRSIZE; aFrame = (u8 *)sqlite3_malloc64(szFrame + WALINDEX_PGSZ); + SEH_FREE_ON_ERROR(0, aFrame); if( !aFrame ){ rc = SQLITE_NOMEM_BKPT; goto recovery_error; @@ -64263,6 +65460,7 @@ static int walIndexRecover(Wal *pWal){ rc = walIndexPage(pWal, iPg, (volatile u32**)&aShare); assert( aShare!=0 || rc!=SQLITE_OK ); if( aShare==0 ) break; + SEH_SET_ON_ERROR(iPg, aShare); pWal->apWiData[iPg] = aPrivate; for(iFrame=iFirst; iFrame<=iLast; iFrame++){ @@ -64290,6 +65488,7 @@ static int walIndexRecover(Wal *pWal){ } } pWal->apWiData[iPg] = aShare; + SEH_SET_ON_ERROR(0,0); nHdr = (iPg==0 ? WALINDEX_HDR_SIZE : 0); nHdr32 = nHdr / sizeof(u32); #ifndef SQLITE_SAFER_WALINDEX_RECOVERY @@ -64320,9 +65519,11 @@ static int walIndexRecover(Wal *pWal){ } } #endif + SEH_INJECT_FAULT; if( iFrame<=iLast ) break; } + SEH_FREE_ON_ERROR(aFrame, 0); sqlite3_free(aFrame); } @@ -64350,6 +65551,7 @@ static int walIndexRecover(Wal *pWal){ }else{ pInfo->aReadMark[i] = READMARK_NOT_USED; } + SEH_INJECT_FAULT; walUnlockExclusive(pWal, WAL_READ_LOCK(i), 1); }else if( rc!=SQLITE_BUSY ){ goto recovery_error; @@ -64507,7 +65709,7 @@ SQLITE_PRIVATE int sqlite3WalOpen( } /* -** Change the size to which the WAL file is trucated on each reset. +** Change the size to which the WAL file is truncated on each reset. */ SQLITE_PRIVATE void sqlite3WalLimit(Wal *pWal, i64 iLimit){ if( pWal ) pWal->mxWalSize = iLimit; @@ -64733,23 +65935,16 @@ static int walIteratorInit(Wal *pWal, u32 nBackfill, WalIterator **pp){ nByte = sizeof(WalIterator) + (nSegment-1)*sizeof(struct WalSegment) + iLast*sizeof(ht_slot); - p = (WalIterator *)sqlite3_malloc64(nByte); + p = (WalIterator *)sqlite3_malloc64(nByte + + sizeof(ht_slot) * (iLast>HASHTABLE_NPAGE?HASHTABLE_NPAGE:iLast) + ); if( !p ){ return SQLITE_NOMEM_BKPT; } memset(p, 0, nByte); p->nSegment = nSegment; - - /* Allocate temporary space used by the merge-sort routine. This block - ** of memory will be freed before this function returns. - */ - aTmp = (ht_slot *)sqlite3_malloc64( - sizeof(ht_slot) * (iLast>HASHTABLE_NPAGE?HASHTABLE_NPAGE:iLast) - ); - if( !aTmp ){ - rc = SQLITE_NOMEM_BKPT; - } - + aTmp = (ht_slot*)&(((u8*)p)[nByte]); + SEH_FREE_ON_ERROR(0, p); for(i=walFramePage(nBackfill+1); rc==SQLITE_OK && iaSegment[i].aPgno = (u32 *)sLoc.aPgno; } } - sqlite3_free(aTmp); - if( rc!=SQLITE_OK ){ + SEH_FREE_ON_ERROR(p, 0); walIteratorFree(p); p = 0; } @@ -65005,13 +66199,13 @@ static int walCheckpoint( mxSafeFrame = pWal->hdr.mxFrame; mxPage = pWal->hdr.nPage; for(i=1; iaReadMark+i); + u32 y = AtomicLoad(pInfo->aReadMark+i); SEH_INJECT_FAULT; if( mxSafeFrame>y ){ assert( y<=pWal->hdr.mxFrame ); rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_READ_LOCK(i), 1); if( rc==SQLITE_OK ){ u32 iMark = (i==1 ? mxSafeFrame : READMARK_NOT_USED); - AtomicStore(pInfo->aReadMark+i, iMark); + AtomicStore(pInfo->aReadMark+i, iMark); SEH_INJECT_FAULT; walUnlockExclusive(pWal, WAL_READ_LOCK(i), 1); }else if( rc==SQLITE_BUSY ){ mxSafeFrame = y; @@ -65032,8 +66226,7 @@ static int walCheckpoint( && (rc = walBusyLock(pWal,xBusy,pBusyArg,WAL_READ_LOCK(0),1))==SQLITE_OK ){ u32 nBackfill = pInfo->nBackfill; - - pInfo->nBackfillAttempted = mxSafeFrame; + pInfo->nBackfillAttempted = mxSafeFrame; SEH_INJECT_FAULT; /* Sync the WAL to disk */ rc = sqlite3OsSync(pWal->pWalFd, CKPT_SYNC_FLAGS(sync_flags)); @@ -65064,6 +66257,7 @@ static int walCheckpoint( while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){ i64 iOffset; assert( walFramePgno(pWal, iFrame)==iDbpage ); + SEH_INJECT_FAULT; if( AtomicLoad(&db->u1.isInterrupted) ){ rc = db->mallocFailed ? SQLITE_NOMEM_BKPT : SQLITE_INTERRUPT; break; @@ -65093,7 +66287,7 @@ static int walCheckpoint( } } if( rc==SQLITE_OK ){ - AtomicStore(&pInfo->nBackfill, mxSafeFrame); + AtomicStore(&pInfo->nBackfill, mxSafeFrame); SEH_INJECT_FAULT; } } @@ -65115,6 +66309,7 @@ static int walCheckpoint( */ if( rc==SQLITE_OK && eMode!=SQLITE_CHECKPOINT_PASSIVE ){ assert( pWal->writeLock ); + SEH_INJECT_FAULT; if( pInfo->nBackfillhdr.mxFrame ){ rc = SQLITE_BUSY; }else if( eMode>=SQLITE_CHECKPOINT_RESTART ){ @@ -65146,6 +66341,7 @@ static int walCheckpoint( } walcheckpoint_out: + SEH_FREE_ON_ERROR(pIter, 0); walIteratorFree(pIter); return rc; } @@ -65168,6 +66364,93 @@ static void walLimitSize(Wal *pWal, i64 nMax){ } } +#ifdef SQLITE_USE_SEH +/* +** This is the "standard" exception handler used in a few places to handle +** an exception thrown by reading from the *-shm mapping after it has become +** invalid in SQLITE_USE_SEH builds. It is used as follows: +** +** SEH_TRY { ... } +** SEH_EXCEPT( rc = walHandleException(pWal); ) +** +** This function does three things: +** +** 1) Determines the locks that should be held, based on the contents of +** the Wal.readLock, Wal.writeLock and Wal.ckptLock variables. All other +** held locks are assumed to be transient locks that would have been +** released had the exception not been thrown and are dropped. +** +** 2) Frees the pointer at Wal.pFree, if any, using sqlite3_free(). +** +** 3) Set pWal->apWiData[pWal->iWiPg] to pWal->pWiValue if not NULL +** +** 4) Returns SQLITE_IOERR. +*/ +static int walHandleException(Wal *pWal){ + if( pWal->exclusiveMode==0 ){ + static const int S = 1; + static const int E = (1<lockMask & ~( + (pWal->readLock<0 ? 0 : (S << WAL_READ_LOCK(pWal->readLock))) + | (pWal->writeLock ? (E << WAL_WRITE_LOCK) : 0) + | (pWal->ckptLock ? (E << WAL_CKPT_LOCK) : 0) + ); + for(ii=0; iipFree); + pWal->pFree = 0; + if( pWal->pWiValue ){ + pWal->apWiData[pWal->iWiPg] = pWal->pWiValue; + pWal->pWiValue = 0; + } + return SQLITE_IOERR_IN_PAGE; +} + +/* +** Assert that the Wal.lockMask mask, which indicates the locks held +** by the connenction, is consistent with the Wal.readLock, Wal.writeLock +** and Wal.ckptLock variables. To be used as: +** +** assert( walAssertLockmask(pWal) ); +*/ +static int walAssertLockmask(Wal *pWal){ + if( pWal->exclusiveMode==0 ){ + static const int S = 1; + static const int E = (1<readLock<0 ? 0 : (S << WAL_READ_LOCK(pWal->readLock))) + | (pWal->writeLock ? (E << WAL_WRITE_LOCK) : 0) + | (pWal->ckptLock ? (E << WAL_CKPT_LOCK) : 0) +#ifdef SQLITE_ENABLE_SNAPSHOT + | (pWal->pSnapshot ? (pWal->lockMask & (1 << WAL_CKPT_LOCK)) : 0) +#endif + ); + assert( mExpect==pWal->lockMask ); + } + return 1; +} + +/* +** Return and zero the "system error" field set when an +** EXCEPTION_IN_PAGE_ERROR exception is caught. +*/ +SQLITE_PRIVATE int sqlite3WalSystemErrno(Wal *pWal){ + int iRet = 0; + if( pWal ){ + iRet = pWal->iSysErrno; + pWal->iSysErrno = 0; + } + return iRet; +} + +#else +# define walAssertLockmask(x) 1 +#endif /* ifdef SQLITE_USE_SEH */ + /* ** Close a connection to a log file. */ @@ -65182,6 +66465,8 @@ SQLITE_PRIVATE int sqlite3WalClose( if( pWal ){ int isDelete = 0; /* True to unlink wal and wal-index files */ + assert( walAssertLockmask(pWal) ); + /* If an EXCLUSIVE lock can be obtained on the database file (using the ** ordinary, rollback-mode locking methods, this guarantees that the ** connection associated with this log file is the only connection to @@ -65206,7 +66491,7 @@ SQLITE_PRIVATE int sqlite3WalClose( ); if( bPersist!=1 ){ /* Try to delete the WAL file if the checkpoint completed and - ** fsyned (rc==SQLITE_OK) and if we are not in persistent-wal + ** fsynced (rc==SQLITE_OK) and if we are not in persistent-wal ** mode (!bPersist) */ isDelete = 1; }else if( pWal->mxWalSize>=0 ){ @@ -65273,7 +66558,7 @@ static SQLITE_NO_TSAN int walIndexTryHdr(Wal *pWal, int *pChanged){ ** give false-positive warnings about these accesses because the tools do not ** account for the double-read and the memory barrier. The use of mutexes ** here would be problematic as the memory being accessed is potentially - ** shared among multiple processes and not all mutex implementions work + ** shared among multiple processes and not all mutex implementations work ** reliably in that environment. */ aHdr = walIndexHdr(pWal); @@ -65724,6 +67009,7 @@ static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int cnt){ assert( pWal->nWiData>0 ); assert( pWal->apWiData[0]!=0 ); pInfo = walCkptInfo(pWal); + SEH_INJECT_FAULT; if( !useWal && AtomicLoad(&pInfo->nBackfill)==pWal->hdr.mxFrame #ifdef SQLITE_ENABLE_SNAPSHOT && (pWal->pSnapshot==0 || pWal->hdr.mxFrame==0) @@ -65773,7 +67059,7 @@ static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int cnt){ } #endif for(i=1; iaReadMark+i); + u32 thisMark = AtomicLoad(pInfo->aReadMark+i); SEH_INJECT_FAULT; if( mxReadMark<=thisMark && thisMark<=mxFrame ){ assert( thisMark!=READMARK_NOT_USED ); mxReadMark = thisMark; @@ -65839,7 +67125,7 @@ static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int cnt){ ** we can guarantee that the checkpointer that set nBackfill could not ** see any pages past pWal->hdr.mxFrame, this problem does not come up. */ - pWal->minFrame = AtomicLoad(&pInfo->nBackfill)+1; + pWal->minFrame = AtomicLoad(&pInfo->nBackfill)+1; SEH_INJECT_FAULT; walShmBarrier(pWal); if( AtomicLoad(pInfo->aReadMark+mxI)!=mxReadMark || memcmp((void *)walIndexHdr(pWal), &pWal->hdr, sizeof(WalIndexHdr)) @@ -65854,6 +67140,54 @@ static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int cnt){ } #ifdef SQLITE_ENABLE_SNAPSHOT +/* +** This function does the work of sqlite3WalSnapshotRecover(). +*/ +static int walSnapshotRecover( + Wal *pWal, /* WAL handle */ + void *pBuf1, /* Temp buffer pWal->szPage bytes in size */ + void *pBuf2 /* Temp buffer pWal->szPage bytes in size */ +){ + int szPage = (int)pWal->szPage; + int rc; + i64 szDb; /* Size of db file in bytes */ + + rc = sqlite3OsFileSize(pWal->pDbFd, &szDb); + if( rc==SQLITE_OK ){ + volatile WalCkptInfo *pInfo = walCkptInfo(pWal); + u32 i = pInfo->nBackfillAttempted; + for(i=pInfo->nBackfillAttempted; i>AtomicLoad(&pInfo->nBackfill); i--){ + WalHashLoc sLoc; /* Hash table location */ + u32 pgno; /* Page number in db file */ + i64 iDbOff; /* Offset of db file entry */ + i64 iWalOff; /* Offset of wal file entry */ + + rc = walHashGet(pWal, walFramePage(i), &sLoc); + if( rc!=SQLITE_OK ) break; + assert( i - sLoc.iZero - 1 >=0 ); + pgno = sLoc.aPgno[i-sLoc.iZero-1]; + iDbOff = (i64)(pgno-1) * szPage; + + if( iDbOff+szPage<=szDb ){ + iWalOff = walFrameOffset(i, szPage) + WAL_FRAME_HDRSIZE; + rc = sqlite3OsRead(pWal->pWalFd, pBuf1, szPage, iWalOff); + + if( rc==SQLITE_OK ){ + rc = sqlite3OsRead(pWal->pDbFd, pBuf2, szPage, iDbOff); + } + + if( rc!=SQLITE_OK || 0==memcmp(pBuf1, pBuf2, szPage) ){ + break; + } + } + + pInfo->nBackfillAttempted = i-1; + } + } + + return rc; +} + /* ** Attempt to reduce the value of the WalCkptInfo.nBackfillAttempted ** variable so that older snapshots can be accessed. To do this, loop @@ -65879,50 +67213,21 @@ SQLITE_PRIVATE int sqlite3WalSnapshotRecover(Wal *pWal){ assert( pWal->readLock>=0 ); rc = walLockExclusive(pWal, WAL_CKPT_LOCK, 1); if( rc==SQLITE_OK ){ - volatile WalCkptInfo *pInfo = walCkptInfo(pWal); - int szPage = (int)pWal->szPage; - i64 szDb; /* Size of db file in bytes */ - - rc = sqlite3OsFileSize(pWal->pDbFd, &szDb); - if( rc==SQLITE_OK ){ - void *pBuf1 = sqlite3_malloc(szPage); - void *pBuf2 = sqlite3_malloc(szPage); - if( pBuf1==0 || pBuf2==0 ){ - rc = SQLITE_NOMEM; - }else{ - u32 i = pInfo->nBackfillAttempted; - for(i=pInfo->nBackfillAttempted; i>AtomicLoad(&pInfo->nBackfill); i--){ - WalHashLoc sLoc; /* Hash table location */ - u32 pgno; /* Page number in db file */ - i64 iDbOff; /* Offset of db file entry */ - i64 iWalOff; /* Offset of wal file entry */ - - rc = walHashGet(pWal, walFramePage(i), &sLoc); - if( rc!=SQLITE_OK ) break; - assert( i - sLoc.iZero - 1 >=0 ); - pgno = sLoc.aPgno[i-sLoc.iZero-1]; - iDbOff = (i64)(pgno-1) * szPage; - - if( iDbOff+szPage<=szDb ){ - iWalOff = walFrameOffset(i, szPage) + WAL_FRAME_HDRSIZE; - rc = sqlite3OsRead(pWal->pWalFd, pBuf1, szPage, iWalOff); - - if( rc==SQLITE_OK ){ - rc = sqlite3OsRead(pWal->pDbFd, pBuf2, szPage, iDbOff); - } - - if( rc!=SQLITE_OK || 0==memcmp(pBuf1, pBuf2, szPage) ){ - break; - } - } - - pInfo->nBackfillAttempted = i-1; - } + void *pBuf1 = sqlite3_malloc(pWal->szPage); + void *pBuf2 = sqlite3_malloc(pWal->szPage); + if( pBuf1==0 || pBuf2==0 ){ + rc = SQLITE_NOMEM; + }else{ + pWal->ckptLock = 1; + SEH_TRY { + rc = walSnapshotRecover(pWal, pBuf1, pBuf2); } - - sqlite3_free(pBuf1); - sqlite3_free(pBuf2); + SEH_EXCEPT( rc = SQLITE_IOERR_IN_PAGE; ) + pWal->ckptLock = 0; } + + sqlite3_free(pBuf1); + sqlite3_free(pBuf2); walUnlockExclusive(pWal, WAL_CKPT_LOCK, 1); } @@ -65931,28 +67236,20 @@ SQLITE_PRIVATE int sqlite3WalSnapshotRecover(Wal *pWal){ #endif /* SQLITE_ENABLE_SNAPSHOT */ /* -** Begin a read transaction on the database. -** -** This routine used to be called sqlite3OpenSnapshot() and with good reason: -** it takes a snapshot of the state of the WAL and wal-index for the current -** instant in time. The current thread will continue to use this snapshot. -** Other threads might append new content to the WAL and wal-index but -** that extra content is ignored by the current thread. -** -** If the database contents have changes since the previous read -** transaction, then *pChanged is set to 1 before returning. The -** Pager layer will use this to know that its cache is stale and -** needs to be flushed. +** This function does the work of sqlite3WalBeginReadTransaction() (see +** below). That function simply calls this one inside an SEH_TRY{...} block. */ -SQLITE_PRIVATE int sqlite3WalBeginReadTransaction(Wal *pWal, int *pChanged){ +static int walBeginReadTransaction(Wal *pWal, int *pChanged){ int rc; /* Return code */ int cnt = 0; /* Number of TryBeginRead attempts */ #ifdef SQLITE_ENABLE_SNAPSHOT + int ckptLock = 0; int bChanged = 0; WalIndexHdr *pSnapshot = pWal->pSnapshot; #endif assert( pWal->ckptLock==0 ); + assert( pWal->nSehTry>0 ); #ifdef SQLITE_ENABLE_SNAPSHOT if( pSnapshot ){ @@ -65975,7 +67272,7 @@ SQLITE_PRIVATE int sqlite3WalBeginReadTransaction(Wal *pWal, int *pChanged){ if( rc!=SQLITE_OK ){ return rc; } - pWal->ckptLock = 1; + ckptLock = 1; } #endif @@ -66039,15 +67336,37 @@ SQLITE_PRIVATE int sqlite3WalBeginReadTransaction(Wal *pWal, int *pChanged){ } /* Release the shared CKPT lock obtained above. */ - if( pWal->ckptLock ){ + if( ckptLock ){ assert( pSnapshot ); walUnlockShared(pWal, WAL_CKPT_LOCK); - pWal->ckptLock = 0; } #endif return rc; } +/* +** Begin a read transaction on the database. +** +** This routine used to be called sqlite3OpenSnapshot() and with good reason: +** it takes a snapshot of the state of the WAL and wal-index for the current +** instant in time. The current thread will continue to use this snapshot. +** Other threads might append new content to the WAL and wal-index but +** that extra content is ignored by the current thread. +** +** If the database contents have changes since the previous read +** transaction, then *pChanged is set to 1 before returning. The +** Pager layer will use this to know that its cache is stale and +** needs to be flushed. +*/ +SQLITE_PRIVATE int sqlite3WalBeginReadTransaction(Wal *pWal, int *pChanged){ + int rc; + SEH_TRY { + rc = walBeginReadTransaction(pWal, pChanged); + } + SEH_EXCEPT( rc = walHandleException(pWal); ) + return rc; +} + /* ** Finish with a read transaction. All this does is release the ** read-lock. @@ -66068,7 +67387,7 @@ SQLITE_PRIVATE void sqlite3WalEndReadTransaction(Wal *pWal){ ** Return SQLITE_OK if successful, or an error code if an error occurs. If an ** error does occur, the final value of *piRead is undefined. */ -SQLITE_PRIVATE int sqlite3WalFindFrame( +static int walFindFrame( Wal *pWal, /* WAL handle */ Pgno pgno, /* Database page number to read data for */ u32 *piRead /* OUT: Frame number (or zero) */ @@ -66131,6 +67450,7 @@ SQLITE_PRIVATE int sqlite3WalFindFrame( } nCollide = HASHTABLE_NSLOT; iKey = walHash(pgno); + SEH_INJECT_FAULT; while( (iH = AtomicLoad(&sLoc.aHash[iKey]))!=0 ){ u32 iFrame = iH + sLoc.iZero; if( iFrame<=iLast && iFrame>=pWal->minFrame && sLoc.aPgno[iH-1]==pgno ){ @@ -66167,6 +67487,30 @@ SQLITE_PRIVATE int sqlite3WalFindFrame( return SQLITE_OK; } +/* +** Search the wal file for page pgno. If found, set *piRead to the frame that +** contains the page. Otherwise, if pgno is not in the wal file, set *piRead +** to zero. +** +** Return SQLITE_OK if successful, or an error code if an error occurs. If an +** error does occur, the final value of *piRead is undefined. +** +** The difference between this function and walFindFrame() is that this +** function wraps walFindFrame() in an SEH_TRY{...} block. +*/ +SQLITE_PRIVATE int sqlite3WalFindFrame( + Wal *pWal, /* WAL handle */ + Pgno pgno, /* Database page number to read data for */ + u32 *piRead /* OUT: Frame number (or zero) */ +){ + int rc; + SEH_TRY { + rc = walFindFrame(pWal, pgno, piRead); + } + SEH_EXCEPT( rc = SQLITE_IOERR_IN_PAGE; ) + return rc; +} + /* ** Read the contents of frame iRead from the wal file into buffer pOut ** (which is nOut bytes in size). Return SQLITE_OK if successful, or an @@ -66248,12 +67592,17 @@ SQLITE_PRIVATE int sqlite3WalBeginWriteTransaction(Wal *pWal){ ** time the read transaction on this connection was started, then ** the write is disallowed. */ - if( memcmp(&pWal->hdr, (void *)walIndexHdr(pWal), sizeof(WalIndexHdr))!=0 ){ + SEH_TRY { + if( memcmp(&pWal->hdr, (void *)walIndexHdr(pWal), sizeof(WalIndexHdr))!=0 ){ + rc = SQLITE_BUSY_SNAPSHOT; + } + } + SEH_EXCEPT( rc = SQLITE_IOERR_IN_PAGE; ) + + if( rc!=SQLITE_OK ){ walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1); pWal->writeLock = 0; - rc = SQLITE_BUSY_SNAPSHOT; } - return rc; } @@ -66289,30 +67638,33 @@ SQLITE_PRIVATE int sqlite3WalUndo(Wal *pWal, int (*xUndo)(void *, Pgno), void *p Pgno iMax = pWal->hdr.mxFrame; Pgno iFrame; - /* Restore the clients cache of the wal-index header to the state it - ** was in before the client began writing to the database. - */ - memcpy(&pWal->hdr, (void *)walIndexHdr(pWal), sizeof(WalIndexHdr)); - - for(iFrame=pWal->hdr.mxFrame+1; - ALWAYS(rc==SQLITE_OK) && iFrame<=iMax; - iFrame++ - ){ - /* This call cannot fail. Unless the page for which the page number - ** is passed as the second argument is (a) in the cache and - ** (b) has an outstanding reference, then xUndo is either a no-op - ** (if (a) is false) or simply expels the page from the cache (if (b) - ** is false). - ** - ** If the upper layer is doing a rollback, it is guaranteed that there - ** are no outstanding references to any page other than page 1. And - ** page 1 is never written to the log until the transaction is - ** committed. As a result, the call to xUndo may not fail. + SEH_TRY { + /* Restore the clients cache of the wal-index header to the state it + ** was in before the client began writing to the database. */ - assert( walFramePgno(pWal, iFrame)!=1 ); - rc = xUndo(pUndoCtx, walFramePgno(pWal, iFrame)); + memcpy(&pWal->hdr, (void *)walIndexHdr(pWal), sizeof(WalIndexHdr)); + + for(iFrame=pWal->hdr.mxFrame+1; + ALWAYS(rc==SQLITE_OK) && iFrame<=iMax; + iFrame++ + ){ + /* This call cannot fail. Unless the page for which the page number + ** is passed as the second argument is (a) in the cache and + ** (b) has an outstanding reference, then xUndo is either a no-op + ** (if (a) is false) or simply expels the page from the cache (if (b) + ** is false). + ** + ** If the upper layer is doing a rollback, it is guaranteed that there + ** are no outstanding references to any page other than page 1. And + ** page 1 is never written to the log until the transaction is + ** committed. As a result, the call to xUndo may not fail. + */ + assert( walFramePgno(pWal, iFrame)!=1 ); + rc = xUndo(pUndoCtx, walFramePgno(pWal, iFrame)); + } + if( iMax!=pWal->hdr.mxFrame ) walCleanupHash(pWal); } - if( iMax!=pWal->hdr.mxFrame ) walCleanupHash(pWal); + SEH_EXCEPT( rc = SQLITE_IOERR_IN_PAGE; ) } return rc; } @@ -66356,7 +67708,10 @@ SQLITE_PRIVATE int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData){ pWal->hdr.mxFrame = aWalData[0]; pWal->hdr.aFrameCksum[0] = aWalData[1]; pWal->hdr.aFrameCksum[1] = aWalData[2]; - walCleanupHash(pWal); + SEH_TRY { + walCleanupHash(pWal); + } + SEH_EXCEPT( rc = SQLITE_IOERR_IN_PAGE; ) } return rc; @@ -66537,7 +67892,7 @@ static int walRewriteChecksums(Wal *pWal, u32 iLast){ ** Write a set of frames to the log. The caller must hold the write-lock ** on the log file (obtained using sqlite3WalBeginWriteTransaction()). */ -SQLITE_PRIVATE int sqlite3WalFrames( +static int walFrames( Wal *pWal, /* Wal handle to write to */ int szPage, /* Database page-size in bytes */ PgHdr *pList, /* List of dirty pages to write */ @@ -66625,7 +67980,9 @@ SQLITE_PRIVATE int sqlite3WalFrames( if( rc ) return rc; } } - assert( (int)pWal->szPage==szPage ); + if( (int)pWal->szPage!=szPage ){ + return SQLITE_CORRUPT_BKPT; /* TH3 test case: cov1/corrupt155.test */ + } /* Setup information needed to write frames into the WAL */ w.pWal = pWal; @@ -66646,7 +68003,7 @@ SQLITE_PRIVATE int sqlite3WalFrames( ** checksums must be recomputed when the transaction is committed. */ if( iFirst && (p->pDirty || isCommit==0) ){ u32 iWrite = 0; - VVA_ONLY(rc =) sqlite3WalFindFrame(pWal, p->pgno, &iWrite); + VVA_ONLY(rc =) walFindFrame(pWal, p->pgno, &iWrite); assert( rc==SQLITE_OK || iWrite==0 ); if( iWrite>=iFirst ){ i64 iOff = walFrameOffset(iWrite, szPage) + WAL_FRAME_HDRSIZE; @@ -66765,6 +68122,29 @@ SQLITE_PRIVATE int sqlite3WalFrames( return rc; } +/* +** Write a set of frames to the log. The caller must hold the write-lock +** on the log file (obtained using sqlite3WalBeginWriteTransaction()). +** +** The difference between this function and walFrames() is that this +** function wraps walFrames() in an SEH_TRY{...} block. +*/ +SQLITE_PRIVATE int sqlite3WalFrames( + Wal *pWal, /* Wal handle to write to */ + int szPage, /* Database page-size in bytes */ + PgHdr *pList, /* List of dirty pages to write */ + Pgno nTruncate, /* Database size after this commit */ + int isCommit, /* True if this is a commit */ + int sync_flags /* Flags to pass to OsSync() (or 0) */ +){ + int rc; + SEH_TRY { + rc = walFrames(pWal, szPage, pList, nTruncate, isCommit, sync_flags); + } + SEH_EXCEPT( rc = walHandleException(pWal); ) + return rc; +} + /* ** This routine is called to implement sqlite3_wal_checkpoint() and ** related interfaces. @@ -66844,30 +68224,33 @@ SQLITE_PRIVATE int sqlite3WalCheckpoint( /* Read the wal-index header. */ - if( rc==SQLITE_OK ){ - walDisableBlocking(pWal); - rc = walIndexReadHdr(pWal, &isChanged); - (void)walEnableBlocking(pWal); - if( isChanged && pWal->pDbFd->pMethods->iVersion>=3 ){ - sqlite3OsUnfetch(pWal->pDbFd, 0, 0); + SEH_TRY { + if( rc==SQLITE_OK ){ + walDisableBlocking(pWal); + rc = walIndexReadHdr(pWal, &isChanged); + (void)walEnableBlocking(pWal); + if( isChanged && pWal->pDbFd->pMethods->iVersion>=3 ){ + sqlite3OsUnfetch(pWal->pDbFd, 0, 0); + } } - } - - /* Copy data from the log to the database file. */ - if( rc==SQLITE_OK ){ - if( pWal->hdr.mxFrame && walPagesize(pWal)!=nBuf ){ - rc = SQLITE_CORRUPT_BKPT; - }else{ - rc = walCheckpoint(pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf); - } + /* Copy data from the log to the database file. */ + if( rc==SQLITE_OK ){ + if( pWal->hdr.mxFrame && walPagesize(pWal)!=nBuf ){ + rc = SQLITE_CORRUPT_BKPT; + }else{ + rc = walCheckpoint(pWal, db, eMode2, xBusy2, pBusyArg, sync_flags,zBuf); + } - /* If no error occurred, set the output variables. */ - if( rc==SQLITE_OK || rc==SQLITE_BUSY ){ - if( pnLog ) *pnLog = (int)pWal->hdr.mxFrame; - if( pnCkpt ) *pnCkpt = (int)(walCkptInfo(pWal)->nBackfill); + /* If no error occurred, set the output variables. */ + if( rc==SQLITE_OK || rc==SQLITE_BUSY ){ + if( pnLog ) *pnLog = (int)pWal->hdr.mxFrame; + SEH_INJECT_FAULT; + if( pnCkpt ) *pnCkpt = (int)(walCkptInfo(pWal)->nBackfill); + } } } + SEH_EXCEPT( rc = walHandleException(pWal); ) if( isChanged ){ /* If a new wal-index header was loaded before the checkpoint was @@ -66944,7 +68327,9 @@ SQLITE_PRIVATE int sqlite3WalExclusiveMode(Wal *pWal, int op){ ** locks are taken in this case). Nor should the pager attempt to ** upgrade to exclusive-mode following such an error. */ +#ifndef SQLITE_USE_SEH assert( pWal->readLock>=0 || pWal->lockError ); +#endif assert( pWal->readLock>=0 || (op<=0 && pWal->exclusiveMode==0) ); if( op==0 ){ @@ -67045,16 +68430,19 @@ SQLITE_API int sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){ */ SQLITE_PRIVATE int sqlite3WalSnapshotCheck(Wal *pWal, sqlite3_snapshot *pSnapshot){ int rc; - rc = walLockShared(pWal, WAL_CKPT_LOCK); - if( rc==SQLITE_OK ){ - WalIndexHdr *pNew = (WalIndexHdr*)pSnapshot; - if( memcmp(pNew->aSalt, pWal->hdr.aSalt, sizeof(pWal->hdr.aSalt)) - || pNew->mxFramenBackfillAttempted - ){ - rc = SQLITE_ERROR_SNAPSHOT; - walUnlockShared(pWal, WAL_CKPT_LOCK); + SEH_TRY { + rc = walLockShared(pWal, WAL_CKPT_LOCK); + if( rc==SQLITE_OK ){ + WalIndexHdr *pNew = (WalIndexHdr*)pSnapshot; + if( memcmp(pNew->aSalt, pWal->hdr.aSalt, sizeof(pWal->hdr.aSalt)) + || pNew->mxFramenBackfillAttempted + ){ + rc = SQLITE_ERROR_SNAPSHOT; + walUnlockShared(pWal, WAL_CKPT_LOCK); + } } } + SEH_EXCEPT( rc = walHandleException(pWal); ) return rc; } @@ -67285,7 +68673,7 @@ SQLITE_PRIVATE sqlite3_file *sqlite3WalFile(Wal *pWal){ ** byte are used. The integer consists of all bytes that have bit 8 set and ** the first byte with bit 8 clear. The most significant byte of the integer ** appears first. A variable-length integer may not be more than 9 bytes long. -** As a special case, all 8 bytes of the 9th byte are used as data. This +** As a special case, all 8 bits of the 9th byte are used as data. This ** allows a 64-bit integer to be encoded in 9 bytes. ** ** 0x00 becomes 0x00000000 @@ -67293,7 +68681,7 @@ SQLITE_PRIVATE sqlite3_file *sqlite3WalFile(Wal *pWal){ ** 0x81 0x00 becomes 0x00000080 ** 0x82 0x00 becomes 0x00000100 ** 0x80 0x7f becomes 0x0000007f -** 0x8a 0x91 0xd1 0xac 0x78 becomes 0x12345678 +** 0x81 0x91 0xd1 0xac 0x78 becomes 0x12345678 ** 0x81 0x81 0x81 0x81 0x01 becomes 0x10204081 ** ** Variable length integers are used for rowids and to hold the number of @@ -67376,7 +68764,7 @@ typedef struct CellInfo CellInfo; ** page that has been loaded into memory. The information in this object ** is derived from the raw on-disk page content. ** -** As each database page is loaded into memory, the pager allocats an +** As each database page is loaded into memory, the pager allocates an ** instance of this object and zeros the first 8 bytes. (This is the ** "extra" information associated with each page of the pager.) ** @@ -67669,7 +69057,7 @@ struct BtCursor { #define BTCF_WriteFlag 0x01 /* True if a write cursor */ #define BTCF_ValidNKey 0x02 /* True if info.nKey is valid */ #define BTCF_ValidOvfl 0x04 /* True if aOverflow is valid */ -#define BTCF_AtLast 0x08 /* Cursor is pointing ot the last entry */ +#define BTCF_AtLast 0x08 /* Cursor is pointing to the last entry */ #define BTCF_Incrblob 0x10 /* True if an incremental I/O handle */ #define BTCF_Multiple 0x20 /* Maybe another cursor on the same btree */ #define BTCF_Pinned 0x40 /* Cursor is busy and cannot be moved */ @@ -67787,15 +69175,15 @@ struct BtCursor { ** So, this macro is defined instead. */ #ifndef SQLITE_OMIT_AUTOVACUUM -#define ISAUTOVACUUM (pBt->autoVacuum) +#define ISAUTOVACUUM(pBt) (pBt->autoVacuum) #else -#define ISAUTOVACUUM 0 +#define ISAUTOVACUUM(pBt) 0 #endif /* -** This structure is passed around through all the sanity checking routines -** in order to keep track of some global state information. +** This structure is passed around through all the PRAGMA integrity_check +** checking routines in order to keep track of some global state information. ** ** The aRef[] array is allocated so that there is 1 bit for each page in ** the database. As the integrity-check proceeds, for each page used in @@ -67811,10 +69199,12 @@ struct IntegrityCk { Pgno nPage; /* Number of pages in the database */ int mxErr; /* Stop accumulating errors when this reaches zero */ int nErr; /* Number of messages written to zErrMsg so far */ - int bOomFault; /* A memory allocation error has occurred */ + int rc; /* SQLITE_OK, SQLITE_NOMEM, or SQLITE_INTERRUPT */ + u32 nStep; /* Number of steps into the integrity_check process */ const char *zPfx; /* Error message prefix */ - Pgno v1; /* Value for first %u substitution in zPfx */ - int v2; /* Value for second %d substitution in zPfx */ + Pgno v0; /* Value for first %u substitution in zPfx (root page) */ + Pgno v1; /* Value for second %u substitution in zPfx (current pg) */ + int v2; /* Value for third %d substitution in zPfx */ StrAccum errMsg; /* Accumulate the error message text here */ u32 *heap; /* Min-heap used for analyzing cell coverage */ sqlite3 *db; /* Database connection running the check */ @@ -67830,7 +69220,7 @@ struct IntegrityCk { /* ** get2byteAligned(), unlike get2byte(), requires that its argument point to a -** two-byte aligned address. get2bytea() is only used for accessing the +** two-byte aligned address. get2byteAligned() is only used for accessing the ** cell addresses in a btree header. */ #if SQLITE_BYTEORDER==4321 @@ -68007,7 +69397,7 @@ SQLITE_PRIVATE int sqlite3BtreeHoldsMutex(Btree *p){ ** ** There is a corresponding leave-all procedures. ** -** Enter the mutexes in accending order by BtShared pointer address +** Enter the mutexes in ascending order by BtShared pointer address ** to avoid the possibility of deadlock when two threads with ** two or more btrees in common both try to lock all their btrees ** at the same instant. @@ -68139,6 +69529,7 @@ SQLITE_PRIVATE void sqlite3BtreeLeaveCursor(BtCursor *pCur){ /************** End of btmutex.c *********************************************/ /************** Begin file btree.c *******************************************/ + /* ** 2004 April 6 ** @@ -68277,8 +69668,8 @@ SQLITE_PRIVATE sqlite3_uint64 sqlite3BtreeSeekCount(Btree *pBt){ int corruptPageError(int lineno, MemPage *p){ char *zMsg; sqlite3BeginBenignMalloc(); - zMsg = sqlite3_mprintf("database corruption page %d of %s", - (int)p->pgno, sqlite3PagerFilename(p->pBt->pPager, 0) + zMsg = sqlite3_mprintf("database corruption page %u of %s", + p->pgno, sqlite3PagerFilename(p->pBt->pPager, 0) ); sqlite3EndBenignMalloc(); if( zMsg ){ @@ -69087,8 +70478,25 @@ SQLITE_PRIVATE int sqlite3BtreeCursorRestore(BtCursor *pCur, int *pDifferentRow) */ SQLITE_PRIVATE void sqlite3BtreeCursorHint(BtCursor *pCur, int eHintType, ...){ /* Used only by system that substitute their own storage engine */ +#ifdef SQLITE_DEBUG + if( ALWAYS(eHintType==BTREE_HINT_RANGE) ){ + va_list ap; + Expr *pExpr; + Walker w; + memset(&w, 0, sizeof(w)); + w.xExprCallback = sqlite3CursorRangeHintExprCheck; + va_start(ap, eHintType); + pExpr = va_arg(ap, Expr*); + w.u.aMem = va_arg(ap, Mem*); + va_end(ap); + assert( pExpr!=0 ); + assert( w.u.aMem!=0 ); + sqlite3WalkExpr(&w, pExpr); + } +#endif /* SQLITE_DEBUG */ } -#endif +#endif /* SQLITE_ENABLE_CURSOR_HINTS */ + /* ** Provide flag hints to the cursor. @@ -69173,7 +70581,7 @@ static void ptrmapPut(BtShared *pBt, Pgno key, u8 eType, Pgno parent, int *pRC){ pPtrmap = (u8 *)sqlite3PagerGetData(pDbPage); if( eType!=pPtrmap[offset] || get4byte(&pPtrmap[offset+1])!=parent ){ - TRACE(("PTRMAP_UPDATE: %d->(%d,%d)\n", key, eType, parent)); + TRACE(("PTRMAP_UPDATE: %u->(%u,%u)\n", key, eType, parent)); *pRC= rc = sqlite3PagerWrite(pDbPage); if( rc==SQLITE_OK ){ pPtrmap[offset] = eType; @@ -69372,27 +70780,31 @@ static void btreeParseCellPtr( iKey = *pIter; if( iKey>=0x80 ){ u8 x; - iKey = ((iKey&0x7f)<<7) | ((x = *++pIter) & 0x7f); + iKey = (iKey<<7) ^ (x = *++pIter); if( x>=0x80 ){ - iKey = (iKey<<7) | ((x =*++pIter) & 0x7f); + iKey = (iKey<<7) ^ (x = *++pIter); if( x>=0x80 ){ - iKey = (iKey<<7) | ((x = *++pIter) & 0x7f); + iKey = (iKey<<7) ^ 0x10204000 ^ (x = *++pIter); if( x>=0x80 ){ - iKey = (iKey<<7) | ((x = *++pIter) & 0x7f); + iKey = (iKey<<7) ^ 0x4000 ^ (x = *++pIter); if( x>=0x80 ){ - iKey = (iKey<<7) | ((x = *++pIter) & 0x7f); + iKey = (iKey<<7) ^ 0x4000 ^ (x = *++pIter); if( x>=0x80 ){ - iKey = (iKey<<7) | ((x = *++pIter) & 0x7f); + iKey = (iKey<<7) ^ 0x4000 ^ (x = *++pIter); if( x>=0x80 ){ - iKey = (iKey<<7) | ((x = *++pIter) & 0x7f); + iKey = (iKey<<7) ^ 0x4000 ^ (x = *++pIter); if( x>=0x80 ){ - iKey = (iKey<<8) | (*++pIter); + iKey = (iKey<<8) ^ 0x8000 ^ (*++pIter); } } } } } + }else{ + iKey ^= 0x204000; } + }else{ + iKey ^= 0x4000; } } pIter++; @@ -69469,10 +70881,11 @@ static void btreeParseCell( ** ** cellSizePtrNoPayload() => table internal nodes ** cellSizePtrTableLeaf() => table leaf nodes -** cellSizePtr() => all index nodes & table leaf nodes +** cellSizePtr() => index internal nodes +** cellSizeIdxLeaf() => index leaf nodes */ static u16 cellSizePtr(MemPage *pPage, u8 *pCell){ - u8 *pIter = pCell + pPage->childPtrSize; /* For looping over bytes of pCell */ + u8 *pIter = pCell + 4; /* For looping over bytes of pCell */ u8 *pEnd; /* End mark for a varint */ u32 nSize; /* Size value to return */ @@ -69485,6 +70898,49 @@ static u16 cellSizePtr(MemPage *pPage, u8 *pCell){ pPage->xParseCell(pPage, pCell, &debuginfo); #endif + assert( pPage->childPtrSize==4 ); + nSize = *pIter; + if( nSize>=0x80 ){ + pEnd = &pIter[8]; + nSize &= 0x7f; + do{ + nSize = (nSize<<7) | (*++pIter & 0x7f); + }while( *(pIter)>=0x80 && pItermaxLocal ); + testcase( nSize==(u32)pPage->maxLocal+1 ); + if( nSize<=pPage->maxLocal ){ + nSize += (u32)(pIter - pCell); + assert( nSize>4 ); + }else{ + int minLocal = pPage->minLocal; + nSize = minLocal + (nSize - minLocal) % (pPage->pBt->usableSize - 4); + testcase( nSize==pPage->maxLocal ); + testcase( nSize==(u32)pPage->maxLocal+1 ); + if( nSize>pPage->maxLocal ){ + nSize = minLocal; + } + nSize += 4 + (u16)(pIter - pCell); + } + assert( nSize==debuginfo.nSize || CORRUPT_DB ); + return (u16)nSize; +} +static u16 cellSizePtrIdxLeaf(MemPage *pPage, u8 *pCell){ + u8 *pIter = pCell; /* For looping over bytes of pCell */ + u8 *pEnd; /* End mark for a varint */ + u32 nSize; /* Size value to return */ + +#ifdef SQLITE_DEBUG + /* The value returned by this function should always be the same as + ** the (CellInfo.nSize) value found by doing a full parse of the + ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of + ** this function verifies that this invariant is not violated. */ + CellInfo debuginfo; + pPage->xParseCell(pPage, pCell, &debuginfo); +#endif + + assert( pPage->childPtrSize==0 ); nSize = *pIter; if( nSize>=0x80 ){ pEnd = &pIter[8]; @@ -69609,7 +71065,7 @@ static void ptrmapPutOvflPtr(MemPage *pPage, MemPage *pSrc, u8 *pCell,int *pRC){ pPage->xParseCell(pPage, pCell, &info); if( info.nLocalaDataEnd, pCell, pCell+info.nLocal) ){ + if( SQLITE_OVERFLOW(pSrc->aDataEnd, pCell, pCell+info.nLocal) ){ testcase( pSrc!=pPage ); *pRC = SQLITE_CORRUPT_BKPT; return; @@ -69710,7 +71166,7 @@ static int defragmentPage(MemPage *pPage, int nMaxFrag){ iCellStart = get2byte(&data[hdr+5]); if( nCell>0 ){ temp = sqlite3PagerTempSpace(pPage->pBt->pPager); - memcpy(&temp[iCellStart], &data[iCellStart], usableSize - iCellStart); + memcpy(temp, data, usableSize); src = temp; for(i=0; iiCellLast ){ + if( pc>iCellLast ){ return SQLITE_CORRUPT_PAGE(pPage); } - assert( pc>=iCellStart && pc<=iCellLast ); + assert( pc>=0 && pc<=iCellLast ); size = pPage->xCellSize(pPage, &src[pc]); cbrk -= size; if( cbrkusableSize ){ @@ -69839,7 +71295,7 @@ static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc){ ** allocation is being made in order to insert a new cell, so we will ** also end up needing a new cell pointer. */ -static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){ +static SQLITE_INLINE int allocateSpace(MemPage *pPage, int nByte, int *pIdx){ const int hdr = pPage->hdrOffset; /* Local cache of pPage->hdrOffset */ u8 * const data = pPage->aData; /* Local cache of pPage->aData */ int top; /* First byte of cell content area */ @@ -69865,13 +71321,14 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){ ** integer, so a value of 0 is used in its place. */ pTmp = &data[hdr+5]; top = get2byte(pTmp); - assert( top<=(int)pPage->pBt->usableSize ); /* by btreeComputeFreeSpace() */ if( gap>top ){ if( top==0 && pPage->pBt->usableSize==65536 ){ top = 65536; }else{ return SQLITE_CORRUPT_PAGE(pPage); } + }else if( top>(int)pPage->pBt->usableSize ){ + return SQLITE_CORRUPT_PAGE(pPage); } /* If there is enough space between gap and top for one more cell pointer, @@ -69933,7 +71390,7 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){ ** ** Even though the freeblock list was checked by btreeComputeFreeSpace(), ** that routine will not detect overlap between cells or freeblocks. Nor -** does it detect cells or freeblocks that encrouch into the reserved bytes +** does it detect cells or freeblocks that encroach into the reserved bytes ** at the end of the page. So do additional corruption checks inside this ** routine and return SQLITE_CORRUPT if any problems are found. */ @@ -69954,7 +71411,7 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){ assert( CORRUPT_DB || iEnd <= pPage->pBt->usableSize ); assert( sqlite3_mutex_held(pPage->pBt->mutex) ); assert( iSize>=4 ); /* Minimum cell size is 4 */ - assert( iStart<=pPage->pBt->usableSize-4 ); + assert( CORRUPT_DB || iStart<=pPage->pBt->usableSize-4 ); /* The list of freeblocks must be in ascending order. Find the ** spot on the list where iStart should be inserted. @@ -70011,6 +71468,11 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){ } pTmp = &data[hdr+5]; x = get2byte(pTmp); + if( pPage->pBt->btsFlags & BTS_FAST_SECURE ){ + /* Overwrite deleted information with zeros when the secure_delete + ** option is enabled */ + memset(&data[iStart], 0, iSize); + } if( iStart<=x ){ /* The new freeblock is at the beginning of the cell content area, ** so just extend the cell content area rather than create another @@ -70022,14 +71484,9 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){ }else{ /* Insert the new freeblock into the freelist */ put2byte(&data[iPtr], iStart); + put2byte(&data[iStart], iFreeBlk); + put2byte(&data[iStart+2], iSize); } - if( pPage->pBt->btsFlags & BTS_FAST_SECURE ){ - /* Overwrite deleted information with zeros when the secure_delete - ** option is enabled */ - memset(&data[iStart], 0, iSize); - } - put2byte(&data[iStart], iFreeBlk); - put2byte(&data[iStart+2], iSize); pPage->nFree += iOrigSize; return SQLITE_OK; } @@ -70041,62 +71498,67 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){ ** Only the following combinations are supported. Anything different ** indicates a corrupt database files: ** -** PTF_ZERODATA -** PTF_ZERODATA | PTF_LEAF -** PTF_LEAFDATA | PTF_INTKEY -** PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF +** PTF_ZERODATA (0x02, 2) +** PTF_LEAFDATA | PTF_INTKEY (0x05, 5) +** PTF_ZERODATA | PTF_LEAF (0x0a, 10) +** PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF (0x0d, 13) */ static int decodeFlags(MemPage *pPage, int flagByte){ BtShared *pBt; /* A copy of pPage->pBt */ assert( pPage->hdrOffset==(pPage->pgno==1 ? 100 : 0) ); assert( sqlite3_mutex_held(pPage->pBt->mutex) ); - pPage->leaf = (u8)(flagByte>>3); assert( PTF_LEAF == 1<<3 ); - flagByte &= ~PTF_LEAF; - pPage->childPtrSize = 4-4*pPage->leaf; pBt = pPage->pBt; - if( flagByte==(PTF_LEAFDATA | PTF_INTKEY) ){ - /* EVIDENCE-OF: R-07291-35328 A value of 5 (0x05) means the page is an - ** interior table b-tree page. */ - assert( (PTF_LEAFDATA|PTF_INTKEY)==5 ); - /* EVIDENCE-OF: R-26900-09176 A value of 13 (0x0d) means the page is a - ** leaf table b-tree page. */ - assert( (PTF_LEAFDATA|PTF_INTKEY|PTF_LEAF)==13 ); - pPage->intKey = 1; - if( pPage->leaf ){ + pPage->max1bytePayload = pBt->max1bytePayload; + if( flagByte>=(PTF_ZERODATA | PTF_LEAF) ){ + pPage->childPtrSize = 0; + pPage->leaf = 1; + if( flagByte==(PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF) ){ pPage->intKeyLeaf = 1; pPage->xCellSize = cellSizePtrTableLeaf; pPage->xParseCell = btreeParseCellPtr; + pPage->intKey = 1; + pPage->maxLocal = pBt->maxLeaf; + pPage->minLocal = pBt->minLeaf; + }else if( flagByte==(PTF_ZERODATA | PTF_LEAF) ){ + pPage->intKey = 0; + pPage->intKeyLeaf = 0; + pPage->xCellSize = cellSizePtrIdxLeaf; + pPage->xParseCell = btreeParseCellPtrIndex; + pPage->maxLocal = pBt->maxLocal; + pPage->minLocal = pBt->minLocal; }else{ + pPage->intKey = 0; + pPage->intKeyLeaf = 0; + pPage->xCellSize = cellSizePtrIdxLeaf; + pPage->xParseCell = btreeParseCellPtrIndex; + return SQLITE_CORRUPT_PAGE(pPage); + } + }else{ + pPage->childPtrSize = 4; + pPage->leaf = 0; + if( flagByte==(PTF_ZERODATA) ){ + pPage->intKey = 0; + pPage->intKeyLeaf = 0; + pPage->xCellSize = cellSizePtr; + pPage->xParseCell = btreeParseCellPtrIndex; + pPage->maxLocal = pBt->maxLocal; + pPage->minLocal = pBt->minLocal; + }else if( flagByte==(PTF_LEAFDATA | PTF_INTKEY) ){ pPage->intKeyLeaf = 0; pPage->xCellSize = cellSizePtrNoPayload; pPage->xParseCell = btreeParseCellPtrNoPayload; + pPage->intKey = 1; + pPage->maxLocal = pBt->maxLeaf; + pPage->minLocal = pBt->minLeaf; + }else{ + pPage->intKey = 0; + pPage->intKeyLeaf = 0; + pPage->xCellSize = cellSizePtr; + pPage->xParseCell = btreeParseCellPtrIndex; + return SQLITE_CORRUPT_PAGE(pPage); } - pPage->maxLocal = pBt->maxLeaf; - pPage->minLocal = pBt->minLeaf; - }else if( flagByte==PTF_ZERODATA ){ - /* EVIDENCE-OF: R-43316-37308 A value of 2 (0x02) means the page is an - ** interior index b-tree page. */ - assert( (PTF_ZERODATA)==2 ); - /* EVIDENCE-OF: R-59615-42828 A value of 10 (0x0a) means the page is a - ** leaf index b-tree page. */ - assert( (PTF_ZERODATA|PTF_LEAF)==10 ); - pPage->intKey = 0; - pPage->intKeyLeaf = 0; - pPage->xCellSize = cellSizePtr; - pPage->xParseCell = btreeParseCellPtrIndex; - pPage->maxLocal = pBt->maxLocal; - pPage->minLocal = pBt->minLocal; - }else{ - /* EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is - ** an error. */ - pPage->intKey = 0; - pPage->intKeyLeaf = 0; - pPage->xCellSize = cellSizePtr; - pPage->xParseCell = btreeParseCellPtrIndex; - return SQLITE_CORRUPT_PAGE(pPage); } - pPage->max1bytePayload = pBt->max1bytePayload; return SQLITE_OK; } @@ -70387,68 +71849,41 @@ SQLITE_PRIVATE Pgno sqlite3BtreeLastPage(Btree *p){ /* ** Get a page from the pager and initialize it. -** -** If pCur!=0 then the page is being fetched as part of a moveToChild() -** call. Do additional sanity checking on the page in this case. -** And if the fetch fails, this routine must decrement pCur->iPage. -** -** The page is fetched as read-write unless pCur is not NULL and is -** a read-only cursor. -** -** If an error occurs, then *ppPage is undefined. It -** may remain unchanged, or it may be set to an invalid value. */ static int getAndInitPage( BtShared *pBt, /* The database file */ Pgno pgno, /* Number of the page to get */ MemPage **ppPage, /* Write the page pointer here */ - BtCursor *pCur, /* Cursor to receive the page, or NULL */ int bReadOnly /* True for a read-only page */ ){ int rc; DbPage *pDbPage; + MemPage *pPage; assert( sqlite3_mutex_held(pBt->mutex) ); - assert( pCur==0 || ppPage==&pCur->pPage ); - assert( pCur==0 || bReadOnly==pCur->curPagerFlags ); - assert( pCur==0 || pCur->iPage>0 ); if( pgno>btreePagecount(pBt) ){ - rc = SQLITE_CORRUPT_BKPT; - goto getAndInitPage_error1; + *ppPage = 0; + return SQLITE_CORRUPT_BKPT; } rc = sqlite3PagerGet(pBt->pPager, pgno, (DbPage**)&pDbPage, bReadOnly); if( rc ){ - goto getAndInitPage_error1; + *ppPage = 0; + return rc; } - *ppPage = (MemPage*)sqlite3PagerGetExtra(pDbPage); - if( (*ppPage)->isInit==0 ){ + pPage = (MemPage*)sqlite3PagerGetExtra(pDbPage); + if( pPage->isInit==0 ){ btreePageFromDbPage(pDbPage, pgno, pBt); - rc = btreeInitPage(*ppPage); + rc = btreeInitPage(pPage); if( rc!=SQLITE_OK ){ - goto getAndInitPage_error2; + releasePage(pPage); + *ppPage = 0; + return rc; } } - assert( (*ppPage)->pgno==pgno || CORRUPT_DB ); - assert( (*ppPage)->aData==sqlite3PagerGetData(pDbPage) ); - - /* If obtaining a child page for a cursor, we must verify that the page is - ** compatible with the root page. */ - if( pCur && ((*ppPage)->nCell<1 || (*ppPage)->intKey!=pCur->curIntKey) ){ - rc = SQLITE_CORRUPT_PGNO(pgno); - goto getAndInitPage_error2; - } + assert( pPage->pgno==pgno || CORRUPT_DB ); + assert( pPage->aData==sqlite3PagerGetData(pDbPage) ); + *ppPage = pPage; return SQLITE_OK; - -getAndInitPage_error2: - releasePage(*ppPage); -getAndInitPage_error1: - if( pCur ){ - pCur->iPage--; - pCur->pPage = pCur->apPage[pCur->iPage]; - } - testcase( pgno==0 ); - assert( pgno!=0 || rc!=SQLITE_OK ); - return rc; } /* @@ -70531,7 +71966,7 @@ static void pageReinit(DbPage *pData){ ** call to btreeInitPage() will likely return SQLITE_CORRUPT. ** But no harm is done by this. And it is very important that ** btreeInitPage() be called on every btree page so we make - ** the call for every page that comes in for re-initing. */ + ** the call for every page that comes in for re-initializing. */ btreeInitPage(pPage); } } @@ -70710,6 +72145,9 @@ SQLITE_PRIVATE int sqlite3BtreeOpen( assert( sizeof(u16)==2 ); assert( sizeof(Pgno)==4 ); + /* Suppress false-positive compiler warning from PVS-Studio */ + memset(&zDbHeader[16], 0, 8); + pBt = sqlite3MallocZero( sizeof(*pBt) ); if( pBt==0 ){ rc = SQLITE_NOMEM_BKPT; @@ -70926,7 +72364,7 @@ static SQLITE_NOINLINE int allocateTempSpace(BtShared *pBt){ ** can mean that fillInCell() only initializes the first 2 or 3 ** bytes of pTmpSpace, but that the first 4 bytes are copied from ** it into a database page. This is not actually a problem, but it - ** does cause a valgrind error when the 1 or 2 bytes of unitialized + ** does cause a valgrind error when the 1 or 2 bytes of uninitialized ** data is passed to system call write(). So to avoid this error, ** zero the first 4 bytes of temp space here. ** @@ -71161,7 +72599,7 @@ SQLITE_PRIVATE int sqlite3BtreeGetReserveNoMutex(Btree *p){ /* ** Return the number of bytes of space at the end of every page that -** are intentually left unused. This is the "reserved" space that is +** are intentionally left unused. This is the "reserved" space that is ** sometimes used by extensions. ** ** The value returned is the larger of the current reserve size and @@ -71408,7 +72846,6 @@ static int lockBtree(BtShared *pBt){ ){ goto page1_init_failed; } - pBt->btsFlags |= BTS_PAGESIZE_FIXED; assert( (pageSize & 7)==0 ); /* EVIDENCE-OF: R-59310-51205 The "reserved space" size in the 1-byte ** integer at offset 20 is the number of bytes of space at the end of @@ -71428,6 +72865,7 @@ static int lockBtree(BtShared *pBt){ releasePageOne(pPage1); pBt->usableSize = usableSize; pBt->pageSize = pageSize; + pBt->btsFlags |= BTS_PAGESIZE_FIXED; freeTempSpace(pBt); rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize, pageSize-usableSize); @@ -71447,6 +72885,7 @@ static int lockBtree(BtShared *pBt){ if( usableSize<480 ){ goto page1_init_failed; } + pBt->btsFlags |= BTS_PAGESIZE_FIXED; pBt->pageSize = pageSize; pBt->usableSize = usableSize; #ifndef SQLITE_OMIT_AUTOVACUUM @@ -71625,7 +73064,11 @@ SQLITE_PRIVATE int sqlite3BtreeNewDb(Btree *p){ ** when A already has a read lock, we encourage A to give up and let B ** proceed. */ -SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree *p, int wrflag, int *pSchemaVersion){ +static SQLITE_NOINLINE int btreeBeginTrans( + Btree *p, /* The btree in which to start the transaction */ + int wrflag, /* True to start a write transaction */ + int *pSchemaVersion /* Put schema version number here, if not NULL */ +){ BtShared *pBt = p->pBt; Pager *pPager = pBt->pPager; int rc = SQLITE_OK; @@ -71797,6 +73240,28 @@ SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree *p, int wrflag, int *pSchemaVers sqlite3BtreeLeave(p); return rc; } +SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree *p, int wrflag, int *pSchemaVersion){ + BtShared *pBt; + if( p->sharable + || p->inTrans==TRANS_NONE + || (p->inTrans==TRANS_READ && wrflag!=0) + ){ + return btreeBeginTrans(p,wrflag,pSchemaVersion); + } + pBt = p->pBt; + if( pSchemaVersion ){ + *pSchemaVersion = get4byte(&pBt->pPage1->aData[40]); + } + if( wrflag ){ + /* This call makes sure that the pager has the correct number of + ** open savepoints. If the second parameter is greater than 0 and + ** the sub-journal is not already open, then it will be opened here. + */ + return sqlite3PagerOpenSavepoint(pBt->pPager, p->db->nSavepoint); + }else{ + return SQLITE_OK; + } +} #ifndef SQLITE_OMIT_AUTOVACUUM @@ -71934,7 +73399,7 @@ static int relocatePage( if( iDbPage<3 ) return SQLITE_CORRUPT_BKPT; /* Move page iDbPage from its current location to page number iFreePage */ - TRACE(("AUTOVACUUM: Moving %d to free page %d (ptr page %d type %d)\n", + TRACE(("AUTOVACUUM: Moving %u to free page %u (ptr page %u type %u)\n", iDbPage, iFreePage, iPtrPage, eType)); rc = sqlite3PagerMovepage(pPager, pDbPage->pDbPage, iFreePage, isCommit); if( rc!=SQLITE_OK ){ @@ -72892,7 +74357,6 @@ SQLITE_PRIVATE void sqlite3BtreeCursorUnpin(BtCursor *pCur){ pCur->curFlags &= ~BTCF_Pinned; } -#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC /* ** Return the offset into the database file for the start of the ** payload to which the cursor is pointing. @@ -72904,7 +74368,6 @@ SQLITE_PRIVATE i64 sqlite3BtreeOffset(BtCursor *pCur){ return (i64)pCur->pBt->pageSize*((i64)pCur->pPage->pgno - 1) + (i64)(pCur->info.pPayload - pCur->pPage->aData); } -#endif /* SQLITE_ENABLE_OFFSET_SQL_FUNC */ /* ** Return the number of bytes of payload for the entry that pCur is @@ -72930,7 +74393,7 @@ SQLITE_PRIVATE u32 sqlite3BtreePayloadSize(BtCursor *pCur){ ** routine always returns 2147483647 (which is the largest record ** that SQLite can handle) or more. But returning a smaller value might ** prevent large memory allocations when trying to interpret a -** corrupt datrabase. +** corrupt database. ** ** The current implementation merely returns the size of the underlying ** database file. @@ -73392,6 +74855,7 @@ SQLITE_PRIVATE const void *sqlite3BtreePayloadFetch(BtCursor *pCur, u32 *pAmt){ ** vice-versa). */ static int moveToChild(BtCursor *pCur, u32 newPgno){ + int rc; assert( cursorOwnsBtShared(pCur) ); assert( pCur->eState==CURSOR_VALID ); assert( pCur->iPageapPage[pCur->iPage] = pCur->pPage; pCur->ix = 0; pCur->iPage++; - return getAndInitPage(pCur->pBt, newPgno, &pCur->pPage, pCur, - pCur->curPagerFlags); + rc = getAndInitPage(pCur->pBt, newPgno, &pCur->pPage, pCur->curPagerFlags); + assert( pCur->pPage!=0 || rc!=SQLITE_OK ); + if( rc==SQLITE_OK + && (pCur->pPage->nCell<1 || pCur->pPage->intKey!=pCur->curIntKey) + ){ + releasePage(pCur->pPage); + rc = SQLITE_CORRUPT_PGNO(newPgno); + } + if( rc ){ + pCur->pPage = pCur->apPage[--pCur->iPage]; + } + return rc; } #ifdef SQLITE_DEBUG @@ -73513,7 +74987,7 @@ static int moveToRoot(BtCursor *pCur){ sqlite3BtreeClearCursor(pCur); } rc = getAndInitPage(pCur->pBt, pCur->pgnoRoot, &pCur->pPage, - 0, pCur->curPagerFlags); + pCur->curPagerFlags); if( rc!=SQLITE_OK ){ pCur->eState = CURSOR_INVALID; return rc; @@ -73625,7 +75099,7 @@ SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor *pCur, int *pRes){ *pRes = 0; rc = moveToLeftmost(pCur); }else if( rc==SQLITE_EMPTY ){ - assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 ); + assert( pCur->pgnoRoot==0 || (pCur->pPage!=0 && pCur->pPage->nCell==0) ); *pRes = 1; rc = SQLITE_OK; } @@ -73636,9 +75110,25 @@ SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor *pCur, int *pRes){ ** on success. Set *pRes to 0 if the cursor actually points to something ** or set *pRes to 1 if the table is empty. */ +static SQLITE_NOINLINE int btreeLast(BtCursor *pCur, int *pRes){ + int rc = moveToRoot(pCur); + if( rc==SQLITE_OK ){ + assert( pCur->eState==CURSOR_VALID ); + *pRes = 0; + rc = moveToRightmost(pCur); + if( rc==SQLITE_OK ){ + pCur->curFlags |= BTCF_AtLast; + }else{ + pCur->curFlags &= ~BTCF_AtLast; + } + }else if( rc==SQLITE_EMPTY ){ + assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 ); + *pRes = 1; + rc = SQLITE_OK; + } + return rc; +} SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor *pCur, int *pRes){ - int rc; - assert( cursorOwnsBtShared(pCur) ); assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) ); @@ -73659,23 +75149,7 @@ SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor *pCur, int *pRes){ *pRes = 0; return SQLITE_OK; } - - rc = moveToRoot(pCur); - if( rc==SQLITE_OK ){ - assert( pCur->eState==CURSOR_VALID ); - *pRes = 0; - rc = moveToRightmost(pCur); - if( rc==SQLITE_OK ){ - pCur->curFlags |= BTCF_AtLast; - }else{ - pCur->curFlags &= ~BTCF_AtLast; - } - }else if( rc==SQLITE_EMPTY ){ - assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 ); - *pRes = 1; - rc = SQLITE_OK; - } - return rc; + return btreeLast(pCur, pRes); } /* Move the cursor so that it points to an entry in a table (a.k.a INTKEY) @@ -73730,7 +75204,7 @@ SQLITE_PRIVATE int sqlite3BtreeTableMoveto( /* If the requested key is one more than the previous key, then ** try to get there using sqlite3BtreeNext() rather than a full ** binary search. This is an optimization only. The correct answer - ** is still obtained without this case, only a little more slowely */ + ** is still obtained without this case, only a little more slowly. */ if( pCur->info.nKey+1==intKey ){ *pRes = 0; rc = sqlite3BtreeNext(pCur, 0); @@ -74126,10 +75600,36 @@ SQLITE_PRIVATE int sqlite3BtreeIndexMoveto( }else{ chldPg = get4byte(findCell(pPage, lwr)); } - pCur->ix = (u16)lwr; - rc = moveToChild(pCur, chldPg); - if( rc ) break; - } + + /* This block is similar to an in-lined version of: + ** + ** pCur->ix = (u16)lwr; + ** rc = moveToChild(pCur, chldPg); + ** if( rc ) break; + */ + pCur->info.nSize = 0; + pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl); + if( pCur->iPage>=(BTCURSOR_MAX_DEPTH-1) ){ + return SQLITE_CORRUPT_BKPT; + } + pCur->aiIdx[pCur->iPage] = (u16)lwr; + pCur->apPage[pCur->iPage] = pCur->pPage; + pCur->ix = 0; + pCur->iPage++; + rc = getAndInitPage(pCur->pBt, chldPg, &pCur->pPage, pCur->curPagerFlags); + if( rc==SQLITE_OK + && (pCur->pPage->nCell<1 || pCur->pPage->intKey!=pCur->curIntKey) + ){ + releasePage(pCur->pPage); + rc = SQLITE_CORRUPT_PGNO(chldPg); + } + if( rc ){ + pCur->pPage = pCur->apPage[--pCur->iPage]; + break; + } + /* + ***** End of in-lined moveToChild() call */ + } moveto_index_finish: pCur->info.nSize = 0; assert( (pCur->curFlags & BTCF_ValidOvfl)==0 ); @@ -74220,7 +75720,8 @@ static SQLITE_NOINLINE int btreeNext(BtCursor *pCur){ pPage = pCur->pPage; idx = ++pCur->ix; - if( NEVER(!pPage->isInit) || sqlite3FaultSim(412) ){ + if( sqlite3FaultSim(412) ) pPage->isInit = 0; + if( !pPage->isInit ){ return SQLITE_CORRUPT_BKPT; } @@ -74483,7 +75984,7 @@ static int allocateBtreePage( memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4); *ppPage = pTrunk; pTrunk = 0; - TRACE(("ALLOCATE: %d trunk - %d free pages left\n", *pPgno, n-1)); + TRACE(("ALLOCATE: %u trunk - %u free pages left\n", *pPgno, n-1)); }else if( k>(u32)(pBt->usableSize/4 - 2) ){ /* Value of k is out of range. Database corruption */ rc = SQLITE_CORRUPT_PGNO(iTrunk); @@ -74549,7 +76050,7 @@ static int allocateBtreePage( } } pTrunk = 0; - TRACE(("ALLOCATE: %d trunk - %d free pages left\n", *pPgno, n-1)); + TRACE(("ALLOCATE: %u trunk - %u free pages left\n", *pPgno, n-1)); #endif }else if( k>0 ){ /* Extract a leaf from the trunk */ @@ -74594,8 +76095,8 @@ static int allocateBtreePage( ){ int noContent; *pPgno = iPage; - TRACE(("ALLOCATE: %d was leaf %d of %d on trunk %d" - ": %d more free pages\n", + TRACE(("ALLOCATE: %u was leaf %u of %u on trunk %u" + ": %u more free pages\n", *pPgno, closest+1, k, pTrunk->pgno, n-1)); rc = sqlite3PagerWrite(pTrunk->pDbPage); if( rc ) goto end_allocate_page; @@ -74651,7 +76152,7 @@ static int allocateBtreePage( ** becomes a new pointer-map page, the second is used by the caller. */ MemPage *pPg = 0; - TRACE(("ALLOCATE: %d from end of file (pointer-map page)\n", pBt->nPage)); + TRACE(("ALLOCATE: %u from end of file (pointer-map page)\n", pBt->nPage)); assert( pBt->nPage!=PENDING_BYTE_PAGE(pBt) ); rc = btreeGetUnusedPage(pBt, pBt->nPage, &pPg, bNoContent); if( rc==SQLITE_OK ){ @@ -74674,7 +76175,7 @@ static int allocateBtreePage( releasePage(*ppPage); *ppPage = 0; } - TRACE(("ALLOCATE: %d from end of file\n", *pPgno)); + TRACE(("ALLOCATE: %u from end of file\n", *pPgno)); } assert( CORRUPT_DB || *pPgno!=PENDING_BYTE_PAGE(pBt) ); @@ -74742,7 +76243,7 @@ static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){ /* If the database supports auto-vacuum, write an entry in the pointer-map ** to indicate that the page is free. */ - if( ISAUTOVACUUM ){ + if( ISAUTOVACUUM(pBt) ){ ptrmapPut(pBt, iPage, PTRMAP_FREEPAGE, 0, &rc); if( rc ) goto freepage_out; } @@ -74802,7 +76303,7 @@ static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){ } rc = btreeSetHasContent(pBt, iPage); } - TRACE(("FREE-PAGE: %d leaf on trunk page %d\n",pPage->pgno,pTrunk->pgno)); + TRACE(("FREE-PAGE: %u leaf on trunk page %u\n",pPage->pgno,pTrunk->pgno)); goto freepage_out; } } @@ -74823,7 +76324,7 @@ static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){ put4byte(pPage->aData, iTrunk); put4byte(&pPage->aData[4], 0); put4byte(&pPage1->aData[32], iPage); - TRACE(("FREE-PAGE: %d new trunk page replacing %d\n", pPage->pgno, iTrunk)); + TRACE(("FREE-PAGE: %u new trunk page replacing %u\n", pPage->pgno, iTrunk)); freepage_out: if( pPage ){ @@ -74912,7 +76413,7 @@ static SQLITE_NOINLINE int clearCellOverflow( /* Call xParseCell to compute the size of a cell. If the cell contains ** overflow, then invoke cellClearOverflow to clear out that overflow. -** STore the result code (SQLITE_OK or some error code) in rc. +** Store the result code (SQLITE_OK or some error code) in rc. ** ** Implemented as macro to force inlining for performance. */ @@ -75183,23 +76684,27 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){ ** Allocating a new entry in pPage->aCell[] implies that ** pPage->nOverflow is incremented. ** -** *pRC must be SQLITE_OK when this routine is called. +** The insertCellFast() routine below works exactly the same as +** insertCell() except that it lacks the pTemp and iChild parameters +** which are assumed zero. Other than that, the two routines are the +** same. +** +** Fixes or enhancements to this routine should be reflected in +** insertCellFast()! */ -static void insertCell( +static int insertCell( MemPage *pPage, /* Page into which we are copying */ int i, /* New cell becomes the i-th cell of the page */ u8 *pCell, /* Content of the new cell */ int sz, /* Bytes of content in pCell */ u8 *pTemp, /* Temp storage space for pCell, if needed */ - Pgno iChild, /* If non-zero, replace first 4 bytes with this value */ - int *pRC /* Read and write return code from here */ + Pgno iChild /* If non-zero, replace first 4 bytes with this value */ ){ int idx = 0; /* Where to write new cell content in data[] */ int j; /* Loop counter */ u8 *data; /* The content of the whole page */ u8 *pIns; /* The point in pPage->aCellIdx[] where no cell inserted */ - assert( *pRC==SQLITE_OK ); assert( i>=0 && i<=pPage->nCell+pPage->nOverflow ); assert( MX_CELL(pPage->pBt)<=10921 ); assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB ); @@ -75208,14 +76713,103 @@ static void insertCell( assert( sqlite3_mutex_held(pPage->pBt->mutex) ); assert( sz==pPage->xCellSize(pPage, pCell) || CORRUPT_DB ); assert( pPage->nFree>=0 ); + assert( iChild>0 ); if( pPage->nOverflow || sz+2>pPage->nFree ){ if( pTemp ){ memcpy(pTemp, pCell, sz); pCell = pTemp; } - if( iChild ){ - put4byte(pCell, iChild); + put4byte(pCell, iChild); + j = pPage->nOverflow++; + /* Comparison against ArraySize-1 since we hold back one extra slot + ** as a contingency. In other words, never need more than 3 overflow + ** slots but 4 are allocated, just to be safe. */ + assert( j < ArraySize(pPage->apOvfl)-1 ); + pPage->apOvfl[j] = pCell; + pPage->aiOvfl[j] = (u16)i; + + /* When multiple overflows occur, they are always sequential and in + ** sorted order. This invariants arise because multiple overflows can + ** only occur when inserting divider cells into the parent page during + ** balancing, and the dividers are adjacent and sorted. + */ + assert( j==0 || pPage->aiOvfl[j-1]<(u16)i ); /* Overflows in sorted order */ + assert( j==0 || i==pPage->aiOvfl[j-1]+1 ); /* Overflows are sequential */ + }else{ + int rc = sqlite3PagerWrite(pPage->pDbPage); + if( NEVER(rc!=SQLITE_OK) ){ + return rc; + } + assert( sqlite3PagerIswriteable(pPage->pDbPage) ); + data = pPage->aData; + assert( &data[pPage->cellOffset]==pPage->aCellIdx ); + rc = allocateSpace(pPage, sz, &idx); + if( rc ){ return rc; } + /* The allocateSpace() routine guarantees the following properties + ** if it returns successfully */ + assert( idx >= 0 ); + assert( idx >= pPage->cellOffset+2*pPage->nCell+2 || CORRUPT_DB ); + assert( idx+sz <= (int)pPage->pBt->usableSize ); + pPage->nFree -= (u16)(2 + sz); + /* In a corrupt database where an entry in the cell index section of + ** a btree page has a value of 3 or less, the pCell value might point + ** as many as 4 bytes in front of the start of the aData buffer for + ** the source page. Make sure this does not cause problems by not + ** reading the first 4 bytes */ + memcpy(&data[idx+4], pCell+4, sz-4); + put4byte(&data[idx], iChild); + pIns = pPage->aCellIdx + i*2; + memmove(pIns+2, pIns, 2*(pPage->nCell - i)); + put2byte(pIns, idx); + pPage->nCell++; + /* increment the cell count */ + if( (++data[pPage->hdrOffset+4])==0 ) data[pPage->hdrOffset+3]++; + assert( get2byte(&data[pPage->hdrOffset+3])==pPage->nCell || CORRUPT_DB ); +#ifndef SQLITE_OMIT_AUTOVACUUM + if( pPage->pBt->autoVacuum ){ + int rc2 = SQLITE_OK; + /* The cell may contain a pointer to an overflow page. If so, write + ** the entry for the overflow page into the pointer map. + */ + ptrmapPutOvflPtr(pPage, pPage, pCell, &rc2); + if( rc2 ) return rc2; } +#endif + } + return SQLITE_OK; +} + +/* +** This variant of insertCell() assumes that the pTemp and iChild +** parameters are both zero. Use this variant in sqlite3BtreeInsert() +** for performance improvement, and also so that this variant is only +** called from that one place, and is thus inlined, and thus runs must +** faster. +** +** Fixes or enhancements to this routine should be reflected into +** the insertCell() routine. +*/ +static int insertCellFast( + MemPage *pPage, /* Page into which we are copying */ + int i, /* New cell becomes the i-th cell of the page */ + u8 *pCell, /* Content of the new cell */ + int sz /* Bytes of content in pCell */ +){ + int idx = 0; /* Where to write new cell content in data[] */ + int j; /* Loop counter */ + u8 *data; /* The content of the whole page */ + u8 *pIns; /* The point in pPage->aCellIdx[] where no cell inserted */ + + assert( i>=0 && i<=pPage->nCell+pPage->nOverflow ); + assert( MX_CELL(pPage->pBt)<=10921 ); + assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB ); + assert( pPage->nOverflow<=ArraySize(pPage->apOvfl) ); + assert( ArraySize(pPage->apOvfl)==ArraySize(pPage->aiOvfl) ); + assert( sqlite3_mutex_held(pPage->pBt->mutex) ); + assert( sz==pPage->xCellSize(pPage, pCell) || CORRUPT_DB ); + assert( pPage->nFree>=0 ); + assert( pPage->nOverflow==0 ); + if( sz+2>pPage->nFree ){ j = pPage->nOverflow++; /* Comparison against ArraySize-1 since we hold back one extra slot ** as a contingency. In other words, never need more than 3 overflow @@ -75234,31 +76828,20 @@ static void insertCell( }else{ int rc = sqlite3PagerWrite(pPage->pDbPage); if( rc!=SQLITE_OK ){ - *pRC = rc; - return; + return rc; } assert( sqlite3PagerIswriteable(pPage->pDbPage) ); data = pPage->aData; assert( &data[pPage->cellOffset]==pPage->aCellIdx ); rc = allocateSpace(pPage, sz, &idx); - if( rc ){ *pRC = rc; return; } + if( rc ){ return rc; } /* The allocateSpace() routine guarantees the following properties ** if it returns successfully */ assert( idx >= 0 ); assert( idx >= pPage->cellOffset+2*pPage->nCell+2 || CORRUPT_DB ); assert( idx+sz <= (int)pPage->pBt->usableSize ); pPage->nFree -= (u16)(2 + sz); - if( iChild ){ - /* In a corrupt database where an entry in the cell index section of - ** a btree page has a value of 3 or less, the pCell value might point - ** as many as 4 bytes in front of the start of the aData buffer for - ** the source page. Make sure this does not cause problems by not - ** reading the first 4 bytes */ - memcpy(&data[idx+4], pCell+4, sz-4); - put4byte(&data[idx], iChild); - }else{ - memcpy(&data[idx], pCell, sz); - } + memcpy(&data[idx], pCell, sz); pIns = pPage->aCellIdx + i*2; memmove(pIns+2, pIns, 2*(pPage->nCell - i)); put2byte(pIns, idx); @@ -75268,13 +76851,16 @@ static void insertCell( assert( get2byte(&data[pPage->hdrOffset+3])==pPage->nCell || CORRUPT_DB ); #ifndef SQLITE_OMIT_AUTOVACUUM if( pPage->pBt->autoVacuum ){ + int rc2 = SQLITE_OK; /* The cell may contain a pointer to an overflow page. If so, write ** the entry for the overflow page into the pointer map. */ - ptrmapPutOvflPtr(pPage, pPage, pCell, pRC); + ptrmapPutOvflPtr(pPage, pPage, pCell, &rc2); + if( rc2 ) return rc2; } #endif } + return SQLITE_OK; } /* @@ -75375,14 +76961,16 @@ struct CellArray { ** computed. */ static void populateCellCache(CellArray *p, int idx, int N){ + MemPage *pRef = p->pRef; + u16 *szCell = p->szCell; assert( idx>=0 && idx+N<=p->nCell ); while( N>0 ){ assert( p->apCell[idx]!=0 ); - if( p->szCell[idx]==0 ){ - p->szCell[idx] = p->pRef->xCellSize(p->pRef, p->apCell[idx]); + if( szCell[idx]==0 ){ + szCell[idx] = pRef->xCellSize(pRef, p->apCell[idx]); }else{ assert( CORRUPT_DB || - p->szCell[idx]==p->pRef->xCellSize(p->pRef, p->apCell[idx]) ); + szCell[idx]==pRef->xCellSize(pRef, p->apCell[idx]) ); } idx++; N--; @@ -75438,10 +77026,10 @@ static int rebuildPage( assert( i(u32)usableSize ){ j = 0; } + if( NEVER(j>(u32)usableSize) ){ j = 0; } memcpy(&pTmp[j], &aData[j], usableSize - j); - for(k=0; pCArray->ixNx[k]<=i && ALWAYS(kixNx[k]<=i; k++){} pSrcEnd = pCArray->apEnd[k]; pData = pEnd; @@ -75504,7 +77092,7 @@ static int rebuildPage( ** Finally, argument pBegin points to the byte immediately following the ** end of the space required by this page for the cell-pointer area (for ** all cells - not just those inserted by the current call). If the content -** area must be extended to before this point in order to accomodate all +** area must be extended to before this point in order to accommodate all ** cells in apCell[], then the cells do not fit and non-zero is returned. */ static int pageInsertArray( @@ -75524,7 +77112,7 @@ static int pageInsertArray( u8 *pEnd; /* Maximum extent of cell data */ assert( CORRUPT_DB || pPg->hdrOffset==0 ); /* Never called on page 1 */ if( iEnd<=iFirst ) return 0; - for(k=0; pCArray->ixNx[k]<=i && ALWAYS(kixNx[k]<=i ; k++){} pEnd = pCArray->apEnd[k]; while( 1 /*Exit by break*/ ){ int sz, rc; @@ -75582,39 +77170,50 @@ static int pageFreeArray( u8 * const pEnd = &aData[pPg->pBt->usableSize]; u8 * const pStart = &aData[pPg->hdrOffset + 8 + pPg->childPtrSize]; int nRet = 0; - int i; + int i, j; int iEnd = iFirst + nCell; - u8 *pFree = 0; - int szFree = 0; + int nFree = 0; + int aOfst[10]; + int aAfter[10]; for(i=iFirst; iapCell[i]; if( SQLITE_WITHIN(pCell, pStart, pEnd) ){ int sz; + int iAfter; + int iOfst; /* No need to use cachedCellSize() here. The sizes of all cells that ** are to be freed have already been computing while deciding which ** cells need freeing */ sz = pCArray->szCell[i]; assert( sz>0 ); - if( pFree!=(pCell + sz) ){ - if( pFree ){ - assert( pFree>aData && (pFree - aData)<65536 ); - freeSpace(pPg, (u16)(pFree - aData), szFree); - } - pFree = pCell; - szFree = sz; - if( pFree+sz>pEnd ){ - return 0; + iOfst = (u16)(pCell - aData); + iAfter = iOfst+sz; + for(j=0; j=nFree ){ + if( nFree>=(int)(sizeof(aOfst)/sizeof(aOfst[0])) ){ + for(j=0; jpEnd ) return 0; + nFree++; } nRet++; } } - if( pFree ){ - assert( pFree>aData && (pFree - aData)<65536 ); - freeSpace(pPg, (u16)(pFree - aData), szFree); + for(j=0; jpPg->aDataEnd ) goto editpage_fail; + if( NEVER(pData>pPg->aDataEnd) ) goto editpage_fail; /* Add cells to the start of the page */ if( iNewpgno, &rc); if( szCell>pNew->minLocal ){ ptrmapPutOvflPtr(pNew, pNew, pCell, &rc); @@ -75841,8 +77440,8 @@ static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){ /* Insert the new divider cell into pParent. */ if( rc==SQLITE_OK ){ - insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace), - 0, pPage->pgno, &rc); + rc = insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace), + 0, pPage->pgno); } /* Set the right-child pointer of pParent to point to the new page. */ @@ -75951,7 +77550,7 @@ static void copyNodeContent(MemPage *pFrom, MemPage *pTo, int *pRC){ /* If this is an auto-vacuum database, update the pointer-map entries ** for any b-tree or overflow pages that pTo now contains the pointers to. */ - if( ISAUTOVACUUM ){ + if( ISAUTOVACUUM(pBt) ){ *pRC = setChildPtrmaps(pTo); } } @@ -76084,7 +77683,7 @@ static int balance_nonroot( pgno = get4byte(pRight); while( 1 ){ if( rc==SQLITE_OK ){ - rc = getAndInitPage(pBt, pgno, &apOld[i], 0, 0); + rc = getAndInitPage(pBt, pgno, &apOld[i], 0); } if( rc ){ memset(apOld, 0, (i+1)*sizeof(MemPage*)); @@ -76375,15 +77974,17 @@ static int balance_nonroot( d = r + 1 - leafData; (void)cachedCellSize(&b, d); do{ + int szR, szD; assert( d szLeft-(b.szCell[r]+(i==k-1?0:2)))){ + && (bBulk || szRight+szD+2 > szLeft-(szR+(i==k-1?0:2)))){ break; } - szRight += b.szCell[d] + 2; - szLeft -= b.szCell[r] + 2; + szRight += szD + 2; + szLeft -= szR + 2; cntNew[i-1] = r; r--; d--; @@ -76396,7 +77997,7 @@ static int balance_nonroot( } } - /* Sanity check: For a non-corrupt database file one of the follwing + /* Sanity check: For a non-corrupt database file one of the following ** must be true: ** (1) We found one or more cells (cntNew[0])>0), or ** (2) pPage is a virtual root page. A virtual root page is when @@ -76404,7 +78005,7 @@ static int balance_nonroot( ** that page. */ assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) || CORRUPT_DB); - TRACE(("BALANCE: old: %d(nc=%d) %d(nc=%d) %d(nc=%d)\n", + TRACE(("BALANCE: old: %u(nc=%u) %u(nc=%u) %u(nc=%u)\n", apOld[0]->pgno, apOld[0]->nCell, nOld>=2 ? apOld[1]->pgno : 0, nOld>=2 ? apOld[1]->nCell : 0, nOld>=3 ? apOld[2]->pgno : 0, nOld>=3 ? apOld[2]->nCell : 0 @@ -76437,7 +78038,7 @@ static int balance_nonroot( cntOld[i] = b.nCell; /* Set the pointer-map entry for the new sibling page. */ - if( ISAUTOVACUUM ){ + if( ISAUTOVACUUM(pBt) ){ ptrmapPut(pBt, pNew->pgno, PTRMAP_BTREE, pParent->pgno, &rc); if( rc!=SQLITE_OK ){ goto balance_cleanup; @@ -76488,8 +78089,8 @@ static int balance_nonroot( } } - TRACE(("BALANCE: new: %d(%d nc=%d) %d(%d nc=%d) %d(%d nc=%d) " - "%d(%d nc=%d) %d(%d nc=%d)\n", + TRACE(("BALANCE: new: %u(%u nc=%u) %u(%u nc=%u) %u(%u nc=%u) " + "%u(%u nc=%u) %u(%u nc=%u)\n", apNew[0]->pgno, szNew[0], cntNew[0], nNew>=2 ? apNew[1]->pgno : 0, nNew>=2 ? szNew[1] : 0, nNew>=2 ? cntNew[1] - cntNew[0] - !leafData : 0, @@ -76530,7 +78131,7 @@ static int balance_nonroot( ** updated. This happens below, after the sibling pages have been ** populated, not here. */ - if( ISAUTOVACUUM ){ + if( ISAUTOVACUUM(pBt) ){ MemPage *pOld; MemPage *pNew = pOld = apNew[0]; int cntOldNext = pNew->nCell + pNew->nOverflow; @@ -76621,13 +78222,13 @@ static int balance_nonroot( iOvflSpace += sz; assert( sz<=pBt->maxLocal+23 ); assert( iOvflSpace <= (int)pBt->pageSize ); - for(k=0; b.ixNx[k]<=j && ALWAYS(kpgno, &rc); + rc = insertCell(pParent, nxDiv+i, pCell, sz, pTemp, pNew->pgno); if( rc!=SQLITE_OK ) goto balance_cleanup; assert( sqlite3PagerIswriteable(pParent->pDbPage) ); } @@ -76657,6 +78258,8 @@ static int balance_nonroot( for(i=1-nNew; i=0 && iPg=1 || i>=0 ); + assert( iPg=0 /* On the upwards pass, or... */ || cntOld[iPg-1]>=cntNew[iPg-1] /* Condition (1) is true */ @@ -76723,7 +78326,7 @@ static int balance_nonroot( ); copyNodeContent(apNew[0], pParent, &rc); freePage(apNew[0], &rc); - }else if( ISAUTOVACUUM && !leafCorrection ){ + }else if( ISAUTOVACUUM(pBt) && !leafCorrection ){ /* Fix the pointer map entries associated with the right-child of each ** sibling page. All other pointer map entries have already been taken ** care of. */ @@ -76734,7 +78337,7 @@ static int balance_nonroot( } assert( pParent->isInit ); - TRACE(("BALANCE: finished: old=%d new=%d cells=%d\n", + TRACE(("BALANCE: finished: old=%u new=%u cells=%u\n", nOld, nNew, b.nCell)); /* Free any old pages that were not reused as new pages. @@ -76744,7 +78347,7 @@ static int balance_nonroot( } #if 0 - if( ISAUTOVACUUM && rc==SQLITE_OK && apNew[0]->isInit ){ + if( ISAUTOVACUUM(pBt) && rc==SQLITE_OK && apNew[0]->isInit ){ /* The ptrmapCheckPages() contains assert() statements that verify that ** all pointer map pages are set correctly. This is helpful while ** debugging. This is usually disabled because a corrupt database may @@ -76806,7 +78409,7 @@ static int balance_deeper(MemPage *pRoot, MemPage **ppChild){ if( rc==SQLITE_OK ){ rc = allocateBtreePage(pBt,&pChild,&pgnoChild,pRoot->pgno,0); copyNodeContent(pRoot, pChild, &rc); - if( ISAUTOVACUUM ){ + if( ISAUTOVACUUM(pBt) ){ ptrmapPut(pBt, pgnoChild, PTRMAP_BTREE, pRoot->pgno, &rc); } } @@ -76819,7 +78422,7 @@ static int balance_deeper(MemPage *pRoot, MemPage **ppChild){ assert( sqlite3PagerIswriteable(pRoot->pDbPage) ); assert( pChild->nCell==pRoot->nCell || CORRUPT_DB ); - TRACE(("BALANCE: copy root %d into %d\n", pRoot->pgno, pChild->pgno)); + TRACE(("BALANCE: copy root %u into %u\n", pRoot->pgno, pChild->pgno)); /* Copy the overflow cells from pRoot to pChild */ memcpy(pChild->aiOvfl, pRoot->aiOvfl, @@ -77013,7 +78616,7 @@ static int btreeOverwriteContent( ){ int nData = pX->nData - iOffset; if( nData<=0 ){ - /* Overwritting with zeros */ + /* Overwriting with zeros */ int i; for(i=0; ipData to write */ int nTotal = pX->nData + pX->nZero; /* Total bytes of to write */ int rc; /* Return code */ @@ -77056,16 +78663,12 @@ static int btreeOverwriteCell(BtCursor *pCur, const BtreePayload *pX){ Pgno ovflPgno; /* Next overflow page to write */ u32 ovflPageSize; /* Size to write on overflow page */ - if( pCur->info.pPayload + pCur->info.nLocal > pPage->aDataEnd - || pCur->info.pPayload < pPage->aData + pPage->cellOffset - ){ - return SQLITE_CORRUPT_BKPT; - } + assert( pCur->info.nLocalinfo.pPayload, pX, 0, pCur->info.nLocal); if( rc ) return rc; - if( pCur->info.nLocal==nTotal ) return SQLITE_OK; /* Now overwrite the overflow pages */ iOffset = pCur->info.nLocal; @@ -77095,6 +78698,29 @@ static int btreeOverwriteCell(BtCursor *pCur, const BtreePayload *pX){ return SQLITE_OK; } +/* +** Overwrite the cell that cursor pCur is pointing to with fresh content +** contained in pX. +*/ +static int btreeOverwriteCell(BtCursor *pCur, const BtreePayload *pX){ + int nTotal = pX->nData + pX->nZero; /* Total bytes of to write */ + MemPage *pPage = pCur->pPage; /* Page being written */ + + if( pCur->info.pPayload + pCur->info.nLocal > pPage->aDataEnd + || pCur->info.pPayload < pPage->aData + pPage->cellOffset + ){ + return SQLITE_CORRUPT_BKPT; + } + if( pCur->info.nLocal==nTotal ){ + /* The entire cell is local */ + return btreeOverwriteContent(pPage, pCur->info.pPayload, pX, + 0, pCur->info.nLocal); + }else{ + /* The cell contains overflow content */ + return btreeOverwriteOverflowCell(pCur, pX); + } +} + /* ** Insert a new record into the BTree. The content of the new record @@ -77138,7 +78764,6 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( int idx; MemPage *pPage; Btree *p = pCur->pBtree; - BtShared *pBt = p->pBt; unsigned char *oldCell; unsigned char *newCell = 0; @@ -77157,7 +78782,7 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( ** not to clear the cursor here. */ if( pCur->curFlags & BTCF_Multiple ){ - rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur); + rc = saveAllCursors(p->pBt, pCur->pgnoRoot, pCur); if( rc ) return rc; if( loc && pCur->iPage<0 ){ /* This can only happen if the schema is corrupt such that there is more @@ -77181,8 +78806,8 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( assert( cursorOwnsBtShared(pCur) ); assert( (pCur->curFlags & BTCF_WriteFlag)!=0 - && pBt->inTransaction==TRANS_WRITE - && (pBt->btsFlags & BTS_READ_ONLY)==0 ); + && p->pBt->inTransaction==TRANS_WRITE + && (p->pBt->btsFlags & BTS_READ_ONLY)==0 ); assert( hasSharedCacheTableLock(p, pCur->pgnoRoot, pCur->pKeyInfo!=0, 2) ); /* Assert that the caller has been consistent. If this cursor was opened @@ -77280,7 +78905,7 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( } } assert( pCur->eState==CURSOR_VALID - || (pCur->eState==CURSOR_INVALID && loc) ); + || (pCur->eState==CURSOR_INVALID && loc) || CORRUPT_DB ); pPage = pCur->pPage; assert( pPage->intKey || pX->nKey>=0 || (flags & BTREE_PREFORMAT) ); @@ -77295,31 +78920,34 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( if( rc ) return rc; } - TRACE(("INSERT: table=%d nkey=%lld ndata=%d page=%d %s\n", + TRACE(("INSERT: table=%u nkey=%lld ndata=%u page=%u %s\n", pCur->pgnoRoot, pX->nKey, pX->nData, pPage->pgno, loc==0 ? "overwrite" : "new entry")); assert( pPage->isInit || CORRUPT_DB ); - newCell = pBt->pTmpSpace; + newCell = p->pBt->pTmpSpace; assert( newCell!=0 ); + assert( BTREE_PREFORMAT==OPFLAG_PREFORMAT ); if( flags & BTREE_PREFORMAT ){ rc = SQLITE_OK; - szNew = pBt->nPreformatSize; + szNew = p->pBt->nPreformatSize; if( szNew<4 ) szNew = 4; - if( ISAUTOVACUUM && szNew>pPage->maxLocal ){ + if( ISAUTOVACUUM(p->pBt) && szNew>pPage->maxLocal ){ CellInfo info; pPage->xParseCell(pPage, newCell, &info); if( info.nPayload!=info.nLocal ){ Pgno ovfl = get4byte(&newCell[szNew-4]); - ptrmapPut(pBt, ovfl, PTRMAP_OVERFLOW1, pPage->pgno, &rc); + ptrmapPut(p->pBt, ovfl, PTRMAP_OVERFLOW1, pPage->pgno, &rc); + if( NEVER(rc) ) goto end_insert; } } }else{ rc = fillInCell(pPage, newCell, pX, &szNew); + if( rc ) goto end_insert; } - if( rc ) goto end_insert; assert( szNew==pPage->xCellSize(pPage, newCell) ); - assert( szNew <= MX_CELL_SIZE(pBt) ); + assert( szNew <= MX_CELL_SIZE(p->pBt) ); idx = pCur->ix; + pCur->info.nSize = 0; if( loc==0 ){ CellInfo info; assert( idx>=0 ); @@ -77338,7 +78966,7 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( testcase( pCur->curFlags & BTCF_ValidOvfl ); invalidateOverflowCache(pCur); if( info.nSize==szNew && info.nLocal==info.nPayload - && (!ISAUTOVACUUM || szNewminLocal) + && (!ISAUTOVACUUM(p->pBt) || szNewminLocal) ){ /* Overwrite the old cell with the new if they are the same size. ** We could also try to do this if the old cell is smaller, then add @@ -77368,7 +78996,7 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( }else{ assert( pPage->leaf ); } - insertCell(pPage, idx, newCell, szNew, 0, 0, &rc); + rc = insertCellFast(pPage, idx, newCell, szNew); assert( pPage->nOverflow==0 || rc==SQLITE_OK ); assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 ); @@ -77392,7 +79020,6 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( ** larger than the largest existing key, it is possible to insert the ** row without seeking the cursor. This can be a big performance boost. */ - pCur->info.nSize = 0; if( pPage->nOverflow ){ assert( rc==SQLITE_OK ); pCur->curFlags &= ~(BTCF_ValidNKey); @@ -77441,7 +79068,6 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( ** SQLITE_OK is returned if successful, or an SQLite error code otherwise. */ SQLITE_PRIVATE int sqlite3BtreeTransferRow(BtCursor *pDest, BtCursor *pSrc, i64 iKey){ - int rc = SQLITE_OK; BtShared *pBt = pDest->pBt; u8 *aOut = pBt->pTmpSpace; /* Pointer to next output buffer */ const u8 *aIn; /* Pointer to next input buffer */ @@ -77464,7 +79090,9 @@ SQLITE_PRIVATE int sqlite3BtreeTransferRow(BtCursor *pDest, BtCursor *pSrc, i64 if( nIn==nRem && nInpPage->maxLocal ){ memcpy(aOut, aIn, nIn); pBt->nPreformatSize = nIn + (aOut - pBt->pTmpSpace); + return SQLITE_OK; }else{ + int rc = SQLITE_OK; Pager *pSrcPager = pSrc->pBt->pPager; u8 *pPgnoOut = 0; Pgno ovflIn = 0; @@ -77516,7 +79144,7 @@ SQLITE_PRIVATE int sqlite3BtreeTransferRow(BtCursor *pDest, BtCursor *pSrc, i64 MemPage *pNew = 0; rc = allocateBtreePage(pBt, &pNew, &pgnoNew, 0, 0); put4byte(pPgnoOut, pgnoNew); - if( ISAUTOVACUUM && pPageOut ){ + if( ISAUTOVACUUM(pBt) && pPageOut ){ ptrmapPut(pBt, pgnoNew, PTRMAP_OVERFLOW2, pPageOut->pgno, &rc); } releasePage(pPageOut); @@ -77532,9 +79160,8 @@ SQLITE_PRIVATE int sqlite3BtreeTransferRow(BtCursor *pDest, BtCursor *pSrc, i64 releasePage(pPageOut); sqlite3PagerUnref(pPageIn); + return rc; } - - return rc; } /* @@ -77593,6 +79220,9 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur, u8 flags){ if( pPage->nFree<0 && btreeComputeFreeSpace(pPage) ){ return SQLITE_CORRUPT_BKPT; } + if( pCell<&pPage->aCellIdx[pPage->nCell] ){ + return SQLITE_CORRUPT_BKPT; + } /* If the BTREE_SAVEPOSITION bit is on, then the cursor position must ** be preserved following this delete operation. If the current delete @@ -77689,7 +79319,7 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur, u8 flags){ assert( pTmp!=0 ); rc = sqlite3PagerWrite(pLeaf->pDbPage); if( rc==SQLITE_OK ){ - insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc); + rc = insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n); } dropCell(pLeaf, pLeaf->nCell-1, nCell, &rc); if( rc ) return rc; @@ -77769,7 +79399,7 @@ static int btreeCreateTable(Btree *p, Pgno *piTable, int createTabFlags){ MemPage *pRoot; Pgno pgnoRoot; int rc; - int ptfFlags; /* Page-type flage for the root page of new table */ + int ptfFlags; /* Page-type flags for the root page of new table */ assert( sqlite3BtreeHoldsMutex(p) ); assert( pBt->inTransaction==TRANS_WRITE ); @@ -77938,7 +79568,7 @@ static int clearDatabasePage( if( pgno>btreePagecount(pBt) ){ return SQLITE_CORRUPT_BKPT; } - rc = getAndInitPage(pBt, pgno, &pPage, 0, 0); + rc = getAndInitPage(pBt, pgno, &pPage, 0); if( rc ) return rc; if( (pBt->openFlags & BTREE_SINGLE)==0 && sqlite3PagerPageRefcount(pPage->pDbPage) != (1 + (pgno==1)) @@ -78288,6 +79918,41 @@ SQLITE_PRIVATE Pager *sqlite3BtreePager(Btree *p){ } #ifndef SQLITE_OMIT_INTEGRITY_CHECK +/* +** Record an OOM error during integrity_check +*/ +static void checkOom(IntegrityCk *pCheck){ + pCheck->rc = SQLITE_NOMEM; + pCheck->mxErr = 0; /* Causes integrity_check processing to stop */ + if( pCheck->nErr==0 ) pCheck->nErr++; +} + +/* +** Invoke the progress handler, if appropriate. Also check for an +** interrupt. +*/ +static void checkProgress(IntegrityCk *pCheck){ + sqlite3 *db = pCheck->db; + if( AtomicLoad(&db->u1.isInterrupted) ){ + pCheck->rc = SQLITE_INTERRUPT; + pCheck->nErr++; + pCheck->mxErr = 0; + } +#ifndef SQLITE_OMIT_PROGRESS_CALLBACK + if( db->xProgress ){ + assert( db->nProgressOps>0 ); + pCheck->nStep++; + if( (pCheck->nStep % db->nProgressOps)==0 + && db->xProgress(db->pProgressArg) + ){ + pCheck->rc = SQLITE_INTERRUPT; + pCheck->nErr++; + pCheck->mxErr = 0; + } + } +#endif +} + /* ** Append a message to the error message string. */ @@ -78297,6 +79962,7 @@ static void checkAppendMsg( ... ){ va_list ap; + checkProgress(pCheck); if( !pCheck->mxErr ) return; pCheck->mxErr--; pCheck->nErr++; @@ -78305,12 +79971,13 @@ static void checkAppendMsg( sqlite3_str_append(&pCheck->errMsg, "\n", 1); } if( pCheck->zPfx ){ - sqlite3_str_appendf(&pCheck->errMsg, pCheck->zPfx, pCheck->v1, pCheck->v2); + sqlite3_str_appendf(&pCheck->errMsg, pCheck->zPfx, + pCheck->v0, pCheck->v1, pCheck->v2); } sqlite3_str_vappendf(&pCheck->errMsg, zFormat, ap); va_end(ap); if( pCheck->errMsg.accError==SQLITE_NOMEM ){ - pCheck->bOomFault = 1; + checkOom(pCheck); } } #endif /* SQLITE_OMIT_INTEGRITY_CHECK */ @@ -78345,14 +80012,13 @@ static void setPageReferenced(IntegrityCk *pCheck, Pgno iPg){ */ static int checkRef(IntegrityCk *pCheck, Pgno iPage){ if( iPage>pCheck->nPage || iPage==0 ){ - checkAppendMsg(pCheck, "invalid page number %d", iPage); + checkAppendMsg(pCheck, "invalid page number %u", iPage); return 1; } if( getPageReferenced(pCheck, iPage) ){ - checkAppendMsg(pCheck, "2nd reference to page %d", iPage); + checkAppendMsg(pCheck, "2nd reference to page %u", iPage); return 1; } - if( AtomicLoad(&pCheck->db->u1.isInterrupted) ) return 1; setPageReferenced(pCheck, iPage); return 0; } @@ -78375,14 +80041,14 @@ static void checkPtrmap( rc = ptrmapGet(pCheck->pBt, iChild, &ePtrmapType, &iPtrmapParent); if( rc!=SQLITE_OK ){ - if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ) pCheck->bOomFault = 1; - checkAppendMsg(pCheck, "Failed to read ptrmap key=%d", iChild); + if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ) checkOom(pCheck); + checkAppendMsg(pCheck, "Failed to read ptrmap key=%u", iChild); return; } if( ePtrmapType!=eType || iPtrmapParent!=iParent ){ checkAppendMsg(pCheck, - "Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)", + "Bad ptr map entry key=%u expected=(%u,%u) got=(%u,%u)", iChild, eType, iParent, ePtrmapType, iPtrmapParent); } } @@ -78407,7 +80073,7 @@ static void checkList( if( checkRef(pCheck, iPage) ) break; N--; if( sqlite3PagerGet(pCheck->pPager, (Pgno)iPage, &pOvflPage, 0) ){ - checkAppendMsg(pCheck, "failed to get page %d", iPage); + checkAppendMsg(pCheck, "failed to get page %u", iPage); break; } pOvflData = (unsigned char *)sqlite3PagerGetData(pOvflPage); @@ -78420,7 +80086,7 @@ static void checkList( #endif if( n>pCheck->pBt->usableSize/4-2 ){ checkAppendMsg(pCheck, - "freelist leaf count too big on page %d", iPage); + "freelist leaf count too big on page %u", iPage); N--; }else{ for(i=0; i<(int)n; i++){ @@ -78452,7 +80118,7 @@ static void checkList( } if( N && nErrAtStart==pCheck->nErr ){ checkAppendMsg(pCheck, - "%s is %d but should be %d", + "%s is %u but should be %u", isFreeList ? "size" : "overflow list length", expected-N, expected); } @@ -78482,7 +80148,9 @@ static void checkList( ** lower 16 bits are the index of the last byte of that range. */ static void btreeHeapInsert(u32 *aHeap, u32 x){ - u32 j, i = ++aHeap[0]; + u32 j, i; + assert( aHeap!=0 ); + i = ++aHeap[0]; aHeap[i] = x; while( (j = i/2)>0 && aHeap[j]>aHeap[i] ){ x = aHeap[j]; @@ -78559,11 +80227,13 @@ static int checkTreePage( /* Check that the page exists */ + checkProgress(pCheck); + if( pCheck->mxErr==0 ) goto end_of_check; pBt = pCheck->pBt; usableSize = pBt->usableSize; if( iPage==0 ) return 0; if( checkRef(pCheck, iPage) ) return 0; - pCheck->zPfx = "Page %u: "; + pCheck->zPfx = "Tree %u page %u: "; pCheck->v1 = iPage; if( (rc = btreeGetPage(pBt, iPage, &pPage, 0))!=0 ){ checkAppendMsg(pCheck, @@ -78590,7 +80260,7 @@ static int checkTreePage( hdr = pPage->hdrOffset; /* Set up for cell analysis */ - pCheck->zPfx = "On tree page %u cell %d: "; + pCheck->zPfx = "Tree %u page %u cell %u: "; contentOffset = get2byteNotZero(&data[hdr+5]); assert( contentOffset<=usableSize ); /* Enforced by btreeInitPage() */ @@ -78610,7 +80280,7 @@ static int checkTreePage( pgno = get4byte(&data[hdr+8]); #ifndef SQLITE_OMIT_AUTOVACUUM if( pBt->autoVacuum ){ - pCheck->zPfx = "On page %u at right child: "; + pCheck->zPfx = "Tree %u page %u right child: "; checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage); } #endif @@ -78634,7 +80304,7 @@ static int checkTreePage( pc = get2byteAligned(pCellIdx); pCellIdx -= 2; if( pcusableSize-4 ){ - checkAppendMsg(pCheck, "Offset %d out of range %d..%d", + checkAppendMsg(pCheck, "Offset %u out of range %u..%u", pc, contentOffset, usableSize-4); doCoverageCheck = 0; continue; @@ -78766,7 +80436,7 @@ static int checkTreePage( */ if( heap[0]==0 && nFrag!=data[hdr+7] ){ checkAppendMsg(pCheck, - "Fragmentation of %d bytes reported as %d on page %u", + "Fragmentation of %u bytes reported as %u on page %u", nFrag, data[hdr+7], iPage); } } @@ -78804,13 +80474,14 @@ static int checkTreePage( ** the unverified btrees. Except, if aRoot[1] is 1, then the freelist ** checks are still performed. */ -SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck( +SQLITE_PRIVATE int sqlite3BtreeIntegrityCheck( sqlite3 *db, /* Database connection that is running the check */ Btree *p, /* The btree to be checked */ Pgno *aRoot, /* An array of root pages numbers for individual trees */ int nRoot, /* Number of entries in aRoot[] */ int mxErr, /* Stop reporting errors after this many */ - int *pnErr /* Write number of errors seen to this variable */ + int *pnErr, /* OUT: Write number of errors seen to this variable */ + char **pzOut /* OUT: Write the error message string here */ ){ Pgno i; IntegrityCk sCheck; @@ -78833,18 +80504,12 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck( assert( p->inTrans>TRANS_NONE && pBt->inTransaction>TRANS_NONE ); VVA_ONLY( nRef = sqlite3PagerRefcount(pBt->pPager) ); assert( nRef>=0 ); + memset(&sCheck, 0, sizeof(sCheck)); sCheck.db = db; sCheck.pBt = pBt; sCheck.pPager = pBt->pPager; sCheck.nPage = btreePagecount(sCheck.pBt); sCheck.mxErr = mxErr; - sCheck.nErr = 0; - sCheck.bOomFault = 0; - sCheck.zPfx = 0; - sCheck.v1 = 0; - sCheck.v2 = 0; - sCheck.aPgRef = 0; - sCheck.heap = 0; sqlite3StrAccumInit(&sCheck.errMsg, 0, zErr, sizeof(zErr), SQLITE_MAX_LENGTH); sCheck.errMsg.printfFlags = SQLITE_PRINTF_INTERNAL; if( sCheck.nPage==0 ){ @@ -78853,12 +80518,12 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck( sCheck.aPgRef = sqlite3MallocZero((sCheck.nPage / 8)+ 1); if( !sCheck.aPgRef ){ - sCheck.bOomFault = 1; + checkOom(&sCheck); goto integrity_ck_cleanup; } sCheck.heap = (u32*)sqlite3PageMalloc( pBt->pageSize ); if( sCheck.heap==0 ){ - sCheck.bOomFault = 1; + checkOom(&sCheck); goto integrity_ck_cleanup; } @@ -78868,7 +80533,7 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck( /* Check the integrity of the freelist */ if( bCkFreelist ){ - sCheck.zPfx = "Main freelist: "; + sCheck.zPfx = "Freelist: "; checkList(&sCheck, 1, get4byte(&pBt->pPage1->aData[32]), get4byte(&pBt->pPage1->aData[36])); sCheck.zPfx = 0; @@ -78885,7 +80550,7 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck( mxInHdr = get4byte(&pBt->pPage1->aData[52]); if( mx!=mxInHdr ){ checkAppendMsg(&sCheck, - "max rootpage (%d) disagrees with header (%d)", + "max rootpage (%u) disagrees with header (%u)", mx, mxInHdr ); } @@ -78906,6 +80571,7 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck( checkPtrmap(&sCheck, aRoot[i], PTRMAP_ROOTPAGE, 0); } #endif + sCheck.v0 = aRoot[i]; checkTreePage(&sCheck, aRoot[i], ¬Used, LARGEST_INT64); } pBt->db->flags = savedDbFlags; @@ -78916,7 +80582,7 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck( for(i=1; i<=sCheck.nPage && sCheck.mxErr; i++){ #ifdef SQLITE_OMIT_AUTOVACUUM if( getPageReferenced(&sCheck, i)==0 ){ - checkAppendMsg(&sCheck, "Page %d is never used", i); + checkAppendMsg(&sCheck, "Page %u: never used", i); } #else /* If the database supports auto-vacuum, make sure no tables contain @@ -78924,11 +80590,11 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck( */ if( getPageReferenced(&sCheck, i)==0 && (PTRMAP_PAGENO(pBt, i)!=i || !pBt->autoVacuum) ){ - checkAppendMsg(&sCheck, "Page %d is never used", i); + checkAppendMsg(&sCheck, "Page %u: never used", i); } if( getPageReferenced(&sCheck, i)!=0 && (PTRMAP_PAGENO(pBt, i)==i && pBt->autoVacuum) ){ - checkAppendMsg(&sCheck, "Pointer map page %d is referenced", i); + checkAppendMsg(&sCheck, "Page %u: pointer map referenced", i); } #endif } @@ -78939,16 +80605,17 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck( integrity_ck_cleanup: sqlite3PageFree(sCheck.heap); sqlite3_free(sCheck.aPgRef); - if( sCheck.bOomFault ){ + *pnErr = sCheck.nErr; + if( sCheck.nErr==0 ){ sqlite3_str_reset(&sCheck.errMsg); - sCheck.nErr++; + *pzOut = 0; + }else{ + *pzOut = sqlite3StrAccumFinish(&sCheck.errMsg); } - *pnErr = sCheck.nErr; - if( sCheck.nErr==0 ) sqlite3_str_reset(&sCheck.errMsg); /* Make sure this analysis did not leave any unref() pages. */ assert( nRef==sqlite3PagerRefcount(pBt->pPager) ); sqlite3BtreeLeave(p); - return sqlite3StrAccumFinish(&sCheck.errMsg); + return sCheck.rc; } #endif /* SQLITE_OMIT_INTEGRITY_CHECK */ @@ -79489,13 +81156,7 @@ static int backupOnePage( assert( !isFatalError(p->rc) ); assert( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) ); assert( zSrcData ); - - /* Catch the case where the destination is an in-memory database and the - ** page sizes of the source and destination differ. - */ - if( nSrcPgsz!=nDestPgsz && sqlite3PagerIsMemdb(pDestPager) ){ - rc = SQLITE_READONLY; - } + assert( nSrcPgsz==nDestPgsz || sqlite3PagerIsMemdb(pDestPager)==0 ); /* This loop runs once for each destination page spanned by the source ** page. For each iteration, variable iOff is set to the byte offset @@ -79628,7 +81289,10 @@ SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){ pgszSrc = sqlite3BtreeGetPageSize(p->pSrc); pgszDest = sqlite3BtreeGetPageSize(p->pDest); destMode = sqlite3PagerGetJournalMode(sqlite3BtreePager(p->pDest)); - if( SQLITE_OK==rc && destMode==PAGER_JOURNALMODE_WAL && pgszSrc!=pgszDest ){ + if( SQLITE_OK==rc + && (destMode==PAGER_JOURNALMODE_WAL || sqlite3PagerIsMemdb(pDestPager)) + && pgszSrc!=pgszDest + ){ rc = SQLITE_READONLY; } @@ -80134,9 +81798,9 @@ static void vdbeMemRenderNum(int sz, char *zBuf, Mem *p){ i64 x; assert( (p->flags&MEM_Int)*2==sizeof(x) ); memcpy(&x, (char*)&p->u, (p->flags&MEM_Int)*2); - sqlite3Int64ToText(x, zBuf); + p->n = sqlite3Int64ToText(x, zBuf); #else - sqlite3Int64ToText(p->u.i, zBuf); + p->n = sqlite3Int64ToText(p->u.i, zBuf); #endif }else{ sqlite3StrAccumInit(&acc, 0, zBuf, sz, 0); @@ -80144,6 +81808,7 @@ static void vdbeMemRenderNum(int sz, char *zBuf, Mem *p){ (p->flags & MEM_IntReal)!=0 ? (double)p->u.i : p->u.r); assert( acc.zText==zBuf && acc.mxAlloc<=0 ); zBuf[acc.nChar] = 0; /* Fast version of sqlite3StrAccumFinish(&acc) */ + p->n = acc.nChar; } } @@ -80171,10 +81836,12 @@ static void vdbeMemRenderNum(int sz, char *zBuf, Mem *p){ ** This routine is for use inside of assert() statements only. */ SQLITE_PRIVATE int sqlite3VdbeMemValidStrRep(Mem *p){ + Mem tmp; char zBuf[100]; char *z; int i, j, incr; if( (p->flags & MEM_Str)==0 ) return 1; + if( p->db && p->db->mallocFailed ) return 1; if( p->flags & MEM_Term ){ /* Insure that the string is properly zero-terminated. Pay particular ** attention to the case where p->n is odd */ @@ -80187,7 +81854,8 @@ SQLITE_PRIVATE int sqlite3VdbeMemValidStrRep(Mem *p){ assert( p->enc==SQLITE_UTF8 || p->z[((p->n+1)&~1)+1]==0 ); } if( (p->flags & (MEM_Int|MEM_Real|MEM_IntReal))==0 ) return 1; - vdbeMemRenderNum(sizeof(zBuf), zBuf, p); + memcpy(&tmp, p, sizeof(tmp)); + vdbeMemRenderNum(sizeof(zBuf), zBuf, &tmp); z = p->z; i = j = 0; incr = 1; @@ -80330,6 +81998,40 @@ SQLITE_PRIVATE int sqlite3VdbeMemClearAndResize(Mem *pMem, int szNew){ return SQLITE_OK; } +/* +** If pMem is already a string, detect if it is a zero-terminated +** string, or make it into one if possible, and mark it as such. +** +** This is an optimization. Correct operation continues even if +** this routine is a no-op. +*/ +SQLITE_PRIVATE void sqlite3VdbeMemZeroTerminateIfAble(Mem *pMem){ + if( (pMem->flags & (MEM_Str|MEM_Term|MEM_Ephem|MEM_Static))!=MEM_Str ){ + /* pMem must be a string, and it cannot be an ephemeral or static string */ + return; + } + if( pMem->enc!=SQLITE_UTF8 ) return; + if( NEVER(pMem->z==0) ) return; + if( pMem->flags & MEM_Dyn ){ + if( pMem->xDel==sqlite3_free + && sqlite3_msize(pMem->z) >= (u64)(pMem->n+1) + ){ + pMem->z[pMem->n] = 0; + pMem->flags |= MEM_Term; + return; + } + if( pMem->xDel==(void(*)(void*))sqlite3RCStrUnref ){ + /* Blindly assume that all RCStr objects are zero-terminated */ + pMem->flags |= MEM_Term; + return; + } + }else if( pMem->szMalloc >= pMem->n+1 ){ + pMem->z[pMem->n] = 0; + pMem->flags |= MEM_Term; + return; + } +} + /* ** It is already known that pMem contains an unterminated string. ** Add the zero terminator. @@ -80456,7 +82158,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem *pMem, u8 enc, u8 bForce){ vdbeMemRenderNum(nByte, pMem->z, pMem); assert( pMem->z!=0 ); - pMem->n = sqlite3Strlen30NN(pMem->z); + assert( pMem->n==(int)sqlite3Strlen30NN(pMem->z) ); pMem->enc = SQLITE_UTF8; pMem->flags |= MEM_Str|MEM_Term; if( bForce ) pMem->flags &= ~(MEM_Int|MEM_Real|MEM_IntReal); @@ -80591,36 +82293,6 @@ SQLITE_PRIVATE void sqlite3VdbeMemReleaseMalloc(Mem *p){ if( p->szMalloc ) vdbeMemClear(p); } -/* -** Convert a 64-bit IEEE double into a 64-bit signed integer. -** If the double is out of range of a 64-bit signed integer then -** return the closest available 64-bit signed integer. -*/ -static SQLITE_NOINLINE i64 doubleToInt64(double r){ -#ifdef SQLITE_OMIT_FLOATING_POINT - /* When floating-point is omitted, double and int64 are the same thing */ - return r; -#else - /* - ** Many compilers we encounter do not define constants for the - ** minimum and maximum 64-bit integers, or they define them - ** inconsistently. And many do not understand the "LL" notation. - ** So we define our own static constants here using nothing - ** larger than a 32-bit integer constant. - */ - static const i64 maxInt = LARGEST_INT64; - static const i64 minInt = SMALLEST_INT64; - - if( r<=(double)minInt ){ - return minInt; - }else if( r>=(double)maxInt ){ - return maxInt; - }else{ - return (i64)r; - } -#endif -} - /* ** Return some kind of integer value which is the best we can do ** at representing the value that *pMem describes as an integer. @@ -80647,7 +82319,7 @@ SQLITE_PRIVATE i64 sqlite3VdbeIntValue(const Mem *pMem){ testcase( flags & MEM_IntReal ); return pMem->u.i; }else if( flags & MEM_Real ){ - return doubleToInt64(pMem->u.r); + return sqlite3RealToI64(pMem->u.r); }else if( (flags & (MEM_Str|MEM_Blob))!=0 && pMem->z!=0 ){ return memIntValue(pMem); }else{ @@ -80696,32 +82368,35 @@ SQLITE_PRIVATE int sqlite3VdbeBooleanValue(Mem *pMem, int ifNull){ } /* -** The MEM structure is already a MEM_Real. Try to also make it a -** MEM_Int if we can. +** The MEM structure is already a MEM_Real or MEM_IntReal. Try to +** make it a MEM_Int if we can. */ SQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem *pMem){ - i64 ix; assert( pMem!=0 ); - assert( pMem->flags & MEM_Real ); + assert( pMem->flags & (MEM_Real|MEM_IntReal) ); assert( !sqlite3VdbeMemIsRowSet(pMem) ); assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) ); assert( EIGHT_BYTE_ALIGNMENT(pMem) ); - ix = doubleToInt64(pMem->u.r); - - /* Only mark the value as an integer if - ** - ** (1) the round-trip conversion real->int->real is a no-op, and - ** (2) The integer is neither the largest nor the smallest - ** possible integer (ticket #3922) - ** - ** The second and third terms in the following conditional enforces - ** the second condition under the assumption that addition overflow causes - ** values to wrap around. - */ - if( pMem->u.r==ix && ix>SMALLEST_INT64 && ixu.i = ix; + if( pMem->flags & MEM_IntReal ){ MemSetTypeFlag(pMem, MEM_Int); + }else{ + i64 ix = sqlite3RealToI64(pMem->u.r); + + /* Only mark the value as an integer if + ** + ** (1) the round-trip conversion real->int->real is a no-op, and + ** (2) The integer is neither the largest nor the smallest + ** possible integer (ticket #3922) + ** + ** The second and third terms in the following conditional enforces + ** the second condition under the assumption that addition overflow causes + ** values to wrap around. + */ + if( pMem->u.r==ix && ix>SMALLEST_INT64 && ixu.i = ix; + MemSetTypeFlag(pMem, MEM_Int); + } } } @@ -80774,8 +82449,8 @@ SQLITE_PRIVATE int sqlite3RealSameAsInt(double r1, sqlite3_int64 i){ ** from UBSAN. */ SQLITE_PRIVATE i64 sqlite3RealToI64(double r){ - if( r<=(double)SMALLEST_INT64 ) return SMALLEST_INT64; - if( r>=(double)LARGEST_INT64) return LARGEST_INT64; + if( r<-9223372036854774784.0 ) return SMALLEST_INT64; + if( r>+9223372036854774784.0 ) return LARGEST_INT64; return (i64)r; } @@ -80846,6 +82521,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemCast(Mem *pMem, u8 aff, u8 encoding){ break; } default: { + int rc; assert( aff==SQLITE_AFF_TEXT ); assert( MEM_Str==(MEM_Blob>>3) ); pMem->flags |= (pMem->flags&MEM_Blob)>>3; @@ -80853,7 +82529,9 @@ SQLITE_PRIVATE int sqlite3VdbeMemCast(Mem *pMem, u8 aff, u8 encoding){ assert( pMem->flags & MEM_Str || pMem->db->mallocFailed ); pMem->flags &= ~(MEM_Int|MEM_Real|MEM_IntReal|MEM_Blob|MEM_Zero); if( encoding!=SQLITE_UTF8 ) pMem->n &= ~1; - return sqlite3VdbeChangeEncoding(pMem, encoding); + rc = sqlite3VdbeChangeEncoding(pMem, encoding); + if( rc ) return rc; + sqlite3VdbeMemZeroTerminateIfAble(pMem); } } return SQLITE_OK; @@ -81377,6 +83055,24 @@ SQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){ return valueToText(pVal, enc); } +/* Return true if sqlit3_value object pVal is a string or blob value +** that uses the destructor specified in the second argument. +** +** TODO: Maybe someday promote this interface into a published API so +** that third-party extensions can get access to it? +*/ +SQLITE_PRIVATE int sqlite3ValueIsOfClass(const sqlite3_value *pVal, void(*xFree)(void*)){ + if( ALWAYS(pVal!=0) + && ALWAYS((pVal->flags & (MEM_Str|MEM_Blob))!=0) + && (pVal->flags & MEM_Dyn)!=0 + && pVal->xDel==xFree + ){ + return 1; + }else{ + return 0; + } +} + /* ** Create a new sqlite3_value object. */ @@ -81444,6 +83140,7 @@ static sqlite3_value *valueNew(sqlite3 *db, struct ValueNewStat4Ctx *p){ } pRec->nField = p->iVal+1; + sqlite3VdbeMemSetNull(&pRec->aMem[p->iVal]); return &pRec->aMem[p->iVal]; } #else @@ -81497,6 +83194,9 @@ static int valueFromFunction( if( pList ) nVal = pList->nExpr; assert( !ExprHasProperty(p, EP_IntValue) ); pFunc = sqlite3FindFunction(db, p->u.zToken, nVal, enc, 0); +#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION + if( pFunc==0 ) return SQLITE_OK; +#endif assert( pFunc ); if( (pFunc->funcFlags & (SQLITE_FUNC_CONSTANT|SQLITE_FUNC_SLOCHNG))==0 || (pFunc->funcFlags & SQLITE_FUNC_NEEDCOLL) @@ -81522,8 +83222,6 @@ static int valueFromFunction( goto value_from_function_out; } - testcase( pCtx->pParse->rc==SQLITE_ERROR ); - testcase( pCtx->pParse->rc==SQLITE_OK ); memset(&ctx, 0, sizeof(ctx)); ctx.pOut = pVal; ctx.pFunc = pFunc; @@ -81536,16 +83234,16 @@ static int valueFromFunction( sqlite3ValueApplyAffinity(pVal, aff, SQLITE_UTF8); assert( rc==SQLITE_OK ); rc = sqlite3VdbeChangeEncoding(pVal, enc); - if( rc==SQLITE_OK && sqlite3VdbeMemTooBig(pVal) ){ + if( NEVER(rc==SQLITE_OK && sqlite3VdbeMemTooBig(pVal)) ){ rc = SQLITE_TOOBIG; pCtx->pParse->nErr++; } } - pCtx->pParse->rc = rc; value_from_function_out: if( rc!=SQLITE_OK ){ pVal = 0; + pCtx->pParse->rc = rc; } if( apVal ){ for(i=0; ipLeft, enc, aff, ppVal, pCtx); testcase( rc!=SQLITE_OK ); if( *ppVal ){ +#ifdef SQLITE_ENABLE_STAT4 + rc = ExpandBlob(*ppVal); +#else + /* zero-blobs only come from functions, not literal values. And + ** functions are only processed under STAT4 */ + assert( (ppVal[0][0].flags & MEM_Zero)==0 ); +#endif sqlite3VdbeMemCast(*ppVal, aff, enc); sqlite3ValueApplyAffinity(*ppVal, affinity, enc); } @@ -82218,10 +83923,41 @@ static int growOpArray(Vdbe *v, int nOp){ */ static void test_addop_breakpoint(int pc, Op *pOp){ static int n = 0; + (void)pc; + (void)pOp; n++; } #endif +/* +** Slow paths for sqlite3VdbeAddOp3() and sqlite3VdbeAddOp4Int() for the +** unusual case when we need to increase the size of the Vdbe.aOp[] array +** before adding the new opcode. +*/ +static SQLITE_NOINLINE int growOp3(Vdbe *p, int op, int p1, int p2, int p3){ + assert( p->nOpAlloc<=p->nOp ); + if( growOpArray(p, 1) ) return 1; + assert( p->nOpAlloc>p->nOp ); + return sqlite3VdbeAddOp3(p, op, p1, p2, p3); +} +static SQLITE_NOINLINE int addOp4IntSlow( + Vdbe *p, /* Add the opcode to this VM */ + int op, /* The new opcode */ + int p1, /* The P1 operand */ + int p2, /* The P2 operand */ + int p3, /* The P3 operand */ + int p4 /* The P4 operand as an integer */ +){ + int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3); + if( p->db->mallocFailed==0 ){ + VdbeOp *pOp = &p->aOp[addr]; + pOp->p4type = P4_INT32; + pOp->p4.i = p4; + } + return addr; +} + + /* ** Add a new instruction to the list of instructions current in the ** VDBE. Return the address of the new instruction. @@ -82232,17 +83968,16 @@ static void test_addop_breakpoint(int pc, Op *pOp){ ** ** op The opcode for this instruction ** -** p1, p2, p3 Operands -** -** Use the sqlite3VdbeResolveLabel() function to fix an address and -** the sqlite3VdbeChangeP4() function to change the value of the P4 -** operand. +** p1, p2, p3, p4 Operands */ -static SQLITE_NOINLINE int growOp3(Vdbe *p, int op, int p1, int p2, int p3){ - assert( p->nOpAlloc<=p->nOp ); - if( growOpArray(p, 1) ) return 1; - assert( p->nOpAlloc>p->nOp ); - return sqlite3VdbeAddOp3(p, op, p1, p2, p3); +SQLITE_PRIVATE int sqlite3VdbeAddOp0(Vdbe *p, int op){ + return sqlite3VdbeAddOp3(p, op, 0, 0, 0); +} +SQLITE_PRIVATE int sqlite3VdbeAddOp1(Vdbe *p, int op, int p1){ + return sqlite3VdbeAddOp3(p, op, p1, 0, 0); +} +SQLITE_PRIVATE int sqlite3VdbeAddOp2(Vdbe *p, int op, int p1, int p2){ + return sqlite3VdbeAddOp3(p, op, p1, p2, 0); } SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe *p, int op, int p1, int p2, int p3){ int i; @@ -82265,32 +84000,78 @@ SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe *p, int op, int p1, int p2, int p3){ pOp->p3 = p3; pOp->p4.p = 0; pOp->p4type = P4_NOTUSED; + + /* Replicate this logic in sqlite3VdbeAddOp4Int() + ** vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv */ #ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS pOp->zComment = 0; #endif +#if defined(SQLITE_ENABLE_STMT_SCANSTATUS) || defined(VDBE_PROFILE) + pOp->nExec = 0; + pOp->nCycle = 0; +#endif #ifdef SQLITE_DEBUG if( p->db->flags & SQLITE_VdbeAddopTrace ){ sqlite3VdbePrintOp(0, i, &p->aOp[i]); test_addop_breakpoint(i, &p->aOp[i]); } #endif -#ifdef VDBE_PROFILE - pOp->cycles = 0; - pOp->cnt = 0; -#endif #ifdef SQLITE_VDBE_COVERAGE pOp->iSrcLine = 0; #endif + /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ** Replicate in sqlite3VdbeAddOp4Int() */ + return i; } -SQLITE_PRIVATE int sqlite3VdbeAddOp0(Vdbe *p, int op){ - return sqlite3VdbeAddOp3(p, op, 0, 0, 0); -} -SQLITE_PRIVATE int sqlite3VdbeAddOp1(Vdbe *p, int op, int p1){ - return sqlite3VdbeAddOp3(p, op, p1, 0, 0); -} -SQLITE_PRIVATE int sqlite3VdbeAddOp2(Vdbe *p, int op, int p1, int p2){ - return sqlite3VdbeAddOp3(p, op, p1, p2, 0); +SQLITE_PRIVATE int sqlite3VdbeAddOp4Int( + Vdbe *p, /* Add the opcode to this VM */ + int op, /* The new opcode */ + int p1, /* The P1 operand */ + int p2, /* The P2 operand */ + int p3, /* The P3 operand */ + int p4 /* The P4 operand as an integer */ +){ + int i; + VdbeOp *pOp; + + i = p->nOp; + if( p->nOpAlloc<=i ){ + return addOp4IntSlow(p, op, p1, p2, p3, p4); + } + p->nOp++; + pOp = &p->aOp[i]; + assert( pOp!=0 ); + pOp->opcode = (u8)op; + pOp->p5 = 0; + pOp->p1 = p1; + pOp->p2 = p2; + pOp->p3 = p3; + pOp->p4.i = p4; + pOp->p4type = P4_INT32; + + /* Replicate this logic in sqlite3VdbeAddOp3() + ** vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv */ +#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS + pOp->zComment = 0; +#endif +#if defined(SQLITE_ENABLE_STMT_SCANSTATUS) || defined(VDBE_PROFILE) + pOp->nExec = 0; + pOp->nCycle = 0; +#endif +#ifdef SQLITE_DEBUG + if( p->db->flags & SQLITE_VdbeAddopTrace ){ + sqlite3VdbePrintOp(0, i, &p->aOp[i]); + test_addop_breakpoint(i, &p->aOp[i]); + } +#endif +#ifdef SQLITE_VDBE_COVERAGE + pOp->iSrcLine = 0; +#endif + /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ** Replicate in sqlite3VdbeAddOp3() */ + + return i; } /* Generate code for an unconditional jump to instruction iDest @@ -82445,11 +84226,12 @@ SQLITE_PRIVATE void sqlite3ExplainBreakpoint(const char *z1, const char *z2){ ** If the bPush flag is true, then make this opcode the parent for ** subsequent Explains until sqlite3VdbeExplainPop() is called. */ -SQLITE_PRIVATE void sqlite3VdbeExplain(Parse *pParse, u8 bPush, const char *zFmt, ...){ -#ifndef SQLITE_DEBUG +SQLITE_PRIVATE int sqlite3VdbeExplain(Parse *pParse, u8 bPush, const char *zFmt, ...){ + int addr = 0; +#if !defined(SQLITE_DEBUG) /* Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. ** But omit them (for performance) during production builds */ - if( pParse->explain==2 ) + if( pParse->explain==2 || IS_STMT_SCANSTATUS(pParse->db) ) #endif { char *zMsg; @@ -82461,13 +84243,15 @@ SQLITE_PRIVATE void sqlite3VdbeExplain(Parse *pParse, u8 bPush, const char *zFmt va_end(ap); v = pParse->pVdbe; iThis = v->nOp; - sqlite3VdbeAddOp4(v, OP_Explain, iThis, pParse->addrExplain, 0, + addr = sqlite3VdbeAddOp4(v, OP_Explain, iThis, pParse->addrExplain, 0, zMsg, P4_DYNAMIC); sqlite3ExplainBreakpoint(bPush?"PUSH":"", sqlite3VdbeGetLastOp(v)->p4.z); if( bPush){ pParse->addrExplain = iThis; } + sqlite3VdbeScanStatus(v, iThis, -1, -1, 0, 0); } + return addr; } /* @@ -82495,26 +84279,6 @@ SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe *p, int iDb, char *zWhere, sqlite3MayAbort(p->pParse); } -/* -** Add an opcode that includes the p4 value as an integer. -*/ -SQLITE_PRIVATE int sqlite3VdbeAddOp4Int( - Vdbe *p, /* Add the opcode to this VM */ - int op, /* The new opcode */ - int p1, /* The P1 operand */ - int p2, /* The P2 operand */ - int p3, /* The P3 operand */ - int p4 /* The P4 operand as an integer */ -){ - int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3); - if( p->db->mallocFailed==0 ){ - VdbeOp *pOp = &p->aOp[addr]; - pOp->p4type = P4_INT32; - pOp->p4.i = p4; - } - return addr; -} - /* Insert the end of a co-routine */ SQLITE_PRIVATE void sqlite3VdbeEndCoroutine(Vdbe *v, int regYield){ @@ -82575,6 +84339,9 @@ static SQLITE_NOINLINE void resizeResolveLabel(Parse *p, Vdbe *v, int j){ int i; for(i=p->nLabelAlloc; iaLabel[i] = -1; #endif + if( nNewSize>=100 && (nNewSize/100)>(p->nLabelAlloc/100) ){ + sqlite3ProgressCheck(p); + } p->nLabelAlloc = nNewSize; p->aLabel[j] = v->nOp; } @@ -82818,11 +84585,13 @@ static void resolveP2Values(Vdbe *p, int *pMaxFuncArgs){ Op *pOp; Parse *pParse = p->pParse; int *aLabel = pParse->aLabel; + + assert( pParse->db->mallocFailed==0 ); /* tag-20230419-1 */ p->readOnly = 1; p->bIsReader = 0; pOp = &p->aOp[p->nOp-1]; assert( p->aOp[0].opcode==OP_Init ); - while( 1 /* Loop termates when it reaches the OP_Init opcode */ ){ + while( 1 /* Loop terminates when it reaches the OP_Init opcode */ ){ /* Only JUMP opcodes and the short list of special opcodes in the switch ** below need to be considered. The mkopcodeh.tcl generator script groups ** all these opcodes together near the front of the opcode list. Skip @@ -82877,6 +84646,7 @@ static void resolveP2Values(Vdbe *p, int *pMaxFuncArgs){ ** have non-negative values for P2. */ assert( (sqlite3OpcodeProperty[pOp->opcode] & OPFLG_JUMP)!=0 ); assert( ADDR(pOp->p2)<-pParse->nLabel ); + assert( aLabel!=0 ); /* True because of tag-20230419-1 */ pOp->p2 = aLabel[ADDR(pOp->p2)]; } break; @@ -83120,20 +84890,83 @@ SQLITE_PRIVATE void sqlite3VdbeScanStatus( LogEst nEst, /* Estimated number of output rows */ const char *zName /* Name of table or index being scanned */ ){ - sqlite3_int64 nByte = (p->nScan+1) * sizeof(ScanStatus); - ScanStatus *aNew; - aNew = (ScanStatus*)sqlite3DbRealloc(p->db, p->aScan, nByte); - if( aNew ){ - ScanStatus *pNew = &aNew[p->nScan++]; - pNew->addrExplain = addrExplain; - pNew->addrLoop = addrLoop; - pNew->addrVisit = addrVisit; - pNew->nEst = nEst; - pNew->zName = sqlite3DbStrDup(p->db, zName); - p->aScan = aNew; + if( IS_STMT_SCANSTATUS(p->db) ){ + sqlite3_int64 nByte = (p->nScan+1) * sizeof(ScanStatus); + ScanStatus *aNew; + aNew = (ScanStatus*)sqlite3DbRealloc(p->db, p->aScan, nByte); + if( aNew ){ + ScanStatus *pNew = &aNew[p->nScan++]; + memset(pNew, 0, sizeof(ScanStatus)); + pNew->addrExplain = addrExplain; + pNew->addrLoop = addrLoop; + pNew->addrVisit = addrVisit; + pNew->nEst = nEst; + pNew->zName = sqlite3DbStrDup(p->db, zName); + p->aScan = aNew; + } } } -#endif + +/* +** Add the range of instructions from addrStart to addrEnd (inclusive) to +** the set of those corresponding to the sqlite3_stmt_scanstatus() counters +** associated with the OP_Explain instruction at addrExplain. The +** sum of the sqlite3Hwtime() values for each of these instructions +** will be returned for SQLITE_SCANSTAT_NCYCLE requests. +*/ +SQLITE_PRIVATE void sqlite3VdbeScanStatusRange( + Vdbe *p, + int addrExplain, + int addrStart, + int addrEnd +){ + if( IS_STMT_SCANSTATUS(p->db) ){ + ScanStatus *pScan = 0; + int ii; + for(ii=p->nScan-1; ii>=0; ii--){ + pScan = &p->aScan[ii]; + if( pScan->addrExplain==addrExplain ) break; + pScan = 0; + } + if( pScan ){ + if( addrEnd<0 ) addrEnd = sqlite3VdbeCurrentAddr(p)-1; + for(ii=0; iiaAddrRange); ii+=2){ + if( pScan->aAddrRange[ii]==0 ){ + pScan->aAddrRange[ii] = addrStart; + pScan->aAddrRange[ii+1] = addrEnd; + break; + } + } + } + } +} + +/* +** Set the addresses for the SQLITE_SCANSTAT_NLOOP and SQLITE_SCANSTAT_NROW +** counters for the query element associated with the OP_Explain at +** addrExplain. +*/ +SQLITE_PRIVATE void sqlite3VdbeScanStatusCounters( + Vdbe *p, + int addrExplain, + int addrLoop, + int addrVisit +){ + if( IS_STMT_SCANSTATUS(p->db) ){ + ScanStatus *pScan = 0; + int ii; + for(ii=p->nScan-1; ii>=0; ii--){ + pScan = &p->aScan[ii]; + if( pScan->addrExplain==addrExplain ) break; + pScan = 0; + } + if( pScan ){ + if( addrLoop>0 ) pScan->addrLoop = addrLoop; + if( addrVisit>0 ) pScan->addrVisit = addrVisit; + } + } +} +#endif /* defined(SQLITE_ENABLE_STMT_SCANSTATUS) */ /* @@ -83212,7 +85045,7 @@ SQLITE_PRIVATE void sqlite3VdbeJumpHereOrPopInst(Vdbe *p, int addr){ /* ** If the input FuncDef structure is ephemeral, then free it. If -** the FuncDef is not ephermal, then do nothing. +** the FuncDef is not ephemeral, then do nothing. */ static void freeEphemeralFunction(sqlite3 *db, FuncDef *pDef){ assert( db!=0 ); @@ -83376,7 +85209,6 @@ SQLITE_PRIVATE void sqlite3VdbeReleaseRegisters( } #endif /* SQLITE_DEBUG */ - /* ** Change the value of the P4 operand for a specific instruction. ** This routine is useful when a large program is loaded from a @@ -83557,7 +85389,7 @@ SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe *p, int addr){ /* Return the most recently added opcode */ -VdbeOp * sqlite3VdbeGetLastOp(Vdbe *p){ +SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetLastOp(Vdbe *p){ return sqlite3VdbeGetOp(p, p->nOp - 1); } @@ -84262,7 +86094,6 @@ SQLITE_PRIVATE int sqlite3VdbeList( ** sqlite3_column_text16(), causing a translation to UTF-16 encoding. */ releaseMemArray(pMem, 8); - p->pResultSet = 0; if( p->rc==SQLITE_NOMEM ){ /* This happens if a malloc() inside a call to sqlite3_column_text() or @@ -84298,7 +86129,7 @@ SQLITE_PRIVATE int sqlite3VdbeList( sqlite3VdbeMemSetInt64(pMem+1, pOp->p2); sqlite3VdbeMemSetInt64(pMem+2, pOp->p3); sqlite3VdbeMemSetStr(pMem+3, zP4, -1, SQLITE_UTF8, sqlite3_free); - p->nResColumn = 4; + assert( p->nResColumn==4 ); }else{ sqlite3VdbeMemSetInt64(pMem+0, i); sqlite3VdbeMemSetStr(pMem+1, (char*)sqlite3OpcodeName(pOp->opcode), @@ -84317,9 +86148,9 @@ SQLITE_PRIVATE int sqlite3VdbeList( sqlite3VdbeMemSetNull(pMem+7); #endif sqlite3VdbeMemSetStr(pMem+5, zP4, -1, SQLITE_UTF8, sqlite3_free); - p->nResColumn = 8; + assert( p->nResColumn==8 ); } - p->pResultSet = pMem; + p->pResultRow = pMem; if( db->mallocFailed ){ p->rc = SQLITE_NOMEM; rc = SQLITE_ERROR; @@ -84430,7 +86261,7 @@ static void *allocSpace( ** running it. */ SQLITE_PRIVATE void sqlite3VdbeRewind(Vdbe *p){ -#if defined(SQLITE_DEBUG) || defined(VDBE_PROFILE) +#if defined(SQLITE_DEBUG) int i; #endif assert( p!=0 ); @@ -84459,8 +86290,8 @@ SQLITE_PRIVATE void sqlite3VdbeRewind(Vdbe *p){ p->nFkConstraint = 0; #ifdef VDBE_PROFILE for(i=0; inOp; i++){ - p->aOp[i].cnt = 0; - p->aOp[i].cycles = 0; + p->aOp[i].nExec = 0; + p->aOp[i].nCycle = 0; } #endif } @@ -84531,26 +86362,9 @@ SQLITE_PRIVATE void sqlite3VdbeMakeReady( resolveP2Values(p, &nArg); p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort); if( pParse->explain ){ - static const char * const azColName[] = { - "addr", "opcode", "p1", "p2", "p3", "p4", "p5", "comment", - "id", "parent", "notused", "detail" - }; - int iFirst, mx, i; if( nMem<10 ) nMem = 10; p->explain = pParse->explain; - if( pParse->explain==2 ){ - sqlite3VdbeSetNumCols(p, 4); - iFirst = 8; - mx = 12; - }else{ - sqlite3VdbeSetNumCols(p, 8); - iFirst = 0; - mx = 8; - } - for(i=iFirst; inResColumn = 12 - 4*p->explain; } p->expired = 0; @@ -84569,9 +86383,6 @@ SQLITE_PRIVATE void sqlite3VdbeMakeReady( p->aVar = allocSpace(&x, 0, nVar*sizeof(Mem)); p->apArg = allocSpace(&x, 0, nArg*sizeof(Mem*)); p->apCsr = allocSpace(&x, 0, nCursor*sizeof(VdbeCursor*)); -#ifdef SQLITE_ENABLE_STMT_SCANSTATUS - p->anExec = allocSpace(&x, 0, p->nOp*sizeof(i64)); -#endif if( x.nNeeded ){ x.pSpace = p->pFree = sqlite3DbMallocRawNN(db, x.nNeeded); x.nFree = x.nNeeded; @@ -84580,9 +86391,6 @@ SQLITE_PRIVATE void sqlite3VdbeMakeReady( p->aVar = allocSpace(&x, p->aVar, nVar*sizeof(Mem)); p->apArg = allocSpace(&x, p->apArg, nArg*sizeof(Mem*)); p->apCsr = allocSpace(&x, p->apCsr, nCursor*sizeof(VdbeCursor*)); -#ifdef SQLITE_ENABLE_STMT_SCANSTATUS - p->anExec = allocSpace(&x, p->anExec, p->nOp*sizeof(i64)); -#endif } } @@ -84597,9 +86405,6 @@ SQLITE_PRIVATE void sqlite3VdbeMakeReady( p->nMem = nMem; initMemArray(p->aMem, nMem, db, MEM_Undefined); memset(p->apCsr, 0, nCursor*sizeof(VdbeCursor*)); -#ifdef SQLITE_ENABLE_STMT_SCANSTATUS - memset(p->anExec, 0, p->nOp*sizeof(i64)); -#endif } sqlite3VdbeRewind(p); } @@ -84611,7 +86416,23 @@ SQLITE_PRIVATE void sqlite3VdbeMakeReady( SQLITE_PRIVATE void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){ if( pCx ) sqlite3VdbeFreeCursorNN(p,pCx); } +static SQLITE_NOINLINE void freeCursorWithCache(Vdbe *p, VdbeCursor *pCx){ + VdbeTxtBlbCache *pCache = pCx->pCache; + assert( pCx->colCache ); + pCx->colCache = 0; + pCx->pCache = 0; + if( pCache->pCValue ){ + sqlite3RCStrUnref(pCache->pCValue); + pCache->pCValue = 0; + } + sqlite3DbFree(p->db, pCache); + sqlite3VdbeFreeCursorNN(p, pCx); +} SQLITE_PRIVATE void sqlite3VdbeFreeCursorNN(Vdbe *p, VdbeCursor *pCx){ + if( pCx->colCache ){ + freeCursorWithCache(p, pCx); + return; + } switch( pCx->eCurType ){ case CURTYPE_SORTER: { sqlite3VdbeSorterClose(p->db, pCx); @@ -84657,9 +86478,6 @@ static void closeCursorsInFrame(Vdbe *p){ SQLITE_PRIVATE int sqlite3VdbeFrameRestore(VdbeFrame *pFrame){ Vdbe *v = pFrame->v; closeCursorsInFrame(v); -#ifdef SQLITE_ENABLE_STMT_SCANSTATUS - v->anExec = pFrame->anExec; -#endif v->aOp = pFrame->aOp; v->nOp = pFrame->nOp; v->aMem = pFrame->aMem; @@ -84715,12 +86533,12 @@ SQLITE_PRIVATE void sqlite3VdbeSetNumCols(Vdbe *p, int nResColumn){ int n; sqlite3 *db = p->db; - if( p->nResColumn ){ - releaseMemArray(p->aColName, p->nResColumn*COLNAME_N); + if( p->nResAlloc ){ + releaseMemArray(p->aColName, p->nResAlloc*COLNAME_N); sqlite3DbFree(db, p->aColName); } n = nResColumn*COLNAME_N; - p->nResColumn = (u16)nResColumn; + p->nResColumn = p->nResAlloc = (u16)nResColumn; p->aColName = (Mem*)sqlite3DbMallocRawNN(db, sizeof(Mem)*n ); if( p->aColName==0 ) return; initMemArray(p->aColName, n, db, MEM_Null); @@ -84745,14 +86563,14 @@ SQLITE_PRIVATE int sqlite3VdbeSetColName( ){ int rc; Mem *pColName; - assert( idxnResColumn ); + assert( idxnResAlloc ); assert( vardb->mallocFailed ){ assert( !zName || xDel!=SQLITE_DYNAMIC ); return SQLITE_NOMEM_BKPT; } assert( p->aColName!=0 ); - pColName = &(p->aColName[idx+var*p->nResColumn]); + pColName = &(p->aColName[idx+var*p->nResAlloc]); rc = sqlite3VdbeMemSetStr(pColName, zName, -1, SQLITE_UTF8, xDel); assert( rc!=0 || !zName || (pColName->flags&MEM_Term)!=0 ); return rc; @@ -85265,6 +87083,7 @@ SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){ sqlite3VdbeLeave(p); return SQLITE_BUSY; }else if( rc!=SQLITE_OK ){ + sqlite3SystemError(db, rc); p->rc = rc; sqlite3RollbackAll(db, SQLITE_OK); p->nChange = 0; @@ -85274,6 +87093,8 @@ SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){ db->flags &= ~(u64)SQLITE_DeferFKs; sqlite3CommitInternalChanges(db); } + }else if( p->rc==SQLITE_SCHEMA && db->nVdbeActive>1 ){ + p->nChange = 0; }else{ sqlite3RollbackAll(db, SQLITE_OK); p->nChange = 0; @@ -85463,7 +87284,7 @@ SQLITE_PRIVATE int sqlite3VdbeReset(Vdbe *p){ sqlite3DbFree(db, p->zErrMsg); p->zErrMsg = 0; } - p->pResultSet = 0; + p->pResultRow = 0; #ifdef SQLITE_DEBUG p->nWrite = 0; #endif @@ -85491,10 +87312,12 @@ SQLITE_PRIVATE int sqlite3VdbeReset(Vdbe *p){ } for(i=0; inOp; i++){ char zHdr[100]; + i64 cnt = p->aOp[i].nExec; + i64 cycles = p->aOp[i].nCycle; sqlite3_snprintf(sizeof(zHdr), zHdr, "%6u %12llu %8llu ", - p->aOp[i].cnt, - p->aOp[i].cycles, - p->aOp[i].cnt>0 ? p->aOp[i].cycles/p->aOp[i].cnt : 0 + cnt, + cycles, + cnt>0 ? cycles/cnt : 0 ); fprintf(out, "%s", zHdr); sqlite3VdbePrintOp(out, i, &p->aOp[i]); @@ -85572,7 +87395,7 @@ static void sqlite3VdbeClearObject(sqlite3 *db, Vdbe *p){ assert( db!=0 ); assert( p->db==0 || p->db==db ); if( p->aColName ){ - releaseMemArray(p->aColName, p->nResColumn*COLNAME_N); + releaseMemArray(p->aColName, p->nResAlloc*COLNAME_N); sqlite3DbNNFreeNN(db, p->aColName); } for(pSub=p->pProgram; pSub; pSub=pNext){ @@ -85590,9 +87413,9 @@ static void sqlite3VdbeClearObject(sqlite3 *db, Vdbe *p){ #ifdef SQLITE_ENABLE_NORMALIZE sqlite3DbFree(db, p->zNormSql); { - DblquoteStr *pThis, *pNext; - for(pThis=p->pDblStr; pThis; pThis=pNext){ - pNext = pThis->pNextStr; + DblquoteStr *pThis, *pNxt; + for(pThis=p->pDblStr; pThis; pThis=pNxt){ + pNxt = pThis->pNextStr; sqlite3DbFree(db, pThis); } } @@ -86172,6 +87995,15 @@ static int vdbeRecordCompareDebug( if( d1+(u64)serial_type1+2>(u64)nKey1 && d1+(u64)sqlite3VdbeSerialTypeLen(serial_type1)>(u64)nKey1 ){ + if( serial_type1>=1 + && serial_type1<=7 + && d1+(u64)sqlite3VdbeSerialTypeLen(serial_type1)<=(u64)nKey1+8 + && CORRUPT_DB + ){ + return 1; /* corrupt record not detected by + ** sqlite3VdbeRecordCompareWithSkip(). Return true + ** to avoid firing the assert() */ + } break; } @@ -86615,7 +88447,7 @@ SQLITE_PRIVATE int sqlite3VdbeRecordCompareWithSkip( /* Serial types 12 or greater are strings and blobs (greater than ** numbers). Types 10 and 11 are currently "reserved for future ** use", so it doesn't really matter what the results of comparing - ** them to numberic values are. */ + ** them to numeric values are. */ rc = serial_type==10 ? -1 : +1; }else if( serial_type==0 ){ rc = -1; @@ -87219,6 +89051,20 @@ SQLITE_PRIVATE int sqlite3NotPureFunc(sqlite3_context *pCtx){ return 1; } +#if defined(SQLITE_ENABLE_CURSOR_HINTS) && defined(SQLITE_DEBUG) +/* +** This Walker callback is used to help verify that calls to +** sqlite3BtreeCursorHint() with opcode BTREE_HINT_RANGE have +** byte-code register values correctly initialized. +*/ +SQLITE_PRIVATE int sqlite3CursorRangeHintExprCheck(Walker *pWalker, Expr *pExpr){ + if( pExpr->op==TK_REGISTER ){ + assert( (pWalker->u.aMem[pExpr->iTable].flags & MEM_Undefined)==0 ); + } + return WRC_Continue; +} +#endif /* SQLITE_ENABLE_CURSOR_HINTS && SQLITE_DEBUG */ + #ifndef SQLITE_OMIT_VIRTUALTABLE /* ** Transfer error message text from an sqlite3_vtab.zErrMsg (text stored @@ -87281,6 +89127,16 @@ SQLITE_PRIVATE void sqlite3VdbePreUpdateHook( PreUpdate preupdate; const char *zTbl = pTab->zName; static const u8 fakeSortOrder = 0; +#ifdef SQLITE_DEBUG + int nRealCol; + if( pTab->tabFlags & TF_WithoutRowid ){ + nRealCol = sqlite3PrimaryKeyIndex(pTab)->nColumn; + }else if( pTab->tabFlags & TF_HasVirtual ){ + nRealCol = pTab->nNVCol; + }else{ + nRealCol = pTab->nCol; + } +#endif assert( db->pPreUpdate==0 ); memset(&preupdate, 0, sizeof(PreUpdate)); @@ -87297,8 +89153,8 @@ SQLITE_PRIVATE void sqlite3VdbePreUpdateHook( assert( pCsr!=0 ); assert( pCsr->eCurType==CURTYPE_BTREE ); - assert( pCsr->nField==pTab->nCol - || (pCsr->nField==pTab->nCol+1 && op==SQLITE_DELETE && iReg==-1) + assert( pCsr->nField==nRealCol + || (pCsr->nField==nRealCol+1 && op==SQLITE_DELETE && iReg==-1) ); preupdate.v = v; @@ -87349,6 +89205,7 @@ SQLITE_PRIVATE void sqlite3VdbePreUpdateHook( */ /* #include "sqliteInt.h" */ /* #include "vdbeInt.h" */ +/* #include "opcodes.h" */ #ifndef SQLITE_OMIT_DEPRECATED /* @@ -87604,7 +89461,7 @@ SQLITE_API int sqlite3_value_type(sqlite3_value* pVal){ SQLITE_NULL, /* 0x1f (not possible) */ SQLITE_FLOAT, /* 0x20 INTREAL */ SQLITE_NULL, /* 0x21 (not possible) */ - SQLITE_TEXT, /* 0x22 INTREAL + TEXT */ + SQLITE_FLOAT, /* 0x22 INTREAL + TEXT */ SQLITE_NULL, /* 0x23 (not possible) */ SQLITE_FLOAT, /* 0x24 (not possible) */ SQLITE_NULL, /* 0x25 (not possible) */ @@ -87839,11 +89696,15 @@ SQLITE_API void sqlite3_result_text64( ){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); assert( xDel!=SQLITE_DYNAMIC ); - if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE; + if( enc!=SQLITE_UTF8 ){ + if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE; + n &= ~(u64)1; + } if( n>0x7fffffff ){ (void)invokeValueDestructor(z, xDel, pCtx); }else{ setResultStrOrError(pCtx, z, (int)n, enc, xDel); + sqlite3VdbeMemZeroTerminateIfAble(pCtx->pOut); } } #ifndef SQLITE_OMIT_UTF16 @@ -87854,7 +89715,7 @@ SQLITE_API void sqlite3_result_text16( void (*xDel)(void *) ){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); - setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel); + setResultStrOrError(pCtx, z, n & ~(u64)1, SQLITE_UTF16NATIVE, xDel); } SQLITE_API void sqlite3_result_text16be( sqlite3_context *pCtx, @@ -87863,7 +89724,7 @@ SQLITE_API void sqlite3_result_text16be( void (*xDel)(void *) ){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); - setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel); + setResultStrOrError(pCtx, z, n & ~(u64)1, SQLITE_UTF16BE, xDel); } SQLITE_API void sqlite3_result_text16le( sqlite3_context *pCtx, @@ -87872,7 +89733,7 @@ SQLITE_API void sqlite3_result_text16le( void (*xDel)(void *) ){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); - setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel); + setResultStrOrError(pCtx, z, n & ~(u64)1, SQLITE_UTF16LE, xDel); } #endif /* SQLITE_OMIT_UTF16 */ SQLITE_API void sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){ @@ -88083,7 +89944,7 @@ static int sqlite3Step(Vdbe *p){ /* If the statement completed successfully, invoke the profile callback */ checkProfileCallback(db, p); #endif - + p->pResultRow = 0; if( rc==SQLITE_DONE && db->autoCommit ){ assert( p->rc==SQLITE_OK ); p->rc = doWalCallbacks(db); @@ -88212,6 +90073,17 @@ SQLITE_API int sqlite3_vtab_nochange(sqlite3_context *p){ return sqlite3_value_nochange(p->pOut); } +/* +** The destructor function for a ValueList object. This needs to be +** a separate function, unknowable to the application, to ensure that +** calls to sqlite3_vtab_in_first()/sqlite3_vtab_in_next() that are not +** preceded by activation of IN processing via sqlite3_vtab_int() do not +** try to access a fake ValueList object inserted by a hostile extension. +*/ +SQLITE_PRIVATE void sqlite3VdbeValueListFree(void *pToDelete){ + sqlite3_free(pToDelete); +} + /* ** Implementation of sqlite3_vtab_in_first() (if bNext==0) and ** sqlite3_vtab_in_next() (if bNext!=0). @@ -88226,8 +90098,15 @@ static int valueFromValueList( *ppOut = 0; if( pVal==0 ) return SQLITE_MISUSE; - pRhs = (ValueList*)sqlite3_value_pointer(pVal, "ValueList"); - if( pRhs==0 ) return SQLITE_MISUSE; + if( (pVal->flags & MEM_Dyn)==0 || pVal->xDel!=sqlite3VdbeValueListFree ){ + return SQLITE_ERROR; + }else{ + assert( (pVal->flags&(MEM_TypeMask|MEM_Term|MEM_Subtype)) == + (MEM_Null|MEM_Term|MEM_Subtype) ); + assert( pVal->eSubtype=='p' ); + assert( pVal->u.zPType!=0 && strcmp(pVal->u.zPType,"ValueList")==0 ); + pRhs = (ValueList*)pVal->z; + } if( bNext ){ rc = sqlite3BtreeNext(pRhs->pCsr, 0); }else{ @@ -88438,7 +90317,8 @@ SQLITE_API int sqlite3_aggregate_count(sqlite3_context *p){ */ SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt){ Vdbe *pVm = (Vdbe *)pStmt; - return pVm ? pVm->nResColumn : 0; + if( pVm==0 ) return 0; + return pVm->nResColumn; } /* @@ -88447,7 +90327,7 @@ SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt){ */ SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt){ Vdbe *pVm = (Vdbe *)pStmt; - if( pVm==0 || pVm->pResultSet==0 ) return 0; + if( pVm==0 || pVm->pResultRow==0 ) return 0; return pVm->nResColumn; } @@ -88502,8 +90382,8 @@ static Mem *columnMem(sqlite3_stmt *pStmt, int i){ if( pVm==0 ) return (Mem*)columnNullValue(); assert( pVm->db ); sqlite3_mutex_enter(pVm->db->mutex); - if( pVm->pResultSet!=0 && inResColumn && i>=0 ){ - pOut = &pVm->pResultSet[i]; + if( pVm->pResultRow!=0 && inResColumn && i>=0 ){ + pOut = &pVm->pResultRow[i]; }else{ sqlite3Error(pVm->db, SQLITE_RANGE); pOut = (Mem*)columnNullValue(); @@ -88527,7 +90407,7 @@ static Mem *columnMem(sqlite3_stmt *pStmt, int i){ ** sqlite3_column_real() ** sqlite3_column_bytes() ** sqlite3_column_bytes16() -** sqiite3_column_blob() +** sqlite3_column_blob() */ static void columnMallocFailure(sqlite3_stmt *pStmt) { @@ -88611,6 +90491,32 @@ SQLITE_API int sqlite3_column_type(sqlite3_stmt *pStmt, int i){ return iType; } +/* +** Column names appropriate for EXPLAIN or EXPLAIN QUERY PLAN. +*/ +static const char * const azExplainColNames8[] = { + "addr", "opcode", "p1", "p2", "p3", "p4", "p5", "comment", /* EXPLAIN */ + "id", "parent", "notused", "detail" /* EQP */ +}; +static const u16 azExplainColNames16data[] = { + /* 0 */ 'a', 'd', 'd', 'r', 0, + /* 5 */ 'o', 'p', 'c', 'o', 'd', 'e', 0, + /* 12 */ 'p', '1', 0, + /* 15 */ 'p', '2', 0, + /* 18 */ 'p', '3', 0, + /* 21 */ 'p', '4', 0, + /* 24 */ 'p', '5', 0, + /* 27 */ 'c', 'o', 'm', 'm', 'e', 'n', 't', 0, + /* 35 */ 'i', 'd', 0, + /* 38 */ 'p', 'a', 'r', 'e', 'n', 't', 0, + /* 45 */ 'n', 'o', 't', 'u', 's', 'e', 'd', 0, + /* 53 */ 'd', 'e', 't', 'a', 'i', 'l', 0 +}; +static const u8 iExplainColNames16[] = { + 0, 5, 12, 15, 18, 21, 24, 27, + 35, 38, 45, 53 +}; + /* ** Convert the N-th element of pStmt->pColName[] into a string using ** xFunc() then return that string. If N is out of range, return 0. @@ -88643,15 +90549,29 @@ static const void *columnName( return 0; } #endif + if( N<0 ) return 0; ret = 0; p = (Vdbe *)pStmt; db = p->db; assert( db!=0 ); - n = sqlite3_column_count(pStmt); - if( N=0 ){ + sqlite3_mutex_enter(db->mutex); + + if( p->explain ){ + if( useType>0 ) goto columnName_end; + n = p->explain==1 ? 8 : 4; + if( N>=n ) goto columnName_end; + if( useUtf16 ){ + int i = iExplainColNames16[N + 8*p->explain - 8]; + ret = (void*)&azExplainColNames16data[i]; + }else{ + ret = (void*)azExplainColNames8[N + 8*p->explain - 8]; + } + goto columnName_end; + } + n = p->nResColumn; + if( NmallocFailed; N += useType*n; - sqlite3_mutex_enter(db->mutex); - assert( db->mallocFailed==0 ); #ifndef SQLITE_OMIT_UTF16 if( useUtf16 ){ ret = sqlite3_value_text16((sqlite3_value*)&p->aColName[N]); @@ -88663,12 +90583,14 @@ static const void *columnName( /* A malloc may have failed inside of the _text() call. If this ** is the case, clear the mallocFailed flag and return NULL. */ - if( db->mallocFailed ){ + assert( db->mallocFailed==0 || db->mallocFailed==1 ); + if( db->mallocFailed > prior_mallocFailed ){ sqlite3OomClear(db); ret = 0; } - sqlite3_mutex_leave(db->mutex); } +columnName_end: + sqlite3_mutex_leave(db->mutex); return ret; } @@ -88761,7 +90683,7 @@ SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){ /* ** Unbind the value bound to variable i in virtual machine p. This is the ** the same as binding a NULL value to the column. If the "i" parameter is -** out of range, then SQLITE_RANGE is returned. Othewise SQLITE_OK. +** out of range, then SQLITE_RANGE is returned. Otherwise SQLITE_OK. ** ** A successful evaluation of this routine acquires the mutex on p. ** the mutex is released if any kind of error occurs. @@ -88937,7 +90859,10 @@ SQLITE_API int sqlite3_bind_text64( unsigned char enc ){ assert( xDel!=SQLITE_DYNAMIC ); - if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE; + if( enc!=SQLITE_UTF8 ){ + if( enc==SQLITE_UTF16 ) enc = SQLITE_UTF16NATIVE; + nData &= ~(u16)1; + } return bindText(pStmt, i, zData, nData, xDel, enc); } #ifndef SQLITE_OMIT_UTF16 @@ -88945,10 +90870,10 @@ SQLITE_API int sqlite3_bind_text16( sqlite3_stmt *pStmt, int i, const void *zData, - int nData, + int n, void (*xDel)(void*) ){ - return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE); + return bindText(pStmt, i, zData, n & ~(u64)1, xDel, SQLITE_UTF16NATIVE); } #endif /* SQLITE_OMIT_UTF16 */ SQLITE_API int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){ @@ -89122,6 +91047,39 @@ SQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt){ return pStmt ? ((Vdbe*)pStmt)->explain : 0; } +/* +** Set the explain mode for a statement. +*/ +SQLITE_API int sqlite3_stmt_explain(sqlite3_stmt *pStmt, int eMode){ + Vdbe *v = (Vdbe*)pStmt; + int rc; + sqlite3_mutex_enter(v->db->mutex); + if( ((int)v->explain)==eMode ){ + rc = SQLITE_OK; + }else if( eMode<0 || eMode>2 ){ + rc = SQLITE_ERROR; + }else if( (v->prepFlags & SQLITE_PREPARE_SAVESQL)==0 ){ + rc = SQLITE_ERROR; + }else if( v->eVdbeState!=VDBE_READY_STATE ){ + rc = SQLITE_BUSY; + }else if( v->nMem>=10 && (eMode!=2 || v->haveEqpOps) ){ + /* No reprepare necessary */ + v->explain = eMode; + rc = SQLITE_OK; + }else{ + v->explain = eMode; + rc = sqlite3Reprepare(v); + v->haveEqpOps = eMode==2; + } + if( v->explain ){ + v->nResColumn = 12 - 4*v->explain; + }else{ + v->nResColumn = v->nResAlloc; + } + sqlite3_mutex_leave(v->db->mutex); + return rc; +} + /* ** Return true if the prepared statement is in need of being reset. */ @@ -89439,23 +91397,69 @@ SQLITE_API int sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppVa /* ** Return status data for a single loop within query pStmt. */ -SQLITE_API int sqlite3_stmt_scanstatus( +SQLITE_API int sqlite3_stmt_scanstatus_v2( sqlite3_stmt *pStmt, /* Prepared statement being queried */ - int idx, /* Index of loop to report on */ + int iScan, /* Index of loop to report on */ int iScanStatusOp, /* Which metric to return */ + int flags, void *pOut /* OUT: Write the answer here */ ){ Vdbe *p = (Vdbe*)pStmt; - ScanStatus *pScan; - if( idx<0 || idx>=p->nScan ) return 1; - pScan = &p->aScan[idx]; + VdbeOp *aOp = p->aOp; + int nOp = p->nOp; + ScanStatus *pScan = 0; + int idx; + + if( p->pFrame ){ + VdbeFrame *pFrame; + for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent); + aOp = pFrame->aOp; + nOp = pFrame->nOp; + } + + if( iScan<0 ){ + int ii; + if( iScanStatusOp==SQLITE_SCANSTAT_NCYCLE ){ + i64 res = 0; + for(ii=0; iiaScan[idx]; + }else{ + /* If the COMPLEX flag is clear, then this function must ignore any + ** ScanStatus structures with ScanStatus.addrLoop set to 0. */ + for(idx=0; idxnScan; idx++){ + pScan = &p->aScan[idx]; + if( pScan->zName ){ + iScan--; + if( iScan<0 ) break; + } + } + } + if( idx>=p->nScan ) return 1; + switch( iScanStatusOp ){ case SQLITE_SCANSTAT_NLOOP: { - *(sqlite3_int64*)pOut = p->anExec[pScan->addrLoop]; + if( pScan->addrLoop>0 ){ + *(sqlite3_int64*)pOut = aOp[pScan->addrLoop].nExec; + }else{ + *(sqlite3_int64*)pOut = -1; + } break; } case SQLITE_SCANSTAT_NVISIT: { - *(sqlite3_int64*)pOut = p->anExec[pScan->addrVisit]; + if( pScan->addrVisit>0 ){ + *(sqlite3_int64*)pOut = aOp[pScan->addrVisit].nExec; + }else{ + *(sqlite3_int64*)pOut = -1; + } break; } case SQLITE_SCANSTAT_EST: { @@ -89474,7 +91478,7 @@ SQLITE_API int sqlite3_stmt_scanstatus( } case SQLITE_SCANSTAT_EXPLAIN: { if( pScan->addrExplain ){ - *(const char**)pOut = p->aOp[ pScan->addrExplain ].p4.z; + *(const char**)pOut = aOp[ pScan->addrExplain ].p4.z; }else{ *(const char**)pOut = 0; } @@ -89482,12 +91486,51 @@ SQLITE_API int sqlite3_stmt_scanstatus( } case SQLITE_SCANSTAT_SELECTID: { if( pScan->addrExplain ){ - *(int*)pOut = p->aOp[ pScan->addrExplain ].p1; + *(int*)pOut = aOp[ pScan->addrExplain ].p1; }else{ *(int*)pOut = -1; } break; } + case SQLITE_SCANSTAT_PARENTID: { + if( pScan->addrExplain ){ + *(int*)pOut = aOp[ pScan->addrExplain ].p2; + }else{ + *(int*)pOut = -1; + } + break; + } + case SQLITE_SCANSTAT_NCYCLE: { + i64 res = 0; + if( pScan->aAddrRange[0]==0 ){ + res = -1; + }else{ + int ii; + for(ii=0; iiaAddrRange); ii+=2){ + int iIns = pScan->aAddrRange[ii]; + int iEnd = pScan->aAddrRange[ii+1]; + if( iIns==0 ) break; + if( iIns>0 ){ + while( iIns<=iEnd ){ + res += aOp[iIns].nCycle; + iIns++; + } + }else{ + int iOp; + for(iOp=0; iOpp1!=iEnd ) continue; + if( (sqlite3OpcodeProperty[pOp->opcode] & OPFLG_NCYCLE)==0 ){ + continue; + } + res += aOp[iOp].nCycle; + } + } + } + } + *(i64*)pOut = res; + break; + } default: { return 1; } @@ -89495,12 +91538,29 @@ SQLITE_API int sqlite3_stmt_scanstatus( return 0; } +/* +** Return status data for a single loop within query pStmt. +*/ +SQLITE_API int sqlite3_stmt_scanstatus( + sqlite3_stmt *pStmt, /* Prepared statement being queried */ + int iScan, /* Index of loop to report on */ + int iScanStatusOp, /* Which metric to return */ + void *pOut /* OUT: Write the answer here */ +){ + return sqlite3_stmt_scanstatus_v2(pStmt, iScan, iScanStatusOp, 0, pOut); +} + /* ** Zero all counters associated with the sqlite3_stmt_scanstatus() data. */ SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt){ Vdbe *p = (Vdbe*)pStmt; - memset(p->anExec, 0, p->nOp * sizeof(i64)); + int ii; + for(ii=0; iinOp; ii++){ + Op *pOp = &p->aOp[ii]; + pOp->nExec = 0; + pOp->nCycle = 0; + } } #endif /* SQLITE_ENABLE_STMT_SCANSTATUS */ @@ -89836,6 +91896,9 @@ SQLITE_API int sqlite3_found_count = 0; */ static void test_trace_breakpoint(int pc, Op *pOp, Vdbe *v){ static int n = 0; + (void)pc; + (void)pOp; + (void)v; n++; } #endif @@ -90074,6 +92137,10 @@ static void applyNumericAffinity(Mem *pRec, int bTryForInt){ ** always preferred, even if the affinity is REAL, because ** an integer representation is more space efficient on disk. ** +** SQLITE_AFF_FLEXNUM: +** If the value is text, then try to convert it into a number of +** some kind (integer or real) but do not make any other changes. +** ** SQLITE_AFF_TEXT: ** Convert pRec to a text representation. ** @@ -90088,11 +92155,11 @@ static void applyAffinity( ){ if( affinity>=SQLITE_AFF_NUMERIC ){ assert( affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL - || affinity==SQLITE_AFF_NUMERIC ); + || affinity==SQLITE_AFF_NUMERIC || affinity==SQLITE_AFF_FLEXNUM ); if( (pRec->flags & MEM_Int)==0 ){ /*OPTIMIZATION-IF-FALSE*/ - if( (pRec->flags & MEM_Real)==0 ){ + if( (pRec->flags & (MEM_Real|MEM_IntReal))==0 ){ if( pRec->flags & MEM_Str ) applyNumericAffinity(pRec,1); - }else{ + }else if( affinity<=SQLITE_AFF_REAL ){ sqlite3VdbeIntegerAffinity(pRec); } } @@ -90252,6 +92319,9 @@ SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, StrAccum *pStr){ sqlite3_str_appendchar(pStr, 1, (c>=0x20&&c<=0x7f) ? c : '.'); } sqlite3_str_appendf(pStr, "]%s", encnames[pMem->enc]); + if( f & MEM_Term ){ + sqlite3_str_appendf(pStr, "(0-term)"); + } } } #endif @@ -90320,17 +92390,6 @@ SQLITE_PRIVATE void sqlite3VdbeRegisterDump(Vdbe *v){ # define REGISTER_TRACE(R,M) #endif - -#ifdef VDBE_PROFILE - -/* -** hwtime.h contains inline assembler code for implementing -** high-performance timing routines. -*/ -/* #include "hwtime.h" */ - -#endif - #ifndef NDEBUG /* ** This function is only called from within an assert() expression. It @@ -90390,13 +92449,102 @@ static u64 filterHash(const Mem *aMem, const Op *pOp){ }else if( p->flags & MEM_Real ){ h += sqlite3VdbeIntValue(p); }else if( p->flags & (MEM_Str|MEM_Blob) ){ - h += p->n; - if( p->flags & MEM_Zero ) h += p->u.nZero; + /* All strings have the same hash and all blobs have the same hash, + ** though, at least, those hashes are different from each other and + ** from NULL. */ + h += 4093 + (p->flags & (MEM_Str|MEM_Blob)); } } return h; } + +/* +** For OP_Column, factor out the case where content is loaded from +** overflow pages, so that the code to implement this case is separate +** the common case where all content fits on the page. Factoring out +** the code reduces register pressure and helps the common case +** to run faster. +*/ +static SQLITE_NOINLINE int vdbeColumnFromOverflow( + VdbeCursor *pC, /* The BTree cursor from which we are reading */ + int iCol, /* The column to read */ + int t, /* The serial-type code for the column value */ + i64 iOffset, /* Offset to the start of the content value */ + u32 cacheStatus, /* Current Vdbe.cacheCtr value */ + u32 colCacheCtr, /* Current value of the column cache counter */ + Mem *pDest /* Store the value into this register. */ +){ + int rc; + sqlite3 *db = pDest->db; + int encoding = pDest->enc; + int len = sqlite3VdbeSerialTypeLen(t); + assert( pC->eCurType==CURTYPE_BTREE ); + if( len>db->aLimit[SQLITE_LIMIT_LENGTH] ) return SQLITE_TOOBIG; + if( len > 4000 && pC->pKeyInfo==0 ){ + /* Cache large column values that are on overflow pages using + ** an RCStr (reference counted string) so that if they are reloaded, + ** that do not have to be copied a second time. The overhead of + ** creating and managing the cache is such that this is only + ** profitable for larger TEXT and BLOB values. + ** + ** Only do this on table-btrees so that writes to index-btrees do not + ** need to clear the cache. This buys performance in the common case + ** in exchange for generality. + */ + VdbeTxtBlbCache *pCache; + char *pBuf; + if( pC->colCache==0 ){ + pC->pCache = sqlite3DbMallocZero(db, sizeof(VdbeTxtBlbCache) ); + if( pC->pCache==0 ) return SQLITE_NOMEM; + pC->colCache = 1; + } + pCache = pC->pCache; + if( pCache->pCValue==0 + || pCache->iCol!=iCol + || pCache->cacheStatus!=cacheStatus + || pCache->colCacheCtr!=colCacheCtr + || pCache->iOffset!=sqlite3BtreeOffset(pC->uc.pCursor) + ){ + if( pCache->pCValue ) sqlite3RCStrUnref(pCache->pCValue); + pBuf = pCache->pCValue = sqlite3RCStrNew( len+3 ); + if( pBuf==0 ) return SQLITE_NOMEM; + rc = sqlite3BtreePayload(pC->uc.pCursor, iOffset, len, pBuf); + if( rc ) return rc; + pBuf[len] = 0; + pBuf[len+1] = 0; + pBuf[len+2] = 0; + pCache->iCol = iCol; + pCache->cacheStatus = cacheStatus; + pCache->colCacheCtr = colCacheCtr; + pCache->iOffset = sqlite3BtreeOffset(pC->uc.pCursor); + }else{ + pBuf = pCache->pCValue; + } + assert( t>=12 ); + sqlite3RCStrRef(pBuf); + if( t&1 ){ + rc = sqlite3VdbeMemSetStr(pDest, pBuf, len, encoding, + (void(*)(void*))sqlite3RCStrUnref); + pDest->flags |= MEM_Term; + }else{ + rc = sqlite3VdbeMemSetStr(pDest, pBuf, len, 0, + (void(*)(void*))sqlite3RCStrUnref); + } + }else{ + rc = sqlite3VdbeMemFromBtree(pC->uc.pCursor, iOffset, len, pDest); + if( rc ) return rc; + sqlite3VdbeSerialGet((const u8*)pDest->z, t, pDest); + if( (t&1)!=0 && encoding==SQLITE_UTF8 ){ + pDest->z[len] = 0; + pDest->flags |= MEM_Term; + } + } + pDest->flags &= ~MEM_Ephem; + return rc; +} + + /* ** Return the symbolic name for the data type of a pMem */ @@ -90420,11 +92568,10 @@ SQLITE_PRIVATE int sqlite3VdbeExec( ){ Op *aOp = p->aOp; /* Copy of p->aOp */ Op *pOp = aOp; /* Current operation */ -#if defined(SQLITE_DEBUG) || defined(VDBE_PROFILE) - Op *pOrigOp; /* Value of pOp at the top of the loop */ -#endif #ifdef SQLITE_DEBUG + Op *pOrigOp; /* Value of pOp at the top of the loop */ int nExtraDelete = 0; /* Verifies FORDELETE and AUXDELETE flags */ + u8 iCompareIsInit = 0; /* iCompare is initialized */ #endif int rc = SQLITE_OK; /* Value to return */ sqlite3 *db = p->db; /* The database */ @@ -90440,13 +92587,17 @@ SQLITE_PRIVATE int sqlite3VdbeExec( Mem *pIn2 = 0; /* 2nd input operand */ Mem *pIn3 = 0; /* 3rd input operand */ Mem *pOut = 0; /* Output operand */ -#ifdef VDBE_PROFILE - u64 start; /* CPU clock count at start of opcode */ + u32 colCacheCtr = 0; /* Column cache counter */ +#if defined(SQLITE_ENABLE_STMT_SCANSTATUS) || defined(VDBE_PROFILE) + u64 *pnCycle = 0; + int bStmtScanStatus = IS_STMT_SCANSTATUS(db)!=0; #endif /*** INSERT STACK UNION HERE ***/ assert( p->eVdbeState==VDBE_RUN_STATE ); /* sqlite3_step() verifies this */ - sqlite3VdbeEnter(p); + if( DbMaskNonZero(p->lockMask) ){ + sqlite3VdbeEnter(p); + } #ifndef SQLITE_OMIT_PROGRESS_CALLBACK if( db->xProgress ){ u32 iPrior = p->aCounter[SQLITE_STMTSTATUS_VM_STEP]; @@ -90467,7 +92618,6 @@ SQLITE_PRIVATE int sqlite3VdbeExec( assert( p->bIsReader || p->readOnly!=0 ); p->iCurrentTime = 0; assert( p->explain==0 ); - p->pResultSet = 0; db->busyHandler.nBusy = 0; if( AtomicLoad(&db->u1.isInterrupted) ) goto abort_due_to_interrupt; sqlite3VdbeIOTraceSql(p); @@ -90504,12 +92654,18 @@ SQLITE_PRIVATE int sqlite3VdbeExec( assert( rc==SQLITE_OK ); assert( pOp>=aOp && pOp<&aOp[p->nOp]); -#ifdef VDBE_PROFILE - start = sqlite3NProfileCnt ? sqlite3NProfileCnt : sqlite3Hwtime(); -#endif nVmStep++; -#ifdef SQLITE_ENABLE_STMT_SCANSTATUS - if( p->anExec ) p->anExec[(int)(pOp-aOp)]++; + +#if defined(VDBE_PROFILE) + pOp->nExec++; + pnCycle = &pOp->nCycle; + if( sqlite3NProfileCnt==0 ) *pnCycle -= sqlite3Hwtime(); +#elif defined(SQLITE_ENABLE_STMT_SCANSTATUS) + if( bStmtScanStatus ){ + pOp->nExec++; + pnCycle = &pOp->nCycle; + *pnCycle -= sqlite3Hwtime(); + } #endif /* Only allow tracing if SQLITE_DEBUG is defined. @@ -90571,7 +92727,7 @@ SQLITE_PRIVATE int sqlite3VdbeExec( } } #endif -#if defined(SQLITE_DEBUG) || defined(VDBE_PROFILE) +#ifdef SQLITE_DEBUG pOrigOp = pOp; #endif @@ -90627,8 +92783,8 @@ SQLITE_PRIVATE int sqlite3VdbeExec( case OP_Goto: { /* jump */ #ifdef SQLITE_DEBUG - /* In debuggging mode, when the p5 flags is set on an OP_Goto, that - ** means we should really jump back to the preceeding OP_ReleaseReg + /* In debugging mode, when the p5 flags is set on an OP_Goto, that + ** means we should really jump back to the preceding OP_ReleaseReg ** instruction. */ if( pOp->p5 ){ assert( pOp->p2 < (int)(pOp - aOp) ); @@ -90836,7 +92992,7 @@ case OP_HaltIfNull: { /* in3 */ ** P5 is a value between 0 and 4, inclusive, that modifies the P4 string. ** ** 0: (no change) -** 1: NOT NULL contraint failed: P4 +** 1: NOT NULL constraint failed: P4 ** 2: UNIQUE constraint failed: P4 ** 3: CHECK constraint failed: P4 ** 4: FOREIGN KEY constraint failed: P4 @@ -90855,6 +93011,12 @@ case OP_Halt: { #ifdef SQLITE_DEBUG if( pOp->p2==OE_Abort ){ sqlite3VdbeAssertAbortable(p); } #endif + + /* A deliberately coded "OP_Halt SQLITE_INTERNAL * * * *" opcode indicates + ** something is wrong with the code generator. Raise an assertion in order + ** to bring this to the attention of fuzzers and other testing tools. */ + assert( pOp->p1!=SQLITE_INTERNAL ); + if( p->pFrame && pOp->p1==SQLITE_OK ){ /* Halt the sub-program. Return control to the parent frame. */ pFrame = p->pFrame; @@ -91296,10 +93458,10 @@ case OP_ResultRow: { assert( pOp->p1+pOp->p2<=(p->nMem+1 - p->nCursor)+1 ); p->cacheCtr = (p->cacheCtr + 2)|1; - p->pResultSet = &aMem[pOp->p1]; + p->pResultRow = &aMem[pOp->p1]; #ifdef SQLITE_DEBUG { - Mem *pMem = p->pResultSet; + Mem *pMem = p->pResultRow; int i; for(i=0; ip2; i++){ assert( memIsValid(&pMem[i]) ); @@ -91829,7 +93991,6 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ flags1 = pIn1->flags; flags3 = pIn3->flags; if( (flags1 & flags3 & MEM_Int)!=0 ){ - assert( (pOp->p5 & SQLITE_AFF_MASK)!=SQLITE_AFF_TEXT || CORRUPT_DB ); /* Common case of comparison of two integers */ if( pIn3->u.i > pIn1->u.i ){ if( sqlite3aGTb[pOp->opcode] ){ @@ -91837,18 +93998,21 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ goto jump_to_p2; } iCompare = +1; + VVA_ONLY( iCompareIsInit = 1; ) }else if( pIn3->u.i < pIn1->u.i ){ if( sqlite3aLTb[pOp->opcode] ){ VdbeBranchTaken(1, (pOp->p5 & SQLITE_NULLEQ)?2:3); goto jump_to_p2; } iCompare = -1; + VVA_ONLY( iCompareIsInit = 1; ) }else{ if( sqlite3aEQb[pOp->opcode] ){ VdbeBranchTaken(1, (pOp->p5 & SQLITE_NULLEQ)?2:3); goto jump_to_p2; } iCompare = 0; + VVA_ONLY( iCompareIsInit = 1; ) } VdbeBranchTaken(0, (pOp->p5 & SQLITE_NULLEQ)?2:3); break; @@ -91880,6 +94044,7 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ goto jump_to_p2; } iCompare = 1; /* Operands are not equal */ + VVA_ONLY( iCompareIsInit = 1; ) break; } }else{ @@ -91890,14 +94055,14 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ if( (flags1 | flags3)&MEM_Str ){ if( (flags1 & (MEM_Int|MEM_IntReal|MEM_Real|MEM_Str))==MEM_Str ){ applyNumericAffinity(pIn1,0); - testcase( flags3==pIn3->flags ); + assert( flags3==pIn3->flags || CORRUPT_DB ); flags3 = pIn3->flags; } if( (flags3 & (MEM_Int|MEM_IntReal|MEM_Real|MEM_Str))==MEM_Str ){ applyNumericAffinity(pIn3,0); } } - }else if( affinity==SQLITE_AFF_TEXT ){ + }else if( affinity==SQLITE_AFF_TEXT && ((flags1 | flags3) & MEM_Str)!=0 ){ if( (flags1 & MEM_Str)==0 && (flags1&(MEM_Int|MEM_Real|MEM_IntReal))!=0 ){ testcase( pIn1->flags & MEM_Int ); testcase( pIn1->flags & MEM_Real ); @@ -91905,7 +94070,7 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ sqlite3VdbeMemStringify(pIn1, encoding, 1); testcase( (flags1&MEM_Dyn) != (pIn1->flags&MEM_Dyn) ); flags1 = (pIn1->flags & ~MEM_TypeMask) | (flags1 & MEM_TypeMask); - if( pIn1==pIn3 ) flags3 = flags1 | MEM_Str; + if( NEVER(pIn1==pIn3) ) flags3 = flags1 | MEM_Str; } if( (flags3 & MEM_Str)==0 && (flags3&(MEM_Int|MEM_Real|MEM_IntReal))!=0 ){ testcase( pIn3->flags & MEM_Int ); @@ -91936,6 +94101,7 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ res2 = sqlite3aGTb[pOp->opcode]; } iCompare = res; + VVA_ONLY( iCompareIsInit = 1; ) /* Undo any changes made by applyAffinity() to the input registers. */ assert( (pIn3->flags & MEM_Dyn) == (flags3 & MEM_Dyn) ); @@ -91957,10 +94123,10 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ ** opcodes are allowed to occur between this instruction and the previous ** OP_Lt or OP_Gt. ** -** If result of an OP_Eq comparison on the same two operands as the -** prior OP_Lt or OP_Gt would have been true, then jump to P2. -** If the result of an OP_Eq comparison on the two previous -** operands would have been false or NULL, then fall through. +** If the result of an OP_Eq comparison on the same two operands as +** the prior OP_Lt or OP_Gt would have been true, then jump to P2. If +** the result of an OP_Eq comparison on the two previous operands +** would have been false or NULL, then fall through. */ case OP_ElseEq: { /* same as TK_ESCAPE, jump */ @@ -91974,6 +94140,7 @@ case OP_ElseEq: { /* same as TK_ESCAPE, jump */ break; } #endif /* SQLITE_DEBUG */ + assert( iCompareIsInit ); VdbeBranchTaken(iCompare==0, 2); if( iCompare==0 ) goto jump_to_p2; break; @@ -92068,6 +94235,7 @@ case OP_Compare: { pColl = pKeyInfo->aColl[i]; bRev = (pKeyInfo->aSortFlags[i] & KEYINFO_ORDER_DESC); iCompare = sqlite3MemCompare(&aMem[p1+idx], &aMem[p2+idx], pColl); + VVA_ONLY( iCompareIsInit = 1; ) if( iCompare ){ if( (pKeyInfo->aSortFlags[i] & KEYINFO_ORDER_BIGNULL) && ((aMem[p1+idx].flags & MEM_Null) || (aMem[p2+idx].flags & MEM_Null)) @@ -92085,13 +94253,14 @@ case OP_Compare: { /* Opcode: Jump P1 P2 P3 * * ** ** Jump to the instruction at address P1, P2, or P3 depending on whether -** in the most recent OP_Compare instruction the P1 vector was less than +** in the most recent OP_Compare instruction the P1 vector was less than, ** equal to, or greater than the P2 vector, respectively. ** ** This opcode must immediately follow an OP_Compare opcode. */ case OP_Jump: { /* jump */ assert( pOp>aOp && pOp[-1].opcode==OP_Compare ); + assert( iCompareIsInit ); if( iCompare<0 ){ VdbeBranchTaken(0,4); pOp = &aOp[pOp->p1 - 1]; }else if( iCompare==0 ){ @@ -92311,6 +94480,12 @@ case OP_IsNull: { /* same as TK_ISNULL, jump, in1 */ ** (0x01) bit. SQLITE_FLOAT is the 0x02 bit. SQLITE_TEXT is 0x04. ** SQLITE_BLOB is 0x08. SQLITE_NULL is 0x10. ** +** WARNING: This opcode does not reliably distinguish between NULL and REAL +** when P1>=0. If the database contains a NaN value, this opcode will think +** that the datatype is REAL when it should be NULL. When P1<0 and the value +** is already stored in register P3, then this opcode does reliably +** distinguish between NULL and REAL. The problem only arises then P1>=0. +** ** Take the jump to address P2 if and only if the datatype of the ** value determined by P1 and P3 corresponds to one of the bits in the ** P5 bitmask. @@ -92381,7 +94556,7 @@ case OP_IsType: { /* jump */ /* Opcode: ZeroOrNull P1 P2 P3 * * ** Synopsis: r[P2] = 0 OR NULL ** -** If all both registers P1 and P3 are NOT NULL, then store a zero in +** If both registers P1 and P3 are NOT NULL, then store a zero in ** register P2. If either registers P1 or P3 are NULL then put ** a NULL in register P2. */ @@ -92424,7 +94599,7 @@ case OP_IfNullRow: { /* jump */ VdbeCursor *pC; assert( pOp->p1>=0 && pOp->p1nCursor ); pC = p->apCsr[pOp->p1]; - if( ALWAYS(pC) && pC->nullRow ){ + if( pC && pC->nullRow ){ sqlite3VdbeMemSetNull(aMem + pOp->p3); goto jump_to_p2; } @@ -92491,7 +94666,7 @@ case OP_Offset: { /* out3 */ ** typeof() function or the IS NULL or IS NOT NULL operators or the ** equivalent. In this case, all content loading can be omitted. */ -case OP_Column: { +case OP_Column: { /* ncycle */ u32 p2; /* column number to retrieve */ VdbeCursor *pC; /* The VDBE cursor */ BtCursor *pCrsr; /* The B-Tree cursor corresponding to pC */ @@ -92735,11 +94910,16 @@ case OP_Column: { pDest->flags = aFlag[t&1]; } }else{ + u8 p5; pDest->enc = encoding; + assert( pDest->db==db ); /* This branch happens only when content is on overflow pages */ - if( ((pOp->p5 & (OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG))!=0 - && ((t>=12 && (t&1)==0) || (pOp->p5 & OPFLAG_TYPEOFARG)!=0)) - || (len = sqlite3VdbeSerialTypeLen(t))==0 + if( ((p5 = (pOp->p5 & OPFLAG_BYTELENARG))!=0 + && (p5==OPFLAG_TYPEOFARG + || (t>=12 && ((t&1)==0 || p5==OPFLAG_BYTELENARG)) + ) + ) + || sqlite3VdbeSerialTypeLen(t)==0 ){ /* Content is irrelevant for ** 1. the typeof() function, @@ -92756,11 +94936,13 @@ case OP_Column: { */ sqlite3VdbeSerialGet((u8*)sqlite3CtypeMap, t, pDest); }else{ - if( len>db->aLimit[SQLITE_LIMIT_LENGTH] ) goto too_big; - rc = sqlite3VdbeMemFromBtree(pC->uc.pCursor, aOffset[p2], len, pDest); - if( rc!=SQLITE_OK ) goto abort_due_to_error; - sqlite3VdbeSerialGet((const u8*)pDest->z, t, pDest); - pDest->flags &= ~MEM_Ephem; + rc = vdbeColumnFromOverflow(pC, p2, t, aOffset[p2], + p->cacheCtr, colCacheCtr, pDest); + if( rc ){ + if( rc==SQLITE_NOMEM ) goto no_mem; + if( rc==SQLITE_TOOBIG ) goto too_big; + goto abort_due_to_error; + } } } @@ -92840,7 +95022,7 @@ case OP_TypeCheck: { } case COLTYPE_REAL: { testcase( (pIn1->flags & (MEM_Real|MEM_IntReal))==MEM_Real ); - testcase( (pIn1->flags & (MEM_Real|MEM_IntReal))==MEM_IntReal ); + assert( (pIn1->flags & MEM_IntReal)==0 ); if( pIn1->flags & MEM_Int ){ /* When applying REAL affinity, if the result is still an MEM_Int ** that will fit in 6 bytes, then change the type to MEM_IntReal @@ -92919,7 +95101,7 @@ case OP_Affinity: { }else{ pIn1->u.r = (double)pIn1->u.i; pIn1->flags |= MEM_Real; - pIn1->flags &= ~MEM_Int; + pIn1->flags &= ~(MEM_Int|MEM_Str); } } REGISTER_TRACE((int)(pIn1-aMem), pIn1); @@ -93843,7 +96025,7 @@ case OP_SetCookie: { ** ** See also: OP_OpenRead, OP_ReopenIdx */ -case OP_ReopenIdx: { +case OP_ReopenIdx: { /* ncycle */ int nField; KeyInfo *pKeyInfo; u32 p2; @@ -93864,7 +96046,7 @@ case OP_ReopenIdx: { } /* If the cursor is not currently open or is open on a different ** index, then fall through into OP_OpenRead to force a reopen */ -case OP_OpenRead: +case OP_OpenRead: /* ncycle */ case OP_OpenWrite: assert( pOp->opcode==OP_OpenWrite || pOp->p5==0 || pOp->p5==OPFLAG_SEEKEQ ); @@ -93958,7 +96140,7 @@ case OP_OpenWrite: ** ** Duplicate ephemeral cursors are used for self-joins of materialized views. */ -case OP_OpenDup: { +case OP_OpenDup: { /* ncycle */ VdbeCursor *pOrig; /* The original cursor to be duplicated */ VdbeCursor *pCx; /* The new cursor */ @@ -94020,8 +96202,8 @@ case OP_OpenDup: { ** by this opcode will be used for automatically created transient ** indices in joins. */ -case OP_OpenAutoindex: -case OP_OpenEphemeral: { +case OP_OpenAutoindex: /* ncycle */ +case OP_OpenEphemeral: { /* ncycle */ VdbeCursor *pCx; KeyInfo *pKeyInfo; @@ -94044,7 +96226,7 @@ case OP_OpenEphemeral: { } pCx = p->apCsr[pOp->p1]; if( pCx && !pCx->noReuse && ALWAYS(pOp->p2<=pCx->nField) ){ - /* If the ephermeral table is already open and has no duplicates from + /* If the ephemeral table is already open and has no duplicates from ** OP_OpenDup, then erase all existing content so that the table is ** empty again, rather than creating a new table. */ assert( pCx->isEphemeral ); @@ -94179,7 +96361,7 @@ case OP_OpenPseudo: { ** Close a cursor previously opened as P1. If P1 is not ** currently open, this instruction is a no-op. */ -case OP_Close: { +case OP_Close: { /* ncycle */ assert( pOp->p1>=0 && pOp->p1nCursor ); sqlite3VdbeFreeCursor(p, p->apCsr[pOp->p1]); p->apCsr[pOp->p1] = 0; @@ -94296,10 +96478,10 @@ case OP_ColumnsUsed: { ** ** See also: Found, NotFound, SeekGt, SeekGe, SeekLt */ -case OP_SeekLT: /* jump, in3, group */ -case OP_SeekLE: /* jump, in3, group */ -case OP_SeekGE: /* jump, in3, group */ -case OP_SeekGT: { /* jump, in3, group */ +case OP_SeekLT: /* jump, in3, group, ncycle */ +case OP_SeekLE: /* jump, in3, group, ncycle */ +case OP_SeekGE: /* jump, in3, group, ncycle */ +case OP_SeekGT: { /* jump, in3, group, ncycle */ int res; /* Comparison result */ int oc; /* Opcode */ VdbeCursor *pC; /* The cursor to seek */ @@ -94535,7 +96717,7 @@ case OP_SeekGT: { /* jump, in3, group */ ** row. If This.P5 is false (0) then a jump is made to SeekGE.P2. If ** This.P5 is true (non-zero) then a jump is made to This.P2. The P5==0 ** case occurs when there are no inequality constraints to the right of -** the IN constraing. The jump to SeekGE.P2 ends the loop. The P5!=0 case +** the IN constraint. The jump to SeekGE.P2 ends the loop. The P5!=0 case ** occurs when there are inequality constraints to the right of the IN ** operator. In that case, the This.P2 will point either directly to or ** to setup code prior to the OP_IdxGT or OP_IdxGE opcode that checks for @@ -94543,7 +96725,7 @@ case OP_SeekGT: { /* jump, in3, group */ ** ** Possible outcomes from this opcode:
      ** -**
    1. If the cursor is initally not pointed to any valid row, then +**
    2. If the cursor is initially not pointed to any valid row, then ** fall through into the subsequent OP_SeekGE opcode. ** **
    3. If the cursor is left pointing to a row that is before the target @@ -94565,7 +96747,7 @@ case OP_SeekGT: { /* jump, in3, group */ ** jump to SeekOP.P2 if This.P5==0 or to This.P2 if This.P5>0. **
    */ -case OP_SeekScan: { +case OP_SeekScan: { /* ncycle */ VdbeCursor *pC; int res; int nStep; @@ -94658,6 +96840,7 @@ case OP_SeekScan: { break; } nStep--; + pC->cacheStatus = CACHE_STALE; rc = sqlite3BtreeNext(pC->uc.pCursor, 0); if( rc ){ if( rc==SQLITE_DONE ){ @@ -94687,7 +96870,7 @@ case OP_SeekScan: { ** ** P1 must be a valid b-tree cursor. */ -case OP_SeekHit: { +case OP_SeekHit: { /* ncycle */ VdbeCursor *pC; assert( pOp->p1>=0 && pOp->p1nCursor ); pC = p->apCsr[pOp->p1]; @@ -94774,13 +96957,13 @@ case OP_IfNotOpen: { /* jump */ ** operands to OP_NotFound and OP_IdxGT. ** ** This opcode is an optimization attempt only. If this opcode always -** falls through, the correct answer is still obtained, but extra works +** falls through, the correct answer is still obtained, but extra work ** is performed. ** ** A value of N in the seekHit flag of cursor P1 means that there exists ** a key P3:N that will match some record in the index. We want to know ** if it is possible for a record P3:P4 to match some record in the -** index. If it is not possible, we can skips some work. So if seekHit +** index. If it is not possible, we can skip some work. So if seekHit ** is less than P4, attempt to find out if a match is possible by running ** OP_NotFound. ** @@ -94819,7 +97002,7 @@ case OP_IfNotOpen: { /* jump */ ** ** See also: NotFound, Found, NotExists */ -case OP_IfNoHope: { /* jump, in3 */ +case OP_IfNoHope: { /* jump, in3, ncycle */ VdbeCursor *pC; assert( pOp->p1>=0 && pOp->p1nCursor ); pC = p->apCsr[pOp->p1]; @@ -94833,9 +97016,9 @@ case OP_IfNoHope: { /* jump, in3 */ /* Fall through into OP_NotFound */ /* no break */ deliberate_fall_through } -case OP_NoConflict: /* jump, in3 */ -case OP_NotFound: /* jump, in3 */ -case OP_Found: { /* jump, in3 */ +case OP_NoConflict: /* jump, in3, ncycle */ +case OP_NotFound: /* jump, in3, ncycle */ +case OP_Found: { /* jump, in3, ncycle */ int alreadyExists; int ii; VdbeCursor *pC; @@ -94965,7 +97148,7 @@ case OP_Found: { /* jump, in3 */ ** ** See also: Found, NotFound, NoConflict, SeekRowid */ -case OP_SeekRowid: { /* jump, in3 */ +case OP_SeekRowid: { /* jump, in3, ncycle */ VdbeCursor *pC; BtCursor *pCrsr; int res; @@ -94990,7 +97173,7 @@ case OP_SeekRowid: { /* jump, in3 */ } /* Fall through into OP_NotExists */ /* no break */ deliberate_fall_through -case OP_NotExists: /* jump, in3 */ +case OP_NotExists: /* jump, in3, ncycle */ pIn3 = &aMem[pOp->p3]; assert( (pIn3->flags & MEM_Int)!=0 || pOp->opcode==OP_SeekRowid ); assert( pOp->p1>=0 && pOp->p1nCursor ); @@ -95270,8 +97453,11 @@ case OP_Insert: { if( pOp->p5 & OPFLAG_ISNOOP ) break; #endif - if( pOp->p5 & OPFLAG_NCHANGE ) p->nChange++; - if( pOp->p5 & OPFLAG_LASTROWID ) db->lastRowid = x.nKey; + assert( (pOp->p5 & OPFLAG_LASTROWID)==0 || (pOp->p5 & OPFLAG_NCHANGE)!=0 ); + if( pOp->p5 & OPFLAG_NCHANGE ){ + p->nChange++; + if( pOp->p5 & OPFLAG_LASTROWID ) db->lastRowid = x.nKey; + } assert( (pData->flags & (MEM_Blob|MEM_Str))!=0 || pData->n==0 ); x.pData = pData->z; x.nData = pData->n; @@ -95282,12 +97468,14 @@ case OP_Insert: { x.nZero = 0; } x.pKey = 0; + assert( BTREE_PREFORMAT==OPFLAG_PREFORMAT ); rc = sqlite3BtreeInsert(pC->uc.pCursor, &x, (pOp->p5 & (OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT)), seekResult ); pC->deferredMoveto = 0; pC->cacheStatus = CACHE_STALE; + colCacheCtr++; /* Invoke the update-hook if required. */ if( rc ) goto abort_due_to_error; @@ -95341,10 +97529,10 @@ case OP_RowCell: { ** left in an undefined state. ** ** If the OPFLAG_AUXDELETE bit is set on P5, that indicates that this -** delete one of several associated with deleting a table row and all its -** associated index entries. Exactly one of those deletes is the "primary" -** delete. The others are all on OPFLAG_FORDELETE cursors or else are -** marked with the AUXDELETE flag. +** delete is one of several associated with deleting a table row and +** all its associated index entries. Exactly one of those deletes is +** the "primary" delete. The others are all on OPFLAG_FORDELETE +** cursors or else are marked with the AUXDELETE flag. ** ** If the OPFLAG_NCHANGE flag of P2 (NB: P2 not P5) is set, then the row ** change count is incremented (otherwise not). @@ -95448,6 +97636,7 @@ case OP_Delete: { rc = sqlite3BtreeDelete(pC->uc.pCursor, pOp->p5); pC->cacheStatus = CACHE_STALE; + colCacheCtr++; pC->seekResult = 0; if( rc ) goto abort_due_to_error; @@ -95515,13 +97704,13 @@ case OP_SorterCompare: { ** Write into register P2 the current sorter data for sorter cursor P1. ** Then clear the column header cache on cursor P3. ** -** This opcode is normally use to move a record out of the sorter and into +** This opcode is normally used to move a record out of the sorter and into ** a register that is the source for a pseudo-table cursor created using ** OpenPseudo. That pseudo-table cursor is the one that is identified by ** parameter P3. Clearing the P3 column cache as part of this opcode saves ** us from having to issue a separate NullRow instruction to clear that cache. */ -case OP_SorterData: { +case OP_SorterData: { /* ncycle */ VdbeCursor *pC; pOut = &aMem[pOp->p2]; @@ -95613,7 +97802,7 @@ case OP_RowData: { ** be a separate OP_VRowid opcode for use with virtual tables, but this ** one opcode now works for both table types. */ -case OP_Rowid: { /* out2 */ +case OP_Rowid: { /* out2, ncycle */ VdbeCursor *pC; i64 v; sqlite3_vtab *pVtab; @@ -95712,8 +97901,8 @@ case OP_NullRow: { ** from the end toward the beginning. In other words, the cursor is ** configured to use Prev, not Next. */ -case OP_SeekEnd: -case OP_Last: { /* jump */ +case OP_SeekEnd: /* ncycle */ +case OP_Last: { /* jump, ncycle */ VdbeCursor *pC; BtCursor *pCrsr; int res; @@ -95796,8 +97985,8 @@ case OP_IfSmaller: { /* jump */ ** regression tests can determine whether or not the optimizer is ** correctly optimizing out sorts. */ -case OP_SorterSort: /* jump */ -case OP_Sort: { /* jump */ +case OP_SorterSort: /* jump ncycle */ +case OP_Sort: { /* jump ncycle */ #ifdef SQLITE_TEST sqlite3_sort_count++; sqlite3_search_count--; @@ -95814,17 +98003,22 @@ case OP_Sort: { /* jump */ ** If the table or index is not empty, fall through to the following ** instruction. ** +** If P2 is zero, that is an assertion that the P1 table is never +** empty and hence the jump will never be taken. +** ** This opcode leaves the cursor configured to move in forward order, ** from the beginning toward the end. In other words, the cursor is ** configured to use Next, not Prev. */ -case OP_Rewind: { /* jump */ +case OP_Rewind: { /* jump, ncycle */ VdbeCursor *pC; BtCursor *pCrsr; int res; assert( pOp->p1>=0 && pOp->p1nCursor ); assert( pOp->p5==0 ); + assert( pOp->p2>=0 && pOp->p2nOp ); + pC = p->apCsr[pOp->p1]; assert( pC!=0 ); assert( isSorter(pC)==(pOp->opcode==OP_SorterSort) ); @@ -95844,9 +98038,10 @@ case OP_Rewind: { /* jump */ } if( rc ) goto abort_due_to_error; pC->nullRow = (u8)res; - assert( pOp->p2>0 && pOp->p2nOp ); - VdbeBranchTaken(res!=0,2); - if( res ) goto jump_to_p2; + if( pOp->p2>0 ){ + VdbeBranchTaken(res!=0,2); + if( res ) goto jump_to_p2; + } break; } @@ -95912,7 +98107,7 @@ case OP_SorterNext: { /* jump */ rc = sqlite3VdbeSorterNext(db, pC); goto next_tail; -case OP_Prev: /* jump */ +case OP_Prev: /* jump, ncycle */ assert( pOp->p1>=0 && pOp->p1nCursor ); assert( pOp->p5==0 || pOp->p5==SQLITE_STMTSTATUS_FULLSCAN_STEP @@ -95927,7 +98122,7 @@ case OP_Prev: /* jump */ rc = sqlite3BtreePrevious(pC->uc.pCursor, pOp->p3); goto next_tail; -case OP_Next: /* jump */ +case OP_Next: /* jump, ncycle */ assert( pOp->p1>=0 && pOp->p1nCursor ); assert( pOp->p5==0 || pOp->p5==SQLITE_STMTSTATUS_FULLSCAN_STEP @@ -96119,8 +98314,8 @@ case OP_IdxDelete: { ** ** See also: Rowid, MakeRecord. */ -case OP_DeferredSeek: -case OP_IdxRowid: { /* out2 */ +case OP_DeferredSeek: /* ncycle */ +case OP_IdxRowid: { /* out2, ncycle */ VdbeCursor *pC; /* The P1 index cursor */ VdbeCursor *pTabCur; /* The P2 table cursor (OP_DeferredSeek only) */ i64 rowid; /* Rowid that P1 current points to */ @@ -96182,8 +98377,8 @@ case OP_IdxRowid: { /* out2 */ ** seek operation now, without further delay. If the cursor seek has ** already occurred, this instruction is a no-op. */ -case OP_FinishSeek: { - VdbeCursor *pC; /* The P1 index cursor */ +case OP_FinishSeek: { /* ncycle */ + VdbeCursor *pC; /* The P1 index cursor */ assert( pOp->p1>=0 && pOp->p1nCursor ); pC = p->apCsr[pOp->p1]; @@ -96238,10 +98433,10 @@ case OP_FinishSeek: { ** If the P1 index entry is less than or equal to the key value then jump ** to P2. Otherwise fall through to the next instruction. */ -case OP_IdxLE: /* jump */ -case OP_IdxGT: /* jump */ -case OP_IdxLT: /* jump */ -case OP_IdxGE: { /* jump */ +case OP_IdxLE: /* jump, ncycle */ +case OP_IdxGT: /* jump, ncycle */ +case OP_IdxLT: /* jump, ncycle */ +case OP_IdxGE: { /* jump, ncycle */ VdbeCursor *pC; int res; UnpackedRecord r; @@ -96318,7 +98513,7 @@ case OP_IdxGE: { /* jump */ ** file is given by P1. ** ** The table being destroyed is in the main database file if P3==0. If -** P3==1 then the table to be clear is in the auxiliary database file +** P3==1 then the table to be destroyed is in the auxiliary database file ** that is used to store tables create using CREATE TEMPORARY TABLE. ** ** If AUTOVACUUM is enabled then it is possible that another root page @@ -96378,8 +98573,8 @@ case OP_Destroy: { /* out2 */ ** in the database file is given by P1. But, unlike Destroy, do not ** remove the table or index from the database file. ** -** The table being clear is in the main database file if P2==0. If -** P2==1 then the table to be clear is in the auxiliary database file +** The table being cleared is in the main database file if P2==0. If +** P2==1 then the table to be cleared is in the auxiliary database file ** that is used to store tables create using CREATE TEMPORARY TABLE. ** ** If the P3 value is non-zero, then the row change count is incremented @@ -96652,13 +98847,14 @@ case OP_IntegrityCk: { pIn1 = &aMem[pOp->p1]; assert( pOp->p5nDb ); assert( DbMaskTest(p->btreeMask, pOp->p5) ); - z = sqlite3BtreeIntegrityCheck(db, db->aDb[pOp->p5].pBt, &aRoot[1], nRoot, - (int)pnErr->u.i+1, &nErr); + rc = sqlite3BtreeIntegrityCheck(db, db->aDb[pOp->p5].pBt, &aRoot[1], nRoot, + (int)pnErr->u.i+1, &nErr, &z); sqlite3VdbeMemSetNull(pIn1); if( nErr==0 ){ assert( z==0 ); - }else if( z==0 ){ - goto no_mem; + }else if( rc ){ + sqlite3_free(z); + goto abort_due_to_error; }else{ pnErr->u.i -= nErr-1; sqlite3VdbeMemSetStr(pIn1, z, -1, SQLITE_UTF8, sqlite3_free); @@ -96862,9 +99058,6 @@ case OP_Program: { /* jump */ pFrame->aOp = p->aOp; pFrame->nOp = p->nOp; pFrame->token = pProgram->token; -#ifdef SQLITE_ENABLE_STMT_SCANSTATUS - pFrame->anExec = p->anExec; -#endif #ifdef SQLITE_DEBUG pFrame->iFrameMagic = SQLITE_FRAME_MAGIC; #endif @@ -96901,9 +99094,6 @@ case OP_Program: { /* jump */ memset(pFrame->aOnce, 0, (pProgram->nOp + 7)/8); p->aOp = aOp = pProgram->aOp; p->nOp = pProgram->nOp; -#ifdef SQLITE_ENABLE_STMT_SCANSTATUS - p->anExec = 0; -#endif #ifdef SQLITE_DEBUG /* Verify that second and subsequent executions of the same trigger do not ** try to reuse register values from the first use. */ @@ -97210,7 +99400,7 @@ case OP_AggStep1: { /* If this function is inside of a trigger, the register array in aMem[] ** might change from one evaluation to the next. The next block of code ** checks to see if the register array has changed, and if so it - ** reinitializes the relavant parts of the sqlite3_context object */ + ** reinitializes the relevant parts of the sqlite3_context object */ if( pCtx->pMem != pMem ){ pCtx->pMem = pMem; for(i=pCtx->argc-1; i>=0; i--) pCtx->argv[i] = &aMem[pOp->p2+i]; @@ -97305,6 +99495,7 @@ case OP_AggFinal: { } sqlite3VdbeChangeEncoding(pMem, encoding); UPDATE_MAX_BLOBSIZE(pMem); + REGISTER_TRACE((int)(pMem-aMem), pMem); break; } @@ -97660,7 +99851,7 @@ case OP_VDestroy: { ** P1 is a cursor number. This opcode opens a cursor to the virtual ** table and stores that cursor in P1. */ -case OP_VOpen: { +case OP_VOpen: { /* ncycle */ VdbeCursor *pCur; sqlite3_vtab_cursor *pVCur; sqlite3_vtab *pVtab; @@ -97707,7 +99898,7 @@ case OP_VOpen: { ** cursor. Register P3 is used to hold the values returned by ** sqlite3_vtab_in_first() and sqlite3_vtab_in_next(). */ -case OP_VInitIn: { /* out2 */ +case OP_VInitIn: { /* out2, ncycle */ VdbeCursor *pC; /* The cursor containing the RHS values */ ValueList *pRhs; /* New ValueList object to put in reg[P2] */ @@ -97718,7 +99909,7 @@ case OP_VInitIn: { /* out2 */ pRhs->pOut = &aMem[pOp->p3]; pOut = out2Prerelease(p, pOp); pOut->flags = MEM_Null; - sqlite3VdbeMemSetPointer(pOut, pRhs, "ValueList", sqlite3_free); + sqlite3VdbeMemSetPointer(pOut, pRhs, "ValueList", sqlite3VdbeValueListFree); break; } #endif /* SQLITE_OMIT_VIRTUALTABLE */ @@ -97744,7 +99935,7 @@ case OP_VInitIn: { /* out2 */ ** ** A jump is made to P2 if the result set after filtering would be empty. */ -case OP_VFilter: { /* jump */ +case OP_VFilter: { /* jump, ncycle */ int nArg; int iQuery; const sqlite3_module *pModule; @@ -97804,7 +99995,7 @@ case OP_VFilter: { /* jump */ ** bits (OPFLAG_LENGTHARG or OPFLAG_TYPEOFARG) but those bits are ** unused by OP_VColumn. */ -case OP_VColumn: { +case OP_VColumn: { /* ncycle */ sqlite3_vtab *pVtab; const sqlite3_module *pModule; Mem *pDest; @@ -97856,7 +100047,7 @@ case OP_VColumn: { ** jump to instruction P2. Or, if the virtual table has reached ** the end of its result set, then fall through to the next instruction. */ -case OP_VNext: { /* jump */ +case OP_VNext: { /* jump, ncycle */ sqlite3_vtab *pVtab; const sqlite3_module *pModule; int res; @@ -98087,7 +100278,7 @@ case OP_MaxPgcnt: { /* out2 */ ** This opcode works exactly like OP_Function. The only difference is in ** its name. This opcode is used in places where the function must be ** purely non-deterministic. Some built-in date/time functions can be -** either determinitic of non-deterministic, depending on their arguments. +** either deterministic of non-deterministic, depending on their arguments. ** When those function are used in a non-deterministic way, they will check ** to see if they were called using OP_PureFunc instead of OP_Function, and ** if they were, they throw an error. @@ -98105,7 +100296,7 @@ case OP_Function: { /* group */ /* If this function is inside of a trigger, the register array in aMem[] ** might change from one evaluation to the next. The next block of code ** checks to see if the register array has changed, and if so it - ** reinitializes the relavant parts of the sqlite3_context object */ + ** reinitializes the relevant parts of the sqlite3_context object */ pOut = &aMem[pOp->p3]; if( pCtx->pOut != pOut ){ pCtx->pVdbe = p; @@ -98181,7 +100372,7 @@ case OP_FilterAdd: { printf("hash: %llu modulo %d -> %u\n", h, pIn1->n, (int)(h%pIn1->n)); } #endif - h %= pIn1->n; + h %= (pIn1->n*8); pIn1->z[h/8] |= 1<<(h&7); break; } @@ -98217,7 +100408,7 @@ case OP_Filter: { /* jump */ printf("hash: %llu modulo %d -> %u\n", h, pIn1->n, (int)(h%pIn1->n)); } #endif - h %= pIn1->n; + h %= (pIn1->n*8); if( (pIn1->z[h/8] & (1<<(h&7)))==0 ){ VdbeBranchTaken(1, 2); p->aCounter[SQLITE_STMTSTATUS_FILTER_HIT]++; @@ -98439,11 +100630,13 @@ default: { /* This is really OP_Noop, OP_Explain */ *****************************************************************************/ } -#ifdef VDBE_PROFILE - { - u64 endTime = sqlite3NProfileCnt ? sqlite3NProfileCnt : sqlite3Hwtime(); - if( endTime>start ) pOrigOp->cycles += endTime - start; - pOrigOp->cnt++; +#if defined(VDBE_PROFILE) + *pnCycle += sqlite3NProfileCnt ? sqlite3NProfileCnt : sqlite3Hwtime(); + pnCycle = 0; +#elif defined(SQLITE_ENABLE_STMT_SCANSTATUS) + if( pnCycle ){ + *pnCycle += sqlite3Hwtime(); + pnCycle = 0; } #endif @@ -98467,7 +100660,7 @@ default: { /* This is really OP_Noop, OP_Explain */ } if( opProperty==0xff ){ /* Never happens. This code exists to avoid a harmless linkage - ** warning aboud sqlite3VdbeRegisterDump() being defined but not + ** warning about sqlite3VdbeRegisterDump() being defined but not ** used. */ sqlite3VdbeRegisterDump(p); } @@ -98520,6 +100713,18 @@ default: { /* This is really OP_Noop, OP_Explain */ ** release the mutexes on btrees that were acquired at the ** top. */ vdbe_return: +#if defined(VDBE_PROFILE) + if( pnCycle ){ + *pnCycle += sqlite3NProfileCnt ? sqlite3NProfileCnt : sqlite3Hwtime(); + pnCycle = 0; + } +#elif defined(SQLITE_ENABLE_STMT_SCANSTATUS) + if( pnCycle ){ + *pnCycle += sqlite3Hwtime(); + pnCycle = 0; + } +#endif + #ifndef SQLITE_OMIT_PROGRESS_CALLBACK while( nVmStep>=nProgressLimit && db->xProgress!=0 ){ nProgressLimit += db->nProgressOps; @@ -98531,7 +100736,9 @@ default: { /* This is really OP_Noop, OP_Explain */ } #endif p->aCounter[SQLITE_STMTSTATUS_VM_STEP] += (int)nVmStep; - sqlite3VdbeLeave(p); + if( DbMaskNonZero(p->lockMask) ){ + sqlite3VdbeLeave(p); + } assert( rc!=SQLITE_OK || nExtraDelete==0 || sqlite3_strlike("DELETE%",p->zSql,0)!=0 ); @@ -98909,7 +101116,7 @@ SQLITE_API int sqlite3_blob_open( if( pBlob && pBlob->pStmt ) sqlite3VdbeFinalize((Vdbe *)pBlob->pStmt); sqlite3DbFree(db, pBlob); } - sqlite3ErrorWithMsg(db, rc, (zErr ? "%s" : 0), zErr); + sqlite3ErrorWithMsg(db, rc, (zErr ? "%s" : (char*)0), zErr); sqlite3DbFree(db, zErr); sqlite3ParseObjectReset(&sParse); rc = sqlite3ApiExit(db, rc); @@ -99068,7 +101275,7 @@ SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){ ((Vdbe*)p->pStmt)->rc = SQLITE_OK; rc = blobSeekToRow(p, iRow, &zErr); if( rc!=SQLITE_OK ){ - sqlite3ErrorWithMsg(db, rc, (zErr ? "%s" : 0), zErr); + sqlite3ErrorWithMsg(db, rc, (zErr ? "%s" : (char*)0), zErr); sqlite3DbFree(db, zErr); } assert( rc!=SQLITE_SCHEMA ); @@ -99171,7 +101378,7 @@ SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){ ** The threshold for the amount of main memory to use before flushing ** records to a PMA is roughly the same as the limit configured for the ** page-cache of the main database. Specifically, the threshold is set to -** the value returned by "PRAGMA main.page_size" multipled by +** the value returned by "PRAGMA main.page_size" multiplied by ** that returned by "PRAGMA main.cache_size", in bytes. ** ** If the sorter is running in single-threaded mode, then all PMAs generated @@ -99194,7 +101401,7 @@ SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){ ** ** If there are fewer than SORTER_MAX_MERGE_COUNT PMAs in total and the ** sorter is running in single-threaded mode, then these PMAs are merged -** incrementally as keys are retreived from the sorter by the VDBE. The +** incrementally as keys are retrieved from the sorter by the VDBE. The ** MergeEngine object, described in further detail below, performs this ** merge. ** @@ -99357,7 +101564,7 @@ struct MergeEngine { ** ** Essentially, this structure contains all those fields of the VdbeSorter ** structure for which each thread requires a separate instance. For example, -** each thread requries its own UnpackedRecord object to unpack records in +** each thread requeries its own UnpackedRecord object to unpack records in ** as part of comparison operations. ** ** Before a background thread is launched, variable bDone is set to 0. Then, @@ -99429,7 +101636,7 @@ struct VdbeSorter { ** PMA, in sorted order. The next key to be read is cached in nKey/aKey. ** aKey might point into aMap or into aBuffer. If neither of those locations ** contain a contiguous representation of the key, then aAlloc is allocated -** and the key is copied into aAlloc and aKey is made to poitn to aAlloc. +** and the key is copied into aAlloc and aKey is made to point to aAlloc. ** ** pFd==0 at EOF. */ @@ -100800,7 +103007,7 @@ static int vdbeSorterFlushPMA(VdbeSorter *pSorter){ ** the background thread from a sub-tasks previous turn is still running, ** skip it. If the first (pSorter->nTask-1) sub-tasks are all still busy, ** fall back to using the final sub-task. The first (pSorter->nTask-1) - ** sub-tasks are prefered as they use background threads - the final + ** sub-tasks are preferred as they use background threads - the final ** sub-task uses the main thread. */ for(i=0; iiPrev + i + 1) % nWorker; @@ -101284,7 +103491,7 @@ static int vdbePmaReaderIncrMergeInit(PmaReader *pReadr, int eMode){ rc = vdbeMergeEngineInit(pTask, pIncr->pMerger, eMode); - /* Set up the required files for pIncr. A multi-theaded IncrMerge object + /* Set up the required files for pIncr. A multi-threaded IncrMerge object ** requires two temp files to itself, whereas a single-threaded object ** only requires a region of pTask->file2. */ if( rc==SQLITE_OK ){ @@ -101924,6 +104131,8 @@ static int bytecodevtabConnect( "p5 INT," "comment TEXT," "subprog TEXT," + "nexec INT," + "ncycle INT," "stmt HIDDEN" ");", @@ -101938,6 +104147,9 @@ static int bytecodevtabConnect( ");" }; + (void)argc; + (void)argv; + (void)pzErr; rc = sqlite3_declare_vtab(db, azSchema[isTabUsed]); if( rc==SQLITE_OK ){ pNew = sqlite3_malloc( sizeof(*pNew) ); @@ -102083,7 +104295,7 @@ static int bytecodevtabColumn( } } } - i += 10; + i += 20; } } switch( i ){ @@ -102133,16 +104345,31 @@ static int bytecodevtabColumn( } break; } - case 10: /* tables_used.type */ + +#ifdef SQLITE_ENABLE_STMT_SCANSTATUS + case 9: /* nexec */ + sqlite3_result_int(ctx, pOp->nExec); + break; + case 10: /* ncycle */ + sqlite3_result_int(ctx, pOp->nCycle); + break; +#else + case 9: /* nexec */ + case 10: /* ncycle */ + sqlite3_result_int(ctx, 0); + break; +#endif + + case 20: /* tables_used.type */ sqlite3_result_text(ctx, pCur->zType, -1, SQLITE_STATIC); break; - case 11: /* tables_used.schema */ + case 21: /* tables_used.schema */ sqlite3_result_text(ctx, pCur->zSchema, -1, SQLITE_STATIC); break; - case 12: /* tables_used.name */ + case 22: /* tables_used.name */ sqlite3_result_text(ctx, pCur->zName, -1, SQLITE_STATIC); break; - case 13: /* tables_used.wr */ + case 23: /* tables_used.wr */ sqlite3_result_int(ctx, pOp->opcode==OP_OpenWrite); break; } @@ -102173,6 +104400,7 @@ static int bytecodevtabFilter( bytecodevtab_cursor *pCur = (bytecodevtab_cursor *)pVtabCursor; bytecodevtab *pVTab = (bytecodevtab *)pVtabCursor->pVtab; int rc = SQLITE_OK; + (void)idxStr; bytecodevtabCursorClear(pCur); pCur->iRowid = 0; @@ -102215,7 +104443,7 @@ static int bytecodevtabBestIndex( int rc = SQLITE_CONSTRAINT; struct sqlite3_index_constraint *p; bytecodevtab *pVTab = (bytecodevtab*)tab; - int iBaseCol = pVTab->bTablesUsed ? 4 : 8; + int iBaseCol = pVTab->bTablesUsed ? 4 : 10; pIdxInfo->estimatedCost = (double)100; pIdxInfo->estimatedRows = 100; pIdxInfo->idxNum = 0; @@ -102786,7 +105014,7 @@ static int walkWindowList(Walker *pWalker, Window *pList, int bOneOnly){ ** The return value from this routine is WRC_Abort to abandon the tree walk ** and WRC_Continue to continue. */ -static SQLITE_NOINLINE int walkExpr(Walker *pWalker, Expr *pExpr){ +SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3WalkExprNN(Walker *pWalker, Expr *pExpr){ int rc; testcase( ExprHasProperty(pExpr, EP_TokenOnly) ); testcase( ExprHasProperty(pExpr, EP_Reduced) ); @@ -102795,7 +105023,9 @@ static SQLITE_NOINLINE int walkExpr(Walker *pWalker, Expr *pExpr){ if( rc ) return rc & WRC_Abort; if( !ExprHasProperty(pExpr,(EP_TokenOnly|EP_Leaf)) ){ assert( pExpr->x.pList==0 || pExpr->pRight==0 ); - if( pExpr->pLeft && walkExpr(pWalker, pExpr->pLeft) ) return WRC_Abort; + if( pExpr->pLeft && sqlite3WalkExprNN(pWalker, pExpr->pLeft) ){ + return WRC_Abort; + } if( pExpr->pRight ){ assert( !ExprHasProperty(pExpr, EP_WinFunc) ); pExpr = pExpr->pRight; @@ -102819,7 +105049,7 @@ static SQLITE_NOINLINE int walkExpr(Walker *pWalker, Expr *pExpr){ return WRC_Continue; } SQLITE_PRIVATE int sqlite3WalkExpr(Walker *pWalker, Expr *pExpr){ - return pExpr ? walkExpr(pWalker,pExpr) : WRC_Continue; + return pExpr ? sqlite3WalkExprNN(pWalker,pExpr) : WRC_Continue; } /* @@ -102945,7 +105175,7 @@ SQLITE_PRIVATE int sqlite3WalkSelect(Walker *pWalker, Select *p){ } /* Increase the walkerDepth when entering a subquery, and -** descrease when leaving the subquery. +** decrease when leaving the subquery. */ SQLITE_PRIVATE int sqlite3WalkerDepthIncrease(Walker *pWalker, Select *pSelect){ UNUSED_PARAMETER(pSelect); @@ -103187,6 +105417,32 @@ static void extendFJMatch( } } +/* +** Return TRUE (non-zero) if zTab is a valid name for the schema table pTab. +*/ +static SQLITE_NOINLINE int isValidSchemaTableName( + const char *zTab, /* Name as it appears in the SQL */ + Table *pTab, /* The schema table we are trying to match */ + Schema *pSchema /* non-NULL if a database qualifier is present */ +){ + const char *zLegacy; + assert( pTab!=0 ); + assert( pTab->tnum==1 ); + if( sqlite3StrNICmp(zTab, "sqlite_", 7)!=0 ) return 0; + zLegacy = pTab->zName; + if( strcmp(zLegacy+7, &LEGACY_TEMP_SCHEMA_TABLE[7])==0 ){ + if( sqlite3StrICmp(zTab+7, &PREFERRED_TEMP_SCHEMA_TABLE[7])==0 ){ + return 1; + } + if( pSchema==0 ) return 0; + if( sqlite3StrICmp(zTab+7, &LEGACY_SCHEMA_TABLE[7])==0 ) return 1; + if( sqlite3StrICmp(zTab+7, &PREFERRED_SCHEMA_TABLE[7])==0 ) return 1; + }else{ + if( sqlite3StrICmp(zTab+7, &PREFERRED_SCHEMA_TABLE[7])==0 ) return 1; + } + return 0; +} + /* ** Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up ** that name in the set of source tables in pSrcList and make the pExpr @@ -103340,15 +105596,17 @@ static int lookupName( } assert( zDb==0 || zTab!=0 ); if( zTab ){ - const char *zTabName; if( zDb ){ if( pTab->pSchema!=pSchema ) continue; if( pSchema==0 && strcmp(zDb,"*")!=0 ) continue; } - zTabName = pItem->zAlias ? pItem->zAlias : pTab->zName; - assert( zTabName!=0 ); - if( sqlite3StrICmp(zTabName, zTab)!=0 ){ - continue; + if( pItem->zAlias!=0 ){ + if( sqlite3StrICmp(zTab, pItem->zAlias)!=0 ){ + continue; + } + }else if( sqlite3StrICmp(zTab, pTab->zName)!=0 ){ + if( pTab->tnum!=1 ) continue; + if( !isValidSchemaTableName(zTab, pTab, pSchema) ) continue; } assert( ExprUseYTab(pExpr) ); if( IN_RENAME_OBJECT && pItem->zAlias ){ @@ -103424,7 +105682,8 @@ static int lookupName( assert( op==TK_DELETE || op==TK_UPDATE || op==TK_INSERT ); if( pParse->bReturning ){ if( (pNC->ncFlags & NC_UBaseReg)!=0 - && (zTab==0 || sqlite3StrICmp(zTab,pParse->pTriggerTab->zName)==0) + && ALWAYS(zTab==0 + || sqlite3StrICmp(zTab,pParse->pTriggerTab->zName)==0) ){ pExpr->iTable = op!=TK_DELETE; pTab = pParse->pTriggerTab; @@ -103491,6 +105750,7 @@ static int lookupName( if( pParse->bReturning ){ eNewExprOp = TK_REGISTER; pExpr->op2 = TK_COLUMN; + pExpr->iColumn = iCol; pExpr->iTable = pNC->uNC.iBaseReg + (pTab->nCol+1)*pExpr->iTable + sqlite3TableColumnToStorage(pTab, iCol) + 1; }else{ @@ -103903,14 +106163,10 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ if( 0==sqlite3ExprCanBeNull(pExpr->pLeft) && !IN_RENAME_OBJECT ){ testcase( ExprHasProperty(pExpr, EP_OuterON) ); assert( !ExprHasProperty(pExpr, EP_IntValue) ); - if( pExpr->op==TK_NOTNULL ){ - pExpr->u.zToken = "true"; - ExprSetProperty(pExpr, EP_IsTrue); - }else{ - pExpr->u.zToken = "false"; - ExprSetProperty(pExpr, EP_IsFalse); - } - pExpr->op = TK_TRUEFALSE; + pExpr->u.iValue = (pExpr->op==TK_NOTNULL); + pExpr->flags |= EP_IntValue; + pExpr->op = TK_INTEGER; + for(i=0, p=pNC; p && ipNext, i++){ p->nRef = anRef[i]; } @@ -104212,8 +106468,8 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ assert( pNC->nRef>=nRef ); if( nRef!=pNC->nRef ){ ExprSetProperty(pExpr, EP_VarSelect); - pNC->ncFlags |= NC_VarSelect; } + pNC->ncFlags |= NC_Subquery; } break; } @@ -104653,7 +106909,7 @@ static int resolveOrderGroupBy( } for(j=0; jpEList->nExpr; j++){ if( sqlite3ExprCompare(0, pE, pSelect->pEList->a[j].pExpr, -1)==0 ){ - /* Since this expresion is being changed into a reference + /* Since this expression is being changed into a reference ** to an identical expression in the result set, remove all Window ** objects belonging to the expression from the Select.pWin list. */ windowRemoveExprFromSelect(pSelect, pE); @@ -104976,7 +107232,8 @@ SQLITE_PRIVATE int sqlite3ResolveExprNames( return SQLITE_ERROR; } #endif - sqlite3WalkExpr(&w, pExpr); + assert( pExpr!=0 ); + sqlite3WalkExprNN(&w, pExpr); #if SQLITE_MAX_EXPR_DEPTH>0 w.pParse->nHeight -= pExpr->nHeight; #endif @@ -105018,7 +107275,7 @@ SQLITE_PRIVATE int sqlite3ResolveExprListNames( return WRC_Abort; } #endif - sqlite3WalkExpr(&w, pExpr); + sqlite3WalkExprNN(&w, pExpr); #if SQLITE_MAX_EXPR_DEPTH>0 w.pParse->nHeight -= pExpr->nHeight; #endif @@ -105040,7 +107297,7 @@ SQLITE_PRIVATE int sqlite3ResolveExprListNames( /* ** Resolve all names in all expressions of a SELECT and in all -** decendents of the SELECT, including compounds off of p->pPrior, +** descendants of the SELECT, including compounds off of p->pPrior, ** subqueries in expressions, and subqueries used as FROM clause ** terms. ** @@ -105167,48 +107424,122 @@ SQLITE_PRIVATE char sqlite3TableColumnAffinity(const Table *pTab, int iCol){ */ SQLITE_PRIVATE char sqlite3ExprAffinity(const Expr *pExpr){ int op; - while( ExprHasProperty(pExpr, EP_Skip|EP_IfNullRow) ){ - assert( pExpr->op==TK_COLLATE - || pExpr->op==TK_IF_NULL_ROW - || (pExpr->op==TK_REGISTER && pExpr->op2==TK_IF_NULL_ROW) ); - pExpr = pExpr->pLeft; - assert( pExpr!=0 ); - } op = pExpr->op; - if( op==TK_REGISTER ) op = pExpr->op2; - if( op==TK_COLUMN || op==TK_AGG_COLUMN ){ - assert( ExprUseYTab(pExpr) ); - assert( pExpr->y.pTab!=0 ); - return sqlite3TableColumnAffinity(pExpr->y.pTab, pExpr->iColumn); - } - if( op==TK_SELECT ){ - assert( ExprUseXSelect(pExpr) ); - assert( pExpr->x.pSelect!=0 ); - assert( pExpr->x.pSelect->pEList!=0 ); - assert( pExpr->x.pSelect->pEList->a[0].pExpr!=0 ); - return sqlite3ExprAffinity(pExpr->x.pSelect->pEList->a[0].pExpr); - } + while( 1 /* exit-by-break */ ){ + if( op==TK_COLUMN || (op==TK_AGG_COLUMN && pExpr->y.pTab!=0) ){ + assert( ExprUseYTab(pExpr) ); + assert( pExpr->y.pTab!=0 ); + return sqlite3TableColumnAffinity(pExpr->y.pTab, pExpr->iColumn); + } + if( op==TK_SELECT ){ + assert( ExprUseXSelect(pExpr) ); + assert( pExpr->x.pSelect!=0 ); + assert( pExpr->x.pSelect->pEList!=0 ); + assert( pExpr->x.pSelect->pEList->a[0].pExpr!=0 ); + return sqlite3ExprAffinity(pExpr->x.pSelect->pEList->a[0].pExpr); + } #ifndef SQLITE_OMIT_CAST - if( op==TK_CAST ){ - assert( !ExprHasProperty(pExpr, EP_IntValue) ); - return sqlite3AffinityType(pExpr->u.zToken, 0); - } + if( op==TK_CAST ){ + assert( !ExprHasProperty(pExpr, EP_IntValue) ); + return sqlite3AffinityType(pExpr->u.zToken, 0); + } #endif - if( op==TK_SELECT_COLUMN ){ - assert( pExpr->pLeft!=0 && ExprUseXSelect(pExpr->pLeft) ); - assert( pExpr->iColumn < pExpr->iTable ); - assert( pExpr->iTable==pExpr->pLeft->x.pSelect->pEList->nExpr ); - return sqlite3ExprAffinity( - pExpr->pLeft->x.pSelect->pEList->a[pExpr->iColumn].pExpr - ); - } - if( op==TK_VECTOR ){ - assert( ExprUseXList(pExpr) ); - return sqlite3ExprAffinity(pExpr->x.pList->a[0].pExpr); + if( op==TK_SELECT_COLUMN ){ + assert( pExpr->pLeft!=0 && ExprUseXSelect(pExpr->pLeft) ); + assert( pExpr->iColumn < pExpr->iTable ); + assert( pExpr->iColumn >= 0 ); + assert( pExpr->iTable==pExpr->pLeft->x.pSelect->pEList->nExpr ); + return sqlite3ExprAffinity( + pExpr->pLeft->x.pSelect->pEList->a[pExpr->iColumn].pExpr + ); + } + if( op==TK_VECTOR ){ + assert( ExprUseXList(pExpr) ); + return sqlite3ExprAffinity(pExpr->x.pList->a[0].pExpr); + } + if( ExprHasProperty(pExpr, EP_Skip|EP_IfNullRow) ){ + assert( pExpr->op==TK_COLLATE + || pExpr->op==TK_IF_NULL_ROW + || (pExpr->op==TK_REGISTER && pExpr->op2==TK_IF_NULL_ROW) ); + pExpr = pExpr->pLeft; + op = pExpr->op; + continue; + } + if( op!=TK_REGISTER || (op = pExpr->op2)==TK_REGISTER ) break; } return pExpr->affExpr; } +/* +** Make a guess at all the possible datatypes of the result that could +** be returned by an expression. Return a bitmask indicating the answer: +** +** 0x01 Numeric +** 0x02 Text +** 0x04 Blob +** +** If the expression must return NULL, then 0x00 is returned. +*/ +SQLITE_PRIVATE int sqlite3ExprDataType(const Expr *pExpr){ + while( pExpr ){ + switch( pExpr->op ){ + case TK_COLLATE: + case TK_IF_NULL_ROW: + case TK_UPLUS: { + pExpr = pExpr->pLeft; + break; + } + case TK_NULL: { + pExpr = 0; + break; + } + case TK_STRING: { + return 0x02; + } + case TK_BLOB: { + return 0x04; + } + case TK_CONCAT: { + return 0x06; + } + case TK_VARIABLE: + case TK_AGG_FUNCTION: + case TK_FUNCTION: { + return 0x07; + } + case TK_COLUMN: + case TK_AGG_COLUMN: + case TK_SELECT: + case TK_CAST: + case TK_SELECT_COLUMN: + case TK_VECTOR: { + int aff = sqlite3ExprAffinity(pExpr); + if( aff>=SQLITE_AFF_NUMERIC ) return 0x05; + if( aff==SQLITE_AFF_TEXT ) return 0x06; + return 0x07; + } + case TK_CASE: { + int res = 0; + int ii; + ExprList *pList = pExpr->x.pList; + assert( ExprUseXList(pExpr) && pList!=0 ); + assert( pList->nExpr > 0); + for(ii=1; iinExpr; ii+=2){ + res |= sqlite3ExprDataType(pList->a[ii].pExpr); + } + if( pList->nExpr % 2 ){ + res |= sqlite3ExprDataType(pList->a[pList->nExpr-1].pExpr); + } + return res; + } + default: { + return 0x01; + } + } /* End of switch(op) */ + } /* End of while(pExpr) */ + return 0x00; +} + /* ** Set the collating sequence for expression pExpr to be the collating ** sequence named by pToken. Return a pointer to a new Expr node that @@ -105296,7 +107627,9 @@ SQLITE_PRIVATE CollSeq *sqlite3ExprCollSeq(Parse *pParse, const Expr *pExpr){ while( p ){ int op = p->op; if( op==TK_REGISTER ) op = p->op2; - if( op==TK_AGG_COLUMN || op==TK_COLUMN || op==TK_TRIGGER ){ + if( (op==TK_AGG_COLUMN && p->y.pTab!=0) + || op==TK_COLUMN || op==TK_TRIGGER + ){ int j; assert( ExprUseYTab(p) ); assert( p->y.pTab!=0 ); @@ -105326,11 +107659,10 @@ SQLITE_PRIVATE CollSeq *sqlite3ExprCollSeq(Parse *pParse, const Expr *pExpr){ }else{ Expr *pNext = p->pRight; /* The Expr.x union is never used at the same time as Expr.pRight */ - assert( ExprUseXList(p) ); - assert( p->x.pList==0 || p->pRight==0 ); - if( p->x.pList!=0 && !db->mallocFailed ){ + assert( !ExprUseXList(p) || p->x.pList==0 || p->pRight==0 ); + if( ExprUseXList(p) && p->x.pList!=0 && !db->mallocFailed ){ int i; - for(i=0; ALWAYS(ix.pList->nExpr); i++){ + for(i=0; ix.pList->nExpr; i++){ if( ExprHasProperty(p->x.pList->a[i].pExpr, EP_Collate) ){ pNext = p->x.pList->a[i].pExpr; break; @@ -105352,7 +107684,7 @@ SQLITE_PRIVATE CollSeq *sqlite3ExprCollSeq(Parse *pParse, const Expr *pExpr){ /* ** Return the collation sequence for the expression pExpr. If ** there is no defined collating sequence, return a pointer to the -** defautl collation sequence. +** default collation sequence. ** ** See also: sqlite3ExprCollSeq() ** @@ -105482,7 +107814,7 @@ SQLITE_PRIVATE CollSeq *sqlite3BinaryCompareCollSeq( return pColl; } -/* Expresssion p is a comparison operator. Return a collation sequence +/* Expression p is a comparison operator. Return a collation sequence ** appropriate for the comparison operator. ** ** This is normally just a wrapper around sqlite3BinaryCompareCollSeq(). @@ -105938,6 +108270,15 @@ SQLITE_PRIVATE void sqlite3ExprSetHeightAndFlags(Parse *pParse, Expr *p){ #define exprSetHeight(y) #endif /* SQLITE_MAX_EXPR_DEPTH>0 */ +/* +** Set the error offset for an Expr node, if possible. +*/ +SQLITE_PRIVATE void sqlite3ExprSetErrorOffset(Expr *pExpr, int iOfst){ + if( pExpr==0 ) return; + if( NEVER(ExprUseWJoin(pExpr)) ) return; + pExpr->w.iOfst = iOfst; +} + /* ** This routine is the core allocator for Expr nodes. ** @@ -106162,9 +108503,9 @@ SQLITE_PRIVATE Select *sqlite3ExprListToValues(Parse *pParse, int nElem, ExprLis ** Join two expressions using an AND operator. If either expression is ** NULL, then just return the other expression. ** -** If one side or the other of the AND is known to be false, then instead -** of returning an AND expression, just return a constant expression with -** a value of false. +** If one side or the other of the AND is known to be false, and neither side +** is part of an ON clause, then instead of returning an AND expression, +** just return a constant expression with a value of false. */ SQLITE_PRIVATE Expr *sqlite3ExprAnd(Parse *pParse, Expr *pLeft, Expr *pRight){ sqlite3 *db = pParse->db; @@ -106172,14 +108513,17 @@ SQLITE_PRIVATE Expr *sqlite3ExprAnd(Parse *pParse, Expr *pLeft, Expr *pRight){ return pRight; }else if( pRight==0 ){ return pLeft; - }else if( (ExprAlwaysFalse(pLeft) || ExprAlwaysFalse(pRight)) - && !IN_RENAME_OBJECT - ){ - sqlite3ExprDeferredDelete(pParse, pLeft); - sqlite3ExprDeferredDelete(pParse, pRight); - return sqlite3Expr(db, TK_INTEGER, "0"); }else{ - return sqlite3PExpr(pParse, TK_AND, pLeft, pRight); + u32 f = pLeft->flags | pRight->flags; + if( (f&(EP_OuterON|EP_InnerON|EP_IsFalse))==EP_IsFalse + && !IN_RENAME_OBJECT + ){ + sqlite3ExprDeferredDelete(pParse, pLeft); + sqlite3ExprDeferredDelete(pParse, pRight); + return sqlite3Expr(db, TK_INTEGER, "0"); + }else{ + return sqlite3PExpr(pParse, TK_AND, pLeft, pRight); + } } } @@ -106395,7 +108739,7 @@ SQLITE_PRIVATE void sqlite3ClearOnOrUsing(sqlite3 *db, OnOrUsing *p){ /* ** Arrange to cause pExpr to be deleted when the pParse is deleted. ** This is similar to sqlite3ExprDelete() except that the delete is -** deferred untilthe pParse is deleted. +** deferred until the pParse is deleted. ** ** The pExpr might be deleted immediately on an OOM error. ** @@ -107237,7 +109581,7 @@ SQLITE_PRIVATE int sqlite3ExprIdToTrueFalse(Expr *pExpr){ ** and 0 if it is FALSE. */ SQLITE_PRIVATE int sqlite3ExprTruthValue(const Expr *pExpr){ - pExpr = sqlite3ExprSkipCollate((Expr*)pExpr); + pExpr = sqlite3ExprSkipCollateAndLikely((Expr*)pExpr); assert( pExpr->op==TK_TRUEFALSE ); assert( !ExprHasProperty(pExpr, EP_IntValue) ); assert( sqlite3StrICmp(pExpr->u.zToken,"true")==0 @@ -107424,12 +109768,17 @@ SQLITE_PRIVATE int sqlite3ExprIsTableConstant(Expr *p, int iCur){ } /* -** Check pExpr to see if it is an invariant constraint on data source pSrc. +** Check pExpr to see if it is an constraint on the single data source +** pSrc = &pSrcList->a[iSrc]. In other words, check to see if pExpr +** constrains pSrc but does not depend on any other tables or data +** sources anywhere else in the query. Return true (non-zero) if pExpr +** is a constraint on pSrc only. +** ** This is an optimization. False negatives will perhaps cause slower ** queries, but false positives will yield incorrect answers. So when in ** doubt, return 0. ** -** To be an invariant constraint, the following must be true: +** To be an single-source constraint, the following must be true: ** ** (1) pExpr cannot refer to any table other than pSrc->iCursor. ** @@ -107440,13 +109789,31 @@ SQLITE_PRIVATE int sqlite3ExprIsTableConstant(Expr *p, int iCur){ ** ** (4) If pSrc is the right operand of a LEFT JOIN, then... ** (4a) pExpr must come from an ON clause.. - (4b) and specifically the ON clause associated with the LEFT JOIN. +** (4b) and specifically the ON clause associated with the LEFT JOIN. ** ** (5) If pSrc is not the right operand of a LEFT JOIN or the left ** operand of a RIGHT JOIN, then pExpr must be from the WHERE ** clause, not an ON clause. +** +** (6) Either: +** +** (6a) pExpr does not originate in an ON or USING clause, or +** +** (6b) The ON or USING clause from which pExpr is derived is +** not to the left of a RIGHT JOIN (or FULL JOIN). +** +** Without this restriction, accepting pExpr as a single-table +** constraint might move the the ON/USING filter expression +** from the left side of a RIGHT JOIN over to the right side, +** which leads to incorrect answers. See also restriction (9) +** on push-down. */ -SQLITE_PRIVATE int sqlite3ExprIsTableConstraint(Expr *pExpr, const SrcItem *pSrc){ +SQLITE_PRIVATE int sqlite3ExprIsSingleTableConstraint( + Expr *pExpr, /* The constraint */ + const SrcList *pSrcList, /* Complete FROM clause */ + int iSrc /* Which element of pSrcList to use */ +){ + const SrcItem *pSrc = &pSrcList->a[iSrc]; if( pSrc->fg.jointype & JT_LTORJ ){ return 0; /* rule (3) */ } @@ -107456,6 +109823,19 @@ SQLITE_PRIVATE int sqlite3ExprIsTableConstraint(Expr *pExpr, const SrcItem *pSrc }else{ if( ExprHasProperty(pExpr, EP_OuterON) ) return 0; /* rule (5) */ } + if( ExprHasProperty(pExpr, EP_OuterON|EP_InnerON) /* (6a) */ + && (pSrcList->a[0].fg.jointype & JT_LTORJ)!=0 /* Fast pre-test of (6b) */ + ){ + int jj; + for(jj=0; jjw.iJoin==pSrcList->a[jj].iCursor ){ + if( (pSrcList->a[jj].fg.jointype & JT_LTORJ)!=0 ){ + return 0; /* restriction (6) */ + } + break; + } + } + } return sqlite3ExprIsTableConstant(pExpr, pSrc->iCursor); /* rules (1), (2) */ } @@ -107698,7 +110078,7 @@ SQLITE_PRIVATE int sqlite3IsRowid(const char *z){ ** pX is the RHS of an IN operator. If pX is a SELECT statement ** that can be simplified to a direct table access, then return ** a pointer to the SELECT statement. If pX is not a SELECT statement, -** or if the SELECT statement needs to be manifested into a transient +** or if the SELECT statement needs to be materialized into a transient ** table, then return NULL. */ #ifndef SQLITE_OMIT_SUBQUERY @@ -107794,7 +110174,7 @@ static int sqlite3InRhsIsConstant(Expr *pIn){ ** IN_INDEX_INDEX_ASC - The cursor was opened on an ascending index. ** IN_INDEX_INDEX_DESC - The cursor was opened on a descending index. ** IN_INDEX_EPH - The cursor was opened on a specially created and -** populated epheremal table. +** populated ephemeral table. ** IN_INDEX_NOOP - No cursor was allocated. The IN operator must be ** implemented as a sequence of comparisons. ** @@ -107807,7 +110187,7 @@ static int sqlite3InRhsIsConstant(Expr *pIn){ ** an ephemeral table might need to be generated from the RHS and then ** pX->iTable made to point to the ephemeral table instead of an ** existing table. In this case, the creation and initialization of the -** ephmeral table might be put inside of a subroutine, the EP_Subrtn flag +** ephemeral table might be put inside of a subroutine, the EP_Subrtn flag ** will be set on pX and the pX->y.sub fields will be set to show where ** the subroutine is coded. ** @@ -107819,12 +110199,12 @@ static int sqlite3InRhsIsConstant(Expr *pIn){ ** ** When IN_INDEX_LOOP is used (and the b-tree will be used to iterate ** through the set members) then the b-tree must not contain duplicates. -** An epheremal table will be created unless the selected columns are guaranteed +** An ephemeral table will be created unless the selected columns are guaranteed ** to be unique - either because it is an INTEGER PRIMARY KEY or due to ** a UNIQUE constraint or index. ** ** When IN_INDEX_MEMBERSHIP is used (and the b-tree will be used -** for fast set membership tests) then an epheremal table must +** for fast set membership tests) then an ephemeral table must ** be used unless is a single INTEGER PRIMARY KEY column or an ** index can be found with the specified as its left-most. ** @@ -107984,7 +110364,6 @@ SQLITE_PRIVATE int sqlite3FindInIndex( CollSeq *pReq = sqlite3BinaryCompareCollSeq(pParse, pLhs, pRhs); int j; - assert( pReq!=0 || pRhs->iColumn==XN_ROWID || pParse->nErr ); for(j=0; jaiColumn[j]!=pRhs->iColumn ) continue; assert( pIdx->azColl[j] ); @@ -108158,7 +110537,7 @@ SQLITE_PRIVATE void sqlite3VectorErrorMsg(Parse *pParse, Expr *pExpr){ ** x IN (SELECT a FROM b) -- IN operator with subquery on the right ** ** The pExpr parameter is the IN operator. The cursor number for the -** constructed ephermeral table is returned. The first time the ephemeral +** constructed ephemeral table is returned. The first time the ephemeral ** table is computed, the cursor number is also stored in pExpr->iTable, ** however the cursor number returned might not be the same, as it might ** have been duplicated using OP_OpenDup. @@ -108378,6 +110757,9 @@ SQLITE_PRIVATE int sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){ SelectDest dest; /* How to deal with SELECT result */ int nReg; /* Registers to allocate */ Expr *pLimit; /* New limit expression */ +#ifdef SQLITE_ENABLE_STMT_SCANSTATUS + int addrExplain; /* Address of OP_Explain instruction */ +#endif Vdbe *v = pParse->pVdbe; assert( v!=0 ); @@ -108430,8 +110812,9 @@ SQLITE_PRIVATE int sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){ ** In both cases, the query is augmented with "LIMIT 1". Any ** preexisting limit is discarded in place of the new LIMIT 1. */ - ExplainQueryPlan((pParse, 1, "%sSCALAR SUBQUERY %d", + ExplainQueryPlan2(addrExplain, (pParse, 1, "%sSCALAR SUBQUERY %d", addrOnce?"":"CORRELATED ", pSel->selId)); + sqlite3VdbeScanStatusCounters(v, addrExplain, addrExplain, -1); nReg = pExpr->op==TK_SELECT ? pSel->pEList->nExpr : 1; sqlite3SelectDestInit(&dest, 0, pParse->nMem+1); pParse->nMem += nReg; @@ -108474,6 +110857,7 @@ SQLITE_PRIVATE int sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){ if( addrOnce ){ sqlite3VdbeJumpHere(v, addrOnce); } + sqlite3VdbeScanStatusRange(v, addrExplain, addrExplain, -1); /* Subroutine return */ assert( ExprUseYSub(pExpr) ); @@ -108882,6 +111266,7 @@ SQLITE_PRIVATE void sqlite3ExprCodeGeneratedColumn( ){ int iAddr; Vdbe *v = pParse->pVdbe; + int nErr = pParse->nErr; assert( v!=0 ); assert( pParse->iSelfTab!=0 ); if( pParse->iSelfTab>0 ){ @@ -108894,6 +111279,7 @@ SQLITE_PRIVATE void sqlite3ExprCodeGeneratedColumn( sqlite3VdbeAddOp4(v, OP_Affinity, regOut, 1, 0, &pCol->affinity, 1); } if( iAddr ) sqlite3VdbeJumpHere(v, iAddr); + if( pParse->nErr>nErr ) pParse->db->errByteOffset = -1; } #endif /* SQLITE_OMIT_GENERATED_COLUMNS */ @@ -108910,6 +111296,7 @@ SQLITE_PRIVATE void sqlite3ExprCodeGetColumnOfTable( Column *pCol; assert( v!=0 ); assert( pTab!=0 ); + assert( iCol!=XN_EXPR ); if( iCol<0 || iCol==pTab->iPKey ){ sqlite3VdbeAddOp2(v, OP_Rowid, iTabCur, regOut); VdbeComment((v, "%s.rowid", pTab->zName)); @@ -108965,10 +111352,13 @@ SQLITE_PRIVATE int sqlite3ExprCodeGetColumn( u8 p5 /* P5 value for OP_Column + FLAGS */ ){ assert( pParse->pVdbe!=0 ); + assert( (p5 & (OPFLAG_NOCHNG|OPFLAG_TYPEOFARG|OPFLAG_LENGTHARG))==p5 ); + assert( IsVirtual(pTab) || (p5 & OPFLAG_NOCHNG)==0 ); sqlite3ExprCodeGetColumnOfTable(pParse->pVdbe, pTab, iTable, iColumn, iReg); if( p5 ){ VdbeOp *pOp = sqlite3VdbeGetLastOp(pParse->pVdbe); if( pOp->opcode==OP_Column ) pOp->p5 = p5; + if( pOp->opcode==OP_VColumn ) pOp->p5 = (p5 & OPFLAG_NOCHNG); } return iReg; } @@ -108997,7 +111387,7 @@ static void exprToRegister(Expr *pExpr, int iReg){ /* ** Evaluate an expression (either a vector or a scalar expression) and store -** the result in continguous temporary registers. Return the index of +** the result in contiguous temporary registers. Return the index of ** the first register used to store the result. ** ** If the returned result register is a temporary scalar, then also write @@ -109037,7 +111427,7 @@ static int exprCodeVector(Parse *pParse, Expr *p, int *piFreeable){ */ static void setDoNotMergeFlagOnCopy(Vdbe *v){ if( sqlite3VdbeGetLastOp(v)->opcode==OP_Copy ){ - sqlite3VdbeChangeP5(v, 1); /* Tag trailing OP_Copy as not mergable */ + sqlite3VdbeChangeP5(v, 1); /* Tag trailing OP_Copy as not mergeable */ } } @@ -109127,13 +111517,13 @@ static int exprCodeInlineFunction( } case INLINEFUNC_implies_nonnull_row: { - /* REsult of sqlite3ExprImpliesNonNullRow() */ + /* Result of sqlite3ExprImpliesNonNullRow() */ Expr *pA1; assert( nFarg==2 ); pA1 = pFarg->a[1].pExpr; if( pA1->op==TK_COLUMN ){ sqlite3VdbeAddOp2(v, OP_Integer, - sqlite3ExprImpliesNonNullRow(pFarg->a[0].pExpr,pA1->iTable), + sqlite3ExprImpliesNonNullRow(pFarg->a[0].pExpr,pA1->iTable,1), target); }else{ sqlite3VdbeAddOp2(v, OP_Null, 0, target); @@ -109146,10 +111536,13 @@ static int exprCodeInlineFunction( ** the type affinity of the argument. This is used for testing of ** the SQLite type logic. */ - const char *azAff[] = { "blob", "text", "numeric", "integer", "real" }; + const char *azAff[] = { "blob", "text", "numeric", "integer", + "real", "flexnum" }; char aff; assert( nFarg==1 ); aff = sqlite3ExprAffinity(pFarg->a[0].pExpr); + assert( aff<=SQLITE_AFF_NONE + || (aff>=SQLITE_AFF_BLOB && aff<=SQLITE_AFF_FLEXNUM) ); sqlite3VdbeLoadString(v, target, (aff<=SQLITE_AFF_NONE) ? "none" : azAff[aff-SQLITE_AFF_BLOB]); break; @@ -109160,7 +111553,7 @@ static int exprCodeInlineFunction( } /* -** Check to see if pExpr is one of the indexed expressions on pParse->pIdxExpr. +** Check to see if pExpr is one of the indexed expressions on pParse->pIdxEpr. ** If it is, then resolve the expression by reading from the index and ** return the register into which the value has been read. If pExpr is ** not an indexed expression, then return negative. @@ -109172,7 +111565,8 @@ static SQLITE_NOINLINE int sqlite3IndexedExprLookup( ){ IndexedExpr *p; Vdbe *v; - for(p=pParse->pIdxExpr; p; p=p->pIENext){ + for(p=pParse->pIdxEpr; p; p=p->pIENext){ + u8 exprAff; int iDataCur = p->iDataCur; if( iDataCur<0 ) continue; if( pParse->iSelfTab ){ @@ -109180,6 +111574,16 @@ static SQLITE_NOINLINE int sqlite3IndexedExprLookup( iDataCur = -1; } if( sqlite3ExprCompare(0, pExpr, p->pExpr, iDataCur)!=0 ) continue; + assert( p->aff>=SQLITE_AFF_BLOB && p->aff<=SQLITE_AFF_NUMERIC ); + exprAff = sqlite3ExprAffinity(pExpr); + if( (exprAff<=SQLITE_AFF_BLOB && p->aff!=SQLITE_AFF_BLOB) + || (exprAff==SQLITE_AFF_TEXT && p->aff!=SQLITE_AFF_TEXT) + || (exprAff>=SQLITE_AFF_NUMERIC && p->aff!=SQLITE_AFF_NUMERIC) + ){ + /* Affinity mismatch on a generated column */ + continue; + } + v = pParse->pVdbe; assert( v!=0 ); if( p->bMaybeNullRow ){ @@ -109192,10 +111596,10 @@ static SQLITE_NOINLINE int sqlite3IndexedExprLookup( sqlite3VdbeAddOp3(v, OP_Column, p->iIdxCur, p->iIdxCol, target); VdbeComment((v, "%s expr-column %d", p->zIdxName, p->iIdxCol)); sqlite3VdbeGoto(v, 0); - p = pParse->pIdxExpr; - pParse->pIdxExpr = 0; + p = pParse->pIdxEpr; + pParse->pIdxEpr = 0; sqlite3ExprCode(pParse, pExpr, target); - pParse->pIdxExpr = p; + pParse->pIdxEpr = p; sqlite3VdbeJumpHere(v, addr+2); }else{ sqlite3VdbeAddOp3(v, OP_Column, p->iIdxCur, p->iIdxCol, target); @@ -109234,7 +111638,7 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) expr_code_doover: if( pExpr==0 ){ op = TK_NULL; - }else if( pParse->pIdxExpr!=0 + }else if( pParse->pIdxEpr!=0 && !ExprHasProperty(pExpr, EP_Leaf) && (r1 = sqlite3IndexedExprLookup(pParse, pExpr, target))>=0 ){ @@ -109248,18 +111652,31 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) AggInfo *pAggInfo = pExpr->pAggInfo; struct AggInfo_col *pCol; assert( pAggInfo!=0 ); - assert( pExpr->iAgg>=0 && pExpr->iAggnColumn ); + assert( pExpr->iAgg>=0 ); + if( pExpr->iAgg>=pAggInfo->nColumn ){ + /* Happens when the left table of a RIGHT JOIN is null and + ** is using an expression index */ + sqlite3VdbeAddOp2(v, OP_Null, 0, target); +#ifdef SQLITE_VDBE_COVERAGE + /* Verify that the OP_Null above is exercised by tests + ** tag-20230325-2 */ + sqlite3VdbeAddOp2(v, OP_NotNull, target, 1); + VdbeCoverageNeverTaken(v); +#endif + break; + } pCol = &pAggInfo->aCol[pExpr->iAgg]; if( !pAggInfo->directMode ){ - assert( pCol->iMem>0 ); - return pCol->iMem; + return AggInfoColumnReg(pAggInfo, pExpr->iAgg); }else if( pAggInfo->useSortingIdx ){ Table *pTab = pCol->pTab; sqlite3VdbeAddOp3(v, OP_Column, pAggInfo->sortingIdxPTab, pCol->iSorterColumn, target); - if( pCol->iColumn<0 ){ + if( pTab==0 ){ + /* No comment added */ + }else if( pCol->iColumn<0 ){ VdbeComment((v,"%s.rowid",pTab->zName)); - }else if( ALWAYS(pTab!=0) ){ + }else{ VdbeComment((v,"%s.%s", pTab->zName, pTab->aCol[pCol->iColumn].zCnName)); if( pTab->aCol[pCol->iColumn].affinity==SQLITE_AFF_REAL ){ @@ -109267,6 +111684,11 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) } } return target; + }else if( pExpr->y.pTab==0 ){ + /* This case happens when the argument to an aggregate function + ** is rewritten by aggregateConvertIndexedExprRefToColumn() */ + sqlite3VdbeAddOp3(v, OP_Column, pExpr->iTable, pExpr->iColumn, target); + return target; } /* Otherwise, fall thru into the TK_COLUMN case */ /* no break */ deliberate_fall_through @@ -109277,7 +111699,7 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) if( ExprHasProperty(pExpr, EP_FixedCol) ){ /* This COLUMN expression is really a constant due to WHERE clause ** constraints, and that constant is coded by the pExpr->pLeft - ** expresssion. However, make sure the constant has the correct + ** expression. However, make sure the constant has the correct ** datatype by applying the Affinity of the table column to the ** constant. */ @@ -109287,7 +111709,7 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) assert( pExpr->y.pTab!=0 ); aff = sqlite3TableColumnAffinity(pExpr->y.pTab, pExpr->iColumn); if( aff>SQLITE_AFF_BLOB ){ - static const char zAff[] = "B\000C\000D\000E"; + static const char zAff[] = "B\000C\000D\000E\000F"; assert( SQLITE_AFF_BLOB=='A' ); assert( SQLITE_AFF_TEXT=='B' ); sqlite3VdbeAddOp4(v, OP_Affinity, iReg, 1, 0, @@ -109417,11 +111839,8 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) #ifndef SQLITE_OMIT_CAST case TK_CAST: { /* Expressions of the form: CAST(pLeft AS token) */ - inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target); - if( inReg!=target ){ - sqlite3VdbeAddOp2(v, OP_SCopy, inReg, target); - inReg = target; - } + sqlite3ExprCode(pParse, pExpr->pLeft, target); + assert( inReg==target ); assert( !ExprHasProperty(pExpr, EP_IntValue) ); sqlite3VdbeAddOp2(v, OP_Cast, target, sqlite3AffinityType(pExpr->u.zToken, 0)); @@ -109564,7 +111983,7 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) assert( !ExprHasProperty(pExpr, EP_IntValue) ); sqlite3ErrorMsg(pParse, "misuse of aggregate: %#T()", pExpr); }else{ - return pInfo->aFunc[pExpr->iAgg].iMem; + return AggInfoFuncReg(pInfo, pExpr->iAgg); } break; } @@ -109606,7 +112025,7 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) sqlite3ErrorMsg(pParse, "unknown function: %#T()", pExpr); break; } - if( pDef->funcFlags & SQLITE_FUNC_INLINE ){ + if( (pDef->funcFlags & SQLITE_FUNC_INLINE)!=0 && ALWAYS(pFarg!=0) ){ assert( (pDef->funcFlags & SQLITE_FUNC_UNSAFE)==0 ); assert( (pDef->funcFlags & SQLITE_FUNC_DIRECT)==0 ); return exprCodeInlineFunction(pParse, pFarg, @@ -109632,10 +112051,10 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) r1 = sqlite3GetTempRange(pParse, nFarg); } - /* For length() and typeof() functions with a column argument, + /* For length() and typeof() and octet_length() functions, ** set the P5 parameter to the OP_Column opcode to OPFLAG_LENGTHARG - ** or OPFLAG_TYPEOFARG respectively, to avoid unnecessary data - ** loading. + ** or OPFLAG_TYPEOFARG or OPFLAG_BYTELENARG respectively, to avoid + ** unnecessary data loading. */ if( (pDef->funcFlags & (SQLITE_FUNC_LENGTH|SQLITE_FUNC_TYPEOF))!=0 ){ u8 exprOp; @@ -109645,14 +112064,16 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) if( exprOp==TK_COLUMN || exprOp==TK_AGG_COLUMN ){ assert( SQLITE_FUNC_LENGTH==OPFLAG_LENGTHARG ); assert( SQLITE_FUNC_TYPEOF==OPFLAG_TYPEOFARG ); - testcase( pDef->funcFlags & OPFLAG_LENGTHARG ); - pFarg->a[0].pExpr->op2 = - pDef->funcFlags & (OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG); + assert( SQLITE_FUNC_BYTELEN==OPFLAG_BYTELENARG ); + assert( (OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG)==OPFLAG_BYTELENARG ); + testcase( (pDef->funcFlags & OPFLAG_BYTELENARG)==OPFLAG_LENGTHARG ); + testcase( (pDef->funcFlags & OPFLAG_BYTELENARG)==OPFLAG_TYPEOFARG ); + testcase( (pDef->funcFlags & OPFLAG_BYTELENARG)==OPFLAG_BYTELENARG); + pFarg->a[0].pExpr->op2 = pDef->funcFlags & OPFLAG_BYTELENARG; } } - sqlite3ExprCodeExprList(pParse, pFarg, r1, 0, - SQLITE_ECEL_DUP|SQLITE_ECEL_FACTOR); + sqlite3ExprCodeExprList(pParse, pFarg, r1, 0, SQLITE_ECEL_FACTOR); }else{ r1 = 0; } @@ -109753,17 +112174,16 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) return target; } case TK_COLLATE: { - if( !ExprHasProperty(pExpr, EP_Collate) - && ALWAYS(pExpr->pLeft) - && pExpr->pLeft->op==TK_FUNCTION - ){ - inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target); - if( inReg!=target ){ - sqlite3VdbeAddOp2(v, OP_SCopy, inReg, target); - inReg = target; - } - sqlite3VdbeAddOp1(v, OP_ClrSubtype, inReg); - return inReg; + if( !ExprHasProperty(pExpr, EP_Collate) ){ + /* A TK_COLLATE Expr node without the EP_Collate tag is a so-called + ** "SOFT-COLLATE" that is added to constraints that are pushed down + ** from outer queries into sub-queries by the push-down optimization. + ** Clear subtypes as subtypes may not cross a subquery boundary. + */ + assert( pExpr->pLeft ); + sqlite3ExprCode(pParse, pExpr->pLeft, target); + sqlite3VdbeAddOp1(v, OP_ClrSubtype, target); + return target; }else{ pExpr = pExpr->pLeft; goto expr_code_doover; /* 2018-04-28: Prevent deep recursion. */ @@ -109853,7 +112273,7 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) if( pAggInfo ){ assert( pExpr->iAgg>=0 && pExpr->iAggnColumn ); if( !pAggInfo->directMode ){ - inReg = pAggInfo->aCol[pExpr->iAgg].iMem; + inReg = AggInfoColumnReg(pAggInfo, pExpr->iAgg); break; } if( pExpr->pAggInfo->useSortingIdx ){ @@ -109864,16 +112284,19 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) break; } } - addrINR = sqlite3VdbeAddOp1(v, OP_IfNullRow, pExpr->iTable); - /* Temporarily disable factoring of constant expressions, since - ** even though expressions may appear to be constant, they are not - ** really constant because they originate from the right-hand side - ** of a LEFT JOIN. */ - pParse->okConstFactor = 0; - inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target); + addrINR = sqlite3VdbeAddOp3(v, OP_IfNullRow, pExpr->iTable, 0, target); + /* The OP_IfNullRow opcode above can overwrite the result register with + ** NULL. So we have to ensure that the result register is not a value + ** that is suppose to be a constant. Two defenses are needed: + ** (1) Temporarily disable factoring of constant expressions + ** (2) Make sure the computed value really is stored in register + ** "target" and not someplace else. + */ + pParse->okConstFactor = 0; /* note (1) above */ + sqlite3ExprCode(pParse, pExpr->pLeft, target); + assert( target==inReg ); pParse->okConstFactor = okConstFactor; sqlite3VdbeJumpHere(v, addrINR); - sqlite3VdbeChangeP3(v, addrINR, inReg); break; } @@ -110007,7 +112430,7 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) ** ** If regDest>=0 then the result is always stored in that register and the ** result is not reusable. If regDest<0 then this routine is free to -** store the value whereever it wants. The register where the expression +** store the value wherever it wants. The register where the expression ** is stored is returned. When regDest<0, two identical expressions might ** code to the same register, if they do not contain function calls and hence ** are factored out into the initialization section at the end of the @@ -110110,7 +112533,9 @@ SQLITE_PRIVATE void sqlite3ExprCode(Parse *pParse, Expr *pExpr, int target){ inReg = sqlite3ExprCodeTarget(pParse, pExpr, target); if( inReg!=target ){ u8 op; - if( ALWAYS(pExpr) && ExprHasProperty(pExpr,EP_Subquery) ){ + if( ALWAYS(pExpr) + && (ExprHasProperty(pExpr,EP_Subquery) || pExpr->op==TK_REGISTER) + ){ op = OP_Copy; }else{ op = OP_SCopy; @@ -110923,7 +113348,7 @@ static int exprImpliesNotNull( ** pE1: x!=123 pE2: x IS NOT NULL Result: true ** pE1: x!=?1 pE2: x IS NOT NULL Result: true ** pE1: x IS NULL pE2: x IS NOT NULL Result: false -** pE1: x IS ?2 pE2: x IS NOT NULL Reuslt: false +** pE1: x IS ?2 pE2: x IS NOT NULL Result: false ** ** When comparing TK_COLUMN nodes between pE1 and pE2, if pE2 has ** Expr.iTable<0 then assume a table number given by iTab. @@ -110960,11 +113385,29 @@ SQLITE_PRIVATE int sqlite3ExprImpliesExpr( return 0; } +/* This is a helper function to impliesNotNullRow(). In this routine, +** set pWalker->eCode to one only if *both* of the input expressions +** separately have the implies-not-null-row property. +*/ +static void bothImplyNotNullRow(Walker *pWalker, Expr *pE1, Expr *pE2){ + if( pWalker->eCode==0 ){ + sqlite3WalkExpr(pWalker, pE1); + if( pWalker->eCode ){ + pWalker->eCode = 0; + sqlite3WalkExpr(pWalker, pE2); + } + } +} + /* ** This is the Expr node callback for sqlite3ExprImpliesNonNullRow(). ** If the expression node requires that the table at pWalker->iCur ** have one or more non-NULL column, then set pWalker->eCode to 1 and abort. ** +** pWalker->mWFlags is non-zero if this inquiry is being undertaking on +** behalf of a RIGHT JOIN (or FULL JOIN). That makes a difference when +** evaluating terms in the ON clause of an inner join. +** ** This routine controls an optimization. False positives (setting ** pWalker->eCode to 1 when it should not be) are deadly, but false-negatives ** (never setting pWalker->eCode) is a harmless missed optimization. @@ -110973,28 +113416,33 @@ static int impliesNotNullRow(Walker *pWalker, Expr *pExpr){ testcase( pExpr->op==TK_AGG_COLUMN ); testcase( pExpr->op==TK_AGG_FUNCTION ); if( ExprHasProperty(pExpr, EP_OuterON) ) return WRC_Prune; + if( ExprHasProperty(pExpr, EP_InnerON) && pWalker->mWFlags ){ + /* If iCur is used in an inner-join ON clause to the left of a + ** RIGHT JOIN, that does *not* mean that the table must be non-null. + ** But it is difficult to check for that condition precisely. + ** To keep things simple, any use of iCur from any inner-join is + ** ignored while attempting to simplify a RIGHT JOIN. */ + return WRC_Prune; + } switch( pExpr->op ){ case TK_ISNOT: case TK_ISNULL: case TK_NOTNULL: case TK_IS: - case TK_OR: case TK_VECTOR: - case TK_CASE: - case TK_IN: case TK_FUNCTION: case TK_TRUTH: + case TK_CASE: testcase( pExpr->op==TK_ISNOT ); testcase( pExpr->op==TK_ISNULL ); testcase( pExpr->op==TK_NOTNULL ); testcase( pExpr->op==TK_IS ); - testcase( pExpr->op==TK_OR ); testcase( pExpr->op==TK_VECTOR ); - testcase( pExpr->op==TK_CASE ); - testcase( pExpr->op==TK_IN ); testcase( pExpr->op==TK_FUNCTION ); testcase( pExpr->op==TK_TRUTH ); + testcase( pExpr->op==TK_CASE ); return WRC_Prune; + case TK_COLUMN: if( pWalker->u.iCur==pExpr->iTable ){ pWalker->eCode = 1; @@ -111002,21 +113450,38 @@ static int impliesNotNullRow(Walker *pWalker, Expr *pExpr){ } return WRC_Prune; + case TK_OR: case TK_AND: - if( pWalker->eCode==0 ){ + /* Both sides of an AND or OR must separately imply non-null-row. + ** Consider these cases: + ** 1. NOT (x AND y) + ** 2. x OR y + ** If only one of x or y is non-null-row, then the overall expression + ** can be true if the other arm is false (case 1) or true (case 2). + */ + testcase( pExpr->op==TK_OR ); + testcase( pExpr->op==TK_AND ); + bothImplyNotNullRow(pWalker, pExpr->pLeft, pExpr->pRight); + return WRC_Prune; + + case TK_IN: + /* Beware of "x NOT IN ()" and "x NOT IN (SELECT 1 WHERE false)", + ** both of which can be true. But apart from these cases, if + ** the left-hand side of the IN is NULL then the IN itself will be + ** NULL. */ + if( ExprUseXList(pExpr) && ALWAYS(pExpr->x.pList->nExpr>0) ){ sqlite3WalkExpr(pWalker, pExpr->pLeft); - if( pWalker->eCode ){ - pWalker->eCode = 0; - sqlite3WalkExpr(pWalker, pExpr->pRight); - } } return WRC_Prune; case TK_BETWEEN: - if( sqlite3WalkExpr(pWalker, pExpr->pLeft)==WRC_Abort ){ - assert( pWalker->eCode ); - return WRC_Abort; - } + /* In "x NOT BETWEEN y AND z" either x must be non-null-row or else + ** both y and z must be non-null row */ + assert( ExprUseXList(pExpr) ); + assert( pExpr->x.pList->nExpr==2 ); + sqlite3WalkExpr(pWalker, pExpr->pLeft); + bothImplyNotNullRow(pWalker, pExpr->x.pList->a[0].pExpr, + pExpr->x.pList->a[1].pExpr); return WRC_Prune; /* Virtual tables are allowed to use constraints like x=NULL. So @@ -111078,7 +113543,7 @@ static int impliesNotNullRow(Walker *pWalker, Expr *pExpr){ ** be non-NULL, then the LEFT JOIN can be safely converted into an ** ordinary join. */ -SQLITE_PRIVATE int sqlite3ExprImpliesNonNullRow(Expr *p, int iTab){ +SQLITE_PRIVATE int sqlite3ExprImpliesNonNullRow(Expr *p, int iTab, int isRJ){ Walker w; p = sqlite3ExprSkipCollateAndLikely(p); if( p==0 ) return 0; @@ -111086,7 +113551,7 @@ SQLITE_PRIVATE int sqlite3ExprImpliesNonNullRow(Expr *p, int iTab){ p = p->pLeft; }else{ while( p->op==TK_AND ){ - if( sqlite3ExprImpliesNonNullRow(p->pLeft, iTab) ) return 1; + if( sqlite3ExprImpliesNonNullRow(p->pLeft, iTab, isRJ) ) return 1; p = p->pRight; } } @@ -111094,6 +113559,7 @@ SQLITE_PRIVATE int sqlite3ExprImpliesNonNullRow(Expr *p, int iTab){ w.xSelectCallback = 0; w.xSelectCallback2 = 0; w.eCode = 0; + w.mWFlags = isRJ!=0; w.u.iCur = iTab; sqlite3WalkExpr(&w, p); return w.eCode; @@ -111154,7 +113620,7 @@ SQLITE_PRIVATE int sqlite3ExprCoveredByIndex( } -/* Structure used to pass information throught the Walker in order to +/* Structure used to pass information throughout the Walker in order to ** implement sqlite3ReferencesSrcList(). */ struct RefSrcList { @@ -111284,10 +113750,8 @@ SQLITE_PRIVATE int sqlite3ReferencesSrcList(Parse *pParse, Expr *pExpr, SrcList ** it does, make a copy. This is done because the pExpr argument is ** subject to change. ** -** The copy is stored on pParse->pConstExpr with a register number of 0. -** This will cause the expression to be deleted automatically when the -** Parse object is destroyed, but the zero register number means that it -** will not generate any code in the preamble. +** The copy is scheduled for deletion using the sqlite3ExprDeferredDelete() +** which builds on the sqlite3ParserAddCleanup() mechanism. */ static int agginfoPersistExprCb(Walker *pWalker, Expr *pExpr){ if( ALWAYS(!ExprHasProperty(pExpr, EP_TokenOnly|EP_Reduced)) @@ -111297,10 +113761,11 @@ static int agginfoPersistExprCb(Walker *pWalker, Expr *pExpr){ int iAgg = pExpr->iAgg; Parse *pParse = pWalker->pParse; sqlite3 *db = pParse->db; + assert( iAgg>=0 ); if( pExpr->op!=TK_AGG_FUNCTION ){ - assert( pExpr->op==TK_AGG_COLUMN || pExpr->op==TK_IF_NULL_ROW ); - assert( iAgg>=0 && iAggnColumn ); - if( pAggInfo->aCol[iAgg].pCExpr==pExpr ){ + if( iAggnColumn + && pAggInfo->aCol[iAgg].pCExpr==pExpr + ){ pExpr = sqlite3ExprDup(db, pExpr, 0); if( pExpr ){ pAggInfo->aCol[iAgg].pCExpr = pExpr; @@ -111309,8 +113774,9 @@ static int agginfoPersistExprCb(Walker *pWalker, Expr *pExpr){ } }else{ assert( pExpr->op==TK_AGG_FUNCTION ); - assert( iAgg>=0 && iAggnFunc ); - if( pAggInfo->aFunc[iAgg].pFExpr==pExpr ){ + if( ALWAYS(iAggnFunc) + && pAggInfo->aFunc[iAgg].pFExpr==pExpr + ){ pExpr = sqlite3ExprDup(db, pExpr, 0); if( pExpr ){ pAggInfo->aFunc[iAgg].pFExpr = pExpr; @@ -111365,6 +113831,74 @@ static int addAggInfoFunc(sqlite3 *db, AggInfo *pInfo){ return i; } +/* +** Search the AggInfo object for an aCol[] entry that has iTable and iColumn. +** Return the index in aCol[] of the entry that describes that column. +** +** If no prior entry is found, create a new one and return -1. The +** new column will have an index of pAggInfo->nColumn-1. +*/ +static void findOrCreateAggInfoColumn( + Parse *pParse, /* Parsing context */ + AggInfo *pAggInfo, /* The AggInfo object to search and/or modify */ + Expr *pExpr /* Expr describing the column to find or insert */ +){ + struct AggInfo_col *pCol; + int k; + + assert( pAggInfo->iFirstReg==0 ); + pCol = pAggInfo->aCol; + for(k=0; knColumn; k++, pCol++){ + if( pCol->pCExpr==pExpr ) return; + if( pCol->iTable==pExpr->iTable + && pCol->iColumn==pExpr->iColumn + && pExpr->op!=TK_IF_NULL_ROW + ){ + goto fix_up_expr; + } + } + k = addAggInfoColumn(pParse->db, pAggInfo); + if( k<0 ){ + /* OOM on resize */ + assert( pParse->db->mallocFailed ); + return; + } + pCol = &pAggInfo->aCol[k]; + assert( ExprUseYTab(pExpr) ); + pCol->pTab = pExpr->y.pTab; + pCol->iTable = pExpr->iTable; + pCol->iColumn = pExpr->iColumn; + pCol->iSorterColumn = -1; + pCol->pCExpr = pExpr; + if( pAggInfo->pGroupBy && pExpr->op!=TK_IF_NULL_ROW ){ + int j, n; + ExprList *pGB = pAggInfo->pGroupBy; + struct ExprList_item *pTerm = pGB->a; + n = pGB->nExpr; + for(j=0; jpExpr; + if( pE->op==TK_COLUMN + && pE->iTable==pExpr->iTable + && pE->iColumn==pExpr->iColumn + ){ + pCol->iSorterColumn = j; + break; + } + } + } + if( pCol->iSorterColumn<0 ){ + pCol->iSorterColumn = pAggInfo->nSortingColumn++; + } +fix_up_expr: + ExprSetVVAProperty(pExpr, EP_NoReduce); + assert( pExpr->pAggInfo==0 || pExpr->pAggInfo==pAggInfo ); + pExpr->pAggInfo = pAggInfo; + if( pExpr->op==TK_COLUMN ){ + pExpr->op = TK_AGG_COLUMN; + } + pExpr->iAgg = (i16)k; +} + /* ** This is the xExprCallback for a tree walker. It is used to ** implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates @@ -111378,7 +113912,45 @@ static int analyzeAggregate(Walker *pWalker, Expr *pExpr){ AggInfo *pAggInfo = pNC->uNC.pAggInfo; assert( pNC->ncFlags & NC_UAggInfo ); + assert( pAggInfo->iFirstReg==0 ); switch( pExpr->op ){ + default: { + IndexedExpr *pIEpr; + Expr tmp; + assert( pParse->iSelfTab==0 ); + if( (pNC->ncFlags & NC_InAggFunc)==0 ) break; + if( pParse->pIdxEpr==0 ) break; + for(pIEpr=pParse->pIdxEpr; pIEpr; pIEpr=pIEpr->pIENext){ + int iDataCur = pIEpr->iDataCur; + if( iDataCur<0 ) continue; + if( sqlite3ExprCompare(0, pExpr, pIEpr->pExpr, iDataCur)==0 ) break; + } + if( pIEpr==0 ) break; + if( NEVER(!ExprUseYTab(pExpr)) ) break; + for(i=0; inSrc; i++){ + if( pSrcList->a[0].iCursor==pIEpr->iDataCur ) break; + } + if( i>=pSrcList->nSrc ) break; + if( NEVER(pExpr->pAggInfo!=0) ) break; /* Resolved by outer context */ + if( pParse->nErr ){ return WRC_Abort; } + + /* If we reach this point, it means that expression pExpr can be + ** translated into a reference to an index column as described by + ** pIEpr. + */ + memset(&tmp, 0, sizeof(tmp)); + tmp.op = TK_AGG_COLUMN; + tmp.iTable = pIEpr->iIdxCur; + tmp.iColumn = pIEpr->iIdxCol; + findOrCreateAggInfoColumn(pParse, pAggInfo, &tmp); + if( pParse->nErr ){ return WRC_Abort; } + assert( pAggInfo->aCol!=0 ); + assert( tmp.iAggnColumn ); + pAggInfo->aCol[tmp.iAgg].pCExpr = pExpr; + pExpr->pAggInfo = pAggInfo; + pExpr->iAgg = tmp.iAgg; + return WRC_Prune; + } case TK_IF_NULL_ROW: case TK_AGG_COLUMN: case TK_COLUMN: { @@ -111390,72 +113962,14 @@ static int analyzeAggregate(Walker *pWalker, Expr *pExpr){ if( ALWAYS(pSrcList!=0) ){ SrcItem *pItem = pSrcList->a; for(i=0; inSrc; i++, pItem++){ - struct AggInfo_col *pCol; assert( !ExprHasProperty(pExpr, EP_TokenOnly|EP_Reduced) ); if( pExpr->iTable==pItem->iCursor ){ - /* If we reach this point, it means that pExpr refers to a table - ** that is in the FROM clause of the aggregate query. - ** - ** Make an entry for the column in pAggInfo->aCol[] if there - ** is not an entry there already. - */ - int k; - pCol = pAggInfo->aCol; - for(k=0; knColumn; k++, pCol++){ - if( pCol->iTable==pExpr->iTable - && pCol->iColumn==pExpr->iColumn - && pExpr->op!=TK_IF_NULL_ROW - ){ - break; - } - } - if( (k>=pAggInfo->nColumn) - && (k = addAggInfoColumn(pParse->db, pAggInfo))>=0 - ){ - pCol = &pAggInfo->aCol[k]; - assert( ExprUseYTab(pExpr) ); - pCol->pTab = pExpr->y.pTab; - pCol->iTable = pExpr->iTable; - pCol->iColumn = pExpr->iColumn; - pCol->iMem = ++pParse->nMem; - pCol->iSorterColumn = -1; - pCol->pCExpr = pExpr; - if( pAggInfo->pGroupBy && pExpr->op!=TK_IF_NULL_ROW ){ - int j, n; - ExprList *pGB = pAggInfo->pGroupBy; - struct ExprList_item *pTerm = pGB->a; - n = pGB->nExpr; - for(j=0; jpExpr; - if( pE->op==TK_COLUMN - && pE->iTable==pExpr->iTable - && pE->iColumn==pExpr->iColumn - ){ - pCol->iSorterColumn = j; - break; - } - } - } - if( pCol->iSorterColumn<0 ){ - pCol->iSorterColumn = pAggInfo->nSortingColumn++; - } - } - /* There is now an entry for pExpr in pAggInfo->aCol[] (either - ** because it was there before or because we just created it). - ** Convert the pExpr to be a TK_AGG_COLUMN referring to that - ** pAggInfo->aCol[] entry. - */ - ExprSetVVAProperty(pExpr, EP_NoReduce); - pExpr->pAggInfo = pAggInfo; - if( pExpr->op==TK_COLUMN ){ - pExpr->op = TK_AGG_COLUMN; - } - pExpr->iAgg = (i16)k; + findOrCreateAggInfoColumn(pParse, pAggInfo, pExpr); break; } /* endif pExpr->iTable==pItem->iCursor */ } /* end loop over pSrcList */ } - return WRC_Prune; + return WRC_Continue; } case TK_AGG_FUNCTION: { if( (pNC->ncFlags & NC_InAggFunc)==0 @@ -111480,7 +113994,6 @@ static int analyzeAggregate(Walker *pWalker, Expr *pExpr){ assert( !ExprHasProperty(pExpr, EP_xIsSelect) ); pItem = &pAggInfo->aFunc[i]; pItem->pFExpr = pExpr; - pItem->iMem = ++pParse->nMem; assert( ExprUseUToken(pExpr) ); pItem->pFunc = sqlite3FindFunction(pParse->db, pExpr->u.zToken, @@ -111609,6 +114122,37 @@ SQLITE_PRIVATE void sqlite3ClearTempRegCache(Parse *pParse){ pParse->nRangeReg = 0; } +/* +** Make sure sufficient registers have been allocated so that +** iReg is a valid register number. +*/ +SQLITE_PRIVATE void sqlite3TouchRegister(Parse *pParse, int iReg){ + if( pParse->nMemnMem = iReg; +} + +#if defined(SQLITE_ENABLE_STAT4) || defined(SQLITE_DEBUG) +/* +** Return the latest reusable register in the set of all registers. +** The value returned is no less than iMin. If any register iMin or +** greater is in permanent use, then return one more than that last +** permanent register. +*/ +SQLITE_PRIVATE int sqlite3FirstAvailableRegister(Parse *pParse, int iMin){ + const ExprList *pList = pParse->pConstExpr; + if( pList ){ + int i; + for(i=0; inExpr; i++){ + if( pList->a[i].u.iConstExprReg>=iMin ){ + iMin = pList->a[i].u.iConstExprReg + 1; + } + } + } + pParse->nTempReg = 0; + pParse->nRangeReg = 0; + return iMin; +} +#endif /* SQLITE_ENABLE_STAT4 || SQLITE_DEBUG */ + /* ** Validate that no temporary register falls within the range of ** iFirst..iLast, inclusive. This routine is only call from within assert() @@ -111628,6 +114172,14 @@ SQLITE_PRIVATE int sqlite3NoTempsInRange(Parse *pParse, int iFirst, int iLast){ return 0; } } + if( pParse->pConstExpr ){ + ExprList *pList = pParse->pConstExpr; + for(i=0; inExpr; i++){ + int iReg = pList->a[i].u.iConstExprReg; + if( iReg==0 ) continue; + if( iReg>=iFirst && iReg<=iLast ) return 0; + } + } return 1; } #endif /* SQLITE_DEBUG */ @@ -112178,7 +114730,7 @@ SQLITE_PRIVATE void sqlite3AlterBeginAddColumn(Parse *pParse, SrcList *pSrc){ pNew->u.tab.pDfltList = sqlite3ExprListDup(db, pTab->u.tab.pDfltList, 0); pNew->pSchema = db->aDb[iDb].pSchema; pNew->u.tab.addColOffset = pTab->u.tab.addColOffset; - pNew->nTabRef = 1; + assert( pNew->nTabRef==1 ); exit_begin_add_column: sqlite3SrcListDelete(db, pSrc); @@ -112377,13 +114929,14 @@ static void renameTokenCheckAll(Parse *pParse, const void *pPtr){ assert( pParse->db->mallocFailed==0 || pParse->nErr!=0 ); if( pParse->nErr==0 ){ const RenameToken *p; - u8 i = 0; + u32 i = 1; for(p=pParse->pRename; p; p=p->pNext){ if( p->p ){ assert( p->p!=pPtr ); - i += *(u8*)(p->p); + i += *(u8*)(p->p) | 1; } } + assert( i>0 ); } } #else @@ -112682,7 +115235,7 @@ static RenameToken *renameColumnTokenNext(RenameCtx *pCtx){ } /* -** An error occured while parsing or otherwise processing a database +** An error occurred while parsing or otherwise processing a database ** object (either pParse->pNewTable, pNewIndex or pNewTrigger) as part of an ** ALTER TABLE RENAME COLUMN program. The error message emitted by the ** sub-routine is currently stored in pParse->zErrMsg. This function @@ -112914,6 +115467,19 @@ static int renameEditSql( return rc; } +/* +** Set all pEList->a[].fg.eEName fields in the expression-list to val. +*/ +static void renameSetENames(ExprList *pEList, int val){ + if( pEList ){ + int i; + for(i=0; inExpr; i++){ + assert( val==ENAME_NAME || pEList->a[i].fg.eEName==ENAME_NAME ); + pEList->a[i].fg.eEName = val; + } + } +} + /* ** Resolve all symbols in the trigger at pParse->pNewTrigger, assuming ** it was read from the schema of database zDb. Return SQLITE_OK if @@ -112961,7 +115527,17 @@ static int renameResolveTrigger(Parse *pParse){ pSrc = 0; rc = SQLITE_NOMEM; }else{ + /* pStep->pExprList contains an expression-list used for an UPDATE + ** statement. So the a[].zEName values are the RHS of the + ** "
  • = " clauses of the UPDATE statement. So, before + ** running SelectPrep(), change all the eEName values in + ** pStep->pExprList to ENAME_SPAN (from their current value of + ** ENAME_NAME). This is to prevent any ids in ON() clauses that are + ** part of pSrc from being incorrectly resolved against the + ** a[].zEName values as if they were column aliases. */ + renameSetENames(pStep->pExprList, ENAME_SPAN); sqlite3SelectPrep(pParse, pSel, 0); + renameSetENames(pStep->pExprList, ENAME_NAME); rc = pParse->nErr ? SQLITE_ERROR : SQLITE_OK; assert( pStep->pExprList==0 || pStep->pExprList==pSel->pEList ); assert( pSrc==pSel->pSrc ); @@ -114910,11 +117486,15 @@ static void analyzeOneTable( int regIdxname = iMem++; /* Register containing index name */ int regStat1 = iMem++; /* Value for the stat column of sqlite_stat1 */ int regPrev = iMem; /* MUST BE LAST (see below) */ +#ifdef SQLITE_ENABLE_STAT4 + int doOnce = 1; /* Flag for a one-time computation */ +#endif #ifdef SQLITE_ENABLE_PREUPDATE_HOOK Table *pStat1 = 0; #endif - pParse->nMem = MAX(pParse->nMem, iMem); + sqlite3TouchRegister(pParse, iMem); + assert( sqlite3NoTempsInRange(pParse, regNewRowid, iMem) ); v = sqlite3GetVdbe(pParse); if( v==0 || NEVER(pTab==0) ){ return; @@ -115020,7 +117600,7 @@ static void analyzeOneTable( ** the regPrev array and a trailing rowid (the rowid slot is required ** when building a record to insert into the sample column of ** the sqlite_stat4 table. */ - pParse->nMem = MAX(pParse->nMem, regPrev+nColTest); + sqlite3TouchRegister(pParse, regPrev+nColTest); /* Open a read-only cursor on the index being analyzed. */ assert( iDb==sqlite3SchemaToIndex(db, pIdx->pSchema) ); @@ -115192,7 +117772,35 @@ static void analyzeOneTable( int addrIsNull; u8 seekOp = HasRowid(pTab) ? OP_NotExists : OP_NotFound; - pParse->nMem = MAX(pParse->nMem, regCol+nCol); + if( doOnce ){ + int mxCol = nCol; + Index *pX; + + /* Compute the maximum number of columns in any index */ + for(pX=pTab->pIndex; pX; pX=pX->pNext){ + int nColX; /* Number of columns in pX */ + if( !HasRowid(pTab) && IsPrimaryKeyIndex(pX) ){ + nColX = pX->nKeyCol; + }else{ + nColX = pX->nColumn; + } + if( nColX>mxCol ) mxCol = nColX; + } + + /* Allocate space to compute results for the largest index */ + sqlite3TouchRegister(pParse, regCol+mxCol); + doOnce = 0; +#ifdef SQLITE_DEBUG + /* Verify that the call to sqlite3ClearTempRegCache() below + ** really is needed. + ** https://sqlite.org/forum/forumpost/83cb4a95a0 (2023-03-25) + */ + testcase( !sqlite3NoTempsInRange(pParse, regEq, regCol+mxCol) ); +#endif + sqlite3ClearTempRegCache(pParse); /* tag-20230325-1 */ + assert( sqlite3NoTempsInRange(pParse, regEq, regCol+mxCol) ); + } + assert( sqlite3NoTempsInRange(pParse, regEq, regCol+nCol) ); addrNext = sqlite3VdbeCurrentAddr(v); callStatGet(pParse, regStat, STAT_GET_ROWID, regSampleRowid); @@ -115273,6 +117881,11 @@ static void analyzeDatabase(Parse *pParse, int iDb){ for(k=sqliteHashFirst(&pSchema->tblHash); k; k=sqliteHashNext(k)){ Table *pTab = (Table*)sqliteHashData(k); analyzeOneTable(pParse, pTab, 0, iStatCur, iMem, iTab); +#ifdef SQLITE_ENABLE_STAT4 + iMem = sqlite3FirstAvailableRegister(pParse, iMem); +#else + assert( iMem==sqlite3FirstAvailableRegister(pParse,iMem) ); +#endif } loadAnalysis(pParse, iDb); } @@ -115513,6 +118126,8 @@ static int analysisLoader(void *pData, int argc, char **argv, char **NotUsed){ ** and its contents. */ SQLITE_PRIVATE void sqlite3DeleteIndexSamples(sqlite3 *db, Index *pIdx){ + assert( db!=0 ); + assert( pIdx!=0 ); #ifdef SQLITE_ENABLE_STAT4 if( pIdx->aSample ){ int j; @@ -115522,7 +118137,7 @@ SQLITE_PRIVATE void sqlite3DeleteIndexSamples(sqlite3 *db, Index *pIdx){ } sqlite3DbFree(db, pIdx->aSample); } - if( db && db->pnBytesFreed==0 ){ + if( db->pnBytesFreed==0 ){ pIdx->nSample = 0; pIdx->aSample = 0; } @@ -115658,6 +118273,10 @@ static int loadStatTbl( pIdx = findIndexOrPrimaryKey(db, zIndex, zDb); assert( pIdx==0 || pIdx->nSample==0 ); if( pIdx==0 ) continue; + if( pIdx->aSample!=0 ){ + /* The same index appears in sqlite_stat4 under multiple names */ + continue; + } assert( !HasRowid(pIdx->pTable) || pIdx->nColumn==pIdx->nKeyCol+1 ); if( !HasRowid(pIdx->pTable) && IsPrimaryKeyIndex(pIdx) ){ nIdxCol = pIdx->nKeyCol; @@ -115665,6 +118284,7 @@ static int loadStatTbl( nIdxCol = pIdx->nColumn; } pIdx->nSampleCol = nIdxCol; + pIdx->mxSample = nSample; nByte = sizeof(IndexSample) * nSample; nByte += sizeof(tRowcnt) * nIdxCol * 3 * nSample; nByte += nIdxCol * sizeof(tRowcnt); /* Space for Index.aAvgEq[] */ @@ -115704,6 +118324,11 @@ static int loadStatTbl( if( zIndex==0 ) continue; pIdx = findIndexOrPrimaryKey(db, zIndex, zDb); if( pIdx==0 ) continue; + if( pIdx->nSample>=pIdx->mxSample ){ + /* Too many slots used because the same index appears in + ** sqlite_stat4 using multiple names */ + continue; + } /* This next condition is true if data has already been loaded from ** the sqlite_stat4 table. */ nCol = pIdx->nSampleCol; @@ -115716,14 +118341,15 @@ static int loadStatTbl( decodeIntArray((char*)sqlite3_column_text(pStmt,2),nCol,pSample->anLt,0,0); decodeIntArray((char*)sqlite3_column_text(pStmt,3),nCol,pSample->anDLt,0,0); - /* Take a copy of the sample. Add two 0x00 bytes the end of the buffer. + /* Take a copy of the sample. Add 8 extra 0x00 bytes the end of the buffer. ** This is in case the sample record is corrupted. In that case, the ** sqlite3VdbeRecordCompare() may read up to two varints past the ** end of the allocated buffer before it realizes it is dealing with - ** a corrupt record. Adding the two 0x00 bytes prevents this from causing + ** a corrupt record. Or it might try to read a large integer from the + ** buffer. In any case, eight 0x00 bytes prevents this from causing ** a buffer overread. */ pSample->n = sqlite3_column_bytes(pStmt, 4); - pSample->p = sqlite3DbMallocZero(db, pSample->n + 2); + pSample->p = sqlite3DbMallocZero(db, pSample->n + 8); if( pSample->p==0 ){ sqlite3_finalize(pStmt); return SQLITE_NOMEM_BKPT; @@ -115747,11 +118373,12 @@ static int loadStat4(sqlite3 *db, const char *zDb){ const Table *pStat4; assert( db->lookaside.bDisable ); - if( (pStat4 = sqlite3FindTable(db, "sqlite_stat4", zDb))!=0 + if( OptimizationEnabled(db, SQLITE_Stat4) + && (pStat4 = sqlite3FindTable(db, "sqlite_stat4", zDb))!=0 && IsOrdinaryTable(pStat4) ){ rc = loadStatTbl(db, - "SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx", + "SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx COLLATE nocase", "SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4", zDb ); @@ -115941,7 +118568,7 @@ static void attachFunc( char *zErr = 0; unsigned int flags; Db *aNew; /* New array of Db pointers */ - Db *pNew; /* Db object for the newly attached database */ + Db *pNew = 0; /* Db object for the newly attached database */ char *zErrDyn = 0; sqlite3_vfs *pVfs; @@ -115961,13 +118588,26 @@ static void attachFunc( /* This is not a real ATTACH. Instead, this routine is being called ** from sqlite3_deserialize() to close database db->init.iDb and ** reopen it as a MemDB */ + Btree *pNewBt = 0; pVfs = sqlite3_vfs_find("memdb"); if( pVfs==0 ) return; - pNew = &db->aDb[db->init.iDb]; - if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt); - pNew->pBt = 0; - pNew->pSchema = 0; - rc = sqlite3BtreeOpen(pVfs, "x\0", db, &pNew->pBt, 0, SQLITE_OPEN_MAIN_DB); + rc = sqlite3BtreeOpen(pVfs, "x\0", db, &pNewBt, 0, SQLITE_OPEN_MAIN_DB); + if( rc==SQLITE_OK ){ + Schema *pNewSchema = sqlite3SchemaGet(db, pNewBt); + if( pNewSchema ){ + /* Both the Btree and the new Schema were allocated successfully. + ** Close the old db and update the aDb[] slot with the new memdb + ** values. */ + pNew = &db->aDb[db->init.iDb]; + if( ALWAYS(pNew->pBt) ) sqlite3BtreeClose(pNew->pBt); + pNew->pBt = pNewBt; + pNew->pSchema = pNewSchema; + }else{ + sqlite3BtreeClose(pNewBt); + rc = SQLITE_NOMEM; + } + } + if( rc ) goto attach_error; }else{ /* This is a real ATTACH ** @@ -116080,7 +118720,7 @@ static void attachFunc( } #endif if( rc ){ - if( !REOPEN_AS_MEMDB(db) ){ + if( ALWAYS(!REOPEN_AS_MEMDB(db)) ){ int iDb = db->nDb - 1; assert( iDb>=2 ); if( db->aDb[iDb].pBt ){ @@ -116197,6 +118837,8 @@ static void codeAttach( sqlite3* db = pParse->db; int regArgs; + if( SQLITE_OK!=sqlite3ReadSchema(pParse) ) goto attach_end; + if( pParse->nErr ) goto attach_end; memset(&sName, 0, sizeof(NameContext)); sName.pParse = pParse; @@ -116665,7 +119307,7 @@ SQLITE_PRIVATE int sqlite3AuthCheck( sqlite3 *db = pParse->db; int rc; - /* Don't do any authorization checks if the database is initialising + /* Don't do any authorization checks if the database is initializing ** or if the parser is being invoked from within sqlite3_declare_vtab. */ assert( !IN_RENAME_OBJECT || db->xAuth==0 ); @@ -116966,15 +119608,17 @@ SQLITE_PRIVATE void sqlite3FinishCoding(Parse *pParse){ pParse->nVtabLock = 0; #endif +#ifndef SQLITE_OMIT_SHARED_CACHE /* Once all the cookies have been verified and transactions opened, ** obtain the required table-locks. This is a no-op unless the ** shared-cache feature is enabled. */ - codeTableLocks(pParse); + if( pParse->nTableLock ) codeTableLocks(pParse); +#endif /* Initialize any AUTOINCREMENT data structures required. */ - sqlite3AutoincrementBegin(pParse); + if( pParse->pAinc ) sqlite3AutoincrementBegin(pParse); /* Code constant expressions that where factored out of inner loops. ** @@ -117039,6 +119683,7 @@ SQLITE_PRIVATE void sqlite3NestedParse(Parse *pParse, const char *zFormat, ...){ char saveBuf[PARSE_TAIL_SZ]; if( pParse->nErr ) return; + if( pParse->eParseMode ) return; assert( pParse->nested<10 ); /* Nesting should only be of limited depth */ va_start(ap, zFormat); zSql = sqlite3VMPrintf(db, zFormat, ap); @@ -117486,7 +120131,7 @@ SQLITE_PRIVATE void sqlite3ColumnSetColl( } /* -** Return the collating squence name for a column +** Return the collating sequence name for a column */ SQLITE_PRIVATE const char *sqlite3ColumnColl(Column *pCol){ const char *z; @@ -117579,7 +120224,7 @@ static void SQLITE_NOINLINE deleteTable(sqlite3 *db, Table *pTable){ if( IsOrdinaryTable(pTable) ){ sqlite3FkDelete(db, pTable); } -#ifndef SQLITE_OMIT_VIRTUAL_TABLE +#ifndef SQLITE_OMIT_VIRTUALTABLE else if( IsVirtual(pTable) ){ sqlite3VtabClear(db, pTable); } @@ -118182,7 +120827,7 @@ SQLITE_PRIVATE void sqlite3AddReturning(Parse *pParse, ExprList *pList){ if( pParse->pNewTrigger ){ sqlite3ErrorMsg(pParse, "cannot use RETURNING in a trigger"); }else{ - assert( pParse->bReturning==0 ); + assert( pParse->bReturning==0 || pParse->ifNotExists ); } pParse->bReturning = 1; pRet = sqlite3DbMallocZero(db, sizeof(*pRet)); @@ -118208,7 +120853,8 @@ SQLITE_PRIVATE void sqlite3AddReturning(Parse *pParse, ExprList *pList){ pRet->retTStep.pTrig = &pRet->retTrig; pRet->retTStep.pExprList = pList; pHash = &(db->aDb[1].pSchema->trigHash); - assert( sqlite3HashFind(pHash, RETURNING_TRIGGER_NAME)==0 || pParse->nErr ); + assert( sqlite3HashFind(pHash, RETURNING_TRIGGER_NAME)==0 + || pParse->nErr || pParse->ifNotExists ); if( sqlite3HashInsert(pHash, RETURNING_TRIGGER_NAME, &pRet->retTrig) ==&pRet->retTrig ){ sqlite3OomFault(db); @@ -118243,7 +120889,7 @@ SQLITE_PRIVATE void sqlite3AddColumn(Parse *pParse, Token sName, Token sType){ } if( !IN_RENAME_OBJECT ) sqlite3DequoteToken(&sName); - /* Because keywords GENERATE ALWAYS can be converted into indentifiers + /* Because keywords GENERATE ALWAYS can be converted into identifiers ** by the parser, we can sometimes end up with a typename that ends ** with "generated always". Check for this case and omit the surplus ** text. */ @@ -118464,7 +121110,7 @@ SQLITE_PRIVATE void sqlite3AddDefaultValue( Parse *pParse, /* Parsing context */ Expr *pExpr, /* The parsed expression of the default value */ const char *zStart, /* Start of the default value text */ - const char *zEnd /* First character past end of defaut value text */ + const char *zEnd /* First character past end of default value text */ ){ Table *p; Column *pCol; @@ -118736,6 +121382,14 @@ SQLITE_PRIVATE void sqlite3AddGenerated(Parse *pParse, Expr *pExpr, Token *pType if( pCol->colFlags & COLFLAG_PRIMKEY ){ makeColumnPartOfPrimaryKey(pParse, pCol); /* For the error message */ } + if( ALWAYS(pExpr) && pExpr->op==TK_ID ){ + /* The value of a generated column needs to be a real expression, not + ** just a reference to another column, in order for covering index + ** optimizations to work correctly. So if the value is not an expression, + ** turn it into one by adding a unary "+" operator. */ + pExpr = sqlite3PExpr(pParse, TK_UPLUS, pExpr, 0); + } + if( pExpr && pExpr->op!=TK_RAISE ) pExpr->affExpr = pCol->affinity; sqlite3ColumnSetExpr(pParse, pTab, pCol, pExpr); pExpr = 0; goto generated_done; @@ -118804,7 +121458,7 @@ static int identLength(const char *z){ ** to the specified offset in the buffer and updates *pIdx to refer ** to the first byte after the last byte written before returning. ** -** If the string zSignedIdent consists entirely of alpha-numeric +** If the string zSignedIdent consists entirely of alphanumeric ** characters, does not begin with a digit and is not an SQL keyword, ** then it is copied to the output buffer exactly as it is. Otherwise, ** it is quoted using double-quotes. @@ -118872,7 +121526,8 @@ static char *createTableStmt(sqlite3 *db, Table *p){ /* SQLITE_AFF_TEXT */ " TEXT", /* SQLITE_AFF_NUMERIC */ " NUM", /* SQLITE_AFF_INTEGER */ " INT", - /* SQLITE_AFF_REAL */ " REAL" + /* SQLITE_AFF_REAL */ " REAL", + /* SQLITE_AFF_FLEXNUM */ " NUM", }; int len; const char *zType; @@ -118888,10 +121543,12 @@ static char *createTableStmt(sqlite3 *db, Table *p){ testcase( pCol->affinity==SQLITE_AFF_NUMERIC ); testcase( pCol->affinity==SQLITE_AFF_INTEGER ); testcase( pCol->affinity==SQLITE_AFF_REAL ); + testcase( pCol->affinity==SQLITE_AFF_FLEXNUM ); zType = azType[pCol->affinity - SQLITE_AFF_BLOB]; len = sqlite3Strlen30(zType); assert( pCol->affinity==SQLITE_AFF_BLOB + || pCol->affinity==SQLITE_AFF_FLEXNUM || pCol->affinity==sqlite3AffinityType(zType, 0) ); memcpy(&zStmt[k], zType, len); k += len; @@ -118953,7 +121610,7 @@ static void estimateIndexWidth(Index *pIdx){ for(i=0; inColumn; i++){ i16 x = pIdx->aiColumn[i]; assert( xpTable->nCol ); - wIndex += x<0 ? 1 : aCol[pIdx->aiColumn[i]].szEst; + wIndex += x<0 ? 1 : aCol[x].szEst; } pIdx->szIdxRow = sqlite3LogEst(wIndex*4); } @@ -119306,6 +121963,7 @@ SQLITE_PRIVATE int sqlite3ShadowTableName(sqlite3 *db, const char *zName){ ** not pass them into code generator routines by mistake. */ static int markImmutableExprStep(Walker *pWalker, Expr *pExpr){ + (void)pWalker; ExprSetVVAProperty(pExpr, EP_Immutable); return WRC_Continue; } @@ -119872,8 +122530,7 @@ static SQLITE_NOINLINE int viewGetColumnNames(Parse *pParse, Table *pTable){ && pTable->nCol==pSel->pEList->nExpr ){ assert( db->mallocFailed==0 ); - sqlite3SelectAddColumnTypeAndCollation(pParse, pTable, pSel, - SQLITE_AFF_NONE); + sqlite3SubqueryColumnTypes(pParse, pTable, pSel, SQLITE_AFF_NONE); } }else{ /* CREATE VIEW name AS... without an argument list. Construct @@ -120691,7 +123348,7 @@ SQLITE_PRIVATE void sqlite3CreateIndex( #ifndef SQLITE_OMIT_TEMPDB /* If the index name was unqualified, check if the table ** is a temp table. If so, set the database to 1. Do not do this - ** if initialising a database schema. + ** if initializing a database schema. */ if( !db->init.busy ){ pTab = sqlite3SrcListLookup(pParse, pTblName); @@ -122348,7 +125005,7 @@ SQLITE_PRIVATE void sqlite3CteDelete(sqlite3 *db, Cte *pCte){ /* ** This routine is invoked once per CTE by the parser while parsing a -** WITH clause. The CTE described by teh third argument is added to +** WITH clause. The CTE described by the third argument is added to ** the WITH clause of the second argument. If the second argument is ** NULL, then a new WITH argument is created. */ @@ -122599,6 +125256,7 @@ SQLITE_PRIVATE void sqlite3SetTextEncoding(sqlite3 *db, u8 enc){ ** strings is BINARY. */ db->pDfltColl = sqlite3FindCollSeq(db, enc, sqlite3StrBINARY, 0); + sqlite3ExpirePreparedStatements(db, 1); } /* @@ -122989,8 +125647,9 @@ SQLITE_PRIVATE Table *sqlite3SrcListLookup(Parse *pParse, SrcList *pSrc){ Table *pTab; assert( pItem && pSrc->nSrc>=1 ); pTab = sqlite3LocateTableItem(pParse, 0, pItem); - sqlite3DeleteTable(pParse->db, pItem->pTab); + if( pItem->pTab ) sqlite3DeleteTable(pParse->db, pItem->pTab); pItem->pTab = pTab; + pItem->fg.notCte = 1; if( pTab ){ pTab->nTabRef++; if( pItem->fg.isIndexedBy && sqlite3IndexedByLookup(pParse, pItem) ){ @@ -123070,13 +125729,15 @@ static int tabIsReadOnly(Parse *pParse, Table *pTab){ ** If pTab is writable but other errors have occurred -> return 1. ** If pTab is writable and no prior errors -> return 0; */ -SQLITE_PRIVATE int sqlite3IsReadOnly(Parse *pParse, Table *pTab, int viewOk){ +SQLITE_PRIVATE int sqlite3IsReadOnly(Parse *pParse, Table *pTab, Trigger *pTrigger){ if( tabIsReadOnly(pParse, pTab) ){ sqlite3ErrorMsg(pParse, "table %s may not be modified", pTab->zName); return 1; } #ifndef SQLITE_OMIT_VIEW - if( !viewOk && IsView(pTab) ){ + if( IsView(pTab) + && (pTrigger==0 || (pTrigger->bReturning && pTrigger->pNext==0)) + ){ sqlite3ErrorMsg(pParse,"cannot modify %s because it is a view",pTab->zName); return 1; } @@ -123141,7 +125802,7 @@ SQLITE_PRIVATE Expr *sqlite3LimitWhere( sqlite3 *db = pParse->db; Expr *pLhs = NULL; /* LHS of IN(SELECT...) operator */ Expr *pInClause = NULL; /* WHERE rowid IN ( select ) */ - ExprList *pEList = NULL; /* Expression list contaning only pSelectRowid */ + ExprList *pEList = NULL; /* Expression list containing only pSelectRowid*/ SrcList *pSelectSrc = NULL; /* SELECT rowid FROM x ... (dup of pSrc) */ Select *pSelect = NULL; /* Complete SELECT tree */ Table *pTab; @@ -123179,14 +125840,20 @@ SQLITE_PRIVATE Expr *sqlite3LimitWhere( ); }else{ Index *pPk = sqlite3PrimaryKeyIndex(pTab); + assert( pPk!=0 ); + assert( pPk->nKeyCol>=1 ); if( pPk->nKeyCol==1 ){ - const char *zName = pTab->aCol[pPk->aiColumn[0]].zCnName; + const char *zName; + assert( pPk->aiColumn[0]>=0 && pPk->aiColumn[0]nCol ); + zName = pTab->aCol[pPk->aiColumn[0]].zCnName; pLhs = sqlite3Expr(db, TK_ID, zName); pEList = sqlite3ExprListAppend(pParse, 0, sqlite3Expr(db, TK_ID, zName)); }else{ int i; for(i=0; inKeyCol; i++){ - Expr *p = sqlite3Expr(db, TK_ID, pTab->aCol[pPk->aiColumn[i]].zCnName); + Expr *p; + assert( pPk->aiColumn[i]>=0 && pPk->aiColumn[i]nCol ); + p = sqlite3Expr(db, TK_ID, pTab->aCol[pPk->aiColumn[i]].zCnName); pEList = sqlite3ExprListAppend(pParse, pEList, p); } pLhs = sqlite3PExpr(pParse, TK_VECTOR, 0, 0); @@ -123215,7 +125882,7 @@ SQLITE_PRIVATE Expr *sqlite3LimitWhere( pOrderBy,0,pLimit ); - /* now generate the new WHERE rowid IN clause for the DELETE/UDPATE */ + /* now generate the new WHERE rowid IN clause for the DELETE/UPDATE */ pInClause = sqlite3PExpr(pParse, TK_IN, pLhs, 0); sqlite3PExprAddSelect(pParse, pInClause, pSelect); return pInClause; @@ -123330,7 +125997,7 @@ SQLITE_PRIVATE void sqlite3DeleteFrom( goto delete_from_cleanup; } - if( sqlite3IsReadOnly(pParse, pTab, (pTrigger?1:0)) ){ + if( sqlite3IsReadOnly(pParse, pTab, pTrigger) ){ goto delete_from_cleanup; } iDb = sqlite3SchemaToIndex(db, pTab->pSchema); @@ -123439,12 +126106,12 @@ SQLITE_PRIVATE void sqlite3DeleteFrom( #endif /* SQLITE_OMIT_TRUNCATE_OPTIMIZATION */ { u16 wcf = WHERE_ONEPASS_DESIRED|WHERE_DUPLICATES_OK; - if( sNC.ncFlags & NC_VarSelect ) bComplex = 1; + if( sNC.ncFlags & NC_Subquery ) bComplex = 1; wcf |= (bComplex ? 0 : WHERE_ONEPASS_MULTIROW); if( HasRowid(pTab) ){ /* For a rowid table, initialize the RowSet to an empty set */ pPk = 0; - nPk = 1; + assert( nPk==1 ); iRowSet = ++pParse->nMem; sqlite3VdbeAddOp2(v, OP_Null, 0, iRowSet); }else{ @@ -123472,7 +126139,8 @@ SQLITE_PRIVATE void sqlite3DeleteFrom( if( pWInfo==0 ) goto delete_from_cleanup; eOnePass = sqlite3WhereOkOnePass(pWInfo, aiCurOnePass); assert( IsVirtual(pTab)==0 || eOnePass!=ONEPASS_MULTI ); - assert( IsVirtual(pTab) || bComplex || eOnePass!=ONEPASS_OFF ); + assert( IsVirtual(pTab) || bComplex || eOnePass!=ONEPASS_OFF + || OptimizationDisabled(db, SQLITE_OnePass) ); if( eOnePass!=ONEPASS_SINGLE ) sqlite3MultiWrite(pParse); if( sqlite3WhereUsesDeferredSeek(pWInfo) ){ sqlite3VdbeAddOp1(v, OP_FinishSeek, iTabCur); @@ -123809,9 +126477,11 @@ SQLITE_PRIVATE void sqlite3GenerateRowDelete( sqlite3FkActions(pParse, pTab, 0, iOld, 0, 0); /* Invoke AFTER DELETE trigger programs. */ - sqlite3CodeRowTrigger(pParse, pTrigger, - TK_DELETE, 0, TRIGGER_AFTER, pTab, iOld, onconf, iLabel - ); + if( pTrigger ){ + sqlite3CodeRowTrigger(pParse, pTrigger, + TK_DELETE, 0, TRIGGER_AFTER, pTab, iOld, onconf, iLabel + ); + } /* Jump here if the row had already been deleted before any BEFORE ** trigger programs were invoked. Or if a trigger program throws a @@ -124124,6 +126794,42 @@ static void lengthFunc( } } +/* +** Implementation of the octet_length() function +*/ +static void bytelengthFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + assert( argc==1 ); + UNUSED_PARAMETER(argc); + switch( sqlite3_value_type(argv[0]) ){ + case SQLITE_BLOB: { + sqlite3_result_int(context, sqlite3_value_bytes(argv[0])); + break; + } + case SQLITE_INTEGER: + case SQLITE_FLOAT: { + i64 m = sqlite3_context_db_handle(context)->enc<=SQLITE_UTF8 ? 1 : 2; + sqlite3_result_int64(context, sqlite3_value_bytes(argv[0])*m); + break; + } + case SQLITE_TEXT: { + if( sqlite3_value_encoding(argv[0])<=SQLITE_UTF8 ){ + sqlite3_result_int(context, sqlite3_value_bytes(argv[0])); + }else{ + sqlite3_result_int(context, sqlite3_value_bytes16(argv[0])); + } + break; + } + default: { + sqlite3_result_null(context); + break; + } + } +} + /* ** Implementation of the abs() function. ** @@ -124400,7 +127106,7 @@ static void roundFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ }else if( n==0 ){ r = (double)((sqlite_int64)(r+(r<0?-0.5:+0.5))); }else{ - zBuf = sqlite3_mprintf("%.*f",n,r); + zBuf = sqlite3_mprintf("%!.*f",n,r); if( zBuf==0 ){ sqlite3_result_error_nomem(context); return; @@ -124600,7 +127306,7 @@ struct compareInfo { /* ** For LIKE and GLOB matching on EBCDIC machines, assume that every -** character is exactly one byte in size. Also, provde the Utf8Read() +** character is exactly one byte in size. Also, provide the Utf8Read() ** macro for fast reading of the next character in the common case where ** the next character is ASCII. */ @@ -124833,7 +127539,7 @@ SQLITE_API int sqlite3_like_count = 0; /* ** Implementation of the like() SQL function. This function implements -** the build-in LIKE operator. The first argument to the function is the +** the built-in LIKE operator. The first argument to the function is the ** pattern and the second argument is the string. So, the SQL statements: ** ** A LIKE B @@ -125057,7 +127763,7 @@ SQLITE_PRIVATE void sqlite3QuoteValue(StrAccum *pStr, sqlite3_value *pValue){ } case SQLITE_BLOB: { char const *zBlob = sqlite3_value_blob(pValue); - int nBlob = sqlite3_value_bytes(pValue); + i64 nBlob = sqlite3_value_bytes(pValue); assert( zBlob==sqlite3_value_blob(pValue) ); /* No encoding change */ sqlite3StrAccumEnlarge(pStr, nBlob*2 + 4); if( pStr->accError==0 ){ @@ -125166,6 +127872,7 @@ static void charFunc( *zOut++ = 0x80 + (u8)(c & 0x3F); } \ } + *zOut = 0; sqlite3_result_text64(context, (char*)z, zOut-z, sqlite3_free, SQLITE_UTF8); } @@ -125198,6 +127905,96 @@ static void hexFunc( } } +/* +** Buffer zStr contains nStr bytes of utf-8 encoded text. Return 1 if zStr +** contains character ch, or 0 if it does not. +*/ +static int strContainsChar(const u8 *zStr, int nStr, u32 ch){ + const u8 *zEnd = &zStr[nStr]; + const u8 *z = zStr; + while( zrSum; + volatile double t = s + r; + if( fabs(s) > fabs(r) ){ + pSum->rErr += (s - t) + r; + }else{ + pSum->rErr += (r - t) + s; + } + pSum->rSum = t; +} + +/* +** Add a (possibly large) integer to the running sum. +*/ +static void kahanBabuskaNeumaierStepInt64(volatile SumCtx *pSum, i64 iVal){ + if( iVal<=-4503599627370496LL || iVal>=+4503599627370496LL ){ + i64 iBig, iSm; + iSm = iVal % 16384; + iBig = iVal - iSm; + kahanBabuskaNeumaierStep(pSum, iBig); + kahanBabuskaNeumaierStep(pSum, iSm); + }else{ + kahanBabuskaNeumaierStep(pSum, (double)iVal); + } +} + +/* +** Initialize the Kahan-Babaska-Neumaier sum from a 64-bit integer +*/ +static void kahanBabuskaNeumaierInit( + volatile SumCtx *p, + i64 iVal +){ + if( iVal<=-4503599627370496LL || iVal>=+4503599627370496LL ){ + i64 iSm = iVal % 16384; + p->rSum = (double)(iVal - iSm); + p->rErr = (double)iSm; + }else{ + p->rSum = (double)iVal; + p->rErr = 0.0; + } +} + /* ** Routines used to compute the sum, average, and total. ** @@ -125542,15 +128397,29 @@ static void sumStep(sqlite3_context *context, int argc, sqlite3_value **argv){ type = sqlite3_value_numeric_type(argv[0]); if( p && type!=SQLITE_NULL ){ p->cnt++; - if( type==SQLITE_INTEGER ){ - i64 v = sqlite3_value_int64(argv[0]); - p->rSum += v; - if( (p->approx|p->overflow)==0 && sqlite3AddInt64(&p->iSum, v) ){ - p->approx = p->overflow = 1; + if( p->approx==0 ){ + if( type!=SQLITE_INTEGER ){ + kahanBabuskaNeumaierInit(p, p->iSum); + p->approx = 1; + kahanBabuskaNeumaierStep(p, sqlite3_value_double(argv[0])); + }else{ + i64 x = p->iSum; + if( sqlite3AddInt64(&x, sqlite3_value_int64(argv[0]))==0 ){ + p->iSum = x; + }else{ + p->ovrfl = 1; + kahanBabuskaNeumaierInit(p, p->iSum); + p->approx = 1; + kahanBabuskaNeumaierStepInt64(p, sqlite3_value_int64(argv[0])); + } } }else{ - p->rSum += sqlite3_value_double(argv[0]); - p->approx = 1; + if( type==SQLITE_INTEGER ){ + kahanBabuskaNeumaierStepInt64(p, sqlite3_value_int64(argv[0])); + }else{ + p->ovrfl = 0; + kahanBabuskaNeumaierStep(p, sqlite3_value_double(argv[0])); + } } } } @@ -125567,13 +128436,18 @@ static void sumInverse(sqlite3_context *context, int argc, sqlite3_value**argv){ if( ALWAYS(p) && type!=SQLITE_NULL ){ assert( p->cnt>0 ); p->cnt--; - assert( type==SQLITE_INTEGER || p->approx ); - if( type==SQLITE_INTEGER && p->approx==0 ){ - i64 v = sqlite3_value_int64(argv[0]); - p->rSum -= v; - p->iSum -= v; + if( !p->approx ){ + p->iSum -= sqlite3_value_int64(argv[0]); + }else if( type==SQLITE_INTEGER ){ + i64 iVal = sqlite3_value_int64(argv[0]); + if( iVal!=SMALLEST_INT64 ){ + kahanBabuskaNeumaierStepInt64(p, -iVal); + }else{ + kahanBabuskaNeumaierStepInt64(p, LARGEST_INT64); + kahanBabuskaNeumaierStepInt64(p, 1); + } }else{ - p->rSum -= sqlite3_value_double(argv[0]); + kahanBabuskaNeumaierStep(p, -sqlite3_value_double(argv[0])); } } } @@ -125584,10 +128458,14 @@ static void sumFinalize(sqlite3_context *context){ SumCtx *p; p = sqlite3_aggregate_context(context, 0); if( p && p->cnt>0 ){ - if( p->overflow ){ - sqlite3_result_error(context,"integer overflow",-1); - }else if( p->approx ){ - sqlite3_result_double(context, p->rSum); + if( p->approx ){ + if( p->ovrfl ){ + sqlite3_result_error(context,"integer overflow",-1); + }else if( !sqlite3IsNaN(p->rErr) ){ + sqlite3_result_double(context, p->rSum+p->rErr); + }else{ + sqlite3_result_double(context, p->rSum); + } }else{ sqlite3_result_int64(context, p->iSum); } @@ -125597,14 +128475,29 @@ static void avgFinalize(sqlite3_context *context){ SumCtx *p; p = sqlite3_aggregate_context(context, 0); if( p && p->cnt>0 ){ - sqlite3_result_double(context, p->rSum/(double)p->cnt); + double r; + if( p->approx ){ + r = p->rSum; + if( !sqlite3IsNaN(p->rErr) ) r += p->rErr; + }else{ + r = (double)(p->iSum); + } + sqlite3_result_double(context, r/(double)p->cnt); } } static void totalFinalize(sqlite3_context *context){ SumCtx *p; + double r = 0.0; p = sqlite3_aggregate_context(context, 0); - /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */ - sqlite3_result_double(context, p ? p->rSum : (double)0); + if( p ){ + if( p->approx ){ + r = p->rSum; + if( !sqlite3IsNaN(p->rErr) ) r += p->rErr; + }else{ + r = (double)(p->iSum); + } + } + sqlite3_result_double(context, r); } /* @@ -125826,7 +128719,7 @@ static void groupConcatInverse( if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; pGCC = (GroupConcatCtx*)sqlite3_aggregate_context(context, sizeof(*pGCC)); /* pGCC is always non-NULL since groupConcatStep() will have always - ** run frist to initialize it */ + ** run first to initialize it */ if( ALWAYS(pGCC) ){ int nVS; /* Must call sqlite3_value_text() to convert the argument into text prior @@ -125910,8 +128803,10 @@ SQLITE_PRIVATE void sqlite3RegisterPerConnectionBuiltinFunctions(sqlite3 *db){ ** sensitive. */ SQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3 *db, int caseSensitive){ + FuncDef *pDef; struct compareInfo *pInfo; int flags; + int nArg; if( caseSensitive ){ pInfo = (struct compareInfo*)&likeInfoAlt; flags = SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE; @@ -125919,10 +128814,13 @@ SQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3 *db, int caseSensitive) pInfo = (struct compareInfo*)&likeInfoNorm; flags = SQLITE_FUNC_LIKE; } - sqlite3CreateFunc(db, "like", 2, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0, 0, 0); - sqlite3CreateFunc(db, "like", 3, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0, 0, 0); - sqlite3FindFunction(db, "like", 2, SQLITE_UTF8, 0)->funcFlags |= flags; - sqlite3FindFunction(db, "like", 3, SQLITE_UTF8, 0)->funcFlags |= flags; + for(nArg=2; nArg<=3; nArg++){ + sqlite3CreateFunc(db, "like", nArg, SQLITE_UTF8, pInfo, likeFunc, + 0, 0, 0, 0, 0); + pDef = sqlite3FindFunction(db, "like", nArg, SQLITE_UTF8, 0); + pDef->funcFlags |= flags; + pDef->funcFlags &= ~SQLITE_FUNC_UNSAFE; + } } /* @@ -126043,6 +128941,18 @@ static void ceilingFunc( static double xCeil(double x){ return ceil(x); } static double xFloor(double x){ return floor(x); } +/* +** Some systems do not have log2() and log10() in their standard math +** libraries. +*/ +#if defined(HAVE_LOG10) && HAVE_LOG10==0 +# define log10(X) (0.4342944819032517867*log(X)) +#endif +#if defined(HAVE_LOG2) && HAVE_LOG2==0 +# define log2(X) (1.442695040888963456*log(X)) +#endif + + /* ** Implementation of SQL functions: ** @@ -126081,17 +128991,15 @@ static void logFunc( } ans = log(x)/b; }else{ - ans = log(x); switch( SQLITE_PTR_TO_INT(sqlite3_user_data(context)) ){ case 1: - /* Convert from natural logarithm to log base 10 */ - ans /= M_LN10; + ans = log10(x); break; case 2: - /* Convert from natural logarithm to log base 2 */ - ans /= M_LN2; + ans = log2(x); break; default: + ans = log(x); break; } } @@ -126160,6 +129068,7 @@ static void piFunc( sqlite3_value **argv ){ assert( argc==0 ); + (void)argv; sqlite3_result_double(context, M_PI); } @@ -126183,6 +129092,37 @@ static void signFunc( sqlite3_result_int(context, x<0.0 ? -1 : x>0.0 ? +1 : 0); } +#ifdef SQLITE_DEBUG +/* +** Implementation of fpdecode(x,y,z) function. +** +** x is a real number that is to be decoded. y is the precision. +** z is the maximum real precision. +*/ +static void fpdecodeFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + FpDecode s; + double x; + int y, z; + char zBuf[100]; + UNUSED_PARAMETER(argc); + assert( argc==3 ); + x = sqlite3_value_double(argv[0]); + y = sqlite3_value_int(argv[1]); + z = sqlite3_value_int(argv[2]); + sqlite3FpDecode(&s, x, y, z); + if( s.isSpecial==2 ){ + sqlite3_snprintf(sizeof(zBuf), zBuf, "NaN"); + }else{ + sqlite3_snprintf(sizeof(zBuf), zBuf, "%c%.*s/%d", s.sign, s.n, s.z, s.iDP); + } + sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT); +} +#endif /* SQLITE_DEBUG */ + /* ** All of the FuncDef structures in the aBuiltinFunc[] array above ** to the global function hash table. This occurs at start-time (as @@ -126247,12 +129187,16 @@ SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(void){ FUNCTION2(typeof, 1, 0, 0, typeofFunc, SQLITE_FUNC_TYPEOF), FUNCTION2(subtype, 1, 0, 0, subtypeFunc, SQLITE_FUNC_TYPEOF), FUNCTION2(length, 1, 0, 0, lengthFunc, SQLITE_FUNC_LENGTH), + FUNCTION2(octet_length, 1, 0, 0, bytelengthFunc,SQLITE_FUNC_BYTELEN), FUNCTION(instr, 2, 0, 0, instrFunc ), FUNCTION(printf, -1, 0, 0, printfFunc ), FUNCTION(format, -1, 0, 0, printfFunc ), FUNCTION(unicode, 1, 0, 0, unicodeFunc ), FUNCTION(char, -1, 0, 0, charFunc ), FUNCTION(abs, 1, 0, 0, absFunc ), +#ifdef SQLITE_DEBUG + FUNCTION(fpdecode, 3, 0, 0, fpdecodeFunc ), +#endif #ifndef SQLITE_OMIT_FLOATING_POINT FUNCTION(round, 1, 0, 0, roundFunc ), FUNCTION(round, 2, 0, 0, roundFunc ), @@ -126260,6 +129204,8 @@ SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(void){ FUNCTION(upper, 1, 0, 0, upperFunc ), FUNCTION(lower, 1, 0, 0, lowerFunc ), FUNCTION(hex, 1, 0, 0, hexFunc ), + FUNCTION(unhex, 1, 0, 0, unhexFunc ), + FUNCTION(unhex, 2, 0, 0, unhexFunc ), INLINE_FUNC(ifnull, 2, INLINEFUNC_coalesce, 0 ), VFUNCTION(random, 0, 0, 0, randomFunc ), VFUNCTION(randomblob, 1, 0, 0, randomBlob ), @@ -127690,22 +130636,22 @@ static Trigger *fkActionTrigger( if( action==OE_Restrict ){ int iDb = sqlite3SchemaToIndex(db, pTab->pSchema); - Token tFrom; - Token tDb; + SrcList *pSrc; Expr *pRaise; - tFrom.z = zFrom; - tFrom.n = nFrom; - tDb.z = db->aDb[iDb].zDbSName; - tDb.n = sqlite3Strlen30(tDb.z); - pRaise = sqlite3Expr(db, TK_RAISE, "FOREIGN KEY constraint failed"); if( pRaise ){ pRaise->affExpr = OE_Abort; } + pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0); + if( pSrc ){ + assert( pSrc->nSrc==1 ); + pSrc->a[0].zName = sqlite3DbStrDup(db, zFrom); + pSrc->a[0].zDatabase = sqlite3DbStrDup(db, db->aDb[iDb].zDbSName); + } pSelect = sqlite3SelectNew(pParse, sqlite3ExprListAppend(pParse, 0, pRaise), - sqlite3SrcListAppend(pParse, 0, &tDb, &tFrom), + pSrc, pWhere, 0, 0, 0, 0, 0 ); @@ -127821,9 +130767,8 @@ SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *db, Table *pTab){ if( pFKey->pPrevTo ){ pFKey->pPrevTo->pNextTo = pFKey->pNextTo; }else{ - void *p = (void *)pFKey->pNextTo; - const char *z = (p ? pFKey->pNextTo->zTo : pFKey->zTo); - sqlite3HashInsert(&pTab->pSchema->fkeyHash, z, p); + const char *z = (pFKey->pNextTo ? pFKey->pNextTo->zTo : pFKey->zTo); + sqlite3HashInsert(&pTab->pSchema->fkeyHash, z, pFKey->pNextTo); } if( pFKey->pNextTo ){ pFKey->pNextTo->pPrevTo = pFKey->pPrevTo; @@ -127886,8 +130831,10 @@ SQLITE_PRIVATE void sqlite3OpenTable( assert( pParse->pVdbe!=0 ); v = pParse->pVdbe; assert( opcode==OP_OpenWrite || opcode==OP_OpenRead ); - sqlite3TableLock(pParse, iDb, pTab->tnum, - (opcode==OP_OpenWrite)?1:0, pTab->zName); + if( !pParse->db->noSharedCache ){ + sqlite3TableLock(pParse, iDb, pTab->tnum, + (opcode==OP_OpenWrite)?1:0, pTab->zName); + } if( HasRowid(pTab) ){ sqlite3VdbeAddOp4Int(v, opcode, iCur, pTab->tnum, iDb, pTab->nNVCol); VdbeComment((v, "%s", pTab->zName)); @@ -127921,46 +130868,48 @@ SQLITE_PRIVATE void sqlite3OpenTable( ** is managed along with the rest of the Index structure. It will be ** released when sqlite3DeleteIndex() is called. */ -SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(sqlite3 *db, Index *pIdx){ +static SQLITE_NOINLINE const char *computeIndexAffStr(sqlite3 *db, Index *pIdx){ + /* The first time a column affinity string for a particular index is + ** required, it is allocated and populated here. It is then stored as + ** a member of the Index structure for subsequent use. + ** + ** The column affinity string will eventually be deleted by + ** sqliteDeleteIndex() when the Index structure itself is cleaned + ** up. + */ + int n; + Table *pTab = pIdx->pTable; + pIdx->zColAff = (char *)sqlite3DbMallocRaw(0, pIdx->nColumn+1); if( !pIdx->zColAff ){ - /* The first time a column affinity string for a particular index is - ** required, it is allocated and populated here. It is then stored as - ** a member of the Index structure for subsequent use. - ** - ** The column affinity string will eventually be deleted by - ** sqliteDeleteIndex() when the Index structure itself is cleaned - ** up. - */ - int n; - Table *pTab = pIdx->pTable; - pIdx->zColAff = (char *)sqlite3DbMallocRaw(0, pIdx->nColumn+1); - if( !pIdx->zColAff ){ - sqlite3OomFault(db); - return 0; - } - for(n=0; nnColumn; n++){ - i16 x = pIdx->aiColumn[n]; - char aff; - if( x>=0 ){ - aff = pTab->aCol[x].affinity; - }else if( x==XN_ROWID ){ - aff = SQLITE_AFF_INTEGER; - }else{ - assert( x==XN_EXPR ); - assert( pIdx->bHasExpr ); - assert( pIdx->aColExpr!=0 ); - aff = sqlite3ExprAffinity(pIdx->aColExpr->a[n].pExpr); - } - if( affSQLITE_AFF_NUMERIC) aff = SQLITE_AFF_NUMERIC; - pIdx->zColAff[n] = aff; + sqlite3OomFault(db); + return 0; + } + for(n=0; nnColumn; n++){ + i16 x = pIdx->aiColumn[n]; + char aff; + if( x>=0 ){ + aff = pTab->aCol[x].affinity; + }else if( x==XN_ROWID ){ + aff = SQLITE_AFF_INTEGER; + }else{ + assert( x==XN_EXPR ); + assert( pIdx->bHasExpr ); + assert( pIdx->aColExpr!=0 ); + aff = sqlite3ExprAffinity(pIdx->aColExpr->a[n].pExpr); } - pIdx->zColAff[n] = 0; + if( affSQLITE_AFF_NUMERIC) aff = SQLITE_AFF_NUMERIC; + pIdx->zColAff[n] = aff; } - + pIdx->zColAff[n] = 0; + return pIdx->zColAff; +} +SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(sqlite3 *db, Index *pIdx){ + if( !pIdx->zColAff ) return computeIndexAffStr(db, pIdx); return pIdx->zColAff; } + /* ** Compute an affinity string for a table. Space is obtained ** from sqlite3DbMalloc(). The caller is responsible for freeing @@ -128014,7 +130963,7 @@ SQLITE_PRIVATE char *sqlite3TableAffinityStr(sqlite3 *db, const Table *pTab){ ** For STRICT tables: ** ------------------ ** -** Generate an appropropriate OP_TypeCheck opcode that will verify the +** Generate an appropriate OP_TypeCheck opcode that will verify the ** datatypes against the column definitions in pTab. If iReg==0, that ** means an OP_MakeRecord opcode has already been generated and should be ** the last opcode generated. The new OP_TypeCheck needs to be inserted @@ -128645,7 +131594,7 @@ SQLITE_PRIVATE void sqlite3Insert( /* Cannot insert into a read-only table. */ - if( sqlite3IsReadOnly(pParse, pTab, tmask) ){ + if( sqlite3IsReadOnly(pParse, pTab, pTrigger) ){ goto insert_cleanup; } @@ -129092,7 +132041,7 @@ SQLITE_PRIVATE void sqlite3Insert( } /* Copy the new data already generated. */ - assert( pTab->nNVCol>0 ); + assert( pTab->nNVCol>0 || pParse->nErr>0 ); sqlite3VdbeAddOp3(v, OP_Copy, regRowid+1, regCols+1, pTab->nNVCol-1); #ifndef SQLITE_OMIT_GENERATED_COLUMNS @@ -129306,7 +132255,7 @@ SQLITE_PRIVATE void sqlite3Insert( /* This is the Walker callback from sqlite3ExprReferencesUpdatedColumn(). * Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this ** expression node references any of the -** columns that are being modifed by an UPDATE statement. +** columns that are being modified by an UPDATE statement. */ static int checkConstraintExprNode(Walker *pWalker, Expr *pExpr){ if( pExpr->op==TK_COLUMN ){ @@ -129529,7 +132478,7 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks( int *aiChng, /* column i is unchanged if aiChng[i]<0 */ Upsert *pUpsert /* ON CONFLICT clauses, if any. NULL otherwise */ ){ - Vdbe *v; /* VDBE under constrution */ + Vdbe *v; /* VDBE under construction */ Index *pIdx; /* Pointer to one of the indices */ Index *pPk = 0; /* The PRIMARY KEY index for WITHOUT ROWID tables */ sqlite3 *db; /* Database connection */ @@ -129644,6 +132593,7 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks( case OE_Fail: { char *zMsg = sqlite3MPrintf(db, "%s.%s", pTab->zName, pCol->zCnName); + testcase( zMsg==0 && db->mallocFailed==0 ); sqlite3VdbeAddOp3(v, OP_HaltIfNull, SQLITE_CONSTRAINT_NOTNULL, onError, iReg); sqlite3VdbeAppendP4(v, zMsg, P4_DYNAMIC); @@ -130011,7 +132961,7 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks( pIdx; pIdx = indexIteratorNext(&sIdxIter, &ix) ){ - int regIdx; /* Range of registers hold conent for pIdx */ + int regIdx; /* Range of registers holding content for pIdx */ int regR; /* Range of registers holding conflicting PK */ int iThisCur; /* Cursor for this UNIQUE index */ int addrUniqueOk; /* Jump here if the UNIQUE constraint is satisfied */ @@ -130506,6 +133456,8 @@ SQLITE_PRIVATE int sqlite3OpenTableAndIndices( assert( op==OP_OpenRead || op==OP_OpenWrite ); assert( op==OP_OpenWrite || p5==0 ); + assert( piDataCur!=0 ); + assert( piIdxCur!=0 ); if( IsVirtual(pTab) ){ /* This routine is a no-op for virtual tables. Leave the output ** variables *piDataCur and *piIdxCur set to illegal cursor numbers @@ -130518,18 +133470,18 @@ SQLITE_PRIVATE int sqlite3OpenTableAndIndices( assert( v!=0 ); if( iBase<0 ) iBase = pParse->nTab; iDataCur = iBase++; - if( piDataCur ) *piDataCur = iDataCur; + *piDataCur = iDataCur; if( HasRowid(pTab) && (aToOpen==0 || aToOpen[0]) ){ sqlite3OpenTable(pParse, iDataCur, iDb, pTab, op); - }else{ + }else if( pParse->db->noSharedCache==0 ){ sqlite3TableLock(pParse, iDb, pTab->tnum, op==OP_OpenWrite, pTab->zName); } - if( piIdxCur ) *piIdxCur = iBase; + *piIdxCur = iBase; for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){ int iIdxCur = iBase++; assert( pIdx->pSchema==pTab->pSchema ); if( IsPrimaryKeyIndex(pIdx) && !HasRowid(pTab) ){ - if( piDataCur ) *piDataCur = iIdxCur; + *piDataCur = iIdxCur; p5 = 0; } if( aToOpen==0 || aToOpen[i+1] ){ @@ -130827,7 +133779,7 @@ static int xferOptimization( } #endif #ifndef SQLITE_OMIT_FOREIGN_KEY - /* Disallow the transfer optimization if the destination table constains + /* Disallow the transfer optimization if the destination table contains ** any foreign key constraints. This is more restrictive than necessary. ** But the main beneficiary of the transfer optimization is the VACUUM ** command, and the VACUUM command disables foreign key constraints. So @@ -131535,6 +134487,10 @@ struct sqlite3_api_routines { const char *(*db_name)(sqlite3*,int); /* Version 3.40.0 and later */ int (*value_encoding)(sqlite3_value*); + /* Version 3.41.0 and later */ + int (*is_interrupted)(sqlite3*); + /* Version 3.43.0 and later */ + int (*stmt_explain)(sqlite3_stmt*,int); }; /* @@ -131861,6 +134817,10 @@ typedef int (*sqlite3_loadext_entry)( #define sqlite3_db_name sqlite3_api->db_name /* Version 3.40.0 and later */ #define sqlite3_value_encoding sqlite3_api->value_encoding +/* Version 3.41.0 and later */ +#define sqlite3_is_interrupted sqlite3_api->is_interrupted +/* Version 3.43.0 and later */ +#define sqlite3_stmt_explain sqlite3_api->stmt_explain #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */ #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) @@ -132375,7 +135335,11 @@ static const sqlite3_api_routines sqlite3Apis = { #endif sqlite3_db_name, /* Version 3.40.0 and later */ - sqlite3_value_encoding + sqlite3_value_encoding, + /* Version 3.41.0 and later */ + sqlite3_is_interrupted, + /* Version 3.43.0 and later */ + sqlite3_stmt_explain }; /* True if x is the directory separator character @@ -132448,15 +135412,25 @@ static int sqlite3LoadExtension( /* tag-20210611-1. Some dlopen() implementations will segfault if given ** an oversize filename. Most filesystems have a pathname limit of 4K, ** so limit the extension filename length to about twice that. - ** https://sqlite.org/forum/forumpost/08a0d6d9bf */ + ** https://sqlite.org/forum/forumpost/08a0d6d9bf + ** + ** Later (2023-03-25): Save an extra 6 bytes for the filename suffix. + ** See https://sqlite.org/forum/forumpost/24083b579d. + */ if( nMsg>SQLITE_MAX_PATHLEN ) goto extension_not_found; + /* Do not allow sqlite3_load_extension() to link to a copy of the + ** running application, by passing in an empty filename. */ + if( nMsg==0 ) goto extension_not_found; + handle = sqlite3OsDlOpen(pVfs, zFile); #if SQLITE_OS_UNIX || SQLITE_OS_WIN for(ii=0; iiaDb[iDb].zDbSName; sqlite3CodeVerifySchema(pParse, iDb); sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName); - if( pTab->nCol+regRow>pParse->nMem ) pParse->nMem = pTab->nCol + regRow; + sqlite3TouchRegister(pParse, pTab->nCol+regRow); sqlite3OpenTable(pParse, 0, iDb, pTab, OP_OpenRead); sqlite3VdbeLoadString(v, regResult, pTab->zName); assert( IsOrdinaryTable(pTab) ); @@ -134992,7 +137966,7 @@ SQLITE_PRIVATE void sqlite3Pragma( ** regRow..regRow+n. If any of the child key values are NULL, this ** row cannot cause an FK violation. Jump directly to addrOk in ** this case. */ - if( regRow+pFK->nCol>pParse->nMem ) pParse->nMem = regRow+pFK->nCol; + sqlite3TouchRegister(pParse, regRow + pFK->nCol); for(j=0; jnCol; j++){ int iCol = aiCols ? aiCols[j] : pFK->aCol[j].iFrom; sqlite3ExprCodeGetColumnOfTable(v, pTab, 0, iCol, regRow+j); @@ -135059,9 +138033,9 @@ SQLITE_PRIVATE void sqlite3Pragma( ** The "quick_check" is reduced version of ** integrity_check designed to detect most database corruption ** without the overhead of cross-checking indexes. Quick_check - ** is linear time wherease integrity_check is O(NlogN). + ** is linear time whereas integrity_check is O(NlogN). ** - ** The maximum nubmer of errors is 100 by default. A different default + ** The maximum number of errors is 100 by default. A different default ** can be specified using a numeric parameter N. ** ** Or, the parameter N can be the name of a table. In that case, only @@ -135121,6 +138095,7 @@ SQLITE_PRIVATE void sqlite3Pragma( if( iDb>=0 && i!=iDb ) continue; sqlite3CodeVerifySchema(pParse, i); + pParse->okConstFactor = 0; /* tag-20230327-1 */ /* Do an integrity check of the B-Tree ** @@ -135156,7 +138131,7 @@ SQLITE_PRIVATE void sqlite3Pragma( aRoot[0] = cnt; /* Make sure sufficient number of registers have been allocated */ - pParse->nMem = MAX( pParse->nMem, 8+mxIdx ); + sqlite3TouchRegister(pParse, 8+mxIdx); sqlite3ClearTempRegCache(pParse); /* Do the b-tree integrity checks */ @@ -135212,12 +138187,21 @@ SQLITE_PRIVATE void sqlite3Pragma( ** will also prepopulate the cursor column cache that is used ** by the OP_IsType code, so it is a required step. */ - mxCol = pTab->nCol-1; - while( mxCol>=0 - && ((pTab->aCol[mxCol].colFlags & COLFLAG_VIRTUAL)!=0 - || pTab->iPKey==mxCol) ) mxCol--; + assert( !IsVirtual(pTab) ); + if( HasRowid(pTab) ){ + mxCol = -1; + for(j=0; jnCol; j++){ + if( (pTab->aCol[j].colFlags & COLFLAG_VIRTUAL)==0 ) mxCol++; + } + if( mxCol==pTab->iPKey ) mxCol--; + }else{ + /* COLFLAG_VIRTUAL columns are not included in the WITHOUT ROWID + ** PK index column-count, so there is no need to account for them + ** in this case. */ + mxCol = sqlite3PrimaryKeyIndex(pTab)->nColumn-1; + } if( mxCol>=0 ){ - sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, mxCol, 3); + sqlite3VdbeAddOp3(v, OP_Column, iDataCur, mxCol, 3); sqlite3VdbeTypeofColumn(v, 3); } @@ -135297,15 +138281,29 @@ SQLITE_PRIVATE void sqlite3Pragma( labelOk = sqlite3VdbeMakeLabel(pParse); if( pCol->notNull ){ /* (1) NOT NULL columns may not contain a NULL */ + int jmp3; int jmp2 = sqlite3VdbeAddOp4Int(v, OP_IsType, p1, labelOk, p3, p4); - sqlite3VdbeChangeP5(v, 0x0f); VdbeCoverage(v); + if( p1<0 ){ + sqlite3VdbeChangeP5(v, 0x0f); /* INT, REAL, TEXT, or BLOB */ + jmp3 = jmp2; + }else{ + sqlite3VdbeChangeP5(v, 0x0d); /* INT, TEXT, or BLOB */ + /* OP_IsType does not detect NaN values in the database file + ** which should be treated as a NULL. So if the header type + ** is REAL, we have to load the actual data using OP_Column + ** to reliably determine if the value is a NULL. */ + sqlite3VdbeAddOp3(v, OP_Column, p1, p3, 3); + jmp3 = sqlite3VdbeAddOp2(v, OP_NotNull, 3, labelOk); + VdbeCoverage(v); + } zErr = sqlite3MPrintf(db, "NULL value in %s.%s", pTab->zName, pCol->zCnName); sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, zErr, P4_DYNAMIC); if( doTypeCheck ){ sqlite3VdbeGoto(v, labelError); sqlite3VdbeJumpHere(v, jmp2); + sqlite3VdbeJumpHere(v, jmp3); }else{ /* VDBE byte code will fall thru */ } @@ -135385,7 +138383,8 @@ SQLITE_PRIVATE void sqlite3Pragma( if( !isQuick ){ /* Omit the remaining tests for quick_check */ /* Validate index entries for the current row */ for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){ - int jmp2, jmp3, jmp4, jmp5; + int jmp2, jmp3, jmp4, jmp5, label6; + int kk; int ckUniq = sqlite3VdbeMakeLabel(pParse); if( pPk==pIdx ) continue; r1 = sqlite3GenerateIndexKey(pParse, pIdx, iDataCur, 0, 0, &jmp3, @@ -135403,13 +138402,49 @@ SQLITE_PRIVATE void sqlite3Pragma( sqlite3VdbeAddOp3(v, OP_Concat, 4, 3, 3); jmp4 = integrityCheckResultRow(v); sqlite3VdbeJumpHere(v, jmp2); + + /* The OP_IdxRowid opcode is an optimized version of OP_Column + ** that extracts the rowid off the end of the index record. + ** But it only works correctly if index record does not have + ** any extra bytes at the end. Verify that this is the case. */ + if( HasRowid(pTab) ){ + int jmp7; + sqlite3VdbeAddOp2(v, OP_IdxRowid, iIdxCur+j, 3); + jmp7 = sqlite3VdbeAddOp3(v, OP_Eq, 3, 0, r1+pIdx->nColumn-1); + VdbeCoverageNeverNull(v); + sqlite3VdbeLoadString(v, 3, + "rowid not at end-of-record for row "); + sqlite3VdbeAddOp3(v, OP_Concat, 7, 3, 3); + sqlite3VdbeLoadString(v, 4, " of index "); + sqlite3VdbeGoto(v, jmp5-1); + sqlite3VdbeJumpHere(v, jmp7); + } + + /* Any indexed columns with non-BINARY collations must still hold + ** the exact same text value as the table. */ + label6 = 0; + for(kk=0; kknKeyCol; kk++){ + if( pIdx->azColl[kk]==sqlite3StrBINARY ) continue; + if( label6==0 ) label6 = sqlite3VdbeMakeLabel(pParse); + sqlite3VdbeAddOp3(v, OP_Column, iIdxCur+j, kk, 3); + sqlite3VdbeAddOp3(v, OP_Ne, 3, label6, r1+kk); VdbeCoverage(v); + } + if( label6 ){ + int jmp6 = sqlite3VdbeAddOp0(v, OP_Goto); + sqlite3VdbeResolveLabel(v, label6); + sqlite3VdbeLoadString(v, 3, "row "); + sqlite3VdbeAddOp3(v, OP_Concat, 7, 3, 3); + sqlite3VdbeLoadString(v, 4, " values differ from index "); + sqlite3VdbeGoto(v, jmp5-1); + sqlite3VdbeJumpHere(v, jmp6); + } + /* For UNIQUE indexes, verify that only one entry exists with the ** current key. The entry is unique if (1) any column is NULL ** or (2) the next entry has a different key */ if( IsUniqueIndex(pIdx) ){ int uniqOk = sqlite3VdbeMakeLabel(pParse); int jmp6; - int kk; for(kk=0; kknKeyCol; kk++){ int iCol = pIdx->aiColumn[kk]; assert( iCol!=XN_ROWID && iColnCol ); @@ -135758,7 +138793,7 @@ SQLITE_PRIVATE void sqlite3Pragma( Schema *pSchema; /* The current schema */ Table *pTab; /* A table in the schema */ Index *pIdx; /* An index of the table */ - LogEst szThreshold; /* Size threshold above which reanalysis is needd */ + LogEst szThreshold; /* Size threshold above which reanalysis needed */ char *zSubSql; /* SQL statement for the OP_SqlExec opcode */ u32 opMask; /* Mask of operations to perform */ @@ -136582,7 +139617,14 @@ SQLITE_PRIVATE int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg, u32 mFl #else encoding = SQLITE_UTF8; #endif - sqlite3SetTextEncoding(db, encoding); + if( db->nVdbeActive>0 && encoding!=ENC(db) + && (db->mDbFlags & DBFLAG_Vacuum)==0 + ){ + rc = SQLITE_LOCKED; + goto initone_error_out; + }else{ + sqlite3SetTextEncoding(db, encoding); + } }else{ /* If opening an attached database, the encoding much match ENC(db) */ if( (meta[BTREE_TEXT_ENCODING-1] & 3)!=ENC(db) ){ @@ -136796,8 +139838,8 @@ static void schemaIsValid(Parse *pParse){ sqlite3BtreeGetMeta(pBt, BTREE_SCHEMA_VERSION, (u32 *)&cookie); assert( sqlite3SchemaMutexHeld(db, iDb, 0) ); if( cookie!=db->aDb[iDb].pSchema->schema_cookie ){ + if( DbHasProperty(db, iDb, DB_SchemaLoaded) ) pParse->rc = SQLITE_SCHEMA; sqlite3ResetOneSchema(db, iDb); - pParse->rc = SQLITE_SCHEMA; } /* Close the transaction, if one was opened. */ @@ -136877,7 +139919,7 @@ SQLITE_PRIVATE void sqlite3ParseObjectReset(Parse *pParse){ ** immediately. ** ** Use this mechanism for uncommon cleanups. There is a higher setup -** cost for this mechansim (an extra malloc), so it should not be used +** cost for this mechanism (an extra malloc), so it should not be used ** for common cleanups that happen on most calls. But for less ** common cleanups, we save a single NULL-pointer comparison in ** sqlite3ParseObjectReset(), which reduces the total CPU cycle count. @@ -136969,9 +140011,18 @@ static int sqlite3Prepare( sParse.pOuterParse = db->pParse; db->pParse = &sParse; sParse.db = db; - sParse.pReprepare = pReprepare; + if( pReprepare ){ + sParse.pReprepare = pReprepare; + sParse.explain = sqlite3_stmt_isexplain((sqlite3_stmt*)pReprepare); + }else{ + assert( sParse.pReprepare==0 ); + } assert( ppStmt && *ppStmt==0 ); - if( db->mallocFailed ) sqlite3ErrorMsg(&sParse, "out of memory"); + if( db->mallocFailed ){ + sqlite3ErrorMsg(&sParse, "out of memory"); + db->errCode = rc = SQLITE_NOMEM; + goto end_prepare; + } assert( sqlite3_mutex_held(db->mutex) ); /* For a long-term use prepared statement avoid the use of @@ -137408,6 +140459,10 @@ struct SortCtx { } aDefer[4]; #endif struct RowLoadInfo *pDeferredRowLoad; /* Deferred row loading info or NULL */ +#ifdef SQLITE_ENABLE_STMT_SCANSTATUS + int addrPush; /* First instruction to push data into sorter */ + int addrPushEnd; /* Last instruction that pushes data into sorter */ +#endif }; #define SORTFLAG_UseSorter 0x01 /* Use SorterOpen instead of OpenEphemeral */ @@ -137571,7 +140626,7 @@ static Select *findRightmost(Select *p){ ** NATURAL FULL OUTER JT_NATRUAL|JT_LEFT|JT_RIGHT ** ** To preserve historical compatibly, SQLite also accepts a variety -** of other non-standard and in many cases non-sensical join types. +** of other non-standard and in many cases nonsensical join types. ** This routine makes as much sense at it can from the nonsense join ** type and returns a result. Examples of accepted nonsense join types ** include but are not limited to: @@ -137842,7 +140897,7 @@ static int sqlite3ProcessJoin(Parse *pParse, Select *p){ if( NEVER(pLeft->pTab==0 || pRightTab==0) ) continue; joinType = (pRight->fg.jointype & JT_OUTER)!=0 ? EP_OuterON : EP_InnerON; - /* If this is a NATURAL join, synthesize an approprate USING clause + /* If this is a NATURAL join, synthesize an appropriate USING clause ** to specify which columns should be joined. */ if( pRight->fg.jointype & JT_NATURAL ){ @@ -138056,14 +141111,18 @@ static void pushOntoSorter( ** (2) All output columns are included in the sort record. In that ** case regData==regOrigData. ** (3) Some output columns are omitted from the sort record due to - ** the SQLITE_ENABLE_SORTER_REFERENCE optimization, or due to the + ** the SQLITE_ENABLE_SORTER_REFERENCES optimization, or due to the ** SQLITE_ECEL_OMITREF optimization, or due to the - ** SortCtx.pDeferredRowLoad optimiation. In any of these cases + ** SortCtx.pDeferredRowLoad optimization. In any of these cases ** regOrigData is 0 to prevent this routine from trying to copy ** values that might not yet exist. */ assert( nData==1 || regData==regOrigData || regOrigData==0 ); +#ifdef SQLITE_ENABLE_STMT_SCANSTATUS + pSort->addrPush = sqlite3VdbeCurrentAddr(v); +#endif + if( nPrefixReg ){ assert( nPrefixReg==nExpr+bSeq ); regBase = regData - nPrefixReg; @@ -138110,7 +141169,7 @@ static void pushOntoSorter( testcase( pKI->nAllField > pKI->nKeyField+2 ); pOp->p4.pKeyInfo = sqlite3KeyInfoFromExprList(pParse,pSort->pOrderBy,nOBSat, pKI->nAllField-pKI->nKeyField-1); - pOp = 0; /* Ensure pOp not used after sqltie3VdbeAddOp3() */ + pOp = 0; /* Ensure pOp not used after sqlite3VdbeAddOp3() */ addrJmp = sqlite3VdbeCurrentAddr(v); sqlite3VdbeAddOp3(v, OP_Jump, addrJmp+1, 0, addrJmp+1); VdbeCoverage(v); pSort->labelBkOut = sqlite3VdbeMakeLabel(pParse); @@ -138164,6 +141223,9 @@ static void pushOntoSorter( sqlite3VdbeChangeP2(v, iSkip, pSort->labelOBLopt ? pSort->labelOBLopt : sqlite3VdbeCurrentAddr(v)); } +#ifdef SQLITE_ENABLE_STMT_SCANSTATUS + pSort->addrPushEnd = sqlite3VdbeCurrentAddr(v)-1; +#endif } /* @@ -138201,7 +141263,7 @@ static void codeOffset( ** The returned value in this case is a copy of parameter iTab. ** ** WHERE_DISTINCT_ORDERED: -** In this case rows are being delivered sorted order. The ephermal +** In this case rows are being delivered sorted order. The ephemeral ** table is not required. Instead, the current set of values ** is compared against previous row. If they match, the new row ** is not distinct and control jumps to VM address addrRepeat. Otherwise, @@ -138630,9 +141692,16 @@ static void selectInnerLoop( testcase( eDest==SRT_Fifo ); testcase( eDest==SRT_DistFifo ); sqlite3VdbeAddOp3(v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg); - if( pDest->zAffSdst ){ - sqlite3VdbeChangeP4(v, -1, pDest->zAffSdst, nResultCol); +#if !defined(SQLITE_ENABLE_NULL_TRIM) && defined(SQLITE_DEBUG) + /* A destination of SRT_Table and a non-zero iSDParm2 parameter means + ** that this is an "UPDATE ... FROM" on a virtual table or view. In this + ** case set the p5 parameter of the OP_MakeRecord to OPFLAG_NOCHNG_MAGIC. + ** This does not affect operation in any way - it just allows MakeRecord + ** to process OPFLAG_NOCHANGE values without an assert() failing. */ + if( eDest==SRT_Table && pDest->iSDParm2 ){ + sqlite3VdbeChangeP5(v, OPFLAG_NOCHNG_MAGIC); } +#endif #ifndef SQLITE_OMIT_CTE if( eDest==SRT_DistFifo ){ /* If the destination is DistFifo, then cursor (iParm+1) is open @@ -138990,6 +142059,16 @@ static void generateSortTail( int bSeq; /* True if sorter record includes seq. no. */ int nRefKey = 0; struct ExprList_item *aOutEx = p->pEList->a; +#ifdef SQLITE_ENABLE_STMT_SCANSTATUS + int addrExplain; /* Address of OP_Explain instruction */ +#endif + + ExplainQueryPlan2(addrExplain, (pParse, 0, + "USE TEMP B-TREE FOR %sORDER BY", pSort->nOBSat>0?"RIGHT PART OF ":"") + ); + sqlite3VdbeScanStatusRange(v, addrExplain,pSort->addrPush,pSort->addrPushEnd); + sqlite3VdbeScanStatusCounters(v, addrExplain, addrExplain, pSort->addrPush); + assert( addrBreak<0 ); if( pSort->labelBkOut ){ @@ -139102,6 +142181,7 @@ static void generateSortTail( VdbeComment((v, "%s", aOutEx[i].zEName)); } } + sqlite3VdbeScanStatusRange(v, addrExplain, addrExplain, -1); switch( eDest ){ case SRT_Table: case SRT_EphemTab: { @@ -139163,6 +142243,7 @@ static void generateSortTail( }else{ sqlite3VdbeAddOp2(v, OP_Next, iTab, addr); VdbeCoverage(v); } + sqlite3VdbeScanStatusRange(v, addrExplain, sqlite3VdbeCurrentAddr(v)-1, -1); if( pSort->regReturn ) sqlite3VdbeAddOp1(v, OP_Return, pSort->regReturn); sqlite3VdbeResolveLabel(v, addrBreak); } @@ -139424,17 +142505,10 @@ SQLITE_PRIVATE void sqlite3GenerateColumnNames( int fullName; /* TABLE.COLUMN if no AS clause and is a direct table ref */ int srcName; /* COLUMN or TABLE.COLUMN if no AS clause and is direct */ -#ifndef SQLITE_OMIT_EXPLAIN - /* If this is an EXPLAIN, skip this step */ - if( pParse->explain ){ - return; - } -#endif - if( pParse->colNamesSet ) return; /* Column names are determined by the left-most term of a compound select */ while( pSelect->pPrior ) pSelect = pSelect->pPrior; - SELECTTRACE(1,pParse,pSelect,("generating column names\n")); + TREETRACE(0x80,pParse,pSelect,("generating column names\n")); pTabList = pSelect->pSrc; pEList = pSelect->pEList; assert( v!=0 ); @@ -139534,7 +142608,7 @@ SQLITE_PRIVATE int sqlite3ColumnsFromExprList( *pnCol = nCol; *paCol = aCol; - for(i=0, pCol=aCol; imallocFailed; i++, pCol++){ + for(i=0, pCol=aCol; inErr; i++, pCol++){ struct ExprList_item *pX = &pEList->a[i]; struct ExprList_item *pCollide; /* Get an appropriate name for the column @@ -139584,7 +142658,10 @@ SQLITE_PRIVATE int sqlite3ColumnsFromExprList( if( zName[j]==':' ) nName = j; } zName = sqlite3MPrintf(db, "%.*z:%u", nName, zName, ++cnt); - if( cnt>3 ) sqlite3_randomness(sizeof(cnt), &cnt); + sqlite3ProgressCheck(pParse); + if( cnt>3 ){ + sqlite3_randomness(sizeof(cnt), &cnt); + } } pCol->zCnName = zName; pCol->hName = sqlite3StrIHash(zName); @@ -139597,71 +142674,104 @@ SQLITE_PRIVATE int sqlite3ColumnsFromExprList( } } sqlite3HashClear(&ht); - if( db->mallocFailed ){ + if( pParse->nErr ){ for(j=0; jrc; } return SQLITE_OK; } /* -** Add type and collation information to a column list based on -** a SELECT statement. +** pTab is a transient Table object that represents a subquery of some +** kind (maybe a parenthesized subquery in the FROM clause of a larger +** query, or a VIEW, or a CTE). This routine computes type information +** for that Table object based on the Select object that implements the +** subquery. For the purposes of this routine, "type information" means: ** -** The column list presumably came from selectColumnNamesFromExprList(). -** The column list has only names, not types or collations. This -** routine goes through and adds the types and collations. -** -** This routine requires that all identifiers in the SELECT -** statement be resolved. +** * The datatype name, as it might appear in a CREATE TABLE statement +** * Which collating sequence to use for the column +** * The affinity of the column */ -SQLITE_PRIVATE void sqlite3SelectAddColumnTypeAndCollation( - Parse *pParse, /* Parsing contexts */ - Table *pTab, /* Add column type information to this table */ - Select *pSelect, /* SELECT used to determine types and collations */ - char aff /* Default affinity for columns */ +SQLITE_PRIVATE void sqlite3SubqueryColumnTypes( + Parse *pParse, /* Parsing contexts */ + Table *pTab, /* Add column type information to this table */ + Select *pSelect, /* SELECT used to determine types and collations */ + char aff /* Default affinity. */ ){ sqlite3 *db = pParse->db; - NameContext sNC; Column *pCol; CollSeq *pColl; - int i; + int i,j; Expr *p; struct ExprList_item *a; + NameContext sNC; assert( pSelect!=0 ); assert( (pSelect->selFlags & SF_Resolved)!=0 ); - assert( pTab->nCol==pSelect->pEList->nExpr || db->mallocFailed ); - if( db->mallocFailed ) return; + assert( pTab->nCol==pSelect->pEList->nExpr || pParse->nErr>0 ); + assert( aff==SQLITE_AFF_NONE || aff==SQLITE_AFF_BLOB ); + if( db->mallocFailed || IN_RENAME_OBJECT ) return; + while( pSelect->pPrior ) pSelect = pSelect->pPrior; + a = pSelect->pEList->a; memset(&sNC, 0, sizeof(sNC)); sNC.pSrcList = pSelect->pSrc; - a = pSelect->pEList->a; for(i=0, pCol=pTab->aCol; inCol; i++, pCol++){ const char *zType; - i64 n, m; + i64 n; pTab->tabFlags |= (pCol->colFlags & COLFLAG_NOINSERT); p = a[i].pExpr; - zType = columnType(&sNC, p, 0, 0, 0); /* pCol->szEst = ... // Column size est for SELECT tables never used */ pCol->affinity = sqlite3ExprAffinity(p); + if( pCol->affinity<=SQLITE_AFF_NONE ){ + pCol->affinity = aff; + } + if( pCol->affinity>=SQLITE_AFF_TEXT && pSelect->pNext ){ + int m = 0; + Select *pS2; + for(m=0, pS2=pSelect->pNext; pS2; pS2=pS2->pNext){ + m |= sqlite3ExprDataType(pS2->pEList->a[i].pExpr); + } + if( pCol->affinity==SQLITE_AFF_TEXT && (m&0x01)!=0 ){ + pCol->affinity = SQLITE_AFF_BLOB; + }else + if( pCol->affinity>=SQLITE_AFF_NUMERIC && (m&0x02)!=0 ){ + pCol->affinity = SQLITE_AFF_BLOB; + } + if( pCol->affinity>=SQLITE_AFF_NUMERIC && p->op==TK_CAST ){ + pCol->affinity = SQLITE_AFF_FLEXNUM; + } + } + zType = columnType(&sNC, p, 0, 0, 0); + if( zType==0 || pCol->affinity!=sqlite3AffinityType(zType, 0) ){ + if( pCol->affinity==SQLITE_AFF_NUMERIC + || pCol->affinity==SQLITE_AFF_FLEXNUM + ){ + zType = "NUM"; + }else{ + zType = 0; + for(j=1; jaffinity ){ + zType = sqlite3StdType[j]; + break; + } + } + } + } if( zType ){ - m = sqlite3Strlen30(zType); + i64 m = sqlite3Strlen30(zType); n = sqlite3Strlen30(pCol->zCnName); pCol->zCnName = sqlite3DbReallocOrFree(db, pCol->zCnName, n+m+2); + pCol->colFlags &= ~(COLFLAG_HASTYPE|COLFLAG_HASCOLL); if( pCol->zCnName ){ memcpy(&pCol->zCnName[n+1], zType, m+1); pCol->colFlags |= COLFLAG_HASTYPE; - }else{ - testcase( pCol->colFlags & COLFLAG_HASTYPE ); - pCol->colFlags &= ~(COLFLAG_HASTYPE|COLFLAG_HASCOLL); } } - if( pCol->affinity<=SQLITE_AFF_NONE ) pCol->affinity = aff; pColl = sqlite3ExprCollSeq(pParse, p); if( pColl ){ assert( pTab->pIndex==0 ); @@ -139695,7 +142805,7 @@ SQLITE_PRIVATE Table *sqlite3ResultSetOfSelect(Parse *pParse, Select *pSelect, c pTab->zName = 0; pTab->nRowLogEst = 200; assert( 200==sqlite3LogEst(1048576) ); sqlite3ColumnsFromExprList(pParse, pSelect->pEList, &pTab->nCol, &pTab->aCol); - sqlite3SelectAddColumnTypeAndCollation(pParse, pTab, pSelect, aff); + sqlite3SubqueryColumnTypes(pParse, pTab, pSelect, aff); pTab->iPKey = -1; if( db->mallocFailed ){ sqlite3DeleteTable(db, pTab); @@ -139910,7 +143020,7 @@ static void generateWithRecursiveQuery( int iQueue; /* The Queue table */ int iDistinct = 0; /* To ensure unique results if UNION */ int eDest = SRT_Fifo; /* How to write to Queue */ - SelectDest destQueue; /* SelectDest targetting the Queue table */ + SelectDest destQueue; /* SelectDest targeting the Queue table */ int i; /* Loop counter */ int rc; /* Result code */ ExprList *pOrderBy; /* The ORDER BY clause */ @@ -140220,7 +143330,7 @@ static int multiSelect( pPrior->iLimit = p->iLimit; pPrior->iOffset = p->iOffset; pPrior->pLimit = p->pLimit; - SELECTTRACE(1, pParse, p, ("multiSelect UNION ALL left...\n")); + TREETRACE(0x200, pParse, p, ("multiSelect UNION ALL left...\n")); rc = sqlite3Select(pParse, pPrior, &dest); pPrior->pLimit = 0; if( rc ){ @@ -140238,7 +143348,7 @@ static int multiSelect( } } ExplainQueryPlan((pParse, 1, "UNION ALL")); - SELECTTRACE(1, pParse, p, ("multiSelect UNION ALL right...\n")); + TREETRACE(0x200, pParse, p, ("multiSelect UNION ALL right...\n")); rc = sqlite3Select(pParse, p, &dest); testcase( rc!=SQLITE_OK ); pDelete = p->pPrior; @@ -140291,7 +143401,7 @@ static int multiSelect( */ assert( !pPrior->pOrderBy ); sqlite3SelectDestInit(&uniondest, priorOp, unionTab); - SELECTTRACE(1, pParse, p, ("multiSelect EXCEPT/UNION left...\n")); + TREETRACE(0x200, pParse, p, ("multiSelect EXCEPT/UNION left...\n")); rc = sqlite3Select(pParse, pPrior, &uniondest); if( rc ){ goto multi_select_end; @@ -140311,7 +143421,7 @@ static int multiSelect( uniondest.eDest = op; ExplainQueryPlan((pParse, 1, "%s USING TEMP B-TREE", sqlite3SelectOpName(p->op))); - SELECTTRACE(1, pParse, p, ("multiSelect EXCEPT/UNION right...\n")); + TREETRACE(0x200, pParse, p, ("multiSelect EXCEPT/UNION right...\n")); rc = sqlite3Select(pParse, p, &uniondest); testcase( rc!=SQLITE_OK ); assert( p->pOrderBy==0 ); @@ -140372,7 +143482,7 @@ static int multiSelect( /* Code the SELECTs to our left into temporary table "tab1". */ sqlite3SelectDestInit(&intersectdest, SRT_Union, tab1); - SELECTTRACE(1, pParse, p, ("multiSelect INTERSECT left...\n")); + TREETRACE(0x400, pParse, p, ("multiSelect INTERSECT left...\n")); rc = sqlite3Select(pParse, pPrior, &intersectdest); if( rc ){ goto multi_select_end; @@ -140389,7 +143499,7 @@ static int multiSelect( intersectdest.iSDParm = tab2; ExplainQueryPlan((pParse, 1, "%s USING TEMP B-TREE", sqlite3SelectOpName(p->op))); - SELECTTRACE(1, pParse, p, ("multiSelect INTERSECT right...\n")); + TREETRACE(0x400, pParse, p, ("multiSelect INTERSECT right...\n")); rc = sqlite3Select(pParse, p, &intersectdest); testcase( rc!=SQLITE_OK ); pDelete = p->pPrior; @@ -140510,7 +143620,7 @@ SQLITE_PRIVATE void sqlite3SelectWrongNumTermsError(Parse *pParse, Select *p){ /* ** Code an output subroutine for a coroutine implementation of a -** SELECT statment. +** SELECT statement. ** ** The data to be output is contained in pIn->iSdst. There are ** pIn->nSdst columns to be output. pDest is where the output should @@ -140732,7 +143842,7 @@ static int generateOutputSubroutine( ** ** We call AltB, AeqB, AgtB, EofA, and EofB "subroutines" but they are not ** actually called using Gosub and they do not Return. EofA and EofB loop -** until all data is exhausted then jump to the "end" labe. AltB, AeqB, +** until all data is exhausted then jump to the "end" label. AltB, AeqB, ** and AgtB jump to either L2 or to one of EofA or EofB. */ #ifndef SQLITE_OMIT_COMPOUND_SELECT @@ -140769,7 +143879,7 @@ static int multiSelectOrderBy( int savedOffset; /* Saved value of p->iOffset */ int labelCmpr; /* Label for the start of the merge algorithm */ int labelEnd; /* Label for the end of the overall SELECT stmt */ - int addr1; /* Jump instructions that get retargetted */ + int addr1; /* Jump instructions that get retargeted */ int op; /* One of TK_ALL, TK_UNION, TK_EXCEPT, TK_INTERSECT */ KeyInfo *pKeyDup = 0; /* Comparison information for duplicate removal */ KeyInfo *pKeyMerge; /* Comparison information for merging rows */ @@ -141138,16 +144248,21 @@ static Expr *substExpr( #endif { Expr *pNew; - int iColumn = pExpr->iColumn; - Expr *pCopy = pSubst->pEList->a[iColumn].pExpr; + int iColumn; + Expr *pCopy; Expr ifNullRow; + iColumn = pExpr->iColumn; + assert( iColumn>=0 ); assert( pSubst->pEList!=0 && iColumnpEList->nExpr ); assert( pExpr->pRight==0 ); + pCopy = pSubst->pEList->a[iColumn].pExpr; if( sqlite3ExprIsVector(pCopy) ){ sqlite3VectorErrorMsg(pSubst->pParse, pCopy); }else{ sqlite3 *db = pSubst->pParse->db; - if( pSubst->isOuterJoin && pCopy->op!=TK_COLUMN ){ + if( pSubst->isOuterJoin + && (pCopy->op!=TK_COLUMN || pCopy->iTable!=pSubst->iNewTable) + ){ memset(&ifNullRow, 0, sizeof(ifNullRow)); ifNullRow.op = TK_IF_NULL_ROW; ifNullRow.pLeft = pCopy; @@ -141393,6 +144508,34 @@ static ExprList *findLeftmostExprlist(Select *pSel){ return pSel->pEList; } +/* +** Return true if any of the result-set columns in the compound query +** have incompatible affinities on one or more arms of the compound. +*/ +static int compoundHasDifferentAffinities(Select *p){ + int ii; + ExprList *pList; + assert( p!=0 ); + assert( p->pEList!=0 ); + assert( p->pPrior!=0 ); + pList = p->pEList; + for(ii=0; iinExpr; ii++){ + char aff; + Select *pSub1; + assert( pList->a[ii].pExpr!=0 ); + aff = sqlite3ExprAffinity(pList->a[ii].pExpr); + for(pSub1=p->pPrior; pSub1; pSub1=pSub1->pPrior){ + assert( pSub1->pEList!=0 ); + assert( pSub1->pEList->nExpr>ii ); + assert( pSub1->pEList->a[ii].pExpr!=0 ); + if( sqlite3ExprAffinity(pSub1->pEList->a[ii].pExpr)!=aff ){ + return 1; + } + } + } + return 0; +} + #if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) /* ** This routine attempts to flatten subqueries as a performance optimization. @@ -141461,7 +144604,7 @@ static ExprList *findLeftmostExprlist(Select *pSel){ ** (9) If the subquery uses LIMIT then the outer query may not be aggregate. ** ** (**) Restriction (10) was removed from the code on 2005-02-05 but we -** accidently carried the comment forward until 2014-09-15. Original +** accidentally carried the comment forward until 2014-09-15. Original ** constraint: "If the subquery is aggregate then the outer query ** may not use LIMIT." ** @@ -141553,7 +144696,8 @@ static ExprList *findLeftmostExprlist(Select *pSel){ ** (27b) the subquery is a compound query and the RIGHT JOIN occurs ** in any arm of the compound query. (See also (17g).) ** -** (28) The subquery is not a MATERIALIZED CTE. +** (28) The subquery is not a MATERIALIZED CTE. (This is handled +** in the caller before ever reaching this routine.) ** ** ** In this routine, the "p" parameter is a pointer to the outer query. @@ -141663,9 +144807,9 @@ static int flattenSubquery( if( iFrom>0 && (pSubSrc->a[0].fg.jointype & JT_LTORJ)!=0 ){ return 0; /* Restriction (27a) */ } - if( pSubitem->fg.isCte && pSubitem->u2.pCteUse->eM10d==M10d_Yes ){ - return 0; /* (28) */ - } + + /* Condition (28) is blocked by the caller */ + assert( !pSubitem->fg.isCte || pSubitem->u2.pCteUse->eM10d!=M10d_Yes ); /* Restriction (17): If the sub-query is a compound SELECT, then it must ** use only the UNION ALL operator. And none of the simple select queries @@ -141715,19 +144859,7 @@ static int flattenSubquery( if( (p->selFlags & SF_Recursive) ) return 0; /* Restriction (17h) */ - for(ii=0; iipEList->nExpr; ii++){ - char aff; - assert( pSub->pEList->a[ii].pExpr!=0 ); - aff = sqlite3ExprAffinity(pSub->pEList->a[ii].pExpr); - for(pSub1=pSub->pPrior; pSub1; pSub1=pSub1->pPrior){ - assert( pSub1->pEList!=0 ); - assert( pSub1->pEList->nExpr>ii ); - assert( pSub1->pEList->a[ii].pExpr!=0 ); - if( sqlite3ExprAffinity(pSub1->pEList->a[ii].pExpr)!=aff ){ - return 0; - } - } - } + if( compoundHasDifferentAffinities(pSub) ) return 0; if( pSrc->nSrc>1 ){ if( pParse->nSelect>500 ) return 0; @@ -141738,7 +144870,7 @@ static int flattenSubquery( } /***** If we reach this point, flattening is permitted. *****/ - SELECTTRACE(1,pParse,p,("flatten %u.%p from term %d\n", + TREETRACE(0x4,pParse,p,("flatten %u.%p from term %d\n", pSub->selId, pSub, iFrom)); /* Authorize the subquery */ @@ -141747,7 +144879,7 @@ static int flattenSubquery( testcase( i==SQLITE_DENY ); pParse->zAuthContext = zSavedAuthContext; - /* Delete the transient structures associated with thesubquery */ + /* Delete the transient structures associated with the subquery */ pSub1 = pSubitem->pSelect; sqlite3DbFree(db, pSubitem->zDatabase); sqlite3DbFree(db, pSubitem->zName); @@ -141817,7 +144949,7 @@ static int flattenSubquery( if( pPrior ) pPrior->pNext = pNew; pNew->pNext = p; p->pPrior = pNew; - SELECTTRACE(2,pParse,p,("compound-subquery flattener" + TREETRACE(0x4,pParse,p,("compound-subquery flattener" " creates %u as peer\n",pNew->selId)); } assert( pSubitem->pSelect==0 ); @@ -141929,7 +145061,7 @@ static int flattenSubquery( ** ORDER BY column expression is identical to the iOrderByCol'th ** expression returned by SELECT statement pSub. Since these values ** do not necessarily correspond to columns in SELECT statement pParent, - ** zero them before transfering the ORDER BY clause. + ** zero them before transferring the ORDER BY clause. ** ** Not doing this may cause an error if a subsequent call to this ** function attempts to flatten a compound sub-query into pParent @@ -141989,16 +145121,15 @@ static int flattenSubquery( } } - /* Finially, delete what is left of the subquery and return - ** success. + /* Finally, delete what is left of the subquery and return success. */ sqlite3AggInfoPersistWalkerInit(&w, pParse); sqlite3WalkSelect(&w,pSub1); sqlite3SelectDelete(db, pSub1); #if TREETRACE_ENABLED - if( sqlite3TreeTrace & 0x100 ){ - SELECTTRACE(0x100,pParse,p,("After flattening:\n")); + if( sqlite3TreeTrace & 0x4 ){ + TREETRACE(0x4,pParse,p,("After flattening:\n")); sqlite3TreeViewSelect(0, p, 0); } #endif @@ -142025,7 +145156,7 @@ struct WhereConst { /* ** Add a new entry to the pConst object. Except, do not add duplicate -** pColumn entires. Also, do not add if doing so would not be appropriate. +** pColumn entries. Also, do not add if doing so would not be appropriate. ** ** The caller guarantees the pColumn is a column and pValue is a constant. ** This routine has to do some additional checks before completing the @@ -142211,7 +145342,7 @@ static int propagateConstantExprRewrite(Walker *pWalker, Expr *pExpr){ ** SELECT * FROM t1 WHERE a=123 AND b=123; ** ** The two SELECT statements above should return different answers. b=a -** is alway true because the comparison uses numeric affinity, but b=123 +** is always true because the comparison uses numeric affinity, but b=123 ** is false because it uses text affinity and '0123' is not the same as '123'. ** To work around this, the expression tree is not actually changed from ** "b=a" to "b=123" but rather the "a" in "b=a" is tagged with EP_FixedCol @@ -142295,7 +145426,7 @@ static int propagateConstants( ** At the time this function is called it is guaranteed that ** ** * the sub-query uses only one distinct window frame, and -** * that the window frame has a PARTITION BY clase. +** * that the window frame has a PARTITION BY clause. */ static int pushDownWindowCheck(Parse *pParse, Select *pSubq, Expr *pExpr){ assert( pSubq->pWin->pPartition ); @@ -142372,12 +145503,28 @@ static int pushDownWindowCheck(Parse *pParse, Select *pSubq, Expr *pExpr){ ** be materialized. (This restriction is implemented in the calling ** routine.) ** -** (8) The subquery may not be a compound that uses UNION, INTERSECT, -** or EXCEPT. (We could, perhaps, relax this restriction to allow -** this case if none of the comparisons operators between left and -** right arms of the compound use a collation other than BINARY. -** But it is a lot of work to check that case for an obscure and -** minor optimization, so we omit it for now.) +** (8) If the subquery is a compound that uses UNION, INTERSECT, +** or EXCEPT, then all of the result set columns for all arms of +** the compound must use the BINARY collating sequence. +** +** (9) All three of the following are true: +** +** (9a) The WHERE clause expression originates in the ON or USING clause +** of a join (either an INNER or an OUTER join), and +** +** (9b) The subquery is to the right of the ON/USING clause +** +** (9c) There is a RIGHT JOIN (or FULL JOIN) in between the ON/USING +** clause and the subquery. +** +** Without this restriction, the push-down optimization might move +** the ON/USING filter expression from the left side of a RIGHT JOIN +** over to the right side, which leads to incorrect answers. See +** also restriction (6) in sqlite3ExprIsSingleTableConstraint(). +** +** (10) The inner query is not the right-hand table of a RIGHT JOIN. +** +** (11) The subquery is not a VALUES clause ** ** Return 0 if no changes are made and non-zero if one or more WHERE clause ** terms are duplicated into the subquery. @@ -142386,28 +145533,56 @@ static int pushDownWhereTerms( Parse *pParse, /* Parse context (for malloc() and error reporting) */ Select *pSubq, /* The subquery whose WHERE clause is to be augmented */ Expr *pWhere, /* The WHERE clause of the outer query */ - SrcItem *pSrc /* The subquery term of the outer FROM clause */ + SrcList *pSrcList, /* The complete from clause of the outer query */ + int iSrc /* Which FROM clause term to try to push into */ ){ Expr *pNew; + SrcItem *pSrc; /* The subquery FROM term into which WHERE is pushed */ int nChng = 0; + pSrc = &pSrcList->a[iSrc]; if( pWhere==0 ) return 0; - if( pSubq->selFlags & (SF_Recursive|SF_MultiPart) ) return 0; - if( pSrc->fg.jointype & (JT_LTORJ|JT_RIGHT) ) return 0; + if( pSubq->selFlags & (SF_Recursive|SF_MultiPart) ){ + return 0; /* restrictions (2) and (11) */ + } + if( pSrc->fg.jointype & (JT_LTORJ|JT_RIGHT) ){ + return 0; /* restrictions (10) */ + } -#ifndef SQLITE_OMIT_WINDOWFUNC if( pSubq->pPrior ){ Select *pSel; + int notUnionAll = 0; for(pSel=pSubq; pSel; pSel=pSel->pPrior){ u8 op = pSel->op; assert( op==TK_ALL || op==TK_SELECT || op==TK_UNION || op==TK_INTERSECT || op==TK_EXCEPT ); - if( op!=TK_ALL && op!=TK_SELECT ) return 0; /* restriction (8) */ + if( op!=TK_ALL && op!=TK_SELECT ){ + notUnionAll = 1; + } +#ifndef SQLITE_OMIT_WINDOWFUNC if( pSel->pWin ) return 0; /* restriction (6b) */ +#endif + } + if( notUnionAll ){ + /* If any of the compound arms are connected using UNION, INTERSECT, + ** or EXCEPT, then we must ensure that none of the columns use a + ** non-BINARY collating sequence. */ + for(pSel=pSubq; pSel; pSel=pSel->pPrior){ + int ii; + const ExprList *pList = pSel->pEList; + assert( pList!=0 ); + for(ii=0; iinExpr; ii++){ + CollSeq *pColl = sqlite3ExprCollSeq(pParse, pList->a[ii].pExpr); + if( !sqlite3IsBinary(pColl) ){ + return 0; /* Restriction (8) */ + } + } + } } }else{ +#ifndef SQLITE_OMIT_WINDOWFUNC if( pSubq->pWin && pSubq->pWin->pPartition==0 ) return 0; - } #endif + } #ifdef SQLITE_DEBUG /* Only the first term of a compound can have a WITH clause. But make @@ -142426,11 +145601,28 @@ static int pushDownWhereTerms( return 0; /* restriction (3) */ } while( pWhere->op==TK_AND ){ - nChng += pushDownWhereTerms(pParse, pSubq, pWhere->pRight, pSrc); + nChng += pushDownWhereTerms(pParse, pSubq, pWhere->pRight, pSrcList, iSrc); pWhere = pWhere->pLeft; } -#if 0 /* Legacy code. Checks now done by sqlite3ExprIsTableConstraint() */ +#if 0 /* These checks now done by sqlite3ExprIsSingleTableConstraint() */ + if( ExprHasProperty(pWhere, EP_OuterON|EP_InnerON) /* (9a) */ + && (pSrcList->a[0].fg.jointype & JT_LTORJ)!=0 /* Fast pre-test of (9c) */ + ){ + int jj; + for(jj=0; jjw.iJoin==pSrcList->a[jj].iCursor ){ + /* If we reach this point, both (9a) and (9b) are satisfied. + ** The following loop checks (9c): + */ + for(jj++; jja[jj].fg.jointype & JT_RIGHT)!=0 ){ + return 0; /* restriction (9) */ + } + } + } + } + } if( isLeftJoin && (ExprHasProperty(pWhere,EP_OuterON)==0 || pWhere->w.iJoin!=iCursor) @@ -142444,7 +145636,7 @@ static int pushDownWhereTerms( } #endif - if( sqlite3ExprIsTableConstraint(pWhere, pSrc) ){ + if( sqlite3ExprIsSingleTableConstraint(pWhere, pSrcList, iSrc) ){ nChng++; pSubq->selFlags |= SF_PushDown; while( pSubq ){ @@ -142478,6 +145670,78 @@ static int pushDownWhereTerms( } #endif /* !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) */ +/* +** Check to see if a subquery contains result-set columns that are +** never used. If it does, change the value of those result-set columns +** to NULL so that they do not cause unnecessary work to compute. +** +** Return the number of column that were changed to NULL. +*/ +static int disableUnusedSubqueryResultColumns(SrcItem *pItem){ + int nCol; + Select *pSub; /* The subquery to be simplified */ + Select *pX; /* For looping over compound elements of pSub */ + Table *pTab; /* The table that describes the subquery */ + int j; /* Column number */ + int nChng = 0; /* Number of columns converted to NULL */ + Bitmask colUsed; /* Columns that may not be NULLed out */ + + assert( pItem!=0 ); + if( pItem->fg.isCorrelated || pItem->fg.isCte ){ + return 0; + } + assert( pItem->pTab!=0 ); + pTab = pItem->pTab; + assert( pItem->pSelect!=0 ); + pSub = pItem->pSelect; + assert( pSub->pEList->nExpr==pTab->nCol ); + for(pX=pSub; pX; pX=pX->pPrior){ + if( (pX->selFlags & (SF_Distinct|SF_Aggregate))!=0 ){ + testcase( pX->selFlags & SF_Distinct ); + testcase( pX->selFlags & SF_Aggregate ); + return 0; + } + if( pX->pPrior && pX->op!=TK_ALL ){ + /* This optimization does not work for compound subqueries that + ** use UNION, INTERSECT, or EXCEPT. Only UNION ALL is allowed. */ + return 0; + } +#ifndef SQLITE_OMIT_WINDOWFUNC + if( pX->pWin ){ + /* This optimization does not work for subqueries that use window + ** functions. */ + return 0; + } +#endif + } + colUsed = pItem->colUsed; + if( pSub->pOrderBy ){ + ExprList *pList = pSub->pOrderBy; + for(j=0; jnExpr; j++){ + u16 iCol = pList->a[j].u.x.iOrderByCol; + if( iCol>0 ){ + iCol--; + colUsed |= ((Bitmask)1)<<(iCol>=BMS ? BMS-1 : iCol); + } + } + } + nCol = pTab->nCol; + for(j=0; jpPrior) { + Expr *pY = pX->pEList->a[j].pExpr; + if( pY->op==TK_NULL ) continue; + pY->op = TK_NULL; + ExprClearProperty(pY, EP_Skip|EP_Unlikely); + pX->selFlags |= SF_PushDown; + nChng++; + } + } + return nChng; +} + + /* ** The pFunc is the only aggregate function in the query. Check to see ** if the query is a candidate for the min/max optimization. @@ -142869,9 +146133,6 @@ static int resolveFromTermToCte( pFrom->fg.isCte = 1; pFrom->u2.pCteUse = pCteUse; pCteUse->nUse++; - if( pCteUse->nUse>=2 && pCteUse->eM10d==M10d_Any ){ - pCteUse->eM10d = M10d_Yes; - } /* Check if this is a recursive CTE. */ pRecTerm = pSel = pFrom->pSelect; @@ -143245,10 +146506,16 @@ static int selectExpander(Walker *pWalker, Select *p){ ** expanded. */ int tableSeen = 0; /* Set to 1 when TABLE matches */ char *zTName = 0; /* text of name of TABLE */ + int iErrOfst; if( pE->op==TK_DOT ){ assert( pE->pLeft!=0 ); assert( !ExprHasProperty(pE->pLeft, EP_IntValue) ); zTName = pE->pLeft->u.zToken; + assert( ExprUseWOfst(pE->pLeft) ); + iErrOfst = pE->pRight->w.iOfst; + }else{ + assert( ExprUseWOfst(pE) ); + iErrOfst = pE->w.iOfst; } for(i=0, pFrom=pTabList->a; inSrc; i++, pFrom++){ Table *pTab = pFrom->pTab; /* Table for this data source */ @@ -143285,6 +146552,7 @@ static int selectExpander(Walker *pWalker, Select *p){ for(ii=0; iinId; ii++){ const char *zUName = pUsing->a[ii].zName; pRight = sqlite3Expr(db, TK_ID, zUName); + sqlite3ExprSetErrorOffset(pRight, iErrOfst); pNew = sqlite3ExprListAppend(pParse, pNew, pRight); if( pNew ){ struct ExprList_item *pX = &pNew->a[pNew->nExpr-1]; @@ -143357,6 +146625,7 @@ static int selectExpander(Walker *pWalker, Select *p){ }else{ pExpr = pRight; } + sqlite3ExprSetErrorOffset(pExpr, iErrOfst); pNew = sqlite3ExprListAppend(pParse, pNew, pExpr); if( pNew==0 ){ break; /* OOM */ @@ -143411,8 +146680,8 @@ static int selectExpander(Walker *pWalker, Select *p){ } } #if TREETRACE_ENABLED - if( sqlite3TreeTrace & 0x100 ){ - SELECTTRACE(0x100,pParse,p,("After result-set wildcard expansion:\n")); + if( sqlite3TreeTrace & 0x8 ){ + TREETRACE(0x8,pParse,p,("After result-set wildcard expansion:\n")); sqlite3TreeViewSelect(0, p, 0); } #endif @@ -143463,14 +146732,14 @@ static void sqlite3SelectExpand(Parse *pParse, Select *pSelect){ ** This is a Walker.xSelectCallback callback for the sqlite3SelectTypeInfo() ** interface. ** -** For each FROM-clause subquery, add Column.zType and Column.zColl -** information to the Table structure that represents the result set -** of that subquery. +** For each FROM-clause subquery, add Column.zType, Column.zColl, and +** Column.affinity information to the Table structure that represents +** the result set of that subquery. ** ** The Table structure that represents the result set was constructed -** by selectExpander() but the type and collation information was omitted -** at that point because identifiers had not yet been resolved. This -** routine is called after identifier resolution. +** by selectExpander() but the type and collation and affinity information +** was omitted at that point because identifiers had not yet been resolved. +** This routine is called after identifier resolution. */ static void selectAddSubqueryTypeInfo(Walker *pWalker, Select *p){ Parse *pParse; @@ -143490,9 +146759,7 @@ static void selectAddSubqueryTypeInfo(Walker *pWalker, Select *p){ /* A sub-query in the FROM clause of a SELECT */ Select *pSel = pFrom->pSelect; if( pSel ){ - while( pSel->pPrior ) pSel = pSel->pPrior; - sqlite3SelectAddColumnTypeAndCollation(pParse, pTab, pSel, - SQLITE_AFF_NONE); + sqlite3SubqueryColumnTypes(pParse, pTab, pSel, SQLITE_AFF_NONE); } } } @@ -143547,6 +146814,178 @@ SQLITE_PRIVATE void sqlite3SelectPrep( sqlite3SelectAddTypeInfo(pParse, p); } +#if TREETRACE_ENABLED +/* +** Display all information about an AggInfo object +*/ +static void printAggInfo(AggInfo *pAggInfo){ + int ii; + for(ii=0; iinColumn; ii++){ + struct AggInfo_col *pCol = &pAggInfo->aCol[ii]; + sqlite3DebugPrintf( + "agg-column[%d] pTab=%s iTable=%d iColumn=%d iMem=%d" + " iSorterColumn=%d %s\n", + ii, pCol->pTab ? pCol->pTab->zName : "NULL", + pCol->iTable, pCol->iColumn, pAggInfo->iFirstReg+ii, + pCol->iSorterColumn, + ii>=pAggInfo->nAccumulator ? "" : " Accumulator"); + sqlite3TreeViewExpr(0, pAggInfo->aCol[ii].pCExpr, 0); + } + for(ii=0; iinFunc; ii++){ + sqlite3DebugPrintf("agg-func[%d]: iMem=%d\n", + ii, pAggInfo->iFirstReg+pAggInfo->nColumn+ii); + sqlite3TreeViewExpr(0, pAggInfo->aFunc[ii].pFExpr, 0); + } +} +#endif /* TREETRACE_ENABLED */ + +/* +** Analyze the arguments to aggregate functions. Create new pAggInfo->aCol[] +** entries for columns that are arguments to aggregate functions but which +** are not otherwise used. +** +** The aCol[] entries in AggInfo prior to nAccumulator are columns that +** are referenced outside of aggregate functions. These might be columns +** that are part of the GROUP by clause, for example. Other database engines +** would throw an error if there is a column reference that is not in the +** GROUP BY clause and that is not part of an aggregate function argument. +** But SQLite allows this. +** +** The aCol[] entries beginning with the aCol[nAccumulator] and following +** are column references that are used exclusively as arguments to +** aggregate functions. This routine is responsible for computing +** (or recomputing) those aCol[] entries. +*/ +static void analyzeAggFuncArgs( + AggInfo *pAggInfo, + NameContext *pNC +){ + int i; + assert( pAggInfo!=0 ); + assert( pAggInfo->iFirstReg==0 ); + pNC->ncFlags |= NC_InAggFunc; + for(i=0; inFunc; i++){ + Expr *pExpr = pAggInfo->aFunc[i].pFExpr; + assert( ExprUseXList(pExpr) ); + sqlite3ExprAnalyzeAggList(pNC, pExpr->x.pList); +#ifndef SQLITE_OMIT_WINDOWFUNC + assert( !IsWindowFunc(pExpr) ); + if( ExprHasProperty(pExpr, EP_WinFunc) ){ + sqlite3ExprAnalyzeAggregates(pNC, pExpr->y.pWin->pFilter); + } +#endif + } + pNC->ncFlags &= ~NC_InAggFunc; +} + +/* +** An index on expressions is being used in the inner loop of an +** aggregate query with a GROUP BY clause. This routine attempts +** to adjust the AggInfo object to take advantage of index and to +** perhaps use the index as a covering index. +** +*/ +static void optimizeAggregateUseOfIndexedExpr( + Parse *pParse, /* Parsing context */ + Select *pSelect, /* The SELECT statement being processed */ + AggInfo *pAggInfo, /* The aggregate info */ + NameContext *pNC /* Name context used to resolve agg-func args */ +){ + assert( pAggInfo->iFirstReg==0 ); + assert( pSelect!=0 ); + assert( pSelect->pGroupBy!=0 ); + pAggInfo->nColumn = pAggInfo->nAccumulator; + if( ALWAYS(pAggInfo->nSortingColumn>0) ){ + int mx = pSelect->pGroupBy->nExpr - 1; + int j, k; + for(j=0; jnColumn; j++){ + k = pAggInfo->aCol[j].iSorterColumn; + if( k>mx ) mx = k; + } + pAggInfo->nSortingColumn = mx+1; + } + analyzeAggFuncArgs(pAggInfo, pNC); +#if TREETRACE_ENABLED + if( sqlite3TreeTrace & 0x20 ){ + IndexedExpr *pIEpr; + TREETRACE(0x20, pParse, pSelect, + ("AggInfo (possibly) adjusted for Indexed Exprs\n")); + sqlite3TreeViewSelect(0, pSelect, 0); + for(pIEpr=pParse->pIdxEpr; pIEpr; pIEpr=pIEpr->pIENext){ + printf("data-cursor=%d index={%d,%d}\n", + pIEpr->iDataCur, pIEpr->iIdxCur, pIEpr->iIdxCol); + sqlite3TreeViewExpr(0, pIEpr->pExpr, 0); + } + printAggInfo(pAggInfo); + } +#else + UNUSED_PARAMETER(pSelect); + UNUSED_PARAMETER(pParse); +#endif +} + +/* +** Walker callback for aggregateConvertIndexedExprRefToColumn(). +*/ +static int aggregateIdxEprRefToColCallback(Walker *pWalker, Expr *pExpr){ + AggInfo *pAggInfo; + struct AggInfo_col *pCol; + UNUSED_PARAMETER(pWalker); + if( pExpr->pAggInfo==0 ) return WRC_Continue; + if( pExpr->op==TK_AGG_COLUMN ) return WRC_Continue; + if( pExpr->op==TK_AGG_FUNCTION ) return WRC_Continue; + if( pExpr->op==TK_IF_NULL_ROW ) return WRC_Continue; + pAggInfo = pExpr->pAggInfo; + if( NEVER(pExpr->iAgg>=pAggInfo->nColumn) ) return WRC_Continue; + assert( pExpr->iAgg>=0 ); + pCol = &pAggInfo->aCol[pExpr->iAgg]; + pExpr->op = TK_AGG_COLUMN; + pExpr->iTable = pCol->iTable; + pExpr->iColumn = pCol->iColumn; + ExprClearProperty(pExpr, EP_Skip|EP_Collate|EP_Unlikely); + return WRC_Prune; +} + +/* +** Convert every pAggInfo->aFunc[].pExpr such that any node within +** those expressions that has pAppInfo set is changed into a TK_AGG_COLUMN +** opcode. +*/ +static void aggregateConvertIndexedExprRefToColumn(AggInfo *pAggInfo){ + int i; + Walker w; + memset(&w, 0, sizeof(w)); + w.xExprCallback = aggregateIdxEprRefToColCallback; + for(i=0; inFunc; i++){ + sqlite3WalkExpr(&w, pAggInfo->aFunc[i].pFExpr); + } +} + + +/* +** Allocate a block of registers so that there is one register for each +** pAggInfo->aCol[] and pAggInfo->aFunc[] entry in pAggInfo. The first +** register in this block is stored in pAggInfo->iFirstReg. +** +** This routine may only be called once for each AggInfo object. Prior +** to calling this routine: +** +** * The aCol[] and aFunc[] arrays may be modified +** * The AggInfoColumnReg() and AggInfoFuncReg() macros may not be used +** +** After calling this routine: +** +** * The aCol[] and aFunc[] arrays are fixed +** * The AggInfoColumnReg() and AggInfoFuncReg() macros may be used +** +*/ +static void assignAggregateRegisters(Parse *pParse, AggInfo *pAggInfo){ + assert( pAggInfo!=0 ); + assert( pAggInfo->iFirstReg==0 ); + pAggInfo->iFirstReg = pParse->nMem + 1; + pParse->nMem += pAggInfo->nColumn + pAggInfo->nFunc; +} + /* ** Reset the aggregate accumulator. ** @@ -143560,24 +146999,13 @@ static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){ int i; struct AggInfo_func *pFunc; int nReg = pAggInfo->nFunc + pAggInfo->nColumn; + assert( pAggInfo->iFirstReg>0 ); assert( pParse->db->pParse==pParse ); assert( pParse->db->mallocFailed==0 || pParse->nErr!=0 ); if( nReg==0 ) return; if( pParse->nErr ) return; -#ifdef SQLITE_DEBUG - /* Verify that all AggInfo registers are within the range specified by - ** AggInfo.mnReg..AggInfo.mxReg */ - assert( nReg==pAggInfo->mxReg-pAggInfo->mnReg+1 ); - for(i=0; inColumn; i++){ - assert( pAggInfo->aCol[i].iMem>=pAggInfo->mnReg - && pAggInfo->aCol[i].iMem<=pAggInfo->mxReg ); - } - for(i=0; inFunc; i++){ - assert( pAggInfo->aFunc[i].iMem>=pAggInfo->mnReg - && pAggInfo->aFunc[i].iMem<=pAggInfo->mxReg ); - } -#endif - sqlite3VdbeAddOp3(v, OP_Null, 0, pAggInfo->mnReg, pAggInfo->mxReg); + sqlite3VdbeAddOp3(v, OP_Null, 0, pAggInfo->iFirstReg, + pAggInfo->iFirstReg+nReg-1); for(pFunc=pAggInfo->aFunc, i=0; inFunc; i++, pFunc++){ if( pFunc->iDistinct>=0 ){ Expr *pE = pFunc->pFExpr; @@ -143609,15 +147037,16 @@ static void finalizeAggFunctions(Parse *pParse, AggInfo *pAggInfo){ ExprList *pList; assert( ExprUseXList(pF->pFExpr) ); pList = pF->pFExpr->x.pList; - sqlite3VdbeAddOp2(v, OP_AggFinal, pF->iMem, pList ? pList->nExpr : 0); + sqlite3VdbeAddOp2(v, OP_AggFinal, AggInfoFuncReg(pAggInfo,i), + pList ? pList->nExpr : 0); sqlite3VdbeAppendP4(v, pF->pFunc, P4_FUNCDEF); } } /* -** Update the accumulator memory cells for an aggregate based on -** the current cursor position. +** Generate code that will update the accumulator memory cells for an +** aggregate based on the current cursor position. ** ** If regAcc is non-zero and there are no min() or max() aggregates ** in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator @@ -143637,6 +147066,8 @@ static void updateAccumulator( struct AggInfo_func *pF; struct AggInfo_col *pC; + assert( pAggInfo->iFirstReg>0 ); + if( pParse->nErr ) return; pAggInfo->directMode = 1; for(i=0, pF=pAggInfo->aFunc; inFunc; i++, pF++){ int nArg; @@ -143697,7 +147128,7 @@ static void updateAccumulator( if( regHit==0 && pAggInfo->nAccumulator ) regHit = ++pParse->nMem; sqlite3VdbeAddOp4(v, OP_CollSeq, regHit, 0, 0, (char *)pColl, P4_COLLSEQ); } - sqlite3VdbeAddOp3(v, OP_AggStep, 0, regAgg, pF->iMem); + sqlite3VdbeAddOp3(v, OP_AggStep, 0, regAgg, AggInfoFuncReg(pAggInfo,i)); sqlite3VdbeAppendP4(v, pF->pFunc, P4_FUNCDEF); sqlite3VdbeChangeP5(v, (u8)nArg); sqlite3ReleaseTempRange(pParse, regAgg, nArg); @@ -143712,7 +147143,7 @@ static void updateAccumulator( addrHitTest = sqlite3VdbeAddOp1(v, OP_If, regHit); VdbeCoverage(v); } for(i=0, pC=pAggInfo->aCol; inAccumulator; i++, pC++){ - sqlite3ExprCode(pParse, pC->pCExpr, pC->iMem); + sqlite3ExprCode(pParse, pC->pCExpr, AggInfoColumnReg(pAggInfo,i)); } pAggInfo->directMode = 0; @@ -143808,26 +147239,31 @@ static void havingToWhere(Parse *pParse, Select *p){ sqlite3WalkExpr(&sWalker, p->pHaving); #if TREETRACE_ENABLED if( sWalker.eCode && (sqlite3TreeTrace & 0x100)!=0 ){ - SELECTTRACE(0x100,pParse,p,("Move HAVING terms into WHERE:\n")); + TREETRACE(0x100,pParse,p,("Move HAVING terms into WHERE:\n")); sqlite3TreeViewSelect(0, p, 0); } #endif } /* -** Check to see if the pThis entry of pTabList is a self-join of a prior view. -** If it is, then return the SrcItem for the prior view. If it is not, -** then return 0. +** Check to see if the pThis entry of pTabList is a self-join of another view. +** Search FROM-clause entries in the range of iFirst..iEnd, including iFirst +** but stopping before iEnd. +** +** If pThis is a self-join, then return the SrcItem for the first other +** instance of that view found. If pThis is not a self-join then return 0. */ static SrcItem *isSelfJoinView( SrcList *pTabList, /* Search for self-joins in this FROM clause */ - SrcItem *pThis /* Search for prior reference to this subquery */ + SrcItem *pThis, /* Search for prior reference to this subquery */ + int iFirst, int iEnd /* Range of FROM-clause entries to search. */ ){ SrcItem *pItem; assert( pThis->pSelect!=0 ); if( pThis->pSelect->selFlags & SF_PushDown ) return 0; - for(pItem = pTabList->a; pItema[iFirst++]; if( pItem->pSelect==0 ) continue; if( pItem->fg.viaCoroutine ) continue; if( pItem->zName==0 ) continue; @@ -143860,7 +147296,6 @@ static void agginfoFree(sqlite3 *db, AggInfo *p){ sqlite3DbFreeNN(db, p); } -#ifdef SQLITE_COUNTOFVIEW_OPTIMIZATION /* ** Attempt to transform a query of the form ** @@ -143888,7 +147323,9 @@ static int countOfViewOptimization(Parse *pParse, Select *p){ if( (p->selFlags & SF_Aggregate)==0 ) return 0; /* This is an aggregate */ if( p->pEList->nExpr!=1 ) return 0; /* Single result column */ if( p->pWhere ) return 0; + if( p->pHaving ) return 0; if( p->pGroupBy ) return 0; + if( p->pOrderBy ) return 0; pExpr = p->pEList->a[0].pExpr; if( pExpr->op!=TK_AGG_FUNCTION ) return 0; /* Result is an aggregate */ assert( ExprUseUToken(pExpr) ); @@ -143896,15 +147333,18 @@ static int countOfViewOptimization(Parse *pParse, Select *p){ assert( ExprUseXList(pExpr) ); if( pExpr->x.pList!=0 ) return 0; /* Must be count(*) */ if( p->pSrc->nSrc!=1 ) return 0; /* One table in FROM */ + if( ExprHasProperty(pExpr, EP_WinFunc) ) return 0;/* Not a window function */ pSub = p->pSrc->a[0].pSelect; if( pSub==0 ) return 0; /* The FROM is a subquery */ - if( pSub->pPrior==0 ) return 0; /* Must be a compound ry */ + if( pSub->pPrior==0 ) return 0; /* Must be a compound */ + if( pSub->selFlags & SF_CopyCte ) return 0; /* Not a CTE */ do{ if( pSub->op!=TK_ALL && pSub->pPrior ) return 0; /* Must be UNION ALL */ if( pSub->pWhere ) return 0; /* No WHERE clause */ if( pSub->pLimit ) return 0; /* No LIMIT clause */ if( pSub->selFlags & SF_Aggregate ) return 0; /* Not an aggregate */ - pSub = pSub->pPrior; /* Repeat over compound */ + assert( pSub->pHaving==0 ); /* Due to the previous */ + pSub = pSub->pPrior; /* Repeat over compound */ }while( pSub ); /* If we reach this point then it is OK to perform the transformation */ @@ -143940,14 +147380,13 @@ static int countOfViewOptimization(Parse *pParse, Select *p){ p->selFlags &= ~SF_Aggregate; #if TREETRACE_ENABLED - if( sqlite3TreeTrace & 0x400 ){ - SELECTTRACE(0x400,pParse,p,("After count-of-view optimization:\n")); + if( sqlite3TreeTrace & 0x200 ){ + TREETRACE(0x200,pParse,p,("After count-of-view optimization:\n")); sqlite3TreeViewSelect(0, p, 0); } #endif return 1; } -#endif /* SQLITE_COUNTOFVIEW_OPTIMIZATION */ /* ** If any term of pSrc, or any SF_NestedFrom sub-query, is not the same @@ -143972,6 +147411,68 @@ static int sameSrcAlias(SrcItem *p0, SrcList *pSrc){ return 0; } +/* +** Return TRUE (non-zero) if the i-th entry in the pTabList SrcList can +** be implemented as a co-routine. The i-th entry is guaranteed to be +** a subquery. +** +** The subquery is implemented as a co-routine if all of the following are +** true: +** +** (1) The subquery will likely be implemented in the outer loop of +** the query. This will be the case if any one of the following +** conditions hold: +** (a) The subquery is the only term in the FROM clause +** (b) The subquery is the left-most term and a CROSS JOIN or similar +** requires it to be the outer loop +** (c) All of the following are true: +** (i) The subquery is the left-most subquery in the FROM clause +** (ii) There is nothing that would prevent the subquery from +** being used as the outer loop if the sqlite3WhereBegin() +** routine nominates it to that position. +** (iii) The query is not a UPDATE ... FROM +** (2) The subquery is not a CTE that should be materialized because +** (a) the AS MATERIALIZED keyword is used, or +** (b) the CTE is used multiple times and does not have the +** NOT MATERIALIZED keyword +** (3) The subquery is not part of a left operand for a RIGHT JOIN +** (4) The SQLITE_Coroutine optimization disable flag is not set +** (5) The subquery is not self-joined +*/ +static int fromClauseTermCanBeCoroutine( + Parse *pParse, /* Parsing context */ + SrcList *pTabList, /* FROM clause */ + int i, /* Which term of the FROM clause holds the subquery */ + int selFlags /* Flags on the SELECT statement */ +){ + SrcItem *pItem = &pTabList->a[i]; + if( pItem->fg.isCte ){ + const CteUse *pCteUse = pItem->u2.pCteUse; + if( pCteUse->eM10d==M10d_Yes ) return 0; /* (2a) */ + if( pCteUse->nUse>=2 && pCteUse->eM10d!=M10d_No ) return 0; /* (2b) */ + } + if( pTabList->a[0].fg.jointype & JT_LTORJ ) return 0; /* (3) */ + if( OptimizationDisabled(pParse->db, SQLITE_Coroutines) ) return 0; /* (4) */ + if( isSelfJoinView(pTabList, pItem, i+1, pTabList->nSrc)!=0 ){ + return 0; /* (5) */ + } + if( i==0 ){ + if( pTabList->nSrc==1 ) return 1; /* (1a) */ + if( pTabList->a[1].fg.jointype & JT_CROSS ) return 1; /* (1b) */ + if( selFlags & SF_UpdateFrom ) return 0; /* (1c-iii) */ + return 1; + } + if( selFlags & SF_UpdateFrom ) return 0; /* (1c-iii) */ + while( 1 /*exit-by-break*/ ){ + if( pItem->fg.jointype & (JT_OUTER|JT_CROSS) ) return 0; /* (1c-ii) */ + if( i==0 ) break; + i--; + pItem--; + if( pItem->pSelect!=0 ) return 0; /* (1c-i) */ + } + return 1; +} + /* ** Generate code for the SELECT statement given in the p argument. ** @@ -144017,8 +147518,8 @@ SQLITE_PRIVATE int sqlite3Select( assert( db->mallocFailed==0 ); if( sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0) ) return 1; #if TREETRACE_ENABLED - SELECTTRACE(1,pParse,p, ("begin processing:\n", pParse->addrExplain)); - if( sqlite3TreeTrace & 0x10100 ){ + TREETRACE(0x1,pParse,p, ("begin processing:\n", pParse->addrExplain)); + if( sqlite3TreeTrace & 0x10000 ){ if( (sqlite3TreeTrace & 0x10001)==0x10000 ){ sqlite3TreeViewLine(0, "In sqlite3Select() at %s:%d", __FILE__, __LINE__); @@ -144038,8 +147539,8 @@ SQLITE_PRIVATE int sqlite3Select( /* All of these destinations are also able to ignore the ORDER BY clause */ if( p->pOrderBy ){ #if TREETRACE_ENABLED - SELECTTRACE(1,pParse,p, ("dropping superfluous ORDER BY:\n")); - if( sqlite3TreeTrace & 0x100 ){ + TREETRACE(0x800,pParse,p, ("dropping superfluous ORDER BY:\n")); + if( sqlite3TreeTrace & 0x800 ){ sqlite3TreeViewExprList(0, p->pOrderBy, 0, "ORDERBY"); } #endif @@ -144059,8 +147560,8 @@ SQLITE_PRIVATE int sqlite3Select( assert( db->mallocFailed==0 ); assert( p->pEList!=0 ); #if TREETRACE_ENABLED - if( sqlite3TreeTrace & 0x104 ){ - SELECTTRACE(0x104,pParse,p, ("after name resolution:\n")); + if( sqlite3TreeTrace & 0x10 ){ + TREETRACE(0x10,pParse,p, ("after name resolution:\n")); sqlite3TreeViewSelect(0, p, 0); } #endif @@ -144101,8 +147602,8 @@ SQLITE_PRIVATE int sqlite3Select( goto select_end; } #if TREETRACE_ENABLED - if( p->pWin && (sqlite3TreeTrace & 0x108)!=0 ){ - SELECTTRACE(0x104,pParse,p, ("after window rewrite:\n")); + if( p->pWin && (sqlite3TreeTrace & 0x40)!=0 ){ + TREETRACE(0x40,pParse,p, ("after window rewrite:\n")); sqlite3TreeViewSelect(0, p, 0); } #endif @@ -144126,22 +147627,59 @@ SQLITE_PRIVATE int sqlite3Select( ** to a real table */ assert( pTab!=0 ); - /* Convert LEFT JOIN into JOIN if there are terms of the right table - ** of the LEFT JOIN used in the WHERE clause. + /* Try to simplify joins: + ** + ** LEFT JOIN -> JOIN + ** RIGHT JOIN -> JOIN + ** FULL JOIN -> RIGHT JOIN + ** + ** If terms of the i-th table are used in the WHERE clause in such a + ** way that the i-th table cannot be the NULL row of a join, then + ** perform the appropriate simplification. This is called + ** "OUTER JOIN strength reduction" in the SQLite documentation. */ - if( (pItem->fg.jointype & (JT_LEFT|JT_RIGHT))==JT_LEFT - && sqlite3ExprImpliesNonNullRow(p->pWhere, pItem->iCursor) + if( (pItem->fg.jointype & (JT_LEFT|JT_LTORJ))!=0 + && sqlite3ExprImpliesNonNullRow(p->pWhere, pItem->iCursor, + pItem->fg.jointype & JT_LTORJ) && OptimizationEnabled(db, SQLITE_SimplifyJoin) ){ - SELECTTRACE(0x100,pParse,p, - ("LEFT-JOIN simplifies to JOIN on term %d\n",i)); - pItem->fg.jointype &= ~(JT_LEFT|JT_OUTER); + if( pItem->fg.jointype & JT_LEFT ){ + if( pItem->fg.jointype & JT_RIGHT ){ + TREETRACE(0x1000,pParse,p, + ("FULL-JOIN simplifies to RIGHT-JOIN on term %d\n",i)); + pItem->fg.jointype &= ~JT_LEFT; + }else{ + TREETRACE(0x1000,pParse,p, + ("LEFT-JOIN simplifies to JOIN on term %d\n",i)); + pItem->fg.jointype &= ~(JT_LEFT|JT_OUTER); + } + } + if( pItem->fg.jointype & JT_LTORJ ){ + for(j=i+1; jnSrc; j++){ + SrcItem *pI2 = &pTabList->a[j]; + if( pI2->fg.jointype & JT_RIGHT ){ + if( pI2->fg.jointype & JT_LEFT ){ + TREETRACE(0x1000,pParse,p, + ("FULL-JOIN simplifies to LEFT-JOIN on term %d\n",j)); + pI2->fg.jointype &= ~JT_RIGHT; + }else{ + TREETRACE(0x1000,pParse,p, + ("RIGHT-JOIN simplifies to JOIN on term %d\n",j)); + pI2->fg.jointype &= ~(JT_RIGHT|JT_OUTER); + } + } + } + for(j=pTabList->nSrc-1; j>=i; j--){ + pTabList->a[j].fg.jointype &= ~JT_LTORJ; + if( pTabList->a[j].fg.jointype & JT_RIGHT ) break; + } + } assert( pItem->iCursor>=0 ); unsetJoinExpr(p->pWhere, pItem->iCursor, pTabList->a[0].fg.jointype & JT_LTORJ); } - /* No futher action if this term of the FROM clause is no a subquery */ + /* No further action if this term of the FROM clause is not a subquery */ if( pSub==0 ) continue; /* Catch mismatch in the declared columns of a view and the number of @@ -144152,6 +147690,14 @@ SQLITE_PRIVATE int sqlite3Select( goto select_end; } + /* Do not attempt the usual optimizations (flattening and ORDER BY + ** elimination) on a MATERIALIZED common table expression because + ** a MATERIALIZED common table expression is an optimization fence. + */ + if( pItem->fg.isCte && pItem->u2.pCteUse->eM10d==M10d_Yes ){ + continue; + } + /* Do not try to flatten an aggregate subquery. ** ** Flattening an aggregate subquery is only possible if the outer query @@ -144181,6 +147727,8 @@ SQLITE_PRIVATE int sqlite3Select( ** (a) The outer query has a different ORDER BY clause ** (b) The subquery is part of a join ** See forum post 062d576715d277c8 + ** + ** Also retain the ORDER BY if the OmitOrderBy optimization is disabled. */ if( pSub->pOrderBy!=0 && (p->pOrderBy!=0 || pTabList->nSrc>1) /* Condition (5) */ @@ -144189,7 +147737,7 @@ SQLITE_PRIVATE int sqlite3Select( && (p->selFlags & SF_OrderByReqd)==0 /* Condition (3) and (4) */ && OptimizationEnabled(db, SQLITE_OmitOrderBy) ){ - SELECTTRACE(0x100,pParse,p, + TREETRACE(0x800,pParse,p, ("omit superfluous ORDER BY on %r FROM-clause subquery\n",i+1)); sqlite3ParserAddCleanup(pParse, (void(*)(sqlite3*,void*))sqlite3ExprListDelete, @@ -144244,8 +147792,8 @@ SQLITE_PRIVATE int sqlite3Select( if( p->pPrior ){ rc = multiSelect(pParse, p, pDest); #if TREETRACE_ENABLED - SELECTTRACE(0x1,pParse,p,("end compound-select processing\n")); - if( (sqlite3TreeTrace & 0x2000)!=0 && ExplainQueryPlanParent(pParse)==0 ){ + TREETRACE(0x400,pParse,p,("end compound-select processing\n")); + if( (sqlite3TreeTrace & 0x400)!=0 && ExplainQueryPlanParent(pParse)==0 ){ sqlite3TreeViewSelect(0, p, 0); } #endif @@ -144265,24 +147813,21 @@ SQLITE_PRIVATE int sqlite3Select( && propagateConstants(pParse, p) ){ #if TREETRACE_ENABLED - if( sqlite3TreeTrace & 0x100 ){ - SELECTTRACE(0x100,pParse,p,("After constant propagation:\n")); + if( sqlite3TreeTrace & 0x2000 ){ + TREETRACE(0x2000,pParse,p,("After constant propagation:\n")); sqlite3TreeViewSelect(0, p, 0); } #endif }else{ - SELECTTRACE(0x100,pParse,p,("Constant propagation not helpful\n")); + TREETRACE(0x2000,pParse,p,("Constant propagation not helpful\n")); } -#ifdef SQLITE_COUNTOFVIEW_OPTIMIZATION if( OptimizationEnabled(db, SQLITE_QueryFlattener|SQLITE_CountOfView) && countOfViewOptimization(pParse, p) ){ if( db->mallocFailed ) goto select_end; - pEList = p->pEList; pTabList = p->pSrc; } -#endif /* For each term in the FROM clause, do two things: ** (1) Authorized unreferenced tables @@ -144341,39 +147886,42 @@ SQLITE_PRIVATE int sqlite3Select( if( OptimizationEnabled(db, SQLITE_PushDown) && (pItem->fg.isCte==0 || (pItem->u2.pCteUse->eM10d!=M10d_Yes && pItem->u2.pCteUse->nUse<2)) - && pushDownWhereTerms(pParse, pSub, p->pWhere, pItem) + && pushDownWhereTerms(pParse, pSub, p->pWhere, pTabList, i) ){ #if TREETRACE_ENABLED - if( sqlite3TreeTrace & 0x100 ){ - SELECTTRACE(0x100,pParse,p, + if( sqlite3TreeTrace & 0x4000 ){ + TREETRACE(0x4000,pParse,p, ("After WHERE-clause push-down into subquery %d:\n", pSub->selId)); sqlite3TreeViewSelect(0, p, 0); } #endif assert( pItem->pSelect && (pItem->pSelect->selFlags & SF_PushDown)!=0 ); }else{ - SELECTTRACE(0x100,pParse,p,("Push-down not possible\n")); + TREETRACE(0x4000,pParse,p,("Push-down not possible\n")); + } + + /* Convert unused result columns of the subquery into simple NULL + ** expressions, to avoid unneeded searching and computation. + */ + if( OptimizationEnabled(db, SQLITE_NullUnusedCols) + && disableUnusedSubqueryResultColumns(pItem) + ){ +#if TREETRACE_ENABLED + if( sqlite3TreeTrace & 0x4000 ){ + TREETRACE(0x4000,pParse,p, + ("Change unused result columns to NULL for subquery %d:\n", + pSub->selId)); + sqlite3TreeViewSelect(0, p, 0); + } +#endif } zSavedAuthContext = pParse->zAuthContext; pParse->zAuthContext = pItem->zName; /* Generate code to implement the subquery - ** - ** The subquery is implemented as a co-routine if all of the following are - ** true: - ** - ** (1) the subquery is guaranteed to be the outer loop (so that - ** it does not need to be computed more than once), and - ** (2) the subquery is not a CTE that should be materialized - ** (3) the subquery is not part of a left operand for a RIGHT JOIN */ - if( i==0 - && (pTabList->nSrc==1 - || (pTabList->a[1].fg.jointype&(JT_OUTER|JT_CROSS))!=0) /* (1) */ - && (pItem->fg.isCte==0 || pItem->u2.pCteUse->eM10d!=M10d_Yes) /* (2) */ - && (pTabList->a[0].fg.jointype & JT_LTORJ)==0 /* (3) */ - ){ + if( fromClauseTermCanBeCoroutine(pParse, pTabList, i, p->selFlags) ){ /* Implement a co-routine that will return a single row of the result ** set on each invocation. */ @@ -144395,7 +147943,7 @@ SQLITE_PRIVATE int sqlite3Select( }else if( pItem->fg.isCte && pItem->u2.pCteUse->addrM9e>0 ){ /* This is a CTE for which materialization code has already been ** generated. Invoke the subroutine to compute the materialization, - ** the make the pItem->iCursor be a copy of the ephemerial table that + ** the make the pItem->iCursor be a copy of the ephemeral table that ** holds the result of the materialization. */ CteUse *pCteUse = pItem->u2.pCteUse; sqlite3VdbeAddOp2(v, OP_Gosub, pCteUse->regRtn, pCteUse->addrM9e); @@ -144404,7 +147952,7 @@ SQLITE_PRIVATE int sqlite3Select( VdbeComment((v, "%!S", pItem)); } pSub->nSelectRow = pCteUse->nRowEst; - }else if( (pPrior = isSelfJoinView(pTabList, pItem))!=0 ){ + }else if( (pPrior = isSelfJoinView(pTabList, pItem, 0, i))!=0 ){ /* This view has already been materialized by a prior entry in ** this same FROM clause. Reuse it. */ if( pPrior->addrFillSub ){ @@ -144418,6 +147966,9 @@ SQLITE_PRIVATE int sqlite3Select( ** the same view can reuse the materialization. */ int topAddr; int onceAddr = 0; +#ifdef SQLITE_ENABLE_STMT_SCANSTATUS + int addrExplain; +#endif pItem->regReturn = ++pParse->nMem; topAddr = sqlite3VdbeAddOp0(v, OP_Goto); @@ -144433,15 +147984,14 @@ SQLITE_PRIVATE int sqlite3Select( VdbeNoopComment((v, "materialize %!S", pItem)); } sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor); - ExplainQueryPlan((pParse, 1, "MATERIALIZE %!S", pItem)); - dest.zAffSdst = sqlite3TableAffinityStr(db, pItem->pTab); + + ExplainQueryPlan2(addrExplain, (pParse, 1, "MATERIALIZE %!S", pItem)); sqlite3Select(pParse, pSub, &dest); - sqlite3DbFree(db, dest.zAffSdst); - dest.zAffSdst = 0; pItem->pTab->nRowLogEst = pSub->nSelectRow; if( onceAddr ) sqlite3VdbeJumpHere(v, onceAddr); sqlite3VdbeAddOp2(v, OP_Return, pItem->regReturn, topAddr+1); VdbeComment((v, "end %!S", pItem)); + sqlite3VdbeScanStatusRange(v, addrExplain, addrExplain, -1); sqlite3VdbeJumpHere(v, topAddr); sqlite3ClearTempRegCache(pParse); if( pItem->fg.isCte && pItem->fg.isCorrelated==0 ){ @@ -144467,8 +148017,8 @@ SQLITE_PRIVATE int sqlite3Select( sDistinct.isTnct = (p->selFlags & SF_Distinct)!=0; #if TREETRACE_ENABLED - if( sqlite3TreeTrace & 0x400 ){ - SELECTTRACE(0x400,pParse,p,("After all FROM-clause analysis:\n")); + if( sqlite3TreeTrace & 0x8000 ){ + TREETRACE(0x8000,pParse,p,("After all FROM-clause analysis:\n")); sqlite3TreeViewSelect(0, p, 0); } #endif @@ -144504,8 +148054,8 @@ SQLITE_PRIVATE int sqlite3Select( sDistinct.isTnct = 2; #if TREETRACE_ENABLED - if( sqlite3TreeTrace & 0x400 ){ - SELECTTRACE(0x400,pParse,p,("Transform DISTINCT into GROUP BY:\n")); + if( sqlite3TreeTrace & 0x20000 ){ + TREETRACE(0x20000,pParse,p,("Transform DISTINCT into GROUP BY:\n")); sqlite3TreeViewSelect(0, p, 0); } #endif @@ -144591,7 +148141,7 @@ SQLITE_PRIVATE int sqlite3Select( /* Begin the database scan. */ - SELECTTRACE(1,pParse,p,("WhereBegin\n")); + TREETRACE(0x2,pParse,p,("WhereBegin\n")); pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, sSort.pOrderBy, p->pEList, p, wctrlFlags, p->nSelectRow); if( pWInfo==0 ) goto select_end; @@ -144608,7 +148158,7 @@ SQLITE_PRIVATE int sqlite3Select( sSort.pOrderBy = 0; } } - SELECTTRACE(1,pParse,p,("WhereBegin returns\n")); + TREETRACE(0x2,pParse,p,("WhereBegin returns\n")); /* If sorting index that was created by a prior OP_OpenEphemeral ** instruction ended up not being needed, then change the OP_OpenEphemeral @@ -144647,7 +148197,7 @@ SQLITE_PRIVATE int sqlite3Select( /* End the database scan loop. */ - SELECTTRACE(1,pParse,p,("WhereEnd\n")); + TREETRACE(0x2,pParse,p,("WhereEnd\n")); sqlite3WhereEnd(pWInfo); } }else{ @@ -144728,12 +148278,14 @@ SQLITE_PRIVATE int sqlite3Select( goto select_end; } pAggInfo->selId = p->selId; +#ifdef SQLITE_DEBUG + pAggInfo->pSelect = p; +#endif memset(&sNC, 0, sizeof(sNC)); sNC.pParse = pParse; sNC.pSrcList = pTabList; sNC.uNC.pAggInfo = pAggInfo; VVA_ONLY( sNC.ncFlags = NC_UAggInfo; ) - pAggInfo->mnReg = pParse->nMem+1; pAggInfo->nSortingColumn = pGroupBy ? pGroupBy->nExpr : 0; pAggInfo->pGroupBy = pGroupBy; sqlite3ExprAnalyzeAggList(&sNC, pEList); @@ -144754,45 +148306,17 @@ SQLITE_PRIVATE int sqlite3Select( }else{ minMaxFlag = WHERE_ORDERBY_NORMAL; } - for(i=0; inFunc; i++){ - Expr *pExpr = pAggInfo->aFunc[i].pFExpr; - assert( ExprUseXList(pExpr) ); - sNC.ncFlags |= NC_InAggFunc; - sqlite3ExprAnalyzeAggList(&sNC, pExpr->x.pList); -#ifndef SQLITE_OMIT_WINDOWFUNC - assert( !IsWindowFunc(pExpr) ); - if( ExprHasProperty(pExpr, EP_WinFunc) ){ - sqlite3ExprAnalyzeAggregates(&sNC, pExpr->y.pWin->pFilter); - } -#endif - sNC.ncFlags &= ~NC_InAggFunc; - } - pAggInfo->mxReg = pParse->nMem; + analyzeAggFuncArgs(pAggInfo, &sNC); if( db->mallocFailed ) goto select_end; #if TREETRACE_ENABLED - if( sqlite3TreeTrace & 0x400 ){ - int ii; - SELECTTRACE(0x400,pParse,p,("After aggregate analysis %p:\n", pAggInfo)); + if( sqlite3TreeTrace & 0x20 ){ + TREETRACE(0x20,pParse,p,("After aggregate analysis %p:\n", pAggInfo)); sqlite3TreeViewSelect(0, p, 0); if( minMaxFlag ){ sqlite3DebugPrintf("MIN/MAX Optimization (0x%02x) adds:\n", minMaxFlag); sqlite3TreeViewExprList(0, pMinMaxOrderBy, 0, "ORDERBY"); } - for(ii=0; iinColumn; ii++){ - struct AggInfo_col *pCol = &pAggInfo->aCol[ii]; - sqlite3DebugPrintf( - "agg-column[%d] pTab=%s iTable=%d iColumn=%d iMem=%d" - " iSorterColumn=%d\n", - ii, pCol->pTab ? pCol->pTab->zName : "NULL", - pCol->iTable, pCol->iColumn, pCol->iMem, - pCol->iSorterColumn); - sqlite3TreeViewExpr(0, pAggInfo->aCol[ii].pCExpr, 0); - } - for(ii=0; iinFunc; ii++){ - sqlite3DebugPrintf("agg-func[%d]: iMem=%d\n", - ii, pAggInfo->aFunc[ii].iMem); - sqlite3TreeViewExpr(0, pAggInfo->aFunc[ii].pFExpr, 0); - } + printAggInfo(pAggInfo); } #endif @@ -144802,7 +148326,7 @@ SQLITE_PRIVATE int sqlite3Select( */ if( pGroupBy ){ KeyInfo *pKeyInfo; /* Keying information for the group by clause */ - int addr1; /* A-vs-B comparision jump */ + int addr1; /* A-vs-B comparison jump */ int addrOutputRow; /* Start of subroutine that outputs a result row */ int regOutputRow; /* Return address register for output subroutine */ int addrSetAbort; /* Set the abort flag and return */ @@ -144861,7 +148385,7 @@ SQLITE_PRIVATE int sqlite3Select( ** in the right order to begin with. */ sqlite3VdbeAddOp2(v, OP_Gosub, regReset, addrReset); - SELECTTRACE(1,pParse,p,("WhereBegin\n")); + TREETRACE(0x2,pParse,p,("WhereBegin\n")); pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, pGroupBy, pDistinct, p, (sDistinct.isTnct==2 ? WHERE_DISTINCTBY : WHERE_GROUPBY) | (orderByGrp ? WHERE_SORTBYGROUP : 0) | distFlag, 0 @@ -144870,8 +148394,12 @@ SQLITE_PRIVATE int sqlite3Select( sqlite3ExprListDelete(db, pDistinct); goto select_end; } + if( pParse->pIdxEpr ){ + optimizeAggregateUseOfIndexedExpr(pParse, p, pAggInfo, &sNC); + } + assignAggregateRegisters(pParse, pAggInfo); eDist = sqlite3WhereIsDistinct(pWInfo); - SELECTTRACE(1,pParse,p,("WhereBegin returns\n")); + TREETRACE(0x2,pParse,p,("WhereBegin returns\n")); if( sqlite3WhereIsOrdered(pWInfo)==pGroupBy->nExpr ){ /* The optimizer is able to deliver rows in group by order so ** we do not have to sort. The OP_OpenEphemeral table will be @@ -144889,9 +148417,13 @@ SQLITE_PRIVATE int sqlite3Select( int nCol; int nGroupBy; - explainTempTable(pParse, +#ifdef SQLITE_ENABLE_STMT_SCANSTATUS + int addrExp; /* Address of OP_Explain instruction */ +#endif + ExplainQueryPlan2(addrExp, (pParse, 0, "USE TEMP B-TREE FOR %s", (sDistinct.isTnct && (p->selFlags&SF_Distinct)==0) ? - "DISTINCT" : "GROUP BY"); + "DISTINCT" : "GROUP BY" + )); groupBySort = 1; nGroupBy = pGroupBy->nExpr; @@ -144916,18 +148448,40 @@ SQLITE_PRIVATE int sqlite3Select( } pAggInfo->directMode = 0; regRecord = sqlite3GetTempReg(pParse); + sqlite3VdbeScanStatusCounters(v, addrExp, 0, sqlite3VdbeCurrentAddr(v)); sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol, regRecord); sqlite3VdbeAddOp2(v, OP_SorterInsert, pAggInfo->sortingIdx, regRecord); + sqlite3VdbeScanStatusRange(v, addrExp, sqlite3VdbeCurrentAddr(v)-2, -1); sqlite3ReleaseTempReg(pParse, regRecord); sqlite3ReleaseTempRange(pParse, regBase, nCol); - SELECTTRACE(1,pParse,p,("WhereEnd\n")); + TREETRACE(0x2,pParse,p,("WhereEnd\n")); sqlite3WhereEnd(pWInfo); pAggInfo->sortingIdxPTab = sortPTab = pParse->nTab++; sortOut = sqlite3GetTempReg(pParse); + sqlite3VdbeScanStatusCounters(v, addrExp, sqlite3VdbeCurrentAddr(v), 0); sqlite3VdbeAddOp3(v, OP_OpenPseudo, sortPTab, sortOut, nCol); sqlite3VdbeAddOp2(v, OP_SorterSort, pAggInfo->sortingIdx, addrEnd); VdbeComment((v, "GROUP BY sort")); VdbeCoverage(v); pAggInfo->useSortingIdx = 1; + sqlite3VdbeScanStatusRange(v, addrExp, -1, sortPTab); + sqlite3VdbeScanStatusRange(v, addrExp, -1, pAggInfo->sortingIdx); + } + + /* If there are entries in pAgggInfo->aFunc[] that contain subexpressions + ** that are indexed (and that were previously identified and tagged + ** in optimizeAggregateUseOfIndexedExpr()) then those subexpressions + ** must now be converted into a TK_AGG_COLUMN node so that the value + ** is correctly pulled from the index rather than being recomputed. */ + if( pParse->pIdxEpr ){ + aggregateConvertIndexedExprRefToColumn(pAggInfo); +#if TREETRACE_ENABLED + if( sqlite3TreeTrace & 0x20 ){ + TREETRACE(0x20, pParse, p, + ("AggInfo function expressions converted to reference index\n")); + sqlite3TreeViewSelect(0, p, 0); + printAggInfo(pAggInfo); + } +#endif } /* If the index or temporary table used by the GROUP BY sort @@ -144998,7 +148552,7 @@ SQLITE_PRIVATE int sqlite3Select( sqlite3VdbeAddOp2(v, OP_SorterNext, pAggInfo->sortingIdx,addrTopOfLoop); VdbeCoverage(v); }else{ - SELECTTRACE(1,pParse,p,("WhereEnd\n")); + TREETRACE(0x2,pParse,p,("WhereEnd\n")); sqlite3WhereEnd(pWInfo); sqlite3VdbeChangeToNoop(v, addrSortingIdx); } @@ -145108,7 +148662,8 @@ SQLITE_PRIVATE int sqlite3Select( if( pKeyInfo ){ sqlite3VdbeChangeP4(v, -1, (char *)pKeyInfo, P4_KEYINFO); } - sqlite3VdbeAddOp2(v, OP_Count, iCsr, pAggInfo->aFunc[0].iMem); + assignAggregateRegisters(pParse, pAggInfo); + sqlite3VdbeAddOp2(v, OP_Count, iCsr, AggInfoFuncReg(pAggInfo,0)); sqlite3VdbeAddOp1(v, OP_Close, iCsr); explainSimpleCount(pParse, pTab, pBest); }else{ @@ -145144,6 +148699,7 @@ SQLITE_PRIVATE int sqlite3Select( pDistinct = pAggInfo->aFunc[0].pFExpr->x.pList; distFlag = pDistinct ? (WHERE_WANT_DISTINCT|WHERE_AGG_DISTINCT) : 0; } + assignAggregateRegisters(pParse, pAggInfo); /* This case runs if the aggregate has no GROUP BY clause. The ** processing is much simpler since there is only a single row @@ -145160,13 +148716,13 @@ SQLITE_PRIVATE int sqlite3Select( assert( minMaxFlag==WHERE_ORDERBY_NORMAL || pMinMaxOrderBy!=0 ); assert( pMinMaxOrderBy==0 || pMinMaxOrderBy->nExpr==1 ); - SELECTTRACE(1,pParse,p,("WhereBegin\n")); + TREETRACE(0x2,pParse,p,("WhereBegin\n")); pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, pMinMaxOrderBy, pDistinct, p, minMaxFlag|distFlag, 0); if( pWInfo==0 ){ goto select_end; } - SELECTTRACE(1,pParse,p,("WhereBegin returns\n")); + TREETRACE(0x2,pParse,p,("WhereBegin returns\n")); eDist = sqlite3WhereIsDistinct(pWInfo); updateAccumulator(pParse, regAcc, pAggInfo, eDist); if( eDist!=WHERE_DISTINCT_NOOP ){ @@ -145180,7 +148736,7 @@ SQLITE_PRIVATE int sqlite3Select( if( minMaxFlag ){ sqlite3WhereMinMaxOptEarlyOut(v, pWInfo); } - SELECTTRACE(1,pParse,p,("WhereEnd\n")); + TREETRACE(0x2,pParse,p,("WhereEnd\n")); sqlite3WhereEnd(pWInfo); finalizeAggFunctions(pParse, pAggInfo); } @@ -145202,8 +148758,6 @@ SQLITE_PRIVATE int sqlite3Select( ** and send them to the callback one by one. */ if( sSort.pOrderBy ){ - explainTempTable(pParse, - sSort.nOBSat>0 ? "RIGHT PART OF ORDER BY":"ORDER BY"); assert( p->pEList==pEList ); generateSortTail(pParse, p, &sSort, pEList->nExpr, pDest); } @@ -145227,7 +148781,7 @@ SQLITE_PRIVATE int sqlite3Select( if( pAggInfo && !db->mallocFailed ){ for(i=0; inColumn; i++){ Expr *pExpr = pAggInfo->aCol[i].pCExpr; - assert( pExpr!=0 ); + if( pExpr==0 ) continue; assert( pExpr->pAggInfo==pAggInfo ); assert( pExpr->iAgg==i ); } @@ -145241,8 +148795,8 @@ SQLITE_PRIVATE int sqlite3Select( #endif #if TREETRACE_ENABLED - SELECTTRACE(0x1,pParse,p,("end processing\n")); - if( (sqlite3TreeTrace & 0x2000)!=0 && ExplainQueryPlanParent(pParse)==0 ){ + TREETRACE(0x1,pParse,p,("end processing\n")); + if( (sqlite3TreeTrace & 0x40000)!=0 && ExplainQueryPlanParent(pParse)==0 ){ sqlite3TreeViewSelect(0, p, 0); } #endif @@ -145657,6 +149211,7 @@ SQLITE_PRIVATE void sqlite3BeginTrigger( }else{ assert( !db->init.busy ); sqlite3CodeVerifySchema(pParse, iDb); + VVA_ONLY( pParse->ifNotExists = 1; ) } goto trigger_cleanup; } @@ -146438,7 +149993,7 @@ static void codeReturningTrigger( } sqlite3ExprListDelete(db, sSelect.pEList); pNew = sqlite3ExpandReturning(pParse, pReturning->pReturnEL, pTab); - if( !db->mallocFailed ){ + if( pParse->nErr==0 ){ NameContext sNC; memset(&sNC, 0, sizeof(sNC)); if( pReturning->nRetCol==0 ){ @@ -146907,6 +150462,9 @@ SQLITE_PRIVATE u32 sqlite3TriggerColmask( Trigger *p; assert( isNew==1 || isNew==0 ); + if( IsView(pTab) ){ + return 0xffffffff; + } for(p=pTrigger; p; p=p->pNext){ if( p->op==op && (tr_tm&p->tr_tm) @@ -147157,7 +150715,7 @@ static void updateFromSelect( assert( pTabList->nSrc>1 ); if( pSrc ){ - pSrc->a[0].fg.notCte = 1; + assert( pSrc->a[0].fg.notCte ); pSrc->a[0].iCursor = -1; pSrc->a[0].pTab->nTabRef--; pSrc->a[0].pTab = 0; @@ -147196,7 +150754,8 @@ static void updateFromSelect( } } pSelect = sqlite3SelectNew(pParse, pList, - pSrc, pWhere2, pGrp, 0, pOrderBy2, SF_UFSrcCheck|SF_IncludeHidden, pLimit2 + pSrc, pWhere2, pGrp, 0, pOrderBy2, + SF_UFSrcCheck|SF_IncludeHidden|SF_UpdateFrom, pLimit2 ); if( pSelect ) pSelect->selFlags |= SF_OrderByReqd; sqlite3SelectDestInit(&dest, eDest, iEph); @@ -147340,7 +150899,7 @@ SQLITE_PRIVATE void sqlite3Update( if( sqlite3ViewGetColumnNames(pParse, pTab) ){ goto update_cleanup; } - if( sqlite3IsReadOnly(pParse, pTab, tmask) ){ + if( sqlite3IsReadOnly(pParse, pTab, pTrigger) ){ goto update_cleanup; } @@ -147659,12 +151218,22 @@ SQLITE_PRIVATE void sqlite3Update( /* Begin the database scan. ** ** Do not consider a single-pass strategy for a multi-row update if - ** there are any triggers or foreign keys to process, or rows may - ** be deleted as a result of REPLACE conflict handling. Any of these - ** things might disturb a cursor being used to scan through the table - ** or index, causing a single-pass approach to malfunction. */ + ** there is anything that might disrupt the cursor being used to do + ** the UPDATE: + ** (1) This is a nested UPDATE + ** (2) There are triggers + ** (3) There are FOREIGN KEY constraints + ** (4) There are REPLACE conflict handlers + ** (5) There are subqueries in the WHERE clause + */ flags = WHERE_ONEPASS_DESIRED; - if( !pParse->nested && !pTrigger && !hasFK && !chngKey && !bReplace ){ + if( !pParse->nested + && !pTrigger + && !hasFK + && !chngKey + && !bReplace + && (pWhere==0 || !ExprHasProperty(pWhere, EP_Subquery)) + ){ flags |= WHERE_ONEPASS_MULTIROW; } pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere,0,0,0,flags,iIdxCur); @@ -147735,6 +151304,8 @@ SQLITE_PRIVATE void sqlite3Update( if( !isView ){ int addrOnce = 0; + int iNotUsed1 = 0; + int iNotUsed2 = 0; /* Open every index that needs updating. */ if( eOnePass!=ONEPASS_OFF ){ @@ -147746,7 +151317,7 @@ SQLITE_PRIVATE void sqlite3Update( addrOnce = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v); } sqlite3OpenTableAndIndices(pParse, pTab, OP_OpenWrite, 0, iBaseCur, - aToOpen, 0, 0); + aToOpen, &iNotUsed1, &iNotUsed2); if( addrOnce ){ sqlite3VdbeJumpHereOrPopInst(v, addrOnce); } @@ -148037,8 +151608,10 @@ SQLITE_PRIVATE void sqlite3Update( sqlite3VdbeAddOp2(v, OP_AddImm, regRowCount, 1); } - sqlite3CodeRowTrigger(pParse, pTrigger, TK_UPDATE, pChanges, - TRIGGER_AFTER, pTab, regOldRowid, onError, labelContinue); + if( pTrigger ){ + sqlite3CodeRowTrigger(pParse, pTrigger, TK_UPDATE, pChanges, + TRIGGER_AFTER, pTab, regOldRowid, onError, labelContinue); + } /* Repeat the above with the next record to be updated, until ** all record selected by the WHERE clause have been updated. @@ -148133,7 +151706,7 @@ static void updateVirtualTable( int nArg = 2 + pTab->nCol; /* Number of arguments to VUpdate */ int regArg; /* First register in VUpdate arg array */ int regRec; /* Register in which to assemble record */ - int regRowid; /* Register for ephem table rowid */ + int regRowid; /* Register for ephemeral table rowid */ int iCsr = pSrc->a[0].iCursor; /* Cursor used for virtual table scan */ int aDummy[2]; /* Unused arg for sqlite3WhereOkOnePass() */ int eOnePass; /* True to use onepass strategy */ @@ -148177,7 +151750,9 @@ static void updateVirtualTable( sqlite3ExprDup(db, pChanges->a[aXRef[i]].pExpr, 0) ); }else{ - pList = sqlite3ExprListAppend(pParse, pList, exprRowColumn(pParse, i)); + Expr *pRowExpr = exprRowColumn(pParse, i); + if( pRowExpr ) pRowExpr->op2 = OPFLAG_NOCHNG; + pList = sqlite3ExprListAppend(pParse, pList, pRowExpr); } } @@ -148254,7 +151829,7 @@ static void updateVirtualTable( sqlite3WhereEnd(pWInfo); } - /* Begin scannning through the ephemeral table. */ + /* Begin scanning through the ephemeral table. */ addr = sqlite3VdbeAddOp1(v, OP_Rewind, ephemTab); VdbeCoverage(v); /* Extract arguments from the current row of the ephemeral table and @@ -148462,7 +152037,7 @@ SQLITE_PRIVATE int sqlite3UpsertAnalyzeTarget( pExpr = &sCol[0]; } for(jj=0; jja[jj].pExpr,pExpr,iCursor)<2 ){ + if( sqlite3ExprCompare(0,pTarget->a[jj].pExpr,pExpr,iCursor)<2 ){ break; /* Column ii of the index matches column jj of target */ } } @@ -148811,7 +152386,7 @@ SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3RunVacuum( ** (possibly synchronous) transaction opened on the main database before ** sqlite3BtreeCopyFile() is called. ** - ** An optimisation would be to use a non-journaled pager. + ** An optimization would be to use a non-journaled pager. ** (Later:) I tried setting "PRAGMA vacuum_db.journal_mode=OFF" but ** that actually made the VACUUM run slower. Very little journalling ** actually occurs when doing a vacuum since the vacuum_db is initially @@ -149230,10 +152805,10 @@ SQLITE_PRIVATE void sqlite3VtabUnlock(VTable *pVTab){ pVTab->nRef--; if( pVTab->nRef==0 ){ sqlite3_vtab *p = pVTab->pVtab; - sqlite3VtabModuleUnref(pVTab->db, pVTab->pMod); if( p ){ p->pModule->xDisconnect(p); } + sqlite3VtabModuleUnref(pVTab->db, pVTab->pMod); sqlite3DbFree(db, pVTab); } } @@ -149500,7 +153075,7 @@ SQLITE_PRIVATE void sqlite3VtabFinishParse(Parse *pParse, Token *pEnd){ ** the information we've collected. ** ** The VM register number pParse->regRowid holds the rowid of an - ** entry in the sqlite_schema table tht was created for this vtab + ** entry in the sqlite_schema table that was created for this vtab ** by sqlite3StartTable(). */ iDb = sqlite3SchemaToIndex(db, pTab->pSchema); @@ -149629,7 +153204,9 @@ static int vtabCallConstructor( sCtx.pPrior = db->pVtabCtx; sCtx.bDeclared = 0; db->pVtabCtx = &sCtx; + pTab->nTabRef++; rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr); + sqlite3DeleteTable(db, pTab); db->pVtabCtx = sCtx.pPrior; if( rc==SQLITE_NOMEM ) sqlite3OomFault(db); assert( sCtx.pTab==pTab ); @@ -150119,7 +153696,10 @@ SQLITE_PRIVATE int sqlite3VtabSavepoint(sqlite3 *db, int op, int iSavepoint){ break; } if( xMethod && pVTab->iSavepoint>iSavepoint ){ + u64 savedFlags = (db->flags & SQLITE_Defensive); + db->flags &= ~(u64)SQLITE_Defensive; rc = xMethod(pVTab->pVtab, iSavepoint); + db->flags |= savedFlags; } sqlite3VtabUnlock(pVTab); } @@ -150239,7 +153819,7 @@ SQLITE_PRIVATE void sqlite3VtabMakeWritable(Parse *pParse, Table *pTab){ ** ** An eponymous virtual table instance is one that is named after its ** module, and more importantly, does not require a CREATE VIRTUAL TABLE -** statement in order to come into existance. Eponymous virtual table +** statement in order to come into existence. Eponymous virtual table ** instances always exist. They cannot be DROP-ed. ** ** Any virtual table module for which xConnect and xCreate are the same @@ -150348,6 +153928,10 @@ SQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){ p->pVTable->eVtabRisk = SQLITE_VTABRISK_High; break; } + case SQLITE_VTAB_USES_ALL_SCHEMAS: { + p->pVTable->bAllSchemas = 1; + break; + } default: { rc = SQLITE_MISUSE_BKPT; break; @@ -150426,7 +154010,7 @@ typedef struct WhereRightJoin WhereRightJoin; /* ** This object is a header on a block of allocated memory that will be -** automatically freed when its WInfo oject is destructed. +** automatically freed when its WInfo object is destructed. */ struct WhereMemBlock { WhereMemBlock *pNext; /* Next block in the chain */ @@ -150487,7 +154071,7 @@ struct WhereLevel { int iCur; /* The VDBE cursor used by this IN operator */ int addrInTop; /* Top of the IN loop */ int iBase; /* Base register of multi-key index record */ - int nPrefix; /* Number of prior entires in the key */ + int nPrefix; /* Number of prior entries in the key */ u8 eEndLoopOp; /* IN Loop terminator. OP_Next or OP_Prev */ } *aInLoop; /* Information about each nested IN operator */ } in; /* Used when pWLoop->wsFlags&WHERE_IN_ABLE */ @@ -150737,7 +154321,7 @@ struct WhereClause { int nTerm; /* Number of terms */ int nSlot; /* Number of entries in a[] */ int nBase; /* Number of terms through the last non-Virtual */ - WhereTerm *a; /* Each a[] describes a term of the WHERE cluase */ + WhereTerm *a; /* Each a[] describes a term of the WHERE clause */ #if defined(SQLITE_SMALL_STACK) WhereTerm aStatic[1]; /* Initial static space for a[] */ #else @@ -151023,6 +154607,7 @@ SQLITE_PRIVATE void sqlite3WhereTabFuncArgs(Parse*, SrcItem*, WhereClause*); #define WHERE_SELFCULL 0x00800000 /* nOut reduced by extra WHERE terms */ #define WHERE_OMIT_OFFSET 0x01000000 /* Set offset counter to zero */ #define WHERE_VIEWSCAN 0x02000000 /* A full-scan of a VIEW or subquery */ +#define WHERE_EXPRIDX 0x04000000 /* Uses an index-on-expressions */ #endif /* !defined(SQLITE_WHEREINT_H) */ @@ -151120,9 +154705,9 @@ static void explainIndexRange(StrAccum *pStr, WhereLoop *pLoop){ /* ** This function is a no-op unless currently processing an EXPLAIN QUERY PLAN -** command, or if either SQLITE_DEBUG or SQLITE_ENABLE_STMT_SCANSTATUS was -** defined at compile-time. If it is not a no-op, a single OP_Explain opcode -** is added to the output to describe the table scan strategy in pLevel. +** command, or if stmt_scanstatus_v2() stats are enabled, or if SQLITE_DEBUG +** was defined at compile-time. If it is not a no-op, a single OP_Explain +** opcode is added to the output to describe the table scan strategy in pLevel. ** ** If an OP_Explain opcode is added to the VM, its address is returned. ** Otherwise, if no OP_Explain is coded, zero is returned. @@ -151134,8 +154719,8 @@ SQLITE_PRIVATE int sqlite3WhereExplainOneScan( u16 wctrlFlags /* Flags passed to sqlite3WhereBegin() */ ){ int ret = 0; -#if !defined(SQLITE_DEBUG) && !defined(SQLITE_ENABLE_STMT_SCANSTATUS) - if( sqlite3ParseToplevel(pParse)->explain==2 ) +#if !defined(SQLITE_DEBUG) + if( sqlite3ParseToplevel(pParse)->explain==2 || IS_STMT_SCANSTATUS(pParse->db) ) #endif { SrcItem *pItem = &pTabList->a[pLevel->iFrom]; @@ -151279,6 +154864,8 @@ SQLITE_PRIVATE int sqlite3WhereExplainBloomFilter( zMsg = sqlite3StrAccumFinish(&str); ret = sqlite3VdbeAddOp4(v, OP_Explain, sqlite3VdbeCurrentAddr(v), pParse->addrExplain, 0, zMsg,P4_DYNAMIC); + + sqlite3VdbeScanStatus(v, sqlite3VdbeCurrentAddr(v)-1, 0, 0, 0, 0); return ret; } #endif /* SQLITE_OMIT_EXPLAIN */ @@ -151299,16 +154886,37 @@ SQLITE_PRIVATE void sqlite3WhereAddScanStatus( WhereLevel *pLvl, /* Level to add scanstatus() entry for */ int addrExplain /* Address of OP_Explain (or 0) */ ){ - const char *zObj = 0; - WhereLoop *pLoop = pLvl->pWLoop; - if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 && pLoop->u.btree.pIndex!=0 ){ - zObj = pLoop->u.btree.pIndex->zName; - }else{ - zObj = pSrclist->a[pLvl->iFrom].zName; + if( IS_STMT_SCANSTATUS( sqlite3VdbeDb(v) ) ){ + const char *zObj = 0; + WhereLoop *pLoop = pLvl->pWLoop; + int wsFlags = pLoop->wsFlags; + int viaCoroutine = 0; + + if( (wsFlags & WHERE_VIRTUALTABLE)==0 && pLoop->u.btree.pIndex!=0 ){ + zObj = pLoop->u.btree.pIndex->zName; + }else{ + zObj = pSrclist->a[pLvl->iFrom].zName; + viaCoroutine = pSrclist->a[pLvl->iFrom].fg.viaCoroutine; + } + sqlite3VdbeScanStatus( + v, addrExplain, pLvl->addrBody, pLvl->addrVisit, pLoop->nOut, zObj + ); + + if( viaCoroutine==0 ){ + if( (wsFlags & (WHERE_MULTI_OR|WHERE_AUTO_INDEX))==0 ){ + sqlite3VdbeScanStatusRange(v, addrExplain, -1, pLvl->iTabCur); + } + if( wsFlags & WHERE_INDEXED ){ + sqlite3VdbeScanStatusRange(v, addrExplain, -1, pLvl->iIdxCur); + } + }else{ + int addr = pSrclist->a[pLvl->iFrom].addrFillSub; + VdbeOp *pOp = sqlite3VdbeGetOp(v, addr-1); + assert( sqlite3VdbeDb(v)->mallocFailed || pOp->opcode==OP_InitCoroutine ); + assert( sqlite3VdbeDb(v)->mallocFailed || pOp->p2>addr ); + sqlite3VdbeScanStatusRange(v, addrExplain, addr, pOp->p2-1); + } } - sqlite3VdbeScanStatus( - v, addrExplain, pLvl->addrBody, pLvl->addrVisit, pLoop->nOut, zObj - ); } #endif @@ -151368,7 +154976,7 @@ static void disableTerm(WhereLevel *pLevel, WhereTerm *pTerm){ pTerm->wtFlags |= TERM_CODED; } #ifdef WHERETRACE_ENABLED - if( sqlite3WhereTrace & 0x20000 ){ + if( (sqlite3WhereTrace & 0x4001)==0x4001 ){ sqlite3DebugPrintf("DISABLE-"); sqlite3WhereTermPrint(pTerm, (int)(pTerm - (pTerm->pWC->a))); } @@ -151483,68 +155091,75 @@ static Expr *removeUnindexableInClauseTerms( Expr *pX /* The IN expression to be reduced */ ){ sqlite3 *db = pParse->db; + Select *pSelect; /* Pointer to the SELECT on the RHS */ Expr *pNew; pNew = sqlite3ExprDup(db, pX, 0); if( db->mallocFailed==0 ){ - ExprList *pOrigRhs; /* Original unmodified RHS */ - ExprList *pOrigLhs; /* Original unmodified LHS */ - ExprList *pRhs = 0; /* New RHS after modifications */ - ExprList *pLhs = 0; /* New LHS after mods */ - int i; /* Loop counter */ - Select *pSelect; /* Pointer to the SELECT on the RHS */ - - assert( ExprUseXSelect(pNew) ); - pOrigRhs = pNew->x.pSelect->pEList; - assert( pNew->pLeft!=0 ); - assert( ExprUseXList(pNew->pLeft) ); - pOrigLhs = pNew->pLeft->x.pList; - for(i=iEq; inLTerm; i++){ - if( pLoop->aLTerm[i]->pExpr==pX ){ - int iField; - assert( (pLoop->aLTerm[i]->eOperator & (WO_OR|WO_AND))==0 ); - iField = pLoop->aLTerm[i]->u.x.iField - 1; - if( pOrigRhs->a[iField].pExpr==0 ) continue; /* Duplicate PK column */ - pRhs = sqlite3ExprListAppend(pParse, pRhs, pOrigRhs->a[iField].pExpr); - pOrigRhs->a[iField].pExpr = 0; - assert( pOrigLhs->a[iField].pExpr!=0 ); - pLhs = sqlite3ExprListAppend(pParse, pLhs, pOrigLhs->a[iField].pExpr); - pOrigLhs->a[iField].pExpr = 0; - } - } - sqlite3ExprListDelete(db, pOrigRhs); - sqlite3ExprListDelete(db, pOrigLhs); - pNew->pLeft->x.pList = pLhs; - pNew->x.pSelect->pEList = pRhs; - if( pLhs && pLhs->nExpr==1 ){ - /* Take care here not to generate a TK_VECTOR containing only a - ** single value. Since the parser never creates such a vector, some - ** of the subroutines do not handle this case. */ - Expr *p = pLhs->a[0].pExpr; - pLhs->a[0].pExpr = 0; - sqlite3ExprDelete(db, pNew->pLeft); - pNew->pLeft = p; - } - pSelect = pNew->x.pSelect; - if( pSelect->pOrderBy ){ - /* If the SELECT statement has an ORDER BY clause, zero the - ** iOrderByCol variables. These are set to non-zero when an - ** ORDER BY term exactly matches one of the terms of the - ** result-set. Since the result-set of the SELECT statement may - ** have been modified or reordered, these variables are no longer - ** set correctly. Since setting them is just an optimization, - ** it's easiest just to zero them here. */ - ExprList *pOrderBy = pSelect->pOrderBy; - for(i=0; inExpr; i++){ - pOrderBy->a[i].u.x.iOrderByCol = 0; + for(pSelect=pNew->x.pSelect; pSelect; pSelect=pSelect->pPrior){ + ExprList *pOrigRhs; /* Original unmodified RHS */ + ExprList *pOrigLhs = 0; /* Original unmodified LHS */ + ExprList *pRhs = 0; /* New RHS after modifications */ + ExprList *pLhs = 0; /* New LHS after mods */ + int i; /* Loop counter */ + + assert( ExprUseXSelect(pNew) ); + pOrigRhs = pSelect->pEList; + assert( pNew->pLeft!=0 ); + assert( ExprUseXList(pNew->pLeft) ); + if( pSelect==pNew->x.pSelect ){ + pOrigLhs = pNew->pLeft->x.pList; + } + for(i=iEq; inLTerm; i++){ + if( pLoop->aLTerm[i]->pExpr==pX ){ + int iField; + assert( (pLoop->aLTerm[i]->eOperator & (WO_OR|WO_AND))==0 ); + iField = pLoop->aLTerm[i]->u.x.iField - 1; + if( pOrigRhs->a[iField].pExpr==0 ) continue; /* Duplicate PK column */ + pRhs = sqlite3ExprListAppend(pParse, pRhs, pOrigRhs->a[iField].pExpr); + pOrigRhs->a[iField].pExpr = 0; + if( pOrigLhs ){ + assert( pOrigLhs->a[iField].pExpr!=0 ); + pLhs = sqlite3ExprListAppend(pParse,pLhs,pOrigLhs->a[iField].pExpr); + pOrigLhs->a[iField].pExpr = 0; + } + } + } + sqlite3ExprListDelete(db, pOrigRhs); + if( pOrigLhs ){ + sqlite3ExprListDelete(db, pOrigLhs); + pNew->pLeft->x.pList = pLhs; + } + pSelect->pEList = pRhs; + if( pLhs && pLhs->nExpr==1 ){ + /* Take care here not to generate a TK_VECTOR containing only a + ** single value. Since the parser never creates such a vector, some + ** of the subroutines do not handle this case. */ + Expr *p = pLhs->a[0].pExpr; + pLhs->a[0].pExpr = 0; + sqlite3ExprDelete(db, pNew->pLeft); + pNew->pLeft = p; + } + if( pSelect->pOrderBy ){ + /* If the SELECT statement has an ORDER BY clause, zero the + ** iOrderByCol variables. These are set to non-zero when an + ** ORDER BY term exactly matches one of the terms of the + ** result-set. Since the result-set of the SELECT statement may + ** have been modified or reordered, these variables are no longer + ** set correctly. Since setting them is just an optimization, + ** it's easiest just to zero them here. */ + ExprList *pOrderBy = pSelect->pOrderBy; + for(i=0; inExpr; i++){ + pOrderBy->a[i].u.x.iOrderByCol = 0; + } } - } #if 0 - printf("For indexing, change the IN expr:\n"); - sqlite3TreeViewExpr(0, pX, 0); - printf("Into:\n"); - sqlite3TreeViewExpr(0, pNew, 0); + printf("For indexing, change the IN expr:\n"); + sqlite3TreeViewExpr(0, pX, 0); + printf("Into:\n"); + sqlite3TreeViewExpr(0, pNew, 0); #endif + } } return pNew; } @@ -151797,7 +155412,7 @@ static int codeAllEqualityTerms( /* Figure out how many memory cells we will need then allocate them. */ regBase = pParse->nMem + 1; - nReg = pLoop->u.btree.nEq + nExtraReg; + nReg = nEq + nExtraReg; pParse->nMem += nReg; zAff = sqlite3DbStrDup(pParse->db,sqlite3IndexAffinityStr(pParse->db,pIdx)); @@ -151844,9 +155459,6 @@ static int codeAllEqualityTerms( sqlite3VdbeAddOp2(v, OP_Copy, r1, regBase+j); } } - } - for(j=nSkip; jaLTerm[j]; if( pTerm->eOperator & WO_IN ){ if( pTerm->pExpr->flags & EP_xIsSelect ){ /* No affinity ever needs to be (or should be) applied to a value @@ -151989,18 +155601,19 @@ static int codeCursorHintIsOrFunction(Walker *pWalker, Expr *pExpr){ ** 2) transform the expression node to a TK_REGISTER node that reads ** from the newly populated register. ** -** Also, if the node is a TK_COLUMN that does access the table idenified +** Also, if the node is a TK_COLUMN that does access the table identified ** by pCCurHint.iTabCur, and an index is being used (which we will ** know because CCurHint.pIdx!=0) then transform the TK_COLUMN into ** an access of the index rather than the original table. */ static int codeCursorHintFixExpr(Walker *pWalker, Expr *pExpr){ int rc = WRC_Continue; + int reg; struct CCurHint *pHint = pWalker->u.pCCurHint; if( pExpr->op==TK_COLUMN ){ if( pExpr->iTable!=pHint->iTabCur ){ - int reg = ++pWalker->pParse->nMem; /* Register for column value */ - sqlite3ExprCode(pWalker->pParse, pExpr, reg); + reg = ++pWalker->pParse->nMem; /* Register for column value */ + reg = sqlite3ExprCodeTarget(pWalker->pParse, pExpr, reg); pExpr->op = TK_REGISTER; pExpr->iTable = reg; }else if( pHint->pIdx!=0 ){ @@ -152008,15 +155621,15 @@ static int codeCursorHintFixExpr(Walker *pWalker, Expr *pExpr){ pExpr->iColumn = sqlite3TableColumnToIndex(pHint->pIdx, pExpr->iColumn); assert( pExpr->iColumn>=0 ); } - }else if( pExpr->op==TK_AGG_FUNCTION ){ - /* An aggregate function in the WHERE clause of a query means this must - ** be a correlated sub-query, and expression pExpr is an aggregate from - ** the parent context. Do not walk the function arguments in this case. - ** - ** todo: It should be possible to replace this node with a TK_REGISTER - ** expression, as the result of the expression must be stored in a - ** register at this point. The same holds for TK_AGG_COLUMN nodes. */ + }else if( pExpr->pAggInfo ){ rc = WRC_Prune; + reg = ++pWalker->pParse->nMem; /* Register for column value */ + reg = sqlite3ExprCodeTarget(pWalker->pParse, pExpr, reg); + pExpr->op = TK_REGISTER; + pExpr->iTable = reg; + }else if( pExpr->op==TK_TRUEFALSE ){ + /* Do not walk disabled expressions. tag-20230504-1 */ + return WRC_Prune; } return rc; } @@ -152118,7 +155731,7 @@ static void codeCursorHint( } if( pExpr!=0 ){ sWalker.xExprCallback = codeCursorHintFixExpr; - sqlite3WalkExpr(&sWalker, pExpr); + if( pParse->nErr==0 ) sqlite3WalkExpr(&sWalker, pExpr); sqlite3VdbeAddOp4(v, OP_CursorHint, (sHint.pIdx ? sHint.iIdxCur : sHint.iTabCur), 0, 0, (const char*)pExpr, P4_EXPR); @@ -152355,13 +155968,15 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( pLevel->notReady = notReady & ~sqlite3WhereGetMask(&pWInfo->sMaskSet, iCur); bRev = (pWInfo->revMask>>iLevel)&1; VdbeModuleComment((v, "Begin WHERE-loop%d: %s",iLevel,pTabItem->pTab->zName)); -#if WHERETRACE_ENABLED /* 0x20800 */ - if( sqlite3WhereTrace & 0x800 ){ +#if WHERETRACE_ENABLED /* 0x4001 */ + if( sqlite3WhereTrace & 0x1 ){ sqlite3DebugPrintf("Coding level %d of %d: notReady=%llx iFrom=%d\n", iLevel, pWInfo->nLevel, (u64)notReady, pLevel->iFrom); - sqlite3WhereLoopPrint(pLoop, pWC); + if( sqlite3WhereTrace & 0x1000 ){ + sqlite3WhereLoopPrint(pLoop, pWC); + } } - if( sqlite3WhereTrace & 0x20000 ){ + if( (sqlite3WhereTrace & 0x4001)==0x4001 ){ if( iLevel==0 ){ sqlite3DebugPrintf("WHERE clause being coded:\n"); sqlite3TreeViewExpr(0, pWInfo->pWhere, 0); @@ -152604,7 +156219,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( }; assert( TK_LE==TK_GT+1 ); /* Make sure the ordering.. */ assert( TK_LT==TK_GT+2 ); /* ... of the TK_xx values... */ - assert( TK_GE==TK_GT+3 ); /* ... is correcct. */ + assert( TK_GE==TK_GT+3 ); /* ... is correct. */ assert( (pStart->wtFlags & TERM_VNULL)==0 ); testcase( pStart->wtFlags & TERM_VIRTUAL ); @@ -152910,7 +156525,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( ** guess. */ addrSeekScan = sqlite3VdbeAddOp1(v, OP_SeekScan, (pIdx->aiRowLogEst[0]+9)/10); - if( pRangeStart ){ + if( pRangeStart || pRangeEnd ){ sqlite3VdbeChangeP5(v, 1); sqlite3VdbeChangeP2(v, addrSeekScan, sqlite3VdbeCurrentAddr(v)+1); addrSeekScan = 0; @@ -152951,16 +156566,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( assert( pLevel->p2==0 ); if( pRangeEnd ){ Expr *pRight = pRangeEnd->pExpr->pRight; - if( addrSeekScan ){ - /* For a seek-scan that has a range on the lowest term of the index, - ** we have to make the top of the loop be code that sets the end - ** condition of the range. Otherwise, the OP_SeekScan might jump - ** over that initialization, leaving the range-end value set to the - ** range-start value, resulting in a wrong answer. - ** See ticket 5981a8c041a3c2f3 (2021-11-02). - */ - pLevel->p2 = sqlite3VdbeCurrentAddr(v); - } + assert( addrSeekScan==0 ); codeExprOrVector(pParse, pRight, regBase+nEq, nTop); whereLikeOptimizationStringFixup(v, pLevel, pRangeEnd); if( (pRangeEnd->wtFlags & TERM_VNULL)==0 @@ -152994,7 +156600,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( if( zEndAff ) sqlite3DbNNFreeNN(db, zEndAff); /* Top of the loop body */ - if( pLevel->p2==0 ) pLevel->p2 = sqlite3VdbeCurrentAddr(v); + pLevel->p2 = sqlite3VdbeCurrentAddr(v); /* Check if the index cursor is past the end of the range. */ if( nConstraint ){ @@ -153285,7 +156891,7 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( } /* Loop through table entries that match term pOrTerm. */ ExplainQueryPlan((pParse, 1, "INDEX %d", ii+1)); - WHERETRACE(0xffff, ("Subplan for OR-clause:\n")); + WHERETRACE(0xffffffff, ("Subplan for OR-clause:\n")); pSubWInfo = sqlite3WhereBegin(pParse, pOrTab, pOrExpr, 0, 0, 0, WHERE_OR_SUBCLAUSE, iCovCur); assert( pSubWInfo || pParse->nErr ); @@ -153522,12 +157128,12 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( } #endif } -#ifdef WHERETRACE_ENABLED /* 0xffff */ +#ifdef WHERETRACE_ENABLED /* 0xffffffff */ if( sqlite3WhereTrace ){ VdbeNoopComment((v, "WhereTerm[%d] (%p) priority=%d", pWC->nTerm-j, pTerm, iLoop)); } - if( sqlite3WhereTrace & 0x800 ){ + if( sqlite3WhereTrace & 0x4000 ){ sqlite3DebugPrintf("Coding auxiliary constraint:\n"); sqlite3WhereTermPrint(pTerm, pWC->nTerm-j); } @@ -153556,8 +157162,8 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( if( pTerm->leftCursor!=iCur ) continue; if( pTabItem->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT) ) continue; pE = pTerm->pExpr; -#ifdef WHERETRACE_ENABLED /* 0x800 */ - if( sqlite3WhereTrace & 0x800 ){ +#ifdef WHERETRACE_ENABLED /* 0x4001 */ + if( (sqlite3WhereTrace & 0x4001)==0x4001 ){ sqlite3DebugPrintf("Coding transitive constraint:\n"); sqlite3WhereTermPrint(pTerm, pWC->nTerm-j); } @@ -153672,13 +157278,13 @@ SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart( } } -#if WHERETRACE_ENABLED /* 0x20800 */ - if( sqlite3WhereTrace & 0x20000 ){ +#if WHERETRACE_ENABLED /* 0x4001 */ + if( sqlite3WhereTrace & 0x4000 ){ sqlite3DebugPrintf("All WHERE-clause terms after coding level %d:\n", iLevel); sqlite3WhereClausePrint(pWC); } - if( sqlite3WhereTrace & 0x800 ){ + if( sqlite3WhereTrace & 0x1 ){ sqlite3DebugPrintf("End Coding level %d: notReady=%llx\n", iLevel, (u64)pLevel->notReady); } @@ -153793,7 +157399,7 @@ SQLITE_PRIVATE SQLITE_NOINLINE void sqlite3WhereRightJoinLoop( ** the WHERE clause of SQL statements. ** ** This file was originally part of where.c but was split out to improve -** readability and editabiliity. This file contains utility routines for +** readability and editability. This file contains utility routines for ** analyzing Expr objects in the WHERE clause. */ /* #include "sqliteInt.h" */ @@ -154009,7 +157615,7 @@ static int isLikeOrGlob( ** range search. The third is because the caller assumes that the pattern ** consists of at least one character after all escapes have been ** removed. */ - if( cnt!=0 && 255!=(u8)z[cnt-1] && (cnt>1 || z[0]!=wc[3]) ){ + if( (cnt>1 || (cnt>0 && z[0]!=wc[3])) && 255!=(u8)z[cnt-1] ){ Expr *pPrefix; /* A "complete" match if the pattern ends with "*" or "%" */ @@ -154582,7 +158188,7 @@ static void exprAnalyzeOrTerm( pOrTerm->leftCursor))==0 ){ /* This term must be of the form t1.a==t2.b where t2 is in the ** chngToIN set but t1 is not. This term will be either preceded - ** or follwed by an inverted copy (t2.b==t1.a). Skip this term + ** or followed by an inverted copy (t2.b==t1.a). Skip this term ** and use its inversion. */ testcase( pOrTerm->wtFlags & TERM_COPIED ); testcase( pOrTerm->wtFlags & TERM_VIRTUAL ); @@ -154754,36 +158360,40 @@ static Bitmask exprSelectUsage(WhereMaskSet *pMaskSet, Select *pS){ */ static SQLITE_NOINLINE int exprMightBeIndexed2( SrcList *pFrom, /* The FROM clause */ - Bitmask mPrereq, /* Bitmask of FROM clause terms referenced by pExpr */ int *aiCurCol, /* Write the referenced table cursor and column here */ - Expr *pExpr /* An operand of a comparison operator */ + Expr *pExpr, /* An operand of a comparison operator */ + int j /* Start looking with the j-th pFrom entry */ ){ Index *pIdx; int i; int iCur; - for(i=0; mPrereq>1; i++, mPrereq>>=1){} - iCur = pFrom->a[i].iCursor; - for(pIdx=pFrom->a[i].pTab->pIndex; pIdx; pIdx=pIdx->pNext){ - if( pIdx->aColExpr==0 ) continue; - for(i=0; inKeyCol; i++){ - if( pIdx->aiColumn[i]!=XN_EXPR ) continue; - assert( pIdx->bHasExpr ); - if( sqlite3ExprCompareSkip(pExpr, pIdx->aColExpr->a[i].pExpr, iCur)==0 ){ - aiCurCol[0] = iCur; - aiCurCol[1] = XN_EXPR; - return 1; + do{ + iCur = pFrom->a[j].iCursor; + for(pIdx=pFrom->a[j].pTab->pIndex; pIdx; pIdx=pIdx->pNext){ + if( pIdx->aColExpr==0 ) continue; + for(i=0; inKeyCol; i++){ + if( pIdx->aiColumn[i]!=XN_EXPR ) continue; + assert( pIdx->bHasExpr ); + if( sqlite3ExprCompareSkip(pExpr,pIdx->aColExpr->a[i].pExpr,iCur)==0 + && pExpr->op!=TK_STRING + ){ + aiCurCol[0] = iCur; + aiCurCol[1] = XN_EXPR; + return 1; + } } } - } + }while( ++j < pFrom->nSrc ); return 0; } static int exprMightBeIndexed( SrcList *pFrom, /* The FROM clause */ - Bitmask mPrereq, /* Bitmask of FROM clause terms referenced by pExpr */ int *aiCurCol, /* Write the referenced table cursor & column here */ Expr *pExpr, /* An operand of a comparison operator */ int op /* The specific comparison operator */ ){ + int i; + /* If this expression is a vector to the left or right of a ** inequality constraint (>, <, >= or <=), perform the processing ** on the first element of the vector. */ @@ -154793,7 +158403,6 @@ static int exprMightBeIndexed( if( pExpr->op==TK_VECTOR && (op>=TK_GT && ALWAYS(op<=TK_GE)) ){ assert( ExprUseXList(pExpr) ); pExpr = pExpr->x.pList->a[0].pExpr; - } if( pExpr->op==TK_COLUMN ){ @@ -154801,9 +158410,16 @@ static int exprMightBeIndexed( aiCurCol[1] = pExpr->iColumn; return 1; } - if( mPrereq==0 ) return 0; /* No table references */ - if( (mPrereq&(mPrereq-1))!=0 ) return 0; /* Refs more than one table */ - return exprMightBeIndexed2(pFrom,mPrereq,aiCurCol,pExpr); + + for(i=0; inSrc; i++){ + Index *pIdx; + for(pIdx=pFrom->a[i].pTab->pIndex; pIdx; pIdx=pIdx->pNext){ + if( pIdx->aColExpr ){ + return exprMightBeIndexed2(pFrom,aiCurCol,pExpr,i); + } + } + } + return 0; } @@ -154834,8 +158450,8 @@ static void exprAnalyze( WhereTerm *pTerm; /* The term to be analyzed */ WhereMaskSet *pMaskSet; /* Set of table index masks */ Expr *pExpr; /* The expression to be analyzed */ - Bitmask prereqLeft; /* Prerequesites of the pExpr->pLeft */ - Bitmask prereqAll; /* Prerequesites of pExpr */ + Bitmask prereqLeft; /* Prerequisites of the pExpr->pLeft */ + Bitmask prereqAll; /* Prerequisites of pExpr */ Bitmask extraRight = 0; /* Extra dependencies on LEFT JOIN */ Expr *pStr1 = 0; /* RHS of LIKE/GLOB operator */ int isComplete = 0; /* RHS of LIKE/GLOB ends with wildcard */ @@ -154929,7 +158545,7 @@ static void exprAnalyze( pLeft = pLeft->x.pList->a[pTerm->u.x.iField-1].pExpr; } - if( exprMightBeIndexed(pSrc, prereqLeft, aiCurCol, pLeft, op) ){ + if( exprMightBeIndexed(pSrc, aiCurCol, pLeft, op) ){ pTerm->leftCursor = aiCurCol[0]; assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 ); pTerm->u.x.leftColumn = aiCurCol[1]; @@ -154937,7 +158553,7 @@ static void exprAnalyze( } if( op==TK_IS ) pTerm->wtFlags |= TERM_IS; if( pRight - && exprMightBeIndexed(pSrc, pTerm->prereqRight, aiCurCol, pRight, op) + && exprMightBeIndexed(pSrc, aiCurCol, pRight, op) && !ExprHasProperty(pRight, EP_FixedCol) ){ WhereTerm *pNew; @@ -154981,7 +158597,7 @@ static void exprAnalyze( && 0==sqlite3ExprCanBeNull(pLeft) ){ assert( !ExprHasProperty(pExpr, EP_IntValue) ); - pExpr->op = TK_TRUEFALSE; + pExpr->op = TK_TRUEFALSE; /* See tag-20230504-1 */ pExpr->u.zToken = "false"; ExprSetProperty(pExpr, EP_IsFalse); pTerm->prereqAll = 0; @@ -155148,7 +158764,6 @@ static void exprAnalyze( transferJoinMarkings(pNewExpr1, pExpr); idxNew1 = whereClauseInsert(pWC, pNewExpr1, wtFlags); testcase( idxNew1==0 ); - exprAnalyze(pSrc, pWC, idxNew1); pNewExpr2 = sqlite3ExprDup(db, pLeft, 0); pNewExpr2 = sqlite3PExpr(pParse, TK_LT, sqlite3ExprAddCollateString(pParse,pNewExpr2,zCollSeqName), @@ -155156,6 +158771,7 @@ static void exprAnalyze( transferJoinMarkings(pNewExpr2, pExpr); idxNew2 = whereClauseInsert(pWC, pNewExpr2, wtFlags); testcase( idxNew2==0 ); + exprAnalyze(pSrc, pWC, idxNew1); exprAnalyze(pSrc, pWC, idxNew2); pTerm = &pWC->a[idxTerm]; if( isComplete ){ @@ -155212,7 +158828,7 @@ static void exprAnalyze( && pTerm->u.x.iField==0 && pExpr->pLeft->op==TK_VECTOR && ALWAYS( ExprUseXSelect(pExpr) ) - && pExpr->x.pSelect->pPrior==0 + && (pExpr->x.pSelect->pPrior==0 || (pExpr->x.pSelect->selFlags & SF_Values)) #ifndef SQLITE_OMIT_WINDOWFUNC && pExpr->x.pSelect->pWin==0 #endif @@ -155400,6 +159016,13 @@ SQLITE_PRIVATE void SQLITE_NOINLINE sqlite3WhereAddLimit(WhereClause *pWC, Selec assert( pWC->a[ii].eOperator==WO_ROWVAL ); continue; } + if( pWC->a[ii].nChild ){ + /* If this term has child terms, then they are also part of the + ** pWC->a[] array. So this term can be ignored, as a LIMIT clause + ** will only be added if each of the child terms passes the + ** (leftCursor==iCsr) test below. */ + continue; + } if( pWC->a[ii].leftCursor!=iCsr ) return; } @@ -155619,9 +159242,12 @@ SQLITE_PRIVATE void sqlite3WhereTabFuncArgs( pRhs = sqlite3PExpr(pParse, TK_UPLUS, sqlite3ExprDup(pParse->db, pArgs->a[j].pExpr, 0), 0); pTerm = sqlite3PExpr(pParse, TK_EQ, pColRef, pRhs); - if( pItem->fg.jointype & (JT_LEFT|JT_LTORJ) ){ + if( pItem->fg.jointype & (JT_LEFT|JT_RIGHT) ){ + testcase( pItem->fg.jointype & JT_LEFT ); /* testtag-20230227a */ + testcase( pItem->fg.jointype & JT_RIGHT ); /* testtag-20230227b */ joinType = EP_OuterON; }else{ + testcase( pItem->fg.jointype & JT_LTORJ ); /* testtag-20230227c */ joinType = EP_InnerON; } sqlite3SetJoinExpr(pTerm, pItem->iCursor, joinType); @@ -156338,7 +159964,7 @@ static void translateColumnToCopy( #if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(WHERETRACE_ENABLED) static void whereTraceIndexInfoInputs(sqlite3_index_info *p){ int i; - if( !sqlite3WhereTrace ) return; + if( (sqlite3WhereTrace & 0x10)==0 ) return; for(i=0; inConstraint; i++){ sqlite3DebugPrintf( " constraint[%d]: col=%d termid=%d op=%d usabled=%d collseq=%s\n", @@ -156358,7 +159984,7 @@ static void whereTraceIndexInfoInputs(sqlite3_index_info *p){ } static void whereTraceIndexInfoOutputs(sqlite3_index_info *p){ int i; - if( !sqlite3WhereTrace ) return; + if( (sqlite3WhereTrace & 0x10)==0 ) return; for(i=0; inConstraint; i++){ sqlite3DebugPrintf(" usage[%d]: argvIdx=%d omit=%d\n", i, @@ -156445,6 +160071,57 @@ static int termCanDriveIndex( #ifndef SQLITE_OMIT_AUTOMATIC_INDEX + +#ifdef SQLITE_ENABLE_STMT_SCANSTATUS +/* +** Argument pIdx represents an automatic index that the current statement +** will create and populate. Add an OP_Explain with text of the form: +** +** CREATE AUTOMATIC INDEX ON
    () [WHERE ] +** +** This is only required if sqlite3_stmt_scanstatus() is enabled, to +** associate an SQLITE_SCANSTAT_NCYCLE and SQLITE_SCANSTAT_NLOOP +** values with. In order to avoid breaking legacy code and test cases, +** the OP_Explain is not added if this is an EXPLAIN QUERY PLAN command. +*/ +static void explainAutomaticIndex( + Parse *pParse, + Index *pIdx, /* Automatic index to explain */ + int bPartial, /* True if pIdx is a partial index */ + int *pAddrExplain /* OUT: Address of OP_Explain */ +){ + if( IS_STMT_SCANSTATUS(pParse->db) && pParse->explain!=2 ){ + Table *pTab = pIdx->pTable; + const char *zSep = ""; + char *zText = 0; + int ii = 0; + sqlite3_str *pStr = sqlite3_str_new(pParse->db); + sqlite3_str_appendf(pStr,"CREATE AUTOMATIC INDEX ON %s(", pTab->zName); + assert( pIdx->nColumn>1 ); + assert( pIdx->aiColumn[pIdx->nColumn-1]==XN_ROWID ); + for(ii=0; ii<(pIdx->nColumn-1); ii++){ + const char *zName = 0; + int iCol = pIdx->aiColumn[ii]; + + zName = pTab->aCol[iCol].zCnName; + sqlite3_str_appendf(pStr, "%s%s", zSep, zName); + zSep = ", "; + } + zText = sqlite3_str_finish(pStr); + if( zText==0 ){ + sqlite3OomFault(pParse->db); + }else{ + *pAddrExplain = sqlite3VdbeExplain( + pParse, 0, "%s)%s", zText, (bPartial ? " WHERE " : "") + ); + sqlite3_free(zText); + } + } +} +#else +# define explainAutomaticIndex(a,b,c,d) +#endif + /* ** Generate code to construct the Index object for an automatic index ** and to set up the WhereLevel object pLevel so that the code generator @@ -156452,8 +160129,7 @@ static int termCanDriveIndex( */ static SQLITE_NOINLINE void constructAutomaticIndex( Parse *pParse, /* The parsing context */ - const WhereClause *pWC, /* The WHERE clause */ - const SrcItem *pSrc, /* The FROM clause term to get the next index */ + WhereClause *pWC, /* The WHERE clause */ const Bitmask notReady, /* Mask of cursors that are not available */ WhereLevel *pLevel /* Write new index here */ ){ @@ -156474,12 +160150,17 @@ static SQLITE_NOINLINE void constructAutomaticIndex( char *zNotUsed; /* Extra space on the end of pIdx */ Bitmask idxCols; /* Bitmap of columns used for indexing */ Bitmask extraCols; /* Bitmap of additional columns */ - u8 sentWarning = 0; /* True if a warnning has been issued */ + u8 sentWarning = 0; /* True if a warning has been issued */ + u8 useBloomFilter = 0; /* True to also add a Bloom filter */ Expr *pPartial = 0; /* Partial Index Expression */ int iContinue = 0; /* Jump here to skip excluded rows */ - SrcItem *pTabItem; /* FROM clause term being indexed */ + SrcList *pTabList; /* The complete FROM clause */ + SrcItem *pSrc; /* The FROM clause term to get the next index */ int addrCounter = 0; /* Address where integer counter is initialized */ int regBase; /* Array of registers where record is assembled */ +#ifdef SQLITE_ENABLE_STMT_SCANSTATUS + int addrExp = 0; /* Address of OP_Explain */ +#endif /* Generate code to skip over the creation and initialization of the ** transient index on 2nd and subsequent iterations of the loop. */ @@ -156490,6 +160171,8 @@ static SQLITE_NOINLINE void constructAutomaticIndex( /* Count the number of columns that will be added to the index ** and used to match WHERE clause constraints */ nKeyCol = 0; + pTabList = pWC->pWInfo->pTabList; + pSrc = &pTabList->a[pLevel->iFrom]; pTable = pSrc->pTab; pWCEnd = &pWC->a[pWC->nTerm]; pLoop = pLevel->pWLoop; @@ -156500,7 +160183,7 @@ static SQLITE_NOINLINE void constructAutomaticIndex( ** WHERE clause (or the ON clause of a LEFT join) that constrain which ** rows of the target table (pSrc) that can be used. */ if( (pTerm->wtFlags & TERM_VIRTUAL)==0 - && sqlite3ExprIsTableConstraint(pExpr, pSrc) + && sqlite3ExprIsSingleTableConstraint(pExpr, pTabList, pLevel->iFrom) ){ pPartial = sqlite3ExprAnd(pParse, pPartial, sqlite3ExprDup(pParse->db, pExpr, 0)); @@ -156541,7 +160224,11 @@ static SQLITE_NOINLINE void constructAutomaticIndex( ** original table changes and the index and table cannot both be used ** if they go out of sync. */ - extraCols = pSrc->colUsed & (~idxCols | MASKBIT(BMS-1)); + if( IsView(pTable) ){ + extraCols = ALLBITS; + }else{ + extraCols = pSrc->colUsed & (~idxCols | MASKBIT(BMS-1)); + } mxBitCol = MIN(BMS-1,pTable->nCol); testcase( pTable->nCol==BMS-1 ); testcase( pTable->nCol==BMS-2 ); @@ -156577,6 +160264,16 @@ static SQLITE_NOINLINE void constructAutomaticIndex( assert( pColl!=0 || pParse->nErr>0 ); /* TH3 collate01.800 */ pIdx->azColl[n] = pColl ? pColl->zName : sqlite3StrBINARY; n++; + if( ALWAYS(pX->pLeft!=0) + && sqlite3ExprAffinity(pX->pLeft)!=SQLITE_AFF_TEXT + ){ + /* TUNING: only use a Bloom filter on an automatic index + ** if one or more key columns has the ability to hold numeric + ** values, since strings all have the same hash in the Bloom + ** filter implementation and hence a Bloom filter on a text column + ** is not usually helpful. */ + useBloomFilter = 1; + } } } } @@ -156603,25 +160300,27 @@ static SQLITE_NOINLINE void constructAutomaticIndex( pIdx->azColl[n] = sqlite3StrBINARY; /* Create the automatic index */ + explainAutomaticIndex(pParse, pIdx, pPartial!=0, &addrExp); assert( pLevel->iIdxCur>=0 ); pLevel->iIdxCur = pParse->nTab++; sqlite3VdbeAddOp2(v, OP_OpenAutoindex, pLevel->iIdxCur, nKeyCol+1); sqlite3VdbeSetP4KeyInfo(pParse, pIdx); VdbeComment((v, "for %s", pTable->zName)); - if( OptimizationEnabled(pParse->db, SQLITE_BloomFilter) ){ + if( OptimizationEnabled(pParse->db, SQLITE_BloomFilter) && useBloomFilter ){ + sqlite3WhereExplainBloomFilter(pParse, pWC->pWInfo, pLevel); pLevel->regFilter = ++pParse->nMem; sqlite3VdbeAddOp2(v, OP_Blob, 10000, pLevel->regFilter); } /* Fill the automatic index with content */ - pTabItem = &pWC->pWInfo->pTabList->a[pLevel->iFrom]; - if( pTabItem->fg.viaCoroutine ){ - int regYield = pTabItem->regReturn; + assert( pSrc == &pWC->pWInfo->pTabList->a[pLevel->iFrom] ); + if( pSrc->fg.viaCoroutine ){ + int regYield = pSrc->regReturn; addrCounter = sqlite3VdbeAddOp2(v, OP_Integer, 0, 0); - sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, pTabItem->addrFillSub); + sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, pSrc->addrFillSub); addrTop = sqlite3VdbeAddOp1(v, OP_Yield, regYield); VdbeCoverage(v); - VdbeComment((v, "next row of %s", pTabItem->pTab->zName)); + VdbeComment((v, "next row of %s", pSrc->pTab->zName)); }else{ addrTop = sqlite3VdbeAddOp1(v, OP_Rewind, pLevel->iTabCur); VdbeCoverage(v); } @@ -156638,17 +160337,18 @@ static SQLITE_NOINLINE void constructAutomaticIndex( sqlite3VdbeAddOp4Int(v, OP_FilterAdd, pLevel->regFilter, 0, regBase, pLoop->u.btree.nEq); } + sqlite3VdbeScanStatusCounters(v, addrExp, addrExp, sqlite3VdbeCurrentAddr(v)); sqlite3VdbeAddOp2(v, OP_IdxInsert, pLevel->iIdxCur, regRecord); sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT); if( pPartial ) sqlite3VdbeResolveLabel(v, iContinue); - if( pTabItem->fg.viaCoroutine ){ + if( pSrc->fg.viaCoroutine ){ sqlite3VdbeChangeP2(v, addrCounter, regBase+n); testcase( pParse->db->mallocFailed ); assert( pLevel->iIdxCur>0 ); translateColumnToCopy(pParse, addrTop, pLevel->iTabCur, - pTabItem->regResult, pLevel->iIdxCur); + pSrc->regResult, pLevel->iIdxCur); sqlite3VdbeGoto(v, addrTop); - pTabItem->fg.viaCoroutine = 0; + pSrc->fg.viaCoroutine = 0; }else{ sqlite3VdbeAddOp2(v, OP_Next, pLevel->iTabCur, addrTop+1); VdbeCoverage(v); sqlite3VdbeChangeP5(v, SQLITE_STMTSTATUS_AUTOINDEX); @@ -156658,6 +160358,7 @@ static SQLITE_NOINLINE void constructAutomaticIndex( /* Jump here when skipping the initialization */ sqlite3VdbeJumpHere(v, addrInit); + sqlite3VdbeScanStatusRange(v, addrExp, addrExp, -1); end_auto_index_create: sqlite3ExprDelete(pParse->db, pPartial); @@ -156699,6 +160400,10 @@ static SQLITE_NOINLINE void sqlite3ConstructBloomFilter( Vdbe *v = pParse->pVdbe; /* VDBE under construction */ WhereLoop *pLoop = pLevel->pWLoop; /* The loop being coded */ int iCur; /* Cursor for table getting the filter */ + IndexedExpr *saved_pIdxEpr; /* saved copy of Parse.pIdxEpr */ + + saved_pIdxEpr = pParse->pIdxEpr; + pParse->pIdxEpr = 0; assert( pLoop!=0 ); assert( v!=0 ); @@ -156706,9 +160411,11 @@ static SQLITE_NOINLINE void sqlite3ConstructBloomFilter( addrOnce = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v); do{ + const SrcList *pTabList; const SrcItem *pItem; const Table *pTab; u64 sz; + int iSrc; sqlite3WhereExplainBloomFilter(pParse, pWInfo, pLevel); addrCont = sqlite3VdbeMakeLabel(pParse); iCur = pLevel->iTabCur; @@ -156722,7 +160429,9 @@ static SQLITE_NOINLINE void sqlite3ConstructBloomFilter( ** testing complicated. By basing the blob size on the value in the ** sqlite_stat1 table, testing is much easier. */ - pItem = &pWInfo->pTabList->a[pLevel->iFrom]; + pTabList = pWInfo->pTabList; + iSrc = pLevel->iFrom; + pItem = &pTabList->a[iSrc]; assert( pItem!=0 ); pTab = pItem->pTab; assert( pTab!=0 ); @@ -156739,7 +160448,7 @@ static SQLITE_NOINLINE void sqlite3ConstructBloomFilter( for(pTerm=pWInfo->sWC.a; pTermpExpr; if( (pTerm->wtFlags & TERM_VIRTUAL)==0 - && sqlite3ExprIsTableConstraint(pExpr, pItem) + && sqlite3ExprIsSingleTableConstraint(pExpr, pTabList, iSrc) ){ sqlite3ExprIfFalse(pParse, pTerm->pExpr, addrCont, SQLITE_JUMPIFNULL); } @@ -156755,9 +160464,8 @@ static SQLITE_NOINLINE void sqlite3ConstructBloomFilter( int r1 = sqlite3GetTempRange(pParse, n); int jj; for(jj=0; jjaiColumn[jj]; assert( pIdx->pTable==pItem->pTab ); - sqlite3ExprCodeGetColumnOfTable(v, pIdx->pTable, iCur, iCol,r1+jj); + sqlite3ExprCodeLoadIndexColumn(pParse, pIdx, iCur, jj, r1+jj); } sqlite3VdbeAddOp4Int(v, OP_FilterAdd, pLevel->regFilter, 0, r1, n); sqlite3ReleaseTempRange(pParse, r1, n); @@ -156788,6 +160496,7 @@ static SQLITE_NOINLINE void sqlite3ConstructBloomFilter( } }while( iLevel < pWInfo->nLevel ); sqlite3VdbeJumpHere(v, addrOnce); + pParse->pIdxEpr = saved_pIdxEpr; } @@ -157043,6 +160752,9 @@ static int vtabBestIndex(Parse *pParse, Table *pTab, sqlite3_index_info *p){ sqlite3ErrorMsg(pParse, "%s", pVtab->zErrMsg); } } + if( pTab->u.vtab.p->bAllSchemas ){ + sqlite3VtabUsesAllSchemas(pParse); + } sqlite3_free(pVtab->zErrMsg); pVtab->zErrMsg = 0; return rc; @@ -157087,6 +160799,7 @@ static int whereKeyStats( assert( pIdx->nSample>0 ); assert( pRec->nField>0 ); + /* Do a binary search to find the first sample greater than or equal ** to pRec. If pRec contains a single field, the set of samples to search ** is simply the aSample[] array. If the samples in aSample[] contain more @@ -157131,7 +160844,12 @@ static int whereKeyStats( ** it is extended to two fields. The duplicates that this creates do not ** cause any problems. */ - nField = MIN(pRec->nField, pIdx->nSample); + if( !HasRowid(pIdx->pTable) && IsPrimaryKeyIndex(pIdx) ){ + nField = pIdx->nKeyCol; + }else{ + nField = pIdx->nColumn; + } + nField = MIN(pRec->nField, nField); iCol = 0; iSample = pIdx->nSample * nField; do{ @@ -157197,12 +160915,12 @@ static int whereKeyStats( if( iCol>0 ){ pRec->nField = iCol; assert( sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)<=0 - || pParse->db->mallocFailed ); + || pParse->db->mallocFailed || CORRUPT_DB ); } if( i>0 ){ pRec->nField = nField; assert( sqlite3VdbeRecordCompare(aSample[i-1].n, aSample[i-1].p, pRec)<0 - || pParse->db->mallocFailed ); + || pParse->db->mallocFailed || CORRUPT_DB ); } } } @@ -157294,7 +161012,7 @@ SQLITE_PRIVATE char sqlite3IndexColumnAffinity(sqlite3 *db, Index *pIdx, int iCo ** Value pLoop->nOut is currently set to the estimated number of rows ** visited for scanning (a=? AND b=?). This function reduces that estimate ** by some factor to account for the (c BETWEEN ? AND ?) expression based -** on the stat4 data for the index. this scan will be peformed multiple +** on the stat4 data for the index. this scan will be performed multiple ** times (once for each (a,b) combination that matches a=?) is dealt with ** by the caller. ** @@ -157375,7 +161093,7 @@ static int whereRangeSkipScanEst( int nAdjust = (sqlite3LogEst(p->nSample) - sqlite3LogEst(nDiff)); pLoop->nOut -= nAdjust; *pbDone = 1; - WHERETRACE(0x10, ("range skip-scan regions: %u..%u adjust=%d est=%d\n", + WHERETRACE(0x20, ("range skip-scan regions: %u..%u adjust=%d est=%d\n", nLower, nUpper, nAdjust*-1, pLoop->nOut)); } @@ -157553,7 +161271,7 @@ static int whereRangeScanEst( if( nNewwtFlags & TERM_VNULL)==0 ); + assert( pUpper==0 || (pUpper->wtFlags & TERM_VNULL)==0 || pParse->nErr>0 ); nNew = whereRangeAdjust(pLower, nOut); nNew = whereRangeAdjust(pUpper, nNew); @@ -157586,7 +161304,7 @@ static int whereRangeScanEst( if( nNewnOut>nOut ){ - WHERETRACE(0x10,("Range scan lowers nOut from %d to %d\n", + WHERETRACE(0x20,("Range scan lowers nOut from %d to %d\n", pLoop->nOut, nOut)); } #endif @@ -157651,7 +161369,7 @@ static int whereEqualScanEst( pBuilder->nRecValid = nEq; whereKeyStats(pParse, p, pRec, 0, a); - WHERETRACE(0x10,("equality scan regions %s(%d): %d\n", + WHERETRACE(0x20,("equality scan regions %s(%d): %d\n", p->zName, nEq-1, (int)a[1])); *pnRow = a[1]; @@ -157699,9 +161417,9 @@ static int whereInScanEst( } if( rc==SQLITE_OK ){ - if( nRowEst > nRow0 ) nRowEst = nRow0; + if( nRowEst > (tRowcnt)nRow0 ) nRowEst = nRow0; *pnRow = nRowEst; - WHERETRACE(0x10,("IN row estimate: est=%d\n", nRowEst)); + WHERETRACE(0x20,("IN row estimate: est=%d\n", nRowEst)); } assert( pBuilder->nRecValid==nRecValid ); return rc; @@ -157810,7 +161528,7 @@ SQLITE_PRIVATE void sqlite3WhereLoopPrint(WhereLoop *p, WhereClause *pWC){ sqlite3DebugPrintf(" f %06x N %d", p->wsFlags, p->nLTerm); } sqlite3DebugPrintf(" cost %d,%d,%d\n", p->rSetup, p->rRun, p->nOut); - if( p->nLTerm && (sqlite3WhereTrace & 0x100)!=0 ){ + if( p->nLTerm && (sqlite3WhereTrace & 0x4000)!=0 ){ int i; for(i=0; inLTerm; i++){ sqlite3WhereTermPrint(p->aLTerm[i], i); @@ -158049,7 +161767,7 @@ static WhereLoop **whereLoopFindLesser( ** rSetup. Call this SETUP-INVARIANT */ assert( p->rSetup>=pTemplate->rSetup ); - /* Any loop using an appliation-defined index (or PRIMARY KEY or + /* Any loop using an application-defined index (or PRIMARY KEY or ** UNIQUE constraint) with one or more == constraints is better ** than an automatic index. Unless it is a skip-scan. */ if( (p->wsFlags & WHERE_AUTO_INDEX)!=0 @@ -158076,7 +161794,7 @@ static WhereLoop **whereLoopFindLesser( /* If pTemplate is always better than p, then cause p to be overwritten ** with pTemplate. pTemplate is better than p if: - ** (1) pTemplate has no more dependences than p, and + ** (1) pTemplate has no more dependencies than p, and ** (2) pTemplate has an equal or lower cost than p. */ if( (p->prereq & pTemplate->prereq)==pTemplate->prereq /* (1) */ @@ -158194,7 +161912,7 @@ static int whereLoopInsert(WhereLoopBuilder *pBuilder, WhereLoop *pTemplate){ }else{ /* We will be overwriting WhereLoop p[]. But before we do, first ** go through the rest of the list and delete any other entries besides - ** p[] that are also supplated by pTemplate */ + ** p[] that are also supplanted by pTemplate */ WhereLoop **ppTail = &p->pNextLoop; WhereLoop *pToDel; while( *ppTail ){ @@ -158274,6 +161992,7 @@ static void whereLoopOutputAdjust( if( pX->iParent>=0 && (&pWC->a[pX->iParent])==pTerm ) break; } if( j<0 ){ + sqlite3ProgressCheck(pWC->pWInfo->pParse); if( pLoop->maskSelf==pTerm->prereqAll ){ /* If there are extra terms in the WHERE clause not used by an index ** that depend only on the table being scanned, and that will tend to @@ -158393,7 +162112,7 @@ static int whereRangeVectorLen( } /* -** Adjust the cost C by the costMult facter T. This only occurs if +** Adjust the cost C by the costMult factor T. This only occurs if ** compiled with -DSQLITE_ENABLE_COSTMULT */ #ifdef SQLITE_ENABLE_COSTMULT @@ -158420,7 +162139,7 @@ static int whereLoopAddBtreeIndex( Index *pProbe, /* An index on pSrc */ LogEst nInMul /* log(Number of iterations due to IN) */ ){ - WhereInfo *pWInfo = pBuilder->pWInfo; /* WHERE analyse context */ + WhereInfo *pWInfo = pBuilder->pWInfo; /* WHERE analyze context */ Parse *pParse = pWInfo->pParse; /* Parsing context */ sqlite3 *db = pParse->db; /* Database connection malloc context */ WhereLoop *pNew; /* Template WhereLoop under construction */ @@ -158441,7 +162160,10 @@ static int whereLoopAddBtreeIndex( WhereTerm *pTop = 0, *pBtm = 0; /* Top and bottom range constraints */ pNew = pBuilder->pNew; - if( db->mallocFailed ) return SQLITE_NOMEM_BKPT; + assert( db->mallocFailed==0 || pParse->nErr>0 ); + if( pParse->nErr ){ + return pParse->rc; + } WHERETRACE(0x800, ("BEGIN %s.addBtreeIdx(%s), nEq=%d, nSkip=%d, rRun=%d\n", pProbe->pTable->zName,pProbe->zName, pNew->u.btree.nEq, pNew->nSkip, pNew->rRun)); @@ -158688,7 +162410,7 @@ static int whereLoopAddBtreeIndex( && pNew->nOut+10 > pProbe->aiRowLogEst[0] ){ #if WHERETRACE_ENABLED /* 0x01 */ - if( sqlite3WhereTrace & 0x01 ){ + if( sqlite3WhereTrace & 0x20 ){ sqlite3DebugPrintf( "STAT4 determines term has low selectivity:\n"); sqlite3WhereTermPrint(pTerm, 999); @@ -158725,9 +162447,17 @@ static int whereLoopAddBtreeIndex( ** seek only. Then, if this is a non-covering index, add the cost of ** visiting the rows in the main table. */ assert( pSrc->pTab->szTabRow>0 ); - rCostIdx = pNew->nOut + 1 + (15*pProbe->szIdxRow)/pSrc->pTab->szTabRow; + if( pProbe->idxType==SQLITE_IDXTYPE_IPK ){ + /* The pProbe->szIdxRow is low for an IPK table since the interior + ** pages are small. Thus szIdxRow gives a good estimate of seek cost. + ** But the leaf pages are full-size, so pProbe->szIdxRow would badly + ** under-estimate the scanning cost. */ + rCostIdx = pNew->nOut + 16; + }else{ + rCostIdx = pNew->nOut + 1 + (15*pProbe->szIdxRow)/pSrc->pTab->szTabRow; + } pNew->rRun = sqlite3LogEstAdd(rLogSize, rCostIdx); - if( (pNew->wsFlags & (WHERE_IDX_ONLY|WHERE_IPK))==0 ){ + if( (pNew->wsFlags & (WHERE_IDX_ONLY|WHERE_IPK|WHERE_EXPRIDX))==0 ){ pNew->rRun = sqlite3LogEstAdd(pNew->rRun, pNew->nOut + 16); } ApplyCostMultiplier(pNew->rRun, pProbe->pTable->costMult); @@ -158749,6 +162479,9 @@ static int whereLoopAddBtreeIndex( && (pNew->u.btree.nEqnKeyCol || pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY) ){ + if( pNew->u.btree.nEq>3 ){ + sqlite3ProgressCheck(pParse); + } whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nInMul+nIn); } pNew->nOut = saved_nOut; @@ -158880,16 +162613,39 @@ static int whereUsablePartialIndex( return 0; } +/* +** pIdx is an index containing expressions. Check it see if any of the +** expressions in the index match the pExpr expression. +*/ +static int exprIsCoveredByIndex( + const Expr *pExpr, + const Index *pIdx, + int iTabCur +){ + int i; + for(i=0; inColumn; i++){ + if( pIdx->aiColumn[i]==XN_EXPR + && sqlite3ExprCompare(0, pExpr, pIdx->aColExpr->a[i].pExpr, iTabCur)==0 + ){ + return 1; + } + } + return 0; +} + /* ** Structure passed to the whereIsCoveringIndex Walker callback. */ +typedef struct CoveringIndexCheck CoveringIndexCheck; struct CoveringIndexCheck { Index *pIdx; /* The index */ int iTabCur; /* Cursor number for the corresponding table */ + u8 bExpr; /* Uses an indexed expression */ + u8 bUnidx; /* Uses an unindexed column not within an indexed expr */ }; /* -** Information passed in is pWalk->u.pCovIdxCk. Call is pCk. +** Information passed in is pWalk->u.pCovIdxCk. Call it pCk. ** ** If the Expr node references the table with cursor pCk->iTabCur, then ** make sure that column is covered by the index pCk->pIdx. We know that @@ -158901,71 +162657,103 @@ struct CoveringIndexCheck { ** ** If this node does not disprove that the index can be a covering index, ** then just return WRC_Continue, to continue the search. +** +** If pCk->pIdx contains indexed expressions and one of those expressions +** matches pExpr, then prune the search. */ static int whereIsCoveringIndexWalkCallback(Walker *pWalk, Expr *pExpr){ - int i; /* Loop counter */ - const Index *pIdx; /* The index of interest */ - const i16 *aiColumn; /* Columns contained in the index */ - u16 nColumn; /* Number of columns in the index */ - if( pExpr->op!=TK_COLUMN && pExpr->op!=TK_AGG_COLUMN ) return WRC_Continue; - if( pExpr->iColumn<(BMS-1) ) return WRC_Continue; - if( pExpr->iTable!=pWalk->u.pCovIdxCk->iTabCur ) return WRC_Continue; - pIdx = pWalk->u.pCovIdxCk->pIdx; - aiColumn = pIdx->aiColumn; - nColumn = pIdx->nColumn; - for(i=0; iiColumn ) return WRC_Continue; - } - pWalk->eCode = 1; - return WRC_Abort; + int i; /* Loop counter */ + const Index *pIdx; /* The index of interest */ + const i16 *aiColumn; /* Columns contained in the index */ + u16 nColumn; /* Number of columns in the index */ + CoveringIndexCheck *pCk; /* Info about this search */ + + pCk = pWalk->u.pCovIdxCk; + pIdx = pCk->pIdx; + if( (pExpr->op==TK_COLUMN || pExpr->op==TK_AGG_COLUMN) ){ + /* if( pExpr->iColumn<(BMS-1) && pIdx->bHasExpr==0 ) return WRC_Continue;*/ + if( pExpr->iTable!=pCk->iTabCur ) return WRC_Continue; + pIdx = pWalk->u.pCovIdxCk->pIdx; + aiColumn = pIdx->aiColumn; + nColumn = pIdx->nColumn; + for(i=0; iiColumn ) return WRC_Continue; + } + pCk->bUnidx = 1; + return WRC_Abort; + }else if( pIdx->bHasExpr + && exprIsCoveredByIndex(pExpr, pIdx, pWalk->u.pCovIdxCk->iTabCur) ){ + pCk->bExpr = 1; + return WRC_Prune; + } + return WRC_Continue; } /* ** pIdx is an index that covers all of the low-number columns used by -** pWInfo->pSelect (columns from 0 through 62). But there are columns -** in pWInfo->pSelect beyond 62. This routine tries to answer the question -** of whether pIdx covers *all* columns in the query. +** pWInfo->pSelect (columns from 0 through 62) or an index that has +** expressions terms. Hence, we cannot determine whether or not it is +** a covering index by using the colUsed bitmasks. We have to do a search +** to see if the index is covering. This routine does that search. +** +** The return value is one of these: +** +** 0 The index is definitely not a covering index +** +** WHERE_IDX_ONLY The index is definitely a covering index ** -** Return 0 if pIdx is a covering index. Return non-zero if pIdx is -** not a covering index or if we are unable to determine if pIdx is a -** covering index. +** WHERE_EXPRIDX The index is likely a covering index, but it is +** difficult to determine precisely because of the +** expressions that are indexed. Score it as a +** covering index, but still keep the main table open +** just in case we need it. ** -** This routine is an optimization. It is always safe to return non-zero. -** But returning zero when non-zero should have been returned can lead to -** incorrect bytecode and assertion faults. +** This routine is an optimization. It is always safe to return zero. +** But returning one of the other two values when zero should have been +** returned can lead to incorrect bytecode and assertion faults. */ static SQLITE_NOINLINE u32 whereIsCoveringIndex( WhereInfo *pWInfo, /* The WHERE clause context */ Index *pIdx, /* Index that is being tested */ int iTabCur /* Cursor for the table being indexed */ ){ - int i; + int i, rc; struct CoveringIndexCheck ck; Walker w; if( pWInfo->pSelect==0 ){ /* We don't have access to the full query, so we cannot check to see ** if pIdx is covering. Assume it is not. */ - return 1; - } - for(i=0; inColumn; i++){ - if( pIdx->aiColumn[i]>=BMS-1 ) break; + return 0; } - if( i>=pIdx->nColumn ){ - /* pIdx does not index any columns greater than 62, but we know from - ** colMask that columns greater than 62 are used, so this is not a - ** covering index */ - return 1; + if( pIdx->bHasExpr==0 ){ + for(i=0; inColumn; i++){ + if( pIdx->aiColumn[i]>=BMS-1 ) break; + } + if( i>=pIdx->nColumn ){ + /* pIdx does not index any columns greater than 62, but we know from + ** colMask that columns greater than 62 are used, so this is not a + ** covering index */ + return 0; + } } ck.pIdx = pIdx; ck.iTabCur = iTabCur; + ck.bExpr = 0; + ck.bUnidx = 0; memset(&w, 0, sizeof(w)); w.xExprCallback = whereIsCoveringIndexWalkCallback; w.xSelectCallback = sqlite3SelectWalkNoop; w.u.pCovIdxCk = &ck; - w.eCode = 0; sqlite3WalkSelect(&w, pWInfo->pSelect); - return w.eCode; + if( ck.bUnidx ){ + rc = 0; + }else if( ck.bExpr ){ + rc = WHERE_EXPRIDX; + }else{ + rc = WHERE_IDX_ONLY; + } + return rc; } /* @@ -159006,7 +162794,7 @@ static SQLITE_NOINLINE u32 whereIsCoveringIndex( */ static int whereLoopAddBtree( WhereLoopBuilder *pBuilder, /* WHERE clause information */ - Bitmask mPrereq /* Extra prerequesites for using this table */ + Bitmask mPrereq /* Extra prerequisites for using this table */ ){ WhereInfo *pWInfo; /* WHERE analysis context */ Index *pProbe; /* An index we are evaluating */ @@ -159050,7 +162838,7 @@ static int whereLoopAddBtree( sPk.aiRowLogEst = aiRowEstPk; sPk.onError = OE_Replace; sPk.pTable = pTab; - sPk.szIdxRow = pTab->szTabRow; + sPk.szIdxRow = 3; /* TUNING: Interior rows of IPK table are very small */ sPk.idxType = SQLITE_IDXTYPE_IPK; aiRowEstPk[0] = pTab->nRowLogEst; aiRowEstPk[1] = 0; @@ -159101,7 +162889,8 @@ static int whereLoopAddBtree( if( !IsView(pTab) && (pTab->tabFlags & TF_Ephemeral)==0 ){ pNew->rSetup += 28; }else{ - pNew->rSetup -= 10; + pNew->rSetup -= 25; /* Greatly reduced setup cost for auto indexes + ** on ephemeral materializations of views */ } ApplyCostMultiplier(pNew->rSetup, pTab->costMult); if( pNew->rSetup<0 ) pNew->rSetup = 0; @@ -159181,14 +162970,38 @@ static int whereLoopAddBtree( }else{ Bitmask m; if( pProbe->isCovering ){ - pNew->wsFlags = WHERE_IDX_ONLY | WHERE_INDEXED; m = 0; + pNew->wsFlags = WHERE_IDX_ONLY | WHERE_INDEXED; }else{ m = pSrc->colUsed & pProbe->colNotIdxed; - if( m==TOPBIT ){ - m = whereIsCoveringIndex(pWInfo, pProbe, pSrc->iCursor); + pNew->wsFlags = WHERE_INDEXED; + if( m==TOPBIT || (pProbe->bHasExpr && !pProbe->bHasVCol && m!=0) ){ + u32 isCov = whereIsCoveringIndex(pWInfo, pProbe, pSrc->iCursor); + if( isCov==0 ){ + WHERETRACE(0x200, + ("-> %s is not a covering index" + " according to whereIsCoveringIndex()\n", pProbe->zName)); + assert( m!=0 ); + }else{ + m = 0; + pNew->wsFlags |= isCov; + if( isCov & WHERE_IDX_ONLY ){ + WHERETRACE(0x200, + ("-> %s is a covering expression index" + " according to whereIsCoveringIndex()\n", pProbe->zName)); + }else{ + assert( isCov==WHERE_EXPRIDX ); + WHERETRACE(0x200, + ("-> %s might be a covering expression index" + " according to whereIsCoveringIndex()\n", pProbe->zName)); + } + } + }else if( m==0 ){ + WHERETRACE(0x200, + ("-> %s a covering index according to bitmasks\n", + pProbe->zName, m==0 ? "is" : "is not")); + pNew->wsFlags = WHERE_IDX_ONLY | WHERE_INDEXED; } - pNew->wsFlags = (m==0) ? (WHERE_IDX_ONLY|WHERE_INDEXED) : WHERE_INDEXED; } /* Full scan via index */ @@ -159361,7 +163174,7 @@ static int whereLoopAddVirtualOne( ** that the particular combination of parameters provided is unusable. ** Make no entries in the loop table. */ - WHERETRACE(0xffff, (" ^^^^--- non-viable plan rejected!\n")); + WHERETRACE(0xffffffff, (" ^^^^--- non-viable plan rejected!\n")); return SQLITE_OK; } return rc; @@ -159472,7 +163285,7 @@ static int whereLoopAddVirtualOne( sqlite3_free(pNew->u.vtab.idxStr); pNew->u.vtab.needFree = 0; } - WHERETRACE(0xffff, (" bIn=%d prereqIn=%04llx prereqOut=%04llx\n", + WHERETRACE(0xffffffff, (" bIn=%d prereqIn=%04llx prereqOut=%04llx\n", *pbIn, (sqlite3_uint64)mPrereq, (sqlite3_uint64)(pNew->prereq & ~mPrereq))); @@ -159488,7 +163301,7 @@ static int whereLoopAddVirtualOne( ** ** Return a pointer to the collation name: ** -** 1. If there is an explicit COLLATE operator on the constaint, return it. +** 1. If there is an explicit COLLATE operator on the constraint, return it. ** ** 2. Else, if the column has an alternative collation, return that. ** @@ -159573,32 +163386,27 @@ SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info *pIdxInfo){ return pHidden->eDistinct; } -#if (defined(SQLITE_ENABLE_DBPAGE_VTAB) || defined(SQLITE_TEST)) \ - && !defined(SQLITE_OMIT_VIRTUALTABLE) /* ** Cause the prepared statement that is associated with a call to -** xBestIndex to potentiall use all schemas. If the statement being +** xBestIndex to potentially use all schemas. If the statement being ** prepared is read-only, then just start read transactions on all ** schemas. But if this is a write operation, start writes on all ** schemas. ** ** This is used by the (built-in) sqlite_dbpage virtual table. */ -SQLITE_PRIVATE void sqlite3VtabUsesAllSchemas(sqlite3_index_info *pIdxInfo){ - HiddenIndexInfo *pHidden = (HiddenIndexInfo*)&pIdxInfo[1]; - Parse *pParse = pHidden->pParse; +SQLITE_PRIVATE void sqlite3VtabUsesAllSchemas(Parse *pParse){ int nDb = pParse->db->nDb; int i; for(i=0; iwriteMask ){ + if( DbMaskNonZero(pParse->writeMask) ){ for(i=0; ipTab->zName)); - WHERETRACE(0x40, (" VirtualOne: all usable\n")); + WHERETRACE(0x800, (" VirtualOne: all usable\n")); rc = whereLoopAddVirtualOne( pBuilder, mPrereq, ALLBITS, 0, p, mNoOmit, &bIn, &bRetry ); @@ -159689,7 +163497,7 @@ static int whereLoopAddVirtual( /* If the plan produced by the earlier call uses an IN(...) term, call ** xBestIndex again, this time with IN(...) terms disabled. */ if( bIn ){ - WHERETRACE(0x40, (" VirtualOne: all usable w/o IN\n")); + WHERETRACE(0x800, (" VirtualOne: all usable w/o IN\n")); rc = whereLoopAddVirtualOne( pBuilder, mPrereq, ALLBITS, WO_IN, p, mNoOmit, &bIn, 0); assert( bIn==0 ); @@ -159715,7 +163523,7 @@ static int whereLoopAddVirtual( mPrev = mNext; if( mNext==ALLBITS ) break; if( mNext==mBest || mNext==mBestNoIn ) continue; - WHERETRACE(0x40, (" VirtualOne: mPrev=%04llx mNext=%04llx\n", + WHERETRACE(0x800, (" VirtualOne: mPrev=%04llx mNext=%04llx\n", (sqlite3_uint64)mPrev, (sqlite3_uint64)mNext)); rc = whereLoopAddVirtualOne( pBuilder, mPrereq, mNext|mPrereq, 0, p, mNoOmit, &bIn, 0); @@ -159729,7 +163537,7 @@ static int whereLoopAddVirtual( ** that requires no source tables at all (i.e. one guaranteed to be ** usable), make a call here with all source tables disabled */ if( rc==SQLITE_OK && seenZero==0 ){ - WHERETRACE(0x40, (" VirtualOne: all disabled\n")); + WHERETRACE(0x800, (" VirtualOne: all disabled\n")); rc = whereLoopAddVirtualOne( pBuilder, mPrereq, mPrereq, 0, p, mNoOmit, &bIn, 0); if( bIn==0 ) seenZeroNoIN = 1; @@ -159739,7 +163547,7 @@ static int whereLoopAddVirtual( ** that requires no source tables at all and does not use an IN(...) ** operator, make a final call to obtain one here. */ if( rc==SQLITE_OK && seenZeroNoIN==0 ){ - WHERETRACE(0x40, (" VirtualOne: all disabled and w/o IN\n")); + WHERETRACE(0x800, (" VirtualOne: all disabled and w/o IN\n")); rc = whereLoopAddVirtualOne( pBuilder, mPrereq, mPrereq, WO_IN, p, mNoOmit, &bIn, 0); } @@ -159795,7 +163603,7 @@ static int whereLoopAddOr( sSubBuild = *pBuilder; sSubBuild.pOrSet = &sCur; - WHERETRACE(0x200, ("Begin processing OR-clause %p\n", pTerm)); + WHERETRACE(0x400, ("Begin processing OR-clause %p\n", pTerm)); for(pOrTerm=pOrWC->a; pOrTermeOperator & WO_AND)!=0 ){ sSubBuild.pWC = &pOrTerm->u.pAndInfo->wc; @@ -159812,9 +163620,9 @@ static int whereLoopAddOr( } sCur.n = 0; #ifdef WHERETRACE_ENABLED - WHERETRACE(0x200, ("OR-term %d of %p has %d subterms:\n", + WHERETRACE(0x400, ("OR-term %d of %p has %d subterms:\n", (int)(pOrTerm-pOrWC->a), pTerm, sSubBuild.pWC->nTerm)); - if( sqlite3WhereTrace & 0x400 ){ + if( sqlite3WhereTrace & 0x20000 ){ sqlite3WhereClausePrint(sSubBuild.pWC); } #endif @@ -159829,8 +163637,6 @@ static int whereLoopAddOr( if( rc==SQLITE_OK ){ rc = whereLoopAddOr(&sSubBuild, mPrereq, mUnusable); } - assert( rc==SQLITE_OK || rc==SQLITE_DONE || sCur.n==0 - || rc==SQLITE_NOMEM ); testcase( rc==SQLITE_NOMEM && sCur.n>0 ); testcase( rc==SQLITE_DONE ); if( sCur.n==0 ){ @@ -159876,7 +163682,7 @@ static int whereLoopAddOr( pNew->prereq = sSum.a[i].prereq; rc = whereLoopInsert(pBuilder, pNew); } - WHERETRACE(0x200, ("End processing OR-clause %p\n", pTerm)); + WHERETRACE(0x400, ("End processing OR-clause %p\n", pTerm)); } } return rc; @@ -160224,8 +164030,8 @@ static i8 wherePathSatisfiesOrderBy( if( pOBExpr->iTable!=iCur ) continue; if( pOBExpr->iColumn!=iColumn ) continue; }else{ - Expr *pIdxExpr = pIndex->aColExpr->a[j].pExpr; - if( sqlite3ExprCompareSkip(pOBExpr, pIdxExpr, iCur) ){ + Expr *pIxExpr = pIndex->aColExpr->a[j].pExpr; + if( sqlite3ExprCompareSkip(pOBExpr, pIxExpr, iCur) ){ continue; } } @@ -160357,37 +164163,56 @@ static const char *wherePathName(WherePath *pPath, int nLoop, WhereLoop *pLast){ ** order. */ static LogEst whereSortingCost( - WhereInfo *pWInfo, - LogEst nRow, - int nOrderBy, - int nSorted + WhereInfo *pWInfo, /* Query planning context */ + LogEst nRow, /* Estimated number of rows to sort */ + int nOrderBy, /* Number of ORDER BY clause terms */ + int nSorted /* Number of initial ORDER BY terms naturally in order */ ){ - /* TUNING: Estimated cost of a full external sort, where N is + /* Estimated cost of a full external sort, where N is ** the number of rows to sort is: ** - ** cost = (3.0 * N * log(N)). + ** cost = (K * N * log(N)). ** ** Or, if the order-by clause has X terms but only the last Y ** terms are out of order, then block-sorting will reduce the ** sorting cost to: ** - ** cost = (3.0 * N * log(N)) * (Y/X) + ** cost = (K * N * log(N)) * (Y/X) ** - ** The (Y/X) term is implemented using stack variable rScale - ** below. + ** The constant K is at least 2.0 but will be larger if there are a + ** large number of columns to be sorted, as the sorting time is + ** proportional to the amount of content to be sorted. The algorithm + ** does not currently distinguish between fat columns (BLOBs and TEXTs) + ** and skinny columns (INTs). It just uses the number of columns as + ** an approximation for the row width. + ** + ** And extra factor of 2.0 or 3.0 is added to the sorting cost if the sort + ** is built using OP_IdxInsert and OP_Sort rather than with OP_SorterInsert. */ - LogEst rScale, rSortCost; - assert( nOrderBy>0 && 66==sqlite3LogEst(100) ); - rScale = sqlite3LogEst((nOrderBy-nSorted)*100/nOrderBy) - 66; - rSortCost = nRow + rScale + 16; + LogEst rSortCost, nCol; + assert( pWInfo->pSelect!=0 ); + assert( pWInfo->pSelect->pEList!=0 ); + /* TUNING: sorting cost proportional to the number of output columns: */ + nCol = sqlite3LogEst((pWInfo->pSelect->pEList->nExpr+59)/30); + rSortCost = nRow + nCol; + if( nSorted>0 ){ + /* Scale the result by (Y/X) */ + rSortCost += sqlite3LogEst((nOrderBy-nSorted)*100/nOrderBy) - 66; + } /* Multiple by log(M) where M is the number of output rows. ** Use the LIMIT for M if it is smaller. Or if this sort is for ** a DISTINCT operator, M will be the number of distinct output ** rows, so fudge it downwards a bit. */ - if( (pWInfo->wctrlFlags & WHERE_USE_LIMIT)!=0 && pWInfo->iLimitiLimit; + if( (pWInfo->wctrlFlags & WHERE_USE_LIMIT)!=0 ){ + rSortCost += 10; /* TUNING: Extra 2.0x if using LIMIT */ + if( nSorted!=0 ){ + rSortCost += 6; /* TUNING: Extra 1.5x if also using partial sort */ + } + if( pWInfo->iLimitiLimit; + } }else if( (pWInfo->wctrlFlags & WHERE_WANT_DISTINCT) ){ /* TUNING: In the sort for a DISTINCT operator, assume that the DISTINCT ** reduces the number of output rows by a factor of 2 */ @@ -160437,7 +164262,8 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){ ** For joins of 3 or more tables, track the 10 best paths */ mxChoice = (nLoop<=1) ? 1 : (nLoop==2 ? 5 : 10); assert( nLoop<=pWInfo->pTabList->nSrc ); - WHERETRACE(0x002, ("---- begin solver. (nRowEst=%d)\n", nRowEst)); + WHERETRACE(0x002, ("---- begin solver. (nRowEst=%d, nQueryLoop=%d)\n", + nRowEst, pParse->nQueryLoop)); /* If nRowEst is zero and there is an ORDER BY clause, ignore it. In this ** case the purpose of this call is to estimate the number of rows returned @@ -160539,11 +164365,11 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){ pWInfo, nRowEst, nOrderBy, isOrdered ); } - /* TUNING: Add a small extra penalty (5) to sorting as an - ** extra encouragment to the query planner to select a plan + /* TUNING: Add a small extra penalty (3) to sorting as an + ** extra encouragement to the query planner to select a plan ** where the rows emerge in the correct order without any sorting ** required. */ - rCost = sqlite3LogEstAdd(rUnsorted, aSortCost[isOrdered]) + 5; + rCost = sqlite3LogEstAdd(rUnsorted, aSortCost[isOrdered]) + 3; WHERETRACE(0x002, ("---- sort cost=%-3d (%d/%d) increases cost %3d to %-3d\n", @@ -160556,9 +164382,10 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){ /* TUNING: A full-scan of a VIEW or subquery in the outer loop ** is not so bad. */ - if( iLoop==0 && (pWLoop->wsFlags & WHERE_VIEWSCAN)!=0 ){ + if( iLoop==0 && (pWLoop->wsFlags & WHERE_VIEWSCAN)!=0 && nLoop>1 ){ rCost += -10; nOut += -30; + WHERETRACE(0x80,("VIEWSCAN cost reduction for %c\n",pWLoop->cId)); } /* Check to see if pWLoop should be added to the set of @@ -160747,6 +164574,10 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){ if( pFrom->isOrdered==pWInfo->pOrderBy->nExpr ){ pWInfo->eDistinct = WHERE_DISTINCT_ORDERED; } + if( pWInfo->pSelect->pOrderBy + && pWInfo->nOBSat > pWInfo->pSelect->pOrderBy->nExpr ){ + pWInfo->nOBSat = pWInfo->pSelect->pOrderBy->nExpr; + } }else{ pWInfo->revMask = pFrom->revLoop; if( pWInfo->nOBSat<=0 ){ @@ -160891,7 +164722,7 @@ static int whereShortCut(WhereLoopBuilder *pBuilder){ pLoop->cId = '0'; #endif #ifdef WHERETRACE_ENABLED - if( sqlite3WhereTrace ){ + if( sqlite3WhereTrace & 0x02 ){ sqlite3DebugPrintf("whereShortCut() used to compute solution\n"); } #endif @@ -160958,6 +164789,13 @@ static void showAllWhereLoops(WhereInfo *pWInfo, WhereClause *pWC){ ** at most a single row. ** 4) The table must not be referenced by any part of the query apart ** from its own USING or ON clause. +** 5) The table must not have an inner-join ON or USING clause if there is +** a RIGHT JOIN anywhere in the query. Otherwise the ON/USING clause +** might move from the right side to the left side of the RIGHT JOIN. +** Note: Due to (2), this condition can only arise if the table is +** the right-most table of a subquery that was flattened into the +** main query and that subquery was the right-hand operand of an +** inner join that held an ON or USING clause. ** ** For example, given: ** @@ -160983,6 +164821,7 @@ static SQLITE_NOINLINE Bitmask whereOmitNoopJoin( ){ int i; Bitmask tabUsed; + int hasRightJoin; /* Preconditions checked by the caller */ assert( pWInfo->nLevel>=2 ); @@ -160997,6 +164836,7 @@ static SQLITE_NOINLINE Bitmask whereOmitNoopJoin( if( pWInfo->pOrderBy ){ tabUsed |= sqlite3WhereExprListUsage(&pWInfo->sMaskSet, pWInfo->pOrderBy); } + hasRightJoin = (pWInfo->pTabList->a[0].fg.jointype & JT_LTORJ)!=0; for(i=pWInfo->nLevel-1; i>=1; i--){ WhereTerm *pTerm, *pEnd; SrcItem *pItem; @@ -161019,9 +164859,15 @@ static SQLITE_NOINLINE Bitmask whereOmitNoopJoin( break; } } + if( hasRightJoin + && ExprHasProperty(pTerm->pExpr, EP_InnerON) + && pTerm->pExpr->w.iJoin==pItem->iCursor + ){ + break; /* restriction (5) */ + } } if( pTerm drop loop %c not used\n", pLoop->cId)); + WHERETRACE(0xffffffff, ("-> drop loop %c not used\n", pLoop->cId)); notReady &= ~pLoop->maskSelf; for(pTerm=pWInfo->sWC.a; pTermprereqAll & pLoop->maskSelf)!=0 ){ @@ -161060,28 +164906,27 @@ static SQLITE_NOINLINE void whereCheckIfBloomFilterIsUseful( const WhereInfo *pWInfo ){ int i; - LogEst nSearch; + LogEst nSearch = 0; assert( pWInfo->nLevel>=2 ); assert( OptimizationEnabled(pWInfo->pParse->db, SQLITE_BloomFilter) ); - nSearch = pWInfo->a[0].pWLoop->nOut; - for(i=1; inLevel; i++){ + for(i=0; inLevel; i++){ WhereLoop *pLoop = pWInfo->a[i].pWLoop; const unsigned int reqFlags = (WHERE_SELFCULL|WHERE_COLUMN_EQ); - if( (pLoop->wsFlags & reqFlags)==reqFlags + SrcItem *pItem = &pWInfo->pTabList->a[pLoop->iTab]; + Table *pTab = pItem->pTab; + if( (pTab->tabFlags & TF_HasStat1)==0 ) break; + pTab->tabFlags |= TF_StatsUsed; + if( i>=1 + && (pLoop->wsFlags & reqFlags)==reqFlags /* vvvvvv--- Always the case if WHERE_COLUMN_EQ is defined */ && ALWAYS((pLoop->wsFlags & (WHERE_IPK|WHERE_INDEXED))!=0) ){ - SrcItem *pItem = &pWInfo->pTabList->a[pLoop->iTab]; - Table *pTab = pItem->pTab; - pTab->tabFlags |= TF_StatsUsed; - if( nSearch > pTab->nRowLogEst - && (pTab->tabFlags & TF_HasStat1)!=0 - ){ + if( nSearch > pTab->nRowLogEst ){ testcase( pItem->fg.jointype & JT_LEFT ); pLoop->wsFlags |= WHERE_BLOOMFILTER; pLoop->wsFlags &= ~WHERE_IDX_ONLY; - WHERETRACE(0xffff, ( + WHERETRACE(0xffffffff, ( "-> use Bloom-filter on loop %c because there are ~%.1e " "lookups into %s which has only ~%.1e rows\n", pLoop->cId, (double)sqlite3LogEstToInt(nSearch), pTab->zName, @@ -161094,13 +164939,13 @@ static SQLITE_NOINLINE void whereCheckIfBloomFilterIsUseful( /* ** This is an sqlite3ParserAddCleanup() callback that is invoked to -** free the Parse->pIdxExpr list when the Parse object is destroyed. +** free the Parse->pIdxEpr list when the Parse object is destroyed. */ static void whereIndexedExprCleanup(sqlite3 *db, void *pObject){ Parse *pParse = (Parse*)pObject; - while( pParse->pIdxExpr!=0 ){ - IndexedExpr *p = pParse->pIdxExpr; - pParse->pIdxExpr = p->pIENext; + while( pParse->pIdxEpr!=0 ){ + IndexedExpr *p = pParse->pIdxEpr; + pParse->pIdxEpr = p->pIENext; sqlite3ExprDelete(db, p->pExpr); sqlite3DbFreeNN(db, p); } @@ -161112,13 +164957,13 @@ static void whereIndexedExprCleanup(sqlite3 *db, void *pObject){ ** number for the index and iDataCur is the cursor number for the corresponding ** table. ** -** This routine adds IndexedExpr entries to the Parse->pIdxExpr field for +** This routine adds IndexedExpr entries to the Parse->pIdxEpr field for ** each of the expressions in the index so that the expression code generator ** will know to replace occurrences of the indexed expression with ** references to the corresponding column of the index. */ static SQLITE_NOINLINE void whereAddIndexedExpr( - Parse *pParse, /* Add IndexedExpr entries to pParse->pIdxExpr */ + Parse *pParse, /* Add IndexedExpr entries to pParse->pIdxEpr */ Index *pIdx, /* The index-on-expression that contains the expressions */ int iIdxCur, /* Cursor number for pIdx */ SrcItem *pTabItem /* The FROM clause entry for the table */ @@ -161147,22 +164992,53 @@ static SQLITE_NOINLINE void whereAddIndexedExpr( if( sqlite3ExprIsConstant(pExpr) ) continue; p = sqlite3DbMallocRaw(pParse->db, sizeof(IndexedExpr)); if( p==0 ) break; - p->pIENext = pParse->pIdxExpr; + p->pIENext = pParse->pIdxEpr; +#ifdef WHERETRACE_ENABLED + if( sqlite3WhereTrace & 0x200 ){ + sqlite3DebugPrintf("New pParse->pIdxEpr term {%d,%d}\n", iIdxCur, i); + if( sqlite3WhereTrace & 0x5000 ) sqlite3ShowExpr(pExpr); + } +#endif p->pExpr = sqlite3ExprDup(pParse->db, pExpr, 0); p->iDataCur = pTabItem->iCursor; p->iIdxCur = iIdxCur; p->iIdxCol = i; p->bMaybeNullRow = bMaybeNullRow; + if( sqlite3IndexAffinityStr(pParse->db, pIdx) ){ + p->aff = pIdx->zColAff[i]; + } #ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS p->zIdxName = pIdx->zName; #endif - pParse->pIdxExpr = p; + pParse->pIdxEpr = p; if( p->pIENext==0 ){ sqlite3ParserAddCleanup(pParse, whereIndexedExprCleanup, pParse); } } } +/* +** Set the reverse-scan order mask to one for all tables in the query +** with the exception of MATERIALIZED common table expressions that have +** their own internal ORDER BY clauses. +** +** This implements the PRAGMA reverse_unordered_selects=ON setting. +** (Also SQLITE_DBCONFIG_REVERSE_SCANORDER). +*/ +static SQLITE_NOINLINE void whereReverseScanOrder(WhereInfo *pWInfo){ + int ii; + for(ii=0; iipTabList->nSrc; ii++){ + SrcItem *pItem = &pWInfo->pTabList->a[ii]; + if( !pItem->fg.isCte + || pItem->u2.pCteUse->eM10d!=M10d_Yes + || NEVER(pItem->pSelect==0) + || pItem->pSelect->pOrderBy==0 + ){ + pWInfo->revMask |= MASKBIT(ii); + } + } +} + /* ** Generate the beginning of the loop used for WHERE clause processing. ** The return value is a pointer to an opaque structure that contains @@ -161221,7 +165097,7 @@ static SQLITE_NOINLINE void whereAddIndexedExpr( ** ** OUTER JOINS ** -** An outer join of tables t1 and t2 is conceptally coded as follows: +** An outer join of tables t1 and t2 is conceptually coded as follows: ** ** foreach row1 in t1 do ** flag = 0 @@ -161376,7 +165252,7 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( ** ** The N-th term of the FROM clause is assigned a bitmask of 1<nErr ) goto whereBeginError; - /* Special case: WHERE terms that do not refer to any tables in the join - ** (constant expressions). Evaluate each such term, and jump over all the - ** generated code if the result is not true. + /* The False-WHERE-Term-Bypass optimization: ** - ** Do not do this if the expression contains non-deterministic functions - ** that are not within a sub-select. This is not strictly required, but - ** preserves SQLite's legacy behaviour in the following two cases: + ** If there are WHERE terms that are false, then no rows will be output, + ** so skip over all of the code generated here. ** - ** FROM ... WHERE random()>0; -- eval random() once per row - ** FROM ... WHERE (SELECT random())>0; -- eval random() once overall + ** Conditions: + ** + ** (1) The WHERE term must not refer to any tables in the join. + ** (2) The term must not come from an ON clause on the + ** right-hand side of a LEFT or FULL JOIN. + ** (3) The term must not come from an ON clause, or there must be + ** no RIGHT or FULL OUTER joins in pTabList. + ** (4) If the expression contains non-deterministic functions + ** that are not within a sub-select. This is not required + ** for correctness but rather to preserves SQLite's legacy + ** behaviour in the following two cases: + ** + ** WHERE random()>0; -- eval random() once per row + ** WHERE (SELECT random())>0; -- eval random() just once overall + ** + ** Note that the Where term need not be a constant in order for this + ** optimization to apply, though it does need to be constant relative to + ** the current subquery (condition 1). The term might include variables + ** from outer queries so that the value of the term changes from one + ** invocation of the current subquery to the next. */ for(ii=0; iinBase; ii++){ - WhereTerm *pT = &sWLB.pWC->a[ii]; + WhereTerm *pT = &sWLB.pWC->a[ii]; /* A term of the WHERE clause */ + Expr *pX; /* The expression of pT */ if( pT->wtFlags & TERM_VIRTUAL ) continue; - if( pT->prereqAll==0 && (nTabList==0 || exprIsDeterministic(pT->pExpr)) ){ - sqlite3ExprIfFalse(pParse, pT->pExpr, pWInfo->iBreak, SQLITE_JUMPIFNULL); + pX = pT->pExpr; + assert( pX!=0 ); + assert( pT->prereqAll!=0 || !ExprHasProperty(pX, EP_OuterON) ); + if( pT->prereqAll==0 /* Conditions (1) and (2) */ + && (nTabList==0 || exprIsDeterministic(pX)) /* Condition (4) */ + && !(ExprHasProperty(pX, EP_InnerON) /* Condition (3) */ + && (pTabList->a[0].fg.jointype & JT_LTORJ)!=0 ) + ){ + sqlite3ExprIfFalse(pParse, pX, pWInfo->iBreak, SQLITE_JUMPIFNULL); pT->wtFlags |= TERM_CODED; } } @@ -161448,13 +165347,13 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( /* Construct the WhereLoop objects */ #if defined(WHERETRACE_ENABLED) - if( sqlite3WhereTrace & 0xffff ){ + if( sqlite3WhereTrace & 0xffffffff ){ sqlite3DebugPrintf("*** Optimizer Start *** (wctrlFlags: 0x%x",wctrlFlags); if( wctrlFlags & WHERE_USE_LIMIT ){ sqlite3DebugPrintf(", limit: %d", iAuxArg); } sqlite3DebugPrintf(")\n"); - if( sqlite3WhereTrace & 0x100 ){ + if( sqlite3WhereTrace & 0x8000 ){ Select sSelect; memset(&sSelect, 0, sizeof(sSelect)); sSelect.selFlags = SF_WhereBegin; @@ -161464,10 +165363,10 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( sSelect.pEList = pResultSet; sqlite3TreeViewSelect(0, &sSelect, 0); } - } - if( sqlite3WhereTrace & 0x100 ){ /* Display all terms of the WHERE clause */ - sqlite3DebugPrintf("---- WHERE clause at start of analysis:\n"); - sqlite3WhereClausePrint(sWLB.pWC); + if( sqlite3WhereTrace & 0x4000 ){ /* Display all WHERE clause terms */ + sqlite3DebugPrintf("---- WHERE clause at start of analysis:\n"); + sqlite3WhereClausePrint(sWLB.pWC); + } } #endif @@ -161483,7 +165382,7 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( ** loops will be built using the revised truthProb values. */ if( sWLB.bldFlags2 & SQLITE_BLDF2_2NDPASS ){ WHERETRACE_ALL_LOOPS(pWInfo, sWLB.pWC); - WHERETRACE(0xffff, + WHERETRACE(0xffffffff, ("**** Redo all loop computations due to" " TERM_HIGHTRUTH changes ****\n")); while( pWInfo->pLoops ){ @@ -161504,8 +165403,9 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( if( db->mallocFailed ) goto whereBeginError; } } + assert( pWInfo->pTabList!=0 ); if( pWInfo->pOrderBy==0 && (db->flags & SQLITE_ReverseOrder)!=0 ){ - pWInfo->revMask = ALLBITS; + whereReverseScanOrder(pWInfo); } if( pParse->nErr ){ goto whereBeginError; @@ -161569,11 +165469,11 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( } #if defined(WHERETRACE_ENABLED) - if( sqlite3WhereTrace & 0x100 ){ /* Display all terms of the WHERE clause */ + if( sqlite3WhereTrace & 0x4000 ){ /* Display all terms of the WHERE clause */ sqlite3DebugPrintf("---- WHERE clause at end of analysis:\n"); sqlite3WhereClausePrint(sWLB.pWC); } - WHERETRACE(0xffff,("*** Optimizer Finished ***\n")); + WHERETRACE(0xffffffff,("*** Optimizer Finished ***\n")); #endif pWInfo->pParse->nQueryLoop += pWInfo->nRowOut; @@ -161605,6 +165505,7 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( 0!=(wctrlFlags & WHERE_ONEPASS_MULTIROW) && !IsVirtual(pTabList->a[0].pTab) && (0==(wsFlags & WHERE_MULTI_OR) || (wctrlFlags & WHERE_DUPLICATES_OK)) + && OptimizationEnabled(db, SQLITE_OnePass) )){ pWInfo->eOnePass = bOnerow ? ONEPASS_SINGLE : ONEPASS_MULTI; if( HasRowid(pTabList->a[0].pTab) && (wsFlags & WHERE_IDX_ONLY) ){ @@ -161668,7 +165569,7 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( assert( n<=pTab->nCol ); } #ifdef SQLITE_ENABLE_CURSOR_HINTS - if( pLoop->u.btree.pIndex!=0 ){ + if( pLoop->u.btree.pIndex!=0 && (pTab->tabFlags & TF_WithoutRowid)==0 ){ sqlite3VdbeChangeP5(v, OPFLAG_SEEKEQ|bFordelete); }else #endif @@ -161805,11 +165706,11 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin( sqlite3VdbeJumpHere(v, iOnce); } } + assert( pTabList == pWInfo->pTabList ); if( (wsFlags & (WHERE_AUTO_INDEX|WHERE_BLOOMFILTER))!=0 ){ if( (wsFlags & WHERE_AUTO_INDEX)!=0 ){ #ifndef SQLITE_OMIT_AUTOMATIC_INDEX - constructAutomaticIndex(pParse, &pWInfo->sWC, - &pTabList->a[pLevel->iFrom], notReady, pLevel); + constructAutomaticIndex(pParse, &pWInfo->sWC, notReady, pLevel); #endif }else{ sqlite3ConstructBloomFilter(pWInfo, ii, pLevel, notReady); @@ -162107,9 +166008,16 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){ last = pWInfo->iEndWhere; } if( pIdx->bHasExpr ){ - IndexedExpr *p = pParse->pIdxExpr; + IndexedExpr *p = pParse->pIdxEpr; while( p ){ if( p->iIdxCur==pLevel->iIdxCur ){ +#ifdef WHERETRACE_ENABLED + if( sqlite3WhereTrace & 0x200 ){ + sqlite3DebugPrintf("Disable pParse->pIdxEpr term {%d,%d}\n", + p->iIdxCur, p->iIdxCol); + if( sqlite3WhereTrace & 0x5000 ) sqlite3ShowExpr(p->pExpr); + } +#endif p->iDataCur = -1; p->iIdxCur = -1; } @@ -162119,7 +166027,8 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){ k = pLevel->addrBody + 1; #ifdef SQLITE_DEBUG if( db->flags & SQLITE_VdbeAddopTrace ){ - printf("TRANSLATE opcodes in range %d..%d\n", k, last-1); + printf("TRANSLATE cursor %d->%d in opcode range %d..%d\n", + pLevel->iTabCur, pLevel->iIdxCur, k, last-1); } /* Proof that the "+1" on the k value above is safe */ pOp = sqlite3VdbeGetOp(v, k - 1); @@ -162326,7 +166235,7 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){ ** ** These are the same built-in window functions supported by Postgres. ** Although the behaviour of aggregate window functions (functions that -** can be used as either aggregates or window funtions) allows them to +** can be used as either aggregates or window functions) allows them to ** be implemented using an API, built-in window functions are much more ** esoteric. Additionally, some window functions (e.g. nth_value()) ** may only be implemented by caching the entire partition in memory. @@ -162856,7 +166765,7 @@ static Window *windowFind(Parse *pParse, Window *pList, const char *zName){ ** is the Window object representing the associated OVER clause. This ** function updates the contents of pWin as follows: ** -** * If the OVER clause refered to a named window (as in "max(x) OVER win"), +** * If the OVER clause referred to a named window (as in "max(x) OVER win"), ** search list pList for a matching WINDOW definition, and update pWin ** accordingly. If no such WINDOW clause can be found, leave an error ** in pParse. @@ -162994,6 +166903,7 @@ static int selectWindowRewriteExprCb(Walker *pWalker, Expr *pExpr){ } /* no break */ deliberate_fall_through + case TK_IF_NULL_ROW: case TK_AGG_FUNCTION: case TK_COLUMN: { int iCol = -1; @@ -163278,7 +167188,7 @@ SQLITE_PRIVATE int sqlite3WindowRewrite(Parse *pParse, Select *p){ pSub = sqlite3SelectNew( pParse, pSublist, pSrc, pWhere, pGroupBy, pHaving, pSort, 0, 0 ); - SELECTTRACE(1,pParse,pSub, + TREETRACE(0x40,pParse,pSub, ("New window-function subquery in FROM clause of (%u/%p)\n", p->selId, p)); p->pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0); @@ -163288,6 +167198,7 @@ SQLITE_PRIVATE int sqlite3WindowRewrite(Parse *pParse, Select *p){ if( p->pSrc ){ Table *pTab2; p->pSrc->a[0].pSelect = pSub; + p->pSrc->a[0].fg.isCorrelated = 1; sqlite3SrcListAssignCursors(pParse, p->pSrc); pSub->selFlags |= SF_Expanded|SF_OrderByReqd; pTab2 = sqlite3ResultSetOfSelect(pParse, pSub, SQLITE_AFF_NONE); @@ -163475,7 +167386,7 @@ SQLITE_PRIVATE Window *sqlite3WindowAssemble( } /* -** Window *pWin has just been created from a WINDOW clause. Tokne pBase +** Window *pWin has just been created from a WINDOW clause. Token pBase ** is the base window. Earlier windows from the same WINDOW clause are ** stored in the linked list starting at pWin->pNextWin. This function ** either updates *pWin according to the base specification, or else @@ -163781,7 +167692,7 @@ struct WindowCsrAndReg { ** ** (ORDER BY a, b GROUPS BETWEEN 2 PRECEDING AND 2 FOLLOWING) ** -** The windows functions implmentation caches the input rows in a temp +** The windows functions implementation caches the input rows in a temp ** table, sorted by "a, b" (it actually populates the cache lazily, and ** aggressively removes rows once they are no longer required, but that's ** a mere detail). It keeps three cursors open on the temp table. One @@ -164790,7 +168701,7 @@ static int windowExprGtZero(Parse *pParse, Expr *pExpr){ ** ** For the most part, the patterns above are adapted to support UNBOUNDED by ** assuming that it is equivalent to "infinity PRECEDING/FOLLOWING" and -** CURRENT ROW by assuming that it is equivilent to "0 PRECEDING/FOLLOWING". +** CURRENT ROW by assuming that it is equivalent to "0 PRECEDING/FOLLOWING". ** This is optimized of course - branches that will never be taken and ** conditions that are always true are omitted from the VM code. The only ** exceptional case is: @@ -165069,7 +168980,7 @@ SQLITE_PRIVATE void sqlite3WindowCodeStep( } /* Allocate registers for the array of values from the sub-query, the - ** samve values in record form, and the rowid used to insert said record + ** same values in record form, and the rowid used to insert said record ** into the ephemeral table. */ regNew = pParse->nMem+1; pParse->nMem += nInput; @@ -165153,8 +169064,7 @@ SQLITE_PRIVATE void sqlite3WindowCodeStep( VdbeCoverageNeverNullIf(v, op==OP_Ge); /* NeverNull because bound */ VdbeCoverageNeverNullIf(v, op==OP_Le); /* values previously checked */ windowAggFinal(&s, 0); - sqlite3VdbeAddOp2(v, OP_Rewind, s.current.csr, 1); - VdbeCoverageNeverTaken(v); + sqlite3VdbeAddOp1(v, OP_Rewind, s.current.csr); windowReturnOneRow(&s); sqlite3VdbeAddOp1(v, OP_ResetSorter, s.current.csr); sqlite3VdbeAddOp2(v, OP_Goto, 0, lblWhereEnd); @@ -165166,13 +169076,10 @@ SQLITE_PRIVATE void sqlite3WindowCodeStep( } if( pMWin->eStart!=TK_UNBOUNDED ){ - sqlite3VdbeAddOp2(v, OP_Rewind, s.start.csr, 1); - VdbeCoverageNeverTaken(v); + sqlite3VdbeAddOp1(v, OP_Rewind, s.start.csr); } - sqlite3VdbeAddOp2(v, OP_Rewind, s.current.csr, 1); - VdbeCoverageNeverTaken(v); - sqlite3VdbeAddOp2(v, OP_Rewind, s.end.csr, 1); - VdbeCoverageNeverTaken(v); + sqlite3VdbeAddOp1(v, OP_Rewind, s.current.csr); + sqlite3VdbeAddOp1(v, OP_Rewind, s.end.csr); if( regPeer && pOrderBy ){ sqlite3VdbeAddOp3(v, OP_Copy, regNewPeer, regPeer, pOrderBy->nExpr-1); sqlite3VdbeAddOp3(v, OP_Copy, regPeer, s.start.reg, pOrderBy->nExpr-1); @@ -165314,7 +169221,8 @@ SQLITE_PRIVATE void sqlite3WindowCodeStep( /************** End of window.c **********************************************/ /************** Begin file parse.c *******************************************/ /* This file is automatically generated by Lemon from input grammar -** source file "parse.y". */ +** source file "parse.y". +*/ /* ** 2001-09-15 ** @@ -165331,7 +169239,7 @@ SQLITE_PRIVATE void sqlite3WindowCodeStep( ** The canonical source code to this file ("parse.y") is a Lemon grammar ** file that specifies the input grammar and actions to take while parsing. ** That input file is processed by Lemon to generate a C-language -** implementation of a parser for the given grammer. You might be reading +** implementation of a parser for the given grammar. You might be reading ** this comment as part of the translated C-code. Edits should be made ** to the original parse.y sources. */ @@ -165825,18 +169733,18 @@ typedef union { #define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse; #define sqlite3ParserCTX_STORE yypParser->pParse=pParse; #define YYFALLBACK 1 -#define YYNSTATE 576 -#define YYNRULE 405 -#define YYNRULE_WITH_ACTION 342 +#define YYNSTATE 575 +#define YYNRULE 403 +#define YYNRULE_WITH_ACTION 338 #define YYNTOKEN 185 -#define YY_MAX_SHIFT 575 -#define YY_MIN_SHIFTREDUCE 835 -#define YY_MAX_SHIFTREDUCE 1239 -#define YY_ERROR_ACTION 1240 -#define YY_ACCEPT_ACTION 1241 -#define YY_NO_ACTION 1242 -#define YY_MIN_REDUCE 1243 -#define YY_MAX_REDUCE 1647 +#define YY_MAX_SHIFT 574 +#define YY_MIN_SHIFTREDUCE 833 +#define YY_MAX_SHIFTREDUCE 1235 +#define YY_ERROR_ACTION 1236 +#define YY_ACCEPT_ACTION 1237 +#define YY_NO_ACTION 1238 +#define YY_MIN_REDUCE 1239 +#define YY_MAX_REDUCE 1641 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -165903,218 +169811,218 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (2098) +#define YY_ACTTAB_COUNT (2096) static const YYACTIONTYPE yy_action[] = { /* 0 */ 568, 208, 568, 118, 115, 229, 568, 118, 115, 229, - /* 10 */ 568, 1314, 377, 1293, 408, 562, 562, 562, 568, 409, - /* 20 */ 378, 1314, 1276, 41, 41, 41, 41, 208, 1526, 71, - /* 30 */ 71, 971, 419, 41, 41, 491, 303, 279, 303, 972, - /* 40 */ 397, 71, 71, 125, 126, 80, 1217, 1217, 1050, 1053, - /* 50 */ 1040, 1040, 123, 123, 124, 124, 124, 124, 476, 409, - /* 60 */ 1241, 1, 1, 575, 2, 1245, 550, 118, 115, 229, - /* 70 */ 317, 480, 146, 480, 524, 118, 115, 229, 529, 1327, - /* 80 */ 417, 523, 142, 125, 126, 80, 1217, 1217, 1050, 1053, - /* 90 */ 1040, 1040, 123, 123, 124, 124, 124, 124, 118, 115, + /* 10 */ 568, 1310, 377, 1289, 408, 562, 562, 562, 568, 409, + /* 20 */ 378, 1310, 1272, 41, 41, 41, 41, 208, 1520, 71, + /* 30 */ 71, 969, 419, 41, 41, 491, 303, 279, 303, 970, + /* 40 */ 397, 71, 71, 125, 126, 80, 1210, 1210, 1047, 1050, + /* 50 */ 1037, 1037, 123, 123, 124, 124, 124, 124, 476, 409, + /* 60 */ 1237, 1, 1, 574, 2, 1241, 550, 118, 115, 229, + /* 70 */ 317, 480, 146, 480, 524, 118, 115, 229, 529, 1323, + /* 80 */ 417, 523, 142, 125, 126, 80, 1210, 1210, 1047, 1050, + /* 90 */ 1037, 1037, 123, 123, 124, 124, 124, 124, 118, 115, /* 100 */ 229, 327, 122, 122, 122, 122, 121, 121, 120, 120, /* 110 */ 120, 119, 116, 444, 284, 284, 284, 284, 442, 442, - /* 120 */ 442, 1567, 376, 1569, 1192, 375, 1163, 565, 1163, 565, - /* 130 */ 409, 1567, 537, 259, 226, 444, 101, 145, 449, 316, + /* 120 */ 442, 1559, 376, 1561, 1186, 375, 1157, 565, 1157, 565, + /* 130 */ 409, 1559, 537, 259, 226, 444, 101, 145, 449, 316, /* 140 */ 559, 240, 122, 122, 122, 122, 121, 121, 120, 120, - /* 150 */ 120, 119, 116, 444, 125, 126, 80, 1217, 1217, 1050, - /* 160 */ 1053, 1040, 1040, 123, 123, 124, 124, 124, 124, 142, - /* 170 */ 294, 1192, 339, 448, 120, 120, 120, 119, 116, 444, - /* 180 */ 127, 1192, 1193, 1194, 148, 441, 440, 568, 119, 116, + /* 150 */ 120, 119, 116, 444, 125, 126, 80, 1210, 1210, 1047, + /* 160 */ 1050, 1037, 1037, 123, 123, 124, 124, 124, 124, 142, + /* 170 */ 294, 1186, 339, 448, 120, 120, 120, 119, 116, 444, + /* 180 */ 127, 1186, 1187, 1186, 148, 441, 440, 568, 119, 116, /* 190 */ 444, 124, 124, 124, 124, 117, 122, 122, 122, 122, /* 200 */ 121, 121, 120, 120, 120, 119, 116, 444, 454, 113, /* 210 */ 13, 13, 546, 122, 122, 122, 122, 121, 121, 120, - /* 220 */ 120, 120, 119, 116, 444, 422, 316, 559, 1192, 1193, - /* 230 */ 1194, 149, 1224, 409, 1224, 124, 124, 124, 124, 122, + /* 220 */ 120, 120, 119, 116, 444, 422, 316, 559, 1186, 1187, + /* 230 */ 1186, 149, 1218, 409, 1218, 124, 124, 124, 124, 122, /* 240 */ 122, 122, 122, 121, 121, 120, 120, 120, 119, 116, - /* 250 */ 444, 465, 342, 1037, 1037, 1051, 1054, 125, 126, 80, - /* 260 */ 1217, 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, - /* 270 */ 124, 124, 1279, 522, 222, 1192, 568, 409, 224, 514, + /* 250 */ 444, 465, 342, 1034, 1034, 1048, 1051, 125, 126, 80, + /* 260 */ 1210, 1210, 1047, 1050, 1037, 1037, 123, 123, 124, 124, + /* 270 */ 124, 124, 1275, 522, 222, 1186, 568, 409, 224, 514, /* 280 */ 175, 82, 83, 122, 122, 122, 122, 121, 121, 120, - /* 290 */ 120, 120, 119, 116, 444, 1007, 16, 16, 1192, 133, - /* 300 */ 133, 125, 126, 80, 1217, 1217, 1050, 1053, 1040, 1040, + /* 290 */ 120, 120, 119, 116, 444, 1005, 16, 16, 1186, 133, + /* 300 */ 133, 125, 126, 80, 1210, 1210, 1047, 1050, 1037, 1037, /* 310 */ 123, 123, 124, 124, 124, 124, 122, 122, 122, 122, - /* 320 */ 121, 121, 120, 120, 120, 119, 116, 444, 1041, 546, - /* 330 */ 1192, 373, 1192, 1193, 1194, 252, 1434, 399, 504, 501, - /* 340 */ 500, 111, 560, 566, 4, 926, 926, 433, 499, 340, - /* 350 */ 460, 328, 360, 394, 1237, 1192, 1193, 1194, 563, 568, + /* 320 */ 121, 121, 120, 120, 120, 119, 116, 444, 1038, 546, + /* 330 */ 1186, 373, 1186, 1187, 1186, 252, 1429, 399, 504, 501, + /* 340 */ 500, 111, 560, 566, 4, 924, 924, 433, 499, 340, + /* 350 */ 460, 328, 360, 394, 1231, 1186, 1187, 1186, 563, 568, /* 360 */ 122, 122, 122, 122, 121, 121, 120, 120, 120, 119, - /* 370 */ 116, 444, 284, 284, 369, 1580, 1607, 441, 440, 154, - /* 380 */ 409, 445, 71, 71, 1286, 565, 1221, 1192, 1193, 1194, - /* 390 */ 85, 1223, 271, 557, 543, 515, 1561, 568, 98, 1222, - /* 400 */ 6, 1278, 472, 142, 125, 126, 80, 1217, 1217, 1050, - /* 410 */ 1053, 1040, 1040, 123, 123, 124, 124, 124, 124, 550, - /* 420 */ 13, 13, 1027, 507, 1224, 1192, 1224, 549, 109, 109, - /* 430 */ 222, 568, 1238, 175, 568, 427, 110, 197, 445, 570, - /* 440 */ 569, 430, 1552, 1017, 325, 551, 1192, 270, 287, 368, + /* 370 */ 116, 444, 284, 284, 369, 1572, 1598, 441, 440, 154, + /* 380 */ 409, 445, 71, 71, 1282, 565, 1215, 1186, 1187, 1186, + /* 390 */ 85, 1217, 271, 557, 543, 515, 515, 568, 98, 1216, + /* 400 */ 6, 1274, 472, 142, 125, 126, 80, 1210, 1210, 1047, + /* 410 */ 1050, 1037, 1037, 123, 123, 124, 124, 124, 124, 550, + /* 420 */ 13, 13, 1024, 507, 1218, 1186, 1218, 549, 109, 109, + /* 430 */ 222, 568, 1232, 175, 568, 427, 110, 197, 445, 569, + /* 440 */ 445, 430, 1546, 1014, 325, 551, 1186, 270, 287, 368, /* 450 */ 510, 363, 509, 257, 71, 71, 543, 71, 71, 359, - /* 460 */ 316, 559, 1613, 122, 122, 122, 122, 121, 121, 120, - /* 470 */ 120, 120, 119, 116, 444, 1017, 1017, 1019, 1020, 27, - /* 480 */ 284, 284, 1192, 1193, 1194, 1158, 568, 1612, 409, 901, - /* 490 */ 190, 550, 356, 565, 550, 937, 533, 517, 1158, 516, - /* 500 */ 413, 1158, 552, 1192, 1193, 1194, 568, 544, 1554, 51, - /* 510 */ 51, 214, 125, 126, 80, 1217, 1217, 1050, 1053, 1040, - /* 520 */ 1040, 123, 123, 124, 124, 124, 124, 1192, 474, 135, - /* 530 */ 135, 409, 284, 284, 1490, 505, 121, 121, 120, 120, - /* 540 */ 120, 119, 116, 444, 1007, 565, 518, 217, 541, 1561, - /* 550 */ 316, 559, 142, 6, 532, 125, 126, 80, 1217, 1217, - /* 560 */ 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, 124, - /* 570 */ 1555, 122, 122, 122, 122, 121, 121, 120, 120, 120, - /* 580 */ 119, 116, 444, 485, 1192, 1193, 1194, 482, 281, 1267, - /* 590 */ 957, 252, 1192, 373, 504, 501, 500, 1192, 340, 571, - /* 600 */ 1192, 571, 409, 292, 499, 957, 876, 191, 480, 316, + /* 460 */ 316, 559, 1604, 122, 122, 122, 122, 121, 121, 120, + /* 470 */ 120, 120, 119, 116, 444, 1014, 1014, 1016, 1017, 27, + /* 480 */ 284, 284, 1186, 1187, 1186, 1152, 568, 1603, 409, 899, + /* 490 */ 190, 550, 356, 565, 550, 935, 533, 517, 1152, 516, + /* 500 */ 413, 1152, 552, 1186, 1187, 1186, 568, 544, 544, 51, + /* 510 */ 51, 214, 125, 126, 80, 1210, 1210, 1047, 1050, 1037, + /* 520 */ 1037, 123, 123, 124, 124, 124, 124, 1186, 474, 135, + /* 530 */ 135, 409, 284, 284, 1484, 505, 121, 121, 120, 120, + /* 540 */ 120, 119, 116, 444, 1005, 565, 518, 217, 541, 541, + /* 550 */ 316, 559, 142, 6, 532, 125, 126, 80, 1210, 1210, + /* 560 */ 1047, 1050, 1037, 1037, 123, 123, 124, 124, 124, 124, + /* 570 */ 1548, 122, 122, 122, 122, 121, 121, 120, 120, 120, + /* 580 */ 119, 116, 444, 485, 1186, 1187, 1186, 482, 281, 1263, + /* 590 */ 955, 252, 1186, 373, 504, 501, 500, 1186, 340, 570, + /* 600 */ 1186, 570, 409, 292, 499, 955, 874, 191, 480, 316, /* 610 */ 559, 384, 290, 380, 122, 122, 122, 122, 121, 121, - /* 620 */ 120, 120, 120, 119, 116, 444, 125, 126, 80, 1217, - /* 630 */ 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, - /* 640 */ 124, 409, 394, 1136, 1192, 869, 100, 284, 284, 1192, - /* 650 */ 1193, 1194, 373, 1093, 1192, 1193, 1194, 1192, 1193, 1194, - /* 660 */ 565, 455, 32, 373, 233, 125, 126, 80, 1217, 1217, - /* 670 */ 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, 124, - /* 680 */ 1433, 959, 568, 228, 958, 122, 122, 122, 122, 121, - /* 690 */ 121, 120, 120, 120, 119, 116, 444, 1158, 228, 1192, - /* 700 */ 157, 1192, 1193, 1194, 1553, 13, 13, 301, 957, 1232, - /* 710 */ 1158, 153, 409, 1158, 373, 1583, 1176, 5, 369, 1580, - /* 720 */ 429, 1238, 3, 957, 122, 122, 122, 122, 121, 121, - /* 730 */ 120, 120, 120, 119, 116, 444, 125, 126, 80, 1217, - /* 740 */ 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, - /* 750 */ 124, 409, 208, 567, 1192, 1028, 1192, 1193, 1194, 1192, - /* 760 */ 388, 852, 155, 1552, 286, 402, 1098, 1098, 488, 568, - /* 770 */ 465, 342, 1319, 1319, 1552, 125, 126, 80, 1217, 1217, - /* 780 */ 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, 124, + /* 620 */ 120, 120, 120, 119, 116, 444, 125, 126, 80, 1210, + /* 630 */ 1210, 1047, 1050, 1037, 1037, 123, 123, 124, 124, 124, + /* 640 */ 124, 409, 394, 1132, 1186, 867, 100, 284, 284, 1186, + /* 650 */ 1187, 1186, 373, 1089, 1186, 1187, 1186, 1186, 1187, 1186, + /* 660 */ 565, 455, 32, 373, 233, 125, 126, 80, 1210, 1210, + /* 670 */ 1047, 1050, 1037, 1037, 123, 123, 124, 124, 124, 124, + /* 680 */ 1428, 957, 568, 228, 956, 122, 122, 122, 122, 121, + /* 690 */ 121, 120, 120, 120, 119, 116, 444, 1152, 228, 1186, + /* 700 */ 157, 1186, 1187, 1186, 1547, 13, 13, 301, 955, 1226, + /* 710 */ 1152, 153, 409, 1152, 373, 1575, 1170, 5, 369, 1572, + /* 720 */ 429, 1232, 3, 955, 122, 122, 122, 122, 121, 121, + /* 730 */ 120, 120, 120, 119, 116, 444, 125, 126, 80, 1210, + /* 740 */ 1210, 1047, 1050, 1037, 1037, 123, 123, 124, 124, 124, + /* 750 */ 124, 409, 208, 567, 1186, 1025, 1186, 1187, 1186, 1186, + /* 760 */ 388, 850, 155, 1546, 286, 402, 1094, 1094, 488, 568, + /* 770 */ 465, 342, 1315, 1315, 1546, 125, 126, 80, 1210, 1210, + /* 780 */ 1047, 1050, 1037, 1037, 123, 123, 124, 124, 124, 124, /* 790 */ 129, 568, 13, 13, 374, 122, 122, 122, 122, 121, /* 800 */ 121, 120, 120, 120, 119, 116, 444, 302, 568, 453, - /* 810 */ 528, 1192, 1193, 1194, 13, 13, 1192, 1193, 1194, 1297, - /* 820 */ 463, 1267, 409, 1317, 1317, 1552, 1012, 453, 452, 200, - /* 830 */ 299, 71, 71, 1265, 122, 122, 122, 122, 121, 121, - /* 840 */ 120, 120, 120, 119, 116, 444, 125, 126, 80, 1217, - /* 850 */ 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, - /* 860 */ 124, 409, 227, 1073, 1158, 284, 284, 419, 312, 278, - /* 870 */ 278, 285, 285, 1419, 406, 405, 382, 1158, 565, 568, - /* 880 */ 1158, 1196, 565, 1600, 565, 125, 126, 80, 1217, 1217, - /* 890 */ 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, 124, - /* 900 */ 453, 1482, 13, 13, 1536, 122, 122, 122, 122, 121, + /* 810 */ 528, 1186, 1187, 1186, 13, 13, 1186, 1187, 1186, 1293, + /* 820 */ 463, 1263, 409, 1313, 1313, 1546, 1010, 453, 452, 200, + /* 830 */ 299, 71, 71, 1261, 122, 122, 122, 122, 121, 121, + /* 840 */ 120, 120, 120, 119, 116, 444, 125, 126, 80, 1210, + /* 850 */ 1210, 1047, 1050, 1037, 1037, 123, 123, 124, 124, 124, + /* 860 */ 124, 409, 227, 1069, 1152, 284, 284, 419, 312, 278, + /* 870 */ 278, 285, 285, 1415, 406, 405, 382, 1152, 565, 568, + /* 880 */ 1152, 1189, 565, 1592, 565, 125, 126, 80, 1210, 1210, + /* 890 */ 1047, 1050, 1037, 1037, 123, 123, 124, 124, 124, 124, + /* 900 */ 453, 1476, 13, 13, 1530, 122, 122, 122, 122, 121, /* 910 */ 121, 120, 120, 120, 119, 116, 444, 201, 568, 354, - /* 920 */ 1586, 575, 2, 1245, 840, 841, 842, 1562, 317, 1212, - /* 930 */ 146, 6, 409, 255, 254, 253, 206, 1327, 9, 1196, + /* 920 */ 1578, 574, 2, 1241, 838, 839, 840, 1554, 317, 1205, + /* 930 */ 146, 6, 409, 255, 254, 253, 206, 1323, 9, 1189, /* 940 */ 262, 71, 71, 424, 122, 122, 122, 122, 121, 121, - /* 950 */ 120, 120, 120, 119, 116, 444, 125, 126, 80, 1217, - /* 960 */ 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, - /* 970 */ 124, 568, 284, 284, 568, 1213, 409, 574, 313, 1245, - /* 980 */ 349, 1296, 352, 419, 317, 565, 146, 491, 525, 1643, - /* 990 */ 395, 371, 491, 1327, 70, 70, 1295, 71, 71, 240, - /* 1000 */ 1325, 104, 80, 1217, 1217, 1050, 1053, 1040, 1040, 123, + /* 950 */ 120, 120, 120, 119, 116, 444, 125, 126, 80, 1210, + /* 960 */ 1210, 1047, 1050, 1037, 1037, 123, 123, 124, 124, 124, + /* 970 */ 124, 568, 284, 284, 568, 1206, 409, 573, 313, 1241, + /* 980 */ 349, 1292, 352, 419, 317, 565, 146, 491, 525, 1635, + /* 990 */ 395, 371, 491, 1323, 70, 70, 1291, 71, 71, 240, + /* 1000 */ 1321, 104, 80, 1210, 1210, 1047, 1050, 1037, 1037, 123, /* 1010 */ 123, 124, 124, 124, 124, 122, 122, 122, 122, 121, - /* 1020 */ 121, 120, 120, 120, 119, 116, 444, 1114, 284, 284, - /* 1030 */ 428, 448, 1525, 1213, 439, 284, 284, 1489, 1352, 311, - /* 1040 */ 474, 565, 1115, 971, 491, 491, 217, 1263, 565, 1538, - /* 1050 */ 568, 972, 207, 568, 1027, 240, 383, 1116, 519, 122, + /* 1020 */ 121, 120, 120, 120, 119, 116, 444, 1110, 284, 284, + /* 1030 */ 428, 448, 1519, 1206, 439, 284, 284, 1483, 1348, 311, + /* 1040 */ 474, 565, 1111, 969, 491, 491, 217, 1259, 565, 1532, + /* 1050 */ 568, 970, 207, 568, 1024, 240, 383, 1112, 519, 122, /* 1060 */ 122, 122, 122, 121, 121, 120, 120, 120, 119, 116, - /* 1070 */ 444, 1018, 107, 71, 71, 1017, 13, 13, 912, 568, - /* 1080 */ 1495, 568, 284, 284, 97, 526, 491, 448, 913, 1326, - /* 1090 */ 1322, 545, 409, 284, 284, 565, 151, 209, 1495, 1497, - /* 1100 */ 262, 450, 55, 55, 56, 56, 565, 1017, 1017, 1019, - /* 1110 */ 443, 332, 409, 527, 12, 295, 125, 126, 80, 1217, - /* 1120 */ 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, - /* 1130 */ 124, 347, 409, 864, 1534, 1213, 125, 126, 80, 1217, - /* 1140 */ 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, - /* 1150 */ 124, 1137, 1641, 474, 1641, 371, 125, 114, 80, 1217, - /* 1160 */ 1217, 1050, 1053, 1040, 1040, 123, 123, 124, 124, 124, - /* 1170 */ 124, 1495, 329, 474, 331, 122, 122, 122, 122, 121, - /* 1180 */ 121, 120, 120, 120, 119, 116, 444, 203, 1419, 568, - /* 1190 */ 1294, 864, 464, 1213, 436, 122, 122, 122, 122, 121, - /* 1200 */ 121, 120, 120, 120, 119, 116, 444, 553, 1137, 1642, - /* 1210 */ 539, 1642, 15, 15, 892, 122, 122, 122, 122, 121, + /* 1070 */ 444, 1015, 107, 71, 71, 1014, 13, 13, 910, 568, + /* 1080 */ 1489, 568, 284, 284, 97, 526, 491, 448, 911, 1322, + /* 1090 */ 1318, 545, 409, 284, 284, 565, 151, 209, 1489, 1491, + /* 1100 */ 262, 450, 55, 55, 56, 56, 565, 1014, 1014, 1016, + /* 1110 */ 443, 332, 409, 527, 12, 295, 125, 126, 80, 1210, + /* 1120 */ 1210, 1047, 1050, 1037, 1037, 123, 123, 124, 124, 124, + /* 1130 */ 124, 347, 409, 862, 1528, 1206, 125, 126, 80, 1210, + /* 1140 */ 1210, 1047, 1050, 1037, 1037, 123, 123, 124, 124, 124, + /* 1150 */ 124, 1133, 1633, 474, 1633, 371, 125, 114, 80, 1210, + /* 1160 */ 1210, 1047, 1050, 1037, 1037, 123, 123, 124, 124, 124, + /* 1170 */ 124, 1489, 329, 474, 331, 122, 122, 122, 122, 121, + /* 1180 */ 121, 120, 120, 120, 119, 116, 444, 203, 1415, 568, + /* 1190 */ 1290, 862, 464, 1206, 436, 122, 122, 122, 122, 121, + /* 1200 */ 121, 120, 120, 120, 119, 116, 444, 553, 1133, 1634, + /* 1210 */ 539, 1634, 15, 15, 890, 122, 122, 122, 122, 121, /* 1220 */ 121, 120, 120, 120, 119, 116, 444, 568, 298, 538, - /* 1230 */ 1135, 1419, 1559, 1560, 1331, 409, 6, 6, 1169, 1268, - /* 1240 */ 415, 320, 284, 284, 1419, 508, 565, 525, 300, 457, - /* 1250 */ 43, 43, 568, 893, 12, 565, 330, 478, 425, 407, - /* 1260 */ 126, 80, 1217, 1217, 1050, 1053, 1040, 1040, 123, 123, - /* 1270 */ 124, 124, 124, 124, 568, 57, 57, 288, 1192, 1419, - /* 1280 */ 496, 458, 392, 392, 391, 273, 389, 1135, 1558, 849, - /* 1290 */ 1169, 407, 6, 568, 321, 1158, 470, 44, 44, 1557, - /* 1300 */ 1114, 426, 234, 6, 323, 256, 540, 256, 1158, 431, - /* 1310 */ 568, 1158, 322, 17, 487, 1115, 58, 58, 122, 122, + /* 1230 */ 1131, 1415, 1552, 1553, 1327, 409, 6, 6, 1163, 1264, + /* 1240 */ 415, 320, 284, 284, 1415, 508, 565, 525, 300, 457, + /* 1250 */ 43, 43, 568, 891, 12, 565, 330, 478, 425, 407, + /* 1260 */ 126, 80, 1210, 1210, 1047, 1050, 1037, 1037, 123, 123, + /* 1270 */ 124, 124, 124, 124, 568, 57, 57, 288, 1186, 1415, + /* 1280 */ 496, 458, 392, 392, 391, 273, 389, 1131, 1551, 847, + /* 1290 */ 1163, 407, 6, 568, 321, 1152, 470, 44, 44, 1550, + /* 1300 */ 1110, 426, 234, 6, 323, 256, 540, 256, 1152, 431, + /* 1310 */ 568, 1152, 322, 17, 487, 1111, 58, 58, 122, 122, /* 1320 */ 122, 122, 121, 121, 120, 120, 120, 119, 116, 444, - /* 1330 */ 1116, 216, 481, 59, 59, 1192, 1193, 1194, 111, 560, + /* 1330 */ 1112, 216, 481, 59, 59, 1186, 1187, 1186, 111, 560, /* 1340 */ 324, 4, 236, 456, 526, 568, 237, 456, 568, 437, - /* 1350 */ 168, 556, 420, 141, 479, 563, 568, 293, 568, 1095, - /* 1360 */ 568, 293, 568, 1095, 531, 568, 872, 8, 60, 60, + /* 1350 */ 168, 556, 420, 141, 479, 563, 568, 293, 568, 1091, + /* 1360 */ 568, 293, 568, 1091, 531, 568, 870, 8, 60, 60, /* 1370 */ 235, 61, 61, 568, 414, 568, 414, 568, 445, 62, /* 1380 */ 62, 45, 45, 46, 46, 47, 47, 199, 49, 49, /* 1390 */ 557, 568, 359, 568, 100, 486, 50, 50, 63, 63, - /* 1400 */ 64, 64, 561, 415, 535, 410, 568, 1027, 568, 534, - /* 1410 */ 316, 559, 316, 559, 65, 65, 14, 14, 568, 1027, - /* 1420 */ 568, 512, 932, 872, 1018, 109, 109, 931, 1017, 66, - /* 1430 */ 66, 131, 131, 110, 451, 445, 570, 569, 416, 177, - /* 1440 */ 1017, 132, 132, 67, 67, 568, 467, 568, 932, 471, - /* 1450 */ 1364, 283, 226, 931, 315, 1363, 407, 568, 459, 407, - /* 1460 */ 1017, 1017, 1019, 239, 407, 86, 213, 1350, 52, 52, - /* 1470 */ 68, 68, 1017, 1017, 1019, 1020, 27, 1585, 1180, 447, - /* 1480 */ 69, 69, 288, 97, 108, 1541, 106, 392, 392, 391, - /* 1490 */ 273, 389, 568, 879, 849, 883, 568, 111, 560, 466, - /* 1500 */ 4, 568, 152, 30, 38, 568, 1132, 234, 396, 323, + /* 1400 */ 64, 64, 561, 415, 535, 410, 568, 1024, 568, 534, + /* 1410 */ 316, 559, 316, 559, 65, 65, 14, 14, 568, 1024, + /* 1420 */ 568, 512, 930, 870, 1015, 109, 109, 929, 1014, 66, + /* 1430 */ 66, 131, 131, 110, 451, 445, 569, 445, 416, 177, + /* 1440 */ 1014, 132, 132, 67, 67, 568, 467, 568, 930, 471, + /* 1450 */ 1360, 283, 226, 929, 315, 1359, 407, 568, 459, 407, + /* 1460 */ 1014, 1014, 1016, 239, 407, 86, 213, 1346, 52, 52, + /* 1470 */ 68, 68, 1014, 1014, 1016, 1017, 27, 1577, 1174, 447, + /* 1480 */ 69, 69, 288, 97, 108, 1535, 106, 392, 392, 391, + /* 1490 */ 273, 389, 568, 877, 847, 881, 568, 111, 560, 466, + /* 1500 */ 4, 568, 152, 30, 38, 568, 1128, 234, 396, 323, /* 1510 */ 111, 560, 527, 4, 563, 53, 53, 322, 568, 163, /* 1520 */ 163, 568, 337, 468, 164, 164, 333, 563, 76, 76, - /* 1530 */ 568, 289, 1514, 568, 31, 1513, 568, 445, 338, 483, - /* 1540 */ 100, 54, 54, 344, 72, 72, 296, 236, 1080, 557, - /* 1550 */ 445, 879, 1360, 134, 134, 168, 73, 73, 141, 161, - /* 1560 */ 161, 1574, 557, 535, 568, 319, 568, 348, 536, 1009, - /* 1570 */ 473, 261, 261, 891, 890, 235, 535, 568, 1027, 568, + /* 1530 */ 568, 289, 1508, 568, 31, 1507, 568, 445, 338, 483, + /* 1540 */ 100, 54, 54, 344, 72, 72, 296, 236, 1076, 557, + /* 1550 */ 445, 877, 1356, 134, 134, 168, 73, 73, 141, 161, + /* 1560 */ 161, 1566, 557, 535, 568, 319, 568, 348, 536, 1007, + /* 1570 */ 473, 261, 261, 889, 888, 235, 535, 568, 1024, 568, /* 1580 */ 475, 534, 261, 367, 109, 109, 521, 136, 136, 130, - /* 1590 */ 130, 1027, 110, 366, 445, 570, 569, 109, 109, 1017, - /* 1600 */ 162, 162, 156, 156, 568, 110, 1080, 445, 570, 569, - /* 1610 */ 410, 351, 1017, 568, 353, 316, 559, 568, 343, 568, - /* 1620 */ 100, 497, 357, 258, 100, 898, 899, 140, 140, 355, - /* 1630 */ 1310, 1017, 1017, 1019, 1020, 27, 139, 139, 362, 451, - /* 1640 */ 137, 137, 138, 138, 1017, 1017, 1019, 1020, 27, 1180, - /* 1650 */ 447, 568, 372, 288, 111, 560, 1021, 4, 392, 392, - /* 1660 */ 391, 273, 389, 568, 1141, 849, 568, 1076, 568, 258, - /* 1670 */ 492, 563, 568, 211, 75, 75, 555, 962, 234, 261, - /* 1680 */ 323, 111, 560, 929, 4, 113, 77, 77, 322, 74, - /* 1690 */ 74, 42, 42, 1373, 445, 48, 48, 1418, 563, 974, - /* 1700 */ 975, 1092, 1091, 1092, 1091, 862, 557, 150, 930, 1346, - /* 1710 */ 113, 1358, 554, 1424, 1021, 1275, 1266, 1254, 236, 1253, - /* 1720 */ 1255, 445, 1593, 1343, 308, 276, 168, 309, 11, 141, - /* 1730 */ 393, 310, 232, 557, 1405, 1027, 335, 291, 1400, 219, - /* 1740 */ 336, 109, 109, 936, 297, 1410, 235, 341, 477, 110, - /* 1750 */ 502, 445, 570, 569, 1393, 1409, 1017, 400, 1293, 365, - /* 1760 */ 223, 1486, 1027, 1485, 1355, 1356, 1354, 1353, 109, 109, - /* 1770 */ 204, 1596, 1232, 558, 265, 218, 110, 205, 445, 570, - /* 1780 */ 569, 410, 387, 1017, 1533, 179, 316, 559, 1017, 1017, - /* 1790 */ 1019, 1020, 27, 230, 1531, 1229, 79, 560, 85, 4, - /* 1800 */ 418, 215, 548, 81, 84, 188, 1406, 173, 181, 461, - /* 1810 */ 451, 35, 462, 563, 183, 1017, 1017, 1019, 1020, 27, - /* 1820 */ 184, 1491, 185, 186, 495, 242, 98, 398, 1412, 36, - /* 1830 */ 1411, 484, 91, 469, 401, 1414, 445, 192, 1480, 246, - /* 1840 */ 1502, 490, 346, 277, 248, 196, 493, 511, 557, 350, - /* 1850 */ 1256, 249, 250, 403, 1313, 1312, 111, 560, 432, 4, - /* 1860 */ 1311, 1304, 93, 1611, 883, 1610, 224, 404, 434, 520, - /* 1870 */ 263, 435, 1579, 563, 1283, 1282, 364, 1027, 306, 1281, - /* 1880 */ 264, 1609, 1565, 109, 109, 370, 1303, 307, 1564, 438, - /* 1890 */ 128, 110, 1378, 445, 570, 569, 445, 546, 1017, 10, - /* 1900 */ 1466, 105, 381, 1377, 34, 572, 99, 1336, 557, 314, - /* 1910 */ 1186, 530, 272, 274, 379, 210, 1335, 547, 385, 386, - /* 1920 */ 275, 573, 1251, 1246, 411, 412, 1518, 165, 178, 1519, - /* 1930 */ 1017, 1017, 1019, 1020, 27, 1517, 1516, 1027, 78, 147, - /* 1940 */ 166, 220, 221, 109, 109, 836, 304, 167, 446, 212, - /* 1950 */ 318, 110, 231, 445, 570, 569, 144, 1090, 1017, 1088, - /* 1960 */ 326, 180, 169, 1212, 182, 334, 238, 915, 241, 1104, + /* 1590 */ 130, 1024, 110, 366, 445, 569, 445, 109, 109, 1014, + /* 1600 */ 162, 162, 156, 156, 568, 110, 1076, 445, 569, 445, + /* 1610 */ 410, 351, 1014, 568, 353, 316, 559, 568, 343, 568, + /* 1620 */ 100, 497, 357, 258, 100, 896, 897, 140, 140, 355, + /* 1630 */ 1306, 1014, 1014, 1016, 1017, 27, 139, 139, 362, 451, + /* 1640 */ 137, 137, 138, 138, 1014, 1014, 1016, 1017, 27, 1174, + /* 1650 */ 447, 568, 372, 288, 111, 560, 1018, 4, 392, 392, + /* 1660 */ 391, 273, 389, 568, 1137, 847, 568, 1072, 568, 258, + /* 1670 */ 492, 563, 568, 211, 75, 75, 555, 960, 234, 261, + /* 1680 */ 323, 111, 560, 927, 4, 113, 77, 77, 322, 74, + /* 1690 */ 74, 42, 42, 1369, 445, 48, 48, 1414, 563, 972, + /* 1700 */ 973, 1088, 1087, 1088, 1087, 860, 557, 150, 928, 1342, + /* 1710 */ 113, 1354, 554, 1419, 1018, 1271, 1262, 1250, 236, 1249, + /* 1720 */ 1251, 445, 1585, 1339, 308, 276, 168, 309, 11, 141, + /* 1730 */ 393, 310, 232, 557, 1401, 1024, 335, 291, 1396, 219, + /* 1740 */ 336, 109, 109, 934, 297, 1406, 235, 341, 477, 110, + /* 1750 */ 502, 445, 569, 445, 1389, 1405, 1014, 400, 1289, 365, + /* 1760 */ 223, 1480, 1024, 1479, 1351, 1352, 1350, 1349, 109, 109, + /* 1770 */ 204, 1588, 1226, 558, 265, 218, 110, 205, 445, 569, + /* 1780 */ 445, 410, 387, 1014, 1527, 179, 316, 559, 1014, 1014, + /* 1790 */ 1016, 1017, 27, 230, 1525, 1223, 79, 560, 85, 4, + /* 1800 */ 418, 215, 548, 81, 84, 188, 1402, 173, 181, 461, + /* 1810 */ 451, 35, 462, 563, 183, 1014, 1014, 1016, 1017, 27, + /* 1820 */ 184, 1485, 185, 186, 495, 242, 98, 398, 1408, 36, + /* 1830 */ 1407, 484, 91, 469, 401, 1410, 445, 192, 1474, 246, + /* 1840 */ 1496, 490, 346, 277, 248, 196, 493, 511, 557, 350, + /* 1850 */ 1252, 249, 250, 403, 1309, 1308, 111, 560, 432, 4, + /* 1860 */ 1307, 1300, 93, 1602, 881, 1601, 224, 404, 434, 520, + /* 1870 */ 263, 435, 1571, 563, 1279, 1278, 364, 1024, 306, 1277, + /* 1880 */ 264, 1600, 1557, 109, 109, 370, 1299, 307, 1556, 438, + /* 1890 */ 128, 110, 1374, 445, 569, 445, 445, 546, 1014, 10, + /* 1900 */ 1461, 105, 381, 1373, 34, 571, 99, 1332, 557, 314, + /* 1910 */ 1180, 530, 272, 274, 379, 210, 1331, 547, 385, 386, + /* 1920 */ 275, 572, 1247, 1242, 411, 412, 1512, 165, 178, 1513, + /* 1930 */ 1014, 1014, 1016, 1017, 27, 1511, 1510, 1024, 78, 147, + /* 1940 */ 166, 220, 221, 109, 109, 834, 304, 167, 446, 212, + /* 1950 */ 318, 110, 231, 445, 569, 445, 144, 1086, 1014, 1084, + /* 1960 */ 326, 180, 169, 1205, 182, 334, 238, 913, 241, 1100, /* 1970 */ 187, 170, 171, 421, 87, 88, 423, 189, 89, 90, - /* 1980 */ 172, 1107, 243, 1103, 244, 158, 18, 245, 345, 247, - /* 1990 */ 1017, 1017, 1019, 1020, 27, 261, 1096, 193, 1226, 489, - /* 2000 */ 194, 37, 366, 851, 494, 251, 195, 506, 92, 19, - /* 2010 */ 498, 358, 20, 503, 881, 361, 94, 894, 305, 159, - /* 2020 */ 513, 39, 95, 1174, 160, 1056, 966, 1143, 96, 174, - /* 2030 */ 1142, 225, 280, 282, 198, 960, 113, 1164, 1160, 260, - /* 2040 */ 21, 22, 23, 1162, 1168, 1167, 1148, 24, 33, 25, - /* 2050 */ 202, 542, 26, 100, 1071, 102, 1057, 103, 7, 1055, - /* 2060 */ 1059, 1113, 1060, 1112, 266, 267, 28, 40, 390, 1022, - /* 2070 */ 863, 112, 29, 564, 1182, 1181, 268, 176, 143, 925, - /* 2080 */ 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, - /* 2090 */ 1242, 1242, 1242, 1242, 269, 1602, 1242, 1601, + /* 1980 */ 172, 1103, 243, 1099, 244, 158, 18, 245, 345, 247, + /* 1990 */ 1014, 1014, 1016, 1017, 27, 261, 1092, 193, 1220, 489, + /* 2000 */ 194, 37, 366, 849, 494, 251, 195, 506, 92, 19, + /* 2010 */ 498, 358, 20, 503, 879, 361, 94, 892, 305, 159, + /* 2020 */ 513, 39, 95, 1168, 160, 1053, 964, 1139, 96, 174, + /* 2030 */ 1138, 225, 280, 282, 198, 958, 113, 1158, 1154, 260, + /* 2040 */ 21, 22, 23, 1156, 1162, 1161, 1143, 24, 33, 25, + /* 2050 */ 202, 542, 26, 100, 1067, 102, 1054, 103, 7, 1052, + /* 2060 */ 1056, 1109, 1057, 1108, 266, 267, 28, 40, 390, 1019, + /* 2070 */ 861, 112, 29, 564, 1176, 1175, 268, 176, 143, 923, + /* 2080 */ 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, + /* 2090 */ 1238, 1238, 1238, 1238, 269, 1593, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 193, 193, 193, 274, 275, 276, 193, 274, 275, 276, @@ -166326,7 +170234,7 @@ static const YYCODETYPE yy_lookahead[] = { /* 2060 */ 23, 23, 11, 23, 25, 22, 22, 22, 15, 23, /* 2070 */ 23, 22, 22, 25, 1, 1, 141, 25, 23, 135, /* 2080 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, - /* 2090 */ 319, 319, 319, 319, 141, 141, 319, 141, 319, 319, + /* 2090 */ 319, 319, 319, 319, 141, 141, 319, 319, 319, 319, /* 2100 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, /* 2110 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, /* 2120 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, @@ -166345,9 +170253,9 @@ static const YYCODETYPE yy_lookahead[] = { /* 2250 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, /* 2260 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, /* 2270 */ 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, - /* 2280 */ 319, 319, 319, + /* 2280 */ 319, }; -#define YY_SHIFT_COUNT (575) +#define YY_SHIFT_COUNT (574) #define YY_SHIFT_MIN (0) #define YY_SHIFT_MAX (2074) static const unsigned short int yy_shift_ofst[] = { @@ -166367,12 +170275,12 @@ static const unsigned short int yy_shift_ofst[] = { /* 130 */ 137, 181, 181, 181, 181, 181, 181, 181, 94, 430, /* 140 */ 66, 65, 112, 366, 533, 533, 740, 1261, 533, 533, /* 150 */ 79, 79, 533, 412, 412, 412, 77, 412, 123, 113, - /* 160 */ 113, 22, 22, 2098, 2098, 328, 328, 328, 239, 468, + /* 160 */ 113, 22, 22, 2096, 2096, 328, 328, 328, 239, 468, /* 170 */ 468, 468, 468, 1015, 1015, 409, 366, 1129, 1186, 533, /* 180 */ 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, /* 190 */ 533, 533, 533, 533, 533, 533, 533, 533, 533, 969, /* 200 */ 621, 621, 533, 642, 788, 788, 1228, 1228, 822, 822, - /* 210 */ 67, 1274, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 1307, + /* 210 */ 67, 1274, 2096, 2096, 2096, 2096, 2096, 2096, 2096, 1307, /* 220 */ 954, 954, 585, 472, 640, 387, 695, 538, 541, 700, /* 230 */ 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, /* 240 */ 222, 533, 533, 533, 533, 533, 533, 533, 533, 533, @@ -166390,8 +170298,8 @@ static const unsigned short int yy_shift_ofst[] = { /* 360 */ 1840, 1840, 1823, 1732, 1738, 1732, 1794, 1732, 1732, 1701, /* 370 */ 1844, 1758, 1758, 1823, 1633, 1789, 1789, 1807, 1807, 1742, /* 380 */ 1752, 1877, 1633, 1743, 1742, 1759, 1765, 1677, 1879, 1897, - /* 390 */ 1897, 1914, 1914, 1914, 2098, 2098, 2098, 2098, 2098, 2098, - /* 400 */ 2098, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 207, + /* 390 */ 1897, 1914, 1914, 1914, 2096, 2096, 2096, 2096, 2096, 2096, + /* 400 */ 2096, 2096, 2096, 2096, 2096, 2096, 2096, 2096, 2096, 207, /* 410 */ 1095, 331, 620, 903, 806, 1074, 1483, 1432, 1481, 1322, /* 420 */ 1370, 1394, 1515, 1291, 1546, 1547, 1557, 1595, 1598, 1599, /* 430 */ 1434, 1453, 1618, 1462, 1567, 1489, 1644, 1654, 1616, 1660, @@ -166408,7 +170316,7 @@ static const unsigned short int yy_shift_ofst[] = { /* 540 */ 2015, 2023, 2026, 2027, 2025, 2028, 2018, 1913, 1915, 2031, /* 550 */ 2011, 2033, 2036, 2037, 2038, 2039, 2040, 2043, 2051, 2044, /* 560 */ 2045, 2046, 2047, 2049, 2050, 2048, 1944, 1935, 1953, 1954, - /* 570 */ 1956, 2052, 2055, 2053, 2073, 2074, + /* 570 */ 2052, 2055, 2053, 2073, 2074, }; #define YY_REDUCE_COUNT (408) #define YY_REDUCE_MIN (-271) @@ -166457,64 +170365,64 @@ static const short yy_reduce_ofst[] = { /* 400 */ 1722, 1723, 1733, 1717, 1724, 1727, 1728, 1725, 1740, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1647, 1647, 1647, 1475, 1240, 1351, 1240, 1240, 1240, 1475, - /* 10 */ 1475, 1475, 1240, 1381, 1381, 1528, 1273, 1240, 1240, 1240, - /* 20 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1474, 1240, 1240, - /* 30 */ 1240, 1240, 1563, 1563, 1240, 1240, 1240, 1240, 1240, 1240, - /* 40 */ 1240, 1240, 1390, 1240, 1397, 1240, 1240, 1240, 1240, 1240, - /* 50 */ 1476, 1477, 1240, 1240, 1240, 1527, 1529, 1492, 1404, 1403, - /* 60 */ 1402, 1401, 1510, 1369, 1395, 1388, 1392, 1470, 1471, 1469, - /* 70 */ 1473, 1477, 1476, 1240, 1391, 1438, 1454, 1437, 1240, 1240, - /* 80 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 90 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 100 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 110 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 120 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 130 */ 1446, 1453, 1452, 1451, 1460, 1450, 1447, 1440, 1439, 1441, - /* 140 */ 1442, 1240, 1240, 1264, 1240, 1240, 1261, 1315, 1240, 1240, - /* 150 */ 1240, 1240, 1240, 1547, 1546, 1240, 1443, 1240, 1273, 1432, - /* 160 */ 1431, 1457, 1444, 1456, 1455, 1535, 1599, 1598, 1493, 1240, - /* 170 */ 1240, 1240, 1240, 1240, 1240, 1563, 1240, 1240, 1240, 1240, - /* 180 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 190 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1371, - /* 200 */ 1563, 1563, 1240, 1273, 1563, 1563, 1372, 1372, 1269, 1269, - /* 210 */ 1375, 1240, 1542, 1342, 1342, 1342, 1342, 1351, 1342, 1240, - /* 220 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 230 */ 1240, 1240, 1240, 1240, 1532, 1530, 1240, 1240, 1240, 1240, - /* 240 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 250 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 260 */ 1240, 1240, 1240, 1347, 1240, 1240, 1240, 1240, 1240, 1240, - /* 270 */ 1240, 1240, 1240, 1240, 1240, 1592, 1240, 1505, 1329, 1347, - /* 280 */ 1347, 1347, 1347, 1349, 1330, 1328, 1341, 1274, 1247, 1639, - /* 290 */ 1407, 1396, 1348, 1396, 1636, 1394, 1407, 1407, 1394, 1407, - /* 300 */ 1348, 1636, 1290, 1615, 1285, 1381, 1381, 1381, 1371, 1371, - /* 310 */ 1371, 1371, 1375, 1375, 1472, 1348, 1341, 1240, 1639, 1639, - /* 320 */ 1357, 1357, 1638, 1638, 1357, 1493, 1623, 1416, 1318, 1324, - /* 330 */ 1324, 1324, 1324, 1357, 1258, 1394, 1623, 1623, 1394, 1416, - /* 340 */ 1318, 1394, 1318, 1394, 1357, 1258, 1509, 1633, 1357, 1258, - /* 350 */ 1483, 1357, 1258, 1357, 1258, 1483, 1316, 1316, 1316, 1305, - /* 360 */ 1240, 1240, 1483, 1316, 1290, 1316, 1305, 1316, 1316, 1581, - /* 370 */ 1240, 1487, 1487, 1483, 1357, 1573, 1573, 1384, 1384, 1389, - /* 380 */ 1375, 1478, 1357, 1240, 1389, 1387, 1385, 1394, 1308, 1595, - /* 390 */ 1595, 1591, 1591, 1591, 1644, 1644, 1542, 1608, 1273, 1273, - /* 400 */ 1273, 1273, 1608, 1292, 1292, 1274, 1274, 1273, 1608, 1240, - /* 410 */ 1240, 1240, 1240, 1240, 1240, 1603, 1240, 1537, 1494, 1361, - /* 420 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 430 */ 1240, 1240, 1240, 1240, 1548, 1240, 1240, 1240, 1240, 1240, - /* 440 */ 1240, 1240, 1240, 1240, 1240, 1421, 1240, 1243, 1539, 1240, - /* 450 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1398, 1399, 1362, - /* 460 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1413, 1240, 1240, - /* 470 */ 1240, 1408, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 480 */ 1635, 1240, 1240, 1240, 1240, 1240, 1240, 1508, 1507, 1240, - /* 490 */ 1240, 1359, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 500 */ 1240, 1240, 1240, 1240, 1240, 1288, 1240, 1240, 1240, 1240, - /* 510 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 520 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1386, - /* 530 */ 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 540 */ 1240, 1240, 1240, 1240, 1578, 1376, 1240, 1240, 1240, 1240, - /* 550 */ 1626, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, 1240, - /* 560 */ 1240, 1240, 1240, 1240, 1240, 1619, 1332, 1423, 1240, 1422, - /* 570 */ 1426, 1262, 1240, 1252, 1240, 1240, + /* 0 */ 1639, 1639, 1639, 1469, 1236, 1347, 1236, 1236, 1236, 1469, + /* 10 */ 1469, 1469, 1236, 1377, 1377, 1522, 1269, 1236, 1236, 1236, + /* 20 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1468, 1236, 1236, + /* 30 */ 1236, 1236, 1555, 1555, 1236, 1236, 1236, 1236, 1236, 1236, + /* 40 */ 1236, 1236, 1386, 1236, 1393, 1236, 1236, 1236, 1236, 1236, + /* 50 */ 1470, 1471, 1236, 1236, 1236, 1521, 1523, 1486, 1400, 1399, + /* 60 */ 1398, 1397, 1504, 1365, 1391, 1384, 1388, 1465, 1466, 1464, + /* 70 */ 1617, 1471, 1470, 1236, 1387, 1433, 1449, 1432, 1236, 1236, + /* 80 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 90 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 100 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 110 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 120 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 130 */ 1441, 1448, 1447, 1446, 1455, 1445, 1442, 1435, 1434, 1436, + /* 140 */ 1437, 1236, 1236, 1260, 1236, 1236, 1257, 1311, 1236, 1236, + /* 150 */ 1236, 1236, 1236, 1541, 1540, 1236, 1438, 1236, 1269, 1427, + /* 160 */ 1426, 1452, 1439, 1451, 1450, 1529, 1591, 1590, 1487, 1236, + /* 170 */ 1236, 1236, 1236, 1236, 1236, 1555, 1236, 1236, 1236, 1236, + /* 180 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 190 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1367, + /* 200 */ 1555, 1555, 1236, 1269, 1555, 1555, 1368, 1368, 1265, 1265, + /* 210 */ 1371, 1236, 1536, 1338, 1338, 1338, 1338, 1347, 1338, 1236, + /* 220 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 230 */ 1236, 1236, 1236, 1236, 1526, 1524, 1236, 1236, 1236, 1236, + /* 240 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 250 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 260 */ 1236, 1236, 1236, 1343, 1236, 1236, 1236, 1236, 1236, 1236, + /* 270 */ 1236, 1236, 1236, 1236, 1236, 1584, 1236, 1499, 1325, 1343, + /* 280 */ 1343, 1343, 1343, 1345, 1326, 1324, 1337, 1270, 1243, 1631, + /* 290 */ 1403, 1392, 1344, 1392, 1628, 1390, 1403, 1403, 1390, 1403, + /* 300 */ 1344, 1628, 1286, 1606, 1281, 1377, 1377, 1377, 1367, 1367, + /* 310 */ 1367, 1367, 1371, 1371, 1467, 1344, 1337, 1236, 1631, 1631, + /* 320 */ 1353, 1353, 1630, 1630, 1353, 1487, 1614, 1412, 1314, 1320, + /* 330 */ 1320, 1320, 1320, 1353, 1254, 1390, 1614, 1614, 1390, 1412, + /* 340 */ 1314, 1390, 1314, 1390, 1353, 1254, 1503, 1625, 1353, 1254, + /* 350 */ 1477, 1353, 1254, 1353, 1254, 1477, 1312, 1312, 1312, 1301, + /* 360 */ 1236, 1236, 1477, 1312, 1286, 1312, 1301, 1312, 1312, 1573, + /* 370 */ 1236, 1481, 1481, 1477, 1353, 1565, 1565, 1380, 1380, 1385, + /* 380 */ 1371, 1472, 1353, 1236, 1385, 1383, 1381, 1390, 1304, 1587, + /* 390 */ 1587, 1583, 1583, 1583, 1636, 1636, 1536, 1599, 1269, 1269, + /* 400 */ 1269, 1269, 1599, 1288, 1288, 1270, 1270, 1269, 1599, 1236, + /* 410 */ 1236, 1236, 1236, 1236, 1236, 1594, 1236, 1531, 1488, 1357, + /* 420 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 430 */ 1236, 1236, 1236, 1236, 1542, 1236, 1236, 1236, 1236, 1236, + /* 440 */ 1236, 1236, 1236, 1236, 1236, 1417, 1236, 1239, 1533, 1236, + /* 450 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1394, 1395, 1358, + /* 460 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1409, 1236, 1236, + /* 470 */ 1236, 1404, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 480 */ 1627, 1236, 1236, 1236, 1236, 1236, 1236, 1502, 1501, 1236, + /* 490 */ 1236, 1355, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 500 */ 1236, 1236, 1236, 1236, 1236, 1284, 1236, 1236, 1236, 1236, + /* 510 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 520 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1382, + /* 530 */ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 540 */ 1236, 1236, 1236, 1236, 1570, 1372, 1236, 1236, 1236, 1236, + /* 550 */ 1618, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236, + /* 560 */ 1236, 1236, 1236, 1236, 1236, 1610, 1328, 1418, 1236, 1421, + /* 570 */ 1258, 1236, 1248, 1236, 1236, }; /********** End of lemon-generated parsing tables *****************************/ @@ -167311,233 +171219,231 @@ static const char *const yyRuleName[] = { /* 175 */ "idlist ::= idlist COMMA nm", /* 176 */ "idlist ::= nm", /* 177 */ "expr ::= LP expr RP", - /* 178 */ "expr ::= ID|INDEXED", - /* 179 */ "expr ::= JOIN_KW", - /* 180 */ "expr ::= nm DOT nm", - /* 181 */ "expr ::= nm DOT nm DOT nm", - /* 182 */ "term ::= NULL|FLOAT|BLOB", - /* 183 */ "term ::= STRING", - /* 184 */ "term ::= INTEGER", - /* 185 */ "expr ::= VARIABLE", - /* 186 */ "expr ::= expr COLLATE ID|STRING", - /* 187 */ "expr ::= CAST LP expr AS typetoken RP", - /* 188 */ "expr ::= ID|INDEXED LP distinct exprlist RP", - /* 189 */ "expr ::= ID|INDEXED LP STAR RP", - /* 190 */ "expr ::= ID|INDEXED LP distinct exprlist RP filter_over", - /* 191 */ "expr ::= ID|INDEXED LP STAR RP filter_over", - /* 192 */ "term ::= CTIME_KW", - /* 193 */ "expr ::= LP nexprlist COMMA expr RP", - /* 194 */ "expr ::= expr AND expr", - /* 195 */ "expr ::= expr OR expr", - /* 196 */ "expr ::= expr LT|GT|GE|LE expr", - /* 197 */ "expr ::= expr EQ|NE expr", - /* 198 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr", - /* 199 */ "expr ::= expr PLUS|MINUS expr", - /* 200 */ "expr ::= expr STAR|SLASH|REM expr", - /* 201 */ "expr ::= expr CONCAT expr", - /* 202 */ "likeop ::= NOT LIKE_KW|MATCH", - /* 203 */ "expr ::= expr likeop expr", - /* 204 */ "expr ::= expr likeop expr ESCAPE expr", - /* 205 */ "expr ::= expr ISNULL|NOTNULL", - /* 206 */ "expr ::= expr NOT NULL", - /* 207 */ "expr ::= expr IS expr", - /* 208 */ "expr ::= expr IS NOT expr", - /* 209 */ "expr ::= expr IS NOT DISTINCT FROM expr", - /* 210 */ "expr ::= expr IS DISTINCT FROM expr", - /* 211 */ "expr ::= NOT expr", - /* 212 */ "expr ::= BITNOT expr", - /* 213 */ "expr ::= PLUS|MINUS expr", - /* 214 */ "expr ::= expr PTR expr", - /* 215 */ "between_op ::= BETWEEN", - /* 216 */ "between_op ::= NOT BETWEEN", - /* 217 */ "expr ::= expr between_op expr AND expr", - /* 218 */ "in_op ::= IN", - /* 219 */ "in_op ::= NOT IN", - /* 220 */ "expr ::= expr in_op LP exprlist RP", - /* 221 */ "expr ::= LP select RP", - /* 222 */ "expr ::= expr in_op LP select RP", - /* 223 */ "expr ::= expr in_op nm dbnm paren_exprlist", - /* 224 */ "expr ::= EXISTS LP select RP", - /* 225 */ "expr ::= CASE case_operand case_exprlist case_else END", - /* 226 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr", - /* 227 */ "case_exprlist ::= WHEN expr THEN expr", - /* 228 */ "case_else ::= ELSE expr", - /* 229 */ "case_else ::=", - /* 230 */ "case_operand ::= expr", - /* 231 */ "case_operand ::=", - /* 232 */ "exprlist ::=", - /* 233 */ "nexprlist ::= nexprlist COMMA expr", - /* 234 */ "nexprlist ::= expr", - /* 235 */ "paren_exprlist ::=", - /* 236 */ "paren_exprlist ::= LP exprlist RP", - /* 237 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt", - /* 238 */ "uniqueflag ::= UNIQUE", - /* 239 */ "uniqueflag ::=", - /* 240 */ "eidlist_opt ::=", - /* 241 */ "eidlist_opt ::= LP eidlist RP", - /* 242 */ "eidlist ::= eidlist COMMA nm collate sortorder", - /* 243 */ "eidlist ::= nm collate sortorder", - /* 244 */ "collate ::=", - /* 245 */ "collate ::= COLLATE ID|STRING", - /* 246 */ "cmd ::= DROP INDEX ifexists fullname", - /* 247 */ "cmd ::= VACUUM vinto", - /* 248 */ "cmd ::= VACUUM nm vinto", - /* 249 */ "vinto ::= INTO expr", - /* 250 */ "vinto ::=", - /* 251 */ "cmd ::= PRAGMA nm dbnm", - /* 252 */ "cmd ::= PRAGMA nm dbnm EQ nmnum", - /* 253 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP", - /* 254 */ "cmd ::= PRAGMA nm dbnm EQ minus_num", - /* 255 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP", - /* 256 */ "plus_num ::= PLUS INTEGER|FLOAT", - /* 257 */ "minus_num ::= MINUS INTEGER|FLOAT", - /* 258 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END", - /* 259 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause", - /* 260 */ "trigger_time ::= BEFORE|AFTER", - /* 261 */ "trigger_time ::= INSTEAD OF", - /* 262 */ "trigger_time ::=", - /* 263 */ "trigger_event ::= DELETE|INSERT", - /* 264 */ "trigger_event ::= UPDATE", - /* 265 */ "trigger_event ::= UPDATE OF idlist", - /* 266 */ "when_clause ::=", - /* 267 */ "when_clause ::= WHEN expr", - /* 268 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI", - /* 269 */ "trigger_cmd_list ::= trigger_cmd SEMI", - /* 270 */ "trnm ::= nm DOT nm", - /* 271 */ "tridxby ::= INDEXED BY nm", - /* 272 */ "tridxby ::= NOT INDEXED", - /* 273 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt", - /* 274 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt", - /* 275 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt", - /* 276 */ "trigger_cmd ::= scanpt select scanpt", - /* 277 */ "expr ::= RAISE LP IGNORE RP", - /* 278 */ "expr ::= RAISE LP raisetype COMMA nm RP", - /* 279 */ "raisetype ::= ROLLBACK", - /* 280 */ "raisetype ::= ABORT", - /* 281 */ "raisetype ::= FAIL", - /* 282 */ "cmd ::= DROP TRIGGER ifexists fullname", - /* 283 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt", - /* 284 */ "cmd ::= DETACH database_kw_opt expr", - /* 285 */ "key_opt ::=", - /* 286 */ "key_opt ::= KEY expr", - /* 287 */ "cmd ::= REINDEX", - /* 288 */ "cmd ::= REINDEX nm dbnm", - /* 289 */ "cmd ::= ANALYZE", - /* 290 */ "cmd ::= ANALYZE nm dbnm", - /* 291 */ "cmd ::= ALTER TABLE fullname RENAME TO nm", - /* 292 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist", - /* 293 */ "cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm", - /* 294 */ "add_column_fullname ::= fullname", - /* 295 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm", - /* 296 */ "cmd ::= create_vtab", - /* 297 */ "cmd ::= create_vtab LP vtabarglist RP", - /* 298 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm", - /* 299 */ "vtabarg ::=", - /* 300 */ "vtabargtoken ::= ANY", - /* 301 */ "vtabargtoken ::= lp anylist RP", - /* 302 */ "lp ::= LP", - /* 303 */ "with ::= WITH wqlist", - /* 304 */ "with ::= WITH RECURSIVE wqlist", - /* 305 */ "wqas ::= AS", - /* 306 */ "wqas ::= AS MATERIALIZED", - /* 307 */ "wqas ::= AS NOT MATERIALIZED", - /* 308 */ "wqitem ::= nm eidlist_opt wqas LP select RP", - /* 309 */ "wqlist ::= wqitem", - /* 310 */ "wqlist ::= wqlist COMMA wqitem", - /* 311 */ "windowdefn_list ::= windowdefn", - /* 312 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn", - /* 313 */ "windowdefn ::= nm AS LP window RP", - /* 314 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt", - /* 315 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt", - /* 316 */ "window ::= ORDER BY sortlist frame_opt", - /* 317 */ "window ::= nm ORDER BY sortlist frame_opt", - /* 318 */ "window ::= frame_opt", - /* 319 */ "window ::= nm frame_opt", - /* 320 */ "frame_opt ::=", - /* 321 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt", - /* 322 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt", - /* 323 */ "range_or_rows ::= RANGE|ROWS|GROUPS", - /* 324 */ "frame_bound_s ::= frame_bound", - /* 325 */ "frame_bound_s ::= UNBOUNDED PRECEDING", - /* 326 */ "frame_bound_e ::= frame_bound", - /* 327 */ "frame_bound_e ::= UNBOUNDED FOLLOWING", - /* 328 */ "frame_bound ::= expr PRECEDING|FOLLOWING", - /* 329 */ "frame_bound ::= CURRENT ROW", - /* 330 */ "frame_exclude_opt ::=", - /* 331 */ "frame_exclude_opt ::= EXCLUDE frame_exclude", - /* 332 */ "frame_exclude ::= NO OTHERS", - /* 333 */ "frame_exclude ::= CURRENT ROW", - /* 334 */ "frame_exclude ::= GROUP|TIES", - /* 335 */ "window_clause ::= WINDOW windowdefn_list", - /* 336 */ "filter_over ::= filter_clause over_clause", - /* 337 */ "filter_over ::= over_clause", - /* 338 */ "filter_over ::= filter_clause", - /* 339 */ "over_clause ::= OVER LP window RP", - /* 340 */ "over_clause ::= OVER nm", - /* 341 */ "filter_clause ::= FILTER LP WHERE expr RP", - /* 342 */ "input ::= cmdlist", - /* 343 */ "cmdlist ::= cmdlist ecmd", - /* 344 */ "cmdlist ::= ecmd", - /* 345 */ "ecmd ::= SEMI", - /* 346 */ "ecmd ::= cmdx SEMI", - /* 347 */ "ecmd ::= explain cmdx SEMI", - /* 348 */ "trans_opt ::=", - /* 349 */ "trans_opt ::= TRANSACTION", - /* 350 */ "trans_opt ::= TRANSACTION nm", - /* 351 */ "savepoint_opt ::= SAVEPOINT", - /* 352 */ "savepoint_opt ::=", - /* 353 */ "cmd ::= create_table create_table_args", - /* 354 */ "table_option_set ::= table_option", - /* 355 */ "columnlist ::= columnlist COMMA columnname carglist", - /* 356 */ "columnlist ::= columnname carglist", - /* 357 */ "nm ::= ID|INDEXED", - /* 358 */ "nm ::= STRING", - /* 359 */ "nm ::= JOIN_KW", - /* 360 */ "typetoken ::= typename", - /* 361 */ "typename ::= ID|STRING", - /* 362 */ "signed ::= plus_num", - /* 363 */ "signed ::= minus_num", - /* 364 */ "carglist ::= carglist ccons", - /* 365 */ "carglist ::=", - /* 366 */ "ccons ::= NULL onconf", - /* 367 */ "ccons ::= GENERATED ALWAYS AS generated", - /* 368 */ "ccons ::= AS generated", - /* 369 */ "conslist_opt ::= COMMA conslist", - /* 370 */ "conslist ::= conslist tconscomma tcons", - /* 371 */ "conslist ::= tcons", - /* 372 */ "tconscomma ::=", - /* 373 */ "defer_subclause_opt ::= defer_subclause", - /* 374 */ "resolvetype ::= raisetype", - /* 375 */ "selectnowith ::= oneselect", - /* 376 */ "oneselect ::= values", - /* 377 */ "sclp ::= selcollist COMMA", - /* 378 */ "as ::= ID|STRING", - /* 379 */ "indexed_opt ::= indexed_by", - /* 380 */ "returning ::=", - /* 381 */ "expr ::= term", - /* 382 */ "likeop ::= LIKE_KW|MATCH", - /* 383 */ "exprlist ::= nexprlist", - /* 384 */ "nmnum ::= plus_num", - /* 385 */ "nmnum ::= nm", - /* 386 */ "nmnum ::= ON", - /* 387 */ "nmnum ::= DELETE", - /* 388 */ "nmnum ::= DEFAULT", - /* 389 */ "plus_num ::= INTEGER|FLOAT", - /* 390 */ "foreach_clause ::=", - /* 391 */ "foreach_clause ::= FOR EACH ROW", - /* 392 */ "trnm ::= nm", - /* 393 */ "tridxby ::=", - /* 394 */ "database_kw_opt ::= DATABASE", - /* 395 */ "database_kw_opt ::=", - /* 396 */ "kwcolumn_opt ::=", - /* 397 */ "kwcolumn_opt ::= COLUMNKW", - /* 398 */ "vtabarglist ::= vtabarg", - /* 399 */ "vtabarglist ::= vtabarglist COMMA vtabarg", - /* 400 */ "vtabarg ::= vtabarg vtabargtoken", - /* 401 */ "anylist ::=", - /* 402 */ "anylist ::= anylist LP anylist RP", - /* 403 */ "anylist ::= anylist ANY", - /* 404 */ "with ::=", + /* 178 */ "expr ::= ID|INDEXED|JOIN_KW", + /* 179 */ "expr ::= nm DOT nm", + /* 180 */ "expr ::= nm DOT nm DOT nm", + /* 181 */ "term ::= NULL|FLOAT|BLOB", + /* 182 */ "term ::= STRING", + /* 183 */ "term ::= INTEGER", + /* 184 */ "expr ::= VARIABLE", + /* 185 */ "expr ::= expr COLLATE ID|STRING", + /* 186 */ "expr ::= CAST LP expr AS typetoken RP", + /* 187 */ "expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP", + /* 188 */ "expr ::= ID|INDEXED|JOIN_KW LP STAR RP", + /* 189 */ "expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over", + /* 190 */ "expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over", + /* 191 */ "term ::= CTIME_KW", + /* 192 */ "expr ::= LP nexprlist COMMA expr RP", + /* 193 */ "expr ::= expr AND expr", + /* 194 */ "expr ::= expr OR expr", + /* 195 */ "expr ::= expr LT|GT|GE|LE expr", + /* 196 */ "expr ::= expr EQ|NE expr", + /* 197 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr", + /* 198 */ "expr ::= expr PLUS|MINUS expr", + /* 199 */ "expr ::= expr STAR|SLASH|REM expr", + /* 200 */ "expr ::= expr CONCAT expr", + /* 201 */ "likeop ::= NOT LIKE_KW|MATCH", + /* 202 */ "expr ::= expr likeop expr", + /* 203 */ "expr ::= expr likeop expr ESCAPE expr", + /* 204 */ "expr ::= expr ISNULL|NOTNULL", + /* 205 */ "expr ::= expr NOT NULL", + /* 206 */ "expr ::= expr IS expr", + /* 207 */ "expr ::= expr IS NOT expr", + /* 208 */ "expr ::= expr IS NOT DISTINCT FROM expr", + /* 209 */ "expr ::= expr IS DISTINCT FROM expr", + /* 210 */ "expr ::= NOT expr", + /* 211 */ "expr ::= BITNOT expr", + /* 212 */ "expr ::= PLUS|MINUS expr", + /* 213 */ "expr ::= expr PTR expr", + /* 214 */ "between_op ::= BETWEEN", + /* 215 */ "between_op ::= NOT BETWEEN", + /* 216 */ "expr ::= expr between_op expr AND expr", + /* 217 */ "in_op ::= IN", + /* 218 */ "in_op ::= NOT IN", + /* 219 */ "expr ::= expr in_op LP exprlist RP", + /* 220 */ "expr ::= LP select RP", + /* 221 */ "expr ::= expr in_op LP select RP", + /* 222 */ "expr ::= expr in_op nm dbnm paren_exprlist", + /* 223 */ "expr ::= EXISTS LP select RP", + /* 224 */ "expr ::= CASE case_operand case_exprlist case_else END", + /* 225 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr", + /* 226 */ "case_exprlist ::= WHEN expr THEN expr", + /* 227 */ "case_else ::= ELSE expr", + /* 228 */ "case_else ::=", + /* 229 */ "case_operand ::=", + /* 230 */ "exprlist ::=", + /* 231 */ "nexprlist ::= nexprlist COMMA expr", + /* 232 */ "nexprlist ::= expr", + /* 233 */ "paren_exprlist ::=", + /* 234 */ "paren_exprlist ::= LP exprlist RP", + /* 235 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt", + /* 236 */ "uniqueflag ::= UNIQUE", + /* 237 */ "uniqueflag ::=", + /* 238 */ "eidlist_opt ::=", + /* 239 */ "eidlist_opt ::= LP eidlist RP", + /* 240 */ "eidlist ::= eidlist COMMA nm collate sortorder", + /* 241 */ "eidlist ::= nm collate sortorder", + /* 242 */ "collate ::=", + /* 243 */ "collate ::= COLLATE ID|STRING", + /* 244 */ "cmd ::= DROP INDEX ifexists fullname", + /* 245 */ "cmd ::= VACUUM vinto", + /* 246 */ "cmd ::= VACUUM nm vinto", + /* 247 */ "vinto ::= INTO expr", + /* 248 */ "vinto ::=", + /* 249 */ "cmd ::= PRAGMA nm dbnm", + /* 250 */ "cmd ::= PRAGMA nm dbnm EQ nmnum", + /* 251 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP", + /* 252 */ "cmd ::= PRAGMA nm dbnm EQ minus_num", + /* 253 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP", + /* 254 */ "plus_num ::= PLUS INTEGER|FLOAT", + /* 255 */ "minus_num ::= MINUS INTEGER|FLOAT", + /* 256 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END", + /* 257 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause", + /* 258 */ "trigger_time ::= BEFORE|AFTER", + /* 259 */ "trigger_time ::= INSTEAD OF", + /* 260 */ "trigger_time ::=", + /* 261 */ "trigger_event ::= DELETE|INSERT", + /* 262 */ "trigger_event ::= UPDATE", + /* 263 */ "trigger_event ::= UPDATE OF idlist", + /* 264 */ "when_clause ::=", + /* 265 */ "when_clause ::= WHEN expr", + /* 266 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI", + /* 267 */ "trigger_cmd_list ::= trigger_cmd SEMI", + /* 268 */ "trnm ::= nm DOT nm", + /* 269 */ "tridxby ::= INDEXED BY nm", + /* 270 */ "tridxby ::= NOT INDEXED", + /* 271 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt", + /* 272 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt", + /* 273 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt", + /* 274 */ "trigger_cmd ::= scanpt select scanpt", + /* 275 */ "expr ::= RAISE LP IGNORE RP", + /* 276 */ "expr ::= RAISE LP raisetype COMMA nm RP", + /* 277 */ "raisetype ::= ROLLBACK", + /* 278 */ "raisetype ::= ABORT", + /* 279 */ "raisetype ::= FAIL", + /* 280 */ "cmd ::= DROP TRIGGER ifexists fullname", + /* 281 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt", + /* 282 */ "cmd ::= DETACH database_kw_opt expr", + /* 283 */ "key_opt ::=", + /* 284 */ "key_opt ::= KEY expr", + /* 285 */ "cmd ::= REINDEX", + /* 286 */ "cmd ::= REINDEX nm dbnm", + /* 287 */ "cmd ::= ANALYZE", + /* 288 */ "cmd ::= ANALYZE nm dbnm", + /* 289 */ "cmd ::= ALTER TABLE fullname RENAME TO nm", + /* 290 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist", + /* 291 */ "cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm", + /* 292 */ "add_column_fullname ::= fullname", + /* 293 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm", + /* 294 */ "cmd ::= create_vtab", + /* 295 */ "cmd ::= create_vtab LP vtabarglist RP", + /* 296 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm", + /* 297 */ "vtabarg ::=", + /* 298 */ "vtabargtoken ::= ANY", + /* 299 */ "vtabargtoken ::= lp anylist RP", + /* 300 */ "lp ::= LP", + /* 301 */ "with ::= WITH wqlist", + /* 302 */ "with ::= WITH RECURSIVE wqlist", + /* 303 */ "wqas ::= AS", + /* 304 */ "wqas ::= AS MATERIALIZED", + /* 305 */ "wqas ::= AS NOT MATERIALIZED", + /* 306 */ "wqitem ::= nm eidlist_opt wqas LP select RP", + /* 307 */ "wqlist ::= wqitem", + /* 308 */ "wqlist ::= wqlist COMMA wqitem", + /* 309 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn", + /* 310 */ "windowdefn ::= nm AS LP window RP", + /* 311 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt", + /* 312 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt", + /* 313 */ "window ::= ORDER BY sortlist frame_opt", + /* 314 */ "window ::= nm ORDER BY sortlist frame_opt", + /* 315 */ "window ::= nm frame_opt", + /* 316 */ "frame_opt ::=", + /* 317 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt", + /* 318 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt", + /* 319 */ "range_or_rows ::= RANGE|ROWS|GROUPS", + /* 320 */ "frame_bound_s ::= frame_bound", + /* 321 */ "frame_bound_s ::= UNBOUNDED PRECEDING", + /* 322 */ "frame_bound_e ::= frame_bound", + /* 323 */ "frame_bound_e ::= UNBOUNDED FOLLOWING", + /* 324 */ "frame_bound ::= expr PRECEDING|FOLLOWING", + /* 325 */ "frame_bound ::= CURRENT ROW", + /* 326 */ "frame_exclude_opt ::=", + /* 327 */ "frame_exclude_opt ::= EXCLUDE frame_exclude", + /* 328 */ "frame_exclude ::= NO OTHERS", + /* 329 */ "frame_exclude ::= CURRENT ROW", + /* 330 */ "frame_exclude ::= GROUP|TIES", + /* 331 */ "window_clause ::= WINDOW windowdefn_list", + /* 332 */ "filter_over ::= filter_clause over_clause", + /* 333 */ "filter_over ::= over_clause", + /* 334 */ "filter_over ::= filter_clause", + /* 335 */ "over_clause ::= OVER LP window RP", + /* 336 */ "over_clause ::= OVER nm", + /* 337 */ "filter_clause ::= FILTER LP WHERE expr RP", + /* 338 */ "input ::= cmdlist", + /* 339 */ "cmdlist ::= cmdlist ecmd", + /* 340 */ "cmdlist ::= ecmd", + /* 341 */ "ecmd ::= SEMI", + /* 342 */ "ecmd ::= cmdx SEMI", + /* 343 */ "ecmd ::= explain cmdx SEMI", + /* 344 */ "trans_opt ::=", + /* 345 */ "trans_opt ::= TRANSACTION", + /* 346 */ "trans_opt ::= TRANSACTION nm", + /* 347 */ "savepoint_opt ::= SAVEPOINT", + /* 348 */ "savepoint_opt ::=", + /* 349 */ "cmd ::= create_table create_table_args", + /* 350 */ "table_option_set ::= table_option", + /* 351 */ "columnlist ::= columnlist COMMA columnname carglist", + /* 352 */ "columnlist ::= columnname carglist", + /* 353 */ "nm ::= ID|INDEXED|JOIN_KW", + /* 354 */ "nm ::= STRING", + /* 355 */ "typetoken ::= typename", + /* 356 */ "typename ::= ID|STRING", + /* 357 */ "signed ::= plus_num", + /* 358 */ "signed ::= minus_num", + /* 359 */ "carglist ::= carglist ccons", + /* 360 */ "carglist ::=", + /* 361 */ "ccons ::= NULL onconf", + /* 362 */ "ccons ::= GENERATED ALWAYS AS generated", + /* 363 */ "ccons ::= AS generated", + /* 364 */ "conslist_opt ::= COMMA conslist", + /* 365 */ "conslist ::= conslist tconscomma tcons", + /* 366 */ "conslist ::= tcons", + /* 367 */ "tconscomma ::=", + /* 368 */ "defer_subclause_opt ::= defer_subclause", + /* 369 */ "resolvetype ::= raisetype", + /* 370 */ "selectnowith ::= oneselect", + /* 371 */ "oneselect ::= values", + /* 372 */ "sclp ::= selcollist COMMA", + /* 373 */ "as ::= ID|STRING", + /* 374 */ "indexed_opt ::= indexed_by", + /* 375 */ "returning ::=", + /* 376 */ "expr ::= term", + /* 377 */ "likeop ::= LIKE_KW|MATCH", + /* 378 */ "case_operand ::= expr", + /* 379 */ "exprlist ::= nexprlist", + /* 380 */ "nmnum ::= plus_num", + /* 381 */ "nmnum ::= nm", + /* 382 */ "nmnum ::= ON", + /* 383 */ "nmnum ::= DELETE", + /* 384 */ "nmnum ::= DEFAULT", + /* 385 */ "plus_num ::= INTEGER|FLOAT", + /* 386 */ "foreach_clause ::=", + /* 387 */ "foreach_clause ::= FOR EACH ROW", + /* 388 */ "trnm ::= nm", + /* 389 */ "tridxby ::=", + /* 390 */ "database_kw_opt ::= DATABASE", + /* 391 */ "database_kw_opt ::=", + /* 392 */ "kwcolumn_opt ::=", + /* 393 */ "kwcolumn_opt ::= COLUMNKW", + /* 394 */ "vtabarglist ::= vtabarg", + /* 395 */ "vtabarglist ::= vtabarglist COMMA vtabarg", + /* 396 */ "vtabarg ::= vtabarg vtabargtoken", + /* 397 */ "anylist ::=", + /* 398 */ "anylist ::= anylist LP anylist RP", + /* 399 */ "anylist ::= anylist ANY", + /* 400 */ "with ::=", + /* 401 */ "windowdefn_list ::= windowdefn", + /* 402 */ "window ::= frame_opt", }; #endif /* NDEBUG */ @@ -168222,233 +172128,231 @@ static const YYCODETYPE yyRuleInfoLhs[] = { 263, /* (175) idlist ::= idlist COMMA nm */ 263, /* (176) idlist ::= nm */ 217, /* (177) expr ::= LP expr RP */ - 217, /* (178) expr ::= ID|INDEXED */ - 217, /* (179) expr ::= JOIN_KW */ - 217, /* (180) expr ::= nm DOT nm */ - 217, /* (181) expr ::= nm DOT nm DOT nm */ - 216, /* (182) term ::= NULL|FLOAT|BLOB */ - 216, /* (183) term ::= STRING */ - 216, /* (184) term ::= INTEGER */ - 217, /* (185) expr ::= VARIABLE */ - 217, /* (186) expr ::= expr COLLATE ID|STRING */ - 217, /* (187) expr ::= CAST LP expr AS typetoken RP */ - 217, /* (188) expr ::= ID|INDEXED LP distinct exprlist RP */ - 217, /* (189) expr ::= ID|INDEXED LP STAR RP */ - 217, /* (190) expr ::= ID|INDEXED LP distinct exprlist RP filter_over */ - 217, /* (191) expr ::= ID|INDEXED LP STAR RP filter_over */ - 216, /* (192) term ::= CTIME_KW */ - 217, /* (193) expr ::= LP nexprlist COMMA expr RP */ - 217, /* (194) expr ::= expr AND expr */ - 217, /* (195) expr ::= expr OR expr */ - 217, /* (196) expr ::= expr LT|GT|GE|LE expr */ - 217, /* (197) expr ::= expr EQ|NE expr */ - 217, /* (198) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ - 217, /* (199) expr ::= expr PLUS|MINUS expr */ - 217, /* (200) expr ::= expr STAR|SLASH|REM expr */ - 217, /* (201) expr ::= expr CONCAT expr */ - 274, /* (202) likeop ::= NOT LIKE_KW|MATCH */ - 217, /* (203) expr ::= expr likeop expr */ - 217, /* (204) expr ::= expr likeop expr ESCAPE expr */ - 217, /* (205) expr ::= expr ISNULL|NOTNULL */ - 217, /* (206) expr ::= expr NOT NULL */ - 217, /* (207) expr ::= expr IS expr */ - 217, /* (208) expr ::= expr IS NOT expr */ - 217, /* (209) expr ::= expr IS NOT DISTINCT FROM expr */ - 217, /* (210) expr ::= expr IS DISTINCT FROM expr */ - 217, /* (211) expr ::= NOT expr */ - 217, /* (212) expr ::= BITNOT expr */ - 217, /* (213) expr ::= PLUS|MINUS expr */ - 217, /* (214) expr ::= expr PTR expr */ - 275, /* (215) between_op ::= BETWEEN */ - 275, /* (216) between_op ::= NOT BETWEEN */ - 217, /* (217) expr ::= expr between_op expr AND expr */ - 276, /* (218) in_op ::= IN */ - 276, /* (219) in_op ::= NOT IN */ - 217, /* (220) expr ::= expr in_op LP exprlist RP */ - 217, /* (221) expr ::= LP select RP */ - 217, /* (222) expr ::= expr in_op LP select RP */ - 217, /* (223) expr ::= expr in_op nm dbnm paren_exprlist */ - 217, /* (224) expr ::= EXISTS LP select RP */ - 217, /* (225) expr ::= CASE case_operand case_exprlist case_else END */ - 279, /* (226) case_exprlist ::= case_exprlist WHEN expr THEN expr */ - 279, /* (227) case_exprlist ::= WHEN expr THEN expr */ - 280, /* (228) case_else ::= ELSE expr */ - 280, /* (229) case_else ::= */ - 278, /* (230) case_operand ::= expr */ - 278, /* (231) case_operand ::= */ - 261, /* (232) exprlist ::= */ - 253, /* (233) nexprlist ::= nexprlist COMMA expr */ - 253, /* (234) nexprlist ::= expr */ - 277, /* (235) paren_exprlist ::= */ - 277, /* (236) paren_exprlist ::= LP exprlist RP */ - 190, /* (237) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */ - 281, /* (238) uniqueflag ::= UNIQUE */ - 281, /* (239) uniqueflag ::= */ - 221, /* (240) eidlist_opt ::= */ - 221, /* (241) eidlist_opt ::= LP eidlist RP */ - 232, /* (242) eidlist ::= eidlist COMMA nm collate sortorder */ - 232, /* (243) eidlist ::= nm collate sortorder */ - 282, /* (244) collate ::= */ - 282, /* (245) collate ::= COLLATE ID|STRING */ - 190, /* (246) cmd ::= DROP INDEX ifexists fullname */ - 190, /* (247) cmd ::= VACUUM vinto */ - 190, /* (248) cmd ::= VACUUM nm vinto */ - 283, /* (249) vinto ::= INTO expr */ - 283, /* (250) vinto ::= */ - 190, /* (251) cmd ::= PRAGMA nm dbnm */ - 190, /* (252) cmd ::= PRAGMA nm dbnm EQ nmnum */ - 190, /* (253) cmd ::= PRAGMA nm dbnm LP nmnum RP */ - 190, /* (254) cmd ::= PRAGMA nm dbnm EQ minus_num */ - 190, /* (255) cmd ::= PRAGMA nm dbnm LP minus_num RP */ - 211, /* (256) plus_num ::= PLUS INTEGER|FLOAT */ - 212, /* (257) minus_num ::= MINUS INTEGER|FLOAT */ - 190, /* (258) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ - 285, /* (259) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ - 287, /* (260) trigger_time ::= BEFORE|AFTER */ - 287, /* (261) trigger_time ::= INSTEAD OF */ - 287, /* (262) trigger_time ::= */ - 288, /* (263) trigger_event ::= DELETE|INSERT */ - 288, /* (264) trigger_event ::= UPDATE */ - 288, /* (265) trigger_event ::= UPDATE OF idlist */ - 290, /* (266) when_clause ::= */ - 290, /* (267) when_clause ::= WHEN expr */ - 286, /* (268) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ - 286, /* (269) trigger_cmd_list ::= trigger_cmd SEMI */ - 292, /* (270) trnm ::= nm DOT nm */ - 293, /* (271) tridxby ::= INDEXED BY nm */ - 293, /* (272) tridxby ::= NOT INDEXED */ - 291, /* (273) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ - 291, /* (274) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ - 291, /* (275) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ - 291, /* (276) trigger_cmd ::= scanpt select scanpt */ - 217, /* (277) expr ::= RAISE LP IGNORE RP */ - 217, /* (278) expr ::= RAISE LP raisetype COMMA nm RP */ - 236, /* (279) raisetype ::= ROLLBACK */ - 236, /* (280) raisetype ::= ABORT */ - 236, /* (281) raisetype ::= FAIL */ - 190, /* (282) cmd ::= DROP TRIGGER ifexists fullname */ - 190, /* (283) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ - 190, /* (284) cmd ::= DETACH database_kw_opt expr */ - 295, /* (285) key_opt ::= */ - 295, /* (286) key_opt ::= KEY expr */ - 190, /* (287) cmd ::= REINDEX */ - 190, /* (288) cmd ::= REINDEX nm dbnm */ - 190, /* (289) cmd ::= ANALYZE */ - 190, /* (290) cmd ::= ANALYZE nm dbnm */ - 190, /* (291) cmd ::= ALTER TABLE fullname RENAME TO nm */ - 190, /* (292) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ - 190, /* (293) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */ - 296, /* (294) add_column_fullname ::= fullname */ - 190, /* (295) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ - 190, /* (296) cmd ::= create_vtab */ - 190, /* (297) cmd ::= create_vtab LP vtabarglist RP */ - 298, /* (298) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ - 300, /* (299) vtabarg ::= */ - 301, /* (300) vtabargtoken ::= ANY */ - 301, /* (301) vtabargtoken ::= lp anylist RP */ - 302, /* (302) lp ::= LP */ - 266, /* (303) with ::= WITH wqlist */ - 266, /* (304) with ::= WITH RECURSIVE wqlist */ - 305, /* (305) wqas ::= AS */ - 305, /* (306) wqas ::= AS MATERIALIZED */ - 305, /* (307) wqas ::= AS NOT MATERIALIZED */ - 304, /* (308) wqitem ::= nm eidlist_opt wqas LP select RP */ - 241, /* (309) wqlist ::= wqitem */ - 241, /* (310) wqlist ::= wqlist COMMA wqitem */ - 306, /* (311) windowdefn_list ::= windowdefn */ - 306, /* (312) windowdefn_list ::= windowdefn_list COMMA windowdefn */ - 307, /* (313) windowdefn ::= nm AS LP window RP */ - 308, /* (314) window ::= PARTITION BY nexprlist orderby_opt frame_opt */ - 308, /* (315) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ - 308, /* (316) window ::= ORDER BY sortlist frame_opt */ - 308, /* (317) window ::= nm ORDER BY sortlist frame_opt */ - 308, /* (318) window ::= frame_opt */ - 308, /* (319) window ::= nm frame_opt */ - 309, /* (320) frame_opt ::= */ - 309, /* (321) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ - 309, /* (322) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ - 313, /* (323) range_or_rows ::= RANGE|ROWS|GROUPS */ - 315, /* (324) frame_bound_s ::= frame_bound */ - 315, /* (325) frame_bound_s ::= UNBOUNDED PRECEDING */ - 316, /* (326) frame_bound_e ::= frame_bound */ - 316, /* (327) frame_bound_e ::= UNBOUNDED FOLLOWING */ - 314, /* (328) frame_bound ::= expr PRECEDING|FOLLOWING */ - 314, /* (329) frame_bound ::= CURRENT ROW */ - 317, /* (330) frame_exclude_opt ::= */ - 317, /* (331) frame_exclude_opt ::= EXCLUDE frame_exclude */ - 318, /* (332) frame_exclude ::= NO OTHERS */ - 318, /* (333) frame_exclude ::= CURRENT ROW */ - 318, /* (334) frame_exclude ::= GROUP|TIES */ - 251, /* (335) window_clause ::= WINDOW windowdefn_list */ - 273, /* (336) filter_over ::= filter_clause over_clause */ - 273, /* (337) filter_over ::= over_clause */ - 273, /* (338) filter_over ::= filter_clause */ - 312, /* (339) over_clause ::= OVER LP window RP */ - 312, /* (340) over_clause ::= OVER nm */ - 311, /* (341) filter_clause ::= FILTER LP WHERE expr RP */ - 185, /* (342) input ::= cmdlist */ - 186, /* (343) cmdlist ::= cmdlist ecmd */ - 186, /* (344) cmdlist ::= ecmd */ - 187, /* (345) ecmd ::= SEMI */ - 187, /* (346) ecmd ::= cmdx SEMI */ - 187, /* (347) ecmd ::= explain cmdx SEMI */ - 192, /* (348) trans_opt ::= */ - 192, /* (349) trans_opt ::= TRANSACTION */ - 192, /* (350) trans_opt ::= TRANSACTION nm */ - 194, /* (351) savepoint_opt ::= SAVEPOINT */ - 194, /* (352) savepoint_opt ::= */ - 190, /* (353) cmd ::= create_table create_table_args */ - 203, /* (354) table_option_set ::= table_option */ - 201, /* (355) columnlist ::= columnlist COMMA columnname carglist */ - 201, /* (356) columnlist ::= columnname carglist */ - 193, /* (357) nm ::= ID|INDEXED */ - 193, /* (358) nm ::= STRING */ - 193, /* (359) nm ::= JOIN_KW */ - 208, /* (360) typetoken ::= typename */ - 209, /* (361) typename ::= ID|STRING */ - 210, /* (362) signed ::= plus_num */ - 210, /* (363) signed ::= minus_num */ - 207, /* (364) carglist ::= carglist ccons */ - 207, /* (365) carglist ::= */ - 215, /* (366) ccons ::= NULL onconf */ - 215, /* (367) ccons ::= GENERATED ALWAYS AS generated */ - 215, /* (368) ccons ::= AS generated */ - 202, /* (369) conslist_opt ::= COMMA conslist */ - 228, /* (370) conslist ::= conslist tconscomma tcons */ - 228, /* (371) conslist ::= tcons */ - 229, /* (372) tconscomma ::= */ - 233, /* (373) defer_subclause_opt ::= defer_subclause */ - 235, /* (374) resolvetype ::= raisetype */ - 239, /* (375) selectnowith ::= oneselect */ - 240, /* (376) oneselect ::= values */ - 254, /* (377) sclp ::= selcollist COMMA */ - 255, /* (378) as ::= ID|STRING */ - 264, /* (379) indexed_opt ::= indexed_by */ - 272, /* (380) returning ::= */ - 217, /* (381) expr ::= term */ - 274, /* (382) likeop ::= LIKE_KW|MATCH */ - 261, /* (383) exprlist ::= nexprlist */ - 284, /* (384) nmnum ::= plus_num */ - 284, /* (385) nmnum ::= nm */ - 284, /* (386) nmnum ::= ON */ - 284, /* (387) nmnum ::= DELETE */ - 284, /* (388) nmnum ::= DEFAULT */ - 211, /* (389) plus_num ::= INTEGER|FLOAT */ - 289, /* (390) foreach_clause ::= */ - 289, /* (391) foreach_clause ::= FOR EACH ROW */ - 292, /* (392) trnm ::= nm */ - 293, /* (393) tridxby ::= */ - 294, /* (394) database_kw_opt ::= DATABASE */ - 294, /* (395) database_kw_opt ::= */ - 297, /* (396) kwcolumn_opt ::= */ - 297, /* (397) kwcolumn_opt ::= COLUMNKW */ - 299, /* (398) vtabarglist ::= vtabarg */ - 299, /* (399) vtabarglist ::= vtabarglist COMMA vtabarg */ - 300, /* (400) vtabarg ::= vtabarg vtabargtoken */ - 303, /* (401) anylist ::= */ - 303, /* (402) anylist ::= anylist LP anylist RP */ - 303, /* (403) anylist ::= anylist ANY */ - 266, /* (404) with ::= */ + 217, /* (178) expr ::= ID|INDEXED|JOIN_KW */ + 217, /* (179) expr ::= nm DOT nm */ + 217, /* (180) expr ::= nm DOT nm DOT nm */ + 216, /* (181) term ::= NULL|FLOAT|BLOB */ + 216, /* (182) term ::= STRING */ + 216, /* (183) term ::= INTEGER */ + 217, /* (184) expr ::= VARIABLE */ + 217, /* (185) expr ::= expr COLLATE ID|STRING */ + 217, /* (186) expr ::= CAST LP expr AS typetoken RP */ + 217, /* (187) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */ + 217, /* (188) expr ::= ID|INDEXED|JOIN_KW LP STAR RP */ + 217, /* (189) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */ + 217, /* (190) expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */ + 216, /* (191) term ::= CTIME_KW */ + 217, /* (192) expr ::= LP nexprlist COMMA expr RP */ + 217, /* (193) expr ::= expr AND expr */ + 217, /* (194) expr ::= expr OR expr */ + 217, /* (195) expr ::= expr LT|GT|GE|LE expr */ + 217, /* (196) expr ::= expr EQ|NE expr */ + 217, /* (197) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ + 217, /* (198) expr ::= expr PLUS|MINUS expr */ + 217, /* (199) expr ::= expr STAR|SLASH|REM expr */ + 217, /* (200) expr ::= expr CONCAT expr */ + 274, /* (201) likeop ::= NOT LIKE_KW|MATCH */ + 217, /* (202) expr ::= expr likeop expr */ + 217, /* (203) expr ::= expr likeop expr ESCAPE expr */ + 217, /* (204) expr ::= expr ISNULL|NOTNULL */ + 217, /* (205) expr ::= expr NOT NULL */ + 217, /* (206) expr ::= expr IS expr */ + 217, /* (207) expr ::= expr IS NOT expr */ + 217, /* (208) expr ::= expr IS NOT DISTINCT FROM expr */ + 217, /* (209) expr ::= expr IS DISTINCT FROM expr */ + 217, /* (210) expr ::= NOT expr */ + 217, /* (211) expr ::= BITNOT expr */ + 217, /* (212) expr ::= PLUS|MINUS expr */ + 217, /* (213) expr ::= expr PTR expr */ + 275, /* (214) between_op ::= BETWEEN */ + 275, /* (215) between_op ::= NOT BETWEEN */ + 217, /* (216) expr ::= expr between_op expr AND expr */ + 276, /* (217) in_op ::= IN */ + 276, /* (218) in_op ::= NOT IN */ + 217, /* (219) expr ::= expr in_op LP exprlist RP */ + 217, /* (220) expr ::= LP select RP */ + 217, /* (221) expr ::= expr in_op LP select RP */ + 217, /* (222) expr ::= expr in_op nm dbnm paren_exprlist */ + 217, /* (223) expr ::= EXISTS LP select RP */ + 217, /* (224) expr ::= CASE case_operand case_exprlist case_else END */ + 279, /* (225) case_exprlist ::= case_exprlist WHEN expr THEN expr */ + 279, /* (226) case_exprlist ::= WHEN expr THEN expr */ + 280, /* (227) case_else ::= ELSE expr */ + 280, /* (228) case_else ::= */ + 278, /* (229) case_operand ::= */ + 261, /* (230) exprlist ::= */ + 253, /* (231) nexprlist ::= nexprlist COMMA expr */ + 253, /* (232) nexprlist ::= expr */ + 277, /* (233) paren_exprlist ::= */ + 277, /* (234) paren_exprlist ::= LP exprlist RP */ + 190, /* (235) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */ + 281, /* (236) uniqueflag ::= UNIQUE */ + 281, /* (237) uniqueflag ::= */ + 221, /* (238) eidlist_opt ::= */ + 221, /* (239) eidlist_opt ::= LP eidlist RP */ + 232, /* (240) eidlist ::= eidlist COMMA nm collate sortorder */ + 232, /* (241) eidlist ::= nm collate sortorder */ + 282, /* (242) collate ::= */ + 282, /* (243) collate ::= COLLATE ID|STRING */ + 190, /* (244) cmd ::= DROP INDEX ifexists fullname */ + 190, /* (245) cmd ::= VACUUM vinto */ + 190, /* (246) cmd ::= VACUUM nm vinto */ + 283, /* (247) vinto ::= INTO expr */ + 283, /* (248) vinto ::= */ + 190, /* (249) cmd ::= PRAGMA nm dbnm */ + 190, /* (250) cmd ::= PRAGMA nm dbnm EQ nmnum */ + 190, /* (251) cmd ::= PRAGMA nm dbnm LP nmnum RP */ + 190, /* (252) cmd ::= PRAGMA nm dbnm EQ minus_num */ + 190, /* (253) cmd ::= PRAGMA nm dbnm LP minus_num RP */ + 211, /* (254) plus_num ::= PLUS INTEGER|FLOAT */ + 212, /* (255) minus_num ::= MINUS INTEGER|FLOAT */ + 190, /* (256) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ + 285, /* (257) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ + 287, /* (258) trigger_time ::= BEFORE|AFTER */ + 287, /* (259) trigger_time ::= INSTEAD OF */ + 287, /* (260) trigger_time ::= */ + 288, /* (261) trigger_event ::= DELETE|INSERT */ + 288, /* (262) trigger_event ::= UPDATE */ + 288, /* (263) trigger_event ::= UPDATE OF idlist */ + 290, /* (264) when_clause ::= */ + 290, /* (265) when_clause ::= WHEN expr */ + 286, /* (266) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ + 286, /* (267) trigger_cmd_list ::= trigger_cmd SEMI */ + 292, /* (268) trnm ::= nm DOT nm */ + 293, /* (269) tridxby ::= INDEXED BY nm */ + 293, /* (270) tridxby ::= NOT INDEXED */ + 291, /* (271) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ + 291, /* (272) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ + 291, /* (273) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ + 291, /* (274) trigger_cmd ::= scanpt select scanpt */ + 217, /* (275) expr ::= RAISE LP IGNORE RP */ + 217, /* (276) expr ::= RAISE LP raisetype COMMA nm RP */ + 236, /* (277) raisetype ::= ROLLBACK */ + 236, /* (278) raisetype ::= ABORT */ + 236, /* (279) raisetype ::= FAIL */ + 190, /* (280) cmd ::= DROP TRIGGER ifexists fullname */ + 190, /* (281) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ + 190, /* (282) cmd ::= DETACH database_kw_opt expr */ + 295, /* (283) key_opt ::= */ + 295, /* (284) key_opt ::= KEY expr */ + 190, /* (285) cmd ::= REINDEX */ + 190, /* (286) cmd ::= REINDEX nm dbnm */ + 190, /* (287) cmd ::= ANALYZE */ + 190, /* (288) cmd ::= ANALYZE nm dbnm */ + 190, /* (289) cmd ::= ALTER TABLE fullname RENAME TO nm */ + 190, /* (290) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ + 190, /* (291) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */ + 296, /* (292) add_column_fullname ::= fullname */ + 190, /* (293) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ + 190, /* (294) cmd ::= create_vtab */ + 190, /* (295) cmd ::= create_vtab LP vtabarglist RP */ + 298, /* (296) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ + 300, /* (297) vtabarg ::= */ + 301, /* (298) vtabargtoken ::= ANY */ + 301, /* (299) vtabargtoken ::= lp anylist RP */ + 302, /* (300) lp ::= LP */ + 266, /* (301) with ::= WITH wqlist */ + 266, /* (302) with ::= WITH RECURSIVE wqlist */ + 305, /* (303) wqas ::= AS */ + 305, /* (304) wqas ::= AS MATERIALIZED */ + 305, /* (305) wqas ::= AS NOT MATERIALIZED */ + 304, /* (306) wqitem ::= nm eidlist_opt wqas LP select RP */ + 241, /* (307) wqlist ::= wqitem */ + 241, /* (308) wqlist ::= wqlist COMMA wqitem */ + 306, /* (309) windowdefn_list ::= windowdefn_list COMMA windowdefn */ + 307, /* (310) windowdefn ::= nm AS LP window RP */ + 308, /* (311) window ::= PARTITION BY nexprlist orderby_opt frame_opt */ + 308, /* (312) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ + 308, /* (313) window ::= ORDER BY sortlist frame_opt */ + 308, /* (314) window ::= nm ORDER BY sortlist frame_opt */ + 308, /* (315) window ::= nm frame_opt */ + 309, /* (316) frame_opt ::= */ + 309, /* (317) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ + 309, /* (318) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ + 313, /* (319) range_or_rows ::= RANGE|ROWS|GROUPS */ + 315, /* (320) frame_bound_s ::= frame_bound */ + 315, /* (321) frame_bound_s ::= UNBOUNDED PRECEDING */ + 316, /* (322) frame_bound_e ::= frame_bound */ + 316, /* (323) frame_bound_e ::= UNBOUNDED FOLLOWING */ + 314, /* (324) frame_bound ::= expr PRECEDING|FOLLOWING */ + 314, /* (325) frame_bound ::= CURRENT ROW */ + 317, /* (326) frame_exclude_opt ::= */ + 317, /* (327) frame_exclude_opt ::= EXCLUDE frame_exclude */ + 318, /* (328) frame_exclude ::= NO OTHERS */ + 318, /* (329) frame_exclude ::= CURRENT ROW */ + 318, /* (330) frame_exclude ::= GROUP|TIES */ + 251, /* (331) window_clause ::= WINDOW windowdefn_list */ + 273, /* (332) filter_over ::= filter_clause over_clause */ + 273, /* (333) filter_over ::= over_clause */ + 273, /* (334) filter_over ::= filter_clause */ + 312, /* (335) over_clause ::= OVER LP window RP */ + 312, /* (336) over_clause ::= OVER nm */ + 311, /* (337) filter_clause ::= FILTER LP WHERE expr RP */ + 185, /* (338) input ::= cmdlist */ + 186, /* (339) cmdlist ::= cmdlist ecmd */ + 186, /* (340) cmdlist ::= ecmd */ + 187, /* (341) ecmd ::= SEMI */ + 187, /* (342) ecmd ::= cmdx SEMI */ + 187, /* (343) ecmd ::= explain cmdx SEMI */ + 192, /* (344) trans_opt ::= */ + 192, /* (345) trans_opt ::= TRANSACTION */ + 192, /* (346) trans_opt ::= TRANSACTION nm */ + 194, /* (347) savepoint_opt ::= SAVEPOINT */ + 194, /* (348) savepoint_opt ::= */ + 190, /* (349) cmd ::= create_table create_table_args */ + 203, /* (350) table_option_set ::= table_option */ + 201, /* (351) columnlist ::= columnlist COMMA columnname carglist */ + 201, /* (352) columnlist ::= columnname carglist */ + 193, /* (353) nm ::= ID|INDEXED|JOIN_KW */ + 193, /* (354) nm ::= STRING */ + 208, /* (355) typetoken ::= typename */ + 209, /* (356) typename ::= ID|STRING */ + 210, /* (357) signed ::= plus_num */ + 210, /* (358) signed ::= minus_num */ + 207, /* (359) carglist ::= carglist ccons */ + 207, /* (360) carglist ::= */ + 215, /* (361) ccons ::= NULL onconf */ + 215, /* (362) ccons ::= GENERATED ALWAYS AS generated */ + 215, /* (363) ccons ::= AS generated */ + 202, /* (364) conslist_opt ::= COMMA conslist */ + 228, /* (365) conslist ::= conslist tconscomma tcons */ + 228, /* (366) conslist ::= tcons */ + 229, /* (367) tconscomma ::= */ + 233, /* (368) defer_subclause_opt ::= defer_subclause */ + 235, /* (369) resolvetype ::= raisetype */ + 239, /* (370) selectnowith ::= oneselect */ + 240, /* (371) oneselect ::= values */ + 254, /* (372) sclp ::= selcollist COMMA */ + 255, /* (373) as ::= ID|STRING */ + 264, /* (374) indexed_opt ::= indexed_by */ + 272, /* (375) returning ::= */ + 217, /* (376) expr ::= term */ + 274, /* (377) likeop ::= LIKE_KW|MATCH */ + 278, /* (378) case_operand ::= expr */ + 261, /* (379) exprlist ::= nexprlist */ + 284, /* (380) nmnum ::= plus_num */ + 284, /* (381) nmnum ::= nm */ + 284, /* (382) nmnum ::= ON */ + 284, /* (383) nmnum ::= DELETE */ + 284, /* (384) nmnum ::= DEFAULT */ + 211, /* (385) plus_num ::= INTEGER|FLOAT */ + 289, /* (386) foreach_clause ::= */ + 289, /* (387) foreach_clause ::= FOR EACH ROW */ + 292, /* (388) trnm ::= nm */ + 293, /* (389) tridxby ::= */ + 294, /* (390) database_kw_opt ::= DATABASE */ + 294, /* (391) database_kw_opt ::= */ + 297, /* (392) kwcolumn_opt ::= */ + 297, /* (393) kwcolumn_opt ::= COLUMNKW */ + 299, /* (394) vtabarglist ::= vtabarg */ + 299, /* (395) vtabarglist ::= vtabarglist COMMA vtabarg */ + 300, /* (396) vtabarg ::= vtabarg vtabargtoken */ + 303, /* (397) anylist ::= */ + 303, /* (398) anylist ::= anylist LP anylist RP */ + 303, /* (399) anylist ::= anylist ANY */ + 266, /* (400) with ::= */ + 306, /* (401) windowdefn_list ::= windowdefn */ + 308, /* (402) window ::= frame_opt */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -168632,233 +172536,231 @@ static const signed char yyRuleInfoNRhs[] = { -3, /* (175) idlist ::= idlist COMMA nm */ -1, /* (176) idlist ::= nm */ -3, /* (177) expr ::= LP expr RP */ - -1, /* (178) expr ::= ID|INDEXED */ - -1, /* (179) expr ::= JOIN_KW */ - -3, /* (180) expr ::= nm DOT nm */ - -5, /* (181) expr ::= nm DOT nm DOT nm */ - -1, /* (182) term ::= NULL|FLOAT|BLOB */ - -1, /* (183) term ::= STRING */ - -1, /* (184) term ::= INTEGER */ - -1, /* (185) expr ::= VARIABLE */ - -3, /* (186) expr ::= expr COLLATE ID|STRING */ - -6, /* (187) expr ::= CAST LP expr AS typetoken RP */ - -5, /* (188) expr ::= ID|INDEXED LP distinct exprlist RP */ - -4, /* (189) expr ::= ID|INDEXED LP STAR RP */ - -6, /* (190) expr ::= ID|INDEXED LP distinct exprlist RP filter_over */ - -5, /* (191) expr ::= ID|INDEXED LP STAR RP filter_over */ - -1, /* (192) term ::= CTIME_KW */ - -5, /* (193) expr ::= LP nexprlist COMMA expr RP */ - -3, /* (194) expr ::= expr AND expr */ - -3, /* (195) expr ::= expr OR expr */ - -3, /* (196) expr ::= expr LT|GT|GE|LE expr */ - -3, /* (197) expr ::= expr EQ|NE expr */ - -3, /* (198) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ - -3, /* (199) expr ::= expr PLUS|MINUS expr */ - -3, /* (200) expr ::= expr STAR|SLASH|REM expr */ - -3, /* (201) expr ::= expr CONCAT expr */ - -2, /* (202) likeop ::= NOT LIKE_KW|MATCH */ - -3, /* (203) expr ::= expr likeop expr */ - -5, /* (204) expr ::= expr likeop expr ESCAPE expr */ - -2, /* (205) expr ::= expr ISNULL|NOTNULL */ - -3, /* (206) expr ::= expr NOT NULL */ - -3, /* (207) expr ::= expr IS expr */ - -4, /* (208) expr ::= expr IS NOT expr */ - -6, /* (209) expr ::= expr IS NOT DISTINCT FROM expr */ - -5, /* (210) expr ::= expr IS DISTINCT FROM expr */ - -2, /* (211) expr ::= NOT expr */ - -2, /* (212) expr ::= BITNOT expr */ - -2, /* (213) expr ::= PLUS|MINUS expr */ - -3, /* (214) expr ::= expr PTR expr */ - -1, /* (215) between_op ::= BETWEEN */ - -2, /* (216) between_op ::= NOT BETWEEN */ - -5, /* (217) expr ::= expr between_op expr AND expr */ - -1, /* (218) in_op ::= IN */ - -2, /* (219) in_op ::= NOT IN */ - -5, /* (220) expr ::= expr in_op LP exprlist RP */ - -3, /* (221) expr ::= LP select RP */ - -5, /* (222) expr ::= expr in_op LP select RP */ - -5, /* (223) expr ::= expr in_op nm dbnm paren_exprlist */ - -4, /* (224) expr ::= EXISTS LP select RP */ - -5, /* (225) expr ::= CASE case_operand case_exprlist case_else END */ - -5, /* (226) case_exprlist ::= case_exprlist WHEN expr THEN expr */ - -4, /* (227) case_exprlist ::= WHEN expr THEN expr */ - -2, /* (228) case_else ::= ELSE expr */ - 0, /* (229) case_else ::= */ - -1, /* (230) case_operand ::= expr */ - 0, /* (231) case_operand ::= */ - 0, /* (232) exprlist ::= */ - -3, /* (233) nexprlist ::= nexprlist COMMA expr */ - -1, /* (234) nexprlist ::= expr */ - 0, /* (235) paren_exprlist ::= */ - -3, /* (236) paren_exprlist ::= LP exprlist RP */ - -12, /* (237) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */ - -1, /* (238) uniqueflag ::= UNIQUE */ - 0, /* (239) uniqueflag ::= */ - 0, /* (240) eidlist_opt ::= */ - -3, /* (241) eidlist_opt ::= LP eidlist RP */ - -5, /* (242) eidlist ::= eidlist COMMA nm collate sortorder */ - -3, /* (243) eidlist ::= nm collate sortorder */ - 0, /* (244) collate ::= */ - -2, /* (245) collate ::= COLLATE ID|STRING */ - -4, /* (246) cmd ::= DROP INDEX ifexists fullname */ - -2, /* (247) cmd ::= VACUUM vinto */ - -3, /* (248) cmd ::= VACUUM nm vinto */ - -2, /* (249) vinto ::= INTO expr */ - 0, /* (250) vinto ::= */ - -3, /* (251) cmd ::= PRAGMA nm dbnm */ - -5, /* (252) cmd ::= PRAGMA nm dbnm EQ nmnum */ - -6, /* (253) cmd ::= PRAGMA nm dbnm LP nmnum RP */ - -5, /* (254) cmd ::= PRAGMA nm dbnm EQ minus_num */ - -6, /* (255) cmd ::= PRAGMA nm dbnm LP minus_num RP */ - -2, /* (256) plus_num ::= PLUS INTEGER|FLOAT */ - -2, /* (257) minus_num ::= MINUS INTEGER|FLOAT */ - -5, /* (258) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ - -11, /* (259) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ - -1, /* (260) trigger_time ::= BEFORE|AFTER */ - -2, /* (261) trigger_time ::= INSTEAD OF */ - 0, /* (262) trigger_time ::= */ - -1, /* (263) trigger_event ::= DELETE|INSERT */ - -1, /* (264) trigger_event ::= UPDATE */ - -3, /* (265) trigger_event ::= UPDATE OF idlist */ - 0, /* (266) when_clause ::= */ - -2, /* (267) when_clause ::= WHEN expr */ - -3, /* (268) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ - -2, /* (269) trigger_cmd_list ::= trigger_cmd SEMI */ - -3, /* (270) trnm ::= nm DOT nm */ - -3, /* (271) tridxby ::= INDEXED BY nm */ - -2, /* (272) tridxby ::= NOT INDEXED */ - -9, /* (273) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ - -8, /* (274) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ - -6, /* (275) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ - -3, /* (276) trigger_cmd ::= scanpt select scanpt */ - -4, /* (277) expr ::= RAISE LP IGNORE RP */ - -6, /* (278) expr ::= RAISE LP raisetype COMMA nm RP */ - -1, /* (279) raisetype ::= ROLLBACK */ - -1, /* (280) raisetype ::= ABORT */ - -1, /* (281) raisetype ::= FAIL */ - -4, /* (282) cmd ::= DROP TRIGGER ifexists fullname */ - -6, /* (283) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ - -3, /* (284) cmd ::= DETACH database_kw_opt expr */ - 0, /* (285) key_opt ::= */ - -2, /* (286) key_opt ::= KEY expr */ - -1, /* (287) cmd ::= REINDEX */ - -3, /* (288) cmd ::= REINDEX nm dbnm */ - -1, /* (289) cmd ::= ANALYZE */ - -3, /* (290) cmd ::= ANALYZE nm dbnm */ - -6, /* (291) cmd ::= ALTER TABLE fullname RENAME TO nm */ - -7, /* (292) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ - -6, /* (293) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */ - -1, /* (294) add_column_fullname ::= fullname */ - -8, /* (295) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ - -1, /* (296) cmd ::= create_vtab */ - -4, /* (297) cmd ::= create_vtab LP vtabarglist RP */ - -8, /* (298) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ - 0, /* (299) vtabarg ::= */ - -1, /* (300) vtabargtoken ::= ANY */ - -3, /* (301) vtabargtoken ::= lp anylist RP */ - -1, /* (302) lp ::= LP */ - -2, /* (303) with ::= WITH wqlist */ - -3, /* (304) with ::= WITH RECURSIVE wqlist */ - -1, /* (305) wqas ::= AS */ - -2, /* (306) wqas ::= AS MATERIALIZED */ - -3, /* (307) wqas ::= AS NOT MATERIALIZED */ - -6, /* (308) wqitem ::= nm eidlist_opt wqas LP select RP */ - -1, /* (309) wqlist ::= wqitem */ - -3, /* (310) wqlist ::= wqlist COMMA wqitem */ - -1, /* (311) windowdefn_list ::= windowdefn */ - -3, /* (312) windowdefn_list ::= windowdefn_list COMMA windowdefn */ - -5, /* (313) windowdefn ::= nm AS LP window RP */ - -5, /* (314) window ::= PARTITION BY nexprlist orderby_opt frame_opt */ - -6, /* (315) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ - -4, /* (316) window ::= ORDER BY sortlist frame_opt */ - -5, /* (317) window ::= nm ORDER BY sortlist frame_opt */ - -1, /* (318) window ::= frame_opt */ - -2, /* (319) window ::= nm frame_opt */ - 0, /* (320) frame_opt ::= */ - -3, /* (321) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ - -6, /* (322) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ - -1, /* (323) range_or_rows ::= RANGE|ROWS|GROUPS */ - -1, /* (324) frame_bound_s ::= frame_bound */ - -2, /* (325) frame_bound_s ::= UNBOUNDED PRECEDING */ - -1, /* (326) frame_bound_e ::= frame_bound */ - -2, /* (327) frame_bound_e ::= UNBOUNDED FOLLOWING */ - -2, /* (328) frame_bound ::= expr PRECEDING|FOLLOWING */ - -2, /* (329) frame_bound ::= CURRENT ROW */ - 0, /* (330) frame_exclude_opt ::= */ - -2, /* (331) frame_exclude_opt ::= EXCLUDE frame_exclude */ - -2, /* (332) frame_exclude ::= NO OTHERS */ - -2, /* (333) frame_exclude ::= CURRENT ROW */ - -1, /* (334) frame_exclude ::= GROUP|TIES */ - -2, /* (335) window_clause ::= WINDOW windowdefn_list */ - -2, /* (336) filter_over ::= filter_clause over_clause */ - -1, /* (337) filter_over ::= over_clause */ - -1, /* (338) filter_over ::= filter_clause */ - -4, /* (339) over_clause ::= OVER LP window RP */ - -2, /* (340) over_clause ::= OVER nm */ - -5, /* (341) filter_clause ::= FILTER LP WHERE expr RP */ - -1, /* (342) input ::= cmdlist */ - -2, /* (343) cmdlist ::= cmdlist ecmd */ - -1, /* (344) cmdlist ::= ecmd */ - -1, /* (345) ecmd ::= SEMI */ - -2, /* (346) ecmd ::= cmdx SEMI */ - -3, /* (347) ecmd ::= explain cmdx SEMI */ - 0, /* (348) trans_opt ::= */ - -1, /* (349) trans_opt ::= TRANSACTION */ - -2, /* (350) trans_opt ::= TRANSACTION nm */ - -1, /* (351) savepoint_opt ::= SAVEPOINT */ - 0, /* (352) savepoint_opt ::= */ - -2, /* (353) cmd ::= create_table create_table_args */ - -1, /* (354) table_option_set ::= table_option */ - -4, /* (355) columnlist ::= columnlist COMMA columnname carglist */ - -2, /* (356) columnlist ::= columnname carglist */ - -1, /* (357) nm ::= ID|INDEXED */ - -1, /* (358) nm ::= STRING */ - -1, /* (359) nm ::= JOIN_KW */ - -1, /* (360) typetoken ::= typename */ - -1, /* (361) typename ::= ID|STRING */ - -1, /* (362) signed ::= plus_num */ - -1, /* (363) signed ::= minus_num */ - -2, /* (364) carglist ::= carglist ccons */ - 0, /* (365) carglist ::= */ - -2, /* (366) ccons ::= NULL onconf */ - -4, /* (367) ccons ::= GENERATED ALWAYS AS generated */ - -2, /* (368) ccons ::= AS generated */ - -2, /* (369) conslist_opt ::= COMMA conslist */ - -3, /* (370) conslist ::= conslist tconscomma tcons */ - -1, /* (371) conslist ::= tcons */ - 0, /* (372) tconscomma ::= */ - -1, /* (373) defer_subclause_opt ::= defer_subclause */ - -1, /* (374) resolvetype ::= raisetype */ - -1, /* (375) selectnowith ::= oneselect */ - -1, /* (376) oneselect ::= values */ - -2, /* (377) sclp ::= selcollist COMMA */ - -1, /* (378) as ::= ID|STRING */ - -1, /* (379) indexed_opt ::= indexed_by */ - 0, /* (380) returning ::= */ - -1, /* (381) expr ::= term */ - -1, /* (382) likeop ::= LIKE_KW|MATCH */ - -1, /* (383) exprlist ::= nexprlist */ - -1, /* (384) nmnum ::= plus_num */ - -1, /* (385) nmnum ::= nm */ - -1, /* (386) nmnum ::= ON */ - -1, /* (387) nmnum ::= DELETE */ - -1, /* (388) nmnum ::= DEFAULT */ - -1, /* (389) plus_num ::= INTEGER|FLOAT */ - 0, /* (390) foreach_clause ::= */ - -3, /* (391) foreach_clause ::= FOR EACH ROW */ - -1, /* (392) trnm ::= nm */ - 0, /* (393) tridxby ::= */ - -1, /* (394) database_kw_opt ::= DATABASE */ - 0, /* (395) database_kw_opt ::= */ - 0, /* (396) kwcolumn_opt ::= */ - -1, /* (397) kwcolumn_opt ::= COLUMNKW */ - -1, /* (398) vtabarglist ::= vtabarg */ - -3, /* (399) vtabarglist ::= vtabarglist COMMA vtabarg */ - -2, /* (400) vtabarg ::= vtabarg vtabargtoken */ - 0, /* (401) anylist ::= */ - -4, /* (402) anylist ::= anylist LP anylist RP */ - -2, /* (403) anylist ::= anylist ANY */ - 0, /* (404) with ::= */ + -1, /* (178) expr ::= ID|INDEXED|JOIN_KW */ + -3, /* (179) expr ::= nm DOT nm */ + -5, /* (180) expr ::= nm DOT nm DOT nm */ + -1, /* (181) term ::= NULL|FLOAT|BLOB */ + -1, /* (182) term ::= STRING */ + -1, /* (183) term ::= INTEGER */ + -1, /* (184) expr ::= VARIABLE */ + -3, /* (185) expr ::= expr COLLATE ID|STRING */ + -6, /* (186) expr ::= CAST LP expr AS typetoken RP */ + -5, /* (187) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */ + -4, /* (188) expr ::= ID|INDEXED|JOIN_KW LP STAR RP */ + -6, /* (189) expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */ + -5, /* (190) expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */ + -1, /* (191) term ::= CTIME_KW */ + -5, /* (192) expr ::= LP nexprlist COMMA expr RP */ + -3, /* (193) expr ::= expr AND expr */ + -3, /* (194) expr ::= expr OR expr */ + -3, /* (195) expr ::= expr LT|GT|GE|LE expr */ + -3, /* (196) expr ::= expr EQ|NE expr */ + -3, /* (197) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ + -3, /* (198) expr ::= expr PLUS|MINUS expr */ + -3, /* (199) expr ::= expr STAR|SLASH|REM expr */ + -3, /* (200) expr ::= expr CONCAT expr */ + -2, /* (201) likeop ::= NOT LIKE_KW|MATCH */ + -3, /* (202) expr ::= expr likeop expr */ + -5, /* (203) expr ::= expr likeop expr ESCAPE expr */ + -2, /* (204) expr ::= expr ISNULL|NOTNULL */ + -3, /* (205) expr ::= expr NOT NULL */ + -3, /* (206) expr ::= expr IS expr */ + -4, /* (207) expr ::= expr IS NOT expr */ + -6, /* (208) expr ::= expr IS NOT DISTINCT FROM expr */ + -5, /* (209) expr ::= expr IS DISTINCT FROM expr */ + -2, /* (210) expr ::= NOT expr */ + -2, /* (211) expr ::= BITNOT expr */ + -2, /* (212) expr ::= PLUS|MINUS expr */ + -3, /* (213) expr ::= expr PTR expr */ + -1, /* (214) between_op ::= BETWEEN */ + -2, /* (215) between_op ::= NOT BETWEEN */ + -5, /* (216) expr ::= expr between_op expr AND expr */ + -1, /* (217) in_op ::= IN */ + -2, /* (218) in_op ::= NOT IN */ + -5, /* (219) expr ::= expr in_op LP exprlist RP */ + -3, /* (220) expr ::= LP select RP */ + -5, /* (221) expr ::= expr in_op LP select RP */ + -5, /* (222) expr ::= expr in_op nm dbnm paren_exprlist */ + -4, /* (223) expr ::= EXISTS LP select RP */ + -5, /* (224) expr ::= CASE case_operand case_exprlist case_else END */ + -5, /* (225) case_exprlist ::= case_exprlist WHEN expr THEN expr */ + -4, /* (226) case_exprlist ::= WHEN expr THEN expr */ + -2, /* (227) case_else ::= ELSE expr */ + 0, /* (228) case_else ::= */ + 0, /* (229) case_operand ::= */ + 0, /* (230) exprlist ::= */ + -3, /* (231) nexprlist ::= nexprlist COMMA expr */ + -1, /* (232) nexprlist ::= expr */ + 0, /* (233) paren_exprlist ::= */ + -3, /* (234) paren_exprlist ::= LP exprlist RP */ + -12, /* (235) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */ + -1, /* (236) uniqueflag ::= UNIQUE */ + 0, /* (237) uniqueflag ::= */ + 0, /* (238) eidlist_opt ::= */ + -3, /* (239) eidlist_opt ::= LP eidlist RP */ + -5, /* (240) eidlist ::= eidlist COMMA nm collate sortorder */ + -3, /* (241) eidlist ::= nm collate sortorder */ + 0, /* (242) collate ::= */ + -2, /* (243) collate ::= COLLATE ID|STRING */ + -4, /* (244) cmd ::= DROP INDEX ifexists fullname */ + -2, /* (245) cmd ::= VACUUM vinto */ + -3, /* (246) cmd ::= VACUUM nm vinto */ + -2, /* (247) vinto ::= INTO expr */ + 0, /* (248) vinto ::= */ + -3, /* (249) cmd ::= PRAGMA nm dbnm */ + -5, /* (250) cmd ::= PRAGMA nm dbnm EQ nmnum */ + -6, /* (251) cmd ::= PRAGMA nm dbnm LP nmnum RP */ + -5, /* (252) cmd ::= PRAGMA nm dbnm EQ minus_num */ + -6, /* (253) cmd ::= PRAGMA nm dbnm LP minus_num RP */ + -2, /* (254) plus_num ::= PLUS INTEGER|FLOAT */ + -2, /* (255) minus_num ::= MINUS INTEGER|FLOAT */ + -5, /* (256) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ + -11, /* (257) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ + -1, /* (258) trigger_time ::= BEFORE|AFTER */ + -2, /* (259) trigger_time ::= INSTEAD OF */ + 0, /* (260) trigger_time ::= */ + -1, /* (261) trigger_event ::= DELETE|INSERT */ + -1, /* (262) trigger_event ::= UPDATE */ + -3, /* (263) trigger_event ::= UPDATE OF idlist */ + 0, /* (264) when_clause ::= */ + -2, /* (265) when_clause ::= WHEN expr */ + -3, /* (266) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ + -2, /* (267) trigger_cmd_list ::= trigger_cmd SEMI */ + -3, /* (268) trnm ::= nm DOT nm */ + -3, /* (269) tridxby ::= INDEXED BY nm */ + -2, /* (270) tridxby ::= NOT INDEXED */ + -9, /* (271) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ + -8, /* (272) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ + -6, /* (273) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ + -3, /* (274) trigger_cmd ::= scanpt select scanpt */ + -4, /* (275) expr ::= RAISE LP IGNORE RP */ + -6, /* (276) expr ::= RAISE LP raisetype COMMA nm RP */ + -1, /* (277) raisetype ::= ROLLBACK */ + -1, /* (278) raisetype ::= ABORT */ + -1, /* (279) raisetype ::= FAIL */ + -4, /* (280) cmd ::= DROP TRIGGER ifexists fullname */ + -6, /* (281) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ + -3, /* (282) cmd ::= DETACH database_kw_opt expr */ + 0, /* (283) key_opt ::= */ + -2, /* (284) key_opt ::= KEY expr */ + -1, /* (285) cmd ::= REINDEX */ + -3, /* (286) cmd ::= REINDEX nm dbnm */ + -1, /* (287) cmd ::= ANALYZE */ + -3, /* (288) cmd ::= ANALYZE nm dbnm */ + -6, /* (289) cmd ::= ALTER TABLE fullname RENAME TO nm */ + -7, /* (290) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ + -6, /* (291) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */ + -1, /* (292) add_column_fullname ::= fullname */ + -8, /* (293) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ + -1, /* (294) cmd ::= create_vtab */ + -4, /* (295) cmd ::= create_vtab LP vtabarglist RP */ + -8, /* (296) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ + 0, /* (297) vtabarg ::= */ + -1, /* (298) vtabargtoken ::= ANY */ + -3, /* (299) vtabargtoken ::= lp anylist RP */ + -1, /* (300) lp ::= LP */ + -2, /* (301) with ::= WITH wqlist */ + -3, /* (302) with ::= WITH RECURSIVE wqlist */ + -1, /* (303) wqas ::= AS */ + -2, /* (304) wqas ::= AS MATERIALIZED */ + -3, /* (305) wqas ::= AS NOT MATERIALIZED */ + -6, /* (306) wqitem ::= nm eidlist_opt wqas LP select RP */ + -1, /* (307) wqlist ::= wqitem */ + -3, /* (308) wqlist ::= wqlist COMMA wqitem */ + -3, /* (309) windowdefn_list ::= windowdefn_list COMMA windowdefn */ + -5, /* (310) windowdefn ::= nm AS LP window RP */ + -5, /* (311) window ::= PARTITION BY nexprlist orderby_opt frame_opt */ + -6, /* (312) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ + -4, /* (313) window ::= ORDER BY sortlist frame_opt */ + -5, /* (314) window ::= nm ORDER BY sortlist frame_opt */ + -2, /* (315) window ::= nm frame_opt */ + 0, /* (316) frame_opt ::= */ + -3, /* (317) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ + -6, /* (318) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ + -1, /* (319) range_or_rows ::= RANGE|ROWS|GROUPS */ + -1, /* (320) frame_bound_s ::= frame_bound */ + -2, /* (321) frame_bound_s ::= UNBOUNDED PRECEDING */ + -1, /* (322) frame_bound_e ::= frame_bound */ + -2, /* (323) frame_bound_e ::= UNBOUNDED FOLLOWING */ + -2, /* (324) frame_bound ::= expr PRECEDING|FOLLOWING */ + -2, /* (325) frame_bound ::= CURRENT ROW */ + 0, /* (326) frame_exclude_opt ::= */ + -2, /* (327) frame_exclude_opt ::= EXCLUDE frame_exclude */ + -2, /* (328) frame_exclude ::= NO OTHERS */ + -2, /* (329) frame_exclude ::= CURRENT ROW */ + -1, /* (330) frame_exclude ::= GROUP|TIES */ + -2, /* (331) window_clause ::= WINDOW windowdefn_list */ + -2, /* (332) filter_over ::= filter_clause over_clause */ + -1, /* (333) filter_over ::= over_clause */ + -1, /* (334) filter_over ::= filter_clause */ + -4, /* (335) over_clause ::= OVER LP window RP */ + -2, /* (336) over_clause ::= OVER nm */ + -5, /* (337) filter_clause ::= FILTER LP WHERE expr RP */ + -1, /* (338) input ::= cmdlist */ + -2, /* (339) cmdlist ::= cmdlist ecmd */ + -1, /* (340) cmdlist ::= ecmd */ + -1, /* (341) ecmd ::= SEMI */ + -2, /* (342) ecmd ::= cmdx SEMI */ + -3, /* (343) ecmd ::= explain cmdx SEMI */ + 0, /* (344) trans_opt ::= */ + -1, /* (345) trans_opt ::= TRANSACTION */ + -2, /* (346) trans_opt ::= TRANSACTION nm */ + -1, /* (347) savepoint_opt ::= SAVEPOINT */ + 0, /* (348) savepoint_opt ::= */ + -2, /* (349) cmd ::= create_table create_table_args */ + -1, /* (350) table_option_set ::= table_option */ + -4, /* (351) columnlist ::= columnlist COMMA columnname carglist */ + -2, /* (352) columnlist ::= columnname carglist */ + -1, /* (353) nm ::= ID|INDEXED|JOIN_KW */ + -1, /* (354) nm ::= STRING */ + -1, /* (355) typetoken ::= typename */ + -1, /* (356) typename ::= ID|STRING */ + -1, /* (357) signed ::= plus_num */ + -1, /* (358) signed ::= minus_num */ + -2, /* (359) carglist ::= carglist ccons */ + 0, /* (360) carglist ::= */ + -2, /* (361) ccons ::= NULL onconf */ + -4, /* (362) ccons ::= GENERATED ALWAYS AS generated */ + -2, /* (363) ccons ::= AS generated */ + -2, /* (364) conslist_opt ::= COMMA conslist */ + -3, /* (365) conslist ::= conslist tconscomma tcons */ + -1, /* (366) conslist ::= tcons */ + 0, /* (367) tconscomma ::= */ + -1, /* (368) defer_subclause_opt ::= defer_subclause */ + -1, /* (369) resolvetype ::= raisetype */ + -1, /* (370) selectnowith ::= oneselect */ + -1, /* (371) oneselect ::= values */ + -2, /* (372) sclp ::= selcollist COMMA */ + -1, /* (373) as ::= ID|STRING */ + -1, /* (374) indexed_opt ::= indexed_by */ + 0, /* (375) returning ::= */ + -1, /* (376) expr ::= term */ + -1, /* (377) likeop ::= LIKE_KW|MATCH */ + -1, /* (378) case_operand ::= expr */ + -1, /* (379) exprlist ::= nexprlist */ + -1, /* (380) nmnum ::= plus_num */ + -1, /* (381) nmnum ::= nm */ + -1, /* (382) nmnum ::= ON */ + -1, /* (383) nmnum ::= DELETE */ + -1, /* (384) nmnum ::= DEFAULT */ + -1, /* (385) plus_num ::= INTEGER|FLOAT */ + 0, /* (386) foreach_clause ::= */ + -3, /* (387) foreach_clause ::= FOR EACH ROW */ + -1, /* (388) trnm ::= nm */ + 0, /* (389) tridxby ::= */ + -1, /* (390) database_kw_opt ::= DATABASE */ + 0, /* (391) database_kw_opt ::= */ + 0, /* (392) kwcolumn_opt ::= */ + -1, /* (393) kwcolumn_opt ::= COLUMNKW */ + -1, /* (394) vtabarglist ::= vtabarg */ + -3, /* (395) vtabarglist ::= vtabarglist COMMA vtabarg */ + -2, /* (396) vtabarg ::= vtabarg vtabargtoken */ + 0, /* (397) anylist ::= */ + -4, /* (398) anylist ::= anylist LP anylist RP */ + -2, /* (399) anylist ::= anylist ANY */ + 0, /* (400) with ::= */ + -1, /* (401) windowdefn_list ::= windowdefn */ + -1, /* (402) window ::= frame_opt */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -168901,10 +172803,10 @@ static YYACTIONTYPE yy_reduce( /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* explain ::= EXPLAIN */ -{ pParse->explain = 1; } +{ if( pParse->pReprepare==0 ) pParse->explain = 1; } break; case 1: /* explain ::= EXPLAIN QUERY PLAN */ -{ pParse->explain = 2; } +{ if( pParse->pReprepare==0 ) pParse->explain = 2; } break; case 2: /* cmdx ::= cmd */ { sqlite3FinishCoding(pParse); } @@ -168918,7 +172820,7 @@ static YYACTIONTYPE yy_reduce( case 5: /* transtype ::= DEFERRED */ case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6); case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7); - case 323: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==323); + case 319: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==319); {yymsp[0].minor.yy394 = yymsp[0].major; /*A-overwrites-X*/} break; case 8: /* cmd ::= COMMIT|END trans_opt */ @@ -168955,7 +172857,7 @@ static YYACTIONTYPE yy_reduce( case 72: /* defer_subclause_opt ::= */ yytestcase(yyruleno==72); case 81: /* ifexists ::= */ yytestcase(yyruleno==81); case 98: /* distinct ::= */ yytestcase(yyruleno==98); - case 244: /* collate ::= */ yytestcase(yyruleno==244); + case 242: /* collate ::= */ yytestcase(yyruleno==242); {yymsp[1].minor.yy394 = 0;} break; case 16: /* ifnotexists ::= IF NOT EXISTS */ @@ -169139,9 +173041,9 @@ static YYACTIONTYPE yy_reduce( break; case 63: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ case 80: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==80); - case 216: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==216); - case 219: /* in_op ::= NOT IN */ yytestcase(yyruleno==219); - case 245: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==245); + case 215: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==215); + case 218: /* in_op ::= NOT IN */ yytestcase(yyruleno==218); + case 243: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==243); {yymsp[-1].minor.yy394 = 1;} break; case 64: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ @@ -169214,7 +173116,6 @@ static YYACTIONTYPE yy_reduce( if( p ){ parserDoubleLinkSelect(pParse, p); } - yymsp[0].minor.yy47 = p; /*A-overwrites-X*/ } break; case 88: /* selectnowith ::= selectnowith multiselect_op oneselect */ @@ -169291,9 +173192,9 @@ static YYACTIONTYPE yy_reduce( case 99: /* sclp ::= */ case 132: /* orderby_opt ::= */ yytestcase(yyruleno==132); case 142: /* groupby_opt ::= */ yytestcase(yyruleno==142); - case 232: /* exprlist ::= */ yytestcase(yyruleno==232); - case 235: /* paren_exprlist ::= */ yytestcase(yyruleno==235); - case 240: /* eidlist_opt ::= */ yytestcase(yyruleno==240); + case 230: /* exprlist ::= */ yytestcase(yyruleno==230); + case 233: /* paren_exprlist ::= */ yytestcase(yyruleno==233); + case 238: /* eidlist_opt ::= */ yytestcase(yyruleno==238); {yymsp[1].minor.yy322 = 0;} break; case 100: /* selcollist ::= sclp scanpt expr scanpt as */ @@ -169306,21 +173207,24 @@ static YYACTIONTYPE yy_reduce( case 101: /* selcollist ::= sclp scanpt STAR */ { Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0); + sqlite3ExprSetErrorOffset(p, (int)(yymsp[0].minor.yy0.z - pParse->zTail)); yymsp[-2].minor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy322, p); } break; case 102: /* selcollist ::= sclp scanpt nm DOT STAR */ { - Expr *pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0); - Expr *pLeft = tokenExpr(pParse, TK_ID, yymsp[-2].minor.yy0); - Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight); + Expr *pRight, *pLeft, *pDot; + pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0); + sqlite3ExprSetErrorOffset(pRight, (int)(yymsp[0].minor.yy0.z - pParse->zTail)); + pLeft = tokenExpr(pParse, TK_ID, yymsp[-2].minor.yy0); + pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight); yymsp[-4].minor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, pDot); } break; case 103: /* as ::= AS nm */ case 115: /* dbnm ::= DOT nm */ yytestcase(yyruleno==115); - case 256: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==256); - case 257: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==257); + case 254: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==254); + case 255: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==255); {yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;} break; case 105: /* from ::= */ @@ -169364,7 +173268,7 @@ static YYACTIONTYPE yy_reduce( { if( yymsp[-5].minor.yy131==0 && yymsp[-1].minor.yy0.n==0 && yymsp[0].minor.yy561.pOn==0 && yymsp[0].minor.yy561.pUsing==0 ){ yymsp[-5].minor.yy131 = yymsp[-3].minor.yy131; - }else if( yymsp[-3].minor.yy131->nSrc==1 ){ + }else if( ALWAYS(yymsp[-3].minor.yy131!=0) && yymsp[-3].minor.yy131->nSrc==1 ){ yymsp[-5].minor.yy131 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy131,0,0,&yymsp[-1].minor.yy0,0,&yymsp[0].minor.yy561); if( yymsp[-5].minor.yy131 ){ SrcItem *pNew = &yymsp[-5].minor.yy131->a[yymsp[-5].minor.yy131->nSrc-1]; @@ -169492,16 +173396,16 @@ static YYACTIONTYPE yy_reduce( case 146: /* limit_opt ::= */ yytestcase(yyruleno==146); case 151: /* where_opt ::= */ yytestcase(yyruleno==151); case 153: /* where_opt_ret ::= */ yytestcase(yyruleno==153); - case 229: /* case_else ::= */ yytestcase(yyruleno==229); - case 231: /* case_operand ::= */ yytestcase(yyruleno==231); - case 250: /* vinto ::= */ yytestcase(yyruleno==250); + case 228: /* case_else ::= */ yytestcase(yyruleno==228); + case 229: /* case_operand ::= */ yytestcase(yyruleno==229); + case 248: /* vinto ::= */ yytestcase(yyruleno==248); {yymsp[1].minor.yy528 = 0;} break; case 145: /* having_opt ::= HAVING expr */ case 152: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==152); case 154: /* where_opt_ret ::= WHERE expr */ yytestcase(yyruleno==154); - case 228: /* case_else ::= ELSE expr */ yytestcase(yyruleno==228); - case 249: /* vinto ::= INTO expr */ yytestcase(yyruleno==249); + case 227: /* case_else ::= ELSE expr */ yytestcase(yyruleno==227); + case 247: /* vinto ::= INTO expr */ yytestcase(yyruleno==247); {yymsp[-1].minor.yy528 = yymsp[0].minor.yy528;} break; case 147: /* limit_opt ::= LIMIT expr */ @@ -169613,11 +173517,10 @@ static YYACTIONTYPE yy_reduce( case 177: /* expr ::= LP expr RP */ {yymsp[-2].minor.yy528 = yymsp[-1].minor.yy528;} break; - case 178: /* expr ::= ID|INDEXED */ - case 179: /* expr ::= JOIN_KW */ yytestcase(yyruleno==179); + case 178: /* expr ::= ID|INDEXED|JOIN_KW */ {yymsp[0].minor.yy528=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/} break; - case 180: /* expr ::= nm DOT nm */ + case 179: /* expr ::= nm DOT nm */ { Expr *temp1 = tokenExpr(pParse,TK_ID,yymsp[-2].minor.yy0); Expr *temp2 = tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); @@ -169625,7 +173528,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy528 = yylhsminor.yy528; break; - case 181: /* expr ::= nm DOT nm DOT nm */ + case 180: /* expr ::= nm DOT nm DOT nm */ { Expr *temp1 = tokenExpr(pParse,TK_ID,yymsp[-4].minor.yy0); Expr *temp2 = tokenExpr(pParse,TK_ID,yymsp[-2].minor.yy0); @@ -169638,18 +173541,18 @@ static YYACTIONTYPE yy_reduce( } yymsp[-4].minor.yy528 = yylhsminor.yy528; break; - case 182: /* term ::= NULL|FLOAT|BLOB */ - case 183: /* term ::= STRING */ yytestcase(yyruleno==183); + case 181: /* term ::= NULL|FLOAT|BLOB */ + case 182: /* term ::= STRING */ yytestcase(yyruleno==182); {yymsp[0].minor.yy528=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/} break; - case 184: /* term ::= INTEGER */ + case 183: /* term ::= INTEGER */ { yylhsminor.yy528 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1); if( yylhsminor.yy528 ) yylhsminor.yy528->w.iOfst = (int)(yymsp[0].minor.yy0.z - pParse->zTail); } yymsp[0].minor.yy528 = yylhsminor.yy528; break; - case 185: /* expr ::= VARIABLE */ + case 184: /* expr ::= VARIABLE */ { if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){ u32 n = yymsp[0].minor.yy0.n; @@ -169671,50 +173574,50 @@ static YYACTIONTYPE yy_reduce( } } break; - case 186: /* expr ::= expr COLLATE ID|STRING */ + case 185: /* expr ::= expr COLLATE ID|STRING */ { yymsp[-2].minor.yy528 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy528, &yymsp[0].minor.yy0, 1); } break; - case 187: /* expr ::= CAST LP expr AS typetoken RP */ + case 186: /* expr ::= CAST LP expr AS typetoken RP */ { yymsp[-5].minor.yy528 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1); sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy528, yymsp[-3].minor.yy528, 0); } break; - case 188: /* expr ::= ID|INDEXED LP distinct exprlist RP */ + case 187: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP */ { yylhsminor.yy528 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy322, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy394); } yymsp[-4].minor.yy528 = yylhsminor.yy528; break; - case 189: /* expr ::= ID|INDEXED LP STAR RP */ + case 188: /* expr ::= ID|INDEXED|JOIN_KW LP STAR RP */ { yylhsminor.yy528 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0); } yymsp[-3].minor.yy528 = yylhsminor.yy528; break; - case 190: /* expr ::= ID|INDEXED LP distinct exprlist RP filter_over */ + case 189: /* expr ::= ID|INDEXED|JOIN_KW LP distinct exprlist RP filter_over */ { yylhsminor.yy528 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy322, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy394); sqlite3WindowAttach(pParse, yylhsminor.yy528, yymsp[0].minor.yy41); } yymsp[-5].minor.yy528 = yylhsminor.yy528; break; - case 191: /* expr ::= ID|INDEXED LP STAR RP filter_over */ + case 190: /* expr ::= ID|INDEXED|JOIN_KW LP STAR RP filter_over */ { yylhsminor.yy528 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0); sqlite3WindowAttach(pParse, yylhsminor.yy528, yymsp[0].minor.yy41); } yymsp[-4].minor.yy528 = yylhsminor.yy528; break; - case 192: /* term ::= CTIME_KW */ + case 191: /* term ::= CTIME_KW */ { yylhsminor.yy528 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0); } yymsp[0].minor.yy528 = yylhsminor.yy528; break; - case 193: /* expr ::= LP nexprlist COMMA expr RP */ + case 192: /* expr ::= LP nexprlist COMMA expr RP */ { ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy322, yymsp[-1].minor.yy528); yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0); @@ -169728,22 +173631,22 @@ static YYACTIONTYPE yy_reduce( } } break; - case 194: /* expr ::= expr AND expr */ + case 193: /* expr ::= expr AND expr */ {yymsp[-2].minor.yy528=sqlite3ExprAnd(pParse,yymsp[-2].minor.yy528,yymsp[0].minor.yy528);} break; - case 195: /* expr ::= expr OR expr */ - case 196: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==196); - case 197: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==197); - case 198: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==198); - case 199: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==199); - case 200: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==200); - case 201: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==201); + case 194: /* expr ::= expr OR expr */ + case 195: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==195); + case 196: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==196); + case 197: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==197); + case 198: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==198); + case 199: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==199); + case 200: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==200); {yymsp[-2].minor.yy528=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy528,yymsp[0].minor.yy528);} break; - case 202: /* likeop ::= NOT LIKE_KW|MATCH */ + case 201: /* likeop ::= NOT LIKE_KW|MATCH */ {yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/} break; - case 203: /* expr ::= expr likeop expr */ + case 202: /* expr ::= expr likeop expr */ { ExprList *pList; int bNot = yymsp[-1].minor.yy0.n & 0x80000000; @@ -169755,7 +173658,7 @@ static YYACTIONTYPE yy_reduce( if( yymsp[-2].minor.yy528 ) yymsp[-2].minor.yy528->flags |= EP_InfixFunc; } break; - case 204: /* expr ::= expr likeop expr ESCAPE expr */ + case 203: /* expr ::= expr likeop expr ESCAPE expr */ { ExprList *pList; int bNot = yymsp[-3].minor.yy0.n & 0x80000000; @@ -169768,47 +173671,47 @@ static YYACTIONTYPE yy_reduce( if( yymsp[-4].minor.yy528 ) yymsp[-4].minor.yy528->flags |= EP_InfixFunc; } break; - case 205: /* expr ::= expr ISNULL|NOTNULL */ + case 204: /* expr ::= expr ISNULL|NOTNULL */ {yymsp[-1].minor.yy528 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy528,0);} break; - case 206: /* expr ::= expr NOT NULL */ + case 205: /* expr ::= expr NOT NULL */ {yymsp[-2].minor.yy528 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy528,0);} break; - case 207: /* expr ::= expr IS expr */ + case 206: /* expr ::= expr IS expr */ { yymsp[-2].minor.yy528 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy528,yymsp[0].minor.yy528); binaryToUnaryIfNull(pParse, yymsp[0].minor.yy528, yymsp[-2].minor.yy528, TK_ISNULL); } break; - case 208: /* expr ::= expr IS NOT expr */ + case 207: /* expr ::= expr IS NOT expr */ { yymsp[-3].minor.yy528 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy528,yymsp[0].minor.yy528); binaryToUnaryIfNull(pParse, yymsp[0].minor.yy528, yymsp[-3].minor.yy528, TK_NOTNULL); } break; - case 209: /* expr ::= expr IS NOT DISTINCT FROM expr */ + case 208: /* expr ::= expr IS NOT DISTINCT FROM expr */ { yymsp[-5].minor.yy528 = sqlite3PExpr(pParse,TK_IS,yymsp[-5].minor.yy528,yymsp[0].minor.yy528); binaryToUnaryIfNull(pParse, yymsp[0].minor.yy528, yymsp[-5].minor.yy528, TK_ISNULL); } break; - case 210: /* expr ::= expr IS DISTINCT FROM expr */ + case 209: /* expr ::= expr IS DISTINCT FROM expr */ { yymsp[-4].minor.yy528 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-4].minor.yy528,yymsp[0].minor.yy528); binaryToUnaryIfNull(pParse, yymsp[0].minor.yy528, yymsp[-4].minor.yy528, TK_NOTNULL); } break; - case 211: /* expr ::= NOT expr */ - case 212: /* expr ::= BITNOT expr */ yytestcase(yyruleno==212); + case 210: /* expr ::= NOT expr */ + case 211: /* expr ::= BITNOT expr */ yytestcase(yyruleno==211); {yymsp[-1].minor.yy528 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy528, 0);/*A-overwrites-B*/} break; - case 213: /* expr ::= PLUS|MINUS expr */ + case 212: /* expr ::= PLUS|MINUS expr */ { yymsp[-1].minor.yy528 = sqlite3PExpr(pParse, yymsp[-1].major==TK_PLUS ? TK_UPLUS : TK_UMINUS, yymsp[0].minor.yy528, 0); /*A-overwrites-B*/ } break; - case 214: /* expr ::= expr PTR expr */ + case 213: /* expr ::= expr PTR expr */ { ExprList *pList = sqlite3ExprListAppend(pParse, 0, yymsp[-2].minor.yy528); pList = sqlite3ExprListAppend(pParse, pList, yymsp[0].minor.yy528); @@ -169816,11 +173719,11 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy528 = yylhsminor.yy528; break; - case 215: /* between_op ::= BETWEEN */ - case 218: /* in_op ::= IN */ yytestcase(yyruleno==218); + case 214: /* between_op ::= BETWEEN */ + case 217: /* in_op ::= IN */ yytestcase(yyruleno==217); {yymsp[0].minor.yy394 = 0;} break; - case 217: /* expr ::= expr between_op expr AND expr */ + case 216: /* expr ::= expr between_op expr AND expr */ { ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy528); pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy528); @@ -169833,7 +173736,7 @@ static YYACTIONTYPE yy_reduce( if( yymsp[-3].minor.yy394 ) yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy528, 0); } break; - case 220: /* expr ::= expr in_op LP exprlist RP */ + case 219: /* expr ::= expr in_op LP exprlist RP */ { if( yymsp[-1].minor.yy322==0 ){ /* Expressions of the form @@ -169854,6 +173757,11 @@ static YYACTIONTYPE yy_reduce( sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy322); pRHS = sqlite3PExpr(pParse, TK_UPLUS, pRHS, 0); yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_EQ, yymsp[-4].minor.yy528, pRHS); + }else if( yymsp[-1].minor.yy322->nExpr==1 && pRHS->op==TK_SELECT ){ + yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy528, 0); + sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy528, pRHS->x.pSelect); + pRHS->x.pSelect = 0; + sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy322); }else{ yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy528, 0); if( yymsp[-4].minor.yy528==0 ){ @@ -169874,20 +173782,20 @@ static YYACTIONTYPE yy_reduce( } } break; - case 221: /* expr ::= LP select RP */ + case 220: /* expr ::= LP select RP */ { yymsp[-2].minor.yy528 = sqlite3PExpr(pParse, TK_SELECT, 0, 0); sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy528, yymsp[-1].minor.yy47); } break; - case 222: /* expr ::= expr in_op LP select RP */ + case 221: /* expr ::= expr in_op LP select RP */ { yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy528, 0); sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy528, yymsp[-1].minor.yy47); if( yymsp[-3].minor.yy394 ) yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy528, 0); } break; - case 223: /* expr ::= expr in_op nm dbnm paren_exprlist */ + case 222: /* expr ::= expr in_op nm dbnm paren_exprlist */ { SrcList *pSrc = sqlite3SrcListAppend(pParse, 0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0); @@ -169897,14 +173805,14 @@ static YYACTIONTYPE yy_reduce( if( yymsp[-3].minor.yy394 ) yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy528, 0); } break; - case 224: /* expr ::= EXISTS LP select RP */ + case 223: /* expr ::= EXISTS LP select RP */ { Expr *p; p = yymsp[-3].minor.yy528 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0); sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy47); } break; - case 225: /* expr ::= CASE case_operand case_exprlist case_else END */ + case 224: /* expr ::= CASE case_operand case_exprlist case_else END */ { yymsp[-4].minor.yy528 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy528, 0); if( yymsp[-4].minor.yy528 ){ @@ -169916,32 +173824,29 @@ static YYACTIONTYPE yy_reduce( } } break; - case 226: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ + case 225: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ { yymsp[-4].minor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, yymsp[-2].minor.yy528); yymsp[-4].minor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, yymsp[0].minor.yy528); } break; - case 227: /* case_exprlist ::= WHEN expr THEN expr */ + case 226: /* case_exprlist ::= WHEN expr THEN expr */ { yymsp[-3].minor.yy322 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy528); yymsp[-3].minor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322, yymsp[0].minor.yy528); } break; - case 230: /* case_operand ::= expr */ -{yymsp[0].minor.yy528 = yymsp[0].minor.yy528; /*A-overwrites-X*/} - break; - case 233: /* nexprlist ::= nexprlist COMMA expr */ + case 231: /* nexprlist ::= nexprlist COMMA expr */ {yymsp[-2].minor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy322,yymsp[0].minor.yy528);} break; - case 234: /* nexprlist ::= expr */ + case 232: /* nexprlist ::= expr */ {yymsp[0].minor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy528); /*A-overwrites-Y*/} break; - case 236: /* paren_exprlist ::= LP exprlist RP */ - case 241: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==241); + case 234: /* paren_exprlist ::= LP exprlist RP */ + case 239: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==239); {yymsp[-2].minor.yy322 = yymsp[-1].minor.yy322;} break; - case 237: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */ + case 235: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */ { sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy322, yymsp[-10].minor.yy394, @@ -169951,48 +173856,48 @@ static YYACTIONTYPE yy_reduce( } } break; - case 238: /* uniqueflag ::= UNIQUE */ - case 280: /* raisetype ::= ABORT */ yytestcase(yyruleno==280); + case 236: /* uniqueflag ::= UNIQUE */ + case 278: /* raisetype ::= ABORT */ yytestcase(yyruleno==278); {yymsp[0].minor.yy394 = OE_Abort;} break; - case 239: /* uniqueflag ::= */ + case 237: /* uniqueflag ::= */ {yymsp[1].minor.yy394 = OE_None;} break; - case 242: /* eidlist ::= eidlist COMMA nm collate sortorder */ + case 240: /* eidlist ::= eidlist COMMA nm collate sortorder */ { yymsp[-4].minor.yy322 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy322, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy394, yymsp[0].minor.yy394); } break; - case 243: /* eidlist ::= nm collate sortorder */ + case 241: /* eidlist ::= nm collate sortorder */ { yymsp[-2].minor.yy322 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy394, yymsp[0].minor.yy394); /*A-overwrites-Y*/ } break; - case 246: /* cmd ::= DROP INDEX ifexists fullname */ + case 244: /* cmd ::= DROP INDEX ifexists fullname */ {sqlite3DropIndex(pParse, yymsp[0].minor.yy131, yymsp[-1].minor.yy394);} break; - case 247: /* cmd ::= VACUUM vinto */ + case 245: /* cmd ::= VACUUM vinto */ {sqlite3Vacuum(pParse,0,yymsp[0].minor.yy528);} break; - case 248: /* cmd ::= VACUUM nm vinto */ + case 246: /* cmd ::= VACUUM nm vinto */ {sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy528);} break; - case 251: /* cmd ::= PRAGMA nm dbnm */ + case 249: /* cmd ::= PRAGMA nm dbnm */ {sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);} break; - case 252: /* cmd ::= PRAGMA nm dbnm EQ nmnum */ + case 250: /* cmd ::= PRAGMA nm dbnm EQ nmnum */ {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);} break; - case 253: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */ + case 251: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */ {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);} break; - case 254: /* cmd ::= PRAGMA nm dbnm EQ minus_num */ + case 252: /* cmd ::= PRAGMA nm dbnm EQ minus_num */ {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);} break; - case 255: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */ + case 253: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */ {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);} break; - case 258: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ + case 256: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ { Token all; all.z = yymsp[-3].minor.yy0.z; @@ -170000,50 +173905,50 @@ static YYACTIONTYPE yy_reduce( sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy33, &all); } break; - case 259: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ + case 257: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ { sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy394, yymsp[-4].minor.yy180.a, yymsp[-4].minor.yy180.b, yymsp[-2].minor.yy131, yymsp[0].minor.yy528, yymsp[-10].minor.yy394, yymsp[-8].minor.yy394); yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/ } break; - case 260: /* trigger_time ::= BEFORE|AFTER */ + case 258: /* trigger_time ::= BEFORE|AFTER */ { yymsp[0].minor.yy394 = yymsp[0].major; /*A-overwrites-X*/ } break; - case 261: /* trigger_time ::= INSTEAD OF */ + case 259: /* trigger_time ::= INSTEAD OF */ { yymsp[-1].minor.yy394 = TK_INSTEAD;} break; - case 262: /* trigger_time ::= */ + case 260: /* trigger_time ::= */ { yymsp[1].minor.yy394 = TK_BEFORE; } break; - case 263: /* trigger_event ::= DELETE|INSERT */ - case 264: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==264); + case 261: /* trigger_event ::= DELETE|INSERT */ + case 262: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==262); {yymsp[0].minor.yy180.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy180.b = 0;} break; - case 265: /* trigger_event ::= UPDATE OF idlist */ + case 263: /* trigger_event ::= UPDATE OF idlist */ {yymsp[-2].minor.yy180.a = TK_UPDATE; yymsp[-2].minor.yy180.b = yymsp[0].minor.yy254;} break; - case 266: /* when_clause ::= */ - case 285: /* key_opt ::= */ yytestcase(yyruleno==285); + case 264: /* when_clause ::= */ + case 283: /* key_opt ::= */ yytestcase(yyruleno==283); { yymsp[1].minor.yy528 = 0; } break; - case 267: /* when_clause ::= WHEN expr */ - case 286: /* key_opt ::= KEY expr */ yytestcase(yyruleno==286); + case 265: /* when_clause ::= WHEN expr */ + case 284: /* key_opt ::= KEY expr */ yytestcase(yyruleno==284); { yymsp[-1].minor.yy528 = yymsp[0].minor.yy528; } break; - case 268: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ + case 266: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ { assert( yymsp[-2].minor.yy33!=0 ); yymsp[-2].minor.yy33->pLast->pNext = yymsp[-1].minor.yy33; yymsp[-2].minor.yy33->pLast = yymsp[-1].minor.yy33; } break; - case 269: /* trigger_cmd_list ::= trigger_cmd SEMI */ + case 267: /* trigger_cmd_list ::= trigger_cmd SEMI */ { assert( yymsp[-1].minor.yy33!=0 ); yymsp[-1].minor.yy33->pLast = yymsp[-1].minor.yy33; } break; - case 270: /* trnm ::= nm DOT nm */ + case 268: /* trnm ::= nm DOT nm */ { yymsp[-2].minor.yy0 = yymsp[0].minor.yy0; sqlite3ErrorMsg(pParse, @@ -170051,39 +173956,39 @@ static YYACTIONTYPE yy_reduce( "statements within triggers"); } break; - case 271: /* tridxby ::= INDEXED BY nm */ + case 269: /* tridxby ::= INDEXED BY nm */ { sqlite3ErrorMsg(pParse, "the INDEXED BY clause is not allowed on UPDATE or DELETE statements " "within triggers"); } break; - case 272: /* tridxby ::= NOT INDEXED */ + case 270: /* tridxby ::= NOT INDEXED */ { sqlite3ErrorMsg(pParse, "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements " "within triggers"); } break; - case 273: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ + case 271: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ {yylhsminor.yy33 = sqlite3TriggerUpdateStep(pParse, &yymsp[-6].minor.yy0, yymsp[-2].minor.yy131, yymsp[-3].minor.yy322, yymsp[-1].minor.yy528, yymsp[-7].minor.yy394, yymsp[-8].minor.yy0.z, yymsp[0].minor.yy522);} yymsp[-8].minor.yy33 = yylhsminor.yy33; break; - case 274: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ + case 272: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ { yylhsminor.yy33 = sqlite3TriggerInsertStep(pParse,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy254,yymsp[-2].minor.yy47,yymsp[-6].minor.yy394,yymsp[-1].minor.yy444,yymsp[-7].minor.yy522,yymsp[0].minor.yy522);/*yylhsminor.yy33-overwrites-yymsp[-6].minor.yy394*/ } yymsp[-7].minor.yy33 = yylhsminor.yy33; break; - case 275: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ + case 273: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ {yylhsminor.yy33 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy528, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy522);} yymsp[-5].minor.yy33 = yylhsminor.yy33; break; - case 276: /* trigger_cmd ::= scanpt select scanpt */ + case 274: /* trigger_cmd ::= scanpt select scanpt */ {yylhsminor.yy33 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy47, yymsp[-2].minor.yy522, yymsp[0].minor.yy522); /*yylhsminor.yy33-overwrites-yymsp[-1].minor.yy47*/} yymsp[-2].minor.yy33 = yylhsminor.yy33; break; - case 277: /* expr ::= RAISE LP IGNORE RP */ + case 275: /* expr ::= RAISE LP IGNORE RP */ { yymsp[-3].minor.yy528 = sqlite3PExpr(pParse, TK_RAISE, 0, 0); if( yymsp[-3].minor.yy528 ){ @@ -170091,7 +173996,7 @@ static YYACTIONTYPE yy_reduce( } } break; - case 278: /* expr ::= RAISE LP raisetype COMMA nm RP */ + case 276: /* expr ::= RAISE LP raisetype COMMA nm RP */ { yymsp[-5].minor.yy528 = sqlite3ExprAlloc(pParse->db, TK_RAISE, &yymsp[-1].minor.yy0, 1); if( yymsp[-5].minor.yy528 ) { @@ -170099,118 +174004,114 @@ static YYACTIONTYPE yy_reduce( } } break; - case 279: /* raisetype ::= ROLLBACK */ + case 277: /* raisetype ::= ROLLBACK */ {yymsp[0].minor.yy394 = OE_Rollback;} break; - case 281: /* raisetype ::= FAIL */ + case 279: /* raisetype ::= FAIL */ {yymsp[0].minor.yy394 = OE_Fail;} break; - case 282: /* cmd ::= DROP TRIGGER ifexists fullname */ + case 280: /* cmd ::= DROP TRIGGER ifexists fullname */ { sqlite3DropTrigger(pParse,yymsp[0].minor.yy131,yymsp[-1].minor.yy394); } break; - case 283: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ + case 281: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ { sqlite3Attach(pParse, yymsp[-3].minor.yy528, yymsp[-1].minor.yy528, yymsp[0].minor.yy528); } break; - case 284: /* cmd ::= DETACH database_kw_opt expr */ + case 282: /* cmd ::= DETACH database_kw_opt expr */ { sqlite3Detach(pParse, yymsp[0].minor.yy528); } break; - case 287: /* cmd ::= REINDEX */ + case 285: /* cmd ::= REINDEX */ {sqlite3Reindex(pParse, 0, 0);} break; - case 288: /* cmd ::= REINDEX nm dbnm */ + case 286: /* cmd ::= REINDEX nm dbnm */ {sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);} break; - case 289: /* cmd ::= ANALYZE */ + case 287: /* cmd ::= ANALYZE */ {sqlite3Analyze(pParse, 0, 0);} break; - case 290: /* cmd ::= ANALYZE nm dbnm */ + case 288: /* cmd ::= ANALYZE nm dbnm */ {sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);} break; - case 291: /* cmd ::= ALTER TABLE fullname RENAME TO nm */ + case 289: /* cmd ::= ALTER TABLE fullname RENAME TO nm */ { sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy131,&yymsp[0].minor.yy0); } break; - case 292: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ + case 290: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ { yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n; sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0); } break; - case 293: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */ + case 291: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */ { sqlite3AlterDropColumn(pParse, yymsp[-3].minor.yy131, &yymsp[0].minor.yy0); } break; - case 294: /* add_column_fullname ::= fullname */ + case 292: /* add_column_fullname ::= fullname */ { disableLookaside(pParse); sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy131); } break; - case 295: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ + case 293: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ { sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy131, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 296: /* cmd ::= create_vtab */ + case 294: /* cmd ::= create_vtab */ {sqlite3VtabFinishParse(pParse,0);} break; - case 297: /* cmd ::= create_vtab LP vtabarglist RP */ + case 295: /* cmd ::= create_vtab LP vtabarglist RP */ {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);} break; - case 298: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ + case 296: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ { sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy394); } break; - case 299: /* vtabarg ::= */ + case 297: /* vtabarg ::= */ {sqlite3VtabArgInit(pParse);} break; - case 300: /* vtabargtoken ::= ANY */ - case 301: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==301); - case 302: /* lp ::= LP */ yytestcase(yyruleno==302); + case 298: /* vtabargtoken ::= ANY */ + case 299: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==299); + case 300: /* lp ::= LP */ yytestcase(yyruleno==300); {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);} break; - case 303: /* with ::= WITH wqlist */ - case 304: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==304); + case 301: /* with ::= WITH wqlist */ + case 302: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==302); { sqlite3WithPush(pParse, yymsp[0].minor.yy521, 1); } break; - case 305: /* wqas ::= AS */ + case 303: /* wqas ::= AS */ {yymsp[0].minor.yy516 = M10d_Any;} break; - case 306: /* wqas ::= AS MATERIALIZED */ + case 304: /* wqas ::= AS MATERIALIZED */ {yymsp[-1].minor.yy516 = M10d_Yes;} break; - case 307: /* wqas ::= AS NOT MATERIALIZED */ + case 305: /* wqas ::= AS NOT MATERIALIZED */ {yymsp[-2].minor.yy516 = M10d_No;} break; - case 308: /* wqitem ::= nm eidlist_opt wqas LP select RP */ + case 306: /* wqitem ::= nm eidlist_opt wqas LP select RP */ { yymsp[-5].minor.yy385 = sqlite3CteNew(pParse, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy322, yymsp[-1].minor.yy47, yymsp[-3].minor.yy516); /*A-overwrites-X*/ } break; - case 309: /* wqlist ::= wqitem */ + case 307: /* wqlist ::= wqitem */ { yymsp[0].minor.yy521 = sqlite3WithAdd(pParse, 0, yymsp[0].minor.yy385); /*A-overwrites-X*/ } break; - case 310: /* wqlist ::= wqlist COMMA wqitem */ + case 308: /* wqlist ::= wqlist COMMA wqitem */ { yymsp[-2].minor.yy521 = sqlite3WithAdd(pParse, yymsp[-2].minor.yy521, yymsp[0].minor.yy385); } break; - case 311: /* windowdefn_list ::= windowdefn */ -{ yylhsminor.yy41 = yymsp[0].minor.yy41; } - yymsp[0].minor.yy41 = yylhsminor.yy41; - break; - case 312: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */ + case 309: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */ { assert( yymsp[0].minor.yy41!=0 ); sqlite3WindowChain(pParse, yymsp[0].minor.yy41, yymsp[-2].minor.yy41); @@ -170219,7 +174120,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy41 = yylhsminor.yy41; break; - case 313: /* windowdefn ::= nm AS LP window RP */ + case 310: /* windowdefn ::= nm AS LP window RP */ { if( ALWAYS(yymsp[-1].minor.yy41) ){ yymsp[-1].minor.yy41->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n); @@ -170228,90 +174129,83 @@ static YYACTIONTYPE yy_reduce( } yymsp[-4].minor.yy41 = yylhsminor.yy41; break; - case 314: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */ + case 311: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */ { yymsp[-4].minor.yy41 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy41, yymsp[-2].minor.yy322, yymsp[-1].minor.yy322, 0); } break; - case 315: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ + case 312: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ { yylhsminor.yy41 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy41, yymsp[-2].minor.yy322, yymsp[-1].minor.yy322, &yymsp[-5].minor.yy0); } yymsp[-5].minor.yy41 = yylhsminor.yy41; break; - case 316: /* window ::= ORDER BY sortlist frame_opt */ + case 313: /* window ::= ORDER BY sortlist frame_opt */ { yymsp[-3].minor.yy41 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy41, 0, yymsp[-1].minor.yy322, 0); } break; - case 317: /* window ::= nm ORDER BY sortlist frame_opt */ + case 314: /* window ::= nm ORDER BY sortlist frame_opt */ { yylhsminor.yy41 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy41, 0, yymsp[-1].minor.yy322, &yymsp[-4].minor.yy0); } yymsp[-4].minor.yy41 = yylhsminor.yy41; break; - case 318: /* window ::= frame_opt */ - case 337: /* filter_over ::= over_clause */ yytestcase(yyruleno==337); -{ - yylhsminor.yy41 = yymsp[0].minor.yy41; -} - yymsp[0].minor.yy41 = yylhsminor.yy41; - break; - case 319: /* window ::= nm frame_opt */ + case 315: /* window ::= nm frame_opt */ { yylhsminor.yy41 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy41, 0, 0, &yymsp[-1].minor.yy0); } yymsp[-1].minor.yy41 = yylhsminor.yy41; break; - case 320: /* frame_opt ::= */ + case 316: /* frame_opt ::= */ { yymsp[1].minor.yy41 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0); } break; - case 321: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ + case 317: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ { yylhsminor.yy41 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy394, yymsp[-1].minor.yy595.eType, yymsp[-1].minor.yy595.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy516); } yymsp[-2].minor.yy41 = yylhsminor.yy41; break; - case 322: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ + case 318: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ { yylhsminor.yy41 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy394, yymsp[-3].minor.yy595.eType, yymsp[-3].minor.yy595.pExpr, yymsp[-1].minor.yy595.eType, yymsp[-1].minor.yy595.pExpr, yymsp[0].minor.yy516); } yymsp[-5].minor.yy41 = yylhsminor.yy41; break; - case 324: /* frame_bound_s ::= frame_bound */ - case 326: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==326); + case 320: /* frame_bound_s ::= frame_bound */ + case 322: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==322); {yylhsminor.yy595 = yymsp[0].minor.yy595;} yymsp[0].minor.yy595 = yylhsminor.yy595; break; - case 325: /* frame_bound_s ::= UNBOUNDED PRECEDING */ - case 327: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==327); - case 329: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==329); + case 321: /* frame_bound_s ::= UNBOUNDED PRECEDING */ + case 323: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==323); + case 325: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==325); {yylhsminor.yy595.eType = yymsp[-1].major; yylhsminor.yy595.pExpr = 0;} yymsp[-1].minor.yy595 = yylhsminor.yy595; break; - case 328: /* frame_bound ::= expr PRECEDING|FOLLOWING */ + case 324: /* frame_bound ::= expr PRECEDING|FOLLOWING */ {yylhsminor.yy595.eType = yymsp[0].major; yylhsminor.yy595.pExpr = yymsp[-1].minor.yy528;} yymsp[-1].minor.yy595 = yylhsminor.yy595; break; - case 330: /* frame_exclude_opt ::= */ + case 326: /* frame_exclude_opt ::= */ {yymsp[1].minor.yy516 = 0;} break; - case 331: /* frame_exclude_opt ::= EXCLUDE frame_exclude */ + case 327: /* frame_exclude_opt ::= EXCLUDE frame_exclude */ {yymsp[-1].minor.yy516 = yymsp[0].minor.yy516;} break; - case 332: /* frame_exclude ::= NO OTHERS */ - case 333: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==333); + case 328: /* frame_exclude ::= NO OTHERS */ + case 329: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==329); {yymsp[-1].minor.yy516 = yymsp[-1].major; /*A-overwrites-X*/} break; - case 334: /* frame_exclude ::= GROUP|TIES */ + case 330: /* frame_exclude ::= GROUP|TIES */ {yymsp[0].minor.yy516 = yymsp[0].major; /*A-overwrites-X*/} break; - case 335: /* window_clause ::= WINDOW windowdefn_list */ + case 331: /* window_clause ::= WINDOW windowdefn_list */ { yymsp[-1].minor.yy41 = yymsp[0].minor.yy41; } break; - case 336: /* filter_over ::= filter_clause over_clause */ + case 332: /* filter_over ::= filter_clause over_clause */ { if( yymsp[0].minor.yy41 ){ yymsp[0].minor.yy41->pFilter = yymsp[-1].minor.yy528; @@ -170322,7 +174216,13 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy41 = yylhsminor.yy41; break; - case 338: /* filter_over ::= filter_clause */ + case 333: /* filter_over ::= over_clause */ +{ + yylhsminor.yy41 = yymsp[0].minor.yy41; +} + yymsp[0].minor.yy41 = yylhsminor.yy41; + break; + case 334: /* filter_over ::= filter_clause */ { yylhsminor.yy41 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window)); if( yylhsminor.yy41 ){ @@ -170334,13 +174234,13 @@ static YYACTIONTYPE yy_reduce( } yymsp[0].minor.yy41 = yylhsminor.yy41; break; - case 339: /* over_clause ::= OVER LP window RP */ + case 335: /* over_clause ::= OVER LP window RP */ { yymsp[-3].minor.yy41 = yymsp[-1].minor.yy41; assert( yymsp[-3].minor.yy41!=0 ); } break; - case 340: /* over_clause ::= OVER nm */ + case 336: /* over_clause ::= OVER nm */ { yymsp[-1].minor.yy41 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window)); if( yymsp[-1].minor.yy41 ){ @@ -170348,73 +174248,75 @@ static YYACTIONTYPE yy_reduce( } } break; - case 341: /* filter_clause ::= FILTER LP WHERE expr RP */ + case 337: /* filter_clause ::= FILTER LP WHERE expr RP */ { yymsp[-4].minor.yy528 = yymsp[-1].minor.yy528; } break; default: - /* (342) input ::= cmdlist */ yytestcase(yyruleno==342); - /* (343) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==343); - /* (344) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=344); - /* (345) ecmd ::= SEMI */ yytestcase(yyruleno==345); - /* (346) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==346); - /* (347) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=347); - /* (348) trans_opt ::= */ yytestcase(yyruleno==348); - /* (349) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==349); - /* (350) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==350); - /* (351) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==351); - /* (352) savepoint_opt ::= */ yytestcase(yyruleno==352); - /* (353) cmd ::= create_table create_table_args */ yytestcase(yyruleno==353); - /* (354) table_option_set ::= table_option (OPTIMIZED OUT) */ assert(yyruleno!=354); - /* (355) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==355); - /* (356) columnlist ::= columnname carglist */ yytestcase(yyruleno==356); - /* (357) nm ::= ID|INDEXED */ yytestcase(yyruleno==357); - /* (358) nm ::= STRING */ yytestcase(yyruleno==358); - /* (359) nm ::= JOIN_KW */ yytestcase(yyruleno==359); - /* (360) typetoken ::= typename */ yytestcase(yyruleno==360); - /* (361) typename ::= ID|STRING */ yytestcase(yyruleno==361); - /* (362) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=362); - /* (363) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=363); - /* (364) carglist ::= carglist ccons */ yytestcase(yyruleno==364); - /* (365) carglist ::= */ yytestcase(yyruleno==365); - /* (366) ccons ::= NULL onconf */ yytestcase(yyruleno==366); - /* (367) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==367); - /* (368) ccons ::= AS generated */ yytestcase(yyruleno==368); - /* (369) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==369); - /* (370) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==370); - /* (371) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=371); - /* (372) tconscomma ::= */ yytestcase(yyruleno==372); - /* (373) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=373); - /* (374) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=374); - /* (375) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=375); - /* (376) oneselect ::= values */ yytestcase(yyruleno==376); - /* (377) sclp ::= selcollist COMMA */ yytestcase(yyruleno==377); - /* (378) as ::= ID|STRING */ yytestcase(yyruleno==378); - /* (379) indexed_opt ::= indexed_by (OPTIMIZED OUT) */ assert(yyruleno!=379); - /* (380) returning ::= */ yytestcase(yyruleno==380); - /* (381) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=381); - /* (382) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==382); - /* (383) exprlist ::= nexprlist */ yytestcase(yyruleno==383); - /* (384) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=384); - /* (385) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=385); - /* (386) nmnum ::= ON */ yytestcase(yyruleno==386); - /* (387) nmnum ::= DELETE */ yytestcase(yyruleno==387); - /* (388) nmnum ::= DEFAULT */ yytestcase(yyruleno==388); - /* (389) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==389); - /* (390) foreach_clause ::= */ yytestcase(yyruleno==390); - /* (391) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==391); - /* (392) trnm ::= nm */ yytestcase(yyruleno==392); - /* (393) tridxby ::= */ yytestcase(yyruleno==393); - /* (394) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==394); - /* (395) database_kw_opt ::= */ yytestcase(yyruleno==395); - /* (396) kwcolumn_opt ::= */ yytestcase(yyruleno==396); - /* (397) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==397); - /* (398) vtabarglist ::= vtabarg */ yytestcase(yyruleno==398); - /* (399) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==399); - /* (400) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==400); - /* (401) anylist ::= */ yytestcase(yyruleno==401); - /* (402) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==402); - /* (403) anylist ::= anylist ANY */ yytestcase(yyruleno==403); - /* (404) with ::= */ yytestcase(yyruleno==404); + /* (338) input ::= cmdlist */ yytestcase(yyruleno==338); + /* (339) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==339); + /* (340) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=340); + /* (341) ecmd ::= SEMI */ yytestcase(yyruleno==341); + /* (342) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==342); + /* (343) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=343); + /* (344) trans_opt ::= */ yytestcase(yyruleno==344); + /* (345) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==345); + /* (346) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==346); + /* (347) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==347); + /* (348) savepoint_opt ::= */ yytestcase(yyruleno==348); + /* (349) cmd ::= create_table create_table_args */ yytestcase(yyruleno==349); + /* (350) table_option_set ::= table_option (OPTIMIZED OUT) */ assert(yyruleno!=350); + /* (351) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==351); + /* (352) columnlist ::= columnname carglist */ yytestcase(yyruleno==352); + /* (353) nm ::= ID|INDEXED|JOIN_KW */ yytestcase(yyruleno==353); + /* (354) nm ::= STRING */ yytestcase(yyruleno==354); + /* (355) typetoken ::= typename */ yytestcase(yyruleno==355); + /* (356) typename ::= ID|STRING */ yytestcase(yyruleno==356); + /* (357) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=357); + /* (358) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=358); + /* (359) carglist ::= carglist ccons */ yytestcase(yyruleno==359); + /* (360) carglist ::= */ yytestcase(yyruleno==360); + /* (361) ccons ::= NULL onconf */ yytestcase(yyruleno==361); + /* (362) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==362); + /* (363) ccons ::= AS generated */ yytestcase(yyruleno==363); + /* (364) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==364); + /* (365) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==365); + /* (366) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=366); + /* (367) tconscomma ::= */ yytestcase(yyruleno==367); + /* (368) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=368); + /* (369) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=369); + /* (370) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=370); + /* (371) oneselect ::= values */ yytestcase(yyruleno==371); + /* (372) sclp ::= selcollist COMMA */ yytestcase(yyruleno==372); + /* (373) as ::= ID|STRING */ yytestcase(yyruleno==373); + /* (374) indexed_opt ::= indexed_by (OPTIMIZED OUT) */ assert(yyruleno!=374); + /* (375) returning ::= */ yytestcase(yyruleno==375); + /* (376) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=376); + /* (377) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==377); + /* (378) case_operand ::= expr */ yytestcase(yyruleno==378); + /* (379) exprlist ::= nexprlist */ yytestcase(yyruleno==379); + /* (380) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=380); + /* (381) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=381); + /* (382) nmnum ::= ON */ yytestcase(yyruleno==382); + /* (383) nmnum ::= DELETE */ yytestcase(yyruleno==383); + /* (384) nmnum ::= DEFAULT */ yytestcase(yyruleno==384); + /* (385) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==385); + /* (386) foreach_clause ::= */ yytestcase(yyruleno==386); + /* (387) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==387); + /* (388) trnm ::= nm */ yytestcase(yyruleno==388); + /* (389) tridxby ::= */ yytestcase(yyruleno==389); + /* (390) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==390); + /* (391) database_kw_opt ::= */ yytestcase(yyruleno==391); + /* (392) kwcolumn_opt ::= */ yytestcase(yyruleno==392); + /* (393) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==393); + /* (394) vtabarglist ::= vtabarg */ yytestcase(yyruleno==394); + /* (395) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==395); + /* (396) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==396); + /* (397) anylist ::= */ yytestcase(yyruleno==397); + /* (398) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==398); + /* (399) anylist ::= anylist ANY */ yytestcase(yyruleno==399); + /* (400) with ::= */ yytestcase(yyruleno==400); + /* (401) windowdefn_list ::= windowdefn (OPTIMIZED OUT) */ assert(yyruleno!=401); + /* (402) window ::= frame_opt (OPTIMIZED OUT) */ assert(yyruleno!=402); break; /********** End reduce actions ************************************************/ }; @@ -170990,7 +174892,7 @@ static const unsigned char aKWHash[127] = { /* aKWNext[] forms the hash collision chain. If aKWHash[i]==0 ** then the i-th keyword has no more hash collisions. Otherwise, ** the next keyword with the same hash is aKWHash[i]-1. */ -static const unsigned char aKWNext[147] = { +static const unsigned char aKWNext[148] = {0, 0, 0, 0, 0, 4, 0, 43, 0, 0, 106, 114, 0, 0, 0, 2, 0, 0, 143, 0, 0, 0, 13, 0, 0, 0, 0, 141, 0, 0, 119, 52, 0, 0, 137, 12, 0, 0, 62, 0, @@ -171005,7 +174907,7 @@ static const unsigned char aKWNext[147] = { 102, 0, 0, 87, }; /* aKWLen[i] is the length (in bytes) of the i-th keyword */ -static const unsigned char aKWLen[147] = { +static const unsigned char aKWLen[148] = {0, 7, 7, 5, 4, 6, 4, 5, 3, 6, 7, 3, 6, 6, 7, 7, 3, 8, 2, 6, 5, 4, 4, 3, 10, 4, 7, 6, 9, 4, 2, 6, 5, 9, 9, 4, 7, 3, 2, 4, @@ -171021,7 +174923,7 @@ static const unsigned char aKWLen[147] = { }; /* aKWOffset[i] is the index into zKWText[] of the start of ** the text for the i-th keyword. */ -static const unsigned short int aKWOffset[147] = { +static const unsigned short int aKWOffset[148] = {0, 0, 2, 2, 8, 9, 14, 16, 20, 23, 25, 25, 29, 33, 36, 41, 46, 48, 53, 54, 59, 62, 65, 67, 69, 78, 81, 86, 90, 90, 94, 99, 101, 105, 111, 119, 123, 123, 123, 126, @@ -171036,7 +174938,7 @@ static const unsigned short int aKWOffset[147] = { 648, 650, 655, 659, }; /* aKWCode[i] is the parser symbol code for the i-th keyword */ -static const unsigned char aKWCode[147] = { +static const unsigned char aKWCode[148] = {0, TK_REINDEX, TK_INDEXED, TK_INDEX, TK_DESC, TK_ESCAPE, TK_EACH, TK_CHECK, TK_KEY, TK_BEFORE, TK_FOREIGN, TK_FOR, TK_IGNORE, TK_LIKE_KW, TK_EXPLAIN, TK_INSTEAD, @@ -171203,185 +175105,185 @@ static const unsigned char aKWCode[147] = { static int keywordCode(const char *z, int n, int *pType){ int i, j; const char *zKW; - if( n>=2 ){ - i = ((charMap(z[0])*4) ^ (charMap(z[n-1])*3) ^ n*1) % 127; - for(i=((int)aKWHash[i])-1; i>=0; i=((int)aKWNext[i])-1){ - if( aKWLen[i]!=n ) continue; - zKW = &zKWText[aKWOffset[i]]; + assert( n>=2 ); + i = ((charMap(z[0])*4) ^ (charMap(z[n-1])*3) ^ n*1) % 127; + for(i=(int)aKWHash[i]; i>0; i=aKWNext[i]){ + if( aKWLen[i]!=n ) continue; + zKW = &zKWText[aKWOffset[i]]; #ifdef SQLITE_ASCII - if( (z[0]&~0x20)!=zKW[0] ) continue; - if( (z[1]&~0x20)!=zKW[1] ) continue; - j = 2; - while( j=2 ) keywordCode((char*)z, n, &id); return id; } #define SQLITE_N_KEYWORD 147 SQLITE_API int sqlite3_keyword_name(int i,const char **pzName,int *pnName){ if( i<0 || i>=SQLITE_N_KEYWORD ) return SQLITE_ERROR; + i++; *pzName = zKWText + aKWOffset[i]; *pnName = aKWLen[i]; return SQLITE_OK; @@ -171680,7 +175582,7 @@ SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *z, int *tokenType){ testcase( z[0]=='0' ); testcase( z[0]=='1' ); testcase( z[0]=='2' ); testcase( z[0]=='3' ); testcase( z[0]=='4' ); testcase( z[0]=='5' ); testcase( z[0]=='6' ); testcase( z[0]=='7' ); testcase( z[0]=='8' ); - testcase( z[0]=='9' ); + testcase( z[0]=='9' ); testcase( z[0]=='.' ); *tokenType = TK_INTEGER; #ifndef SQLITE_OMIT_HEX_INTEGER if( z[0]=='0' && (z[1]=='x' || z[1]=='X') && sqlite3Isxdigit(z[2]) ){ @@ -171752,7 +175654,8 @@ SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *z, int *tokenType){ return i; } case CC_KYWD0: { - for(i=1; aiClass[z[i]]<=CC_KYWD; i++){} + if( aiClass[z[1]]>CC_KYWD ){ i = 1; break; } + for(i=2; aiClass[z[i]]<=CC_KYWD; i++){} if( IdChar(z[i]) ){ /* This token started out using characters that can appear in keywords, ** but z[i] is a character not allowed within keywords, so this must @@ -172531,12 +176434,6 @@ static int sqlite3TestExtInit(sqlite3 *db){ ** Forward declarations of external module initializer functions ** for modules that need them. */ -#ifdef SQLITE_ENABLE_FTS1 -SQLITE_PRIVATE int sqlite3Fts1Init(sqlite3*); -#endif -#ifdef SQLITE_ENABLE_FTS2 -SQLITE_PRIVATE int sqlite3Fts2Init(sqlite3*); -#endif #ifdef SQLITE_ENABLE_FTS5 SQLITE_PRIVATE int sqlite3Fts5Init(sqlite3*); #endif @@ -172549,12 +176446,6 @@ SQLITE_PRIVATE int sqlite3StmtVtabInit(sqlite3*); ** built-in extensions. */ static int (*const sqlite3BuiltinExtensions[])(sqlite3*) = { -#ifdef SQLITE_ENABLE_FTS1 - sqlite3Fts1Init, -#endif -#ifdef SQLITE_ENABLE_FTS2 - sqlite3Fts2Init, -#endif #ifdef SQLITE_ENABLE_FTS3 sqlite3Fts3Init, #endif @@ -172920,9 +176811,21 @@ SQLITE_API int sqlite3_config(int op, ...){ va_list ap; int rc = SQLITE_OK; - /* sqlite3_config() shall return SQLITE_MISUSE if it is invoked while - ** the SQLite library is in use. */ - if( sqlite3GlobalConfig.isInit ) return SQLITE_MISUSE_BKPT; + /* sqlite3_config() normally returns SQLITE_MISUSE if it is invoked while + ** the SQLite library is in use. Except, a few selected opcodes + ** are allowed. + */ + if( sqlite3GlobalConfig.isInit ){ + static const u64 mAnytimeConfigOption = 0 + | MASKBIT64( SQLITE_CONFIG_LOG ) + | MASKBIT64( SQLITE_CONFIG_PCACHE_HDRSZ ) + ; + if( op<0 || op>63 || (MASKBIT64(op) & mAnytimeConfigOption)==0 ){ + return SQLITE_MISUSE_BKPT; + } + testcase( op==SQLITE_CONFIG_LOG ); + testcase( op==SQLITE_CONFIG_PCACHE_HDRSZ ); + } va_start(ap, op); switch( op ){ @@ -172991,6 +176894,7 @@ SQLITE_API int sqlite3_config(int op, ...){ break; } case SQLITE_CONFIG_MEMSTATUS: { + assert( !sqlite3GlobalConfig.isInit ); /* Cannot change at runtime */ /* EVIDENCE-OF: R-61275-35157 The SQLITE_CONFIG_MEMSTATUS option takes ** single argument of type int, interpreted as a boolean, which enables ** or disables the collection of memory allocation statistics. */ @@ -173114,8 +177018,10 @@ SQLITE_API int sqlite3_config(int op, ...){ ** sqlite3GlobalConfig.xLog = va_arg(ap, void(*)(void*,int,const char*)); */ typedef void(*LOGFUNC_t)(void*,int,const char*); - sqlite3GlobalConfig.xLog = va_arg(ap, LOGFUNC_t); - sqlite3GlobalConfig.pLogArg = va_arg(ap, void*); + LOGFUNC_t xLog = va_arg(ap, LOGFUNC_t); + void *pLogArg = va_arg(ap, void*); + AtomicStore(&sqlite3GlobalConfig.xLog, xLog); + AtomicStore(&sqlite3GlobalConfig.pLogArg, pLogArg); break; } @@ -173129,7 +177035,8 @@ SQLITE_API int sqlite3_config(int op, ...){ ** argument of type int. If non-zero, then URI handling is globally ** enabled. If the parameter is zero, then URI handling is globally ** disabled. */ - sqlite3GlobalConfig.bOpenUri = va_arg(ap, int); + int bOpenUri = va_arg(ap, int); + AtomicStore(&sqlite3GlobalConfig.bOpenUri, bOpenUri); break; } @@ -173444,6 +177351,8 @@ SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){ { SQLITE_DBCONFIG_DQS_DML, SQLITE_DqsDML }, { SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, SQLITE_LegacyFileFmt }, { SQLITE_DBCONFIG_TRUSTED_SCHEMA, SQLITE_TrustedSchema }, + { SQLITE_DBCONFIG_STMT_SCANSTATUS, SQLITE_StmtScanStatus }, + { SQLITE_DBCONFIG_REVERSE_SCANORDER, SQLITE_ReverseOrder }, }; unsigned int i; rc = SQLITE_ERROR; /* IMP: R-42790-23372 */ @@ -174056,6 +177965,7 @@ SQLITE_PRIVATE const char *sqlite3ErrName(int rc){ case SQLITE_NOTICE_RECOVER_WAL: zName = "SQLITE_NOTICE_RECOVER_WAL";break; case SQLITE_NOTICE_RECOVER_ROLLBACK: zName = "SQLITE_NOTICE_RECOVER_ROLLBACK"; break; + case SQLITE_NOTICE_RBU: zName = "SQLITE_NOTICE_RBU"; break; case SQLITE_WARNING: zName = "SQLITE_WARNING"; break; case SQLITE_WARNING_AUTOINDEX: zName = "SQLITE_WARNING_AUTOINDEX"; break; case SQLITE_DONE: zName = "SQLITE_DONE"; break; @@ -174148,9 +178058,9 @@ static int sqliteDefaultBusyCallback( void *ptr, /* Database connection */ int count /* Number of times table has been busy */ ){ -#if SQLITE_OS_WIN || HAVE_USLEEP +#if SQLITE_OS_WIN || !defined(HAVE_NANOSLEEP) || HAVE_NANOSLEEP /* This case is for systems that have support for sleeping for fractions of - ** a second. Examples: All windows systems, unix systems with usleep() */ + ** a second. Examples: All windows systems, unix systems with nanosleep() */ static const u8 delays[] = { 1, 2, 5, 10, 15, 20, 25, 25, 25, 50, 50, 100 }; static const u8 totals[] = @@ -174285,7 +178195,9 @@ SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){ */ SQLITE_API void sqlite3_interrupt(sqlite3 *db){ #ifdef SQLITE_ENABLE_API_ARMOR - if( !sqlite3SafetyCheckOk(db) && (db==0 || db->eOpenState!=SQLITE_STATE_ZOMBIE) ){ + if( !sqlite3SafetyCheckOk(db) + && (db==0 || db->eOpenState!=SQLITE_STATE_ZOMBIE) + ){ (void)SQLITE_MISUSE_BKPT; return; } @@ -174293,6 +178205,21 @@ SQLITE_API void sqlite3_interrupt(sqlite3 *db){ AtomicStore(&db->u1.isInterrupted, 1); } +/* +** Return true or false depending on whether or not an interrupt is +** pending on connection db. +*/ +SQLITE_API int sqlite3_is_interrupted(sqlite3 *db){ +#ifdef SQLITE_ENABLE_API_ARMOR + if( !sqlite3SafetyCheckOk(db) + && (db==0 || db->eOpenState!=SQLITE_STATE_ZOMBIE) + ){ + (void)SQLITE_MISUSE_BKPT; + return 0; + } +#endif + return AtomicLoad(&db->u1.isInterrupted)!=0; +} /* ** This function is exactly the same as sqlite3_create_function(), except @@ -174337,7 +178264,7 @@ SQLITE_PRIVATE int sqlite3CreateFunc( /* The SQLITE_INNOCUOUS flag is the same bit as SQLITE_FUNC_UNSAFE. But ** the meaning is inverted. So flip the bit. */ assert( SQLITE_FUNC_UNSAFE==SQLITE_INNOCUOUS ); - extraFlags ^= SQLITE_FUNC_UNSAFE; + extraFlags ^= SQLITE_FUNC_UNSAFE; /* tag-20230109-1 */ #ifndef SQLITE_OMIT_UTF16 @@ -174355,11 +178282,11 @@ SQLITE_PRIVATE int sqlite3CreateFunc( case SQLITE_ANY: { int rc; rc = sqlite3CreateFunc(db, zFunctionName, nArg, - (SQLITE_UTF8|extraFlags)^SQLITE_FUNC_UNSAFE, + (SQLITE_UTF8|extraFlags)^SQLITE_FUNC_UNSAFE, /* tag-20230109-1 */ pUserData, xSFunc, xStep, xFinal, xValue, xInverse, pDestructor); if( rc==SQLITE_OK ){ rc = sqlite3CreateFunc(db, zFunctionName, nArg, - (SQLITE_UTF16LE|extraFlags)^SQLITE_FUNC_UNSAFE, + (SQLITE_UTF16LE|extraFlags)^SQLITE_FUNC_UNSAFE, /* tag-20230109-1*/ pUserData, xSFunc, xStep, xFinal, xValue, xInverse, pDestructor); } if( rc!=SQLITE_OK ){ @@ -175411,9 +179338,9 @@ SQLITE_PRIVATE int sqlite3ParseUri( assert( *pzErrMsg==0 ); - if( ((flags & SQLITE_OPEN_URI) /* IMP: R-48725-32206 */ - || sqlite3GlobalConfig.bOpenUri) /* IMP: R-51689-46548 */ - && nUri>=5 && memcmp(zUri, "file:", 5)==0 /* IMP: R-57884-37496 */ + if( ((flags & SQLITE_OPEN_URI) /* IMP: R-48725-32206 */ + || AtomicLoad(&sqlite3GlobalConfig.bOpenUri)) /* IMP: R-51689-46548 */ + && nUri>=5 && memcmp(zUri, "file:", 5)==0 /* IMP: R-57884-37496 */ ){ char *zOpt; int eState; /* Parser state when parsing URI */ @@ -175771,7 +179698,7 @@ static int openDatabase( ** 0 off off ** ** Legacy behavior is 3 (double-quoted string literals are allowed anywhere) -** and so that is the default. But developers are encouranged to use +** and so that is the default. But developers are encouraged to use ** -DSQLITE_DQS=0 (best) or -DSQLITE_DQS=1 (second choice) if possible. */ #if !defined(SQLITE_DQS) @@ -175819,6 +179746,9 @@ static int openDatabase( #endif #if defined(SQLITE_DEFAULT_LEGACY_ALTER_TABLE) | SQLITE_LegacyAlter +#endif +#if defined(SQLITE_ENABLE_STMT_SCANSTATUS) + | SQLITE_StmtScanStatus #endif ; sqlite3HashInit(&db->aCollSeq); @@ -176303,7 +180233,7 @@ SQLITE_API int sqlite3_table_column_metadata( /* Find the column for which info is requested */ if( zColumnName==0 ){ - /* Query for existance of table only */ + /* Query for existence of table only */ }else{ for(iCol=0; iColnCol; iCol++){ pCol = &pTab->aCol[iCol]; @@ -176384,7 +180314,7 @@ SQLITE_API int sqlite3_sleep(int ms){ /* This function works in milliseconds, but the underlying OsSleep() ** API uses microseconds. Hence the 1000's. */ - rc = (sqlite3OsSleep(pVfs, 1000*ms)/1000); + rc = (sqlite3OsSleep(pVfs, ms<0 ? 0 : 1000*ms)/1000); return rc; } @@ -176623,10 +180553,12 @@ SQLITE_API int sqlite3_test_control(int op, ...){ sqlite3ShowSrcList(0); sqlite3ShowWith(0); sqlite3ShowUpsert(0); +#ifndef SQLITE_OMIT_TRIGGER sqlite3ShowTriggerStep(0); sqlite3ShowTriggerStepList(0); sqlite3ShowTrigger(0); sqlite3ShowTriggerList(0); +#endif #ifndef SQLITE_OMIT_WINDOWFUNC sqlite3ShowWindow(0); sqlite3ShowWinFunc(0); @@ -176743,7 +180675,7 @@ SQLITE_API int sqlite3_test_control(int op, ...){ ** formed and never corrupt. This flag is clear by default, indicating that ** database files might have arbitrary corruption. Setting the flag during ** testing causes certain assert() statements in the code to be activated - ** that demonstrat invariants on well-formed database files. + ** that demonstrate invariants on well-formed database files. */ case SQLITE_TESTCTRL_NEVER_CORRUPT: { sqlite3GlobalConfig.neverCorrupt = va_arg(ap, int); @@ -176897,7 +180829,7 @@ SQLITE_API int sqlite3_test_control(int op, ...){ ** ** op==0 Store the current sqlite3TreeTrace in *ptr ** op==1 Set sqlite3TreeTrace to the value *ptr - ** op==3 Store the current sqlite3WhereTrace in *ptr + ** op==2 Store the current sqlite3WhereTrace in *ptr ** op==3 Set sqlite3WhereTrace to the value *ptr */ case SQLITE_TESTCTRL_TRACEFLAGS: { @@ -176933,6 +180865,23 @@ SQLITE_API int sqlite3_test_control(int op, ...){ break; } +#if !defined(SQLITE_OMIT_WSD) + /* sqlite3_test_control(SQLITE_TESTCTRL_USELONGDOUBLE, int X); + ** + ** X<0 Make no changes to the bUseLongDouble. Just report value. + ** X==0 Disable bUseLongDouble + ** X==1 Enable bUseLongDouble + ** X==2 Set bUseLongDouble to its default value for this platform + */ + case SQLITE_TESTCTRL_USELONGDOUBLE: { + int b = va_arg(ap, int); + if( b==2 ) b = sizeof(LONGDOUBLE_TYPE)>8; + if( b>=0 ) sqlite3Config.bUseLongDouble = b>0; + rc = sqlite3Config.bUseLongDouble!=0; + break; + } +#endif + #if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_WSD) /* sqlite3_test_control(SQLITE_TESTCTRL_TUNE, id, *piValue) @@ -177233,7 +181182,7 @@ SQLITE_API int sqlite3_snapshot_get( } /* -** Open a read-transaction on the snapshot idendified by pSnapshot. +** Open a read-transaction on the snapshot identified by pSnapshot. */ SQLITE_API int sqlite3_snapshot_open( sqlite3 *db, @@ -178941,6 +182890,8 @@ SQLITE_PRIVATE int sqlite3FtsUnicodeIsalnum(int); SQLITE_PRIVATE int sqlite3FtsUnicodeIsdiacritic(int); #endif +SQLITE_PRIVATE int sqlite3Fts3ExprIterate(Fts3Expr*, int (*x)(Fts3Expr*,int,void*), void*); + #endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */ #endif /* _FTSINT_H */ @@ -183944,9 +187895,8 @@ static void fts3EvalNextRow( Fts3Expr *pExpr, /* Expr. to advance to next matching row */ int *pRc /* IN/OUT: Error code */ ){ - if( *pRc==SQLITE_OK ){ + if( *pRc==SQLITE_OK && pExpr->bEof==0 ){ int bDescDoclist = pCsr->bDesc; /* Used by DOCID_CMP() macro */ - assert( pExpr->bEof==0 ); pExpr->bStart = 1; switch( pExpr->eType ){ @@ -184422,6 +188372,22 @@ static void fts3EvalUpdateCounts(Fts3Expr *pExpr, int nCol){ } } +/* +** This is an sqlite3Fts3ExprIterate() callback. If the Fts3Expr.aMI[] array +** has not yet been allocated, allocate and zero it. Otherwise, just zero +** it. +*/ +static int fts3AllocateMSI(Fts3Expr *pExpr, int iPhrase, void *pCtx){ + Fts3Table *pTab = (Fts3Table*)pCtx; + UNUSED_PARAMETER(iPhrase); + if( pExpr->aMI==0 ){ + pExpr->aMI = (u32 *)sqlite3_malloc64(pTab->nColumn * 3 * sizeof(u32)); + if( pExpr->aMI==0 ) return SQLITE_NOMEM; + } + memset(pExpr->aMI, 0, pTab->nColumn * 3 * sizeof(u32)); + return SQLITE_OK; +} + /* ** Expression pExpr must be of type FTSQUERY_PHRASE. ** @@ -184443,7 +188409,6 @@ static int fts3EvalGatherStats( if( pExpr->aMI==0 ){ Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab; Fts3Expr *pRoot; /* Root of NEAR expression */ - Fts3Expr *p; /* Iterator used for several purposes */ sqlite3_int64 iPrevId = pCsr->iPrevId; sqlite3_int64 iDocid; @@ -184451,7 +188416,9 @@ static int fts3EvalGatherStats( /* Find the root of the NEAR expression */ pRoot = pExpr; - while( pRoot->pParent && pRoot->pParent->eType==FTSQUERY_NEAR ){ + while( pRoot->pParent + && (pRoot->pParent->eType==FTSQUERY_NEAR || pRoot->bDeferred) + ){ pRoot = pRoot->pParent; } iDocid = pRoot->iDocid; @@ -184459,14 +188426,8 @@ static int fts3EvalGatherStats( assert( pRoot->bStart ); /* Allocate space for the aMSI[] array of each FTSQUERY_PHRASE node */ - for(p=pRoot; p; p=p->pLeft){ - Fts3Expr *pE = (p->eType==FTSQUERY_PHRASE?p:p->pRight); - assert( pE->aMI==0 ); - pE->aMI = (u32 *)sqlite3_malloc64(pTab->nColumn * 3 * sizeof(u32)); - if( !pE->aMI ) return SQLITE_NOMEM; - memset(pE->aMI, 0, pTab->nColumn * 3 * sizeof(u32)); - } - + rc = sqlite3Fts3ExprIterate(pRoot, fts3AllocateMSI, (void*)pTab); + if( rc!=SQLITE_OK ) return rc; fts3EvalRestart(pCsr, pRoot, &rc); while( pCsr->isEof==0 && rc==SQLITE_OK ){ @@ -184622,6 +188583,7 @@ SQLITE_PRIVATE int sqlite3Fts3EvalPhrasePoslist( u8 bTreeEof = 0; Fts3Expr *p; /* Used to iterate from pExpr to root */ Fts3Expr *pNear; /* Most senior NEAR ancestor (or pExpr) */ + Fts3Expr *pRun; /* Closest non-deferred ancestor of pNear */ int bMatch; /* Check if this phrase descends from an OR expression node. If not, @@ -184636,25 +188598,30 @@ SQLITE_PRIVATE int sqlite3Fts3EvalPhrasePoslist( if( p->bEof ) bTreeEof = 1; } if( bOr==0 ) return SQLITE_OK; + pRun = pNear; + while( pRun->bDeferred ){ + assert( pRun->pParent ); + pRun = pRun->pParent; + } /* This is the descendent of an OR node. In this case we cannot use ** an incremental phrase. Load the entire doclist for the phrase ** into memory in this case. */ if( pPhrase->bIncr ){ - int bEofSave = pNear->bEof; - fts3EvalRestart(pCsr, pNear, &rc); - while( rc==SQLITE_OK && !pNear->bEof ){ - fts3EvalNextRow(pCsr, pNear, &rc); - if( bEofSave==0 && pNear->iDocid==iDocid ) break; + int bEofSave = pRun->bEof; + fts3EvalRestart(pCsr, pRun, &rc); + while( rc==SQLITE_OK && !pRun->bEof ){ + fts3EvalNextRow(pCsr, pRun, &rc); + if( bEofSave==0 && pRun->iDocid==iDocid ) break; } assert( rc!=SQLITE_OK || pPhrase->bIncr==0 ); - if( rc==SQLITE_OK && pNear->bEof!=bEofSave ){ + if( rc==SQLITE_OK && pRun->bEof!=bEofSave ){ rc = FTS_CORRUPT_VTAB; } } if( bTreeEof ){ - while( rc==SQLITE_OK && !pNear->bEof ){ - fts3EvalNextRow(pCsr, pNear, &rc); + while( rc==SQLITE_OK && !pRun->bEof ){ + fts3EvalNextRow(pCsr, pRun, &rc); } } if( rc!=SQLITE_OK ) return rc; @@ -191570,16 +195537,18 @@ static int fts3MsrBufferData( char *pList, i64 nList ){ - if( nList>pMsr->nBuffer ){ + if( (nList+FTS3_NODE_PADDING)>pMsr->nBuffer ){ char *pNew; - pMsr->nBuffer = nList*2; - pNew = (char *)sqlite3_realloc64(pMsr->aBuffer, pMsr->nBuffer); + int nNew = nList*2 + FTS3_NODE_PADDING; + pNew = (char *)sqlite3_realloc64(pMsr->aBuffer, nNew); if( !pNew ) return SQLITE_NOMEM; pMsr->aBuffer = pNew; + pMsr->nBuffer = nNew; } assert( nList>0 ); memcpy(pMsr->aBuffer, pList, nList); + memset(&pMsr->aBuffer[nList], 0, FTS3_NODE_PADDING); return SQLITE_OK; } @@ -193248,6 +197217,7 @@ static int fts3IncrmergeLoad( for(i=nHeight; i>=0 && rc==SQLITE_OK; i--){ NodeReader reader; + memset(&reader, 0, sizeof(reader)); pNode = &pWriter->aNodeWriter[i]; if( pNode->block.a){ @@ -194118,7 +198088,7 @@ static u64 fts3ChecksumIndex( int rc; u64 cksum = 0; - assert( *pRc==SQLITE_OK ); + if( *pRc ) return 0; memset(&filter, 0, sizeof(filter)); memset(&csr, 0, sizeof(csr)); @@ -194761,7 +198731,7 @@ typedef sqlite3_int64 i64; /* -** Used as an fts3ExprIterate() context when loading phrase doclists to +** Used as an sqlite3Fts3ExprIterate() context when loading phrase doclists to ** Fts3Expr.aDoclist[]/nDoclist. */ typedef struct LoadDoclistCtx LoadDoclistCtx; @@ -194805,7 +198775,7 @@ struct SnippetFragment { }; /* -** This type is used as an fts3ExprIterate() context object while +** This type is used as an sqlite3Fts3ExprIterate() context object while ** accumulating the data returned by the matchinfo() function. */ typedef struct MatchInfo MatchInfo; @@ -194964,7 +198934,7 @@ static void fts3GetDeltaPosition(char **pp, i64 *piPos){ } /* -** Helper function for fts3ExprIterate() (see below). +** Helper function for sqlite3Fts3ExprIterate() (see below). */ static int fts3ExprIterate2( Fts3Expr *pExpr, /* Expression to iterate phrases of */ @@ -194998,7 +198968,7 @@ static int fts3ExprIterate2( ** Otherwise, SQLITE_OK is returned after a callback has been made for ** all eligible phrase nodes. */ -static int fts3ExprIterate( +SQLITE_PRIVATE int sqlite3Fts3ExprIterate( Fts3Expr *pExpr, /* Expression to iterate phrases of */ int (*x)(Fts3Expr*,int,void*), /* Callback function to invoke for phrases */ void *pCtx /* Second argument to pass to callback */ @@ -195007,10 +198977,9 @@ static int fts3ExprIterate( return fts3ExprIterate2(pExpr, &iPhrase, x, pCtx); } - /* -** This is an fts3ExprIterate() callback used while loading the doclists -** for each phrase into Fts3Expr.aDoclist[]/nDoclist. See also +** This is an sqlite3Fts3ExprIterate() callback used while loading the +** doclists for each phrase into Fts3Expr.aDoclist[]/nDoclist. See also ** fts3ExprLoadDoclists(). */ static int fts3ExprLoadDoclistsCb(Fts3Expr *pExpr, int iPhrase, void *ctx){ @@ -195042,9 +199011,9 @@ static int fts3ExprLoadDoclists( int *pnToken /* OUT: Number of tokens in query */ ){ int rc; /* Return Code */ - LoadDoclistCtx sCtx = {0,0,0}; /* Context for fts3ExprIterate() */ + LoadDoclistCtx sCtx = {0,0,0}; /* Context for sqlite3Fts3ExprIterate() */ sCtx.pCsr = pCsr; - rc = fts3ExprIterate(pCsr->pExpr, fts3ExprLoadDoclistsCb, (void *)&sCtx); + rc = sqlite3Fts3ExprIterate(pCsr->pExpr,fts3ExprLoadDoclistsCb,(void*)&sCtx); if( pnPhrase ) *pnPhrase = sCtx.nPhrase; if( pnToken ) *pnToken = sCtx.nToken; return rc; @@ -195057,7 +199026,7 @@ static int fts3ExprPhraseCountCb(Fts3Expr *pExpr, int iPhrase, void *ctx){ } static int fts3ExprPhraseCount(Fts3Expr *pExpr){ int nPhrase = 0; - (void)fts3ExprIterate(pExpr, fts3ExprPhraseCountCb, (void *)&nPhrase); + (void)sqlite3Fts3ExprIterate(pExpr, fts3ExprPhraseCountCb, (void *)&nPhrase); return nPhrase; } @@ -195185,8 +199154,9 @@ static void fts3SnippetDetails( } /* -** This function is an fts3ExprIterate() callback used by fts3BestSnippet(). -** Each invocation populates an element of the SnippetIter.aPhrase[] array. +** This function is an sqlite3Fts3ExprIterate() callback used by +** fts3BestSnippet(). Each invocation populates an element of the +** SnippetIter.aPhrase[] array. */ static int fts3SnippetFindPositions(Fts3Expr *pExpr, int iPhrase, void *ctx){ SnippetIter *p = (SnippetIter *)ctx; @@ -195276,7 +199246,9 @@ static int fts3BestSnippet( sIter.nSnippet = nSnippet; sIter.nPhrase = nList; sIter.iCurrent = -1; - rc = fts3ExprIterate(pCsr->pExpr, fts3SnippetFindPositions, (void*)&sIter); + rc = sqlite3Fts3ExprIterate( + pCsr->pExpr, fts3SnippetFindPositions, (void*)&sIter + ); if( rc==SQLITE_OK ){ /* Set the *pmSeen output variable. */ @@ -195637,10 +199609,10 @@ static int fts3ExprLHitGather( } /* -** fts3ExprIterate() callback used to collect the "global" matchinfo stats -** for a single query. +** sqlite3Fts3ExprIterate() callback used to collect the "global" matchinfo +** stats for a single query. ** -** fts3ExprIterate() callback to load the 'global' elements of a +** sqlite3Fts3ExprIterate() callback to load the 'global' elements of a ** FTS3_MATCHINFO_HITS matchinfo array. The global stats are those elements ** of the matchinfo array that are constant for all rows returned by the ** current query. @@ -195675,7 +199647,7 @@ static int fts3ExprGlobalHitsCb( } /* -** fts3ExprIterate() callback used to collect the "local" part of the +** sqlite3Fts3ExprIterate() callback used to collect the "local" part of the ** FTS3_MATCHINFO_HITS array. The local stats are those elements of the ** array that are different for each row returned by the query. */ @@ -195871,7 +199843,7 @@ static int fts3MatchinfoLcs(Fts3Cursor *pCsr, MatchInfo *pInfo){ **/ aIter = sqlite3Fts3MallocZero(sizeof(LcsIterator) * pCsr->nPhrase); if( !aIter ) return SQLITE_NOMEM; - (void)fts3ExprIterate(pCsr->pExpr, fts3MatchinfoLcsCb, (void*)aIter); + (void)sqlite3Fts3ExprIterate(pCsr->pExpr, fts3MatchinfoLcsCb, (void*)aIter); for(i=0; inPhrase; i++){ LcsIterator *pIter = &aIter[i]; @@ -196048,11 +200020,11 @@ static int fts3MatchinfoValues( rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &pInfo->nDoc,0,0); if( rc!=SQLITE_OK ) break; } - rc = fts3ExprIterate(pExpr, fts3ExprGlobalHitsCb,(void*)pInfo); + rc = sqlite3Fts3ExprIterate(pExpr, fts3ExprGlobalHitsCb,(void*)pInfo); sqlite3Fts3EvalTestDeferred(pCsr, &rc); if( rc!=SQLITE_OK ) break; } - (void)fts3ExprIterate(pExpr, fts3ExprLocalHitsCb,(void*)pInfo); + (void)sqlite3Fts3ExprIterate(pExpr, fts3ExprLocalHitsCb,(void*)pInfo); break; } } @@ -196275,7 +200247,7 @@ struct TermOffsetCtx { }; /* -** This function is an fts3ExprIterate() callback used by sqlite3Fts3Offsets(). +** This function is an sqlite3Fts3ExprIterate() callback used by sqlite3Fts3Offsets(). */ static int fts3ExprTermOffsetInit(Fts3Expr *pExpr, int iPhrase, void *ctx){ TermOffsetCtx *p = (TermOffsetCtx *)ctx; @@ -196357,7 +200329,9 @@ SQLITE_PRIVATE void sqlite3Fts3Offsets( */ sCtx.iCol = iCol; sCtx.iTerm = 0; - rc = fts3ExprIterate(pCsr->pExpr, fts3ExprTermOffsetInit, (void*)&sCtx); + rc = sqlite3Fts3ExprIterate( + pCsr->pExpr, fts3ExprTermOffsetInit, (void*)&sCtx + ); if( rc!=SQLITE_OK ) goto offsets_out; /* Retreive the text stored in column iCol. If an SQL NULL is stored @@ -197290,25 +201264,51 @@ SQLITE_PRIVATE int sqlite3FtsUnicodeFold(int c, int eRemoveDiacritic){ ** increase for the parser. (Ubuntu14.10 gcc 4.8.4 x64 with -Os). */ static const char jsonIsSpace[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; #define fast_isspace(x) (jsonIsSpace[(unsigned char)x]) +/* +** Characters that are special to JSON. Control charaters, +** '"' and '\\'. +*/ +static const char jsonIsOk[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +}; + + #if !defined(SQLITE_DEBUG) && !defined(SQLITE_COVERAGE_TEST) # define VVA(X) #else @@ -197319,6 +201319,7 @@ static const char jsonIsSpace[] = { typedef struct JsonString JsonString; typedef struct JsonNode JsonNode; typedef struct JsonParse JsonParse; +typedef struct JsonCleanup JsonCleanup; /* An instance of this object represents a JSON string ** under construction. Really, this is a generic string accumulator @@ -197334,16 +201335,26 @@ struct JsonString { char zSpace[100]; /* Initial static space */ }; +/* A deferred cleanup task. A list of JsonCleanup objects might be +** run when the JsonParse object is destroyed. +*/ +struct JsonCleanup { + JsonCleanup *pJCNext; /* Next in a list */ + void (*xOp)(void*); /* Routine to run */ + void *pArg; /* Argument to xOp() */ +}; + /* JSON type values */ -#define JSON_NULL 0 -#define JSON_TRUE 1 -#define JSON_FALSE 2 -#define JSON_INT 3 -#define JSON_REAL 4 -#define JSON_STRING 5 -#define JSON_ARRAY 6 -#define JSON_OBJECT 7 +#define JSON_SUBST 0 /* Special edit node. Uses u.iPrev */ +#define JSON_NULL 1 +#define JSON_TRUE 2 +#define JSON_FALSE 3 +#define JSON_INT 4 +#define JSON_REAL 5 +#define JSON_STRING 6 +#define JSON_ARRAY 7 +#define JSON_OBJECT 8 /* The "subtype" set for JSON values */ #define JSON_SUBTYPE 74 /* Ascii for "J" */ @@ -197352,59 +201363,97 @@ struct JsonString { ** Names of the various JSON types: */ static const char * const jsonType[] = { + "subst", "null", "true", "false", "integer", "real", "text", "array", "object" }; /* Bit values for the JsonNode.jnFlag field */ -#define JNODE_RAW 0x01 /* Content is raw, not JSON encoded */ -#define JNODE_ESCAPE 0x02 /* Content is text with \ escapes */ -#define JNODE_REMOVE 0x04 /* Do not output */ -#define JNODE_REPLACE 0x08 /* Replace with JsonNode.u.iReplace */ -#define JNODE_PATCH 0x10 /* Patch with JsonNode.u.pPatch */ -#define JNODE_APPEND 0x20 /* More ARRAY/OBJECT entries at u.iAppend */ -#define JNODE_LABEL 0x40 /* Is a label of an object */ +#define JNODE_RAW 0x01 /* Content is raw, not JSON encoded */ +#define JNODE_ESCAPE 0x02 /* Content is text with \ escapes */ +#define JNODE_REMOVE 0x04 /* Do not output */ +#define JNODE_REPLACE 0x08 /* Target of a JSON_SUBST node */ +#define JNODE_APPEND 0x10 /* More ARRAY/OBJECT entries at u.iAppend */ +#define JNODE_LABEL 0x20 /* Is a label of an object */ +#define JNODE_JSON5 0x40 /* Node contains JSON5 enhancements */ -/* A single node of parsed JSON +/* A single node of parsed JSON. An array of these nodes describes +** a parse of JSON + edits. +** +** Use the json_parse() SQL function (available when compiled with +** -DSQLITE_DEBUG) to see a dump of complete JsonParse objects, including +** a complete listing and decoding of the array of JsonNodes. */ struct JsonNode { u8 eType; /* One of the JSON_ type values */ u8 jnFlags; /* JNODE flags */ u8 eU; /* Which union element to use */ - u32 n; /* Bytes of content, or number of sub-nodes */ + u32 n; /* Bytes of content for INT, REAL or STRING + ** Number of sub-nodes for ARRAY and OBJECT + ** Node that SUBST applies to */ union { const char *zJContent; /* 1: Content for INT, REAL, and STRING */ u32 iAppend; /* 2: More terms for ARRAY and OBJECT */ u32 iKey; /* 3: Key for ARRAY objects in json_tree() */ - u32 iReplace; /* 4: Replacement content for JNODE_REPLACE */ - JsonNode *pPatch; /* 5: Node chain of patch for JNODE_PATCH */ + u32 iPrev; /* 4: Previous SUBST node, or 0 */ } u; }; -/* A completely parsed JSON string + +/* A parsed and possibly edited JSON string. Lifecycle: +** +** 1. JSON comes in and is parsed into an array aNode[]. The original +** JSON text is stored in zJson. +** +** 2. Zero or more changes are made (via json_remove() or json_replace() +** or similar) to the aNode[] array. +** +** 3. A new, edited and mimified JSON string is generated from aNode +** and stored in zAlt. The JsonParse object always owns zAlt. +** +** Step 1 always happens. Step 2 and 3 may or may not happen, depending +** on the operation. +** +** aNode[].u.zJContent entries typically point into zJson. Hence zJson +** must remain valid for the lifespan of the parse. For edits, +** aNode[].u.zJContent might point to malloced space other than zJson. +** Entries in pClup are responsible for freeing that extra malloced space. +** +** When walking the parse tree in aNode[], edits are ignored if useMod is +** false. */ struct JsonParse { u32 nNode; /* Number of slots of aNode[] used */ u32 nAlloc; /* Number of slots of aNode[] allocated */ JsonNode *aNode; /* Array of nodes containing the parse */ - const char *zJson; /* Original JSON string */ + char *zJson; /* Original JSON string (before edits) */ + char *zAlt; /* Revised and/or mimified JSON */ u32 *aUp; /* Index of parent of each node */ - u8 oom; /* Set to true if out of memory */ - u8 nErr; /* Number of errors seen */ + JsonCleanup *pClup;/* Cleanup operations prior to freeing this object */ u16 iDepth; /* Nesting depth */ + u8 nErr; /* Number of errors seen */ + u8 oom; /* Set to true if out of memory */ + u8 bJsonIsRCStr; /* True if zJson is an RCStr */ + u8 hasNonstd; /* True if input uses non-standard features like JSON5 */ + u8 useMod; /* Actually use the edits contain inside aNode */ + u8 hasMod; /* aNode contains edits from the original zJson */ + u32 nJPRef; /* Number of references to this object */ int nJson; /* Length of the zJson string in bytes */ - u32 iHold; /* Replace cache line with the lowest iHold value */ + int nAlt; /* Length of alternative JSON string zAlt, in bytes */ + u32 iErr; /* Error location in zJson[] */ + u32 iSubst; /* Last JSON_SUBST entry in aNode[] */ + u32 iHold; /* Age of this entry in the cache for LRU replacement */ }; /* ** Maximum nesting depth of JSON for this implementation. ** ** This limit is needed to avoid a stack overflow in the recursive -** descent parser. A depth of 2000 is far deeper than any sane JSON -** should go. +** descent parser. A depth of 1000 is far deeper than any sane JSON +** should go. Historical note: This limit was 2000 prior to version 3.42.0 */ -#define JSON_MAX_DEPTH 2000 +#define JSON_MAX_DEPTH 1000 /************************************************************************** ** Utility routines for dealing with JsonString objects @@ -197427,16 +201476,14 @@ static void jsonInit(JsonString *p, sqlite3_context *pCtx){ jsonZero(p); } - /* Free all allocated memory and reset the JsonString object back to its ** initial state. */ static void jsonReset(JsonString *p){ - if( !p->bStatic ) sqlite3_free(p->zBuf); + if( !p->bStatic ) sqlite3RCStrUnref(p->zBuf); jsonZero(p); } - /* Report an out-of-memory (OOM) condition */ static void jsonOom(JsonString *p){ @@ -197453,7 +201500,7 @@ static int jsonGrow(JsonString *p, u32 N){ char *zNew; if( p->bStatic ){ if( p->bErr ) return 1; - zNew = sqlite3_malloc64(nTotal); + zNew = sqlite3RCStrNew(nTotal); if( zNew==0 ){ jsonOom(p); return SQLITE_NOMEM; @@ -197462,12 +201509,12 @@ static int jsonGrow(JsonString *p, u32 N){ p->zBuf = zNew; p->bStatic = 0; }else{ - zNew = sqlite3_realloc64(p->zBuf, nTotal); - if( zNew==0 ){ - jsonOom(p); + p->zBuf = sqlite3RCStrResize(p->zBuf, nTotal); + if( p->zBuf==0 ){ + p->bErr = 1; + jsonZero(p); return SQLITE_NOMEM; } - p->zBuf = zNew; } p->nAlloc = nTotal; return SQLITE_OK; @@ -197475,12 +201522,35 @@ static int jsonGrow(JsonString *p, u32 N){ /* Append N bytes from zIn onto the end of the JsonString string. */ -static void jsonAppendRaw(JsonString *p, const char *zIn, u32 N){ - if( N==0 ) return; - if( (N+p->nUsed >= p->nAlloc) && jsonGrow(p,N)!=0 ) return; +static SQLITE_NOINLINE void jsonAppendExpand( + JsonString *p, + const char *zIn, + u32 N +){ + assert( N>0 ); + if( jsonGrow(p,N) ) return; memcpy(p->zBuf+p->nUsed, zIn, N); p->nUsed += N; } +static void jsonAppendRaw(JsonString *p, const char *zIn, u32 N){ + if( N==0 ) return; + if( N+p->nUsed >= p->nAlloc ){ + jsonAppendExpand(p,zIn,N); + }else{ + memcpy(p->zBuf+p->nUsed, zIn, N); + p->nUsed += N; + } +} +static void jsonAppendRawNZ(JsonString *p, const char *zIn, u32 N){ + assert( N>0 ); + if( N+p->nUsed >= p->nAlloc ){ + jsonAppendExpand(p,zIn,N); + }else{ + memcpy(p->zBuf+p->nUsed, zIn, N); + p->nUsed += N; + } +} + /* Append formatted text (not to exceed N bytes) to the JsonString. */ @@ -197495,10 +201565,35 @@ static void jsonPrintf(int N, JsonString *p, const char *zFormat, ...){ /* Append a single character */ -static void jsonAppendChar(JsonString *p, char c){ - if( p->nUsed>=p->nAlloc && jsonGrow(p,1)!=0 ) return; +static SQLITE_NOINLINE void jsonAppendCharExpand(JsonString *p, char c){ + if( jsonGrow(p,1) ) return; p->zBuf[p->nUsed++] = c; } +static void jsonAppendChar(JsonString *p, char c){ + if( p->nUsed>=p->nAlloc ){ + jsonAppendCharExpand(p,c); + }else{ + p->zBuf[p->nUsed++] = c; + } +} + +/* Try to force the string to be a zero-terminated RCStr string. +** +** Return true on success. Return false if an OOM prevents this +** from happening. +*/ +static int jsonForceRCStr(JsonString *p){ + jsonAppendChar(p, 0); + if( p->bErr ) return 0; + p->nUsed--; + if( p->bStatic==0 ) return 1; + p->nAlloc = 0; + p->nUsed++; + jsonGrow(p, p->nUsed); + p->nUsed--; + return p->bStatic==0; +} + /* Append a comma separator to the output buffer, if the previous ** character is not '[' or '{'. @@ -197507,7 +201602,8 @@ static void jsonAppendSeparator(JsonString *p){ char c; if( p->nUsed==0 ) return; c = p->zBuf[p->nUsed-1]; - if( c!='[' && c!='{' ) jsonAppendChar(p, ','); + if( c=='[' || c=='{' ) return; + jsonAppendChar(p, ','); } /* Append the N-byte string in zIn to the end of the JsonString string @@ -197521,11 +201617,16 @@ static void jsonAppendString(JsonString *p, const char *zIn, u32 N){ p->zBuf[p->nUsed++] = '"'; for(i=0; izBuf[p->nUsed++] = c; + }else if( c=='"' || c=='\\' ){ json_simple_escape: if( (p->nUsed+N+3-i > p->nAlloc) && jsonGrow(p,N+3-i)!=0 ) return; p->zBuf[p->nUsed++] = '\\'; - }else if( c<=0x1f ){ + p->zBuf[p->nUsed++] = c; + }else if( c=='\'' ){ + p->zBuf[p->nUsed++] = c; + }else{ static const char aSpecial[] = { 0, 0, 0, 0, 0, 0, 0, 0, 'b', 't', 'n', 0, 'f', 'r', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -197536,6 +201637,7 @@ static void jsonAppendString(JsonString *p, const char *zIn, u32 N){ assert( aSpecial['\n']=='n' ); assert( aSpecial['\r']=='r' ); assert( aSpecial['\t']=='t' ); + assert( c>=0 && czBuf[p->nUsed++] = 'u'; p->zBuf[p->nUsed++] = '0'; p->zBuf[p->nUsed++] = '0'; - p->zBuf[p->nUsed++] = '0' + (c>>4); - c = "0123456789abcdef"[c&0xf]; + p->zBuf[p->nUsed++] = "0123456789abcdef"[c>>4]; + p->zBuf[p->nUsed++] = "0123456789abcdef"[c&0xf]; } - p->zBuf[p->nUsed++] = c; } p->zBuf[p->nUsed++] = '"'; assert( p->nUsednAlloc ); } +/* +** The zIn[0..N] string is a JSON5 string literal. Append to p a translation +** of the string literal that standard JSON and that omits all JSON5 +** features. +*/ +static void jsonAppendNormalizedString(JsonString *p, const char *zIn, u32 N){ + u32 i; + jsonAppendChar(p, '"'); + zIn++; + N -= 2; + while( N>0 ){ + for(i=0; i0 ){ + jsonAppendRawNZ(p, zIn, i); + zIn += i; + N -= i; + if( N==0 ) break; + } + assert( zIn[0]=='\\' ); + switch( (u8)zIn[1] ){ + case '\'': + jsonAppendChar(p, '\''); + break; + case 'v': + jsonAppendRawNZ(p, "\\u0009", 6); + break; + case 'x': + jsonAppendRawNZ(p, "\\u00", 4); + jsonAppendRawNZ(p, &zIn[2], 2); + zIn += 2; + N -= 2; + break; + case '0': + jsonAppendRawNZ(p, "\\u0000", 6); + break; + case '\r': + if( zIn[2]=='\n' ){ + zIn++; + N--; + } + break; + case '\n': + break; + case 0xe2: + assert( N>=4 ); + assert( 0x80==(u8)zIn[2] ); + assert( 0xa8==(u8)zIn[3] || 0xa9==(u8)zIn[3] ); + zIn += 2; + N -= 2; + break; + default: + jsonAppendRawNZ(p, zIn, 2); + break; + } + zIn += 2; + N -= 2; + } + jsonAppendChar(p, '"'); +} + +/* +** The zIn[0..N] string is a JSON5 integer literal. Append to p a translation +** of the string literal that standard JSON and that omits all JSON5 +** features. +*/ +static void jsonAppendNormalizedInt(JsonString *p, const char *zIn, u32 N){ + if( zIn[0]=='+' ){ + zIn++; + N--; + }else if( zIn[0]=='-' ){ + jsonAppendChar(p, '-'); + zIn++; + N--; + } + if( zIn[0]=='0' && (zIn[1]=='x' || zIn[1]=='X') ){ + sqlite3_int64 i = 0; + int rc = sqlite3DecOrHexToI64(zIn, &i); + if( rc<=1 ){ + jsonPrintf(100,p,"%lld",i); + }else{ + assert( rc==2 ); + jsonAppendRawNZ(p, "9.0e999", 7); + } + return; + } + assert( N>0 ); + jsonAppendRawNZ(p, zIn, N); +} + +/* +** The zIn[0..N] string is a JSON5 real literal. Append to p a translation +** of the string literal that standard JSON and that omits all JSON5 +** features. +*/ +static void jsonAppendNormalizedReal(JsonString *p, const char *zIn, u32 N){ + u32 i; + if( zIn[0]=='+' ){ + zIn++; + N--; + }else if( zIn[0]=='-' ){ + jsonAppendChar(p, '-'); + zIn++; + N--; + } + if( zIn[0]=='.' ){ + jsonAppendChar(p, '0'); + } + for(i=0; i0 ){ + jsonAppendRawNZ(p, zIn, N); + } +} + + + /* ** Append a function parameter value to the JSON string under ** construction. @@ -197564,11 +201789,14 @@ static void jsonAppendValue( ){ switch( sqlite3_value_type(pValue) ){ case SQLITE_NULL: { - jsonAppendRaw(p, "null", 4); + jsonAppendRawNZ(p, "null", 4); break; } - case SQLITE_INTEGER: case SQLITE_FLOAT: { + jsonPrintf(100, p, "%!0.15g", sqlite3_value_double(pValue)); + break; + } + case SQLITE_INTEGER: { const char *z = (const char*)sqlite3_value_text(pValue); u32 n = (u32)sqlite3_value_bytes(pValue); jsonAppendRaw(p, z, n); @@ -197597,15 +201825,25 @@ static void jsonAppendValue( /* Make the JSON in p the result of the SQL function. +** +** The JSON string is reset. */ static void jsonResult(JsonString *p){ if( p->bErr==0 ){ - sqlite3_result_text64(p->pCtx, p->zBuf, p->nUsed, - p->bStatic ? SQLITE_TRANSIENT : sqlite3_free, - SQLITE_UTF8); - jsonZero(p); + if( p->bStatic ){ + sqlite3_result_text64(p->pCtx, p->zBuf, p->nUsed, + SQLITE_TRANSIENT, SQLITE_UTF8); + }else if( jsonForceRCStr(p) ){ + sqlite3RCStrRef(p->zBuf); + sqlite3_result_text64(p->pCtx, p->zBuf, p->nUsed, + (void(*)(void*))sqlite3RCStrUnref, + SQLITE_UTF8); + } } - assert( p->bStatic ); + if( p->bErr==1 ){ + sqlite3_result_error_nomem(p->pCtx); + } + jsonReset(p); } /************************************************************************** @@ -197630,20 +201868,73 @@ static u32 jsonNodeSize(JsonNode *pNode){ ** delete the JsonParse object itself. */ static void jsonParseReset(JsonParse *pParse){ - sqlite3_free(pParse->aNode); - pParse->aNode = 0; + while( pParse->pClup ){ + JsonCleanup *pTask = pParse->pClup; + pParse->pClup = pTask->pJCNext; + pTask->xOp(pTask->pArg); + sqlite3_free(pTask); + } + assert( pParse->nJPRef<=1 ); + if( pParse->aNode ){ + sqlite3_free(pParse->aNode); + pParse->aNode = 0; + } pParse->nNode = 0; pParse->nAlloc = 0; - sqlite3_free(pParse->aUp); - pParse->aUp = 0; + if( pParse->aUp ){ + sqlite3_free(pParse->aUp); + pParse->aUp = 0; + } + if( pParse->bJsonIsRCStr ){ + sqlite3RCStrUnref(pParse->zJson); + pParse->zJson = 0; + pParse->bJsonIsRCStr = 0; + } + if( pParse->zAlt ){ + sqlite3RCStrUnref(pParse->zAlt); + pParse->zAlt = 0; + } } /* ** Free a JsonParse object that was obtained from sqlite3_malloc(). +** +** Note that destroying JsonParse might call sqlite3RCStrUnref() to +** destroy the zJson value. The RCStr object might recursively invoke +** JsonParse to destroy this pParse object again. Take care to ensure +** that this recursive destructor sequence terminates harmlessly. */ static void jsonParseFree(JsonParse *pParse){ - jsonParseReset(pParse); - sqlite3_free(pParse); + if( pParse->nJPRef>1 ){ + pParse->nJPRef--; + }else{ + jsonParseReset(pParse); + sqlite3_free(pParse); + } +} + +/* +** Add a cleanup task to the JsonParse object. +** +** If an OOM occurs, the cleanup operation happens immediately +** and this function returns SQLITE_NOMEM. +*/ +static int jsonParseAddCleanup( + JsonParse *pParse, /* Add the cleanup task to this parser */ + void(*xOp)(void*), /* The cleanup task */ + void *pArg /* Argument to the cleanup */ +){ + JsonCleanup *pTask = sqlite3_malloc64( sizeof(*pTask) ); + if( pTask==0 ){ + pParse->oom = 1; + xOp(pArg); + return SQLITE_ERROR; + } + pTask->pJCNext = pParse->pClup; + pParse->pClup = pTask; + pTask->xOp = xOp; + pTask->pArg = pArg; + return SQLITE_OK; } /* @@ -197652,46 +201943,76 @@ static void jsonParseFree(JsonParse *pParse){ ** the number of JsonNode objects that are encoded. */ static void jsonRenderNode( + JsonParse *pParse, /* the complete parse of the JSON */ JsonNode *pNode, /* The node to render */ - JsonString *pOut, /* Write JSON here */ - sqlite3_value **aReplace /* Replacement values */ + JsonString *pOut /* Write JSON here */ ){ assert( pNode!=0 ); - if( pNode->jnFlags & (JNODE_REPLACE|JNODE_PATCH) ){ - if( (pNode->jnFlags & JNODE_REPLACE)!=0 && ALWAYS(aReplace!=0) ){ - assert( pNode->eU==4 ); - jsonAppendValue(pOut, aReplace[pNode->u.iReplace]); - return; + while( (pNode->jnFlags & JNODE_REPLACE)!=0 && pParse->useMod ){ + u32 idx = (u32)(pNode - pParse->aNode); + u32 i = pParse->iSubst; + while( 1 /*exit-by-break*/ ){ + assert( inNode ); + assert( pParse->aNode[i].eType==JSON_SUBST ); + assert( pParse->aNode[i].eU==4 ); + assert( pParse->aNode[i].u.iPrevaNode[i].n==idx ){ + pNode = &pParse->aNode[i+1]; + break; + } + i = pParse->aNode[i].u.iPrev; } - assert( pNode->eU==5 ); - pNode = pNode->u.pPatch; } switch( pNode->eType ){ default: { assert( pNode->eType==JSON_NULL ); - jsonAppendRaw(pOut, "null", 4); + jsonAppendRawNZ(pOut, "null", 4); break; } case JSON_TRUE: { - jsonAppendRaw(pOut, "true", 4); + jsonAppendRawNZ(pOut, "true", 4); break; } case JSON_FALSE: { - jsonAppendRaw(pOut, "false", 5); + jsonAppendRawNZ(pOut, "false", 5); break; } case JSON_STRING: { + assert( pNode->eU==1 ); if( pNode->jnFlags & JNODE_RAW ){ - assert( pNode->eU==1 ); - jsonAppendString(pOut, pNode->u.zJContent, pNode->n); - break; + if( pNode->jnFlags & JNODE_LABEL ){ + jsonAppendChar(pOut, '"'); + jsonAppendRaw(pOut, pNode->u.zJContent, pNode->n); + jsonAppendChar(pOut, '"'); + }else{ + jsonAppendString(pOut, pNode->u.zJContent, pNode->n); + } + }else if( pNode->jnFlags & JNODE_JSON5 ){ + jsonAppendNormalizedString(pOut, pNode->u.zJContent, pNode->n); + }else{ + assert( pNode->n>0 ); + jsonAppendRawNZ(pOut, pNode->u.zJContent, pNode->n); } - /* no break */ deliberate_fall_through + break; + } + case JSON_REAL: { + assert( pNode->eU==1 ); + if( pNode->jnFlags & JNODE_JSON5 ){ + jsonAppendNormalizedReal(pOut, pNode->u.zJContent, pNode->n); + }else{ + assert( pNode->n>0 ); + jsonAppendRawNZ(pOut, pNode->u.zJContent, pNode->n); + } + break; } - case JSON_REAL: case JSON_INT: { assert( pNode->eU==1 ); - jsonAppendRaw(pOut, pNode->u.zJContent, pNode->n); + if( pNode->jnFlags & JNODE_JSON5 ){ + jsonAppendNormalizedInt(pOut, pNode->u.zJContent, pNode->n); + }else{ + assert( pNode->n>0 ); + jsonAppendRawNZ(pOut, pNode->u.zJContent, pNode->n); + } break; } case JSON_ARRAY: { @@ -197699,15 +202020,16 @@ static void jsonRenderNode( jsonAppendChar(pOut, '['); for(;;){ while( j<=pNode->n ){ - if( (pNode[j].jnFlags & JNODE_REMOVE)==0 ){ + if( (pNode[j].jnFlags & JNODE_REMOVE)==0 || pParse->useMod==0 ){ jsonAppendSeparator(pOut); - jsonRenderNode(&pNode[j], pOut, aReplace); + jsonRenderNode(pParse, &pNode[j], pOut); } j += jsonNodeSize(&pNode[j]); } if( (pNode->jnFlags & JNODE_APPEND)==0 ) break; + if( pParse->useMod==0 ) break; assert( pNode->eU==2 ); - pNode = &pNode[pNode->u.iAppend]; + pNode = &pParse->aNode[pNode->u.iAppend]; j = 1; } jsonAppendChar(pOut, ']'); @@ -197718,17 +202040,18 @@ static void jsonRenderNode( jsonAppendChar(pOut, '{'); for(;;){ while( j<=pNode->n ){ - if( (pNode[j+1].jnFlags & JNODE_REMOVE)==0 ){ + if( (pNode[j+1].jnFlags & JNODE_REMOVE)==0 || pParse->useMod==0 ){ jsonAppendSeparator(pOut); - jsonRenderNode(&pNode[j], pOut, aReplace); + jsonRenderNode(pParse, &pNode[j], pOut); jsonAppendChar(pOut, ':'); - jsonRenderNode(&pNode[j+1], pOut, aReplace); + jsonRenderNode(pParse, &pNode[j+1], pOut); } j += 1 + jsonNodeSize(&pNode[j+1]); } if( (pNode->jnFlags & JNODE_APPEND)==0 ) break; + if( pParse->useMod==0 ) break; assert( pNode->eU==2 ); - pNode = &pNode[pNode->u.iAppend]; + pNode = &pParse->aNode[pNode->u.iAppend]; j = 1; } jsonAppendChar(pOut, '}'); @@ -197738,18 +202061,29 @@ static void jsonRenderNode( } /* -** Return a JsonNode and all its descendents as a JSON string. +** Return a JsonNode and all its descendants as a JSON string. */ static void jsonReturnJson( + JsonParse *pParse, /* The complete JSON */ JsonNode *pNode, /* Node to return */ sqlite3_context *pCtx, /* Return value for this function */ - sqlite3_value **aReplace /* Array of replacement values */ + int bGenerateAlt /* Also store the rendered text in zAlt */ ){ JsonString s; - jsonInit(&s, pCtx); - jsonRenderNode(pNode, &s, aReplace); - jsonResult(&s); - sqlite3_result_subtype(pCtx, JSON_SUBTYPE); + if( pParse->oom ){ + sqlite3_result_error_nomem(pCtx); + return; + } + if( pParse->nErr==0 ){ + jsonInit(&s, pCtx); + jsonRenderNode(pParse, pNode, &s); + if( bGenerateAlt && pParse->zAlt==0 && jsonForceRCStr(&s) ){ + pParse->zAlt = sqlite3RCStrRef(s.zBuf); + pParse->nAlt = s.nUsed; + } + jsonResult(&s); + sqlite3_result_subtype(pCtx, JSON_SUBTYPE); + } } /* @@ -197787,9 +202121,9 @@ static u32 jsonHexToInt4(const char *z){ ** Make the JsonNode the return value of the function. */ static void jsonReturn( + JsonParse *pParse, /* Complete JSON parse tree */ JsonNode *pNode, /* Node to return */ - sqlite3_context *pCtx, /* Return value for this function */ - sqlite3_value **aReplace /* Array of replacement values */ + sqlite3_context *pCtx /* Return value for this function */ ){ switch( pNode->eType ){ default: { @@ -197807,59 +202141,40 @@ static void jsonReturn( } case JSON_INT: { sqlite3_int64 i = 0; + int rc; + int bNeg = 0; const char *z; + assert( pNode->eU==1 ); z = pNode->u.zJContent; - if( z[0]=='-' ){ z++; } - while( z[0]>='0' && z[0]<='9' ){ - unsigned v = *(z++) - '0'; - if( i>=LARGEST_INT64/10 ){ - if( i>LARGEST_INT64/10 ) goto int_as_real; - if( z[0]>='0' && z[0]<='9' ) goto int_as_real; - if( v==9 ) goto int_as_real; - if( v==8 ){ - if( pNode->u.zJContent[0]=='-' ){ - sqlite3_result_int64(pCtx, SMALLEST_INT64); - goto int_done; - }else{ - goto int_as_real; - } - } - } - i = i*10 + v; + if( z[0]=='-' ){ z++; bNeg = 1; } + else if( z[0]=='+' ){ z++; } + rc = sqlite3DecOrHexToI64(z, &i); + if( rc<=1 ){ + sqlite3_result_int64(pCtx, bNeg ? -i : i); + }else if( rc==3 && bNeg ){ + sqlite3_result_int64(pCtx, SMALLEST_INT64); + }else{ + goto to_double; } - if( pNode->u.zJContent[0]=='-' ){ i = -i; } - sqlite3_result_int64(pCtx, i); - int_done: break; - int_as_real: ; /* no break */ deliberate_fall_through } case JSON_REAL: { double r; -#ifdef SQLITE_AMALGAMATION const char *z; assert( pNode->eU==1 ); + to_double: z = pNode->u.zJContent; sqlite3AtoF(z, &r, sqlite3Strlen30(z), SQLITE_UTF8); -#else - assert( pNode->eU==1 ); - r = strtod(pNode->u.zJContent, 0); -#endif sqlite3_result_double(pCtx, r); break; } case JSON_STRING: { -#if 0 /* Never happens because JNODE_RAW is only set by json_set(), - ** json_insert() and json_replace() and those routines do not - ** call jsonReturn() */ if( pNode->jnFlags & JNODE_RAW ){ assert( pNode->eU==1 ); sqlite3_result_text(pCtx, pNode->u.zJContent, pNode->n, SQLITE_TRANSIENT); - }else -#endif - assert( (pNode->jnFlags & JNODE_RAW)==0 ); - if( (pNode->jnFlags & JNODE_ESCAPE)==0 ){ + }else if( (pNode->jnFlags & JNODE_ESCAPE)==0 ){ /* JSON formatted without any backslash-escapes */ assert( pNode->eU==1 ); sqlite3_result_text(pCtx, pNode->u.zJContent+1, pNode->n-2, @@ -197871,18 +202186,17 @@ static void jsonReturn( const char *z; char *zOut; u32 j; + u32 nOut = n; assert( pNode->eU==1 ); z = pNode->u.zJContent; - zOut = sqlite3_malloc( n+1 ); + zOut = sqlite3_malloc( nOut+1 ); if( zOut==0 ){ sqlite3_result_error_nomem(pCtx); break; } for(i=1, j=0; iaNode after first expanding the +** size of the aNode array. Return the index of the new node. +** +** If an OOM error occurs, set pParse->oom and return -1. +*/ static JSON_NOINLINE int jsonParseAddNodeExpand( JsonParse *pParse, /* Append the node to this object */ u32 eType, /* Node type */ @@ -197975,7 +202313,7 @@ static JSON_NOINLINE int jsonParseAddNodeExpand( pParse->oom = 1; return -1; } - pParse->nAlloc = nNew; + pParse->nAlloc = sqlite3_msize(pNew)/sizeof(JsonNode); pParse->aNode = pNew; assert( pParse->nNodenAlloc ); return jsonParseAddNode(pParse, eType, n, zContent); @@ -197993,34 +202331,239 @@ static int jsonParseAddNode( const char *zContent /* Content */ ){ JsonNode *p; - if( pParse->aNode==0 || pParse->nNode>=pParse->nAlloc ){ + assert( pParse->aNode!=0 || pParse->nNode>=pParse->nAlloc ); + if( pParse->nNode>=pParse->nAlloc ){ return jsonParseAddNodeExpand(pParse, eType, n, zContent); } + assert( pParse->aNode!=0 ); p = &pParse->aNode[pParse->nNode]; - p->eType = (u8)eType; - p->jnFlags = 0; + assert( p!=0 ); + p->eType = (u8)(eType & 0xff); + p->jnFlags = (u8)(eType >> 8); VVA( p->eU = zContent ? 1 : 0 ); p->n = n; p->u.zJContent = zContent; return pParse->nNode++; } +/* +** Add an array of new nodes to the current pParse->aNode array. +** Return the index of the first node added. +** +** If an OOM error occurs, set pParse->oom. +*/ +static void jsonParseAddNodeArray( + JsonParse *pParse, /* Append the node to this object */ + JsonNode *aNode, /* Array of nodes to add */ + u32 nNode /* Number of elements in aNew */ +){ + assert( aNode!=0 ); + assert( nNode>=1 ); + if( pParse->nNode + nNode > pParse->nAlloc ){ + u32 nNew = pParse->nNode + nNode; + JsonNode *aNew = sqlite3_realloc64(pParse->aNode, nNew*sizeof(JsonNode)); + if( aNew==0 ){ + pParse->oom = 1; + return; + } + pParse->nAlloc = sqlite3_msize(aNew)/sizeof(JsonNode); + pParse->aNode = aNew; + } + memcpy(&pParse->aNode[pParse->nNode], aNode, nNode*sizeof(JsonNode)); + pParse->nNode += nNode; +} + +/* +** Add a new JSON_SUBST node. The node immediately following +** this new node will be the substitute content for iNode. +*/ +static int jsonParseAddSubstNode( + JsonParse *pParse, /* Add the JSON_SUBST here */ + u32 iNode /* References this node */ +){ + int idx = jsonParseAddNode(pParse, JSON_SUBST, iNode, 0); + if( pParse->oom ) return -1; + pParse->aNode[iNode].jnFlags |= JNODE_REPLACE; + pParse->aNode[idx].eU = 4; + pParse->aNode[idx].u.iPrev = pParse->iSubst; + pParse->iSubst = idx; + pParse->hasMod = 1; + pParse->useMod = 1; + return idx; +} + +/* +** Return true if z[] begins with 2 (or more) hexadecimal digits +*/ +static int jsonIs2Hex(const char *z){ + return sqlite3Isxdigit(z[0]) && sqlite3Isxdigit(z[1]); +} + /* ** Return true if z[] begins with 4 (or more) hexadecimal digits */ static int jsonIs4Hex(const char *z){ - int i; - for(i=0; i<4; i++) if( !sqlite3Isxdigit(z[i]) ) return 0; - return 1; + return jsonIs2Hex(z) && jsonIs2Hex(&z[2]); +} + +/* +** Return the number of bytes of JSON5 whitespace at the beginning of +** the input string z[]. +** +** JSON5 whitespace consists of any of the following characters: +** +** Unicode UTF-8 Name +** U+0009 09 horizontal tab +** U+000a 0a line feed +** U+000b 0b vertical tab +** U+000c 0c form feed +** U+000d 0d carriage return +** U+0020 20 space +** U+00a0 c2 a0 non-breaking space +** U+1680 e1 9a 80 ogham space mark +** U+2000 e2 80 80 en quad +** U+2001 e2 80 81 em quad +** U+2002 e2 80 82 en space +** U+2003 e2 80 83 em space +** U+2004 e2 80 84 three-per-em space +** U+2005 e2 80 85 four-per-em space +** U+2006 e2 80 86 six-per-em space +** U+2007 e2 80 87 figure space +** U+2008 e2 80 88 punctuation space +** U+2009 e2 80 89 thin space +** U+200a e2 80 8a hair space +** U+2028 e2 80 a8 line separator +** U+2029 e2 80 a9 paragraph separator +** U+202f e2 80 af narrow no-break space (NNBSP) +** U+205f e2 81 9f medium mathematical space (MMSP) +** U+3000 e3 80 80 ideographical space +** U+FEFF ef bb bf byte order mark +** +** In addition, comments between '/', '*' and '*', '/' and +** from '/', '/' to end-of-line are also considered to be whitespace. +*/ +static int json5Whitespace(const char *zIn){ + int n = 0; + const u8 *z = (u8*)zIn; + while( 1 /*exit by "goto whitespace_done"*/ ){ + switch( z[n] ){ + case 0x09: + case 0x0a: + case 0x0b: + case 0x0c: + case 0x0d: + case 0x20: { + n++; + break; + } + case '/': { + if( z[n+1]=='*' && z[n+2]!=0 ){ + int j; + for(j=n+3; z[j]!='/' || z[j-1]!='*'; j++){ + if( z[j]==0 ) goto whitespace_done; + } + n = j+1; + break; + }else if( z[n+1]=='/' ){ + int j; + char c; + for(j=n+2; (c = z[j])!=0; j++){ + if( c=='\n' || c=='\r' ) break; + if( 0xe2==(u8)c && 0x80==(u8)z[j+1] + && (0xa8==(u8)z[j+2] || 0xa9==(u8)z[j+2]) + ){ + j += 2; + break; + } + } + n = j; + if( z[n] ) n++; + break; + } + goto whitespace_done; + } + case 0xc2: { + if( z[n+1]==0xa0 ){ + n += 2; + break; + } + goto whitespace_done; + } + case 0xe1: { + if( z[n+1]==0x9a && z[n+2]==0x80 ){ + n += 3; + break; + } + goto whitespace_done; + } + case 0xe2: { + if( z[n+1]==0x80 ){ + u8 c = z[n+2]; + if( c<0x80 ) goto whitespace_done; + if( c<=0x8a || c==0xa8 || c==0xa9 || c==0xaf ){ + n += 3; + break; + } + }else if( z[n+1]==0x81 && z[n+2]==0x9f ){ + n += 3; + break; + } + goto whitespace_done; + } + case 0xe3: { + if( z[n+1]==0x80 && z[n+2]==0x80 ){ + n += 3; + break; + } + goto whitespace_done; + } + case 0xef: { + if( z[n+1]==0xbb && z[n+2]==0xbf ){ + n += 3; + break; + } + goto whitespace_done; + } + default: { + goto whitespace_done; + } + } + } + whitespace_done: + return n; } +/* +** Extra floating-point literals to allow in JSON. +*/ +static const struct NanInfName { + char c1; + char c2; + char n; + char eType; + char nRepl; + char *zMatch; + char *zRepl; +} aNanInfName[] = { + { 'i', 'I', 3, JSON_REAL, 7, "inf", "9.0e999" }, + { 'i', 'I', 8, JSON_REAL, 7, "infinity", "9.0e999" }, + { 'n', 'N', 3, JSON_NULL, 4, "NaN", "null" }, + { 'q', 'Q', 4, JSON_NULL, 4, "QNaN", "null" }, + { 's', 'S', 4, JSON_NULL, 4, "SNaN", "null" }, +}; + /* ** Parse a single JSON value which begins at pParse->zJson[i]. Return the ** index of the first character past the end of the value parsed. ** -** Return negative for a syntax error. Special cases: return -2 if the -** first non-whitespace character is '}' and return -3 if the first -** non-whitespace character is ']'. +** Special return values: +** +** 0 End of input +** -1 Syntax error +** -2 '}' seen +** -3 ']' seen +** -4 ',' seen +** -5 ':' seen */ static int jsonParseValue(JsonParse *pParse, u32 i){ char c; @@ -198029,175 +202572,457 @@ static int jsonParseValue(JsonParse *pParse, u32 i){ int x; JsonNode *pNode; const char *z = pParse->zJson; - while( fast_isspace(z[i]) ){ i++; } - if( (c = z[i])=='{' ){ +json_parse_restart: + switch( (u8)z[i] ){ + case '{': { /* Parse object */ iThis = jsonParseAddNode(pParse, JSON_OBJECT, 0, 0); if( iThis<0 ) return -1; + if( ++pParse->iDepth > JSON_MAX_DEPTH ){ + pParse->iErr = i; + return -1; + } for(j=i+1;;j++){ - while( fast_isspace(z[j]) ){ j++; } - if( ++pParse->iDepth > JSON_MAX_DEPTH ) return -1; + u32 nNode = pParse->nNode; x = jsonParseValue(pParse, j); - if( x<0 ){ - pParse->iDepth--; - if( x==(-2) && pParse->nNode==(u32)iThis+1 ) return j+1; - return -1; + if( x<=0 ){ + if( x==(-2) ){ + j = pParse->iErr; + if( pParse->nNode!=(u32)iThis+1 ) pParse->hasNonstd = 1; + break; + } + j += json5Whitespace(&z[j]); + if( sqlite3JsonId1(z[j]) + || (z[j]=='\\' && z[j+1]=='u' && jsonIs4Hex(&z[j+2])) + ){ + int k = j+1; + while( (sqlite3JsonId2(z[k]) && json5Whitespace(&z[k])==0) + || (z[k]=='\\' && z[k+1]=='u' && jsonIs4Hex(&z[k+2])) + ){ + k++; + } + jsonParseAddNode(pParse, JSON_STRING | (JNODE_RAW<<8), k-j, &z[j]); + pParse->hasNonstd = 1; + x = k; + }else{ + if( x!=-1 ) pParse->iErr = j; + return -1; + } } if( pParse->oom ) return -1; - pNode = &pParse->aNode[pParse->nNode-1]; - if( pNode->eType!=JSON_STRING ) return -1; + pNode = &pParse->aNode[nNode]; + if( pNode->eType!=JSON_STRING ){ + pParse->iErr = j; + return -1; + } pNode->jnFlags |= JNODE_LABEL; j = x; - while( fast_isspace(z[j]) ){ j++; } - if( z[j]!=':' ) return -1; - j++; + if( z[j]==':' ){ + j++; + }else{ + if( fast_isspace(z[j]) ){ + do{ j++; }while( fast_isspace(z[j]) ); + if( z[j]==':' ){ + j++; + goto parse_object_value; + } + } + x = jsonParseValue(pParse, j); + if( x!=(-5) ){ + if( x!=(-1) ) pParse->iErr = j; + return -1; + } + j = pParse->iErr+1; + } + parse_object_value: x = jsonParseValue(pParse, j); - pParse->iDepth--; - if( x<0 ) return -1; + if( x<=0 ){ + if( x!=(-1) ) pParse->iErr = j; + return -1; + } j = x; - while( fast_isspace(z[j]) ){ j++; } - c = z[j]; - if( c==',' ) continue; - if( c!='}' ) return -1; - break; + if( z[j]==',' ){ + continue; + }else if( z[j]=='}' ){ + break; + }else{ + if( fast_isspace(z[j]) ){ + do{ j++; }while( fast_isspace(z[j]) ); + if( z[j]==',' ){ + continue; + }else if( z[j]=='}' ){ + break; + } + } + x = jsonParseValue(pParse, j); + if( x==(-4) ){ + j = pParse->iErr; + continue; + } + if( x==(-2) ){ + j = pParse->iErr; + break; + } + } + pParse->iErr = j; + return -1; } pParse->aNode[iThis].n = pParse->nNode - (u32)iThis - 1; + pParse->iDepth--; return j+1; - }else if( c=='[' ){ + } + case '[': { /* Parse array */ iThis = jsonParseAddNode(pParse, JSON_ARRAY, 0, 0); if( iThis<0 ) return -1; + if( ++pParse->iDepth > JSON_MAX_DEPTH ){ + pParse->iErr = i; + return -1; + } memset(&pParse->aNode[iThis].u, 0, sizeof(pParse->aNode[iThis].u)); for(j=i+1;;j++){ - while( fast_isspace(z[j]) ){ j++; } - if( ++pParse->iDepth > JSON_MAX_DEPTH ) return -1; x = jsonParseValue(pParse, j); - pParse->iDepth--; - if( x<0 ){ - if( x==(-3) && pParse->nNode==(u32)iThis+1 ) return j+1; + if( x<=0 ){ + if( x==(-3) ){ + j = pParse->iErr; + if( pParse->nNode!=(u32)iThis+1 ) pParse->hasNonstd = 1; + break; + } + if( x!=(-1) ) pParse->iErr = j; return -1; } j = x; - while( fast_isspace(z[j]) ){ j++; } - c = z[j]; - if( c==',' ) continue; - if( c!=']' ) return -1; - break; + if( z[j]==',' ){ + continue; + }else if( z[j]==']' ){ + break; + }else{ + if( fast_isspace(z[j]) ){ + do{ j++; }while( fast_isspace(z[j]) ); + if( z[j]==',' ){ + continue; + }else if( z[j]==']' ){ + break; + } + } + x = jsonParseValue(pParse, j); + if( x==(-4) ){ + j = pParse->iErr; + continue; + } + if( x==(-3) ){ + j = pParse->iErr; + break; + } + } + pParse->iErr = j; + return -1; } pParse->aNode[iThis].n = pParse->nNode - (u32)iThis - 1; + pParse->iDepth--; return j+1; - }else if( c=='"' ){ + } + case '\'': { + u8 jnFlags; + char cDelim; + pParse->hasNonstd = 1; + jnFlags = JNODE_JSON5; + goto parse_string; + case '"': /* Parse string */ - u8 jnFlags = 0; - j = i+1; - for(;;){ + jnFlags = 0; + parse_string: + cDelim = z[i]; + for(j=i+1; 1; j++){ + if( jsonIsOk[(unsigned char)z[j]] ) continue; c = z[j]; - if( (c & ~0x1f)==0 ){ - /* Control characters are not allowed in strings */ - return -1; - } - if( c=='\\' ){ + if( c==cDelim ){ + break; + }else if( c=='\\' ){ c = z[++j]; if( c=='"' || c=='\\' || c=='/' || c=='b' || c=='f' || c=='n' || c=='r' || c=='t' - || (c=='u' && jsonIs4Hex(z+j+1)) ){ - jnFlags = JNODE_ESCAPE; + || (c=='u' && jsonIs4Hex(&z[j+1])) ){ + jnFlags |= JNODE_ESCAPE; + }else if( c=='\'' || c=='0' || c=='v' || c=='\n' + || (0xe2==(u8)c && 0x80==(u8)z[j+1] + && (0xa8==(u8)z[j+2] || 0xa9==(u8)z[j+2])) + || (c=='x' && jsonIs2Hex(&z[j+1])) ){ + jnFlags |= (JNODE_ESCAPE|JNODE_JSON5); + pParse->hasNonstd = 1; + }else if( c=='\r' ){ + if( z[j+1]=='\n' ) j++; + jnFlags |= (JNODE_ESCAPE|JNODE_JSON5); + pParse->hasNonstd = 1; }else{ + pParse->iErr = j; return -1; } - }else if( c=='"' ){ - break; + }else if( c<=0x1f ){ + /* Control characters are not allowed in strings */ + pParse->iErr = j; + return -1; } - j++; } - jsonParseAddNode(pParse, JSON_STRING, j+1-i, &z[i]); - if( !pParse->oom ) pParse->aNode[pParse->nNode-1].jnFlags = jnFlags; + jsonParseAddNode(pParse, JSON_STRING | (jnFlags<<8), j+1-i, &z[i]); return j+1; - }else if( c=='n' - && strncmp(z+i,"null",4)==0 - && !sqlite3Isalnum(z[i+4]) ){ - jsonParseAddNode(pParse, JSON_NULL, 0, 0); - return i+4; - }else if( c=='t' - && strncmp(z+i,"true",4)==0 - && !sqlite3Isalnum(z[i+4]) ){ - jsonParseAddNode(pParse, JSON_TRUE, 0, 0); - return i+4; - }else if( c=='f' - && strncmp(z+i,"false",5)==0 - && !sqlite3Isalnum(z[i+5]) ){ - jsonParseAddNode(pParse, JSON_FALSE, 0, 0); - return i+5; - }else if( c=='-' || (c>='0' && c<='9') ){ + } + case 't': { + if( strncmp(z+i,"true",4)==0 && !sqlite3Isalnum(z[i+4]) ){ + jsonParseAddNode(pParse, JSON_TRUE, 0, 0); + return i+4; + } + pParse->iErr = i; + return -1; + } + case 'f': { + if( strncmp(z+i,"false",5)==0 && !sqlite3Isalnum(z[i+5]) ){ + jsonParseAddNode(pParse, JSON_FALSE, 0, 0); + return i+5; + } + pParse->iErr = i; + return -1; + } + case '+': { + u8 seenDP, seenE, jnFlags; + pParse->hasNonstd = 1; + jnFlags = JNODE_JSON5; + goto parse_number; + case '.': + if( sqlite3Isdigit(z[i+1]) ){ + pParse->hasNonstd = 1; + jnFlags = JNODE_JSON5; + seenE = 0; + seenDP = JSON_REAL; + goto parse_number_2; + } + pParse->iErr = i; + return -1; + case '-': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': /* Parse number */ - u8 seenDP = 0; - u8 seenE = 0; + jnFlags = 0; + parse_number: + seenDP = JSON_INT; + seenE = 0; assert( '-' < '0' ); + assert( '+' < '0' ); + assert( '.' < '0' ); + c = z[i]; + if( c<='0' ){ - j = c=='-' ? i+1 : i; - if( z[j]=='0' && z[j+1]>='0' && z[j+1]<='9' ) return -1; + if( c=='0' ){ + if( (z[i+1]=='x' || z[i+1]=='X') && sqlite3Isxdigit(z[i+2]) ){ + assert( seenDP==JSON_INT ); + pParse->hasNonstd = 1; + jnFlags |= JNODE_JSON5; + for(j=i+3; sqlite3Isxdigit(z[j]); j++){} + goto parse_number_finish; + }else if( sqlite3Isdigit(z[i+1]) ){ + pParse->iErr = i+1; + return -1; + } + }else{ + if( !sqlite3Isdigit(z[i+1]) ){ + /* JSON5 allows for "+Infinity" and "-Infinity" using exactly + ** that case. SQLite also allows these in any case and it allows + ** "+inf" and "-inf". */ + if( (z[i+1]=='I' || z[i+1]=='i') + && sqlite3StrNICmp(&z[i+1], "inf",3)==0 + ){ + pParse->hasNonstd = 1; + if( z[i]=='-' ){ + jsonParseAddNode(pParse, JSON_REAL, 8, "-9.0e999"); + }else{ + jsonParseAddNode(pParse, JSON_REAL, 7, "9.0e999"); + } + return i + (sqlite3StrNICmp(&z[i+4],"inity",5)==0 ? 9 : 4); + } + if( z[i+1]=='.' ){ + pParse->hasNonstd = 1; + jnFlags |= JNODE_JSON5; + goto parse_number_2; + } + pParse->iErr = i; + return -1; + } + if( z[i+1]=='0' ){ + if( sqlite3Isdigit(z[i+2]) ){ + pParse->iErr = i+1; + return -1; + }else if( (z[i+2]=='x' || z[i+2]=='X') && sqlite3Isxdigit(z[i+3]) ){ + pParse->hasNonstd = 1; + jnFlags |= JNODE_JSON5; + for(j=i+4; sqlite3Isxdigit(z[j]); j++){} + goto parse_number_finish; + } + } + } } - j = i+1; - for(;; j++){ + parse_number_2: + for(j=i+1;; j++){ c = z[j]; - if( c>='0' && c<='9' ) continue; + if( sqlite3Isdigit(c) ) continue; if( c=='.' ){ - if( z[j-1]=='-' ) return -1; - if( seenDP ) return -1; - seenDP = 1; + if( seenDP==JSON_REAL ){ + pParse->iErr = j; + return -1; + } + seenDP = JSON_REAL; continue; } if( c=='e' || c=='E' ){ - if( z[j-1]<'0' ) return -1; - if( seenE ) return -1; - seenDP = seenE = 1; + if( z[j-1]<'0' ){ + if( ALWAYS(z[j-1]=='.') && ALWAYS(j-2>=i) && sqlite3Isdigit(z[j-2]) ){ + pParse->hasNonstd = 1; + jnFlags |= JNODE_JSON5; + }else{ + pParse->iErr = j; + return -1; + } + } + if( seenE ){ + pParse->iErr = j; + return -1; + } + seenDP = JSON_REAL; + seenE = 1; c = z[j+1]; if( c=='+' || c=='-' ){ j++; c = z[j+1]; } - if( c<'0' || c>'9' ) return -1; + if( c<'0' || c>'9' ){ + pParse->iErr = j; + return -1; + } continue; } break; } - if( z[j-1]<'0' ) return -1; - jsonParseAddNode(pParse, seenDP ? JSON_REAL : JSON_INT, - j - i, &z[i]); + if( z[j-1]<'0' ){ + if( ALWAYS(z[j-1]=='.') && ALWAYS(j-2>=i) && sqlite3Isdigit(z[j-2]) ){ + pParse->hasNonstd = 1; + jnFlags |= JNODE_JSON5; + }else{ + pParse->iErr = j; + return -1; + } + } + parse_number_finish: + jsonParseAddNode(pParse, seenDP | (jnFlags<<8), j - i, &z[i]); return j; - }else if( c=='}' ){ + } + case '}': { + pParse->iErr = i; return -2; /* End of {...} */ - }else if( c==']' ){ + } + case ']': { + pParse->iErr = i; return -3; /* End of [...] */ - }else if( c==0 ){ + } + case ',': { + pParse->iErr = i; + return -4; /* List separator */ + } + case ':': { + pParse->iErr = i; + return -5; /* Object label/value separator */ + } + case 0: { return 0; /* End of file */ - }else{ + } + case 0x09: + case 0x0a: + case 0x0d: + case 0x20: { + do{ + i++; + }while( fast_isspace(z[i]) ); + goto json_parse_restart; + } + case 0x0b: + case 0x0c: + case '/': + case 0xc2: + case 0xe1: + case 0xe2: + case 0xe3: + case 0xef: { + j = json5Whitespace(&z[i]); + if( j>0 ){ + i += j; + pParse->hasNonstd = 1; + goto json_parse_restart; + } + pParse->iErr = i; + return -1; + } + case 'n': { + if( strncmp(z+i,"null",4)==0 && !sqlite3Isalnum(z[i+4]) ){ + jsonParseAddNode(pParse, JSON_NULL, 0, 0); + return i+4; + } + /* fall-through into the default case that checks for NaN */ + } + default: { + u32 k; + int nn; + c = z[i]; + for(k=0; khasNonstd = 1; + return i + nn; + } + pParse->iErr = i; return -1; /* Syntax error */ } + } /* End switch(z[i]) */ } /* ** Parse a complete JSON string. Return 0 on success or non-zero if there -** are any errors. If an error occurs, free all memory associated with -** pParse. +** are any errors. If an error occurs, free all memory held by pParse, +** but not pParse itself. ** -** pParse is uninitialized when this routine is called. +** pParse must be initialized to an empty parse object prior to calling +** this routine. */ static int jsonParse( JsonParse *pParse, /* Initialize and fill this JsonParse object */ - sqlite3_context *pCtx, /* Report errors here */ - const char *zJson /* Input JSON text to be parsed */ + sqlite3_context *pCtx /* Report errors here */ ){ int i; - memset(pParse, 0, sizeof(*pParse)); - if( zJson==0 ) return 1; - pParse->zJson = zJson; + const char *zJson = pParse->zJson; i = jsonParseValue(pParse, 0); if( pParse->oom ) i = -1; if( i>0 ){ assert( pParse->iDepth==0 ); while( fast_isspace(zJson[i]) ) i++; - if( zJson[i] ) i = -1; + if( zJson[i] ){ + i += json5Whitespace(&zJson[i]); + if( zJson[i] ){ + jsonParseReset(pParse); + return 1; + } + pParse->hasNonstd = 1; + } } if( i<=0 ){ if( pCtx!=0 ){ @@ -198213,6 +203038,7 @@ static int jsonParse( return 0; } + /* Mark node i of pParse as being a child of iParent. Call recursively ** to fill in all the descendants of node i. */ @@ -198262,26 +203088,49 @@ static int jsonParseFindParents(JsonParse *pParse){ #define JSON_CACHE_SZ 4 /* Max number of cache entries */ /* -** Obtain a complete parse of the JSON found in the first argument -** of the argv array. Use the sqlite3_get_auxdata() cache for this -** parse if it is available. If the cache is not available or if it -** is no longer valid, parse the JSON again and return the new parse, -** and also register the new parse so that it will be available for +** Obtain a complete parse of the JSON found in the pJson argument +** +** Use the sqlite3_get_auxdata() cache to find a preexisting parse +** if it is available. If the cache is not available or if it +** is no longer valid, parse the JSON again and return the new parse. +** Also register the new parse so that it will be available for ** future sqlite3_get_auxdata() calls. +** +** If an error occurs and pErrCtx!=0 then report the error on pErrCtx +** and return NULL. +** +** The returned pointer (if it is not NULL) is owned by the cache in +** most cases, not the caller. The caller does NOT need to invoke +** jsonParseFree(), in most cases. +** +** Except, if an error occurs and pErrCtx==0 then return the JsonParse +** object with JsonParse.nErr non-zero and the caller will own the JsonParse +** object. In that case, it will be the responsibility of the caller to +** invoke jsonParseFree(). To summarize: +** +** pErrCtx!=0 || p->nErr==0 ==> Return value p is owned by the +** cache. Call does not need to +** free it. +** +** pErrCtx==0 && p->nErr!=0 ==> Return value is owned by the caller +** and so the caller must free it. */ static JsonParse *jsonParseCached( - sqlite3_context *pCtx, - sqlite3_value **argv, - sqlite3_context *pErrCtx + sqlite3_context *pCtx, /* Context to use for cache search */ + sqlite3_value *pJson, /* Function param containing JSON text */ + sqlite3_context *pErrCtx, /* Write parse errors here if not NULL */ + int bUnedited /* No prior edits allowed */ ){ - const char *zJson = (const char*)sqlite3_value_text(argv[0]); - int nJson = sqlite3_value_bytes(argv[0]); + char *zJson = (char*)sqlite3_value_text(pJson); + int nJson = sqlite3_value_bytes(pJson); JsonParse *p; JsonParse *pMatch = 0; int iKey; int iMinKey = 0; u32 iMinHold = 0xffffffff; u32 iMaxHold = 0; + int bJsonRCStr; + if( zJson==0 ) return 0; for(iKey=0; iKeynJson==nJson - && memcmp(p->zJson,zJson,nJson)==0 + && (p->hasMod==0 || bUnedited==0) + && (p->zJson==zJson || memcmp(p->zJson,zJson,nJson)==0) + ){ + p->nErr = 0; + p->useMod = 0; + pMatch = p; + }else + if( pMatch==0 + && p->zAlt!=0 + && bUnedited==0 + && p->nAlt==nJson + && memcmp(p->zAlt, zJson, nJson)==0 ){ p->nErr = 0; + p->useMod = 1; pMatch = p; }else if( p->iHoldiHold; @@ -198304,24 +203165,44 @@ static JsonParse *jsonParseCached( } } if( pMatch ){ + /* The input JSON text was found in the cache. Use the preexisting + ** parse of this JSON */ pMatch->nErr = 0; pMatch->iHold = iMaxHold+1; + assert( pMatch->nJPRef>0 ); /* pMatch is owned by the cache */ return pMatch; } - p = sqlite3_malloc64( sizeof(*p) + nJson + 1 ); + + /* The input JSON was not found anywhere in the cache. We will need + ** to parse it ourselves and generate a new JsonParse object. + */ + bJsonRCStr = sqlite3ValueIsOfClass(pJson,(void(*)(void*))sqlite3RCStrUnref); + p = sqlite3_malloc64( sizeof(*p) + (bJsonRCStr ? 0 : nJson+1) ); if( p==0 ){ sqlite3_result_error_nomem(pCtx); return 0; } memset(p, 0, sizeof(*p)); - p->zJson = (char*)&p[1]; - memcpy((char*)p->zJson, zJson, nJson+1); - if( jsonParse(p, pErrCtx, p->zJson) ){ - sqlite3_free(p); + if( bJsonRCStr ){ + p->zJson = sqlite3RCStrRef(zJson); + p->bJsonIsRCStr = 1; + }else{ + p->zJson = (char*)&p[1]; + memcpy(p->zJson, zJson, nJson+1); + } + p->nJPRef = 1; + if( jsonParse(p, pErrCtx) ){ + if( pErrCtx==0 ){ + p->nErr = 1; + assert( p->nJPRef==1 ); /* Caller will own the new JsonParse object p */ + return p; + } + jsonParseFree(p); return 0; } p->nJson = nJson; p->iHold = iMaxHold+1; + /* Transfer ownership of the new JsonParse to the cache */ sqlite3_set_auxdata(pCtx, JSON_CACHE_ID+iMinKey, p, (void(*)(void*))jsonParseFree); return (JsonParse*)sqlite3_get_auxdata(pCtx, JSON_CACHE_ID+iMinKey); @@ -198331,7 +203212,7 @@ static JsonParse *jsonParseCached( ** Compare the OBJECT label at pNode against zKey,nKey. Return true on ** a match. */ -static int jsonLabelCompare(JsonNode *pNode, const char *zKey, u32 nKey){ +static int jsonLabelCompare(const JsonNode *pNode, const char *zKey, u32 nKey){ assert( pNode->eU==1 ); if( pNode->jnFlags & JNODE_RAW ){ if( pNode->n!=nKey ) return 0; @@ -198341,6 +203222,15 @@ static int jsonLabelCompare(JsonNode *pNode, const char *zKey, u32 nKey){ return strncmp(pNode->u.zJContent+1, zKey, nKey)==0; } } +static int jsonSameLabel(const JsonNode *p1, const JsonNode *p2){ + if( p1->jnFlags & JNODE_RAW ){ + return jsonLabelCompare(p2, p1->u.zJContent, p1->n); + }else if( p2->jnFlags & JNODE_RAW ){ + return jsonLabelCompare(p1, p2->u.zJContent, p2->n); + }else{ + return p1->n==p2->n && strncmp(p1->u.zJContent,p2->u.zJContent,p1->n)==0; + } +} /* forward declaration */ static JsonNode *jsonLookupAppend(JsonParse*,const char*,int*,const char**); @@ -198363,9 +203253,31 @@ static JsonNode *jsonLookupStep( ){ u32 i, j, nKey; const char *zKey; - JsonNode *pRoot = &pParse->aNode[iRoot]; + JsonNode *pRoot; + if( pParse->oom ) return 0; + pRoot = &pParse->aNode[iRoot]; + if( pRoot->jnFlags & (JNODE_REPLACE|JNODE_REMOVE) && pParse->useMod ){ + while( (pRoot->jnFlags & JNODE_REPLACE)!=0 ){ + u32 idx = (u32)(pRoot - pParse->aNode); + i = pParse->iSubst; + while( 1 /*exit-by-break*/ ){ + assert( inNode ); + assert( pParse->aNode[i].eType==JSON_SUBST ); + assert( pParse->aNode[i].eU==4 ); + assert( pParse->aNode[i].u.iPrevaNode[i].n==idx ){ + pRoot = &pParse->aNode[i+1]; + iRoot = i+1; + break; + } + i = pParse->aNode[i].u.iPrev; + } + } + if( pRoot->jnFlags & JNODE_REMOVE ){ + return 0; + } + } if( zPath[0]==0 ) return pRoot; - if( pRoot->jnFlags & JNODE_REPLACE ) return 0; if( zPath[0]=='.' ){ if( pRoot->eType!=JSON_OBJECT ) return 0; zPath++; @@ -198399,14 +203311,16 @@ static JsonNode *jsonLookupStep( j += jsonNodeSize(&pRoot[j]); } if( (pRoot->jnFlags & JNODE_APPEND)==0 ) break; + if( pParse->useMod==0 ) break; assert( pRoot->eU==2 ); - iRoot += pRoot->u.iAppend; + iRoot = pRoot->u.iAppend; pRoot = &pParse->aNode[iRoot]; j = 1; } if( pApnd ){ u32 iStart, iLabel; JsonNode *pNode; + assert( pParse->useMod ); iStart = jsonParseAddNode(pParse, JSON_OBJECT, 2, 0); iLabel = jsonParseAddNode(pParse, JSON_STRING, nKey, zKey); zPath += i; @@ -198415,7 +203329,7 @@ static JsonNode *jsonLookupStep( if( pNode ){ pRoot = &pParse->aNode[iRoot]; assert( pRoot->eU==0 ); - pRoot->u.iAppend = iStart - iRoot; + pRoot->u.iAppend = iStart; pRoot->jnFlags |= JNODE_APPEND; VVA( pRoot->eU = 2 ); pParse->aNode[iLabel].jnFlags |= JNODE_RAW; @@ -198436,12 +203350,13 @@ static JsonNode *jsonLookupStep( if( pRoot->eType!=JSON_ARRAY ) return 0; for(;;){ while( j<=pBase->n ){ - if( (pBase[j].jnFlags & JNODE_REMOVE)==0 ) i++; + if( (pBase[j].jnFlags & JNODE_REMOVE)==0 || pParse->useMod==0 ) i++; j += jsonNodeSize(&pBase[j]); } if( (pBase->jnFlags & JNODE_APPEND)==0 ) break; + if( pParse->useMod==0 ) break; assert( pBase->eU==2 ); - iBase += pBase->u.iAppend; + iBase = pBase->u.iAppend; pBase = &pParse->aNode[iBase]; j = 1; } @@ -198469,13 +203384,16 @@ static JsonNode *jsonLookupStep( zPath += j + 1; j = 1; for(;;){ - while( j<=pRoot->n && (i>0 || (pRoot[j].jnFlags & JNODE_REMOVE)!=0) ){ - if( (pRoot[j].jnFlags & JNODE_REMOVE)==0 ) i--; + while( j<=pRoot->n + && (i>0 || ((pRoot[j].jnFlags & JNODE_REMOVE)!=0 && pParse->useMod)) + ){ + if( (pRoot[j].jnFlags & JNODE_REMOVE)==0 || pParse->useMod==0 ) i--; j += jsonNodeSize(&pRoot[j]); } if( (pRoot->jnFlags & JNODE_APPEND)==0 ) break; + if( pParse->useMod==0 ) break; assert( pRoot->eU==2 ); - iRoot += pRoot->u.iAppend; + iRoot = pRoot->u.iAppend; pRoot = &pParse->aNode[iRoot]; j = 1; } @@ -198485,13 +203403,14 @@ static JsonNode *jsonLookupStep( if( i==0 && pApnd ){ u32 iStart; JsonNode *pNode; + assert( pParse->useMod ); iStart = jsonParseAddNode(pParse, JSON_ARRAY, 1, 0); pNode = jsonLookupAppend(pParse, zPath, pApnd, pzErr); if( pParse->oom ) return 0; if( pNode ){ pRoot = &pParse->aNode[iRoot]; assert( pRoot->eU==0 ); - pRoot->u.iAppend = iStart - iRoot; + pRoot->u.iAppend = iStart; pRoot->jnFlags |= JNODE_APPEND; VVA( pRoot->eU = 2 ); } @@ -198618,47 +203537,90 @@ static void jsonRemoveAllNulls(JsonNode *pNode){ ** SQL functions used for testing and debugging ****************************************************************************/ +#if SQLITE_DEBUG +/* +** Print N node entries. +*/ +static void jsonDebugPrintNodeEntries( + JsonNode *aNode, /* First node entry to print */ + int N /* Number of node entries to print */ +){ + int i; + for(i=0; iaNode, p->nNode); +} +static void jsonDebugPrintNode(JsonNode *pNode){ + jsonDebugPrintNodeEntries(pNode, jsonNodeSize(pNode)); +} +#else + /* The usual case */ +# define jsonDebugPrintNode(X) +# define jsonDebugPrintParse(X) +#endif + #ifdef SQLITE_DEBUG /* -** The json_parse(JSON) function returns a string which describes -** a parse of the JSON provided. Or it returns NULL if JSON is not -** well-formed. +** SQL function: json_parse(JSON) +** +** Parse JSON using jsonParseCached(). Then print a dump of that +** parse on standard output. Return the mimified JSON result, just +** like the json() function. */ static void jsonParseFunc( sqlite3_context *ctx, int argc, sqlite3_value **argv ){ - JsonString s; /* Output string - not real JSON */ - JsonParse x; /* The parse */ - u32 i; + JsonParse *p; /* The parse */ assert( argc==1 ); - if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return; - jsonParseFindParents(&x); - jsonInit(&s, ctx); - for(i=0; inNode); + printf("nAlloc = %u\n", p->nAlloc); + printf("nJson = %d\n", p->nJson); + printf("nAlt = %d\n", p->nAlt); + printf("nErr = %u\n", p->nErr); + printf("oom = %u\n", p->oom); + printf("hasNonstd = %u\n", p->hasNonstd); + printf("useMod = %u\n", p->useMod); + printf("hasMod = %u\n", p->hasMod); + printf("nJPRef = %u\n", p->nJPRef); + printf("iSubst = %u\n", p->iSubst); + printf("iHold = %u\n", p->iHold); + jsonDebugPrintNodeEntries(p->aNode, p->nNode); + jsonReturnJson(p, p->aNode, ctx, 1); } /* @@ -198742,7 +203704,7 @@ static void jsonArrayLengthFunc( u32 i; JsonNode *pNode; - p = jsonParseCached(ctx, argv, ctx); + p = jsonParseCached(ctx, argv[0], ctx, 0); if( p==0 ) return; assert( p->nNode ); if( argc==2 ){ @@ -198755,9 +203717,16 @@ static void jsonArrayLengthFunc( return; } if( pNode->eType==JSON_ARRAY ){ - assert( (pNode->jnFlags & JNODE_APPEND)==0 ); - for(i=1; i<=pNode->n; n++){ - i += jsonNodeSize(&pNode[i]); + while( 1 /*exit-by-break*/ ){ + i = 1; + while( i<=pNode->n ){ + if( (pNode[i].jnFlags & JNODE_REMOVE)==0 ) n++; + i += jsonNodeSize(&pNode[i]); + } + if( (pNode->jnFlags & JNODE_APPEND)==0 ) break; + if( p->useMod==0 ) break; + assert( pNode->eU==2 ); + pNode = &p->aNode[pNode->u.iAppend]; } } sqlite3_result_int64(ctx, n); @@ -198804,14 +203773,14 @@ static void jsonExtractFunc( JsonString jx; if( argc<2 ) return; - p = jsonParseCached(ctx, argv, ctx); + p = jsonParseCached(ctx, argv[0], ctx, 0); if( p==0 ) return; if( argc==2 ){ /* With a single PATH argument */ zPath = (const char*)sqlite3_value_text(argv[1]); if( zPath==0 ) return; if( flags & JSON_ABPATH ){ - if( zPath[0]!='$' ){ + if( zPath[0]!='$' || (zPath[1]!='.' && zPath[1]!='[' && zPath[1]!=0) ){ /* The -> and ->> operators accept abbreviated PATH arguments. This ** is mostly for compatibility with PostgreSQL, but also for ** convenience. @@ -198822,11 +203791,11 @@ static void jsonExtractFunc( */ jsonInit(&jx, ctx); if( sqlite3Isdigit(zPath[0]) ){ - jsonAppendRaw(&jx, "$[", 2); + jsonAppendRawNZ(&jx, "$[", 2); jsonAppendRaw(&jx, zPath, (int)strlen(zPath)); - jsonAppendRaw(&jx, "]", 2); + jsonAppendRawNZ(&jx, "]", 2); }else{ - jsonAppendRaw(&jx, "$.", 1 + (zPath[0]!='[')); + jsonAppendRawNZ(&jx, "$.", 1 + (zPath[0]!='[')); jsonAppendRaw(&jx, zPath, (int)strlen(zPath)); jsonAppendChar(&jx, 0); } @@ -198837,15 +203806,15 @@ static void jsonExtractFunc( } if( pNode ){ if( flags & JSON_JSON ){ - jsonReturnJson(pNode, ctx, 0); + jsonReturnJson(p, pNode, ctx, 0); }else{ - jsonReturn(pNode, ctx, 0); + jsonReturn(p, pNode, ctx); sqlite3_result_subtype(ctx, 0); } } }else{ pNode = jsonLookup(p, zPath, 0, ctx); - if( p->nErr==0 && pNode ) jsonReturn(pNode, ctx, 0); + if( p->nErr==0 && pNode ) jsonReturn(p, pNode, ctx); } }else{ /* Two or more PATH arguments results in a JSON array with each @@ -198859,9 +203828,9 @@ static void jsonExtractFunc( if( p->nErr ) break; jsonAppendSeparator(&jx); if( pNode ){ - jsonRenderNode(pNode, &jx, 0); + jsonRenderNode(p, pNode, &jx); }else{ - jsonAppendRaw(&jx, "null", 4); + jsonAppendRawNZ(&jx, "null", 4); } } if( i==argc ){ @@ -198902,51 +203871,42 @@ static JsonNode *jsonMergePatch( assert( pPatch[i].eU==1 ); nKey = pPatch[i].n; zKey = pPatch[i].u.zJContent; - assert( (pPatch[i].jnFlags & JNODE_RAW)==0 ); for(j=1; jn; j += jsonNodeSize(&pTarget[j+1])+1 ){ assert( pTarget[j].eType==JSON_STRING ); assert( pTarget[j].jnFlags & JNODE_LABEL ); - assert( (pPatch[i].jnFlags & JNODE_RAW)==0 ); - if( pTarget[j].n==nKey && strncmp(pTarget[j].u.zJContent,zKey,nKey)==0 ){ - if( pTarget[j+1].jnFlags & (JNODE_REMOVE|JNODE_PATCH) ) break; + if( jsonSameLabel(&pPatch[i], &pTarget[j]) ){ + if( pTarget[j+1].jnFlags & (JNODE_REMOVE|JNODE_REPLACE) ) break; if( pPatch[i+1].eType==JSON_NULL ){ pTarget[j+1].jnFlags |= JNODE_REMOVE; }else{ JsonNode *pNew = jsonMergePatch(pParse, iTarget+j+1, &pPatch[i+1]); if( pNew==0 ) return 0; - pTarget = &pParse->aNode[iTarget]; - if( pNew!=&pTarget[j+1] ){ - assert( pTarget[j+1].eU==0 - || pTarget[j+1].eU==1 - || pTarget[j+1].eU==2 ); - testcase( pTarget[j+1].eU==1 ); - testcase( pTarget[j+1].eU==2 ); - VVA( pTarget[j+1].eU = 5 ); - pTarget[j+1].u.pPatch = pNew; - pTarget[j+1].jnFlags |= JNODE_PATCH; + if( pNew!=&pParse->aNode[iTarget+j+1] ){ + jsonParseAddSubstNode(pParse, iTarget+j+1); + jsonParseAddNodeArray(pParse, pNew, jsonNodeSize(pNew)); } + pTarget = &pParse->aNode[iTarget]; } break; } } if( j>=pTarget->n && pPatch[i+1].eType!=JSON_NULL ){ - int iStart, iPatch; - iStart = jsonParseAddNode(pParse, JSON_OBJECT, 2, 0); + int iStart; + JsonNode *pApnd; + u32 nApnd; + iStart = jsonParseAddNode(pParse, JSON_OBJECT, 0, 0); jsonParseAddNode(pParse, JSON_STRING, nKey, zKey); - iPatch = jsonParseAddNode(pParse, JSON_TRUE, 0, 0); + pApnd = &pPatch[i+1]; + if( pApnd->eType==JSON_OBJECT ) jsonRemoveAllNulls(pApnd); + nApnd = jsonNodeSize(pApnd); + jsonParseAddNodeArray(pParse, pApnd, jsonNodeSize(pApnd)); if( pParse->oom ) return 0; - jsonRemoveAllNulls(pPatch); - pTarget = &pParse->aNode[iTarget]; - assert( pParse->aNode[iRoot].eU==0 || pParse->aNode[iRoot].eU==2 ); - testcase( pParse->aNode[iRoot].eU==2 ); + pParse->aNode[iStart].n = 1+nApnd; pParse->aNode[iRoot].jnFlags |= JNODE_APPEND; + pParse->aNode[iRoot].u.iAppend = iStart; VVA( pParse->aNode[iRoot].eU = 2 ); - pParse->aNode[iRoot].u.iAppend = iStart - iRoot; iRoot = iStart; - assert( pParse->aNode[iPatch].eU==0 ); - VVA( pParse->aNode[iPatch].eU = 5 ); - pParse->aNode[iPatch].jnFlags |= JNODE_PATCH; - pParse->aNode[iPatch].u.pPatch = &pPatch[i+1]; + pTarget = &pParse->aNode[iTarget]; } } return pTarget; @@ -198962,25 +203922,28 @@ static void jsonPatchFunc( int argc, sqlite3_value **argv ){ - JsonParse x; /* The JSON that is being patched */ - JsonParse y; /* The patch */ + JsonParse *pX; /* The JSON that is being patched */ + JsonParse *pY; /* The patch */ JsonNode *pResult; /* The result of the merge */ UNUSED_PARAMETER(argc); - if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return; - if( jsonParse(&y, ctx, (const char*)sqlite3_value_text(argv[1])) ){ - jsonParseReset(&x); - return; - } - pResult = jsonMergePatch(&x, 0, y.aNode); - assert( pResult!=0 || x.oom ); - if( pResult ){ - jsonReturnJson(pResult, ctx, 0); + pX = jsonParseCached(ctx, argv[0], ctx, 1); + if( pX==0 ) return; + assert( pX->hasMod==0 ); + pX->hasMod = 1; + pY = jsonParseCached(ctx, argv[1], ctx, 1); + if( pY==0 ) return; + pX->useMod = 1; + pY->useMod = 1; + pResult = jsonMergePatch(pX, 0, pY->aNode); + assert( pResult!=0 || pX->oom ); + if( pResult && pX->oom==0 ){ + jsonDebugPrintParse(pX); + jsonDebugPrintNode(pResult); + jsonReturnJson(pX, pResult, ctx, 0); }else{ sqlite3_result_error_nomem(ctx); } - jsonParseReset(&x); - jsonParseReset(&y); } @@ -199036,26 +203999,118 @@ static void jsonRemoveFunc( int argc, sqlite3_value **argv ){ - JsonParse x; /* The parse */ + JsonParse *pParse; /* The parse */ JsonNode *pNode; const char *zPath; u32 i; if( argc<1 ) return; - if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return; - assert( x.nNode ); + pParse = jsonParseCached(ctx, argv[0], ctx, argc>1); + if( pParse==0 ) return; for(i=1; i<(u32)argc; i++){ zPath = (const char*)sqlite3_value_text(argv[i]); if( zPath==0 ) goto remove_done; - pNode = jsonLookup(&x, zPath, 0, ctx); - if( x.nErr ) goto remove_done; - if( pNode ) pNode->jnFlags |= JNODE_REMOVE; + pNode = jsonLookup(pParse, zPath, 0, ctx); + if( pParse->nErr ) goto remove_done; + if( pNode ){ + pNode->jnFlags |= JNODE_REMOVE; + pParse->hasMod = 1; + pParse->useMod = 1; + } } - if( (x.aNode[0].jnFlags & JNODE_REMOVE)==0 ){ - jsonReturnJson(x.aNode, ctx, 0); + if( (pParse->aNode[0].jnFlags & JNODE_REMOVE)==0 ){ + jsonReturnJson(pParse, pParse->aNode, ctx, 1); } remove_done: - jsonParseReset(&x); + jsonDebugPrintParse(p); +} + +/* +** Substitute the value at iNode with the pValue parameter. +*/ +static void jsonReplaceNode( + sqlite3_context *pCtx, + JsonParse *p, + int iNode, + sqlite3_value *pValue +){ + int idx = jsonParseAddSubstNode(p, iNode); + if( idx<=0 ){ + assert( p->oom ); + return; + } + switch( sqlite3_value_type(pValue) ){ + case SQLITE_NULL: { + jsonParseAddNode(p, JSON_NULL, 0, 0); + break; + } + case SQLITE_FLOAT: { + char *z = sqlite3_mprintf("%!0.15g", sqlite3_value_double(pValue)); + int n; + if( z==0 ){ + p->oom = 1; + break; + } + n = sqlite3Strlen30(z); + jsonParseAddNode(p, JSON_REAL, n, z); + jsonParseAddCleanup(p, sqlite3_free, z); + break; + } + case SQLITE_INTEGER: { + char *z = sqlite3_mprintf("%lld", sqlite3_value_int64(pValue)); + int n; + if( z==0 ){ + p->oom = 1; + break; + } + n = sqlite3Strlen30(z); + jsonParseAddNode(p, JSON_INT, n, z); + jsonParseAddCleanup(p, sqlite3_free, z); + + break; + } + case SQLITE_TEXT: { + const char *z = (const char*)sqlite3_value_text(pValue); + u32 n = (u32)sqlite3_value_bytes(pValue); + if( z==0 ){ + p->oom = 1; + break; + } + if( sqlite3_value_subtype(pValue)!=JSON_SUBTYPE ){ + char *zCopy = sqlite3DbStrDup(0, z); + int k; + if( zCopy ){ + jsonParseAddCleanup(p, sqlite3_free, zCopy); + }else{ + p->oom = 1; + sqlite3_result_error_nomem(pCtx); + } + k = jsonParseAddNode(p, JSON_STRING, n, zCopy); + assert( k>0 || p->oom ); + if( p->oom==0 ) p->aNode[k].jnFlags |= JNODE_RAW; + }else{ + JsonParse *pPatch = jsonParseCached(pCtx, pValue, pCtx, 1); + if( pPatch==0 ){ + p->oom = 1; + break; + } + jsonParseAddNodeArray(p, pPatch->aNode, pPatch->nNode); + /* The nodes copied out of pPatch and into p likely contain + ** u.zJContent pointers into pPatch->zJson. So preserve the + ** content of pPatch until p is destroyed. */ + assert( pPatch->nJPRef>=1 ); + pPatch->nJPRef++; + jsonParseAddCleanup(p, (void(*)(void*))jsonParseFree, pPatch); + } + break; + } + default: { + jsonParseAddNode(p, JSON_NULL, 0, 0); + sqlite3_result_error(pCtx, "JSON cannot hold BLOB values", -1); + p->nErr++; + break; + } + } } /* @@ -199069,7 +204124,7 @@ static void jsonReplaceFunc( int argc, sqlite3_value **argv ){ - JsonParse x; /* The parse */ + JsonParse *pParse; /* The parse */ JsonNode *pNode; const char *zPath; u32 i; @@ -199079,28 +204134,20 @@ static void jsonReplaceFunc( jsonWrongNumArgs(ctx, "replace"); return; } - if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return; - assert( x.nNode ); + pParse = jsonParseCached(ctx, argv[0], ctx, argc>1); + if( pParse==0 ) return; for(i=1; i<(u32)argc; i+=2){ zPath = (const char*)sqlite3_value_text(argv[i]); - pNode = jsonLookup(&x, zPath, 0, ctx); - if( x.nErr ) goto replace_err; + pParse->useMod = 1; + pNode = jsonLookup(pParse, zPath, 0, ctx); + if( pParse->nErr ) goto replace_err; if( pNode ){ - assert( pNode->eU==0 || pNode->eU==1 || pNode->eU==4 ); - testcase( pNode->eU!=0 && pNode->eU!=1 ); - pNode->jnFlags |= (u8)JNODE_REPLACE; - VVA( pNode->eU = 4 ); - pNode->u.iReplace = i + 1; + jsonReplaceNode(ctx, pParse, (u32)(pNode - pParse->aNode), argv[i+1]); } } - if( x.aNode[0].jnFlags & JNODE_REPLACE ){ - assert( x.aNode[0].eU==4 ); - sqlite3_result_value(ctx, argv[x.aNode[0].u.iReplace]); - }else{ - jsonReturnJson(x.aNode, ctx, argv); - } + jsonReturnJson(pParse, pParse->aNode, ctx, 1); replace_err: - jsonParseReset(&x); + jsonDebugPrintParse(pParse); } @@ -199121,7 +204168,7 @@ static void jsonSetFunc( int argc, sqlite3_value **argv ){ - JsonParse x; /* The parse */ + JsonParse *pParse; /* The parse */ JsonNode *pNode; const char *zPath; u32 i; @@ -199133,33 +204180,27 @@ static void jsonSetFunc( jsonWrongNumArgs(ctx, bIsSet ? "set" : "insert"); return; } - if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return; - assert( x.nNode ); + pParse = jsonParseCached(ctx, argv[0], ctx, argc>1); + if( pParse==0 ) return; for(i=1; i<(u32)argc; i+=2){ zPath = (const char*)sqlite3_value_text(argv[i]); bApnd = 0; - pNode = jsonLookup(&x, zPath, &bApnd, ctx); - if( x.oom ){ + pParse->useMod = 1; + pNode = jsonLookup(pParse, zPath, &bApnd, ctx); + if( pParse->oom ){ sqlite3_result_error_nomem(ctx); goto jsonSetDone; - }else if( x.nErr ){ + }else if( pParse->nErr ){ goto jsonSetDone; }else if( pNode && (bApnd || bIsSet) ){ - testcase( pNode->eU!=0 && pNode->eU!=1 ); - assert( pNode->eU!=3 && pNode->eU!=5 ); - VVA( pNode->eU = 4 ); - pNode->jnFlags |= (u8)JNODE_REPLACE; - pNode->u.iReplace = i + 1; + jsonReplaceNode(ctx, pParse, (u32)(pNode - pParse->aNode), argv[i+1]); } } - if( x.aNode[0].jnFlags & JNODE_REPLACE ){ - assert( x.aNode[0].eU==4 ); - sqlite3_result_value(ctx, argv[x.aNode[0].u.iReplace]); - }else{ - jsonReturnJson(x.aNode, ctx, argv); - } + jsonDebugPrintParse(pParse); + jsonReturnJson(pParse, pParse->aNode, ctx, 1); + jsonSetDone: - jsonParseReset(&x); + /* no cleanup required */; } /* @@ -199178,7 +204219,7 @@ static void jsonTypeFunc( const char *zPath; JsonNode *pNode; - p = jsonParseCached(ctx, argv, ctx); + p = jsonParseCached(ctx, argv[0], ctx, 0); if( p==0 ) return; if( argc==2 ){ zPath = (const char*)sqlite3_value_text(argv[1]); @@ -199194,8 +204235,8 @@ static void jsonTypeFunc( /* ** json_valid(JSON) ** -** Return 1 if JSON is a well-formed JSON string according to RFC-7159. -** Return 0 otherwise. +** Return 1 if JSON is a well-formed canonical JSON string according +** to RFC-7159. Return 0 otherwise. */ static void jsonValidFunc( sqlite3_context *ctx, @@ -199204,8 +204245,75 @@ static void jsonValidFunc( ){ JsonParse *p; /* The parse */ UNUSED_PARAMETER(argc); - p = jsonParseCached(ctx, argv, 0); - sqlite3_result_int(ctx, p!=0); + if( sqlite3_value_type(argv[0])==SQLITE_NULL ){ +#ifdef SQLITE_LEGACY_JSON_VALID + /* Incorrect legacy behavior was to return FALSE for a NULL input */ + sqlite3_result_int(ctx, 0); +#endif + return; + } + p = jsonParseCached(ctx, argv[0], 0, 0); + if( p==0 || p->oom ){ + sqlite3_result_error_nomem(ctx); + sqlite3_free(p); + }else{ + sqlite3_result_int(ctx, p->nErr==0 && (p->hasNonstd==0 || p->useMod)); + if( p->nErr ) jsonParseFree(p); + } +} + +/* +** json_error_position(JSON) +** +** If the argument is not an interpretable JSON string, then return the 1-based +** character position at which the parser first recognized that the input +** was in error. The left-most character is 1. If the string is valid +** JSON, then return 0. +** +** Note that json_valid() is only true for strictly conforming canonical JSON. +** But this routine returns zero if the input contains extension. Thus: +** +** (1) If the input X is strictly conforming canonical JSON: +** +** json_valid(X) returns true +** json_error_position(X) returns 0 +** +** (2) If the input X is JSON but it includes extension (such as JSON5) that +** are not part of RFC-8259: +** +** json_valid(X) returns false +** json_error_position(X) return 0 +** +** (3) If the input X cannot be interpreted as JSON even taking extensions +** into account: +** +** json_valid(X) return false +** json_error_position(X) returns 1 or more +*/ +static void jsonErrorFunc( + sqlite3_context *ctx, + int argc, + sqlite3_value **argv +){ + JsonParse *p; /* The parse */ + UNUSED_PARAMETER(argc); + if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; + p = jsonParseCached(ctx, argv[0], 0, 0); + if( p==0 || p->oom ){ + sqlite3_result_error_nomem(ctx); + sqlite3_free(p); + }else if( p->nErr==0 ){ + sqlite3_result_int(ctx, 0); + }else{ + int n = 1; + u32 i; + const char *z = (const char*)sqlite3_value_text(argv[0]); + for(i=0; iiErr && ALWAYS(z[i]); i++){ + if( (z[i]&0xc0)!=0x80 ) n++; + } + sqlite3_result_int(ctx, n); + jsonParseFree(p); + } } @@ -199247,7 +204355,8 @@ static void jsonArrayCompute(sqlite3_context *ctx, int isFinal){ assert( pStr->bStatic ); }else if( isFinal ){ sqlite3_result_text(ctx, pStr->zBuf, (int)pStr->nUsed, - pStr->bStatic ? SQLITE_TRANSIENT : sqlite3_free); + pStr->bStatic ? SQLITE_TRANSIENT : + (void(*)(void*))sqlite3RCStrUnref); pStr->bStatic = 1; }else{ sqlite3_result_text(ctx, pStr->zBuf, (int)pStr->nUsed, SQLITE_TRANSIENT); @@ -199288,7 +204397,7 @@ static void jsonGroupInverse( pStr = (JsonString*)sqlite3_aggregate_context(ctx, 0); #ifdef NEVER /* pStr is always non-NULL since jsonArrayStep() or jsonObjectStep() will - ** always have been called to initalize it */ + ** always have been called to initialize it */ if( NEVER(!pStr) ) return; #endif z = pStr->zBuf; @@ -199355,7 +204464,8 @@ static void jsonObjectCompute(sqlite3_context *ctx, int isFinal){ assert( pStr->bStatic ); }else if( isFinal ){ sqlite3_result_text(ctx, pStr->zBuf, (int)pStr->nUsed, - pStr->bStatic ? SQLITE_TRANSIENT : sqlite3_free); + pStr->bStatic ? SQLITE_TRANSIENT : + (void(*)(void*))sqlite3RCStrUnref); pStr->bStatic = 1; }else{ sqlite3_result_text(ctx, pStr->zBuf, (int)pStr->nUsed, SQLITE_TRANSIENT); @@ -199466,7 +204576,6 @@ static int jsonEachOpenTree(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){ /* Reset a JsonEachCursor back to its original state. Free any memory ** held. */ static void jsonEachCursorReset(JsonEachCursor *p){ - sqlite3_free(p->zJson); sqlite3_free(p->zRoot); jsonParseReset(&p->sParse); p->iRowid = 0; @@ -199549,14 +204658,16 @@ static void jsonAppendObjectPathElement( assert( pNode->eU==1 ); z = pNode->u.zJContent; nn = pNode->n; - assert( nn>=2 ); - assert( z[0]=='"' ); - assert( z[nn-1]=='"' ); - if( nn>2 && sqlite3Isalpha(z[1]) ){ - for(jj=2; jjjnFlags & JNODE_RAW)==0 ){ + assert( nn>=2 ); + assert( z[0]=='"' || z[0]=='\'' ); + assert( z[nn-1]=='"' || z[0]=='\'' ); + if( nn>2 && sqlite3Isalpha(z[1]) ){ + for(jj=2; jji==0 ) break; if( p->eType==JSON_OBJECT ){ - jsonReturn(pThis, ctx, 0); + jsonReturn(&p->sParse, pThis, ctx); }else if( p->eType==JSON_ARRAY ){ u32 iKey; if( p->bRecursive ){ @@ -199618,7 +204729,7 @@ static int jsonEachColumn( } case JEACH_VALUE: { if( pThis->jnFlags & JNODE_LABEL ) pThis++; - jsonReturn(pThis, ctx, 0); + jsonReturn(&p->sParse, pThis, ctx); break; } case JEACH_TYPE: { @@ -199629,7 +204740,7 @@ static int jsonEachColumn( case JEACH_ATOM: { if( pThis->jnFlags & JNODE_LABEL ) pThis++; if( pThis->eType>=JSON_ARRAY ) break; - jsonReturn(pThis, ctx, 0); + jsonReturn(&p->sParse, pThis, ctx); break; } case JEACH_ID: { @@ -199733,6 +204844,13 @@ static int jsonEachBestIndex( idxMask |= iMask; } } + if( pIdxInfo->nOrderBy>0 + && pIdxInfo->aOrderBy[0].iColumn<0 + && pIdxInfo->aOrderBy[0].desc==0 + ){ + pIdxInfo->orderByConsumed = 1; + } + if( (unusableMask & ~idxMask)!=0 ){ /* If there are any unusable constraints on JSON or ROOT, then reject ** this entire plan */ @@ -199777,11 +204895,19 @@ static int jsonEachFilter( if( idxNum==0 ) return SQLITE_OK; z = (const char*)sqlite3_value_text(argv[0]); if( z==0 ) return SQLITE_OK; - n = sqlite3_value_bytes(argv[0]); - p->zJson = sqlite3_malloc64( n+1 ); - if( p->zJson==0 ) return SQLITE_NOMEM; - memcpy(p->zJson, z, (size_t)n+1); - if( jsonParse(&p->sParse, 0, p->zJson) ){ + memset(&p->sParse, 0, sizeof(p->sParse)); + p->sParse.nJPRef = 1; + if( sqlite3ValueIsOfClass(argv[0], (void(*)(void*))sqlite3RCStrUnref) ){ + p->sParse.zJson = sqlite3RCStrRef((char*)z); + }else{ + n = sqlite3_value_bytes(argv[0]); + p->sParse.zJson = sqlite3RCStrNew( n+1 ); + if( p->sParse.zJson==0 ) return SQLITE_NOMEM; + memcpy(p->sParse.zJson, z, (size_t)n+1); + } + p->sParse.bJsonIsRCStr = 1; + p->zJson = p->sParse.zJson; + if( jsonParse(&p->sParse, 0) ){ int rc = SQLITE_NOMEM; if( p->sParse.oom==0 ){ sqlite3_free(cur->pVtab->zErrMsg); @@ -199909,6 +205035,7 @@ SQLITE_PRIVATE void sqlite3RegisterJsonFunctions(void){ JFUNCTION(json_array, -1, 0, jsonArrayFunc), JFUNCTION(json_array_length, 1, 0, jsonArrayLengthFunc), JFUNCTION(json_array_length, 2, 0, jsonArrayLengthFunc), + JFUNCTION(json_error_position,1, 0, jsonErrorFunc), JFUNCTION(json_extract, -1, 0, jsonExtractFunc), JFUNCTION(->, 2, JSON_JSON, jsonExtractFunc), JFUNCTION(->>, 2, JSON_SQL, jsonExtractFunc), @@ -199928,10 +205055,10 @@ SQLITE_PRIVATE void sqlite3RegisterJsonFunctions(void){ #endif WAGGREGATE(json_group_array, 1, 0, 0, jsonArrayStep, jsonArrayFinal, jsonArrayValue, jsonGroupInverse, - SQLITE_SUBTYPE|SQLITE_UTF8|SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS), + SQLITE_SUBTYPE|SQLITE_UTF8|SQLITE_DETERMINISTIC), WAGGREGATE(json_group_object, 2, 0, 0, jsonObjectStep, jsonObjectFinal, jsonObjectValue, jsonGroupInverse, - SQLITE_SUBTYPE|SQLITE_UTF8|SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS) + SQLITE_SUBTYPE|SQLITE_UTF8|SQLITE_DETERMINISTIC) }; sqlite3InsertBuiltinFuncs(aJsonFunc, ArraySize(aJsonFunc)); #endif @@ -200058,6 +205185,11 @@ typedef unsigned int u32; #endif #endif /* !defined(SQLITE_AMALGAMATION) */ +/* Macro to check for 4-byte alignment. Only used inside of assert() */ +#ifdef SQLITE_DEBUG +# define FOUR_BYTE_ALIGNED(X) ((((char*)(X) - (char*)0) & 3)==0) +#endif + /* #include */ /* #include */ /* #include */ @@ -200433,16 +205565,17 @@ struct RtreeMatchArg { ** at run-time. */ #ifndef SQLITE_BYTEORDER -#if defined(i386) || defined(__i386__) || defined(_M_IX86) || \ - defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ - defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ - defined(__arm__) -# define SQLITE_BYTEORDER 1234 -#elif defined(sparc) || defined(__ppc__) -# define SQLITE_BYTEORDER 4321 -#else -# define SQLITE_BYTEORDER 0 /* 0 means "unknown at compile-time" */ -#endif +# if defined(i386) || defined(__i386__) || defined(_M_IX86) || \ + defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ + defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ + defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) +# define SQLITE_BYTEORDER 1234 +# elif defined(sparc) || defined(__ppc__) || \ + defined(__ARMEB__) || defined(__AARCH64EB__) +# define SQLITE_BYTEORDER 4321 +# else +# define SQLITE_BYTEORDER 0 +# endif #endif @@ -200463,7 +205596,7 @@ static int readInt16(u8 *p){ return (p[0]<<8) + p[1]; } static void readCoord(u8 *p, RtreeCoord *pCoord){ - assert( ((((char*)p) - (char*)0)&3)==0 ); /* p is always 4-byte aligned */ + assert( FOUR_BYTE_ALIGNED(p) ); #if SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300 pCoord->u = _byteswap_ulong(*(u32*)p); #elif SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000 @@ -200517,7 +205650,7 @@ static void writeInt16(u8 *p, int i){ } static int writeCoord(u8 *p, RtreeCoord *pCoord){ u32 i; - assert( ((((char*)p) - (char*)0)&3)==0 ); /* p is always 4-byte aligned */ + assert( FOUR_BYTE_ALIGNED(p) ); assert( sizeof(RtreeCoord)==4 ); assert( sizeof(u32)==4 ); #if SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000 @@ -201245,7 +206378,7 @@ static void rtreeNonleafConstraint( assert(p->op==RTREE_LE || p->op==RTREE_LT || p->op==RTREE_GE || p->op==RTREE_GT || p->op==RTREE_EQ || p->op==RTREE_TRUE || p->op==RTREE_FALSE ); - assert( ((((char*)pCellData) - (char*)0)&3)==0 ); /* 4-byte aligned */ + assert( FOUR_BYTE_ALIGNED(pCellData) ); switch( p->op ){ case RTREE_TRUE: return; /* Always satisfied */ case RTREE_FALSE: break; /* Never satisfied */ @@ -201298,7 +206431,7 @@ static void rtreeLeafConstraint( || p->op==RTREE_GT || p->op==RTREE_EQ || p->op==RTREE_TRUE || p->op==RTREE_FALSE ); pCellData += 8 + p->iCoord*4; - assert( ((((char*)pCellData) - (char*)0)&3)==0 ); /* 4-byte aligned */ + assert( FOUR_BYTE_ALIGNED(pCellData) ); RTREE_DECODE_COORD(eInt, pCellData, xN); switch( p->op ){ case RTREE_TRUE: return; /* Always satisfied */ @@ -201868,7 +207001,20 @@ static int rtreeFilter( p->pInfo->nCoord = pRtree->nDim2; p->pInfo->anQueue = pCsr->anQueue; p->pInfo->mxLevel = pRtree->iDepth + 1; - }else if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){ + }else if( eType==SQLITE_INTEGER ){ + sqlite3_int64 iVal = sqlite3_value_int64(argv[ii]); +#ifdef SQLITE_RTREE_INT_ONLY + p->u.rValue = iVal; +#else + p->u.rValue = (double)iVal; + if( iVal>=((sqlite3_int64)1)<<48 + || iVal<=-(((sqlite3_int64)1)<<48) + ){ + if( p->op==RTREE_LT ) p->op = RTREE_LE; + if( p->op==RTREE_GT ) p->op = RTREE_GE; + } +#endif + }else if( eType==SQLITE_FLOAT ){ #ifdef SQLITE_RTREE_INT_ONLY p->u.rValue = sqlite3_value_int64(argv[ii]); #else @@ -201999,11 +207145,12 @@ static int rtreeBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){ || p->op==SQLITE_INDEX_CONSTRAINT_MATCH) ){ u8 op; + u8 doOmit = 1; switch( p->op ){ - case SQLITE_INDEX_CONSTRAINT_EQ: op = RTREE_EQ; break; - case SQLITE_INDEX_CONSTRAINT_GT: op = RTREE_GT; break; + case SQLITE_INDEX_CONSTRAINT_EQ: op = RTREE_EQ; doOmit = 0; break; + case SQLITE_INDEX_CONSTRAINT_GT: op = RTREE_GT; doOmit = 0; break; case SQLITE_INDEX_CONSTRAINT_LE: op = RTREE_LE; break; - case SQLITE_INDEX_CONSTRAINT_LT: op = RTREE_LT; break; + case SQLITE_INDEX_CONSTRAINT_LT: op = RTREE_LT; doOmit = 0; break; case SQLITE_INDEX_CONSTRAINT_GE: op = RTREE_GE; break; case SQLITE_INDEX_CONSTRAINT_MATCH: op = RTREE_MATCH; break; default: op = 0; break; @@ -202012,7 +207159,7 @@ static int rtreeBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){ zIdxStr[iIdx++] = op; zIdxStr[iIdx++] = (char)(p->iColumn - 1 + '0'); pIdxInfo->aConstraintUsage[ii].argvIndex = (iIdx/2); - pIdxInfo->aConstraintUsage[ii].omit = 1; + pIdxInfo->aConstraintUsage[ii].omit = doOmit; } } } @@ -204670,7 +209817,7 @@ static GeoPoly *geopolyFuncParam( int nByte; testcase( pCtx==0 ); if( sqlite3_value_type(pVal)==SQLITE_BLOB - && (nByte = sqlite3_value_bytes(pVal))>=(4+6*sizeof(GeoCoord)) + && (nByte = sqlite3_value_bytes(pVal))>=(int)(4+6*sizeof(GeoCoord)) ){ const unsigned char *a = sqlite3_value_blob(pVal); int nVertex; @@ -204728,6 +209875,7 @@ static void geopolyBlobFunc( sqlite3_value **argv ){ GeoPoly *p = geopolyFuncParam(context, argv[0], 0); + (void)argc; if( p ){ sqlite3_result_blob(context, p->hdr, 4+8*p->nVertex, SQLITE_TRANSIENT); @@ -204747,6 +209895,7 @@ static void geopolyJsonFunc( sqlite3_value **argv ){ GeoPoly *p = geopolyFuncParam(context, argv[0], 0); + (void)argc; if( p ){ sqlite3 *db = sqlite3_context_db_handle(context); sqlite3_str *x = sqlite3_str_new(db); @@ -204828,6 +209977,7 @@ static void geopolyXformFunc( double F = sqlite3_value_double(argv[6]); GeoCoord x1, y1, x0, y0; int ii; + (void)argc; if( p ){ for(ii=0; iinVertex; ii++){ x0 = GeoX(p,ii); @@ -204878,6 +210028,7 @@ static void geopolyAreaFunc( sqlite3_value **argv ){ GeoPoly *p = geopolyFuncParam(context, argv[0], 0); + (void)argc; if( p ){ sqlite3_result_double(context, geopolyArea(p)); sqlite3_free(p); @@ -204903,6 +210054,7 @@ static void geopolyCcwFunc( sqlite3_value **argv ){ GeoPoly *p = geopolyFuncParam(context, argv[0], 0); + (void)argc; if( p ){ if( geopolyArea(p)<0.0 ){ int ii, jj; @@ -204957,6 +210109,7 @@ static void geopolyRegularFunc( int n = sqlite3_value_int(argv[3]); int i; GeoPoly *p; + (void)argc; if( n<3 || r<=0.0 ) return; if( n>1000 ) n = 1000; @@ -205066,6 +210219,7 @@ static void geopolyBBoxFunc( sqlite3_value **argv ){ GeoPoly *p = geopolyBBox(context, argv[0], 0, 0); + (void)argc; if( p ){ sqlite3_result_blob(context, p->hdr, 4+8*p->nVertex, SQLITE_TRANSIENT); @@ -205093,6 +210247,7 @@ static void geopolyBBoxStep( ){ RtreeCoord a[4]; int rc = SQLITE_OK; + (void)argc; (void)geopolyBBox(context, argv[0], a, &rc); if( rc==SQLITE_OK ){ GeoBBox *pBBox; @@ -205181,6 +210336,8 @@ static void geopolyContainsPointFunc( int v = 0; int cnt = 0; int ii; + (void)argc; + if( p1==0 ) return; for(ii=0; iinVertex-1; ii++){ v = pointBeneathLine(x0,y0,GeoX(p1,ii), GeoY(p1,ii), @@ -205220,6 +210377,7 @@ static void geopolyWithinFunc( ){ GeoPoly *p1 = geopolyFuncParam(context, argv[0], 0); GeoPoly *p2 = geopolyFuncParam(context, argv[1], 0); + (void)argc; if( p1 && p2 ){ int x = geopolyOverlap(p1, p2); if( x<0 ){ @@ -205550,6 +210708,7 @@ static void geopolyOverlapFunc( ){ GeoPoly *p1 = geopolyFuncParam(context, argv[0], 0); GeoPoly *p2 = geopolyFuncParam(context, argv[1], 0); + (void)argc; if( p1 && p2 ){ int x = geopolyOverlap(p1, p2); if( x<0 ){ @@ -205570,8 +210729,12 @@ static void geopolyDebugFunc( int argc, sqlite3_value **argv ){ + (void)context; + (void)argc; #ifdef GEOPOLY_ENABLE_DEBUG geo_debug = sqlite3_value_int(argv[0]); +#else + (void)argv; #endif } @@ -205599,6 +210762,7 @@ static int geopolyInit( sqlite3_str *pSql; char *zSql; int ii; + (void)pAux; sqlite3_vtab_config(db, SQLITE_VTAB_CONSTRAINT_SUPPORT, 1); @@ -205715,6 +210879,7 @@ static int geopolyFilter( RtreeNode *pRoot = 0; int rc = SQLITE_OK; int iCell = 0; + (void)idxStr; rtreeReference(pRtree); @@ -205841,6 +211006,7 @@ static int geopolyBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){ int iRowidTerm = -1; int iFuncTerm = -1; int idxNum = 0; + (void)tab; for(ii=0; iinConstraint; ii++){ struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[ii]; @@ -206087,6 +211253,8 @@ static int geopolyFindFunction( void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), void **ppArg ){ + (void)pVtab; + (void)nArg; if( sqlite3_stricmp(zName, "geopoly_overlap")==0 ){ *pxFunc = geopolyOverlapFunc; *ppArg = 0; @@ -206156,7 +211324,7 @@ static int sqlite3_geopoly_init(sqlite3 *db){ } aAgg[] = { { geopolyBBoxStep, geopolyBBoxFinal, "geopoly_group_bbox" }, }; - int i; + unsigned int i; for(i=0; i naming scheme. +** tables or views named using the data_ naming scheme. ** ** Instead of the plain data_ naming scheme, RBU database tables ** may also be named data_, where is any sequence @@ -207390,7 +212558,7 @@ SQLITE_PRIVATE void sqlite3Fts3IcuTokenizerModule( ** ** If the target database table is a virtual table or a table that has no ** PRIMARY KEY declaration, the data_% table must also contain a column -** named "rbu_rowid". This column is mapped to the tables implicit primary +** named "rbu_rowid". This column is mapped to the table's implicit primary ** key column - "rowid". Virtual tables for which the "rowid" column does ** not function like a primary key value cannot be updated using RBU. For ** example, if the target db contains either of the following: @@ -210856,11 +216024,11 @@ static void rbuSetupCheckpoint(sqlite3rbu *p, RbuState *pState){ ** no-ops. These locks will not be released until the connection ** is closed. ** - ** * Attempting to xSync() the database file causes an SQLITE_INTERNAL + ** * Attempting to xSync() the database file causes an SQLITE_NOTICE ** error. ** ** As a result, unless an error (i.e. OOM or SQLITE_BUSY) occurs, the - ** checkpoint below fails with SQLITE_INTERNAL, and leaves the aFrame[] + ** checkpoint below fails with SQLITE_NOTICE, and leaves the aFrame[] ** array populated with a set of (frame -> page) mappings. Because the ** WRITER, CHECKPOINT and READ0 locks are still held, it is safe to copy ** data from the wal file into the database file according to the @@ -210870,7 +216038,7 @@ static void rbuSetupCheckpoint(sqlite3rbu *p, RbuState *pState){ int rc2; p->eStage = RBU_STAGE_CAPTURE; rc2 = sqlite3_exec(p->dbMain, "PRAGMA main.wal_checkpoint=restart", 0, 0,0); - if( rc2!=SQLITE_INTERNAL ) p->rc = rc2; + if( rc2!=SQLITE_NOTICE ) p->rc = rc2; } if( p->rc==SQLITE_OK && p->nFrame>0 ){ @@ -210916,7 +216084,7 @@ static int rbuCaptureWalRead(sqlite3rbu *pRbu, i64 iOff, int iAmt){ if( pRbu->mLock!=mReq ){ pRbu->rc = SQLITE_BUSY; - return SQLITE_INTERNAL; + return SQLITE_NOTICE_RBU; } pRbu->pgsz = iAmt; @@ -210966,6 +216134,11 @@ static void rbuCheckpointFrame(sqlite3rbu *p, RbuFrame *pFrame){ p->rc = pDb->pMethods->xWrite(pDb, p->aBuf, p->pgsz, iOff); } +/* +** This value is copied from the definition of ZIPVFS_CTRL_FILE_POINTER +** in zipvfs.h. +*/ +#define RBU_ZIPVFS_CTRL_FILE_POINTER 230439 /* ** Take an EXCLUSIVE lock on the database file. Return SQLITE_OK if @@ -210974,9 +216147,20 @@ static void rbuCheckpointFrame(sqlite3rbu *p, RbuFrame *pFrame){ static int rbuLockDatabase(sqlite3 *db){ int rc = SQLITE_OK; sqlite3_file *fd = 0; - sqlite3_file_control(db, "main", SQLITE_FCNTL_FILE_POINTER, &fd); - if( fd->pMethods ){ + sqlite3_file_control(db, "main", RBU_ZIPVFS_CTRL_FILE_POINTER, &fd); + if( fd ){ + sqlite3_file_control(db, "main", SQLITE_FCNTL_FILE_POINTER, &fd); + rc = fd->pMethods->xLock(fd, SQLITE_LOCK_SHARED); + if( rc==SQLITE_OK ){ + rc = fd->pMethods->xUnlock(fd, SQLITE_LOCK_NONE); + } + sqlite3_file_control(db, "main", RBU_ZIPVFS_CTRL_FILE_POINTER, &fd); + }else{ + sqlite3_file_control(db, "main", SQLITE_FCNTL_FILE_POINTER, &fd); + } + + if( rc==SQLITE_OK && fd->pMethods ){ rc = fd->pMethods->xLock(fd, SQLITE_LOCK_SHARED); if( rc==SQLITE_OK ){ rc = fd->pMethods->xLock(fd, SQLITE_LOCK_EXCLUSIVE); @@ -211655,7 +216839,8 @@ static void rbuSetupOal(sqlite3rbu *p, RbuState *pState){ static void rbuDeleteOalFile(sqlite3rbu *p){ char *zOal = rbuMPrintf(p, "%s-oal", p->zTarget); if( zOal ){ - sqlite3_vfs *pVfs = sqlite3_vfs_find(0); + sqlite3_vfs *pVfs = 0; + sqlite3_file_control(p->dbMain, "main", SQLITE_FCNTL_VFS_POINTER, &pVfs); assert( pVfs && p->rc==SQLITE_OK && p->zErrmsg==0 ); pVfs->xDelete(pVfs, zOal, 0); sqlite3_free(zOal); @@ -212303,7 +217488,7 @@ SQLITE_API void sqlite3rbu_rename_handler( ** database file are recorded. xShmLock() calls to unlock the same ** locks are no-ops (so that once obtained, these locks are never ** relinquished). Finally, calls to xSync() on the target database -** file fail with SQLITE_INTERNAL errors. +** file fail with SQLITE_NOTICE errors. */ static void rbuUnlockShm(rbu_file *p){ @@ -212412,9 +217597,12 @@ static int rbuVfsClose(sqlite3_file *pFile){ sqlite3_free(p->zDel); if( p->openFlags & SQLITE_OPEN_MAIN_DB ){ + const sqlite3_io_methods *pMeth = p->pReal->pMethods; rbuMainlistRemove(p); rbuUnlockShm(p); - p->pReal->pMethods->xShmUnmap(p->pReal, 0); + if( pMeth->iVersion>1 && pMeth->xShmUnmap ){ + pMeth->xShmUnmap(p->pReal, 0); + } } else if( (p->openFlags & SQLITE_OPEN_DELETEONCLOSE) && p->pRbu ){ rbuUpdateTempSize(p, 0); @@ -212582,7 +217770,7 @@ static int rbuVfsSync(sqlite3_file *pFile, int flags){ rbu_file *p = (rbu_file *)pFile; if( p->pRbu && p->pRbu->eStage==RBU_STAGE_CAPTURE ){ if( p->openFlags & SQLITE_OPEN_MAIN_DB ){ - return SQLITE_INTERNAL; + return SQLITE_NOTICE_RBU; } return SQLITE_OK; } @@ -212873,6 +218061,25 @@ static int rbuVfsOpen( rbuVfsShmUnmap, /* xShmUnmap */ 0, 0 /* xFetch, xUnfetch */ }; + static sqlite3_io_methods rbuvfs_io_methods1 = { + 1, /* iVersion */ + rbuVfsClose, /* xClose */ + rbuVfsRead, /* xRead */ + rbuVfsWrite, /* xWrite */ + rbuVfsTruncate, /* xTruncate */ + rbuVfsSync, /* xSync */ + rbuVfsFileSize, /* xFileSize */ + rbuVfsLock, /* xLock */ + rbuVfsUnlock, /* xUnlock */ + rbuVfsCheckReservedLock, /* xCheckReservedLock */ + rbuVfsFileControl, /* xFileControl */ + rbuVfsSectorSize, /* xSectorSize */ + rbuVfsDeviceCharacteristics, /* xDeviceCharacteristics */ + 0, 0, 0, 0, 0, 0 + }; + + + rbu_vfs *pRbuVfs = (rbu_vfs*)pVfs; sqlite3_vfs *pRealVfs = pRbuVfs->pRealVfs; rbu_file *pFd = (rbu_file *)pFile; @@ -212927,10 +218134,15 @@ static int rbuVfsOpen( rc = pRealVfs->xOpen(pRealVfs, zOpen, pFd->pReal, oflags, pOutFlags); } if( pFd->pReal->pMethods ){ + const sqlite3_io_methods *pMeth = pFd->pReal->pMethods; /* The xOpen() operation has succeeded. Set the sqlite3_file.pMethods ** pointer and, if the file is a main database file, link it into the ** mutex protected linked list of all such files. */ - pFile->pMethods = &rbuvfs_io_methods; + if( pMeth->iVersion<2 || pMeth->xShmLock==0 ){ + pFile->pMethods = &rbuvfs_io_methods1; + }else{ + pFile->pMethods = &rbuvfs_io_methods; + } if( flags & SQLITE_OPEN_MAIN_DB ){ rbuMainlistAdd(pFd); } @@ -213363,6 +218575,7 @@ static int statConnect( StatTable *pTab = 0; int rc = SQLITE_OK; int iDb; + (void)pAux; if( argc>=4 ){ Token nm; @@ -213416,6 +218629,7 @@ static int statBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){ int iSchema = -1; int iName = -1; int iAgg = -1; + (void)tab; /* Look for a valid schema=? constraint. If found, change the idxNum to ** 1 and request the value of that constraint be sent to xFilter. And @@ -213941,6 +219155,8 @@ static int statFilter( int iArg = 0; /* Count of argv[] parameters used so far */ int rc = SQLITE_OK; /* Result of this operation */ const char *zName = 0; /* Only provide analysis of this table */ + (void)argc; + (void)idxStr; statResetCsr(pCsr); sqlite3_finalize(pCsr->pStmt); @@ -214024,16 +219240,16 @@ static int statColumn( } break; case 4: /* ncell */ - sqlite3_result_int(ctx, pCsr->nCell); + sqlite3_result_int64(ctx, pCsr->nCell); break; case 5: /* payload */ - sqlite3_result_int(ctx, pCsr->nPayload); + sqlite3_result_int64(ctx, pCsr->nPayload); break; case 6: /* unused */ - sqlite3_result_int(ctx, pCsr->nUnused); + sqlite3_result_int64(ctx, pCsr->nUnused); break; case 7: /* mx_payload */ - sqlite3_result_int(ctx, pCsr->nMxPayload); + sqlite3_result_int64(ctx, pCsr->nMxPayload); break; case 8: /* pgoffset */ if( !pCsr->isAgg ){ @@ -214041,7 +219257,7 @@ static int statColumn( } break; case 9: /* pgsize */ - sqlite3_result_int(ctx, pCsr->szPage); + sqlite3_result_int64(ctx, pCsr->szPage); break; case 10: { /* schema */ sqlite3 *db = sqlite3_context_db_handle(ctx); @@ -214175,8 +219391,13 @@ static int dbpageConnect( ){ DbpageTable *pTab = 0; int rc = SQLITE_OK; + (void)pAux; + (void)argc; + (void)argv; + (void)pzErr; sqlite3_vtab_config(db, SQLITE_VTAB_DIRECTONLY); + sqlite3_vtab_config(db, SQLITE_VTAB_USES_ALL_SCHEMAS); rc = sqlite3_declare_vtab(db, "CREATE TABLE x(pgno INTEGER PRIMARY KEY, data BLOB, schema HIDDEN)"); if( rc==SQLITE_OK ){ @@ -214213,6 +219434,7 @@ static int dbpageDisconnect(sqlite3_vtab *pVtab){ static int dbpageBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){ int i; int iPlan = 0; + (void)tab; /* If there is a schema= constraint, it must be honored. Report a ** ridiculously large estimated cost if the schema= constraint is @@ -214259,7 +219481,6 @@ static int dbpageBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){ ){ pIdxInfo->orderByConsumed = 1; } - sqlite3VtabUsesAllSchemas(pIdxInfo); return SQLITE_OK; } @@ -214328,6 +219549,8 @@ static int dbpageFilter( sqlite3 *db = pTab->db; Btree *pBt; + (void)idxStr; + /* Default setting is no rows of result */ pCsr->pgno = 1; pCsr->mxPgno = 0; @@ -214342,7 +219565,7 @@ static int dbpageFilter( pCsr->iDb = 0; } pBt = db->aDb[pCsr->iDb].pBt; - if( pBt==0 ) return SQLITE_OK; + if( NEVER(pBt==0) ) return SQLITE_OK; pCsr->pPager = sqlite3BtreePager(pBt); pCsr->szPage = sqlite3BtreeGetPageSize(pBt); pCsr->mxPgno = sqlite3BtreeLastPage(pBt); @@ -214423,6 +219646,7 @@ static int dbpageUpdate( Pager *pPager; int szPage; + (void)pRowid; if( pTab->db->flags & SQLITE_Defensive ){ zErr = "read-only"; goto update_fail; @@ -214432,18 +219656,20 @@ static int dbpageUpdate( goto update_fail; } pgno = sqlite3_value_int(argv[0]); - if( (Pgno)sqlite3_value_int(argv[1])!=pgno ){ + if( sqlite3_value_type(argv[0])==SQLITE_NULL + || (Pgno)sqlite3_value_int(argv[1])!=pgno + ){ zErr = "cannot insert"; goto update_fail; } zSchema = (const char*)sqlite3_value_text(argv[4]); - iDb = zSchema ? sqlite3FindDbName(pTab->db, zSchema) : -1; - if( iDb<0 ){ + iDb = ALWAYS(zSchema) ? sqlite3FindDbName(pTab->db, zSchema) : -1; + if( NEVER(iDb<0) ){ zErr = "no such schema"; goto update_fail; } pBt = pTab->db->aDb[iDb].pBt; - if( pgno<1 || pBt==0 || pgno>sqlite3BtreeLastPage(pBt) ){ + if( NEVER(pgno<1) || NEVER(pBt==0) || NEVER(pgno>sqlite3BtreeLastPage(pBt)) ){ zErr = "bad page number"; goto update_fail; } @@ -214482,12 +219708,11 @@ static int dbpageBegin(sqlite3_vtab *pVtab){ DbpageTable *pTab = (DbpageTable *)pVtab; sqlite3 *db = pTab->db; int i; - int rc = SQLITE_OK; - for(i=0; rc==SQLITE_OK && inDb; i++){ + for(i=0; inDb; i++){ Btree *pBt = db->aDb[i].pBt; - if( pBt ) rc = sqlite3BtreeBeginTrans(pBt, 1, 0); + if( pBt ) (void)sqlite3BtreeBeginTrans(pBt, 1, 0); } - return rc; + return SQLITE_OK; } @@ -214556,6 +219781,8 @@ typedef struct SessionInput SessionInput; # endif #endif +#define SESSIONS_ROWID "_rowid_" + static int sessions_strm_chunk_size = SESSIONS_STRM_CHUNK_SIZE; typedef struct SessionHook SessionHook; @@ -214577,6 +219804,7 @@ struct sqlite3_session { int bEnable; /* True if currently recording */ int bIndirect; /* True if all changes are indirect */ int bAutoAttach; /* True to auto-attach tables */ + int bImplicitPK; /* True to handle tables with implicit PK */ int rc; /* Non-zero if an error has occurred */ void *pFilterCtx; /* First argument to pass to xTableFilter */ int (*xTableFilter)(void *pCtx, const char *zTab); @@ -214653,6 +219881,7 @@ struct SessionTable { char *zName; /* Local name of table */ int nCol; /* Number of columns in table zName */ int bStat1; /* True if this is sqlite_stat1 */ + int bRowid; /* True if this table uses rowid for PK */ const char **azCol; /* Column names */ u8 *abPK; /* Array of primary key flags */ int nEntry; /* Total number of entries in hash table */ @@ -215045,6 +220274,7 @@ static unsigned int sessionHashAppendType(unsigned int h, int eType){ */ static int sessionPreupdateHash( sqlite3_session *pSession, /* Session object that owns pTab */ + i64 iRowid, SessionTable *pTab, /* Session table handle */ int bNew, /* True to hash the new.* PK */ int *piHash, /* OUT: Hash value */ @@ -215053,48 +220283,53 @@ static int sessionPreupdateHash( unsigned int h = 0; /* Hash value to return */ int i; /* Used to iterate through columns */ - assert( *pbNullPK==0 ); - assert( pTab->nCol==pSession->hook.xCount(pSession->hook.pCtx) ); - for(i=0; inCol; i++){ - if( pTab->abPK[i] ){ - int rc; - int eType; - sqlite3_value *pVal; - - if( bNew ){ - rc = pSession->hook.xNew(pSession->hook.pCtx, i, &pVal); - }else{ - rc = pSession->hook.xOld(pSession->hook.pCtx, i, &pVal); - } - if( rc!=SQLITE_OK ) return rc; + if( pTab->bRowid ){ + assert( pTab->nCol-1==pSession->hook.xCount(pSession->hook.pCtx) ); + h = sessionHashAppendI64(h, iRowid); + }else{ + assert( *pbNullPK==0 ); + assert( pTab->nCol==pSession->hook.xCount(pSession->hook.pCtx) ); + for(i=0; inCol; i++){ + if( pTab->abPK[i] ){ + int rc; + int eType; + sqlite3_value *pVal; - eType = sqlite3_value_type(pVal); - h = sessionHashAppendType(h, eType); - if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){ - i64 iVal; - if( eType==SQLITE_INTEGER ){ - iVal = sqlite3_value_int64(pVal); + if( bNew ){ + rc = pSession->hook.xNew(pSession->hook.pCtx, i, &pVal); }else{ - double rVal = sqlite3_value_double(pVal); - assert( sizeof(iVal)==8 && sizeof(rVal)==8 ); - memcpy(&iVal, &rVal, 8); + rc = pSession->hook.xOld(pSession->hook.pCtx, i, &pVal); } - h = sessionHashAppendI64(h, iVal); - }else if( eType==SQLITE_TEXT || eType==SQLITE_BLOB ){ - const u8 *z; - int n; - if( eType==SQLITE_TEXT ){ - z = (const u8 *)sqlite3_value_text(pVal); + if( rc!=SQLITE_OK ) return rc; + + eType = sqlite3_value_type(pVal); + h = sessionHashAppendType(h, eType); + if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){ + i64 iVal; + if( eType==SQLITE_INTEGER ){ + iVal = sqlite3_value_int64(pVal); + }else{ + double rVal = sqlite3_value_double(pVal); + assert( sizeof(iVal)==8 && sizeof(rVal)==8 ); + memcpy(&iVal, &rVal, 8); + } + h = sessionHashAppendI64(h, iVal); + }else if( eType==SQLITE_TEXT || eType==SQLITE_BLOB ){ + const u8 *z; + int n; + if( eType==SQLITE_TEXT ){ + z = (const u8 *)sqlite3_value_text(pVal); + }else{ + z = (const u8 *)sqlite3_value_blob(pVal); + } + n = sqlite3_value_bytes(pVal); + if( !z && (eType!=SQLITE_BLOB || n>0) ) return SQLITE_NOMEM; + h = sessionHashAppendBlob(h, n, z); }else{ - z = (const u8 *)sqlite3_value_blob(pVal); + assert( eType==SQLITE_NULL ); + assert( pTab->bStat1==0 || i!=1 ); + *pbNullPK = 1; } - n = sqlite3_value_bytes(pVal); - if( !z && (eType!=SQLITE_BLOB || n>0) ) return SQLITE_NOMEM; - h = sessionHashAppendBlob(h, n, z); - }else{ - assert( eType==SQLITE_NULL ); - assert( pTab->bStat1==0 || i!=1 ); - *pbNullPK = 1; } } } @@ -215377,6 +220612,7 @@ static int sessionMergeUpdate( */ static int sessionPreupdateEqual( sqlite3_session *pSession, /* Session object that owns SessionTable */ + i64 iRowid, /* Rowid value if pTab->bRowid */ SessionTable *pTab, /* Table associated with change */ SessionChange *pChange, /* Change to compare to */ int op /* Current pre-update operation */ @@ -215384,6 +220620,11 @@ static int sessionPreupdateEqual( int iCol; /* Used to iterate through columns */ u8 *a = pChange->aRecord; /* Cursor used to scan change record */ + if( pTab->bRowid ){ + if( a[0]!=SQLITE_INTEGER ) return 0; + return sessionGetI64(&a[1])==iRowid; + } + assert( op==SQLITE_INSERT || op==SQLITE_UPDATE || op==SQLITE_DELETE ); for(iCol=0; iColnCol; iCol++){ if( !pTab->abPK[iCol] ){ @@ -215406,6 +220647,7 @@ static int sessionPreupdateEqual( rc = pSession->hook.xOld(pSession->hook.pCtx, iCol, &pVal); } assert( rc==SQLITE_OK ); + (void)rc; /* Suppress warning about unused variable */ if( sqlite3_value_type(pVal)!=eType ) return 0; /* A SessionChange object never has a NULL value in a PK column */ @@ -215528,7 +220770,8 @@ static int sessionTableInfo( int *pnCol, /* OUT: number of columns */ const char **pzTab, /* OUT: Copy of zThis */ const char ***pazCol, /* OUT: Array of column names for table */ - u8 **pabPK /* OUT: Array of booleans - true for PK col */ + u8 **pabPK, /* OUT: Array of booleans - true for PK col */ + int *pbRowid /* OUT: True if only PK is a rowid */ ){ char *zPragma; sqlite3_stmt *pStmt; @@ -215540,6 +220783,7 @@ static int sessionTableInfo( u8 *pAlloc = 0; char **azCol = 0; u8 *abPK = 0; + int bRowid = 0; /* Set to true to use rowid as PK */ assert( pazCol && pabPK ); @@ -215584,10 +220828,15 @@ static int sessionTableInfo( } nByte = nThis + 1; + bRowid = (pbRowid!=0); while( SQLITE_ROW==sqlite3_step(pStmt) ){ nByte += sqlite3_column_bytes(pStmt, 1); nDbCol++; + if( sqlite3_column_int(pStmt, 5) ) bRowid = 0; } + if( nDbCol==0 ) bRowid = 0; + nDbCol += bRowid; + nByte += strlen(SESSIONS_ROWID); rc = sqlite3_reset(pStmt); if( rc==SQLITE_OK ){ @@ -215609,6 +220858,14 @@ static int sessionTableInfo( } i = 0; + if( bRowid ){ + size_t nName = strlen(SESSIONS_ROWID); + memcpy(pAlloc, SESSIONS_ROWID, nName+1); + azCol[i] = (char*)pAlloc; + pAlloc += nName+1; + abPK[i] = 1; + i++; + } while( SQLITE_ROW==sqlite3_step(pStmt) ){ int nName = sqlite3_column_bytes(pStmt, 1); const unsigned char *zName = sqlite3_column_text(pStmt, 1); @@ -215620,7 +220877,6 @@ static int sessionTableInfo( i++; } rc = sqlite3_reset(pStmt); - } /* If successful, populate the output variables. Otherwise, zero them and @@ -215637,6 +220893,7 @@ static int sessionTableInfo( if( pzTab ) *pzTab = 0; sessionFree(pSession, azCol); } + if( pbRowid ) *pbRowid = bRowid; sqlite3_finalize(pStmt); return rc; } @@ -215658,7 +220915,8 @@ static int sessionInitTable(sqlite3_session *pSession, SessionTable *pTab){ u8 *abPK; assert( pTab->azCol==0 || pTab->abPK==0 ); pSession->rc = sessionTableInfo(pSession, pSession->db, pSession->zDb, - pTab->zName, &pTab->nCol, 0, &pTab->azCol, &abPK + pTab->zName, &pTab->nCol, 0, &pTab->azCol, &abPK, + (pSession->bImplicitPK ? &pTab->bRowid : 0) ); if( pSession->rc==SQLITE_OK ){ int i; @@ -215730,6 +220988,7 @@ static int sessionUpdateMaxSize( ){ i64 nNew = 2; if( pC->op==SQLITE_INSERT ){ + if( pTab->bRowid ) nNew += 9; if( op!=SQLITE_DELETE ){ int ii; for(ii=0; iinCol; ii++){ @@ -215746,12 +221005,16 @@ static int sessionUpdateMaxSize( }else{ int ii; u8 *pCsr = pC->aRecord; - for(ii=0; iinCol; ii++){ + if( pTab->bRowid ){ + nNew += 9 + 1; + pCsr += 9; + } + for(ii=pTab->bRowid; iinCol; ii++){ int bChanged = 1; int nOld = 0; int eType; sqlite3_value *p = 0; - pSession->hook.xNew(pSession->hook.pCtx, ii, &p); + pSession->hook.xNew(pSession->hook.pCtx, ii-pTab->bRowid, &p); if( p==0 ){ return SQLITE_NOMEM; } @@ -215830,6 +221093,7 @@ static int sessionUpdateMaxSize( */ static void sessionPreupdateOneChange( int op, /* One of SQLITE_UPDATE, INSERT, DELETE */ + i64 iRowid, sqlite3_session *pSession, /* Session object pTab is attached to */ SessionTable *pTab /* Table that change applies to */ ){ @@ -215845,7 +221109,7 @@ static void sessionPreupdateOneChange( /* Check the number of columns in this xPreUpdate call matches the ** number of columns in the table. */ - if( pTab->nCol!=pSession->hook.xCount(pSession->hook.pCtx) ){ + if( (pTab->nCol-pTab->bRowid)!=pSession->hook.xCount(pSession->hook.pCtx) ){ pSession->rc = SQLITE_SCHEMA; return; } @@ -215878,14 +221142,16 @@ static void sessionPreupdateOneChange( /* Calculate the hash-key for this change. If the primary key of the row ** includes a NULL value, exit early. Such changes are ignored by the ** session module. */ - rc = sessionPreupdateHash(pSession, pTab, op==SQLITE_INSERT, &iHash, &bNull); + rc = sessionPreupdateHash( + pSession, iRowid, pTab, op==SQLITE_INSERT, &iHash, &bNull + ); if( rc!=SQLITE_OK ) goto error_out; if( bNull==0 ){ /* Search the hash table for an existing record for this row. */ SessionChange *pC; for(pC=pTab->apChange[iHash]; pC; pC=pC->pNext){ - if( sessionPreupdateEqual(pSession, pTab, pC, op) ) break; + if( sessionPreupdateEqual(pSession, iRowid, pTab, pC, op) ) break; } if( pC==0 ){ @@ -215900,7 +221166,7 @@ static void sessionPreupdateOneChange( /* Figure out how large an allocation is required */ nByte = sizeof(SessionChange); - for(i=0; inCol; i++){ + for(i=0; i<(pTab->nCol-pTab->bRowid); i++){ sqlite3_value *p = 0; if( op!=SQLITE_INSERT ){ TESTONLY(int trc = ) pSession->hook.xOld(pSession->hook.pCtx, i, &p); @@ -215915,6 +221181,9 @@ static void sessionPreupdateOneChange( rc = sessionSerializeValue(0, p, &nByte); if( rc!=SQLITE_OK ) goto error_out; } + if( pTab->bRowid ){ + nByte += 9; /* Size of rowid field - an integer */ + } /* Allocate the change object */ pC = (SessionChange *)sessionMalloc64(pSession, nByte); @@ -215931,7 +221200,12 @@ static void sessionPreupdateOneChange( ** required values and encodings have already been cached in memory. ** It is not possible for an OOM to occur in this block. */ nByte = 0; - for(i=0; inCol; i++){ + if( pTab->bRowid ){ + pC->aRecord[0] = SQLITE_INTEGER; + sessionPutI64(&pC->aRecord[1], iRowid); + nByte = 9; + } + for(i=0; i<(pTab->nCol-pTab->bRowid); i++){ sqlite3_value *p = 0; if( op!=SQLITE_INSERT ){ pSession->hook.xOld(pSession->hook.pCtx, i, &p); @@ -216030,6 +221304,8 @@ static void xPreUpdate( int nDb = sqlite3Strlen30(zDb); assert( sqlite3_mutex_held(db->mutex) ); + (void)iKey1; + (void)iKey2; for(pSession=(sqlite3_session *)pCtx; pSession; pSession=pSession->pNext){ SessionTable *pTab; @@ -216044,9 +221320,10 @@ static void xPreUpdate( pSession->rc = sessionFindTable(pSession, zName, &pTab); if( pTab ){ assert( pSession->rc==SQLITE_OK ); - sessionPreupdateOneChange(op, pSession, pTab); + assert( op==SQLITE_UPDATE || iKey1==iKey2 ); + sessionPreupdateOneChange(op, iKey1, pSession, pTab); if( op==SQLITE_UPDATE ){ - sessionPreupdateOneChange(SQLITE_INSERT, pSession, pTab); + sessionPreupdateOneChange(SQLITE_INSERT, iKey2, pSession, pTab); } } } @@ -216085,6 +221362,7 @@ static void sessionPreupdateHooks( typedef struct SessionDiffCtx SessionDiffCtx; struct SessionDiffCtx { sqlite3_stmt *pStmt; + int bRowid; int nOldOff; }; @@ -216093,19 +221371,20 @@ struct SessionDiffCtx { */ static int sessionDiffOld(void *pCtx, int iVal, sqlite3_value **ppVal){ SessionDiffCtx *p = (SessionDiffCtx*)pCtx; - *ppVal = sqlite3_column_value(p->pStmt, iVal+p->nOldOff); + *ppVal = sqlite3_column_value(p->pStmt, iVal+p->nOldOff+p->bRowid); return SQLITE_OK; } static int sessionDiffNew(void *pCtx, int iVal, sqlite3_value **ppVal){ SessionDiffCtx *p = (SessionDiffCtx*)pCtx; - *ppVal = sqlite3_column_value(p->pStmt, iVal); + *ppVal = sqlite3_column_value(p->pStmt, iVal+p->bRowid); return SQLITE_OK; } static int sessionDiffCount(void *pCtx){ SessionDiffCtx *p = (SessionDiffCtx*)pCtx; - return p->nOldOff ? p->nOldOff : sqlite3_column_count(p->pStmt); + return (p->nOldOff ? p->nOldOff : sqlite3_column_count(p->pStmt)) - p->bRowid; } static int sessionDiffDepth(void *pCtx){ + (void)pCtx; return 0; } @@ -216179,17 +221458,18 @@ static char *sessionExprCompareOther( } static char *sessionSelectFindNew( - int nCol, const char *zDb1, /* Pick rows in this db only */ const char *zDb2, /* But not in this one */ + int bRowid, const char *zTbl, /* Table name */ const char *zExpr ){ + const char *zSel = (bRowid ? SESSIONS_ROWID ", *" : "*"); char *zRet = sqlite3_mprintf( - "SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS (" + "SELECT %s FROM \"%w\".\"%w\" WHERE NOT EXISTS (" " SELECT 1 FROM \"%w\".\"%w\" WHERE %s" ")", - zDb1, zTbl, zDb2, zTbl, zExpr + zSel, zDb1, zTbl, zDb2, zTbl, zExpr ); return zRet; } @@ -216203,7 +221483,9 @@ static int sessionDiffFindNew( char *zExpr ){ int rc = SQLITE_OK; - char *zStmt = sessionSelectFindNew(pTab->nCol, zDb1, zDb2, pTab->zName,zExpr); + char *zStmt = sessionSelectFindNew( + zDb1, zDb2, pTab->bRowid, pTab->zName, zExpr + ); if( zStmt==0 ){ rc = SQLITE_NOMEM; @@ -216214,8 +221496,10 @@ static int sessionDiffFindNew( SessionDiffCtx *pDiffCtx = (SessionDiffCtx*)pSession->hook.pCtx; pDiffCtx->pStmt = pStmt; pDiffCtx->nOldOff = 0; + pDiffCtx->bRowid = pTab->bRowid; while( SQLITE_ROW==sqlite3_step(pStmt) ){ - sessionPreupdateOneChange(op, pSession, pTab); + i64 iRowid = (pTab->bRowid ? sqlite3_column_int64(pStmt, 0) : 0); + sessionPreupdateOneChange(op, iRowid, pSession, pTab); } rc = sqlite3_finalize(pStmt); } @@ -216225,6 +221509,27 @@ static int sessionDiffFindNew( return rc; } +/* +** Return a comma-separated list of the fully-qualified (with both database +** and table name) column names from table pTab. e.g. +** +** "main"."t1"."a", "main"."t1"."b", "main"."t1"."c" +*/ +static char *sessionAllCols( + const char *zDb, + SessionTable *pTab +){ + int ii; + char *zRet = 0; + for(ii=0; iinCol; ii++){ + zRet = sqlite3_mprintf("%z%s\"%w\".\"%w\".\"%w\"", + zRet, (zRet ? ", " : ""), zDb, pTab->zName, pTab->azCol[ii] + ); + if( !zRet ) break; + } + return zRet; +} + static int sessionDiffFindModified( sqlite3_session *pSession, SessionTable *pTab, @@ -216239,11 +221544,13 @@ static int sessionDiffFindModified( if( zExpr2==0 ){ rc = SQLITE_NOMEM; }else{ + char *z1 = sessionAllCols(pSession->zDb, pTab); + char *z2 = sessionAllCols(zFrom, pTab); char *zStmt = sqlite3_mprintf( - "SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)", - pSession->zDb, pTab->zName, zFrom, pTab->zName, zExpr, zExpr2 + "SELECT %s,%s FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)", + z1, z2, pSession->zDb, pTab->zName, zFrom, pTab->zName, zExpr, zExpr2 ); - if( zStmt==0 ){ + if( zStmt==0 || z1==0 || z2==0 ){ rc = SQLITE_NOMEM; }else{ sqlite3_stmt *pStmt; @@ -216254,12 +221561,15 @@ static int sessionDiffFindModified( pDiffCtx->pStmt = pStmt; pDiffCtx->nOldOff = pTab->nCol; while( SQLITE_ROW==sqlite3_step(pStmt) ){ - sessionPreupdateOneChange(SQLITE_UPDATE, pSession, pTab); + i64 iRowid = (pTab->bRowid ? sqlite3_column_int64(pStmt, 0) : 0); + sessionPreupdateOneChange(SQLITE_UPDATE, iRowid, pSession, pTab); } rc = sqlite3_finalize(pStmt); } - sqlite3_free(zStmt); } + sqlite3_free(zStmt); + sqlite3_free(z1); + sqlite3_free(z2); } return rc; @@ -216298,9 +221608,12 @@ SQLITE_API int sqlite3session_diff( int bHasPk = 0; int bMismatch = 0; int nCol; /* Columns in zFrom.zTbl */ + int bRowid = 0; u8 *abPK; const char **azCol = 0; - rc = sessionTableInfo(0, db, zFrom, zTbl, &nCol, 0, &azCol, &abPK); + rc = sessionTableInfo(0, db, zFrom, zTbl, &nCol, 0, &azCol, &abPK, + pSession->bImplicitPK ? &bRowid : 0 + ); if( rc==SQLITE_OK ){ if( pTo->nCol!=nCol ){ bMismatch = 1; @@ -216642,9 +221955,10 @@ static void sessionAppendStr( int *pRc ){ int nStr = sqlite3Strlen30(zStr); - if( 0==sessionBufferGrow(p, nStr, pRc) ){ + if( 0==sessionBufferGrow(p, nStr+1, pRc) ){ memcpy(&p->aBuf[p->nBuf], zStr, nStr); p->nBuf += nStr; + p->aBuf[p->nBuf] = 0x00; } } @@ -216666,6 +221980,27 @@ static void sessionAppendInteger( sessionAppendStr(p, aBuf, pRc); } +static void sessionAppendPrintf( + SessionBuffer *p, /* Buffer to append to */ + int *pRc, + const char *zFmt, + ... +){ + if( *pRc==SQLITE_OK ){ + char *zApp = 0; + va_list ap; + va_start(ap, zFmt); + zApp = sqlite3_vmprintf(zFmt, ap); + if( zApp==0 ){ + *pRc = SQLITE_NOMEM; + }else{ + sessionAppendStr(p, zApp, pRc); + } + va_end(ap); + sqlite3_free(zApp); + } +} + /* ** This function is a no-op if *pRc is other than SQLITE_OK when it is ** called. Otherwise, append the string zStr enclosed in quotes (") and @@ -216680,7 +222015,7 @@ static void sessionAppendIdent( const char *zStr, /* String to quote, escape and append */ int *pRc /* IN/OUT: Error code */ ){ - int nStr = sqlite3Strlen30(zStr)*2 + 2 + 1; + int nStr = sqlite3Strlen30(zStr)*2 + 2 + 2; if( 0==sessionBufferGrow(p, nStr, pRc) ){ char *zOut = (char *)&p->aBuf[p->nBuf]; const char *zIn = zStr; @@ -216691,6 +222026,7 @@ static void sessionAppendIdent( } *zOut++ = '"'; p->nBuf = (int)((u8 *)zOut - p->aBuf); + p->aBuf[p->nBuf] = 0x00; } } @@ -216826,7 +222162,7 @@ static int sessionAppendUpdate( /* If at least one field has been modified, this is not a no-op. */ if( bChanged ) bNoop = 0; - /* Add a field to the old.* record. This is omitted if this modules is + /* Add a field to the old.* record. This is omitted if this module is ** currently generating a patchset. */ if( bPatchset==0 ){ if( bChanged || abPK[i] ){ @@ -216915,12 +222251,20 @@ static int sessionAppendDelete( ** Formulate and prepare a SELECT statement to retrieve a row from table ** zTab in database zDb based on its primary key. i.e. ** -** SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... +** SELECT *, FROM zDb.zTab WHERE (pk1, pk2,...) IS (?1, ?2,...) +** +** where is: +** +** 1 AND (?A OR ?1 IS ) AND ... +** +** for each non-pk . */ static int sessionSelectStmt( sqlite3 *db, /* Database handle */ + int bIgnoreNoop, const char *zDb, /* Database name */ const char *zTab, /* Table name */ + int bRowid, int nCol, /* Number of columns in table */ const char **azCol, /* Names of table columns */ u8 *abPK, /* PRIMARY KEY array */ @@ -216928,8 +222272,50 @@ static int sessionSelectStmt( ){ int rc = SQLITE_OK; char *zSql = 0; + const char *zSep = ""; + const char *zCols = bRowid ? SESSIONS_ROWID ", *" : "*"; int nSql = -1; + int i; + + SessionBuffer nooptest = {0, 0, 0}; + SessionBuffer pkfield = {0, 0, 0}; + SessionBuffer pkvar = {0, 0, 0}; + + sessionAppendStr(&nooptest, ", 1", &rc); + if( 0==sqlite3_stricmp("sqlite_stat1", zTab) ){ + sessionAppendStr(&nooptest, " AND (?6 OR ?3 IS stat)", &rc); + sessionAppendStr(&pkfield, "tbl, idx", &rc); + sessionAppendStr(&pkvar, + "?1, (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)", &rc + ); + zCols = "tbl, ?2, stat"; + }else{ + for(i=0; izDb, zName, &nCol, 0,&azCol,&abPK); - if( !rc && (pTab->nCol!=nCol || memcmp(abPK, pTab->abPK, nCol)) ){ + rc = sessionTableInfo( + 0, db, pSession->zDb, zName, &nCol, 0, &azCol, &abPK, + (pSession->bImplicitPK ? &bRowid : 0) + ); + if( rc==SQLITE_OK && ( + pTab->nCol!=nCol + || pTab->bRowid!=bRowid + || memcmp(abPK, pTab->abPK, nCol) + )){ rc = SQLITE_SCHEMA; } @@ -217122,7 +222519,8 @@ static int sessionGenerateChangeset( /* Build and compile a statement to execute: */ if( rc==SQLITE_OK ){ rc = sessionSelectStmt( - db, pSession->zDb, zName, nCol, azCol, abPK, &pSel); + db, 0, pSession->zDb, zName, bRowid, nCol, azCol, abPK, &pSel + ); } nNoop = buf.nBuf; @@ -217205,7 +222603,7 @@ SQLITE_API int sqlite3session_changeset( int rc; if( pnChangeset==0 || ppChangeset==0 ) return SQLITE_MISUSE; - rc = sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset,ppChangeset); + rc = sessionGenerateChangeset(pSession, 0, 0, 0, pnChangeset, ppChangeset); assert( rc || pnChangeset==0 || pSession->bEnableSize==0 || *pnChangeset<=pSession->nMaxChangesetSize ); @@ -217323,6 +222721,19 @@ SQLITE_API int sqlite3session_object_config(sqlite3_session *pSession, int op, v break; } + case SQLITE_SESSION_OBJCONFIG_ROWID: { + int iArg = *(int*)pArg; + if( iArg>=0 ){ + if( pSession->pTable ){ + rc = SQLITE_MISUSE; + }else{ + pSession->bImplicitPK = (iArg!=0); + } + } + *(int*)pArg = pSession->bImplicitPK; + break; + } + default: rc = SQLITE_MISUSE; } @@ -217581,15 +222992,19 @@ static int sessionReadRecord( } } if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){ - sqlite3_int64 v = sessionGetI64(aVal); - if( eType==SQLITE_INTEGER ){ - sqlite3VdbeMemSetInt64(apOut[i], v); + if( (pIn->nData-pIn->iNext)<8 ){ + rc = SQLITE_CORRUPT_BKPT; }else{ - double d; - memcpy(&d, &v, 8); - sqlite3VdbeMemSetDouble(apOut[i], d); + sqlite3_int64 v = sessionGetI64(aVal); + if( eType==SQLITE_INTEGER ){ + sqlite3VdbeMemSetInt64(apOut[i], v); + }else{ + double d; + memcpy(&d, &v, 8); + sqlite3VdbeMemSetDouble(apOut[i], d); + } + pIn->iNext += 8; } - pIn->iNext += 8; } } } @@ -218311,6 +223726,8 @@ struct SessionApplyCtx { SessionBuffer rebase; /* Rebase information (if any) here */ u8 bRebaseStarted; /* If table header is already in rebase */ u8 bRebase; /* True to collect rebase information */ + u8 bIgnoreNoop; /* True to ignore no-op conflicts */ + int bRowid; }; /* Number of prepared UPDATE statements to cache. */ @@ -218561,8 +223978,10 @@ static int sessionSelectRow( const char *zTab, /* Table name */ SessionApplyCtx *p /* Session changeset-apply context */ ){ - return sessionSelectStmt( - db, "main", zTab, p->nCol, p->azCol, p->abPK, &p->pSelect); + /* TODO */ + return sessionSelectStmt(db, p->bIgnoreNoop, + "main", zTab, p->bRowid, p->nCol, p->azCol, p->abPK, &p->pSelect + ); } /* @@ -218720,22 +224139,34 @@ static int sessionBindRow( ** UPDATE, bind values from the old.* record. */ static int sessionSeekToRow( - sqlite3 *db, /* Database handle */ sqlite3_changeset_iter *pIter, /* Changeset iterator */ - u8 *abPK, /* Primary key flags array */ - sqlite3_stmt *pSelect /* SELECT statement from sessionSelectRow() */ + SessionApplyCtx *p ){ + sqlite3_stmt *pSelect = p->pSelect; int rc; /* Return code */ int nCol; /* Number of columns in table */ int op; /* Changset operation (SQLITE_UPDATE etc.) */ const char *zDummy; /* Unused */ + sqlite3_clear_bindings(pSelect); sqlite3changeset_op(pIter, &zDummy, &nCol, &op, 0); rc = sessionBindRow(pIter, op==SQLITE_INSERT ? sqlite3changeset_new : sqlite3changeset_old, - nCol, abPK, pSelect + nCol, p->abPK, pSelect ); + if( op!=SQLITE_DELETE && p->bIgnoreNoop ){ + int ii; + for(ii=0; rc==SQLITE_OK && iiabPK[ii]==0 ){ + sqlite3_value *pVal = 0; + sqlite3changeset_new(pIter, ii, &pVal); + sqlite3_bind_int(pSelect, ii+1+nCol, (pVal==0)); + if( pVal ) rc = sessionBindValue(pSelect, ii+1, pVal); + } + } + } + if( rc==SQLITE_OK ){ rc = sqlite3_step(pSelect); if( rc!=SQLITE_ROW ) rc = sqlite3_reset(pSelect); @@ -218850,16 +224281,22 @@ static int sessionConflictHandler( /* Bind the new.* PRIMARY KEY values to the SELECT statement. */ if( pbReplace ){ - rc = sessionSeekToRow(p->db, pIter, p->abPK, p->pSelect); + rc = sessionSeekToRow(pIter, p); }else{ rc = SQLITE_OK; } if( rc==SQLITE_ROW ){ /* There exists another row with the new.* primary key. */ - pIter->pConflict = p->pSelect; - res = xConflict(pCtx, eType, pIter); - pIter->pConflict = 0; + if( p->bIgnoreNoop + && sqlite3_column_int(p->pSelect, sqlite3_column_count(p->pSelect)-1) + ){ + res = SQLITE_CHANGESET_OMIT; + }else{ + pIter->pConflict = p->pSelect; + res = xConflict(pCtx, eType, pIter); + pIter->pConflict = 0; + } rc = sqlite3_reset(p->pSelect); }else if( rc==SQLITE_OK ){ if( p->bDeferConstraints && eType==SQLITE_CHANGESET_CONFLICT ){ @@ -218967,7 +224404,7 @@ static int sessionApplyOneOp( sqlite3_step(p->pDelete); rc = sqlite3_reset(p->pDelete); - if( rc==SQLITE_OK && sqlite3_changes(p->db)==0 ){ + if( rc==SQLITE_OK && sqlite3_changes(p->db)==0 && p->bIgnoreNoop==0 ){ rc = sessionConflictHandler( SQLITE_CHANGESET_DATA, p, pIter, xConflict, pCtx, pbRetry ); @@ -219024,7 +224461,7 @@ static int sessionApplyOneOp( /* Check if there is a conflicting row. For sqlite_stat1, this needs ** to be done using a SELECT, as there is no PRIMARY KEY in the ** database schema to throw an exception if a duplicate is inserted. */ - rc = sessionSeekToRow(p->db, pIter, p->abPK, p->pSelect); + rc = sessionSeekToRow(pIter, p); if( rc==SQLITE_ROW ){ rc = SQLITE_CONSTRAINT; sqlite3_reset(p->pSelect); @@ -219201,6 +224638,7 @@ static int sessionChangesetApply( memset(&sApply, 0, sizeof(sApply)); sApply.bRebase = (ppRebase && pnRebase); sApply.bInvertConstraints = !!(flags & SQLITE_CHANGESETAPPLY_INVERT); + sApply.bIgnoreNoop = !!(flags & SQLITE_CHANGESETAPPLY_IGNORENOOP); sqlite3_mutex_enter(sqlite3_db_mutex(db)); if( (flags & SQLITE_CHANGESETAPPLY_NOSAVEPOINT)==0 ){ rc = sqlite3_exec(db, "SAVEPOINT changeset_apply", 0, 0, 0); @@ -219238,6 +224676,7 @@ static int sessionChangesetApply( sApply.bStat1 = 0; sApply.bDeferConstraints = 1; sApply.bRebaseStarted = 0; + sApply.bRowid = 0; memset(&sApply.constraints, 0, sizeof(SessionBuffer)); /* If an xFilter() callback was specified, invoke it now. If the @@ -219257,8 +224696,8 @@ static int sessionChangesetApply( int i; sqlite3changeset_pk(pIter, &abPK, 0); - rc = sessionTableInfo(0, - db, "main", zNew, &sApply.nCol, &zTab, &sApply.azCol, &sApply.abPK + rc = sessionTableInfo(0, db, "main", zNew, + &sApply.nCol, &zTab, &sApply.azCol, &sApply.abPK, &sApply.bRowid ); if( rc!=SQLITE_OK ) break; for(i=0; iiPos++; - if( p->iRangeEnd>0 ){ + if( p->iRangeEnd>=0 ){ if( iPosiRangeStart || iPos>p->iRangeEnd ) return SQLITE_OK; if( p->iRangeStart && iPos==p->iRangeStart ) p->iOff = iStartOff; } @@ -223469,7 +228930,7 @@ static int fts5HighlightCb( } if( iPos==p->iter.iEnd ){ - if( p->iRangeEnd && p->iter.iStartiRangeStart ){ + if( p->iRangeEnd>=0 && p->iter.iStartiRangeStart ){ fts5HighlightAppend(&rc, p, p->zOpen, -1); } fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iEndOff - p->iOff); @@ -223480,7 +228941,7 @@ static int fts5HighlightCb( } } - if( p->iRangeEnd>0 && iPos==p->iRangeEnd ){ + if( p->iRangeEnd>=0 && iPos==p->iRangeEnd ){ fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iEndOff - p->iOff); p->iOff = iEndOff; if( iPos>=p->iter.iStart && iPositer.iEnd ){ @@ -223515,6 +228976,7 @@ static void fts5HighlightFunction( memset(&ctx, 0, sizeof(HighlightContext)); ctx.zOpen = (const char*)sqlite3_value_text(apVal[1]); ctx.zClose = (const char*)sqlite3_value_text(apVal[2]); + ctx.iRangeEnd = -1; rc = pApi->xColumnText(pFts, iCol, &ctx.zIn, &ctx.nIn); if( ctx.zIn ){ @@ -223700,6 +229162,7 @@ static void fts5SnippetFunction( iCol = sqlite3_value_int(apVal[0]); ctx.zOpen = fts5ValueToText(apVal[1]); ctx.zClose = fts5ValueToText(apVal[2]); + ctx.iRangeEnd = -1; zEllips = fts5ValueToText(apVal[3]); nToken = sqlite3_value_int(apVal[4]); @@ -224440,6 +229903,8 @@ static void sqlite3Fts5TermsetFree(Fts5Termset *p){ #define FTS5_DEFAULT_CRISISMERGE 16 #define FTS5_DEFAULT_HASHSIZE (1024*1024) +#define FTS5_DEFAULT_DELETE_AUTOMERGE 10 /* default 10% */ + /* Maximum allowed page size */ #define FTS5_MAX_PAGE_SIZE (64*1024) @@ -224770,6 +230235,16 @@ static int fts5ConfigParseSpecial( return rc; } + if( sqlite3_strnicmp("contentless_delete", zCmd, nCmd)==0 ){ + if( (zArg[0]!='0' && zArg[0]!='1') || zArg[1]!='\0' ){ + *pzErr = sqlite3_mprintf("malformed contentless_delete=... directive"); + rc = SQLITE_ERROR; + }else{ + pConfig->bContentlessDelete = (zArg[0]=='1'); + } + return rc; + } + if( sqlite3_strnicmp("content_rowid", zCmd, nCmd)==0 ){ if( pConfig->zContentRowid ){ *pzErr = sqlite3_mprintf("multiple content_rowid=... directives"); @@ -224968,6 +230443,7 @@ static int sqlite3Fts5ConfigParse( rc = SQLITE_ERROR; } + assert( (pRet->abUnindexed && pRet->azCol) || rc!=SQLITE_OK ); for(i=3; rc==SQLITE_OK && ibContentlessDelete + && pRet->eContent!=FTS5_CONTENT_NONE + ){ + *pzErr = sqlite3_mprintf( + "contentless_delete=1 requires a contentless table" + ); + rc = SQLITE_ERROR; + } + + /* We only allow contentless_delete=1 if columnsize=0 is not present. + ** + ** This restriction may be removed at some point. + */ + if( rc==SQLITE_OK && pRet->bContentlessDelete && pRet->bColumnsize==0 ){ + *pzErr = sqlite3_mprintf( + "contentless_delete=1 is incompatible with columnsize=0" + ); + rc = SQLITE_ERROR; + } + /* If a tokenizer= option was successfully parsed, the tokenizer has ** already been allocated. Otherwise, allocate an instance of the default ** tokenizer (unicode61) now. */ @@ -225307,6 +230805,18 @@ static int sqlite3Fts5ConfigSetValue( } } + else if( 0==sqlite3_stricmp(zKey, "deletemerge") ){ + int nVal = -1; + if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){ + nVal = sqlite3_value_int(pVal); + }else{ + *pbBadkey = 1; + } + if( nVal<0 ) nVal = FTS5_DEFAULT_DELETE_AUTOMERGE; + if( nVal>100 ) nVal = 0; + pConfig->nDeleteMerge = nVal; + } + else if( 0==sqlite3_stricmp(zKey, "rank") ){ const char *zIn = (const char*)sqlite3_value_text(pVal); char *zRank; @@ -225321,6 +230831,18 @@ static int sqlite3Fts5ConfigSetValue( rc = SQLITE_OK; *pbBadkey = 1; } + } + + else if( 0==sqlite3_stricmp(zKey, "secure-delete") ){ + int bVal = -1; + if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){ + bVal = sqlite3_value_int(pVal); + } + if( bVal<0 ){ + *pbBadkey = 1; + }else{ + pConfig->bSecureDelete = (bVal ? 1 : 0); + } }else{ *pbBadkey = 1; } @@ -225343,6 +230865,7 @@ static int sqlite3Fts5ConfigLoad(Fts5Config *pConfig, int iCookie){ pConfig->nUsermerge = FTS5_DEFAULT_USERMERGE; pConfig->nCrisisMerge = FTS5_DEFAULT_CRISISMERGE; pConfig->nHashSize = FTS5_DEFAULT_HASHSIZE; + pConfig->nDeleteMerge = FTS5_DEFAULT_DELETE_AUTOMERGE; zSql = sqlite3Fts5Mprintf(&rc, zSelect, pConfig->zDb, pConfig->zName); if( zSql ){ @@ -225365,15 +230888,20 @@ static int sqlite3Fts5ConfigLoad(Fts5Config *pConfig, int iCookie){ rc = sqlite3_finalize(p); } - if( rc==SQLITE_OK && iVersion!=FTS5_CURRENT_VERSION ){ + if( rc==SQLITE_OK + && iVersion!=FTS5_CURRENT_VERSION + && iVersion!=FTS5_CURRENT_VERSION_SECUREDELETE + ){ rc = SQLITE_ERROR; if( pConfig->pzErrmsg ){ assert( 0==*pConfig->pzErrmsg ); - *pConfig->pzErrmsg = sqlite3_mprintf( - "invalid fts5 file format (found %d, expected %d) - run 'rebuild'", - iVersion, FTS5_CURRENT_VERSION + *pConfig->pzErrmsg = sqlite3_mprintf("invalid fts5 file format " + "(found %d, expected %d or %d) - run 'rebuild'", + iVersion, FTS5_CURRENT_VERSION, FTS5_CURRENT_VERSION_SECUREDELETE ); } + }else{ + pConfig->iVersion = iVersion; } if( rc==SQLITE_OK ){ @@ -225401,6 +230929,10 @@ static int sqlite3Fts5ConfigLoad(Fts5Config *pConfig, int iCookie){ /* #include "fts5Int.h" */ /* #include "fts5parse.h" */ +#ifndef SQLITE_FTS5_MAX_EXPR_DEPTH +# define SQLITE_FTS5_MAX_EXPR_DEPTH 256 +#endif + /* ** All token types in the generated fts5parse.h file are greater than 0. */ @@ -225441,11 +230973,17 @@ struct Fts5Expr { ** FTS5_NOT (nChild, apChild valid) ** FTS5_STRING (pNear valid) ** FTS5_TERM (pNear valid) +** +** iHeight: +** Distance from this node to furthest leaf. This is always 0 for nodes +** of type FTS5_STRING and FTS5_TERM. For all other nodes it is one +** greater than the largest child value. */ struct Fts5ExprNode { int eType; /* Node type */ int bEof; /* True at EOF */ int bNomatch; /* True if entry is not a match */ + int iHeight; /* Distance to tree leaf nodes */ /* Next method for this node. */ int (*xNext)(Fts5Expr*, Fts5ExprNode*, int, i64); @@ -225515,6 +231053,31 @@ struct Fts5Parse { int bPhraseToAnd; /* Convert "a+b" to "a AND b" */ }; +/* +** Check that the Fts5ExprNode.iHeight variables are set correctly in +** the expression tree passed as the only argument. +*/ +#ifndef NDEBUG +static void assert_expr_depth_ok(int rc, Fts5ExprNode *p){ + if( rc==SQLITE_OK ){ + if( p->eType==FTS5_TERM || p->eType==FTS5_STRING || p->eType==0 ){ + assert( p->iHeight==0 ); + }else{ + int ii; + int iMaxChild = 0; + for(ii=0; iinChild; ii++){ + Fts5ExprNode *pChild = p->apChild[ii]; + iMaxChild = MAX(iMaxChild, pChild->iHeight); + assert_expr_depth_ok(SQLITE_OK, pChild); + } + assert( p->iHeight==iMaxChild+1 ); + } + } +} +#else +# define assert_expr_depth_ok(rc, p) +#endif + static void sqlite3Fts5ParseError(Fts5Parse *pParse, const char *zFmt, ...){ va_list ap; va_start(ap, zFmt); @@ -225629,6 +231192,8 @@ static int sqlite3Fts5ExprNew( }while( sParse.rc==SQLITE_OK && t!=FTS5_EOF ); sqlite3Fts5ParserFree(pEngine, fts5ParseFree); + assert_expr_depth_ok(sParse.rc, sParse.pExpr); + /* If the LHS of the MATCH expression was a user column, apply the ** implicit column-filter. */ if( iColnCol && sParse.pExpr && sParse.rc==SQLITE_OK ){ @@ -225673,6 +231238,19 @@ static int sqlite3Fts5ExprNew( return sParse.rc; } +/* +** Assuming that buffer z is at least nByte bytes in size and contains a +** valid utf-8 string, return the number of characters in the string. +*/ +static int fts5ExprCountChar(const char *z, int nByte){ + int nRet = 0; + int ii; + for(ii=0; ii=3 ){ + + if( fts5ExprCountChar(&zText[iFirst], i-iFirst)>=3 ){ int jj; zExpr[iOut++] = '"'; for(jj=iFirst; jjnPhrase + p2->nPhrase; @@ -225802,7 +231381,7 @@ static int sqlite3Fts5ExprAnd(Fts5Expr **pp1, Fts5Expr *p2){ } sqlite3_free(p2->apExprPhrase); sqlite3_free(p2); - }else{ + }else if( p2 ){ *pp1 = p2; } @@ -227576,6 +233155,7 @@ static void fts5ExprAssignXNext(Fts5ExprNode *pNode){ } static void fts5ExprAddChildren(Fts5ExprNode *p, Fts5ExprNode *pSub){ + int ii = p->nChild; if( p->eType!=FTS5_NOT && pSub->eType==p->eType ){ int nByte = sizeof(Fts5ExprNode*) * pSub->nChild; memcpy(&p->apChild[p->nChild], pSub->apChild, nByte); @@ -227584,6 +233164,9 @@ static void fts5ExprAddChildren(Fts5ExprNode *p, Fts5ExprNode *pSub){ }else{ p->apChild[p->nChild++] = pSub; } + for( ; iinChild; ii++){ + p->iHeight = MAX(p->iHeight, p->apChild[ii]->iHeight + 1); + } } /* @@ -227614,6 +233197,7 @@ static Fts5ExprNode *fts5ParsePhraseToAnd( if( pRet ){ pRet->eType = FTS5_AND; pRet->nChild = nTerm; + pRet->iHeight = 1; fts5ExprAssignXNext(pRet); pParse->nPhrase--; for(ii=0; iiiHeight>SQLITE_FTS5_MAX_EXPR_DEPTH ){ + sqlite3Fts5ParseError(pParse, + "fts5 expression tree is too large (maximum depth %d)", + SQLITE_FTS5_MAX_EXPR_DEPTH + ); + sqlite3_free(pRet); + pRet = 0; + } } } } @@ -227797,7 +233389,7 @@ static Fts5ExprNode *sqlite3Fts5ParseImplicitAnd( return pRet; } -#ifdef SQLITE_TEST +#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG) static char *fts5ExprTermPrint(Fts5ExprTerm *pTerm){ sqlite3_int64 nByte = 0; Fts5ExprTerm *p; @@ -227903,6 +233495,8 @@ static char *fts5ExprPrintTcl( if( zRet==0 ) return 0; } + }else if( pExpr->eType==0 ){ + zRet = sqlite3_mprintf("{}"); }else{ char const *zOp = 0; int i; @@ -228164,14 +233758,14 @@ static void fts5ExprFold( sqlite3_result_int(pCtx, sqlite3Fts5UnicodeFold(iCode, bRemoveDiacritics)); } } -#endif /* ifdef SQLITE_TEST */ +#endif /* if SQLITE_TEST || SQLITE_FTS5_DEBUG */ /* ** This is called during initialization to register the fts5_expr() scalar ** UDF with the SQLite handle passed as the only argument. */ static int sqlite3Fts5ExprInit(Fts5Global *pGlobal, sqlite3 *db){ -#ifdef SQLITE_TEST +#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG) struct Fts5ExprFunc { const char *z; void (*x)(sqlite3_context*,int,sqlite3_value**); @@ -228931,7 +234525,6 @@ static int fts5HashEntrySort( pList = fts5HashEntryMerge(pList, ap[i]); } - pHash->nEntry = 0; sqlite3_free(ap); *ppSorted = pList; return SQLITE_OK; @@ -228985,6 +234578,28 @@ static int sqlite3Fts5HashScanInit( return fts5HashEntrySort(p, pTerm, nTerm, &p->pScan); } +#ifdef SQLITE_DEBUG +static int fts5HashCount(Fts5Hash *pHash){ + int nEntry = 0; + int ii; + for(ii=0; iinSlot; ii++){ + Fts5HashEntry *p = 0; + for(p=pHash->aSlot[ii]; p; p=p->pHashNext){ + nEntry++; + } + } + return nEntry; +} +#endif + +/* +** Return true if the hash table is empty, false otherwise. +*/ +static int sqlite3Fts5HashIsEmpty(Fts5Hash *pHash){ + assert( pHash->nEntry==fts5HashCount(pHash) ); + return pHash->nEntry==0; +} + static void sqlite3Fts5HashScanNext(Fts5Hash *p){ assert( !sqlite3Fts5HashScanEof(p) ); p->pScan = p->pScan->pScanNext; @@ -229071,6 +234686,26 @@ static void sqlite3Fts5HashScanEntry( # error "FTS5_MAX_PREFIX_INDEXES is too large" #endif +#define FTS5_MAX_LEVEL 64 + +/* +** There are two versions of the format used for the structure record: +** +** 1. the legacy format, that may be read by all fts5 versions, and +** +** 2. the V2 format, which is used by contentless_delete=1 databases. +** +** Both begin with a 4-byte "configuration cookie" value. Then, a legacy +** format structure record contains a varint - the number of levels in +** the structure. Whereas a V2 structure record contains the constant +** 4 bytes [0xff 0x00 0x00 0x01]. This is unambiguous as the value of a +** varint has to be at least 16256 to begin with "0xFF". And the default +** maximum number of levels is 64. +** +** See below for more on structure record formats. +*/ +#define FTS5_STRUCTURE_V2 "\xFF\x00\x00\x01" + /* ** Details: ** @@ -229078,7 +234713,7 @@ static void sqlite3Fts5HashScanEntry( ** ** CREATE TABLE %_data(id INTEGER PRIMARY KEY, block BLOB); ** -** , contains the following 5 types of records. See the comments surrounding +** , contains the following 6 types of records. See the comments surrounding ** the FTS5_*_ROWID macros below for a description of how %_data rowids are ** assigned to each fo them. ** @@ -229087,12 +234722,12 @@ static void sqlite3Fts5HashScanEntry( ** The set of segments that make up an index - the index structure - are ** recorded in a single record within the %_data table. The record consists ** of a single 32-bit configuration cookie value followed by a list of -** SQLite varints. If the FTS table features more than one index (because -** there are one or more prefix indexes), it is guaranteed that all share -** the same cookie value. +** SQLite varints. ** -** Immediately following the configuration cookie, the record begins with -** three varints: +** If the structure record is a V2 record, the configuration cookie is +** followed by the following 4 bytes: [0xFF 0x00 0x00 0x01]. +** +** Next, the record continues with three varints: ** ** + number of levels, ** + total number of segments on all levels, @@ -229107,6 +234742,12 @@ static void sqlite3Fts5HashScanEntry( ** + first leaf page number (often 1, always greater than 0) ** + final leaf page number ** +** Then, for V2 structures only: +** +** + lower origin counter value, +** + upper origin counter value, +** + the number of tombstone hash pages. +** ** 2. The Averages Record: ** ** A single record within the %_data table. The data is a list of varints. @@ -229222,6 +234863,38 @@ static void sqlite3Fts5HashScanEntry( ** * A list of delta-encoded varints - the first rowid on each subsequent ** child page. ** +** 6. Tombstone Hash Page +** +** These records are only ever present in contentless_delete=1 tables. +** There are zero or more of these associated with each segment. They +** are used to store the tombstone rowids for rows contained in the +** associated segments. +** +** The set of nHashPg tombstone hash pages associated with a single +** segment together form a single hash table containing tombstone rowids. +** To find the page of the hash on which a key might be stored: +** +** iPg = (rowid % nHashPg) +** +** Then, within page iPg, which has nSlot slots: +** +** iSlot = (rowid / nHashPg) % nSlot +** +** Each tombstone hash page begins with an 8 byte header: +** +** 1-byte: Key-size (the size in bytes of each slot). Either 4 or 8. +** 1-byte: rowid-0-tombstone flag. This flag is only valid on the +** first tombstone hash page for each segment (iPg=0). If set, +** the hash table contains rowid 0. If clear, it does not. +** Rowid 0 is handled specially. +** 2-bytes: unused. +** 4-bytes: Big-endian integer containing number of entries on page. +** +** Following this are nSlot 4 or 8 byte slots (depending on the key-size +** in the first byte of the page header). The number of slots may be +** determined based on the size of the page record and the key-size: +** +** nSlot = (nByte - 8) / key-size */ /* @@ -229255,6 +234928,7 @@ static void sqlite3Fts5HashScanEntry( #define FTS5_SEGMENT_ROWID(segid, pgno) fts5_dri(segid, 0, 0, pgno) #define FTS5_DLIDX_ROWID(segid, height, pgno) fts5_dri(segid, 1, height, pgno) +#define FTS5_TOMBSTONE_ROWID(segid,ipg) fts5_dri(segid+(1<<16), 0, 0, ipg) #ifdef SQLITE_DEBUG static int sqlite3Fts5Corrupt() { return SQLITE_CORRUPT_VTAB; } @@ -229290,6 +234964,12 @@ struct Fts5Data { /* ** One object per %_data table. +** +** nContentlessDelete: +** The number of contentless delete operations since the most recent +** call to fts5IndexFlush() or fts5IndexDiscardData(). This is tracked +** so that extra auto-merge work can be done by fts5IndexFlush() to +** account for the delete operations. */ struct Fts5Index { Fts5Config *pConfig; /* Virtual table configuration */ @@ -229304,6 +234984,8 @@ struct Fts5Index { int nPendingData; /* Current bytes of pending data */ i64 iWriteRowid; /* Rowid for current doc being written */ int bDelete; /* Current write is a delete */ + int nContentlessDelete; /* Number of contentless delete ops */ + int nPendingRow; /* Number of INSERT in hash table */ /* Error state. */ int rc; /* Current error code */ @@ -229317,6 +234999,8 @@ struct Fts5Index { sqlite3_stmt *pIdxSelect; int nRead; /* Total number of blocks read */ + sqlite3_stmt *pDeleteFromIdx; + sqlite3_stmt *pDataVersion; i64 iStructVersion; /* data_version when pStruct read */ Fts5Structure *pStruct; /* Current db structure (or NULL) */ @@ -229336,11 +235020,23 @@ struct Fts5DoclistIter { ** The contents of the "structure" record for each index are represented ** using an Fts5Structure record in memory. Which uses instances of the ** other Fts5StructureXXX types as components. +** +** nOriginCntr: +** This value is set to non-zero for structure records created for +** contentlessdelete=1 tables only. In that case it represents the +** origin value to apply to the next top-level segment created. */ struct Fts5StructureSegment { int iSegid; /* Segment id */ int pgnoFirst; /* First leaf page number in segment */ int pgnoLast; /* Last leaf page number in segment */ + + /* contentlessdelete=1 tables only: */ + u64 iOrigin1; + u64 iOrigin2; + int nPgTombstone; /* Number of tombstone hash table pages */ + u64 nEntryTombstone; /* Number of tombstone entries that "count" */ + u64 nEntry; /* Number of rows in this segment */ }; struct Fts5StructureLevel { int nMerge; /* Number of segments in incr-merge */ @@ -229350,6 +235046,7 @@ struct Fts5StructureLevel { struct Fts5Structure { int nRef; /* Object reference count */ u64 nWriteCounter; /* Total leaves written to level 0 */ + u64 nOriginCntr; /* Origin value for next top-level segment */ int nSegment; /* Total segments in this structure */ int nLevel; /* Number of levels in this index */ Fts5StructureLevel aLevel[1]; /* Array of nLevel level objects */ @@ -229409,9 +235106,6 @@ struct Fts5CResult { ** iLeafOffset: ** Byte offset within the current leaf that is the first byte of the ** position list data (one byte passed the position-list size field). -** rowid field of the current entry. Usually this is the size field of the -** position list data. The exception is if the rowid for the current entry -** is the last thing on the leaf page. ** ** pLeaf: ** Buffer containing current leaf page data. Set to NULL at EOF. @@ -229441,6 +235135,13 @@ struct Fts5CResult { ** ** iTermIdx: ** Index of current term on iTermLeafPgno. +** +** apTombstone/nTombstone: +** These are used for contentless_delete=1 tables only. When the cursor +** is first allocated, the apTombstone[] array is allocated so that it +** is large enough for all tombstones hash pages associated with the +** segment. The pages themselves are loaded lazily from the database as +** they are required. */ struct Fts5SegIter { Fts5StructureSegment *pSeg; /* Segment to iterate through */ @@ -229449,6 +235150,8 @@ struct Fts5SegIter { Fts5Data *pLeaf; /* Current leaf data */ Fts5Data *pNextLeaf; /* Leaf page (iLeafPgno+1) */ i64 iLeafOffset; /* Byte offset within current leaf */ + Fts5Data **apTombstone; /* Array of tombstone pages */ + int nTombstone; /* Next method */ void (*xNext)(Fts5Index*, Fts5SegIter*, int*); @@ -229578,6 +235281,60 @@ static u16 fts5GetU16(const u8 *aIn){ return ((u16)aIn[0] << 8) + aIn[1]; } +/* +** The only argument points to a buffer at least 8 bytes in size. This +** function interprets the first 8 bytes of the buffer as a 64-bit big-endian +** unsigned integer and returns the result. +*/ +static u64 fts5GetU64(u8 *a){ + return ((u64)a[0] << 56) + + ((u64)a[1] << 48) + + ((u64)a[2] << 40) + + ((u64)a[3] << 32) + + ((u64)a[4] << 24) + + ((u64)a[5] << 16) + + ((u64)a[6] << 8) + + ((u64)a[7] << 0); +} + +/* +** The only argument points to a buffer at least 4 bytes in size. This +** function interprets the first 4 bytes of the buffer as a 32-bit big-endian +** unsigned integer and returns the result. +*/ +static u32 fts5GetU32(const u8 *a){ + return ((u32)a[0] << 24) + + ((u32)a[1] << 16) + + ((u32)a[2] << 8) + + ((u32)a[3] << 0); +} + +/* +** Write iVal, formated as a 64-bit big-endian unsigned integer, to the +** buffer indicated by the first argument. +*/ +static void fts5PutU64(u8 *a, u64 iVal){ + a[0] = ((iVal >> 56) & 0xFF); + a[1] = ((iVal >> 48) & 0xFF); + a[2] = ((iVal >> 40) & 0xFF); + a[3] = ((iVal >> 32) & 0xFF); + a[4] = ((iVal >> 24) & 0xFF); + a[5] = ((iVal >> 16) & 0xFF); + a[6] = ((iVal >> 8) & 0xFF); + a[7] = ((iVal >> 0) & 0xFF); +} + +/* +** Write iVal, formated as a 32-bit big-endian unsigned integer, to the +** buffer indicated by the first argument. +*/ +static void fts5PutU32(u8 *a, u32 iVal){ + a[0] = ((iVal >> 24) & 0xFF); + a[1] = ((iVal >> 16) & 0xFF); + a[2] = ((iVal >> 8) & 0xFF); + a[3] = ((iVal >> 0) & 0xFF); +} + /* ** Allocate and return a buffer at least nByte bytes in size. ** @@ -229805,10 +235562,17 @@ static void fts5DataDelete(Fts5Index *p, i64 iFirst, i64 iLast){ /* ** Remove all records associated with segment iSegid. */ -static void fts5DataRemoveSegment(Fts5Index *p, int iSegid){ +static void fts5DataRemoveSegment(Fts5Index *p, Fts5StructureSegment *pSeg){ + int iSegid = pSeg->iSegid; i64 iFirst = FTS5_SEGMENT_ROWID(iSegid, 0); i64 iLast = FTS5_SEGMENT_ROWID(iSegid+1, 0)-1; fts5DataDelete(p, iFirst, iLast); + + if( pSeg->nPgTombstone ){ + i64 iTomb1 = FTS5_TOMBSTONE_ROWID(iSegid, 0); + i64 iTomb2 = FTS5_TOMBSTONE_ROWID(iSegid, pSeg->nPgTombstone-1); + fts5DataDelete(p, iTomb1, iTomb2); + } if( p->pIdxDeleter==0 ){ Fts5Config *pConfig = p->pConfig; fts5IndexPrepareStmt(p, &p->pIdxDeleter, sqlite3_mprintf( @@ -229919,11 +235683,19 @@ static int fts5StructureDecode( int nSegment = 0; sqlite3_int64 nByte; /* Bytes of space to allocate at pRet */ Fts5Structure *pRet = 0; /* Structure object to return */ + int bStructureV2 = 0; /* True for FTS5_STRUCTURE_V2 */ + u64 nOriginCntr = 0; /* Largest origin value seen so far */ /* Grab the cookie value */ if( piCookie ) *piCookie = sqlite3Fts5Get32(pData); i = 4; + /* Check if this is a V2 structure record. Set bStructureV2 if it is. */ + if( 0==memcmp(&pData[i], FTS5_STRUCTURE_V2, 4) ){ + i += 4; + bStructureV2 = 1; + } + /* Read the total number of levels and segments from the start of the ** structure record. */ i += fts5GetVarint32(&pData[i], nLevel); @@ -229970,9 +235742,18 @@ static int fts5StructureDecode( rc = FTS5_CORRUPT; break; } + assert( pSeg!=0 ); i += fts5GetVarint32(&pData[i], pSeg->iSegid); i += fts5GetVarint32(&pData[i], pSeg->pgnoFirst); i += fts5GetVarint32(&pData[i], pSeg->pgnoLast); + if( bStructureV2 ){ + i += fts5GetVarint(&pData[i], &pSeg->iOrigin1); + i += fts5GetVarint(&pData[i], &pSeg->iOrigin2); + i += fts5GetVarint32(&pData[i], pSeg->nPgTombstone); + i += fts5GetVarint(&pData[i], &pSeg->nEntryTombstone); + i += fts5GetVarint(&pData[i], &pSeg->nEntry); + nOriginCntr = MAX(nOriginCntr, pSeg->iOrigin2); + } if( pSeg->pgnoLastpgnoFirst ){ rc = FTS5_CORRUPT; break; @@ -229983,6 +235764,9 @@ static int fts5StructureDecode( } } if( nSegment!=0 && rc==SQLITE_OK ) rc = FTS5_CORRUPT; + if( bStructureV2 ){ + pRet->nOriginCntr = nOriginCntr+1; + } if( rc!=SQLITE_OK ){ fts5StructureRelease(pRet); @@ -230000,6 +235784,7 @@ static int fts5StructureDecode( */ static void fts5StructureAddLevel(int *pRc, Fts5Structure **ppStruct){ fts5StructureMakeWritable(pRc, ppStruct); + assert( (ppStruct!=0 && (*ppStruct)!=0) || (*pRc)!=SQLITE_OK ); if( *pRc==SQLITE_OK ){ Fts5Structure *pStruct = *ppStruct; int nLevel = pStruct->nLevel; @@ -230194,6 +235979,7 @@ static void fts5StructureWrite(Fts5Index *p, Fts5Structure *pStruct){ Fts5Buffer buf; /* Buffer to serialize record into */ int iLvl; /* Used to iterate through levels */ int iCookie; /* Cookie value to store */ + int nHdr = (pStruct->nOriginCntr>0 ? (4+4+9+9+9) : (4+9+9)); assert( pStruct->nSegment==fts5StructureCountSegments(pStruct) ); memset(&buf, 0, sizeof(Fts5Buffer)); @@ -230202,9 +235988,12 @@ static void fts5StructureWrite(Fts5Index *p, Fts5Structure *pStruct){ iCookie = p->pConfig->iCookie; if( iCookie<0 ) iCookie = 0; - if( 0==sqlite3Fts5BufferSize(&p->rc, &buf, 4+9+9+9) ){ + if( 0==sqlite3Fts5BufferSize(&p->rc, &buf, nHdr) ){ sqlite3Fts5Put32(buf.p, iCookie); buf.n = 4; + if( pStruct->nOriginCntr>0 ){ + fts5BufferSafeAppendBlob(&buf, FTS5_STRUCTURE_V2, 4); + } fts5BufferSafeAppendVarint(&buf, pStruct->nLevel); fts5BufferSafeAppendVarint(&buf, pStruct->nSegment); fts5BufferSafeAppendVarint(&buf, (i64)pStruct->nWriteCounter); @@ -230218,9 +236007,17 @@ static void fts5StructureWrite(Fts5Index *p, Fts5Structure *pStruct){ assert( pLvl->nMerge<=pLvl->nSeg ); for(iSeg=0; iSegnSeg; iSeg++){ - fts5BufferAppendVarint(&p->rc, &buf, pLvl->aSeg[iSeg].iSegid); - fts5BufferAppendVarint(&p->rc, &buf, pLvl->aSeg[iSeg].pgnoFirst); - fts5BufferAppendVarint(&p->rc, &buf, pLvl->aSeg[iSeg].pgnoLast); + Fts5StructureSegment *pSeg = &pLvl->aSeg[iSeg]; + fts5BufferAppendVarint(&p->rc, &buf, pSeg->iSegid); + fts5BufferAppendVarint(&p->rc, &buf, pSeg->pgnoFirst); + fts5BufferAppendVarint(&p->rc, &buf, pSeg->pgnoLast); + if( pStruct->nOriginCntr>0 ){ + fts5BufferAppendVarint(&p->rc, &buf, pSeg->iOrigin1); + fts5BufferAppendVarint(&p->rc, &buf, pSeg->iOrigin2); + fts5BufferAppendVarint(&p->rc, &buf, pSeg->nPgTombstone); + fts5BufferAppendVarint(&p->rc, &buf, pSeg->nEntryTombstone); + fts5BufferAppendVarint(&p->rc, &buf, pSeg->nEntry); + } } } @@ -230458,42 +236255,25 @@ static int fts5DlidxLvlPrev(Fts5DlidxLvl *pLvl){ pLvl->bEof = 1; }else{ u8 *a = pLvl->pData->p; - i64 iVal; - int iLimit; - int ii; - int nZero = 0; - - /* Currently iOff points to the first byte of a varint. This block - ** decrements iOff until it points to the first byte of the previous - ** varint. Taking care not to read any memory locations that occur - ** before the buffer in memory. */ - iLimit = (iOff>9 ? iOff-9 : 0); - for(iOff--; iOff>iLimit; iOff--){ - if( (a[iOff-1] & 0x80)==0 ) break; - } - - fts5GetVarint(&a[iOff], (u64*)&iVal); - pLvl->iRowid -= iVal; - pLvl->iLeafPgno--; - - /* Skip backwards past any 0x00 varints. */ - for(ii=iOff-1; ii>=pLvl->iFirstOff && a[ii]==0x00; ii--){ - nZero++; - } - if( ii>=pLvl->iFirstOff && (a[ii] & 0x80) ){ - /* The byte immediately before the last 0x00 byte has the 0x80 bit - ** set. So the last 0x00 is only a varint 0 if there are 8 more 0x80 - ** bytes before a[ii]. */ - int bZero = 0; /* True if last 0x00 counts */ - if( (ii-8)>=pLvl->iFirstOff ){ - int j; - for(j=1; j<=8 && (a[ii-j] & 0x80); j++); - bZero = (j>8); + + pLvl->iOff = 0; + fts5DlidxLvlNext(pLvl); + while( 1 ){ + int nZero = 0; + int ii = pLvl->iOff; + u64 delta = 0; + + while( a[ii]==0 ){ + nZero++; + ii++; } - if( bZero==0 ) nZero--; + ii += sqlite3Fts5GetVarint(&a[ii], &delta); + + if( ii>=iOff ) break; + pLvl->iLeafPgno += nZero+1; + pLvl->iRowid += delta; + pLvl->iOff = ii; } - pLvl->iLeafPgno -= nZero; - pLvl->iOff = iOff - nZero; } return pLvl->bEof; @@ -230689,7 +236469,7 @@ static void fts5SegIterLoadRowid(Fts5Index *p, Fts5SegIter *pIter){ i64 iOff = pIter->iLeafOffset; ASSERT_SZLEAF_OK(pIter->pLeaf); - if( iOff>=pIter->pLeaf->szLeaf ){ + while( iOff>=pIter->pLeaf->szLeaf ){ fts5SegIterNextPage(p, pIter); if( pIter->pLeaf==0 ){ if( p->rc==SQLITE_OK ) p->rc = FTS5_CORRUPT; @@ -230760,6 +236540,23 @@ static void fts5SegIterSetNext(Fts5Index *p, Fts5SegIter *pIter){ } } +/* +** Allocate a tombstone hash page array (pIter->apTombstone) for the +** iterator passed as the second argument. If an OOM error occurs, leave +** an error in the Fts5Index object. +*/ +static void fts5SegIterAllocTombstone(Fts5Index *p, Fts5SegIter *pIter){ + const int nTomb = pIter->pSeg->nPgTombstone; + if( nTomb>0 ){ + Fts5Data **apTomb = 0; + apTomb = (Fts5Data**)sqlite3Fts5MallocZero(&p->rc, sizeof(Fts5Data)*nTomb); + if( apTomb ){ + pIter->apTombstone = apTomb; + pIter->nTombstone = nTomb; + } + } +} + /* ** Initialize the iterator object pIter to iterate through the entries in ** segment pSeg. The iterator is left pointing to the first entry when @@ -230788,10 +236585,12 @@ static void fts5SegIterInit( fts5SegIterSetNext(p, pIter); pIter->pSeg = pSeg; pIter->iLeafPgno = pSeg->pgnoFirst-1; - fts5SegIterNextPage(p, pIter); + do { + fts5SegIterNextPage(p, pIter); + }while( p->rc==SQLITE_OK && pIter->pLeaf && pIter->pLeaf->nn==4 ); } - if( p->rc==SQLITE_OK ){ + if( p->rc==SQLITE_OK && pIter->pLeaf ){ pIter->iLeafOffset = 4; assert( pIter->pLeaf!=0 ); assert_nc( pIter->pLeaf->nn>4 ); @@ -230799,6 +236598,7 @@ static void fts5SegIterInit( pIter->iPgidxOff = pIter->pLeaf->szLeaf+1; fts5SegIterLoadTerm(p, pIter, 0); fts5SegIterLoadNPos(p, pIter); + fts5SegIterAllocTombstone(p, pIter); } } @@ -230985,7 +236785,7 @@ static void fts5SegIterNext_None( iOff = pIter->iLeafOffset; /* Next entry is on the next page */ - if( pIter->pSeg && iOff>=pIter->pLeaf->szLeaf ){ + while( pIter->pSeg && iOff>=pIter->pLeaf->szLeaf ){ fts5SegIterNextPage(p, pIter); if( p->rc || pIter->pLeaf==0 ) return; pIter->iRowid = 0; @@ -231178,7 +236978,7 @@ static void fts5SegIterReverse(Fts5Index *p, Fts5SegIter *pIter){ Fts5Data *pLast = 0; int pgnoLast = 0; - if( pDlidx ){ + if( pDlidx && p->pConfig->iVersion==FTS5_CURRENT_VERSION ){ int iSegid = pIter->pSeg->iSegid; pgnoLast = fts5DlidxIterPgno(pDlidx); pLast = fts5LeafRead(p, FTS5_SEGMENT_ROWID(iSegid, pgnoLast)); @@ -231500,6 +237300,7 @@ static void fts5SegIterSeekInit( } fts5SegIterSetNext(p, pIter); + fts5SegIterAllocTombstone(p, pIter); /* Either: ** @@ -231580,6 +237381,20 @@ static void fts5SegIterHashInit( fts5SegIterSetNext(p, pIter); } +/* +** Array ap[] contains n elements. Release each of these elements using +** fts5DataRelease(). Then free the array itself using sqlite3_free(). +*/ +static void fts5IndexFreeArray(Fts5Data **ap, int n){ + if( ap ){ + int ii; + for(ii=0; iiterm); fts5DataRelease(pIter->pLeaf); fts5DataRelease(pIter->pNextLeaf); + fts5IndexFreeArray(pIter->apTombstone, pIter->nTombstone); fts5DlidxIterFree(pIter->pDlidx); sqlite3_free(pIter->aRowidOffset); memset(pIter, 0, sizeof(Fts5SegIter)); @@ -231739,7 +237555,8 @@ static int fts5MultiIterDoCompare(Fts5Iter *pIter, int iOut){ /* ** Move the seg-iter so that it points to the first rowid on page iLeafPgno. -** It is an error if leaf iLeafPgno does not exist or contains no rowids. +** It is an error if leaf iLeafPgno does not exist. Unless the db is +** a 'secure-delete' db, if it contains no rowids then this is also an error. */ static void fts5SegIterGotoPage( Fts5Index *p, /* FTS5 backend object */ @@ -231754,21 +237571,23 @@ static void fts5SegIterGotoPage( fts5DataRelease(pIter->pNextLeaf); pIter->pNextLeaf = 0; pIter->iLeafPgno = iLeafPgno-1; - fts5SegIterNextPage(p, pIter); - assert( p->rc!=SQLITE_OK || pIter->iLeafPgno==iLeafPgno ); - if( p->rc==SQLITE_OK && ALWAYS(pIter->pLeaf!=0) ){ + while( p->rc==SQLITE_OK ){ int iOff; - u8 *a = pIter->pLeaf->p; - int n = pIter->pLeaf->szLeaf; - + fts5SegIterNextPage(p, pIter); + if( pIter->pLeaf==0 ) break; iOff = fts5LeafFirstRowidOff(pIter->pLeaf); - if( iOff<4 || iOff>=n ){ - p->rc = FTS5_CORRUPT; - }else{ - iOff += fts5GetVarint(&a[iOff], (u64*)&pIter->iRowid); - pIter->iLeafOffset = iOff; - fts5SegIterLoadNPos(p, pIter); + if( iOff>0 ){ + u8 *a = pIter->pLeaf->p; + int n = pIter->pLeaf->szLeaf; + if( iOff<4 || iOff>=n ){ + p->rc = FTS5_CORRUPT; + }else{ + iOff += fts5GetVarint(&a[iOff], (u64*)&pIter->iRowid); + pIter->iLeafOffset = iOff; + fts5SegIterLoadNPos(p, pIter); + } + break; } } } @@ -231921,6 +237740,84 @@ static void fts5MultiIterSetEof(Fts5Iter *pIter){ pIter->iSwitchRowid = pSeg->iRowid; } +/* +** The argument to this macro must be an Fts5Data structure containing a +** tombstone hash page. This macro returns the key-size of the hash-page. +*/ +#define TOMBSTONE_KEYSIZE(pPg) (pPg->p[0]==4 ? 4 : 8) + +#define TOMBSTONE_NSLOT(pPg) \ + ((pPg->nn > 16) ? ((pPg->nn-8) / TOMBSTONE_KEYSIZE(pPg)) : 1) + +/* +** Query a single tombstone hash table for rowid iRowid. Return true if +** it is found or false otherwise. The tombstone hash table is one of +** nHashTable tables. +*/ +static int fts5IndexTombstoneQuery( + Fts5Data *pHash, /* Hash table page to query */ + int nHashTable, /* Number of pages attached to segment */ + u64 iRowid /* Rowid to query hash for */ +){ + const int szKey = TOMBSTONE_KEYSIZE(pHash); + const int nSlot = TOMBSTONE_NSLOT(pHash); + int iSlot = (iRowid / nHashTable) % nSlot; + int nCollide = nSlot; + + if( iRowid==0 ){ + return pHash->p[1]; + }else if( szKey==4 ){ + u32 *aSlot = (u32*)&pHash->p[8]; + while( aSlot[iSlot] ){ + if( fts5GetU32((u8*)&aSlot[iSlot])==iRowid ) return 1; + if( nCollide--==0 ) break; + iSlot = (iSlot+1)%nSlot; + } + }else{ + u64 *aSlot = (u64*)&pHash->p[8]; + while( aSlot[iSlot] ){ + if( fts5GetU64((u8*)&aSlot[iSlot])==iRowid ) return 1; + if( nCollide--==0 ) break; + iSlot = (iSlot+1)%nSlot; + } + } + + return 0; +} + +/* +** Return true if the iterator passed as the only argument points +** to an segment entry for which there is a tombstone. Return false +** if there is no tombstone or if the iterator is already at EOF. +*/ +static int fts5MultiIterIsDeleted(Fts5Iter *pIter){ + int iFirst = pIter->aFirst[1].iFirst; + Fts5SegIter *pSeg = &pIter->aSeg[iFirst]; + + if( pSeg->pLeaf && pSeg->nTombstone ){ + /* Figure out which page the rowid might be present on. */ + int iPg = ((u64)pSeg->iRowid) % pSeg->nTombstone; + assert( iPg>=0 ); + + /* If tombstone hash page iPg has not yet been loaded from the + ** database, load it now. */ + if( pSeg->apTombstone[iPg]==0 ){ + pSeg->apTombstone[iPg] = fts5DataRead(pIter->pIndex, + FTS5_TOMBSTONE_ROWID(pSeg->pSeg->iSegid, iPg) + ); + if( pSeg->apTombstone[iPg]==0 ) return 0; + } + + return fts5IndexTombstoneQuery( + pSeg->apTombstone[iPg], + pSeg->nTombstone, + pSeg->iRowid + ); + } + + return 0; +} + /* ** Move the iterator to the next entry. ** @@ -231958,7 +237855,9 @@ static void fts5MultiIterNext( fts5AssertMultiIterSetup(p, pIter); assert( pSeg==&pIter->aSeg[pIter->aFirst[1].iFirst] && pSeg->pLeaf ); - if( pIter->bSkipEmpty==0 || pSeg->nPos ){ + if( (pIter->bSkipEmpty==0 || pSeg->nPos) + && 0==fts5MultiIterIsDeleted(pIter) + ){ pIter->xSetOutputs(pIter, pSeg); return; } @@ -231990,7 +237889,9 @@ static void fts5MultiIterNext2( } fts5AssertMultiIterSetup(p, pIter); - }while( fts5MultiIterIsEmpty(p, pIter) ); + }while( (fts5MultiIterIsEmpty(p, pIter) || fts5MultiIterIsDeleted(pIter)) + && (p->rc==SQLITE_OK) + ); } } @@ -232483,7 +238384,7 @@ static void fts5MultiIterNew( if( iLevel<0 ){ assert( pStruct->nSegment==fts5StructureCountSegments(pStruct) ); nSeg = pStruct->nSegment; - nSeg += (p->pHash ? 1 : 0); + nSeg += (p->pHash && 0==(flags & FTS5INDEX_QUERY_SKIPHASH)); }else{ nSeg = MIN(pStruct->aLevel[iLevel].nSeg, nSegment); } @@ -232504,7 +238405,7 @@ static void fts5MultiIterNew( if( p->rc==SQLITE_OK ){ if( iLevel<0 ){ Fts5StructureLevel *pEnd = &pStruct->aLevel[pStruct->nLevel]; - if( p->pHash ){ + if( p->pHash && 0==(flags & FTS5INDEX_QUERY_SKIPHASH) ){ /* Add a segment iterator for the current contents of the hash table. */ Fts5SegIter *pIter = &pNew->aSeg[iIter++]; fts5SegIterHashInit(p, pTerm, nTerm, flags, pIter); @@ -232545,7 +238446,9 @@ static void fts5MultiIterNew( fts5MultiIterSetEof(pNew); fts5AssertMultiIterSetup(p, pNew); - if( pNew->bSkipEmpty && fts5MultiIterIsEmpty(p, pNew) ){ + if( (pNew->bSkipEmpty && fts5MultiIterIsEmpty(p, pNew)) + || fts5MultiIterIsDeleted(pNew) + ){ fts5MultiIterNext(p, pNew, 0, 0); }else if( pNew->base.bEof==0 ){ Fts5SegIter *pSeg = &pNew->aSeg[pNew->aFirst[1].iFirst]; @@ -232723,7 +238626,9 @@ static void fts5IndexDiscardData(Fts5Index *p){ if( p->pHash ){ sqlite3Fts5HashClear(p->pHash); p->nPendingData = 0; + p->nPendingRow = 0; } + p->nContentlessDelete = 0; } /* @@ -233259,7 +239164,7 @@ static void fts5TrimSegments(Fts5Index *p, Fts5Iter *pIter){ fts5BufferAppendBlob(&p->rc, &buf, sizeof(aHdr), aHdr); fts5BufferAppendVarint(&p->rc, &buf, pSeg->term.n); fts5BufferAppendBlob(&p->rc, &buf, pSeg->term.n, pSeg->term.p); - fts5BufferAppendBlob(&p->rc, &buf, pData->szLeaf-iOff,&pData->p[iOff]); + fts5BufferAppendBlob(&p->rc, &buf,pData->szLeaf-iOff,&pData->p[iOff]); if( p->rc==SQLITE_OK ){ /* Set the szLeaf field */ fts5PutU16(&buf.p[2], (u16)buf.n); @@ -233360,6 +239265,12 @@ static void fts5IndexMergeLevel( /* Read input from all segments in the input level */ nInput = pLvl->nSeg; + + /* Set the range of origins that will go into the output segment. */ + if( pStruct->nOriginCntr>0 ){ + pSeg->iOrigin1 = pLvl->aSeg[0].iOrigin1; + pSeg->iOrigin2 = pLvl->aSeg[pLvl->nSeg-1].iOrigin2; + } } bOldest = (pLvlOut->nSeg==1 && pStruct->nLevel==iLvl+2); @@ -233419,8 +239330,11 @@ static void fts5IndexMergeLevel( int i; /* Remove the redundant segments from the %_data table */ + assert( pSeg->nEntry==0 ); for(i=0; iaSeg[i].iSegid); + Fts5StructureSegment *pOld = &pLvl->aSeg[i]; + pSeg->nEntry += (pOld->nEntry - pOld->nEntryTombstone); + fts5DataRemoveSegment(p, pOld); } /* Remove the redundant segments from the input level */ @@ -233446,6 +239360,43 @@ static void fts5IndexMergeLevel( if( pnRem ) *pnRem -= writer.nLeafWritten; } +/* +** If this is not a contentless_delete=1 table, or if the 'deletemerge' +** configuration option is set to 0, then this function always returns -1. +** Otherwise, it searches the structure object passed as the second argument +** for a level suitable for merging due to having a large number of +** tombstones in the tombstone hash. If one is found, its index is returned. +** Otherwise, if there is no suitable level, -1. +*/ +static int fts5IndexFindDeleteMerge(Fts5Index *p, Fts5Structure *pStruct){ + Fts5Config *pConfig = p->pConfig; + int iRet = -1; + if( pConfig->bContentlessDelete && pConfig->nDeleteMerge>0 ){ + int ii; + int nBest = 0; + + for(ii=0; iinLevel; ii++){ + Fts5StructureLevel *pLvl = &pStruct->aLevel[ii]; + i64 nEntry = 0; + i64 nTomb = 0; + int iSeg; + for(iSeg=0; iSegnSeg; iSeg++){ + nEntry += pLvl->aSeg[iSeg].nEntry; + nTomb += pLvl->aSeg[iSeg].nEntryTombstone; + } + assert_nc( nEntry>0 || pLvl->nSeg==0 ); + if( nEntry>0 ){ + int nPercent = (nTomb * 100) / nEntry; + if( nPercent>=pConfig->nDeleteMerge && nPercent>nBest ){ + iRet = ii; + nBest = nPercent; + } + } + } + } + return iRet; +} + /* ** Do up to nPg pages of automerge work on the index. ** @@ -233465,14 +239416,15 @@ static int fts5IndexMerge( int iBestLvl = 0; /* Level offering the most input segments */ int nBest = 0; /* Number of input segments on best level */ - /* Set iBestLvl to the level to read input segments from. */ + /* Set iBestLvl to the level to read input segments from. Or to -1 if + ** there is no level suitable to merge segments from. */ assert( pStruct->nLevel>0 ); for(iLvl=0; iLvlnLevel; iLvl++){ Fts5StructureLevel *pLvl = &pStruct->aLevel[iLvl]; if( pLvl->nMerge ){ if( pLvl->nMerge>nBest ){ iBestLvl = iLvl; - nBest = pLvl->nMerge; + nBest = nMin; } break; } @@ -233481,22 +239433,18 @@ static int fts5IndexMerge( iBestLvl = iLvl; } } - - /* If nBest is still 0, then the index must be empty. */ -#ifdef SQLITE_DEBUG - for(iLvl=0; nBest==0 && iLvlnLevel; iLvl++){ - assert( pStruct->aLevel[iLvl].nSeg==0 ); + if( nBestaLevel[iBestLvl].nMerge==0 ){ - break; - } + if( iBestLvl<0 ) break; bRet = 1; fts5IndexMergeLevel(p, &pStruct, iBestLvl, &nRem); if( p->rc==SQLITE_OK && pStruct->aLevel[iBestLvl].nMerge==0 ){ fts5StructurePromote(p, iBestLvl+1, pStruct); } + + if( nMin==1 ) nMin = 2; } *ppStruct = pStruct; return bRet; @@ -233537,16 +239485,16 @@ static void fts5IndexCrisismerge( ){ const int nCrisis = p->pConfig->nCrisisMerge; Fts5Structure *pStruct = *ppStruct; - int iLvl = 0; - - assert( p->rc!=SQLITE_OK || pStruct->nLevel>0 ); - while( p->rc==SQLITE_OK && pStruct->aLevel[iLvl].nSeg>=nCrisis ){ - fts5IndexMergeLevel(p, &pStruct, iLvl, 0); - assert( p->rc!=SQLITE_OK || pStruct->nLevel>(iLvl+1) ); - fts5StructurePromote(p, iLvl+1, pStruct); - iLvl++; + if( pStruct && pStruct->nLevel>0 ){ + int iLvl = 0; + while( p->rc==SQLITE_OK && pStruct->aLevel[iLvl].nSeg>=nCrisis ){ + fts5IndexMergeLevel(p, &pStruct, iLvl, 0); + assert( p->rc!=SQLITE_OK || pStruct->nLevel>(iLvl+1) ); + fts5StructurePromote(p, iLvl+1, pStruct); + iLvl++; + } + *ppStruct = pStruct; } - *ppStruct = pStruct; } static int fts5IndexReturn(Fts5Index *p){ @@ -233580,6 +239528,418 @@ static int fts5PoslistPrefix(const u8 *aBuf, int nMax){ return ret; } +/* +** Execute the SQL statement: +** +** DELETE FROM %_idx WHERE (segid, (pgno/2)) = ($iSegid, $iPgno); +** +** This is used when a secure-delete operation removes the last term +** from a segment leaf page. In that case the %_idx entry is removed +** too. This is done to ensure that if all instances of a token are +** removed from an fts5 database in secure-delete mode, no trace of +** the token itself remains in the database. +*/ +static void fts5SecureDeleteIdxEntry( + Fts5Index *p, /* FTS5 backend object */ + int iSegid, /* Id of segment to delete entry for */ + int iPgno /* Page number within segment */ +){ + if( iPgno!=1 ){ + assert( p->pConfig->iVersion==FTS5_CURRENT_VERSION_SECUREDELETE ); + if( p->pDeleteFromIdx==0 ){ + fts5IndexPrepareStmt(p, &p->pDeleteFromIdx, sqlite3_mprintf( + "DELETE FROM '%q'.'%q_idx' WHERE (segid, (pgno/2)) = (?1, ?2)", + p->pConfig->zDb, p->pConfig->zName + )); + } + if( p->rc==SQLITE_OK ){ + sqlite3_bind_int(p->pDeleteFromIdx, 1, iSegid); + sqlite3_bind_int(p->pDeleteFromIdx, 2, iPgno); + sqlite3_step(p->pDeleteFromIdx); + p->rc = sqlite3_reset(p->pDeleteFromIdx); + } + } +} + +/* +** This is called when a secure-delete operation removes a position-list +** that overflows onto segment page iPgno of segment pSeg. This function +** rewrites node iPgno, and possibly one or more of its right-hand peers, +** to remove this portion of the position list. +** +** Output variable (*pbLastInDoclist) is set to true if the position-list +** removed is followed by a new term or the end-of-segment, or false if +** it is followed by another rowid/position list. +*/ +static void fts5SecureDeleteOverflow( + Fts5Index *p, + Fts5StructureSegment *pSeg, + int iPgno, + int *pbLastInDoclist +){ + const int bDetailNone = (p->pConfig->eDetail==FTS5_DETAIL_NONE); + int pgno; + Fts5Data *pLeaf = 0; + assert( iPgno!=1 ); + + *pbLastInDoclist = 1; + for(pgno=iPgno; p->rc==SQLITE_OK && pgno<=pSeg->pgnoLast; pgno++){ + i64 iRowid = FTS5_SEGMENT_ROWID(pSeg->iSegid, pgno); + int iNext = 0; + u8 *aPg = 0; + + pLeaf = fts5DataRead(p, iRowid); + if( pLeaf==0 ) break; + aPg = pLeaf->p; + + iNext = fts5GetU16(&aPg[0]); + if( iNext!=0 ){ + *pbLastInDoclist = 0; + } + if( iNext==0 && pLeaf->szLeaf!=pLeaf->nn ){ + fts5GetVarint32(&aPg[pLeaf->szLeaf], iNext); + } + + if( iNext==0 ){ + /* The page contains no terms or rowids. Replace it with an empty + ** page and move on to the right-hand peer. */ + const u8 aEmpty[] = {0x00, 0x00, 0x00, 0x04}; + assert_nc( bDetailNone==0 || pLeaf->nn==4 ); + if( bDetailNone==0 ) fts5DataWrite(p, iRowid, aEmpty, sizeof(aEmpty)); + fts5DataRelease(pLeaf); + pLeaf = 0; + }else if( bDetailNone ){ + break; + }else if( iNext>=pLeaf->szLeaf || pLeaf->nnszLeaf || iNext<4 ){ + p->rc = FTS5_CORRUPT; + break; + }else{ + int nShift = iNext - 4; + int nPg; + + int nIdx = 0; + u8 *aIdx = 0; + + /* Unless the current page footer is 0 bytes in size (in which case + ** the new page footer will be as well), allocate and populate a + ** buffer containing the new page footer. Set stack variables aIdx + ** and nIdx accordingly. */ + if( pLeaf->nn>pLeaf->szLeaf ){ + int iFirst = 0; + int i1 = pLeaf->szLeaf; + int i2 = 0; + + i1 += fts5GetVarint32(&aPg[i1], iFirst); + if( iFirstrc = FTS5_CORRUPT; + break; + } + aIdx = sqlite3Fts5MallocZero(&p->rc, (pLeaf->nn-pLeaf->szLeaf)+2); + if( aIdx==0 ) break; + i2 = sqlite3Fts5PutVarint(aIdx, iFirst-nShift); + if( i1nn ){ + memcpy(&aIdx[i2], &aPg[i1], pLeaf->nn-i1); + i2 += (pLeaf->nn-i1); + } + nIdx = i2; + } + + /* Modify the contents of buffer aPg[]. Set nPg to the new size + ** in bytes. The new page is always smaller than the old. */ + nPg = pLeaf->szLeaf - nShift; + memmove(&aPg[4], &aPg[4+nShift], nPg-4); + fts5PutU16(&aPg[2], nPg); + if( fts5GetU16(&aPg[0]) ) fts5PutU16(&aPg[0], 4); + if( nIdx>0 ){ + memcpy(&aPg[nPg], aIdx, nIdx); + nPg += nIdx; + } + sqlite3_free(aIdx); + + /* Write the new page to disk and exit the loop */ + assert( nPg>4 || fts5GetU16(aPg)==0 ); + fts5DataWrite(p, iRowid, aPg, nPg); + break; + } + } + fts5DataRelease(pLeaf); +} + +/* +** Completely remove the entry that pSeg currently points to from +** the database. +*/ +static void fts5DoSecureDelete( + Fts5Index *p, + Fts5SegIter *pSeg +){ + const int bDetailNone = (p->pConfig->eDetail==FTS5_DETAIL_NONE); + int iSegid = pSeg->pSeg->iSegid; + u8 *aPg = pSeg->pLeaf->p; + int nPg = pSeg->pLeaf->nn; + int iPgIdx = pSeg->pLeaf->szLeaf; + + u64 iDelta = 0; + u64 iNextDelta = 0; + int iNextOff = 0; + int iOff = 0; + int nIdx = 0; + u8 *aIdx = 0; + int bLastInDoclist = 0; + int iIdx = 0; + int iStart = 0; + int iKeyOff = 0; + int iPrevKeyOff = 0; + int iDelKeyOff = 0; /* Offset of deleted key, if any */ + + nIdx = nPg-iPgIdx; + aIdx = sqlite3Fts5MallocZero(&p->rc, nIdx+16); + if( p->rc ) return; + memcpy(aIdx, &aPg[iPgIdx], nIdx); + + /* At this point segment iterator pSeg points to the entry + ** this function should remove from the b-tree segment. + ** + ** In detail=full or detail=column mode, pSeg->iLeafOffset is the + ** offset of the first byte in the position-list for the entry to + ** remove. Immediately before this comes two varints that will also + ** need to be removed: + ** + ** + the rowid or delta rowid value for the entry, and + ** + the size of the position list in bytes. + ** + ** Or, in detail=none mode, there is a single varint prior to + ** pSeg->iLeafOffset - the rowid or delta rowid value. + ** + ** This block sets the following variables: + ** + ** iStart: + ** iDelta: + */ + { + int iSOP; + if( pSeg->iLeafPgno==pSeg->iTermLeafPgno ){ + iStart = pSeg->iTermLeafOffset; + }else{ + iStart = fts5GetU16(&aPg[0]); + } + + iSOP = iStart + fts5GetVarint(&aPg[iStart], &iDelta); + assert_nc( iSOP<=pSeg->iLeafOffset ); + + if( bDetailNone ){ + while( iSOPiLeafOffset ){ + if( aPg[iSOP]==0x00 ) iSOP++; + if( aPg[iSOP]==0x00 ) iSOP++; + iStart = iSOP; + iSOP = iStart + fts5GetVarint(&aPg[iStart], &iDelta); + } + + iNextOff = iSOP; + if( iNextOffiEndofDoclist && aPg[iNextOff]==0x00 ) iNextOff++; + if( iNextOffiEndofDoclist && aPg[iNextOff]==0x00 ) iNextOff++; + + }else{ + int nPos = 0; + iSOP += fts5GetVarint32(&aPg[iSOP], nPos); + while( iSOPiLeafOffset ){ + iStart = iSOP + (nPos/2); + iSOP = iStart + fts5GetVarint(&aPg[iStart], &iDelta); + iSOP += fts5GetVarint32(&aPg[iSOP], nPos); + } + assert_nc( iSOP==pSeg->iLeafOffset ); + iNextOff = pSeg->iLeafOffset + pSeg->nPos; + } + } + + iOff = iStart; + if( iNextOff>=iPgIdx ){ + int pgno = pSeg->iLeafPgno+1; + fts5SecureDeleteOverflow(p, pSeg->pSeg, pgno, &bLastInDoclist); + iNextOff = iPgIdx; + }else{ + /* Set bLastInDoclist to true if the entry being removed is the last + ** in its doclist. */ + for(iIdx=0, iKeyOff=0; iIdxiTermLeafOffset && pSeg->iLeafPgno==pSeg->iTermLeafPgno + ){ + /* The entry being removed was the only position list in its + ** doclist. Therefore the term needs to be removed as well. */ + int iKey = 0; + for(iIdx=0, iKeyOff=0; iIdx(u32)iStart ) break; + iKeyOff += iVal; + } + + iDelKeyOff = iOff = iKeyOff; + if( iNextOff!=iPgIdx ){ + int nPrefix = 0; + int nSuffix = 0; + int nPrefix2 = 0; + int nSuffix2 = 0; + + iDelKeyOff = iNextOff; + iNextOff += fts5GetVarint32(&aPg[iNextOff], nPrefix2); + iNextOff += fts5GetVarint32(&aPg[iNextOff], nSuffix2); + + if( iKey!=1 ){ + iKeyOff += fts5GetVarint32(&aPg[iKeyOff], nPrefix); + } + iKeyOff += fts5GetVarint32(&aPg[iKeyOff], nSuffix); + + nPrefix = MIN(nPrefix, nPrefix2); + nSuffix = (nPrefix2 + nSuffix2) - nPrefix; + + if( (iKeyOff+nSuffix)>iPgIdx || (iNextOff+nSuffix2)>iPgIdx ){ + p->rc = FTS5_CORRUPT; + }else{ + if( iKey!=1 ){ + iOff += sqlite3Fts5PutVarint(&aPg[iOff], nPrefix); + } + iOff += sqlite3Fts5PutVarint(&aPg[iOff], nSuffix); + if( nPrefix2>pSeg->term.n ){ + p->rc = FTS5_CORRUPT; + }else if( nPrefix2>nPrefix ){ + memcpy(&aPg[iOff], &pSeg->term.p[nPrefix], nPrefix2-nPrefix); + iOff += (nPrefix2-nPrefix); + } + memmove(&aPg[iOff], &aPg[iNextOff], nSuffix2); + iOff += nSuffix2; + iNextOff += nSuffix2; + } + } + }else if( iStart==4 ){ + int iPgno; + + assert_nc( pSeg->iLeafPgno>pSeg->iTermLeafPgno ); + /* The entry being removed may be the only position list in + ** its doclist. */ + for(iPgno=pSeg->iLeafPgno-1; iPgno>pSeg->iTermLeafPgno; iPgno-- ){ + Fts5Data *pPg = fts5DataRead(p, FTS5_SEGMENT_ROWID(iSegid, iPgno)); + int bEmpty = (pPg && pPg->nn==4); + fts5DataRelease(pPg); + if( bEmpty==0 ) break; + } + + if( iPgno==pSeg->iTermLeafPgno ){ + i64 iId = FTS5_SEGMENT_ROWID(iSegid, pSeg->iTermLeafPgno); + Fts5Data *pTerm = fts5DataRead(p, iId); + if( pTerm && pTerm->szLeaf==pSeg->iTermLeafOffset ){ + u8 *aTermIdx = &pTerm->p[pTerm->szLeaf]; + int nTermIdx = pTerm->nn - pTerm->szLeaf; + int iTermIdx = 0; + int iTermOff = 0; + + while( 1 ){ + u32 iVal = 0; + int nByte = fts5GetVarint32(&aTermIdx[iTermIdx], iVal); + iTermOff += iVal; + if( (iTermIdx+nByte)>=nTermIdx ) break; + iTermIdx += nByte; + } + nTermIdx = iTermIdx; + + memmove(&pTerm->p[iTermOff], &pTerm->p[pTerm->szLeaf], nTermIdx); + fts5PutU16(&pTerm->p[2], iTermOff); + + fts5DataWrite(p, iId, pTerm->p, iTermOff+nTermIdx); + if( nTermIdx==0 ){ + fts5SecureDeleteIdxEntry(p, iSegid, pSeg->iTermLeafPgno); + } + } + fts5DataRelease(pTerm); + } + } + + if( p->rc==SQLITE_OK ){ + const int nMove = nPg - iNextOff; /* Number of bytes to move */ + int nShift = iNextOff - iOff; /* Distance to move them */ + + int iPrevKeyOut = 0; + int iKeyIn = 0; + + memmove(&aPg[iOff], &aPg[iNextOff], nMove); + iPgIdx -= nShift; + nPg = iPgIdx; + fts5PutU16(&aPg[2], iPgIdx); + + for(iIdx=0; iIdxiOff ? nShift : 0)); + nPg += sqlite3Fts5PutVarint(&aPg[nPg], iKeyOut - iPrevKeyOut); + iPrevKeyOut = iKeyOut; + } + } + + if( iPgIdx==nPg && nIdx>0 && pSeg->iLeafPgno!=1 ){ + fts5SecureDeleteIdxEntry(p, iSegid, pSeg->iLeafPgno); + } + + assert_nc( nPg>4 || fts5GetU16(aPg)==0 ); + fts5DataWrite(p, FTS5_SEGMENT_ROWID(iSegid,pSeg->iLeafPgno), aPg, nPg); + } + sqlite3_free(aIdx); +} + +/* +** This is called as part of flushing a delete to disk in 'secure-delete' +** mode. It edits the segments within the database described by argument +** pStruct to remove the entries for term zTerm, rowid iRowid. +*/ +static void fts5FlushSecureDelete( + Fts5Index *p, + Fts5Structure *pStruct, + const char *zTerm, + i64 iRowid +){ + const int f = FTS5INDEX_QUERY_SKIPHASH; + int nTerm = (int)strlen(zTerm); + Fts5Iter *pIter = 0; /* Used to find term instance */ + + fts5MultiIterNew(p, pStruct, f, 0, (const u8*)zTerm, nTerm, -1, 0, &pIter); + if( fts5MultiIterEof(p, pIter)==0 ){ + i64 iThis = fts5MultiIterRowid(pIter); + if( iThisrc==SQLITE_OK + && fts5MultiIterEof(p, pIter)==0 + && iRowid==fts5MultiIterRowid(pIter) + ){ + Fts5SegIter *pSeg = &pIter->aSeg[pIter->aFirst[1].iFirst]; + fts5DoSecureDelete(p, pSeg); + } + } + + fts5MultiIterFree(pIter); +} + + /* ** Flush the contents of in-memory hash table iHash to a new level-0 ** segment on disk. Also update the corresponding structure record. @@ -233596,146 +239956,197 @@ static void fts5FlushOneHash(Fts5Index *p){ /* Obtain a reference to the index structure and allocate a new segment-id ** for the new level-0 segment. */ pStruct = fts5StructureRead(p); - iSegid = fts5AllocateSegid(p, pStruct); fts5StructureInvalidate(p); - if( iSegid ){ - const int pgsz = p->pConfig->pgsz; - int eDetail = p->pConfig->eDetail; - Fts5StructureSegment *pSeg; /* New segment within pStruct */ - Fts5Buffer *pBuf; /* Buffer in which to assemble leaf page */ - Fts5Buffer *pPgidx; /* Buffer in which to assemble pgidx */ - - Fts5SegWriter writer; - fts5WriteInit(p, &writer, iSegid); - - pBuf = &writer.writer.buf; - pPgidx = &writer.writer.pgidx; + if( sqlite3Fts5HashIsEmpty(pHash)==0 ){ + iSegid = fts5AllocateSegid(p, pStruct); + if( iSegid ){ + const int pgsz = p->pConfig->pgsz; + int eDetail = p->pConfig->eDetail; + int bSecureDelete = p->pConfig->bSecureDelete; + Fts5StructureSegment *pSeg; /* New segment within pStruct */ + Fts5Buffer *pBuf; /* Buffer in which to assemble leaf page */ + Fts5Buffer *pPgidx; /* Buffer in which to assemble pgidx */ + + Fts5SegWriter writer; + fts5WriteInit(p, &writer, iSegid); + + pBuf = &writer.writer.buf; + pPgidx = &writer.writer.pgidx; + + /* fts5WriteInit() should have initialized the buffers to (most likely) + ** the maximum space required. */ + assert( p->rc || pBuf->nSpace>=(pgsz + FTS5_DATA_PADDING) ); + assert( p->rc || pPgidx->nSpace>=(pgsz + FTS5_DATA_PADDING) ); + + /* Begin scanning through hash table entries. This loop runs once for each + ** term/doclist currently stored within the hash table. */ + if( p->rc==SQLITE_OK ){ + p->rc = sqlite3Fts5HashScanInit(pHash, 0, 0); + } + while( p->rc==SQLITE_OK && 0==sqlite3Fts5HashScanEof(pHash) ){ + const char *zTerm; /* Buffer containing term */ + int nTerm; /* Size of zTerm in bytes */ + const u8 *pDoclist; /* Pointer to doclist for this term */ + int nDoclist; /* Size of doclist in bytes */ + + /* Get the term and doclist for this entry. */ + sqlite3Fts5HashScanEntry(pHash, &zTerm, &pDoclist, &nDoclist); + nTerm = (int)strlen(zTerm); + if( bSecureDelete==0 ){ + fts5WriteAppendTerm(p, &writer, nTerm, (const u8*)zTerm); + if( p->rc!=SQLITE_OK ) break; + assert( writer.bFirstRowidInPage==0 ); + } + + if( !bSecureDelete && pgsz>=(pBuf->n + pPgidx->n + nDoclist + 1) ){ + /* The entire doclist will fit on the current leaf. */ + fts5BufferSafeAppendBlob(pBuf, pDoclist, nDoclist); + }else{ + int bTermWritten = !bSecureDelete; + i64 iRowid = 0; + i64 iPrev = 0; + int iOff = 0; + + /* The entire doclist will not fit on this leaf. The following + ** loop iterates through the poslists that make up the current + ** doclist. */ + while( p->rc==SQLITE_OK && iOffrc!=SQLITE_OK || pDoclist[iOff]==0x01 ){ + iOff++; + continue; + } + } + } - /* fts5WriteInit() should have initialized the buffers to (most likely) - ** the maximum space required. */ - assert( p->rc || pBuf->nSpace>=(pgsz + FTS5_DATA_PADDING) ); - assert( p->rc || pPgidx->nSpace>=(pgsz + FTS5_DATA_PADDING) ); + if( p->rc==SQLITE_OK && bTermWritten==0 ){ + fts5WriteAppendTerm(p, &writer, nTerm, (const u8*)zTerm); + bTermWritten = 1; + assert( p->rc!=SQLITE_OK || writer.bFirstRowidInPage==0 ); + } - /* Begin scanning through hash table entries. This loop runs once for each - ** term/doclist currently stored within the hash table. */ - if( p->rc==SQLITE_OK ){ - p->rc = sqlite3Fts5HashScanInit(pHash, 0, 0); - } - while( p->rc==SQLITE_OK && 0==sqlite3Fts5HashScanEof(pHash) ){ - const char *zTerm; /* Buffer containing term */ - const u8 *pDoclist; /* Pointer to doclist for this term */ - int nDoclist; /* Size of doclist in bytes */ - - /* Write the term for this entry to disk. */ - sqlite3Fts5HashScanEntry(pHash, &zTerm, &pDoclist, &nDoclist); - fts5WriteAppendTerm(p, &writer, (int)strlen(zTerm), (const u8*)zTerm); - if( p->rc!=SQLITE_OK ) break; - - assert( writer.bFirstRowidInPage==0 ); - if( pgsz>=(pBuf->n + pPgidx->n + nDoclist + 1) ){ - /* The entire doclist will fit on the current leaf. */ - fts5BufferSafeAppendBlob(pBuf, pDoclist, nDoclist); - }else{ - i64 iRowid = 0; - u64 iDelta = 0; - int iOff = 0; - - /* The entire doclist will not fit on this leaf. The following - ** loop iterates through the poslists that make up the current - ** doclist. */ - while( p->rc==SQLITE_OK && iOffp[0], (u16)pBuf->n); /* first rowid on page */ - pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], iRowid); - writer.bFirstRowidInPage = 0; - fts5WriteDlidxAppend(p, &writer, iRowid); + if( writer.bFirstRowidInPage ){ + fts5PutU16(&pBuf->p[0], (u16)pBuf->n); /* first rowid on page */ + pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], iRowid); + writer.bFirstRowidInPage = 0; + fts5WriteDlidxAppend(p, &writer, iRowid); + }else{ + u64 iRowidDelta = (u64)iRowid - (u64)iPrev; + pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], iRowidDelta); + } if( p->rc!=SQLITE_OK ) break; - }else{ - pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], iDelta); - } - assert( pBuf->n<=pBuf->nSpace ); + assert( pBuf->n<=pBuf->nSpace ); + iPrev = iRowid; - if( eDetail==FTS5_DETAIL_NONE ){ - if( iOffp[pBuf->n++] = 0; - iOff++; + if( eDetail==FTS5_DETAIL_NONE ){ if( iOffp[pBuf->n++] = 0; iOff++; + if( iOffp[pBuf->n++] = 0; + iOff++; + } + } + if( (pBuf->n + pPgidx->n)>=pgsz ){ + fts5WriteFlushLeaf(p, &writer); } - } - if( (pBuf->n + pPgidx->n)>=pgsz ){ - fts5WriteFlushLeaf(p, &writer); - } - }else{ - int bDummy; - int nPos; - int nCopy = fts5GetPoslistSize(&pDoclist[iOff], &nPos, &bDummy); - nCopy += nPos; - if( (pBuf->n + pPgidx->n + nCopy) <= pgsz ){ - /* The entire poslist will fit on the current leaf. So copy - ** it in one go. */ - fts5BufferSafeAppendBlob(pBuf, &pDoclist[iOff], nCopy); }else{ - /* The entire poslist will not fit on this leaf. So it needs - ** to be broken into sections. The only qualification being - ** that each varint must be stored contiguously. */ - const u8 *pPoslist = &pDoclist[iOff]; - int iPos = 0; - while( p->rc==SQLITE_OK ){ - int nSpace = pgsz - pBuf->n - pPgidx->n; - int n = 0; - if( (nCopy - iPos)<=nSpace ){ - n = nCopy - iPos; - }else{ - n = fts5PoslistPrefix(&pPoslist[iPos], nSpace); - } - assert( n>0 ); - fts5BufferSafeAppendBlob(pBuf, &pPoslist[iPos], n); - iPos += n; - if( (pBuf->n + pPgidx->n)>=pgsz ){ - fts5WriteFlushLeaf(p, &writer); + int bDummy; + int nPos; + int nCopy = fts5GetPoslistSize(&pDoclist[iOff], &nPos, &bDummy); + nCopy += nPos; + if( (pBuf->n + pPgidx->n + nCopy) <= pgsz ){ + /* The entire poslist will fit on the current leaf. So copy + ** it in one go. */ + fts5BufferSafeAppendBlob(pBuf, &pDoclist[iOff], nCopy); + }else{ + /* The entire poslist will not fit on this leaf. So it needs + ** to be broken into sections. The only qualification being + ** that each varint must be stored contiguously. */ + const u8 *pPoslist = &pDoclist[iOff]; + int iPos = 0; + while( p->rc==SQLITE_OK ){ + int nSpace = pgsz - pBuf->n - pPgidx->n; + int n = 0; + if( (nCopy - iPos)<=nSpace ){ + n = nCopy - iPos; + }else{ + n = fts5PoslistPrefix(&pPoslist[iPos], nSpace); + } + assert( n>0 ); + fts5BufferSafeAppendBlob(pBuf, &pPoslist[iPos], n); + iPos += n; + if( (pBuf->n + pPgidx->n)>=pgsz ){ + fts5WriteFlushLeaf(p, &writer); + } + if( iPos>=nCopy ) break; } - if( iPos>=nCopy ) break; } + iOff += nCopy; } - iOff += nCopy; } } - } - /* TODO2: Doclist terminator written here. */ - /* pBuf->p[pBuf->n++] = '\0'; */ - assert( pBuf->n<=pBuf->nSpace ); - if( p->rc==SQLITE_OK ) sqlite3Fts5HashScanNext(pHash); - } - sqlite3Fts5HashClear(pHash); - fts5WriteFinish(p, &writer, &pgnoLast); + /* TODO2: Doclist terminator written here. */ + /* pBuf->p[pBuf->n++] = '\0'; */ + assert( pBuf->n<=pBuf->nSpace ); + if( p->rc==SQLITE_OK ) sqlite3Fts5HashScanNext(pHash); + } + sqlite3Fts5HashClear(pHash); + fts5WriteFinish(p, &writer, &pgnoLast); - /* Update the Fts5Structure. It is written back to the database by the - ** fts5StructureRelease() call below. */ - if( pStruct->nLevel==0 ){ - fts5StructureAddLevel(&p->rc, &pStruct); - } - fts5StructureExtendLevel(&p->rc, pStruct, 0, 1, 0); - if( p->rc==SQLITE_OK ){ - pSeg = &pStruct->aLevel[0].aSeg[ pStruct->aLevel[0].nSeg++ ]; - pSeg->iSegid = iSegid; - pSeg->pgnoFirst = 1; - pSeg->pgnoLast = pgnoLast; - pStruct->nSegment++; + assert( p->rc!=SQLITE_OK || bSecureDelete || pgnoLast>0 ); + if( pgnoLast>0 ){ + /* Update the Fts5Structure. It is written back to the database by the + ** fts5StructureRelease() call below. */ + if( pStruct->nLevel==0 ){ + fts5StructureAddLevel(&p->rc, &pStruct); + } + fts5StructureExtendLevel(&p->rc, pStruct, 0, 1, 0); + if( p->rc==SQLITE_OK ){ + pSeg = &pStruct->aLevel[0].aSeg[ pStruct->aLevel[0].nSeg++ ]; + pSeg->iSegid = iSegid; + pSeg->pgnoFirst = 1; + pSeg->pgnoLast = pgnoLast; + if( pStruct->nOriginCntr>0 ){ + pSeg->iOrigin1 = pStruct->nOriginCntr; + pSeg->iOrigin2 = pStruct->nOriginCntr; + pSeg->nEntry = p->nPendingRow; + pStruct->nOriginCntr++; + } + pStruct->nSegment++; + } + fts5StructurePromote(p, 0, pStruct); + } } - fts5StructurePromote(p, 0, pStruct); } - fts5IndexAutomerge(p, &pStruct, pgnoLast); + fts5IndexAutomerge(p, &pStruct, pgnoLast + p->nContentlessDelete); fts5IndexCrisismerge(p, &pStruct); fts5StructureWrite(p, pStruct); fts5StructureRelease(pStruct); + p->nContentlessDelete = 0; } /* @@ -233743,10 +240154,11 @@ static void fts5FlushOneHash(Fts5Index *p){ */ static void fts5IndexFlush(Fts5Index *p){ /* Unless it is empty, flush the hash table to disk */ - if( p->nPendingData ){ + if( p->nPendingData || p->nContentlessDelete ){ assert( p->pHash ); - p->nPendingData = 0; fts5FlushOneHash(p); + p->nPendingData = 0; + p->nPendingRow = 0; } } @@ -233762,17 +240174,22 @@ static Fts5Structure *fts5IndexOptimizeStruct( /* Figure out if this structure requires optimization. A structure does ** not require optimization if either: ** - ** + it consists of fewer than two segments, or - ** + all segments are on the same level, or - ** + all segments except one are currently inputs to a merge operation. + ** 1. it consists of fewer than two segments, or + ** 2. all segments are on the same level, or + ** 3. all segments except one are currently inputs to a merge operation. ** - ** In the first case, return NULL. In the second, increment the ref-count - ** on *pStruct and return a copy of the pointer to it. + ** In the first case, if there are no tombstone hash pages, return NULL. In + ** the second, increment the ref-count on *pStruct and return a copy of the + ** pointer to it. */ - if( nSeg<2 ) return 0; + if( nSeg==0 ) return 0; for(i=0; inLevel; i++){ int nThis = pStruct->aLevel[i].nSeg; - if( nThis==nSeg || (nThis==nSeg-1 && pStruct->aLevel[i].nMerge==nThis) ){ + int nMerge = pStruct->aLevel[i].nMerge; + if( nThis>0 && (nThis==nSeg || (nThis==nSeg-1 && nMerge==nThis)) ){ + if( nSeg==1 && nThis==1 && pStruct->aLevel[i].aSeg[0].nPgTombstone==0 ){ + return 0; + } fts5StructureRef(pStruct); return pStruct; } @@ -233785,10 +240202,11 @@ static Fts5Structure *fts5IndexOptimizeStruct( if( pNew ){ Fts5StructureLevel *pLvl; nByte = nSeg * sizeof(Fts5StructureSegment); - pNew->nLevel = pStruct->nLevel+1; + pNew->nLevel = MIN(pStruct->nLevel+1, FTS5_MAX_LEVEL); pNew->nRef = 1; pNew->nWriteCounter = pStruct->nWriteCounter; - pLvl = &pNew->aLevel[pStruct->nLevel]; + pNew->nOriginCntr = pStruct->nOriginCntr; + pLvl = &pNew->aLevel[pNew->nLevel-1]; pLvl->aSeg = (Fts5StructureSegment*)sqlite3Fts5MallocZero(&p->rc, nByte); if( pLvl->aSeg ){ int iLvl, iSeg; @@ -233818,6 +240236,7 @@ static int sqlite3Fts5IndexOptimize(Fts5Index *p){ assert( p->rc==SQLITE_OK ); fts5IndexFlush(p); + assert( p->nContentlessDelete==0 ); pStruct = fts5StructureRead(p); fts5StructureInvalidate(p); @@ -233847,7 +240266,10 @@ static int sqlite3Fts5IndexOptimize(Fts5Index *p){ ** INSERT command. */ static int sqlite3Fts5IndexMerge(Fts5Index *p, int nMerge){ - Fts5Structure *pStruct = fts5StructureRead(p); + Fts5Structure *pStruct = 0; + + fts5IndexFlush(p); + pStruct = fts5StructureRead(p); if( pStruct ){ int nMin = p->pConfig->nUsermerge; fts5StructureInvalidate(p); @@ -233855,7 +240277,7 @@ static int sqlite3Fts5IndexMerge(Fts5Index *p, int nMerge){ Fts5Structure *pNew = fts5IndexOptimizeStruct(p, pStruct); fts5StructureRelease(pStruct); pStruct = pNew; - nMin = 2; + nMin = 1; nMerge = nMerge*-1; } if( pStruct && pStruct->nLevel ){ @@ -234090,7 +240512,7 @@ static void fts5MergePrefixLists( /* Initialize a doclist-iterator for each input buffer. Arrange them in ** a linked-list starting at pHead in ascending order of rowid. Avoid ** linking any iterators already at EOF into the linked list at all. */ - assert( nBuf+1<=sizeof(aMerger)/sizeof(aMerger[0]) ); + assert( nBuf+1<=(int)(sizeof(aMerger)/sizeof(aMerger[0])) ); memset(aMerger, 0, sizeof(PrefixMerger)*(nBuf+1)); pHead = &aMerger[nBuf]; fts5DoclistIterInit(p1, &pHead->iter); @@ -234369,6 +240791,9 @@ static int sqlite3Fts5IndexBeginWrite(Fts5Index *p, int bDelete, i64 iRowid){ p->iWriteRowid = iRowid; p->bDelete = bDelete; + if( bDelete==0 ){ + p->nPendingRow++; + } return fts5IndexReturn(p); } @@ -234406,6 +240831,9 @@ static int sqlite3Fts5IndexReinit(Fts5Index *p){ fts5StructureInvalidate(p); fts5IndexDiscardData(p); memset(&s, 0, sizeof(Fts5Structure)); + if( p->pConfig->bContentlessDelete ){ + s.nOriginCntr = 1; + } fts5DataWrite(p, FTS5_AVERAGES_ROWID, (const u8*)"", 0); fts5StructureWrite(p, &s); return fts5IndexReturn(p); @@ -234470,6 +240898,7 @@ static int sqlite3Fts5IndexClose(Fts5Index *p){ sqlite3_finalize(p->pIdxDeleter); sqlite3_finalize(p->pIdxSelect); sqlite3_finalize(p->pDataVersion); + sqlite3_finalize(p->pDeleteFromIdx); sqlite3Fts5HashFree(p->pHash); sqlite3_free(p->zDataTbl); sqlite3_free(p); @@ -234796,6 +241225,347 @@ static int sqlite3Fts5IndexLoadConfig(Fts5Index *p){ return fts5IndexReturn(p); } +/* +** Retrieve the origin value that will be used for the segment currently +** being accumulated in the in-memory hash table when it is flushed to +** disk. If successful, SQLITE_OK is returned and (*piOrigin) set to +** the queried value. Or, if an error occurs, an error code is returned +** and the final value of (*piOrigin) is undefined. +*/ +static int sqlite3Fts5IndexGetOrigin(Fts5Index *p, i64 *piOrigin){ + Fts5Structure *pStruct; + pStruct = fts5StructureRead(p); + if( pStruct ){ + *piOrigin = pStruct->nOriginCntr; + fts5StructureRelease(pStruct); + } + return fts5IndexReturn(p); +} + +/* +** Buffer pPg contains a page of a tombstone hash table - one of nPg pages +** associated with the same segment. This function adds rowid iRowid to +** the hash table. The caller is required to guarantee that there is at +** least one free slot on the page. +** +** If parameter bForce is false and the hash table is deemed to be full +** (more than half of the slots are occupied), then non-zero is returned +** and iRowid not inserted. Or, if bForce is true or if the hash table page +** is not full, iRowid is inserted and zero returned. +*/ +static int fts5IndexTombstoneAddToPage( + Fts5Data *pPg, + int bForce, + int nPg, + u64 iRowid +){ + const int szKey = TOMBSTONE_KEYSIZE(pPg); + const int nSlot = TOMBSTONE_NSLOT(pPg); + const int nElem = fts5GetU32(&pPg->p[4]); + int iSlot = (iRowid / nPg) % nSlot; + int nCollide = nSlot; + + if( szKey==4 && iRowid>0xFFFFFFFF ) return 2; + if( iRowid==0 ){ + pPg->p[1] = 0x01; + return 0; + } + + if( bForce==0 && nElem>=(nSlot/2) ){ + return 1; + } + + fts5PutU32(&pPg->p[4], nElem+1); + if( szKey==4 ){ + u32 *aSlot = (u32*)&pPg->p[8]; + while( aSlot[iSlot] ){ + iSlot = (iSlot + 1) % nSlot; + if( nCollide--==0 ) return 0; + } + fts5PutU32((u8*)&aSlot[iSlot], (u32)iRowid); + }else{ + u64 *aSlot = (u64*)&pPg->p[8]; + while( aSlot[iSlot] ){ + iSlot = (iSlot + 1) % nSlot; + if( nCollide--==0 ) return 0; + } + fts5PutU64((u8*)&aSlot[iSlot], iRowid); + } + + return 0; +} + +/* +** This function attempts to build a new hash containing all the keys +** currently in the tombstone hash table for segment pSeg. The new +** hash will be stored in the nOut buffers passed in array apOut[]. +** All pages of the new hash use key-size szKey (4 or 8). +** +** Return 0 if the hash is successfully rebuilt into the nOut pages. +** Or non-zero if it is not (because one page became overfull). In this +** case the caller should retry with a larger nOut parameter. +** +** Parameter pData1 is page iPg1 of the hash table being rebuilt. +*/ +static int fts5IndexTombstoneRehash( + Fts5Index *p, + Fts5StructureSegment *pSeg, /* Segment to rebuild hash of */ + Fts5Data *pData1, /* One page of current hash - or NULL */ + int iPg1, /* Which page of the current hash is pData1 */ + int szKey, /* 4 or 8, the keysize */ + int nOut, /* Number of output pages */ + Fts5Data **apOut /* Array of output hash pages */ +){ + int ii; + int res = 0; + + /* Initialize the headers of all the output pages */ + for(ii=0; iip[0] = szKey; + fts5PutU32(&apOut[ii]->p[4], 0); + } + + /* Loop through the current pages of the hash table. */ + for(ii=0; res==0 && iinPgTombstone; ii++){ + Fts5Data *pData = 0; /* Page ii of the current hash table */ + Fts5Data *pFree = 0; /* Free this at the end of the loop */ + + if( iPg1==ii ){ + pData = pData1; + }else{ + pFree = pData = fts5DataRead(p, FTS5_TOMBSTONE_ROWID(pSeg->iSegid, ii)); + } + + if( pData ){ + int szKeyIn = TOMBSTONE_KEYSIZE(pData); + int nSlotIn = (pData->nn - 8) / szKeyIn; + int iIn; + for(iIn=0; iInp[8]; + if( aSlot[iIn] ) iVal = fts5GetU32((u8*)&aSlot[iIn]); + }else{ + u64 *aSlot = (u64*)&pData->p[8]; + if( aSlot[iIn] ) iVal = fts5GetU64((u8*)&aSlot[iIn]); + } + + /* If iVal is not 0 at this point, insert it into the new hash table */ + if( iVal ){ + Fts5Data *pPg = apOut[(iVal % nOut)]; + res = fts5IndexTombstoneAddToPage(pPg, 0, nOut, iVal); + if( res ) break; + } + } + + /* If this is page 0 of the old hash, copy the rowid-0-flag from the + ** old hash to the new. */ + if( ii==0 ){ + apOut[0]->p[1] = pData->p[1]; + } + } + fts5DataRelease(pFree); + } + + return res; +} + +/* +** This is called to rebuild the hash table belonging to segment pSeg. +** If parameter pData1 is not NULL, then one page of the existing hash table +** has already been loaded - pData1, which is page iPg1. The key-size for +** the new hash table is szKey (4 or 8). +** +** If successful, the new hash table is not written to disk. Instead, +** output parameter (*pnOut) is set to the number of pages in the new +** hash table, and (*papOut) to point to an array of buffers containing +** the new page data. +** +** If an error occurs, an error code is left in the Fts5Index object and +** both output parameters set to 0 before returning. +*/ +static void fts5IndexTombstoneRebuild( + Fts5Index *p, + Fts5StructureSegment *pSeg, /* Segment to rebuild hash of */ + Fts5Data *pData1, /* One page of current hash - or NULL */ + int iPg1, /* Which page of the current hash is pData1 */ + int szKey, /* 4 or 8, the keysize */ + int *pnOut, /* OUT: Number of output pages */ + Fts5Data ***papOut /* OUT: Output hash pages */ +){ + const int MINSLOT = 32; + int nSlotPerPage = MAX(MINSLOT, (p->pConfig->pgsz - 8) / szKey); + int nSlot = 0; /* Number of slots in each output page */ + int nOut = 0; + + /* Figure out how many output pages (nOut) and how many slots per + ** page (nSlot). There are three possibilities: + ** + ** 1. The hash table does not yet exist. In this case the new hash + ** table will consist of a single page with MINSLOT slots. + ** + ** 2. The hash table exists but is currently a single page. In this + ** case an attempt is made to grow the page to accommodate the new + ** entry. The page is allowed to grow up to nSlotPerPage (see above) + ** slots. + ** + ** 3. The hash table already consists of more than one page, or of + ** a single page already so large that it cannot be grown. In this + ** case the new hash consists of (nPg*2+1) pages of nSlotPerPage + ** slots each, where nPg is the current number of pages in the + ** hash table. + */ + if( pSeg->nPgTombstone==0 ){ + /* Case 1. */ + nOut = 1; + nSlot = MINSLOT; + }else if( pSeg->nPgTombstone==1 ){ + /* Case 2. */ + int nElem = (int)fts5GetU32(&pData1->p[4]); + assert( pData1 && iPg1==0 ); + nOut = 1; + nSlot = MAX(nElem*4, MINSLOT); + if( nSlot>nSlotPerPage ) nOut = 0; + } + if( nOut==0 ){ + /* Case 3. */ + nOut = (pSeg->nPgTombstone * 2 + 1); + nSlot = nSlotPerPage; + } + + /* Allocate the required array and output pages */ + while( 1 ){ + int res = 0; + int ii = 0; + int szPage = 0; + Fts5Data **apOut = 0; + + /* Allocate space for the new hash table */ + assert( nSlot>=MINSLOT ); + apOut = (Fts5Data**)sqlite3Fts5MallocZero(&p->rc, sizeof(Fts5Data*) * nOut); + szPage = 8 + nSlot*szKey; + for(ii=0; iirc, + sizeof(Fts5Data)+szPage + ); + if( pNew ){ + pNew->nn = szPage; + pNew->p = (u8*)&pNew[1]; + apOut[ii] = pNew; + } + } + + /* Rebuild the hash table. */ + if( p->rc==SQLITE_OK ){ + res = fts5IndexTombstoneRehash(p, pSeg, pData1, iPg1, szKey, nOut, apOut); + } + if( res==0 ){ + if( p->rc ){ + fts5IndexFreeArray(apOut, nOut); + apOut = 0; + nOut = 0; + } + *pnOut = nOut; + *papOut = apOut; + break; + } + + /* If control flows to here, it was not possible to rebuild the hash + ** table. Free all buffers and then try again with more pages. */ + assert( p->rc==SQLITE_OK ); + fts5IndexFreeArray(apOut, nOut); + nSlot = nSlotPerPage; + nOut = nOut*2 + 1; + } +} + + +/* +** Add a tombstone for rowid iRowid to segment pSeg. +*/ +static void fts5IndexTombstoneAdd( + Fts5Index *p, + Fts5StructureSegment *pSeg, + u64 iRowid +){ + Fts5Data *pPg = 0; + int iPg = -1; + int szKey = 0; + int nHash = 0; + Fts5Data **apHash = 0; + + p->nContentlessDelete++; + + if( pSeg->nPgTombstone>0 ){ + iPg = iRowid % pSeg->nPgTombstone; + pPg = fts5DataRead(p, FTS5_TOMBSTONE_ROWID(pSeg->iSegid,iPg)); + if( pPg==0 ){ + assert( p->rc!=SQLITE_OK ); + return; + } + + if( 0==fts5IndexTombstoneAddToPage(pPg, 0, pSeg->nPgTombstone, iRowid) ){ + fts5DataWrite(p, FTS5_TOMBSTONE_ROWID(pSeg->iSegid,iPg), pPg->p, pPg->nn); + fts5DataRelease(pPg); + return; + } + } + + /* Have to rebuild the hash table. First figure out the key-size (4 or 8). */ + szKey = pPg ? TOMBSTONE_KEYSIZE(pPg) : 4; + if( iRowid>0xFFFFFFFF ) szKey = 8; + + /* Rebuild the hash table */ + fts5IndexTombstoneRebuild(p, pSeg, pPg, iPg, szKey, &nHash, &apHash); + assert( p->rc==SQLITE_OK || (nHash==0 && apHash==0) ); + + /* If all has succeeded, write the new rowid into one of the new hash + ** table pages, then write them all out to disk. */ + if( nHash ){ + int ii = 0; + fts5IndexTombstoneAddToPage(apHash[iRowid % nHash], 1, nHash, iRowid); + for(ii=0; iiiSegid, ii); + fts5DataWrite(p, iTombstoneRowid, apHash[ii]->p, apHash[ii]->nn); + } + pSeg->nPgTombstone = nHash; + fts5StructureWrite(p, p->pStruct); + } + + fts5DataRelease(pPg); + fts5IndexFreeArray(apHash, nHash); +} + +/* +** Add iRowid to the tombstone list of the segment or segments that contain +** rows from origin iOrigin. Return SQLITE_OK if successful, or an SQLite +** error code otherwise. +*/ +static int sqlite3Fts5IndexContentlessDelete(Fts5Index *p, i64 iOrigin, i64 iRowid){ + Fts5Structure *pStruct; + pStruct = fts5StructureRead(p); + if( pStruct ){ + int bFound = 0; /* True after pSeg->nEntryTombstone incr. */ + int iLvl; + for(iLvl=pStruct->nLevel-1; iLvl>=0; iLvl--){ + int iSeg; + for(iSeg=pStruct->aLevel[iLvl].nSeg-1; iSeg>=0; iSeg--){ + Fts5StructureSegment *pSeg = &pStruct->aLevel[iLvl].aSeg[iSeg]; + if( pSeg->iOrigin1<=(u64)iOrigin && pSeg->iOrigin2>=(u64)iOrigin ){ + if( bFound==0 ){ + pSeg->nEntryTombstone++; + bFound = 1; + } + fts5IndexTombstoneAdd(p, pSeg, iRowid); + } + } + } + fts5StructureRelease(pStruct); + } + return fts5IndexReturn(p); +} /************************************************************************* ************************************************************************** @@ -235100,6 +241870,7 @@ static void fts5IndexIntegrityCheckSegment( Fts5StructureSegment *pSeg /* Segment to check internal consistency */ ){ Fts5Config *pConfig = p->pConfig; + int bSecureDelete = (pConfig->iVersion==FTS5_CURRENT_VERSION_SECUREDELETE); sqlite3_stmt *pStmt = 0; int rc2; int iIdxPrevLeaf = pSeg->pgnoFirst-1; @@ -235135,7 +241906,19 @@ static void fts5IndexIntegrityCheckSegment( ** is also a rowid pointer within the leaf page header, it points to a ** location before the term. */ if( pLeaf->nn<=pLeaf->szLeaf ){ - p->rc = FTS5_CORRUPT; + + if( nIdxTerm==0 + && pConfig->iVersion==FTS5_CURRENT_VERSION_SECUREDELETE + && pLeaf->nn==pLeaf->szLeaf + && pLeaf->nn==4 + ){ + /* special case - the very first page in a segment keeps its %_idx + ** entry even if all the terms are removed from it by secure-delete + ** operations. */ + }else{ + p->rc = FTS5_CORRUPT; + } + }else{ int iOff; /* Offset of first term on leaf */ int iRowidOff; /* Offset of first rowid on leaf */ @@ -235199,9 +241982,12 @@ static void fts5IndexIntegrityCheckSegment( ASSERT_SZLEAF_OK(pLeaf); if( iRowidOff>=pLeaf->szLeaf ){ p->rc = FTS5_CORRUPT; - }else{ + }else if( bSecureDelete==0 || iRowidOff>0 ){ + i64 iDlRowid = fts5DlidxIterRowid(pDlidx); fts5GetVarint(&pLeaf->p[iRowidOff], (u64*)&iRowid); - if( iRowid!=fts5DlidxIterRowid(pDlidx) ) p->rc = FTS5_CORRUPT; + if( iRowidrc = FTS5_CORRUPT; + } } fts5DataRelease(pLeaf); } @@ -235331,13 +242117,14 @@ static int sqlite3Fts5IndexIntegrityCheck(Fts5Index *p, u64 cksum, int bUseCksum ** function only. */ -#ifdef SQLITE_TEST +#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG) /* ** Decode a segment-data rowid from the %_data table. This function is ** the opposite of macro FTS5_SEGMENT_ROWID(). */ static void fts5DecodeRowid( i64 iRowid, /* Rowid from %_data table */ + int *pbTombstone, /* OUT: Tombstone hash flag */ int *piSegid, /* OUT: Segment id */ int *pbDlidx, /* OUT: Dlidx flag */ int *piHeight, /* OUT: Height */ @@ -235353,13 +242140,16 @@ static void fts5DecodeRowid( iRowid >>= FTS5_DATA_DLI_B; *piSegid = (int)(iRowid & (((i64)1 << FTS5_DATA_ID_B) - 1)); + iRowid >>= FTS5_DATA_ID_B; + + *pbTombstone = (int)(iRowid & 0x0001); } -#endif /* SQLITE_TEST */ +#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */ -#ifdef SQLITE_TEST +#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG) static void fts5DebugRowid(int *pRc, Fts5Buffer *pBuf, i64 iKey){ - int iSegid, iHeight, iPgno, bDlidx; /* Rowid compenents */ - fts5DecodeRowid(iKey, &iSegid, &bDlidx, &iHeight, &iPgno); + int iSegid, iHeight, iPgno, bDlidx, bTomb; /* Rowid compenents */ + fts5DecodeRowid(iKey, &bTomb, &iSegid, &bDlidx, &iHeight, &iPgno); if( iSegid==0 ){ if( iKey==FTS5_AVERAGES_ROWID ){ @@ -235369,14 +242159,16 @@ static void fts5DebugRowid(int *pRc, Fts5Buffer *pBuf, i64 iKey){ } } else{ - sqlite3Fts5BufferAppendPrintf(pRc, pBuf, "{%ssegid=%d h=%d pgno=%d}", - bDlidx ? "dlidx " : "", iSegid, iHeight, iPgno + sqlite3Fts5BufferAppendPrintf(pRc, pBuf, "{%s%ssegid=%d h=%d pgno=%d}", + bDlidx ? "dlidx " : "", + bTomb ? "tombstone " : "", + iSegid, iHeight, iPgno ); } } -#endif /* SQLITE_TEST */ +#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */ -#ifdef SQLITE_TEST +#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG) static void fts5DebugStructure( int *pRc, /* IN/OUT: error code */ Fts5Buffer *pBuf, @@ -235391,16 +242183,22 @@ static void fts5DebugStructure( ); for(iSeg=0; iSegnSeg; iSeg++){ Fts5StructureSegment *pSeg = &pLvl->aSeg[iSeg]; - sqlite3Fts5BufferAppendPrintf(pRc, pBuf, " {id=%d leaves=%d..%d}", + sqlite3Fts5BufferAppendPrintf(pRc, pBuf, " {id=%d leaves=%d..%d", pSeg->iSegid, pSeg->pgnoFirst, pSeg->pgnoLast ); + if( pSeg->iOrigin1>0 ){ + sqlite3Fts5BufferAppendPrintf(pRc, pBuf, " origin=%lld..%lld", + pSeg->iOrigin1, pSeg->iOrigin2 + ); + } + sqlite3Fts5BufferAppendPrintf(pRc, pBuf, "}"); } sqlite3Fts5BufferAppendPrintf(pRc, pBuf, "}"); } } -#endif /* SQLITE_TEST */ +#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */ -#ifdef SQLITE_TEST +#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG) /* ** This is part of the fts5_decode() debugging aid. ** @@ -235425,9 +242223,9 @@ static void fts5DecodeStructure( fts5DebugStructure(pRc, pBuf, p); fts5StructureRelease(p); } -#endif /* SQLITE_TEST */ +#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */ -#ifdef SQLITE_TEST +#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG) /* ** This is part of the fts5_decode() debugging aid. ** @@ -235450,9 +242248,9 @@ static void fts5DecodeAverages( zSpace = " "; } } -#endif /* SQLITE_TEST */ +#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */ -#ifdef SQLITE_TEST +#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG) /* ** Buffer (a/n) is assumed to contain a list of serialized varints. Read ** each varint and append its string representation to buffer pBuf. Return @@ -235469,9 +242267,9 @@ static int fts5DecodePoslist(int *pRc, Fts5Buffer *pBuf, const u8 *a, int n){ } return iOff; } -#endif /* SQLITE_TEST */ +#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */ -#ifdef SQLITE_TEST +#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG) /* ** The start of buffer (a/n) contains the start of a doclist. The doclist ** may or may not finish within the buffer. This function appends a text @@ -235504,9 +242302,9 @@ static int fts5DecodeDoclist(int *pRc, Fts5Buffer *pBuf, const u8 *a, int n){ return iOff; } -#endif /* SQLITE_TEST */ +#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */ -#ifdef SQLITE_TEST +#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG) /* ** This function is part of the fts5_decode() debugging function. It is ** only ever used with detail=none tables. @@ -235547,9 +242345,9 @@ static void fts5DecodeRowidList( sqlite3Fts5BufferAppendPrintf(pRc, pBuf, " %lld%s", iRowid, zApp); } } -#endif /* SQLITE_TEST */ +#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */ -#ifdef SQLITE_TEST +#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG) /* ** The implementation of user-defined scalar function fts5_decode(). */ @@ -235560,6 +242358,7 @@ static void fts5DecodeFunction( ){ i64 iRowid; /* Rowid for record being decoded */ int iSegid,iHeight,iPgno,bDlidx;/* Rowid components */ + int bTomb; const u8 *aBlob; int n; /* Record to decode */ u8 *a = 0; Fts5Buffer s; /* Build up text to return here */ @@ -235582,7 +242381,7 @@ static void fts5DecodeFunction( if( a==0 ) goto decode_out; if( n>0 ) memcpy(a, aBlob, n); - fts5DecodeRowid(iRowid, &iSegid, &bDlidx, &iHeight, &iPgno); + fts5DecodeRowid(iRowid, &bTomb, &iSegid, &bDlidx, &iHeight, &iPgno); fts5DebugRowid(&rc, &s, iRowid); if( bDlidx ){ @@ -235601,6 +242400,28 @@ static void fts5DecodeFunction( " %d(%lld)", lvl.iLeafPgno, lvl.iRowid ); } + }else if( bTomb ){ + u32 nElem = fts5GetU32(&a[4]); + int szKey = (aBlob[0]==4 || aBlob[0]==8) ? aBlob[0] : 8; + int nSlot = (n - 8) / szKey; + int ii; + sqlite3Fts5BufferAppendPrintf(&rc, &s, " nElem=%d", (int)nElem); + if( aBlob[1] ){ + sqlite3Fts5BufferAppendPrintf(&rc, &s, " 0"); + } + for(ii=0; iiszLeaf ){ + rc = FTS5_CORRUPT; + }else{ + fts5DecodeRowidList(&rc, &s, &a[iOff], iTermOff-iOff); + } iOff = iTermOff; if( iOffestimatedCost = (double)100; + pIdxInfo->estimatedRows = 100; + pIdxInfo->idxNum = 0; + for(i=0, p=pIdxInfo->aConstraint; inConstraint; i++, p++){ + if( p->usable==0 ) continue; + if( p->op==SQLITE_INDEX_CONSTRAINT_EQ && p->iColumn==11 ){ + rc = SQLITE_OK; + pIdxInfo->aConstraintUsage[i].omit = 1; + pIdxInfo->aConstraintUsage[i].argvIndex = 1; + break; + } + } + return rc; +} + +/* +** This method is the destructor for bytecodevtab objects. +*/ +static int fts5structDisconnectMethod(sqlite3_vtab *pVtab){ + Fts5StructVtab *p = (Fts5StructVtab*)pVtab; + sqlite3_free(p); + return SQLITE_OK; +} + +/* +** Constructor for a new bytecodevtab_cursor object. +*/ +static int fts5structOpenMethod(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCsr){ + int rc = SQLITE_OK; + Fts5StructVcsr *pNew = 0; + + pNew = sqlite3Fts5MallocZero(&rc, sizeof(*pNew)); + *ppCsr = (sqlite3_vtab_cursor*)pNew; + + return SQLITE_OK; +} + +/* +** Destructor for a bytecodevtab_cursor. +*/ +static int fts5structCloseMethod(sqlite3_vtab_cursor *cur){ + Fts5StructVcsr *pCsr = (Fts5StructVcsr*)cur; + fts5StructureRelease(pCsr->pStruct); + sqlite3_free(pCsr); + return SQLITE_OK; +} + + +/* +** Advance a bytecodevtab_cursor to its next row of output. +*/ +static int fts5structNextMethod(sqlite3_vtab_cursor *cur){ + Fts5StructVcsr *pCsr = (Fts5StructVcsr*)cur; + Fts5Structure *p = pCsr->pStruct; + + assert( pCsr->pStruct ); + pCsr->iSeg++; + pCsr->iRowid++; + while( pCsr->iLevelnLevel && pCsr->iSeg>=p->aLevel[pCsr->iLevel].nSeg ){ + pCsr->iLevel++; + pCsr->iSeg = 0; + } + if( pCsr->iLevel>=p->nLevel ){ + fts5StructureRelease(pCsr->pStruct); + pCsr->pStruct = 0; + } + return SQLITE_OK; +} + +/* +** Return TRUE if the cursor has been moved off of the last +** row of output. +*/ +static int fts5structEofMethod(sqlite3_vtab_cursor *cur){ + Fts5StructVcsr *pCsr = (Fts5StructVcsr*)cur; + return pCsr->pStruct==0; +} + +static int fts5structRowidMethod( + sqlite3_vtab_cursor *cur, + sqlite_int64 *piRowid +){ + Fts5StructVcsr *pCsr = (Fts5StructVcsr*)cur; + *piRowid = pCsr->iRowid; + return SQLITE_OK; +} + +/* +** Return values of columns for the row at which the bytecodevtab_cursor +** is currently pointing. +*/ +static int fts5structColumnMethod( + sqlite3_vtab_cursor *cur, /* The cursor */ + sqlite3_context *ctx, /* First argument to sqlite3_result_...() */ + int i /* Which column to return */ +){ + Fts5StructVcsr *pCsr = (Fts5StructVcsr*)cur; + Fts5Structure *p = pCsr->pStruct; + Fts5StructureSegment *pSeg = &p->aLevel[pCsr->iLevel].aSeg[pCsr->iSeg]; + + switch( i ){ + case 0: /* level */ + sqlite3_result_int(ctx, pCsr->iLevel); + break; + case 1: /* segment */ + sqlite3_result_int(ctx, pCsr->iSeg); + break; + case 2: /* merge */ + sqlite3_result_int(ctx, pCsr->iSeg < p->aLevel[pCsr->iLevel].nMerge); + break; + case 3: /* segid */ + sqlite3_result_int(ctx, pSeg->iSegid); + break; + case 4: /* leaf1 */ + sqlite3_result_int(ctx, pSeg->pgnoFirst); + break; + case 5: /* leaf2 */ + sqlite3_result_int(ctx, pSeg->pgnoLast); + break; + case 6: /* origin1 */ + sqlite3_result_int64(ctx, pSeg->iOrigin1); + break; + case 7: /* origin2 */ + sqlite3_result_int64(ctx, pSeg->iOrigin2); + break; + case 8: /* npgtombstone */ + sqlite3_result_int(ctx, pSeg->nPgTombstone); + break; + case 9: /* nentrytombstone */ + sqlite3_result_int64(ctx, pSeg->nEntryTombstone); + break; + case 10: /* nentry */ + sqlite3_result_int64(ctx, pSeg->nEntry); + break; + } + return SQLITE_OK; +} + +/* +** Initialize a cursor. +** +** idxNum==0 means show all subprograms +** idxNum==1 means show only the main bytecode and omit subprograms. +*/ +static int fts5structFilterMethod( + sqlite3_vtab_cursor *pVtabCursor, + int idxNum, const char *idxStr, + int argc, sqlite3_value **argv +){ + Fts5StructVcsr *pCsr = (Fts5StructVcsr *)pVtabCursor; + int rc = SQLITE_OK; + + const u8 *aBlob = 0; + int nBlob = 0; + + assert( argc==1 ); + fts5StructureRelease(pCsr->pStruct); + pCsr->pStruct = 0; + + nBlob = sqlite3_value_bytes(argv[0]); + aBlob = (const u8*)sqlite3_value_blob(argv[0]); + rc = fts5StructureDecode(aBlob, nBlob, 0, &pCsr->pStruct); + if( rc==SQLITE_OK ){ + pCsr->iLevel = 0; + pCsr->iRowid = 0; + pCsr->iSeg = -1; + rc = fts5structNextMethod(pVtabCursor); + } + + return rc; +} + +#endif /* SQLITE_TEST || SQLITE_FTS5_DEBUG */ /* ** This is called as part of registering the FTS5 module with database @@ -235805,7 +242857,7 @@ static void fts5RowidFunction( ** SQLite error code is returned instead. */ static int sqlite3Fts5IndexInit(sqlite3 *db){ -#ifdef SQLITE_TEST +#if defined(SQLITE_TEST) || defined(SQLITE_FTS5_DEBUG) int rc = sqlite3_create_function( db, "fts5_decode", 2, SQLITE_UTF8, 0, fts5DecodeFunction, 0, 0 ); @@ -235822,6 +242874,36 @@ static int sqlite3Fts5IndexInit(sqlite3 *db){ db, "fts5_rowid", -1, SQLITE_UTF8, 0, fts5RowidFunction, 0, 0 ); } + + if( rc==SQLITE_OK ){ + static const sqlite3_module fts5structure_module = { + 0, /* iVersion */ + 0, /* xCreate */ + fts5structConnectMethod, /* xConnect */ + fts5structBestIndexMethod, /* xBestIndex */ + fts5structDisconnectMethod, /* xDisconnect */ + 0, /* xDestroy */ + fts5structOpenMethod, /* xOpen */ + fts5structCloseMethod, /* xClose */ + fts5structFilterMethod, /* xFilter */ + fts5structNextMethod, /* xNext */ + fts5structEofMethod, /* xEof */ + fts5structColumnMethod, /* xColumn */ + fts5structRowidMethod, /* xRowid */ + 0, /* xUpdate */ + 0, /* xBegin */ + 0, /* xSync */ + 0, /* xCommit */ + 0, /* xRollback */ + 0, /* xFindFunction */ + 0, /* xRename */ + 0, /* xSavepoint */ + 0, /* xRelease */ + 0, /* xRollbackTo */ + 0 /* xShadowName */ + }; + rc = sqlite3_create_module(db, "fts5_structure", &fts5structure_module, 0); + } return rc; #else return SQLITE_OK; @@ -237463,6 +244545,7 @@ static int fts5UpdateMethod( Fts5Config *pConfig = pTab->p.pConfig; int eType0; /* value_type() of apVal[0] */ int rc = SQLITE_OK; /* Return code */ + int bUpdateOrDelete = 0; /* A transaction must be open when this is called. */ assert( pTab->ts.eState==1 || pTab->ts.eState==2 ); @@ -237473,6 +244556,11 @@ static int fts5UpdateMethod( || sqlite3_value_type(apVal[0])==SQLITE_NULL ); assert( pTab->p.pConfig->pzErrmsg==0 ); + if( pConfig->pgsz==0 ){ + rc = sqlite3Fts5IndexLoadConfig(pTab->p.pIndex); + if( rc!=SQLITE_OK ) return rc; + } + pTab->p.pConfig->pzErrmsg = &pTab->p.base.zErrMsg; /* Put any active cursors into REQUIRE_SEEK state. */ @@ -237487,7 +244575,14 @@ static int fts5UpdateMethod( if( pConfig->eContent!=FTS5_CONTENT_NORMAL && 0==sqlite3_stricmp("delete", z) ){ - rc = fts5SpecialDelete(pTab, apVal); + if( pConfig->bContentlessDelete ){ + fts5SetVtabError(pTab, + "'delete' may not be used with a contentless_delete=1 table" + ); + rc = SQLITE_ERROR; + }else{ + rc = fts5SpecialDelete(pTab, apVal); + } }else{ rc = fts5SpecialInsert(pTab, z, apVal[2 + pConfig->nCol + 1]); } @@ -237504,7 +244599,7 @@ static int fts5UpdateMethod( ** Cases 3 and 4 may violate the rowid constraint. */ int eConflict = SQLITE_ABORT; - if( pConfig->eContent==FTS5_CONTENT_NORMAL ){ + if( pConfig->eContent==FTS5_CONTENT_NORMAL || pConfig->bContentlessDelete ){ eConflict = sqlite3_vtab_on_conflict(pConfig->db); } @@ -237512,8 +244607,12 @@ static int fts5UpdateMethod( assert( nArg!=1 || eType0==SQLITE_INTEGER ); /* Filter out attempts to run UPDATE or DELETE on contentless tables. - ** This is not suported. */ - if( eType0==SQLITE_INTEGER && fts5IsContentless(pTab) ){ + ** This is not suported. Except - DELETE is supported if the CREATE + ** VIRTUAL TABLE statement contained "contentless_delete=1". */ + if( eType0==SQLITE_INTEGER + && pConfig->eContent==FTS5_CONTENT_NONE + && pConfig->bContentlessDelete==0 + ){ pTab->p.base.zErrMsg = sqlite3_mprintf( "cannot %s contentless fts5 table: %s", (nArg>1 ? "UPDATE" : "DELETE from"), pConfig->zName @@ -237525,6 +244624,7 @@ static int fts5UpdateMethod( else if( nArg==1 ){ i64 iDel = sqlite3_value_int64(apVal[0]); /* Rowid to delete */ rc = sqlite3Fts5StorageDelete(pTab->pStorage, iDel, 0); + bUpdateOrDelete = 1; } /* INSERT or UPDATE */ @@ -237540,6 +244640,7 @@ static int fts5UpdateMethod( if( eConflict==SQLITE_REPLACE && eType1==SQLITE_INTEGER ){ i64 iNew = sqlite3_value_int64(apVal[1]); /* Rowid to delete */ rc = sqlite3Fts5StorageDelete(pTab->pStorage, iNew, 0); + bUpdateOrDelete = 1; } fts5StorageInsert(&rc, pTab, apVal, pRowid); } @@ -237568,10 +244669,24 @@ static int fts5UpdateMethod( rc = sqlite3Fts5StorageDelete(pTab->pStorage, iOld, 0); fts5StorageInsert(&rc, pTab, apVal, pRowid); } + bUpdateOrDelete = 1; } } } + if( rc==SQLITE_OK + && bUpdateOrDelete + && pConfig->bSecureDelete + && pConfig->iVersion==FTS5_CURRENT_VERSION + ){ + rc = sqlite3Fts5StorageConfigValue( + pTab->pStorage, "version", 0, FTS5_CURRENT_VERSION_SECUREDELETE + ); + if( rc==SQLITE_OK ){ + pConfig->iVersion = FTS5_CURRENT_VERSION_SECUREDELETE; + } + } + pTab->p.pConfig->pzErrmsg = 0; return rc; } @@ -237584,8 +244699,7 @@ static int fts5SyncMethod(sqlite3_vtab *pVtab){ Fts5FullTable *pTab = (Fts5FullTable*)pVtab; fts5CheckTransactionState(pTab, FTS5_SYNC, 0); pTab->p.pConfig->pzErrmsg = &pTab->p.base.zErrMsg; - fts5TripCursors(pTab); - rc = sqlite3Fts5StorageSync(pTab->pStorage); + rc = sqlite3Fts5FlushToDisk(&pTab->p); pTab->p.pConfig->pzErrmsg = 0; return rc; } @@ -238352,6 +245466,12 @@ static int fts5ColumnMethod( sqlite3_result_value(pCtx, sqlite3_column_value(pCsr->pStmt, iCol+1)); } pConfig->pzErrmsg = 0; + }else if( pConfig->bContentlessDelete && sqlite3_vtab_nochange(pCtx) ){ + char *zErr = sqlite3_mprintf("cannot UPDATE a subset of " + "columns on fts5 contentless-delete table: %s", pConfig->zName + ); + sqlite3_result_error(pCtx, zErr, -1); + sqlite3_free(zErr); } return rc; } @@ -238431,6 +245551,7 @@ static int fts5RollbackToMethod(sqlite3_vtab *pVtab, int iSavepoint){ UNUSED_PARAM(iSavepoint); /* Call below is a no-op for NDEBUG builds */ fts5CheckTransactionState(pTab, FTS5_ROLLBACKTO, iSavepoint); fts5TripCursors(pTab); + pTab->p.pConfig->pgsz = 0; return sqlite3Fts5StorageRollback(pTab->pStorage); } @@ -238633,7 +245754,7 @@ static void fts5SourceIdFunc( ){ assert( nArg==0 ); UNUSED_PARAM2(nArg, apUnused); - sqlite3_result_text(pCtx, "fts5: 2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24", -1, SQLITE_TRANSIENT); + sqlite3_result_text(pCtx, "fts5: 2023-09-11 12:01:27 2d3a40c05c49e1a49264912b1a05bc2143ac0e7c3df588276ce80a4cbc9bd1b0", -1, SQLITE_TRANSIENT); } /* @@ -238706,7 +245827,9 @@ static int fts5Init(sqlite3 *db){ } if( rc==SQLITE_OK ){ rc = sqlite3_create_function( - db, "fts5_source_id", 0, SQLITE_UTF8, p, fts5SourceIdFunc, 0, 0 + db, "fts5_source_id", 0, + SQLITE_UTF8|SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS, + p, fts5SourceIdFunc, 0, 0 ); } } @@ -238844,10 +245967,10 @@ static int fts5StorageGetStmt( "INSERT INTO %Q.'%q_content' VALUES(%s)", /* INSERT_CONTENT */ "REPLACE INTO %Q.'%q_content' VALUES(%s)", /* REPLACE_CONTENT */ "DELETE FROM %Q.'%q_content' WHERE id=?", /* DELETE_CONTENT */ - "REPLACE INTO %Q.'%q_docsize' VALUES(?,?)", /* REPLACE_DOCSIZE */ + "REPLACE INTO %Q.'%q_docsize' VALUES(?,?%s)", /* REPLACE_DOCSIZE */ "DELETE FROM %Q.'%q_docsize' WHERE id=?", /* DELETE_DOCSIZE */ - "SELECT sz FROM %Q.'%q_docsize' WHERE id=?", /* LOOKUP_DOCSIZE */ + "SELECT sz%s FROM %Q.'%q_docsize' WHERE id=?", /* LOOKUP_DOCSIZE */ "REPLACE INTO %Q.'%q_config' VALUES(?,?)", /* REPLACE_CONFIG */ "SELECT %s FROM %s AS T", /* SCAN */ @@ -238895,6 +246018,19 @@ static int fts5StorageGetStmt( break; } + case FTS5_STMT_REPLACE_DOCSIZE: + zSql = sqlite3_mprintf(azStmt[eStmt], pC->zDb, pC->zName, + (pC->bContentlessDelete ? ",?" : "") + ); + break; + + case FTS5_STMT_LOOKUP_DOCSIZE: + zSql = sqlite3_mprintf(azStmt[eStmt], + (pC->bContentlessDelete ? ",origin" : ""), + pC->zDb, pC->zName + ); + break; + default: zSql = sqlite3_mprintf(azStmt[eStmt], pC->zDb, pC->zName); break; @@ -239084,9 +246220,11 @@ static int sqlite3Fts5StorageOpen( } if( rc==SQLITE_OK && pConfig->bColumnsize ){ - rc = sqlite3Fts5CreateTable( - pConfig, "docsize", "id INTEGER PRIMARY KEY, sz BLOB", 0, pzErr - ); + const char *zCols = "id INTEGER PRIMARY KEY, sz BLOB"; + if( pConfig->bContentlessDelete ){ + zCols = "id INTEGER PRIMARY KEY, sz BLOB, origin INTEGER"; + } + rc = sqlite3Fts5CreateTable(pConfig, "docsize", zCols, 0, pzErr); } if( rc==SQLITE_OK ){ rc = sqlite3Fts5CreateTable( @@ -239163,7 +246301,7 @@ static int fts5StorageDeleteFromIndex( ){ Fts5Config *pConfig = p->pConfig; sqlite3_stmt *pSeek = 0; /* SELECT to read row iDel from %_data */ - int rc; /* Return code */ + int rc = SQLITE_OK; /* Return code */ int rc2; /* sqlite3_reset() return code */ int iCol; Fts5InsertCtx ctx; @@ -239179,7 +246317,6 @@ static int fts5StorageDeleteFromIndex( ctx.pStorage = p; ctx.iCol = -1; - rc = sqlite3Fts5IndexBeginWrite(p->pIndex, 1, iDel); for(iCol=1; rc==SQLITE_OK && iCol<=pConfig->nCol; iCol++){ if( pConfig->abUnindexed[iCol-1]==0 ){ const char *zText; @@ -239216,6 +246353,37 @@ static int fts5StorageDeleteFromIndex( return rc; } +/* +** This function is called to process a DELETE on a contentless_delete=1 +** table. It adds the tombstone required to delete the entry with rowid +** iDel. If successful, SQLITE_OK is returned. Or, if an error occurs, +** an SQLite error code. +*/ +static int fts5StorageContentlessDelete(Fts5Storage *p, i64 iDel){ + i64 iOrigin = 0; + sqlite3_stmt *pLookup = 0; + int rc = SQLITE_OK; + + assert( p->pConfig->bContentlessDelete ); + assert( p->pConfig->eContent==FTS5_CONTENT_NONE ); + + /* Look up the origin of the document in the %_docsize table. Store + ** this in stack variable iOrigin. */ + rc = fts5StorageGetStmt(p, FTS5_STMT_LOOKUP_DOCSIZE, &pLookup, 0); + if( rc==SQLITE_OK ){ + sqlite3_bind_int64(pLookup, 1, iDel); + if( SQLITE_ROW==sqlite3_step(pLookup) ){ + iOrigin = sqlite3_column_int64(pLookup, 1); + } + rc = sqlite3_reset(pLookup); + } + + if( rc==SQLITE_OK && iOrigin!=0 ){ + rc = sqlite3Fts5IndexContentlessDelete(p->pIndex, iOrigin, iDel); + } + + return rc; +} /* ** Insert a record into the %_docsize table. Specifically, do: @@ -239236,10 +246404,17 @@ static int fts5StorageInsertDocsize( rc = fts5StorageGetStmt(p, FTS5_STMT_REPLACE_DOCSIZE, &pReplace, 0); if( rc==SQLITE_OK ){ sqlite3_bind_int64(pReplace, 1, iRowid); - sqlite3_bind_blob(pReplace, 2, pBuf->p, pBuf->n, SQLITE_STATIC); - sqlite3_step(pReplace); - rc = sqlite3_reset(pReplace); - sqlite3_bind_null(pReplace, 2); + if( p->pConfig->bContentlessDelete ){ + i64 iOrigin = 0; + rc = sqlite3Fts5IndexGetOrigin(p->pIndex, &iOrigin); + sqlite3_bind_int64(pReplace, 3, iOrigin); + } + if( rc==SQLITE_OK ){ + sqlite3_bind_blob(pReplace, 2, pBuf->p, pBuf->n, SQLITE_STATIC); + sqlite3_step(pReplace); + rc = sqlite3_reset(pReplace); + sqlite3_bind_null(pReplace, 2); + } } } return rc; @@ -239303,7 +246478,15 @@ static int sqlite3Fts5StorageDelete(Fts5Storage *p, i64 iDel, sqlite3_value **ap /* Delete the index records */ if( rc==SQLITE_OK ){ - rc = fts5StorageDeleteFromIndex(p, iDel, apVal); + rc = sqlite3Fts5IndexBeginWrite(p->pIndex, 1, iDel); + } + + if( rc==SQLITE_OK ){ + if( p->pConfig->bContentlessDelete ){ + rc = fts5StorageContentlessDelete(p, iDel); + }else{ + rc = fts5StorageDeleteFromIndex(p, iDel, apVal); + } } /* Delete the %_docsize record */ @@ -243371,6 +250554,10 @@ static int stmtConnect( #define STMT_COLUMN_MEM 10 /* SQLITE_STMTSTATUS_MEMUSED */ + (void)pAux; + (void)argc; + (void)argv; + (void)pzErr; rc = sqlite3_declare_vtab(db, "CREATE TABLE x(sql,ncol,ro,busy,nscan,nsort,naidx,nstep," "reprep,run,mem)"); @@ -243490,6 +250677,10 @@ static int stmtFilter( sqlite3_int64 iRowid = 1; StmtRow **ppRow = 0; + (void)idxNum; + (void)idxStr; + (void)argc; + (void)argv; stmtCsrReset(pCur); ppRow = &pCur->pRow; for(p=sqlite3_next_stmt(pCur->db, 0); p; p=sqlite3_next_stmt(pCur->db, p)){ @@ -243545,6 +250736,7 @@ static int stmtBestIndex( sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo ){ + (void)tab; pIdxInfo->estimatedCost = (double)500; pIdxInfo->estimatedRows = 500; return SQLITE_OK; diff --git a/src/sqlite/SQLite-3.40.1/sqlite3.h b/src/sqlite/SQLite-3.43.1/sqlite3.h similarity index 96% rename from src/sqlite/SQLite-3.40.1/sqlite3.h rename to src/sqlite/SQLite-3.43.1/sqlite3.h index 24b916750..b9d069298 100644 --- a/src/sqlite/SQLite-3.40.1/sqlite3.h +++ b/src/sqlite/SQLite-3.43.1/sqlite3.h @@ -146,9 +146,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.40.1" -#define SQLITE_VERSION_NUMBER 3040001 -#define SQLITE_SOURCE_ID "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" +#define SQLITE_VERSION "3.43.1" +#define SQLITE_VERSION_NUMBER 3043001 +#define SQLITE_SOURCE_ID "2023-09-11 12:01:27 2d3a40c05c49e1a49264912b1a05bc2143ac0e7c3df588276ce80a4cbc9bd1b0" /* ** CAPI3REF: Run-Time Library Version Numbers @@ -528,6 +528,7 @@ SQLITE_API int sqlite3_exec( #define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31<<8)) #define SQLITE_IOERR_DATA (SQLITE_IOERR | (32<<8)) #define SQLITE_IOERR_CORRUPTFS (SQLITE_IOERR | (33<<8)) +#define SQLITE_IOERR_IN_PAGE (SQLITE_IOERR | (34<<8)) #define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8)) #define SQLITE_LOCKED_VTAB (SQLITE_LOCKED | (2<<8)) #define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8)) @@ -563,6 +564,7 @@ SQLITE_API int sqlite3_exec( #define SQLITE_CONSTRAINT_DATATYPE (SQLITE_CONSTRAINT |(12<<8)) #define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8)) #define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8)) +#define SQLITE_NOTICE_RBU (SQLITE_NOTICE | (3<<8)) #define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8)) #define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8)) #define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1<<8)) @@ -1175,7 +1177,6 @@ struct sqlite3_io_methods { ** in wal mode after the client has finished copying pages from the wal ** file to the database file, but before the *-shm file is updated to ** record the fact that the pages have been checkpointed. -** ** **
  • [[SQLITE_FCNTL_EXTERNAL_READER]] ** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect @@ -1188,16 +1189,16 @@ struct sqlite3_io_methods { ** the database is not a wal-mode db, or if there is no such connection in any ** other process. This opcode cannot be used to detect transactions opened ** by clients within the current process, only within other processes. -** ** **
  • [[SQLITE_FCNTL_CKSM_FILE]] -** Used by the cksmvfs VFS module only. +** The [SQLITE_FCNTL_CKSM_FILE] opcode is for use internally by the +** [checksum VFS shim] only. ** **
  • [[SQLITE_FCNTL_RESET_CACHE]] ** If there is currently no transaction open on the database, and the -** database is not a temp db, then this file-control purges the contents -** of the in-memory page cache. If there is an open transaction, or if -** the db is a temp-db, it is a no-op, not an error. +** database is not a temp db, then the [SQLITE_FCNTL_RESET_CACHE] file-control +** purges the contents of the in-memory page cache. If there is an open +** transaction, or if the db is a temp-db, this opcode is a no-op, not an error. ** */ #define SQLITE_FCNTL_LOCKSTATE 1 @@ -1655,20 +1656,23 @@ SQLITE_API int sqlite3_os_end(void); ** must ensure that no other SQLite interfaces are invoked by other ** threads while sqlite3_config() is running. ** -** The sqlite3_config() interface -** may only be invoked prior to library initialization using -** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. -** ^If sqlite3_config() is called after [sqlite3_initialize()] and before -** [sqlite3_shutdown()] then it will return SQLITE_MISUSE. -** Note, however, that ^sqlite3_config() can be called as part of the -** implementation of an application-defined [sqlite3_os_init()]. -** ** The first argument to sqlite3_config() is an integer ** [configuration option] that determines ** what property of SQLite is to be configured. Subsequent arguments ** vary depending on the [configuration option] ** in the first argument. ** +** For most configuration options, the sqlite3_config() interface +** may only be invoked prior to library initialization using +** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. +** The exceptional configuration options that may be invoked at any time +** are called "anytime configuration options". +** ^If sqlite3_config() is called after [sqlite3_initialize()] and before +** [sqlite3_shutdown()] with a first argument that is not an anytime +** configuration option, then the sqlite3_config() call will return SQLITE_MISUSE. +** Note, however, that ^sqlite3_config() can be called as part of the +** implementation of an application-defined [sqlite3_os_init()]. +** ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. ** ^If the option is unknown or SQLite is unable to set the option ** then this routine returns a non-zero [error code]. @@ -1776,6 +1780,23 @@ struct sqlite3_mem_methods { ** These constants are the available integer configuration options that ** can be passed as the first argument to the [sqlite3_config()] interface. ** +** Most of the configuration options for sqlite3_config() +** will only work if invoked prior to [sqlite3_initialize()] or after +** [sqlite3_shutdown()]. The few exceptions to this rule are called +** "anytime configuration options". +** ^Calling [sqlite3_config()] with a first argument that is not an +** anytime configuration option in between calls to [sqlite3_initialize()] and +** [sqlite3_shutdown()] is a no-op that returns SQLITE_MISUSE. +** +** The set of anytime configuration options can change (by insertions +** and/or deletions) from one release of SQLite to the next. +** As of SQLite version 3.42.0, the complete set of anytime configuration +** options is: +**
      +**
    • SQLITE_CONFIG_LOG +**
    • SQLITE_CONFIG_PCACHE_HDRSZ +**
    +** ** New configuration options may be added in future releases of SQLite. ** Existing configuration options might be discontinued. Applications ** should check the return code from [sqlite3_config()] to make sure that @@ -2122,28 +2143,28 @@ struct sqlite3_mem_methods { ** compile-time option is not set, then the default maximum is 1073741824. ** */ -#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ -#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */ -#define SQLITE_CONFIG_SERIALIZED 3 /* nil */ -#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */ -#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */ -#define SQLITE_CONFIG_SCRATCH 6 /* No longer used */ -#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */ -#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */ -#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */ -#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */ -#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */ -/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ -#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ -#define SQLITE_CONFIG_PCACHE 14 /* no-op */ -#define SQLITE_CONFIG_GETPCACHE 15 /* no-op */ -#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */ -#define SQLITE_CONFIG_URI 17 /* int */ -#define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */ -#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */ +#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ +#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */ +#define SQLITE_CONFIG_SERIALIZED 3 /* nil */ +#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */ +#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */ +#define SQLITE_CONFIG_SCRATCH 6 /* No longer used */ +#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */ +#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */ +#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */ +#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */ +#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */ +/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ +#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ +#define SQLITE_CONFIG_PCACHE 14 /* no-op */ +#define SQLITE_CONFIG_GETPCACHE 15 /* no-op */ +#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */ +#define SQLITE_CONFIG_URI 17 /* int */ +#define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */ +#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */ #define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */ -#define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */ -#define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */ +#define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */ +#define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */ #define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */ #define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */ #define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */ @@ -2184,7 +2205,7 @@ struct sqlite3_mem_methods { ** configuration for a database connection can only be changed when that ** connection is not currently using lookaside memory, or in other words ** when the "current value" returned by -** [sqlite3_db_status](D,[SQLITE_CONFIG_LOOKASIDE],...) is zero. +** [sqlite3_db_status](D,[SQLITE_DBSTATUS_LOOKASIDE_USED],...) is zero. ** Any attempt to change the lookaside memory configuration when lookaside ** memory is in use leaves the configuration unchanged and returns ** [SQLITE_BUSY].)^ @@ -2334,8 +2355,12 @@ struct sqlite3_mem_methods { **
  • sqlite3_db_config(db, SQLITE_DBCONFIG_RESET_DATABASE, 0, 0); ** ** Because resetting a database is destructive and irreversible, the -** process requires the use of this obscure API and multiple steps to help -** ensure that it does not happen by accident. +** process requires the use of this obscure API and multiple steps to +** help ensure that it does not happen by accident. Because this +** feature must be capable of resetting corrupt databases, and +** shutting down virtual tables may require access to that corrupt +** storage, the library must abandon any installed virtual tables +** without calling their xDestroy() methods. ** ** [[SQLITE_DBCONFIG_DEFENSIVE]]
    SQLITE_DBCONFIG_DEFENSIVE
    **
    The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the @@ -2374,7 +2399,7 @@ struct sqlite3_mem_methods { **
    ** ** [[SQLITE_DBCONFIG_DQS_DML]] -**
    SQLITE_DBCONFIG_DQS_DML +**
    SQLITE_DBCONFIG_DQS_DML
    **
    The SQLITE_DBCONFIG_DQS_DML option activates or deactivates ** the legacy [double-quoted string literal] misfeature for DML statements ** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The @@ -2383,7 +2408,7 @@ struct sqlite3_mem_methods { **
    ** ** [[SQLITE_DBCONFIG_DQS_DDL]] -**
    SQLITE_DBCONFIG_DQS_DDL +**
    SQLITE_DBCONFIG_DQS_DDL
    **
    The SQLITE_DBCONFIG_DQS option activates or deactivates ** the legacy [double-quoted string literal] misfeature for DDL statements, ** such as CREATE TABLE and CREATE INDEX. The @@ -2392,7 +2417,7 @@ struct sqlite3_mem_methods { **
    ** ** [[SQLITE_DBCONFIG_TRUSTED_SCHEMA]] -**
    SQLITE_DBCONFIG_TRUSTED_SCHEMA +**
    SQLITE_DBCONFIG_TRUSTED_SCHEMA
    **
    The SQLITE_DBCONFIG_TRUSTED_SCHEMA option tells SQLite to ** assume that database schemas are untainted by malicious content. ** When the SQLITE_DBCONFIG_TRUSTED_SCHEMA option is disabled, SQLite @@ -2412,7 +2437,7 @@ struct sqlite3_mem_methods { **
    ** ** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]] -**
    SQLITE_DBCONFIG_LEGACY_FILE_FORMAT +**
    SQLITE_DBCONFIG_LEGACY_FILE_FORMAT
    **
    The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates ** the legacy file format flag. When activated, this flag causes all newly ** created database file to have a schema format version number (the 4-byte @@ -2421,7 +2446,7 @@ struct sqlite3_mem_methods { ** any SQLite version back to 3.0.0 ([dateof:3.0.0]). Without this setting, ** newly created databases are generally not understandable by SQLite versions ** prior to 3.3.0 ([dateof:3.3.0]). As these words are written, there -** is now scarcely any need to generated database files that are compatible +** is now scarcely any need to generate database files that are compatible ** all the way back to version 3.0.0, and so this setting is of little ** practical use, but is provided so that SQLite can continue to claim the ** ability to generate new database files that are compatible with version @@ -2430,8 +2455,40 @@ struct sqlite3_mem_methods { ** the [VACUUM] command will fail with an obscure error when attempting to ** process a table with generated columns and a descending index. This is ** not considered a bug since SQLite versions 3.3.0 and earlier do not support -** either generated columns or decending indexes. +** either generated columns or descending indexes. +**
    +** +** [[SQLITE_DBCONFIG_STMT_SCANSTATUS]] +**
    SQLITE_DBCONFIG_STMT_SCANSTATUS
    +**
    The SQLITE_DBCONFIG_STMT_SCANSTATUS option is only useful in +** SQLITE_ENABLE_STMT_SCANSTATUS builds. In this case, it sets or clears +** a flag that enables collection of the sqlite3_stmt_scanstatus_v2() +** statistics. For statistics to be collected, the flag must be set on +** the database handle both when the SQL statement is prepared and when it +** is stepped. The flag is set (collection of statistics is enabled) +** by default. This option takes two arguments: an integer and a pointer to +** an integer.. The first argument is 1, 0, or -1 to enable, disable, or +** leave unchanged the statement scanstatus option. If the second argument +** is not NULL, then the value of the statement scanstatus setting after +** processing the first argument is written into the integer that the second +** argument points to. +**
    +** +** [[SQLITE_DBCONFIG_REVERSE_SCANORDER]] +**
    SQLITE_DBCONFIG_REVERSE_SCANORDER
    +**
    The SQLITE_DBCONFIG_REVERSE_SCANORDER option changes the default order +** in which tables and indexes are scanned so that the scans start at the end +** and work toward the beginning rather than starting at the beginning and +** working toward the end. Setting SQLITE_DBCONFIG_REVERSE_SCANORDER is the +** same as setting [PRAGMA reverse_unordered_selects]. This option takes +** two arguments which are an integer and a pointer to an integer. The first +** argument is 1, 0, or -1 to enable, disable, or leave unchanged the +** reverse scan order flag, respectively. If the second argument is not NULL, +** then 0 or 1 is written into the integer that the second argument points to +** depending on if the reverse scan order flag is set after processing the +** first argument. **
    +** ** */ #define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */ @@ -2452,7 +2509,9 @@ struct sqlite3_mem_methods { #define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */ #define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */ #define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */ -#define SQLITE_DBCONFIG_MAX 1017 /* Largest DBCONFIG */ +#define SQLITE_DBCONFIG_STMT_SCANSTATUS 1018 /* int int* */ +#define SQLITE_DBCONFIG_REVERSE_SCANORDER 1019 /* int int* */ +#define SQLITE_DBCONFIG_MAX 1019 /* Largest DBCONFIG */ /* ** CAPI3REF: Enable Or Disable Extended Result Codes @@ -2674,8 +2733,13 @@ SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3*); ** ^A call to sqlite3_interrupt(D) that occurs when there are no running ** SQL statements is a no-op and has no effect on SQL statements ** that are started after the sqlite3_interrupt() call returns. +** +** ^The [sqlite3_is_interrupted(D)] interface can be used to determine whether +** or not an interrupt is currently in effect for [database connection] D. +** It returns 1 if an interrupt is currently in effect, or 0 otherwise. */ SQLITE_API void sqlite3_interrupt(sqlite3*); +SQLITE_API int sqlite3_is_interrupted(sqlite3*); /* ** CAPI3REF: Determine If An SQL Statement Is Complete @@ -3293,8 +3357,8 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*, **
    ^An SQLITE_TRACE_PROFILE callback provides approximately the same ** information as is provided by the [sqlite3_profile()] callback. ** ^The P argument is a pointer to the [prepared statement] and the -** X argument points to a 64-bit integer which is the estimated of -** the number of nanosecond that the prepared statement took to run. +** X argument points to a 64-bit integer which is approximately +** the number of nanoseconds that the prepared statement took to run. ** ^The SQLITE_TRACE_PROFILE callback is invoked when the statement finishes. ** ** [[SQLITE_TRACE_ROW]]
    SQLITE_TRACE_ROW
    @@ -3326,8 +3390,10 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*, ** M argument should be the bitwise OR-ed combination of ** zero or more [SQLITE_TRACE] constants. ** -** ^Each call to either sqlite3_trace() or sqlite3_trace_v2() overrides -** (cancels) any prior calls to sqlite3_trace() or sqlite3_trace_v2(). +** ^Each call to either sqlite3_trace(D,X,P) or sqlite3_trace_v2(D,M,X,P) +** overrides (cancels) all prior calls to sqlite3_trace(D,X,P) or +** sqlite3_trace_v2(D,M,X,P) for the [database connection] D. Each +** database connection may have at most one trace callback. ** ** ^The X callback is invoked whenever any of the events identified by ** mask M occur. ^The integer return value from the callback is currently @@ -3357,7 +3423,7 @@ SQLITE_API int sqlite3_trace_v2( ** ** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback ** function X to be invoked periodically during long running calls to -** [sqlite3_exec()], [sqlite3_step()] and [sqlite3_get_table()] for +** [sqlite3_step()] and [sqlite3_prepare()] and similar for ** database connection D. An example use for this ** interface is to keep a GUI updated during a large query. ** @@ -3382,6 +3448,13 @@ SQLITE_API int sqlite3_trace_v2( ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their ** database connections for the meaning of "modify" in this paragraph. ** +** The progress handler callback would originally only be invoked from the +** bytecode engine. It still might be invoked during [sqlite3_prepare()] +** and similar because those routines might force a reparse of the schema +** which involves running the bytecode engine. However, beginning with +** SQLite version 3.41.0, the progress handler callback might also be +** invoked directly from [sqlite3_prepare()] while analyzing and generating +** code for complex queries. */ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); @@ -3418,13 +3491,18 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); ** **
    ** ^(
    [SQLITE_OPEN_READONLY]
    -**
    The database is opened in read-only mode. If the database does not -** already exist, an error is returned.
    )^ +**
    The database is opened in read-only mode. If the database does +** not already exist, an error is returned.
    )^ ** ** ^(
    [SQLITE_OPEN_READWRITE]
    -**
    The database is opened for reading and writing if possible, or reading -** only if the file is write protected by the operating system. In either -** case the database must already exist, otherwise an error is returned.
    )^ +**
    The database is opened for reading and writing if possible, or +** reading only if the file is write protected by the operating +** system. In either case the database must already exist, otherwise +** an error is returned. For historical reasons, if opening in +** read-write mode fails due to OS-level permissions, an attempt is +** made to open it in read-only mode. [sqlite3_db_readonly()] can be +** used to determine whether the database is actually +** read-write.
    )^ ** ** ^(
    [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]
    **
    The database is opened for reading and writing, and is created if @@ -3684,7 +3762,7 @@ SQLITE_API int sqlite3_open_v2( ** as F) must be one of: **
      **
    • A database filename pointer created by the SQLite core and -** passed into the xOpen() method of a VFS implemention, or +** passed into the xOpen() method of a VFS implementation, or **
    • A filename obtained from [sqlite3_db_filename()], or **
    • A new filename constructed using [sqlite3_create_filename()]. **
    @@ -3797,7 +3875,7 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*); /* ** CAPI3REF: Create and Destroy VFS Filenames ** -** These interfces are provided for use by [VFS shim] implementations and +** These interfaces are provided for use by [VFS shim] implementations and ** are not useful outside of that context. ** ** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of @@ -4344,6 +4422,41 @@ SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); */ SQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt); +/* +** CAPI3REF: Change The EXPLAIN Setting For A Prepared Statement +** METHOD: sqlite3_stmt +** +** The sqlite3_stmt_explain(S,E) interface changes the EXPLAIN +** setting for [prepared statement] S. If E is zero, then S becomes +** a normal prepared statement. If E is 1, then S behaves as if +** its SQL text began with "[EXPLAIN]". If E is 2, then S behaves as if +** its SQL text began with "[EXPLAIN QUERY PLAN]". +** +** Calling sqlite3_stmt_explain(S,E) might cause S to be reprepared. +** SQLite tries to avoid a reprepare, but a reprepare might be necessary +** on the first transition into EXPLAIN or EXPLAIN QUERY PLAN mode. +** +** Because of the potential need to reprepare, a call to +** sqlite3_stmt_explain(S,E) will fail with SQLITE_ERROR if S cannot be +** reprepared because it was created using [sqlite3_prepare()] instead of +** the newer [sqlite3_prepare_v2()] or [sqlite3_prepare_v3()] interfaces and +** hence has no saved SQL text with which to reprepare. +** +** Changing the explain setting for a prepared statement does not change +** the original SQL text for the statement. Hence, if the SQL text originally +** began with EXPLAIN or EXPLAIN QUERY PLAN, but sqlite3_stmt_explain(S,0) +** is called to convert the statement into an ordinary statement, the EXPLAIN +** or EXPLAIN QUERY PLAN keywords will still appear in the sqlite3_sql(S) +** output, even though the statement now acts like a normal SQL statement. +** +** This routine returns SQLITE_OK if the explain mode is successfully +** changed, or an error code if the explain mode could not be changed. +** The explain mode cannot be changed while a statement is active. +** Hence, it is good practice to call [sqlite3_reset(S)] +** immediately prior to calling sqlite3_stmt_explain(S,E). +*/ +SQLITE_API int sqlite3_stmt_explain(sqlite3_stmt *pStmt, int eMode); + /* ** CAPI3REF: Determine If A Prepared Statement Has Been Reset ** METHOD: sqlite3_stmt @@ -4507,7 +4620,7 @@ typedef struct sqlite3_context sqlite3_context; ** with it may be passed. ^It is called to dispose of the BLOB or string even ** if the call to the bind API fails, except the destructor is not called if ** the third parameter is a NULL pointer or the fourth parameter is negative. -** ^ (2) The special constant, [SQLITE_STATIC], may be passsed to indicate that +** ^ (2) The special constant, [SQLITE_STATIC], may be passed to indicate that ** the application remains responsible for disposing of the object. ^In this ** case, the object and the provided pointer to it must remain valid until ** either the prepared statement is finalized or the same SQL parameter is @@ -5186,14 +5299,26 @@ SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); ** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S ** back to the beginning of its program. ** -** ^If the most recent call to [sqlite3_step(S)] for the -** [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE], -** or if [sqlite3_step(S)] has never before been called on S, -** then [sqlite3_reset(S)] returns [SQLITE_OK]. +** ^The return code from [sqlite3_reset(S)] indicates whether or not +** the previous evaluation of prepared statement S completed successfully. +** ^If [sqlite3_step(S)] has never before been called on S or if +** [sqlite3_step(S)] has not been called since the previous call +** to [sqlite3_reset(S)], then [sqlite3_reset(S)] will return +** [SQLITE_OK]. ** ** ^If the most recent call to [sqlite3_step(S)] for the ** [prepared statement] S indicated an error, then ** [sqlite3_reset(S)] returns an appropriate [error code]. +** ^The [sqlite3_reset(S)] interface might also return an [error code] +** if there were no prior errors but the process of resetting +** the prepared statement caused a new error. ^For example, if an +** [INSERT] statement with a [RETURNING] clause is only stepped one time, +** that one call to [sqlite3_step(S)] might return SQLITE_ROW but +** the overall statement might still fail and the [sqlite3_reset(S)] call +** might return SQLITE_BUSY if locking constraints prevent the +** database change from committing. Therefore, it is important that +** applications check the return code from [sqlite3_reset(S)] even if +** no prior call to [sqlite3_step(S)] indicated a problem. ** ** ^The [sqlite3_reset(S)] interface does not change the values ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. @@ -5405,10 +5530,21 @@ SQLITE_API int sqlite3_create_window_function( ** from top-level SQL, and cannot be used in VIEWs or TRIGGERs nor in ** schema structures such as [CHECK constraints], [DEFAULT clauses], ** [expression indexes], [partial indexes], or [generated columns]. -** The SQLITE_DIRECTONLY flags is a security feature which is recommended -** for all [application-defined SQL functions], and especially for functions -** that have side-effects or that could potentially leak sensitive -** information. +**

    +** The SQLITE_DIRECTONLY flag is recommended for any +** [application-defined SQL function] +** that has side-effects or that could potentially leak sensitive information. +** This will prevent attacks in which an application is tricked +** into using a database file that has had its schema surreptitiously +** modified to invoke the application-defined function in ways that are +** harmful. +**

    +** Some people say it is good practice to set SQLITE_DIRECTONLY on all +** [application-defined SQL functions], regardless of whether or not they +** are security sensitive, as doing so prevents those functions from being used +** inside of the database schema, and thus ensures that the database +** can be inspected and modified using generic tools (such as the [CLI]) +** that do not have access to the application-defined functions. **

    ** ** [[SQLITE_INNOCUOUS]]
    SQLITE_INNOCUOUS
    @@ -5549,16 +5685,6 @@ SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int6 ** then the conversion is performed. Otherwise no conversion occurs. ** The [SQLITE_INTEGER | datatype] after conversion is returned.)^ ** -** ^(The sqlite3_value_encoding(X) interface returns one of [SQLITE_UTF8], -** [SQLITE_UTF16BE], or [SQLITE_UTF16LE] according to the current encoding -** of the value X, assuming that X has type TEXT.)^ If sqlite3_value_type(X) -** returns something other than SQLITE_TEXT, then the return value from -** sqlite3_value_encoding(X) is meaningless. ^Calls to -** sqlite3_value_text(X), sqlite3_value_text16(X), sqlite3_value_text16be(X), -** sqlite3_value_text16le(X), sqlite3_value_bytes(X), or -** sqlite3_value_bytes16(X) might change the encoding of the value X and -** thus change the return from subsequent calls to sqlite3_value_encoding(X). -** ** ^Within the [xUpdate] method of a [virtual table], the ** sqlite3_value_nochange(X) interface returns true if and only if ** the column corresponding to X is unchanged by the UPDATE operation @@ -5623,6 +5749,27 @@ SQLITE_API int sqlite3_value_type(sqlite3_value*); SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*); SQLITE_API int sqlite3_value_nochange(sqlite3_value*); SQLITE_API int sqlite3_value_frombind(sqlite3_value*); + +/* +** CAPI3REF: Report the internal text encoding state of an sqlite3_value object +** METHOD: sqlite3_value +** +** ^(The sqlite3_value_encoding(X) interface returns one of [SQLITE_UTF8], +** [SQLITE_UTF16BE], or [SQLITE_UTF16LE] according to the current text encoding +** of the value X, assuming that X has type TEXT.)^ If sqlite3_value_type(X) +** returns something other than SQLITE_TEXT, then the return value from +** sqlite3_value_encoding(X) is meaningless. ^Calls to +** [sqlite3_value_text(X)], [sqlite3_value_text16(X)], [sqlite3_value_text16be(X)], +** [sqlite3_value_text16le(X)], [sqlite3_value_bytes(X)], or +** [sqlite3_value_bytes16(X)] might change the encoding of the value X and +** thus change the return from subsequent calls to sqlite3_value_encoding(X). +** +** This routine is intended for used by applications that test and validate +** the SQLite implementation. This routine is inquiring about the opaque +** internal state of an [sqlite3_value] object. Ordinary applications should +** not need to know what the internal state of an sqlite3_value object is and +** hence should not need to use this interface. +*/ SQLITE_API int sqlite3_value_encoding(sqlite3_value*); /* @@ -6159,6 +6306,13 @@ SQLITE_API void sqlite3_activate_cerod( ** of the default VFS is not implemented correctly, or not implemented at ** all, then the behavior of sqlite3_sleep() may deviate from the description ** in the previous paragraphs. +** +** If a negative argument is passed to sqlite3_sleep() the results vary by +** VFS and operating system. Some system treat a negative argument as an +** instruction to sleep forever. Others understand it to mean do not sleep +** at all. ^In SQLite version 3.42.0 and later, a negative +** argument passed into sqlite3_sleep() is changed to zero before it is relayed +** down into the xSleep method of the VFS. */ SQLITE_API int sqlite3_sleep(int); @@ -7003,15 +7157,6 @@ SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); */ SQLITE_API void sqlite3_reset_auto_extension(void); -/* -** The interface to the virtual-table mechanism is currently considered -** to be experimental. The interface might change in incompatible ways. -** If this is a problem for you, do not use the interface at this time. -** -** When the virtual-table mechanism stabilizes, we will declare the -** interface fixed, support it indefinitely, and remove this comment. -*/ - /* ** Structures used by the virtual table interface */ @@ -7130,10 +7275,10 @@ struct sqlite3_module { ** when the omit flag is true there is no guarantee that the constraint will ** not be checked again using byte code.)^ ** -** ^The idxNum and idxPtr values are recorded and passed into the +** ^The idxNum and idxStr values are recorded and passed into the ** [xFilter] method. -** ^[sqlite3_free()] is used to free idxPtr if and only if -** needToFreeIdxPtr is true. +** ^[sqlite3_free()] is used to free idxStr if and only if +** needToFreeIdxStr is true. ** ** ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in ** the correct order to satisfy the ORDER BY clause so that no separate @@ -7253,7 +7398,7 @@ struct sqlite3_index_info { ** the [sqlite3_vtab_collation()] interface. For most real-world virtual ** tables, the collating sequence of constraints does not matter (for example ** because the constraints are numeric) and so the sqlite3_vtab_collation() -** interface is no commonly needed. +** interface is not commonly needed. */ #define SQLITE_INDEX_CONSTRAINT_EQ 2 #define SQLITE_INDEX_CONSTRAINT_GT 4 @@ -7412,16 +7557,6 @@ SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL); */ SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); -/* -** The interface to the virtual-table mechanism defined above (back up -** to a comment remarkably similar to this one) is currently considered -** to be experimental. The interface might change in incompatible ways. -** If this is a problem for you, do not use the interface at this time. -** -** When the virtual-table mechanism stabilizes, we will declare the -** interface fixed, support it indefinitely, and remove this comment. -*/ - /* ** CAPI3REF: A Handle To An Open BLOB ** KEYWORDS: {BLOB handle} {BLOB handles} @@ -7805,9 +7940,9 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*); ** is undefined if the mutex is not currently entered by the ** calling thread or is not currently allocated. ** -** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or -** sqlite3_mutex_leave() is a NULL pointer, then all three routines -** behave as no-ops. +** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), +** sqlite3_mutex_leave(), or sqlite3_mutex_free() is a NULL pointer, +** then any of the four routines behaves as a no-op. ** ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. */ @@ -8077,7 +8212,8 @@ SQLITE_API int sqlite3_test_control(int op, ...); #define SQLITE_TESTCTRL_TRACEFLAGS 31 #define SQLITE_TESTCTRL_TUNE 32 #define SQLITE_TESTCTRL_LOGEST 33 -#define SQLITE_TESTCTRL_LAST 33 /* Largest TESTCTRL */ +#define SQLITE_TESTCTRL_USELONGDOUBLE 34 +#define SQLITE_TESTCTRL_LAST 34 /* Largest TESTCTRL */ /* ** CAPI3REF: SQL Keyword Checking @@ -9109,8 +9245,8 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p); ** blocked connection already has a registered unlock-notify callback, ** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is ** called with a NULL pointer as its second argument, then any existing -** unlock-notify callback is canceled. ^The blocked connections -** unlock-notify callback may also be canceled by closing the blocked +** unlock-notify callback is cancelled. ^The blocked connections +** unlock-notify callback may also be cancelled by closing the blocked ** connection using [sqlite3_close()]. ** ** The unlock-notify callback is not reentrant. If an application invokes @@ -9533,7 +9669,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); ** [[SQLITE_VTAB_DIRECTONLY]]
    SQLITE_VTAB_DIRECTONLY
    **
    Calls of the form ** [sqlite3_vtab_config](db,SQLITE_VTAB_DIRECTONLY) from within the -** the [xConnect] or [xCreate] methods of a [virtual table] implmentation +** the [xConnect] or [xCreate] methods of a [virtual table] implementation ** prohibits that virtual table from being used from within triggers and ** views. **
    @@ -9541,18 +9677,28 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); ** [[SQLITE_VTAB_INNOCUOUS]]
    SQLITE_VTAB_INNOCUOUS
    **
    Calls of the form ** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the -** the [xConnect] or [xCreate] methods of a [virtual table] implmentation +** the [xConnect] or [xCreate] methods of a [virtual table] implementation ** identify that virtual table as being safe to use from within triggers ** and views. Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the ** virtual table can do no serious harm even if it is controlled by a ** malicious hacker. Developers should avoid setting the SQLITE_VTAB_INNOCUOUS ** flag unless absolutely necessary. **
    +** +** [[SQLITE_VTAB_USES_ALL_SCHEMAS]]
    SQLITE_VTAB_USES_ALL_SCHEMAS
    +**
    Calls of the form +** [sqlite3_vtab_config](db,SQLITE_VTAB_USES_ALL_SCHEMA) from within the +** the [xConnect] or [xCreate] methods of a [virtual table] implementation +** instruct the query planner to begin at least a read transaction on +** all schemas ("main", "temp", and any ATTACH-ed databases) whenever the +** virtual table is used. +**
    **
    */ #define SQLITE_VTAB_CONSTRAINT_SUPPORT 1 #define SQLITE_VTAB_INNOCUOUS 2 #define SQLITE_VTAB_DIRECTONLY 3 +#define SQLITE_VTAB_USES_ALL_SCHEMAS 4 /* ** CAPI3REF: Determine The Virtual Table Conflict Policy @@ -9625,7 +9771,7 @@ SQLITE_API int sqlite3_vtab_nochange(sqlite3_context*); **
  • Otherwise, "BINARY" is returned. ** */ -SQLITE_API SQLITE_EXPERIMENTAL const char *sqlite3_vtab_collation(sqlite3_index_info*,int); +SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int); /* ** CAPI3REF: Determine if a virtual table query is DISTINCT @@ -9713,7 +9859,7 @@ SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info*); ** communicated to the xBestIndex method as a ** [SQLITE_INDEX_CONSTRAINT_EQ] constraint.)^ If xBestIndex wants to use ** this constraint, it must set the corresponding -** aConstraintUsage[].argvIndex to a postive integer. ^(Then, under +** aConstraintUsage[].argvIndex to a positive integer. ^(Then, under ** the usual mode of handling IN operators, SQLite generates [bytecode] ** that invokes the [xFilter|xFilter() method] once for each value ** on the right-hand side of the IN operator.)^ Thus the virtual table @@ -9782,21 +9928,20 @@ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle); ** is undefined and probably harmful. ** ** The X parameter in a call to sqlite3_vtab_in_first(X,P) or -** sqlite3_vtab_in_next(X,P) must be one of the parameters to the +** sqlite3_vtab_in_next(X,P) should be one of the parameters to the ** xFilter method which invokes these routines, and specifically ** a parameter that was previously selected for all-at-once IN constraint ** processing use the [sqlite3_vtab_in()] interface in the ** [xBestIndex|xBestIndex method]. ^(If the X parameter is not ** an xFilter argument that was selected for all-at-once IN constraint -** processing, then these routines return [SQLITE_MISUSE])^ or perhaps -** exhibit some other undefined or harmful behavior. +** processing, then these routines return [SQLITE_ERROR].)^ ** ** ^(Use these routines to access all values on the right-hand side ** of the IN constraint using code like the following: ** **

     **    for(rc=sqlite3_vtab_in_first(pList, &pVal);
    -**        rc==SQLITE_OK && pVal
    +**        rc==SQLITE_OK && pVal;
     **        rc=sqlite3_vtab_in_next(pList, &pVal)
     **    ){
     **      // do something with pVal
    @@ -9894,6 +10039,10 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
     ** managed by the prepared statement S and will be automatically freed when
     ** S is finalized.
     **
    +** Not all values are available for all query elements. When a value is
    +** not available, the output variable is set to -1 if the value is numeric,
    +** or to NULL if it is a string (SQLITE_SCANSTAT_NAME).
    +**
     ** 
    ** [[SQLITE_SCANSTAT_NLOOP]]
    SQLITE_SCANSTAT_NLOOP
    **
    ^The [sqlite3_int64] variable pointed to by the V parameter will be @@ -9921,12 +10070,24 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value ** ** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN] ** description for the X-th loop. ** -** [[SQLITE_SCANSTAT_SELECTID]]
    SQLITE_SCANSTAT_SELECT
    +** [[SQLITE_SCANSTAT_SELECTID]]
    SQLITE_SCANSTAT_SELECTID
    **
    ^The "int" variable pointed to by the V parameter will be set to the -** "select-id" for the X-th loop. The select-id identifies which query or -** subquery the loop is part of. The main query has a select-id of zero. -** The select-id is the same value as is output in the first column -** of an [EXPLAIN QUERY PLAN] query. +** id for the X-th query plan element. The id value is unique within the +** statement. The select-id is the same value as is output in the first +** column of an [EXPLAIN QUERY PLAN] query. +** +** [[SQLITE_SCANSTAT_PARENTID]]
    SQLITE_SCANSTAT_PARENTID
    +**
    The "int" variable pointed to by the V parameter will be set to the +** the id of the parent of the current query element, if applicable, or +** to zero if the query element has no parent. This is the same value as +** returned in the second column of an [EXPLAIN QUERY PLAN] query. +** +** [[SQLITE_SCANSTAT_NCYCLE]]
    SQLITE_SCANSTAT_NCYCLE
    +**
    The sqlite3_int64 output value is set to the number of cycles, +** according to the processor time-stamp counter, that elapsed while the +** query element was being processed. This value is not available for +** all query elements - if it is unavailable the output variable is +** set to -1. **
    */ #define SQLITE_SCANSTAT_NLOOP 0 @@ -9935,12 +10096,14 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value ** #define SQLITE_SCANSTAT_NAME 3 #define SQLITE_SCANSTAT_EXPLAIN 4 #define SQLITE_SCANSTAT_SELECTID 5 +#define SQLITE_SCANSTAT_PARENTID 6 +#define SQLITE_SCANSTAT_NCYCLE 7 /* ** CAPI3REF: Prepared Statement Scan Status ** METHOD: sqlite3_stmt ** -** This interface returns information about the predicted and measured +** These interfaces return information about the predicted and measured ** performance for pStmt. Advanced applications can use this ** interface to compare the predicted and the measured performance and ** issue warnings and/or rerun [ANALYZE] if discrepancies are found. @@ -9951,19 +10114,25 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value ** ** ** The "iScanStatusOp" parameter determines which status information to return. ** The "iScanStatusOp" must be one of the [scanstatus options] or the behavior -** of this interface is undefined. -** ^The requested measurement is written into a variable pointed to by -** the "pOut" parameter. -** Parameter "idx" identifies the specific loop to retrieve statistics for. -** Loops are numbered starting from zero. ^If idx is out of range - less than -** zero or greater than or equal to the total number of loops used to implement -** the statement - a non-zero value is returned and the variable that pOut -** points to is unchanged. -** -** ^Statistics might not be available for all loops in all statements. ^In cases -** where there exist loops with no available statistics, this function behaves -** as if the loop did not exist - it returns non-zero and leave the variable -** that pOut points to unchanged. +** of this interface is undefined. ^The requested measurement is written into +** a variable pointed to by the "pOut" parameter. +** +** The "flags" parameter must be passed a mask of flags. At present only +** one flag is defined - SQLITE_SCANSTAT_COMPLEX. If SQLITE_SCANSTAT_COMPLEX +** is specified, then status information is available for all elements +** of a query plan that are reported by "EXPLAIN QUERY PLAN" output. If +** SQLITE_SCANSTAT_COMPLEX is not specified, then only query plan elements +** that correspond to query loops (the "SCAN..." and "SEARCH..." elements of +** the EXPLAIN QUERY PLAN output) are available. Invoking API +** sqlite3_stmt_scanstatus() is equivalent to calling +** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter. +** +** Parameter "idx" identifies the specific query element to retrieve statistics +** for. Query elements are numbered starting from zero. A value of -1 may be +** to query for statistics regarding the entire query. ^If idx is out of range +** - less than -1 or greater than or equal to the total number of query +** elements used to implement the statement - a non-zero value is returned and +** the variable that pOut points to is unchanged. ** ** See also: [sqlite3_stmt_scanstatus_reset()] */ @@ -9973,6 +10142,19 @@ SQLITE_API int sqlite3_stmt_scanstatus( int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ void *pOut /* Result written here */ ); +SQLITE_API int sqlite3_stmt_scanstatus_v2( + sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ + int idx, /* Index of loop to report on */ + int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ + int flags, /* Mask of flags defined below */ + void *pOut /* Result written here */ +); + +/* +** CAPI3REF: Prepared Statement Scan Status +** KEYWORDS: {scan status flags} +*/ +#define SQLITE_SCANSTAT_COMPLEX 0x0001 /* ** CAPI3REF: Zero Scan-Status Counters @@ -10063,6 +10245,10 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*); ** function is not defined for operations on WITHOUT ROWID tables, or for ** DELETE operations on rowid tables. ** +** ^The sqlite3_preupdate_hook(D,C,P) function returns the P argument from +** the previous call on the same [database connection] D, or NULL for +** the first call on D. +** ** The [sqlite3_preupdate_old()], [sqlite3_preupdate_new()], ** [sqlite3_preupdate_count()], and [sqlite3_preupdate_depth()] interfaces ** provide additional information about a preupdate event. These routines @@ -10102,7 +10288,7 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*); ** When the [sqlite3_blob_write()] API is used to update a blob column, ** the pre-update hook is invoked with SQLITE_DELETE. This is because the ** in this case the new values are not available. In this case, when a -** callback made with op==SQLITE_DELETE is actuall a write using the +** callback made with op==SQLITE_DELETE is actually a write using the ** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns ** the index of the column being written. In other cases, where the ** pre-update hook is being invoked for some other reason, including a @@ -10468,6 +10654,19 @@ SQLITE_API int sqlite3_deserialize( # undef double #endif +#if defined(__wasi__) +# undef SQLITE_WASI +# define SQLITE_WASI 1 +# undef SQLITE_OMIT_WAL +# define SQLITE_OMIT_WAL 1/* because it requires shared memory APIs */ +# ifndef SQLITE_OMIT_LOAD_EXTENSION +# define SQLITE_OMIT_LOAD_EXTENSION +# endif +# ifndef SQLITE_THREADSAFE +# define SQLITE_THREADSAFE 0 +# endif +#endif + #ifdef __cplusplus } /* End of the 'extern "C"' block */ #endif @@ -10674,16 +10873,20 @@ SQLITE_API int sqlite3session_create( SQLITE_API void sqlite3session_delete(sqlite3_session *pSession); /* -** CAPIREF: Conigure a Session Object +** CAPI3REF: Configure a Session Object ** METHOD: sqlite3_session ** ** This method is used to configure a session object after it has been -** created. At present the only valid value for the second parameter is -** [SQLITE_SESSION_OBJCONFIG_SIZE]. +** created. At present the only valid values for the second parameter are +** [SQLITE_SESSION_OBJCONFIG_SIZE] and [SQLITE_SESSION_OBJCONFIG_ROWID]. ** -** Arguments for sqlite3session_object_config() +*/ +SQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg); + +/* +** CAPI3REF: Options for sqlite3session_object_config ** -** The following values may passed as the the 4th parameter to +** The following values may passed as the the 2nd parameter to ** sqlite3session_object_config(). ** **
    SQLITE_SESSION_OBJCONFIG_SIZE
    @@ -10699,12 +10902,21 @@ SQLITE_API void sqlite3session_delete(sqlite3_session *pSession); ** ** It is an error (SQLITE_MISUSE) to attempt to modify this setting after ** the first table has been attached to the session object. +** +**
    SQLITE_SESSION_OBJCONFIG_ROWID
    +** This option is used to set, clear or query the flag that enables +** collection of data for tables with no explicit PRIMARY KEY. +** +** Normally, tables with no explicit PRIMARY KEY are simply ignored +** by the sessions module. However, if this flag is set, it behaves +** as if such tables have a column "_rowid_ INTEGER PRIMARY KEY" inserted +** as their leftmost columns. +** +** It is an error (SQLITE_MISUSE) to attempt to modify this setting after +** the first table has been attached to the session object. */ -SQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg); - -/* -*/ -#define SQLITE_SESSION_OBJCONFIG_SIZE 1 +#define SQLITE_SESSION_OBJCONFIG_SIZE 1 +#define SQLITE_SESSION_OBJCONFIG_ROWID 2 /* ** CAPI3REF: Enable Or Disable A Session Object @@ -11837,9 +12049,23 @@ SQLITE_API int sqlite3changeset_apply_v2( ** Invert the changeset before applying it. This is equivalent to inverting ** a changeset using sqlite3changeset_invert() before applying it. It is ** an error to specify this flag with a patchset. +** +**
    SQLITE_CHANGESETAPPLY_IGNORENOOP
    +** Do not invoke the conflict handler callback for any changes that +** would not actually modify the database even if they were applied. +** Specifically, this means that the conflict handler is not invoked +** for: +**
      +**
    • a delete change if the row being deleted cannot be found, +**
    • an update change if the modified fields are already set to +** their new values in the conflicting row, or +**
    • an insert change if all fields of the conflicting row match +** the row being inserted. +**
    */ #define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001 #define SQLITE_CHANGESETAPPLY_INVERT 0x0002 +#define SQLITE_CHANGESETAPPLY_IGNORENOOP 0x0004 /* ** CAPI3REF: Constants Passed To The Conflict Handler @@ -12580,7 +12806,7 @@ struct Fts5PhraseIter { ** See xPhraseFirstColumn above. */ struct Fts5ExtensionApi { - int iVersion; /* Currently always set to 3 */ + int iVersion; /* Currently always set to 2 */ void *(*xUserData)(Fts5Context*); @@ -12809,8 +13035,8 @@ struct Fts5ExtensionApi { ** as separate queries of the FTS index are required for each synonym. ** ** When using methods (2) or (3), it is important that the tokenizer only -** provide synonyms when tokenizing document text (method (2)) or query -** text (method (3)), not both. Doing so will not cause any errors, but is +** provide synonyms when tokenizing document text (method (3)) or query +** text (method (2)), not both. Doing so will not cause any errors, but is ** inefficient. */ typedef struct Fts5Tokenizer Fts5Tokenizer; @@ -12858,7 +13084,7 @@ struct fts5_api { int (*xCreateTokenizer)( fts5_api *pApi, const char *zName, - void *pContext, + void *pUserData, fts5_tokenizer *pTokenizer, void (*xDestroy)(void*) ); @@ -12867,7 +13093,7 @@ struct fts5_api { int (*xFindTokenizer)( fts5_api *pApi, const char *zName, - void **ppContext, + void **ppUserData, fts5_tokenizer *pTokenizer ); @@ -12875,7 +13101,7 @@ struct fts5_api { int (*xCreateFunction)( fts5_api *pApi, const char *zName, - void *pContext, + void *pUserData, fts5_extension_function xFunction, void (*xDestroy)(void*) ); diff --git a/src/sqlite/SQLite-3.40.1/sqlite3.pc.in b/src/sqlite/SQLite-3.43.1/sqlite3.pc.in similarity index 100% rename from src/sqlite/SQLite-3.40.1/sqlite3.pc.in rename to src/sqlite/SQLite-3.43.1/sqlite3.pc.in diff --git a/src/sqlite/SQLite-3.40.1/sqlite3.rc b/src/sqlite/SQLite-3.43.1/sqlite3.rc similarity index 100% rename from src/sqlite/SQLite-3.40.1/sqlite3.rc rename to src/sqlite/SQLite-3.43.1/sqlite3.rc diff --git a/src/sqlite/SQLite-3.40.1/sqlite3ext.h b/src/sqlite/SQLite-3.43.1/sqlite3ext.h similarity index 99% rename from src/sqlite/SQLite-3.40.1/sqlite3ext.h rename to src/sqlite/SQLite-3.43.1/sqlite3ext.h index 79702d7b2..711638099 100644 --- a/src/sqlite/SQLite-3.40.1/sqlite3ext.h +++ b/src/sqlite/SQLite-3.43.1/sqlite3ext.h @@ -359,6 +359,10 @@ struct sqlite3_api_routines { const char *(*db_name)(sqlite3*,int); /* Version 3.40.0 and later */ int (*value_encoding)(sqlite3_value*); + /* Version 3.41.0 and later */ + int (*is_interrupted)(sqlite3*); + /* Version 3.43.0 and later */ + int (*stmt_explain)(sqlite3_stmt*,int); }; /* @@ -685,6 +689,10 @@ typedef int (*sqlite3_loadext_entry)( #define sqlite3_db_name sqlite3_api->db_name /* Version 3.40.0 and later */ #define sqlite3_value_encoding sqlite3_api->value_encoding +/* Version 3.41.0 and later */ +#define sqlite3_is_interrupted sqlite3_api->is_interrupted +/* Version 3.43.0 and later */ +#define sqlite3_stmt_explain sqlite3_api->stmt_explain #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */ #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) diff --git a/src/sqlite/SQLite-3.40.1/sqlite3rc.h b/src/sqlite/SQLite-3.43.1/sqlite3rc.h similarity index 50% rename from src/sqlite/SQLite-3.40.1/sqlite3rc.h rename to src/sqlite/SQLite-3.43.1/sqlite3rc.h index abe983cb0..9fe5a4812 100644 --- a/src/sqlite/SQLite-3.40.1/sqlite3rc.h +++ b/src/sqlite/SQLite-3.43.1/sqlite3rc.h @@ -1,3 +1,3 @@ #ifndef SQLITE_RESOURCE_VERSION -#define SQLITE_RESOURCE_VERSION 3,40,1 +#define SQLITE_RESOURCE_VERSION 3,43,1 #endif diff --git a/src/sqlite/SQLite-3.40.1/tea/Makefile.in b/src/sqlite/SQLite-3.43.1/tea/Makefile.in similarity index 100% rename from src/sqlite/SQLite-3.40.1/tea/Makefile.in rename to src/sqlite/SQLite-3.43.1/tea/Makefile.in diff --git a/src/sqlite/SQLite-3.40.1/tea/README b/src/sqlite/SQLite-3.43.1/tea/README similarity index 100% rename from src/sqlite/SQLite-3.40.1/tea/README rename to src/sqlite/SQLite-3.43.1/tea/README diff --git a/src/sqlite/SQLite-3.40.1/tea/aclocal.m4 b/src/sqlite/SQLite-3.43.1/tea/aclocal.m4 similarity index 100% rename from src/sqlite/SQLite-3.40.1/tea/aclocal.m4 rename to src/sqlite/SQLite-3.43.1/tea/aclocal.m4 diff --git a/src/sqlite/SQLite-3.40.1/tea/configure b/src/sqlite/SQLite-3.43.1/tea/configure similarity index 99% rename from src/sqlite/SQLite-3.40.1/tea/configure rename to src/sqlite/SQLite-3.43.1/tea/configure index c9cb3764a..91d3e953e 100755 --- a/src/sqlite/SQLite-3.40.1/tea/configure +++ b/src/sqlite/SQLite-3.43.1/tea/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.40.0. +# Generated by GNU Autoconf 2.71 for sqlite 3.43.1. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -608,8 +608,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.40.0' -PACKAGE_STRING='sqlite 3.40.0' +PACKAGE_VERSION='3.43.1' +PACKAGE_STRING='sqlite 3.43.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1331,7 +1331,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.40.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.43.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1393,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.40.0:";; + short | recursive ) echo "Configuration of sqlite 3.43.1:";; esac cat <<\_ACEOF @@ -1496,7 +1496,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.40.0 +sqlite configure 3.43.1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1795,7 +1795,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.40.0, which was +It was created by sqlite $as_me 3.43.1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -9560,7 +9560,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.40.0, which was +This file was extended by sqlite $as_me 3.43.1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9615,7 +9615,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.40.0 +sqlite config.status 3.43.1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" @@ -10175,5 +10175,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi - - diff --git a/src/sqlite/SQLite-3.40.1/tea/configure.ac b/src/sqlite/SQLite-3.43.1/tea/configure.ac similarity index 99% rename from src/sqlite/SQLite-3.40.1/tea/configure.ac rename to src/sqlite/SQLite-3.43.1/tea/configure.ac index 3e17b8b0b..24c2c0577 100644 --- a/src/sqlite/SQLite-3.40.1/tea/configure.ac +++ b/src/sqlite/SQLite-3.43.1/tea/configure.ac @@ -19,7 +19,7 @@ dnl to configure the system for the local environment. # so that we create the export library with the dll. #----------------------------------------------------------------------- -AC_INIT([sqlite],[3.40.0]) +AC_INIT([sqlite],[3.43.1]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. diff --git a/src/sqlite/SQLite-3.40.1/tea/doc/sqlite3.n b/src/sqlite/SQLite-3.43.1/tea/doc/sqlite3.n similarity index 100% rename from src/sqlite/SQLite-3.40.1/tea/doc/sqlite3.n rename to src/sqlite/SQLite-3.43.1/tea/doc/sqlite3.n diff --git a/src/sqlite/SQLite-3.40.1/tea/generic/tclsqlite3.c b/src/sqlite/SQLite-3.43.1/tea/generic/tclsqlite3.c similarity index 99% rename from src/sqlite/SQLite-3.40.1/tea/generic/tclsqlite3.c rename to src/sqlite/SQLite-3.43.1/tea/generic/tclsqlite3.c index d9792f9b5..0810b079e 100644 --- a/src/sqlite/SQLite-3.40.1/tea/generic/tclsqlite3.c +++ b/src/sqlite/SQLite-3.43.1/tea/generic/tclsqlite3.c @@ -60,6 +60,25 @@ # include # include typedef unsigned char u8; +# ifndef SQLITE_PTRSIZE +# if defined(__SIZEOF_POINTER__) +# define SQLITE_PTRSIZE __SIZEOF_POINTER__ +# elif defined(i386) || defined(__i386__) || defined(_M_IX86) || \ + defined(_M_ARM) || defined(__arm__) || defined(__x86) || \ + (defined(__APPLE__) && defined(__POWERPC__)) || \ + (defined(__TOS_AIX__) && !defined(__64BIT__)) +# define SQLITE_PTRSIZE 4 +# else +# define SQLITE_PTRSIZE 8 +# endif +# endif /* SQLITE_PTRSIZE */ +# if defined(HAVE_STDINT_H) + typedef uintptr_t uptr; +# elif SQLITE_PTRSIZE==4 + typedef unsigned int uptr; +# else + typedef sqlite3_uint64 uptr; +# endif #endif #include @@ -680,7 +699,7 @@ static int DbTraceV2Handler( pCmd = Tcl_NewStringObj(pDb->zTraceV2, -1); Tcl_IncrRefCount(pCmd); Tcl_ListObjAppendElement(pDb->interp, pCmd, - Tcl_NewWideIntObj((Tcl_WideInt)pStmt)); + Tcl_NewWideIntObj((Tcl_WideInt)(uptr)pStmt)); Tcl_ListObjAppendElement(pDb->interp, pCmd, Tcl_NewStringObj(zSql, -1)); Tcl_EvalObjEx(pDb->interp, pCmd, TCL_EVAL_DIRECT); @@ -695,7 +714,7 @@ static int DbTraceV2Handler( pCmd = Tcl_NewStringObj(pDb->zTraceV2, -1); Tcl_IncrRefCount(pCmd); Tcl_ListObjAppendElement(pDb->interp, pCmd, - Tcl_NewWideIntObj((Tcl_WideInt)pStmt)); + Tcl_NewWideIntObj((Tcl_WideInt)(uptr)pStmt)); Tcl_ListObjAppendElement(pDb->interp, pCmd, Tcl_NewWideIntObj((Tcl_WideInt)ns)); Tcl_EvalObjEx(pDb->interp, pCmd, TCL_EVAL_DIRECT); @@ -709,7 +728,7 @@ static int DbTraceV2Handler( pCmd = Tcl_NewStringObj(pDb->zTraceV2, -1); Tcl_IncrRefCount(pCmd); Tcl_ListObjAppendElement(pDb->interp, pCmd, - Tcl_NewWideIntObj((Tcl_WideInt)pStmt)); + Tcl_NewWideIntObj((Tcl_WideInt)(uptr)pStmt)); Tcl_EvalObjEx(pDb->interp, pCmd, TCL_EVAL_DIRECT); Tcl_DecrRefCount(pCmd); Tcl_ResetResult(pDb->interp); @@ -721,7 +740,7 @@ static int DbTraceV2Handler( pCmd = Tcl_NewStringObj(pDb->zTraceV2, -1); Tcl_IncrRefCount(pCmd); Tcl_ListObjAppendElement(pDb->interp, pCmd, - Tcl_NewWideIntObj((Tcl_WideInt)db)); + Tcl_NewWideIntObj((Tcl_WideInt)(uptr)db)); Tcl_EvalObjEx(pDb->interp, pCmd, TCL_EVAL_DIRECT); Tcl_DecrRefCount(pCmd); Tcl_ResetResult(pDb->interp); @@ -1785,7 +1804,7 @@ static Tcl_Obj *dbEvalColumnValue(DbEvalContext *p, int iCol){ /* ** If using Tcl version 8.6 or greater, use the NR functions to avoid -** recursive evalution of scripts by the [db eval] and [db trans] +** recursive evaluation of scripts by the [db eval] and [db trans] ** commands. Even if the headers used while compiling the extension ** are 8.6 or newer, the code still tests the Tcl version at runtime. ** This allows stubs-enabled builds to be used with older Tcl libraries. @@ -2446,7 +2465,7 @@ static int SQLITE_TCLAPI DbObjCmd( ** ** This command usage is equivalent to the sqlite2.x COPY statement, ** which imports file data into a table using the PostgreSQL COPY file format: - ** $db copy $conflit_algo $table_name $filename \t \\N + ** $db copy $conflict_algorithm $table_name $filename \t \\N */ case DB_COPY: { char *zTable; /* Insert data into this table */ @@ -3059,6 +3078,9 @@ static int SQLITE_TCLAPI DbObjCmd( if( pDb->zProgress ){ Tcl_AppendResult(interp, pDb->zProgress, (char*)0); } +#ifndef SQLITE_OMIT_PROGRESS_CALLBACK + sqlite3_progress_handler(pDb->db, 0, 0, 0); +#endif }else if( objc==4 ){ char *zProgress; int len; @@ -3429,7 +3451,7 @@ static int SQLITE_TCLAPI DbObjCmd( ** Start a new transaction (if we are not already in the midst of a ** transaction) and execute the TCL script SCRIPT. After SCRIPT ** completes, either commit the transaction or roll it back if SCRIPT - ** throws an exception. Or if no new transation was started, do nothing. + ** throws an exception. Or if no new transaction was started, do nothing. ** pass the exception on up the stack. ** ** This command was inspired by Dave Thomas's talk on Ruby at the diff --git a/src/sqlite/SQLite-3.40.1/tea/license.terms b/src/sqlite/SQLite-3.43.1/tea/license.terms similarity index 100% rename from src/sqlite/SQLite-3.40.1/tea/license.terms rename to src/sqlite/SQLite-3.43.1/tea/license.terms diff --git a/src/sqlite/SQLite-3.40.1/tea/pkgIndex.tcl.in b/src/sqlite/SQLite-3.43.1/tea/pkgIndex.tcl.in similarity index 100% rename from src/sqlite/SQLite-3.40.1/tea/pkgIndex.tcl.in rename to src/sqlite/SQLite-3.43.1/tea/pkgIndex.tcl.in diff --git a/src/sqlite/SQLite-3.40.1/tea/tclconfig/install-sh b/src/sqlite/SQLite-3.43.1/tea/tclconfig/install-sh similarity index 100% rename from src/sqlite/SQLite-3.40.1/tea/tclconfig/install-sh rename to src/sqlite/SQLite-3.43.1/tea/tclconfig/install-sh diff --git a/src/sqlite/SQLite-3.40.1/tea/tclconfig/tcl.m4 b/src/sqlite/SQLite-3.43.1/tea/tclconfig/tcl.m4 similarity index 100% rename from src/sqlite/SQLite-3.40.1/tea/tclconfig/tcl.m4 rename to src/sqlite/SQLite-3.43.1/tea/tclconfig/tcl.m4 diff --git a/src/sqlite/SQLite-3.40.1/tea/win/makefile.vc b/src/sqlite/SQLite-3.43.1/tea/win/makefile.vc similarity index 100% rename from src/sqlite/SQLite-3.40.1/tea/win/makefile.vc rename to src/sqlite/SQLite-3.43.1/tea/win/makefile.vc diff --git a/src/sqlite/SQLite-3.40.1/tea/win/nmakehlp.c b/src/sqlite/SQLite-3.43.1/tea/win/nmakehlp.c similarity index 100% rename from src/sqlite/SQLite-3.40.1/tea/win/nmakehlp.c rename to src/sqlite/SQLite-3.43.1/tea/win/nmakehlp.c diff --git a/src/sqlite/SQLite-3.40.1/tea/win/rules.vc b/src/sqlite/SQLite-3.43.1/tea/win/rules.vc similarity index 100% rename from src/sqlite/SQLite-3.40.1/tea/win/rules.vc rename to src/sqlite/SQLite-3.43.1/tea/win/rules.vc diff --git a/src/sqlite/sqlite3-3.40.1-x64.dll b/src/sqlite/sqlite3-3.40.1-x64.dll deleted file mode 100644 index e4f4e9ad7..000000000 Binary files a/src/sqlite/sqlite3-3.40.1-x64.dll and /dev/null differ diff --git a/src/sqlite/sqlite3-3.40.1-x86.dll b/src/sqlite/sqlite3-3.40.1-x86.dll deleted file mode 100755 index c72be2462..000000000 Binary files a/src/sqlite/sqlite3-3.40.1-x86.dll and /dev/null differ diff --git a/src/sqlite/sqlite3-3.43.1-x64.dll b/src/sqlite/sqlite3-3.43.1-x64.dll new file mode 100644 index 000000000..e12305932 Binary files /dev/null and b/src/sqlite/sqlite3-3.43.1-x64.dll differ diff --git a/src/sqlite/sqlite3-3.43.1-x86.dll b/src/sqlite/sqlite3-3.43.1-x86.dll new file mode 100755 index 000000000..66280532c Binary files /dev/null and b/src/sqlite/sqlite3-3.43.1-x86.dll differ diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/MiniZip64_Changes.txt b/src/zlib/zlib-1.2.13/contrib/minizip/MiniZip64_Changes.txt deleted file mode 100644 index 13a1bd91a..000000000 --- a/src/zlib/zlib-1.2.13/contrib/minizip/MiniZip64_Changes.txt +++ /dev/null @@ -1,6 +0,0 @@ - -MiniZip 1.1 was derrived from MiniZip at version 1.01f - -Change in 1.0 (Okt 2009) - - **TODO - Add history** - diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/zip.h b/src/zlib/zlib-1.2.13/contrib/minizip/zip.h deleted file mode 100644 index 7e4509d77..000000000 --- a/src/zlib/zlib-1.2.13/contrib/minizip/zip.h +++ /dev/null @@ -1,367 +0,0 @@ -/* zip.h -- IO on .zip files using zlib - Version 1.1, February 14h, 2010 - part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications for Zip64 support - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - - For more info read MiniZip_info.txt - - --------------------------------------------------------------------------- - - Condition of use and distribution are the same than zlib : - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - --------------------------------------------------------------------------- - - Changes - - See header of zip.h - -*/ - -#ifndef _zip12_H -#define _zip12_H - -#ifdef __cplusplus -extern "C" { -#endif - -//#define HAVE_BZIP2 - -#ifndef _ZLIB_H -#include "zlib.h" -#endif - -#ifndef _ZLIBIOAPI_H -#include "ioapi.h" -#endif - -#ifdef HAVE_BZIP2 -#include "bzlib.h" -#endif - -#define Z_BZIP2ED 12 - -#if defined(STRICTZIP) || defined(STRICTZIPUNZIP) -/* like the STRICT of WIN32, we define a pointer that cannot be converted - from (void*) without cast */ -typedef struct TagzipFile__ { int unused; } zipFile__; -typedef zipFile__ *zipFile; -#else -typedef voidp zipFile; -#endif - -#define ZIP_OK (0) -#define ZIP_EOF (0) -#define ZIP_ERRNO (Z_ERRNO) -#define ZIP_PARAMERROR (-102) -#define ZIP_BADZIPFILE (-103) -#define ZIP_INTERNALERROR (-104) - -#ifndef DEF_MEM_LEVEL -# if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -# else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -# endif -#endif -/* default memLevel */ - -/* tm_zip contain date/time info */ -typedef struct tm_zip_s -{ - int tm_sec; /* seconds after the minute - [0,59] */ - int tm_min; /* minutes after the hour - [0,59] */ - int tm_hour; /* hours since midnight - [0,23] */ - int tm_mday; /* day of the month - [1,31] */ - int tm_mon; /* months since January - [0,11] */ - int tm_year; /* years - [1980..2044] */ -} tm_zip; - -typedef struct -{ - tm_zip tmz_date; /* date in understandable format */ - uLong dosDate; /* if dos_date == 0, tmu_date is used */ -/* uLong flag; */ /* general purpose bit flag 2 bytes */ - - uLong internal_fa; /* internal file attributes 2 bytes */ - uLong external_fa; /* external file attributes 4 bytes */ -} zip_fileinfo; - -typedef const char* zipcharpc; - - -#define APPEND_STATUS_CREATE (0) -#define APPEND_STATUS_CREATEAFTER (1) -#define APPEND_STATUS_ADDINZIP (2) - -extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append)); -extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append)); -/* - Create a zipfile. - pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on - an Unix computer "zlib/zlib113.zip". - if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip - will be created at the end of the file. - (useful if the file contain a self extractor code) - if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will - add files in existing zip (be sure you don't add file that doesn't exist) - If the zipfile cannot be opened, the return value is NULL. - Else, the return value is a zipFile Handle, usable with other function - of this zip package. -*/ - -/* Note : there is no delete function into a zipfile. - If you want delete file into a zipfile, you must open a zipfile, and create another - Of couse, you can use RAW reading and writing to copy the file you did not want delte -*/ - -extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, - int append, - zipcharpc* globalcomment, - zlib_filefunc_def* pzlib_filefunc_def)); - -extern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname, - int append, - zipcharpc* globalcomment, - zlib_filefunc64_def* pzlib_filefunc_def)); - -extern zipFile ZEXPORT zipOpen3 OF((const void *pathname, - int append, - zipcharpc* globalcomment, - zlib_filefunc64_32_def* pzlib_filefunc64_32_def)); - -extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level)); - -extern int ZEXPORT zipOpenNewFileInZip64 OF((zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int zip64)); - -/* - Open a file in the ZIP for writing. - filename : the filename in zip (if NULL, '-' without quote will be used - *zipfi contain supplemental information - if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local - contains the extrafield data the the local header - if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global - contains the extrafield data the the local header - if comment != NULL, comment contain the comment string - method contain the compression method (0 for store, Z_DEFLATED for deflate) - level contain the level of compression (can be Z_DEFAULT_COMPRESSION) - zip64 is set to 1 if a zip64 extended information block should be added to the local file header. - this MUST be '1' if the uncompressed size is >= 0xffffffff. - -*/ - - -extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int raw)); - - -extern int ZEXPORT zipOpenNewFileInZip2_64 OF((zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int raw, - int zip64)); -/* - Same than zipOpenNewFileInZip, except if raw=1, we write raw file - */ - -extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int raw, - int windowBits, - int memLevel, - int strategy, - const char* password, - uLong crcForCrypting)); - -extern int ZEXPORT zipOpenNewFileInZip3_64 OF((zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int raw, - int windowBits, - int memLevel, - int strategy, - const char* password, - uLong crcForCrypting, - int zip64 - )); - -/* - Same than zipOpenNewFileInZip2, except - windowBits,memLevel,,strategy : see parameter strategy in deflateInit2 - password : crypting password (NULL for no crypting) - crcForCrypting : crc of file to compress (needed for crypting) - */ - -extern int ZEXPORT zipOpenNewFileInZip4 OF((zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int raw, - int windowBits, - int memLevel, - int strategy, - const char* password, - uLong crcForCrypting, - uLong versionMadeBy, - uLong flagBase - )); - - -extern int ZEXPORT zipOpenNewFileInZip4_64 OF((zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int raw, - int windowBits, - int memLevel, - int strategy, - const char* password, - uLong crcForCrypting, - uLong versionMadeBy, - uLong flagBase, - int zip64 - )); -/* - Same than zipOpenNewFileInZip4, except - versionMadeBy : value for Version made by field - flag : value for flag field (compression level info will be added) - */ - - -extern int ZEXPORT zipWriteInFileInZip OF((zipFile file, - const void* buf, - unsigned len)); -/* - Write data in the zipfile -*/ - -extern int ZEXPORT zipCloseFileInZip OF((zipFile file)); -/* - Close the current file in the zipfile -*/ - -extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file, - uLong uncompressed_size, - uLong crc32)); - -extern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file, - ZPOS64_T uncompressed_size, - uLong crc32)); - -/* - Close the current file in the zipfile, for file opened with - parameter raw=1 in zipOpenNewFileInZip2 - uncompressed_size and crc32 are value for the uncompressed size -*/ - -extern int ZEXPORT zipClose OF((zipFile file, - const char* global_comment)); -/* - Close the zipfile -*/ - - -extern int ZEXPORT zipRemoveExtraInfoBlock OF((char* pData, int* dataLen, short sHeader)); -/* - zipRemoveExtraInfoBlock - Added by Mathias Svensson - - Remove extra information block from a extra information data for the local file header or central directory header - - It is needed to remove ZIP64 extra information blocks when before data is written if using RAW mode. - - 0x0001 is the signature header for the ZIP64 extra information blocks - - usage. - Remove ZIP64 Extra information from a central director extra field data - zipRemoveExtraInfoBlock(pCenDirExtraFieldData, &nCenDirExtraFieldDataLen, 0x0001); - - Remove ZIP64 Extra information from a Local File Header extra field data - zipRemoveExtraInfoBlock(pLocalHeaderExtraFieldData, &nLocalHeaderExtraFieldDataLen, 0x0001); -*/ - -#ifdef __cplusplus -} -#endif - -#endif /* _zip64_H */ diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc9/zlib.rc b/src/zlib/zlib-1.2.13/contrib/vstudio/vc9/zlib.rc deleted file mode 100644 index 876027498..000000000 --- a/src/zlib/zlib-1.2.13/contrib/vstudio/vc9/zlib.rc +++ /dev/null @@ -1,32 +0,0 @@ -#include - -#define IDR_VERSION1 1 -IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 13, 0 - PRODUCTVERSION 1, 2, 13, 0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS_DOS_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - - BEGIN - VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.13\0" - VALUE "InternalName", "zlib\0" - VALUE "OriginalFilename", "zlibwapi.dll\0" - VALUE "ProductName", "ZLib.DLL\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc9/zlibvc.def b/src/zlib/zlib-1.2.13/contrib/vstudio/vc9/zlibvc.def deleted file mode 100644 index ba09bc1b9..000000000 --- a/src/zlib/zlib-1.2.13/contrib/vstudio/vc9/zlibvc.def +++ /dev/null @@ -1,158 +0,0 @@ -LIBRARY -; zlib data compression and ZIP file I/O library - -VERSION 1.2 - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 - inflateCopy @42 - inflateBackInit_ @43 - inflateBack @44 - inflateBackEnd @45 - compressBound @46 - deflateBound @47 - gzclearerr @48 - gzungetc @49 - zlibCompileFlags @50 - deflatePrime @51 - deflatePending @52 - - unzOpen @61 - unzClose @62 - unzGetGlobalInfo @63 - unzGetCurrentFileInfo @64 - unzGoToFirstFile @65 - unzGoToNextFile @66 - unzOpenCurrentFile @67 - unzReadCurrentFile @68 - unzOpenCurrentFile3 @69 - unztell @70 - unzeof @71 - unzCloseCurrentFile @72 - unzGetGlobalComment @73 - unzStringFileNameCompare @74 - unzLocateFile @75 - unzGetLocalExtrafield @76 - unzOpen2 @77 - unzOpenCurrentFile2 @78 - unzOpenCurrentFilePassword @79 - - zipOpen @80 - zipOpenNewFileInZip @81 - zipWriteInFileInZip @82 - zipCloseFileInZip @83 - zipClose @84 - zipOpenNewFileInZip2 @86 - zipCloseFileInZipRaw @87 - zipOpen2 @88 - zipOpenNewFileInZip3 @89 - - unzGetFilePos @100 - unzGoToFilePos @101 - - fill_win32_filefunc @110 - -; zlibwapi v1.2.4 added: - fill_win32_filefunc64 @111 - fill_win32_filefunc64A @112 - fill_win32_filefunc64W @113 - - unzOpen64 @120 - unzOpen2_64 @121 - unzGetGlobalInfo64 @122 - unzGetCurrentFileInfo64 @124 - unzGetCurrentFileZStreamPos64 @125 - unztell64 @126 - unzGetFilePos64 @127 - unzGoToFilePos64 @128 - - zipOpen64 @130 - zipOpen2_64 @131 - zipOpenNewFileInZip64 @132 - zipOpenNewFileInZip2_64 @133 - zipOpenNewFileInZip3_64 @134 - zipOpenNewFileInZip4_64 @135 - zipCloseFileInZipRaw64 @136 - -; zlib1 v1.2.4 added: - adler32_combine @140 - crc32_combine @142 - deflateSetHeader @144 - deflateTune @145 - gzbuffer @146 - gzclose_r @147 - gzclose_w @148 - gzdirect @149 - gzoffset @150 - inflateGetHeader @156 - inflateMark @157 - inflatePrime @158 - inflateReset2 @159 - inflateUndermine @160 - -; zlib1 v1.2.6 added: - gzgetc_ @161 - inflateResetKeep @163 - deflateResetKeep @164 - -; zlib1 v1.2.7 added: - gzopen_w @165 - -; zlib1 v1.2.8 added: - inflateGetDictionary @166 - gzvprintf @167 - -; zlib1 v1.2.9 added: - inflateCodesUsed @168 - inflateValidate @169 - uncompress2 @170 - gzfread @171 - gzfwrite @172 - deflateGetDictionary @173 - adler32_z @174 - crc32_z @175 - -; zlib1 v1.2.12 added: - crc32_combine_gen @176 - crc32_combine_gen64 @177 - crc32_combine_op @178 diff --git a/src/zlib/zlib-1.2.13/examples/zran.c b/src/zlib/zlib-1.2.13/examples/zran.c deleted file mode 100644 index 879c47ccf..000000000 --- a/src/zlib/zlib-1.2.13/examples/zran.c +++ /dev/null @@ -1,479 +0,0 @@ -/* zran.c -- example of zlib/gzip stream indexing and random access - * Copyright (C) 2005, 2012, 2018 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * Version 1.2 14 Oct 2018 Mark Adler */ - -/* Version History: - 1.0 29 May 2005 First version - 1.1 29 Sep 2012 Fix memory reallocation error - 1.2 14 Oct 2018 Handle gzip streams with multiple members - Add a header file to facilitate usage in applications - */ - -/* Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary() - for random access of a compressed file. A file containing a zlib or gzip - stream is provided on the command line. The compressed stream is decoded in - its entirety, and an index built with access points about every SPAN bytes - in the uncompressed output. The compressed file is left open, and can then - be read randomly, having to decompress on the average SPAN/2 uncompressed - bytes before getting to the desired block of data. - - An access point can be created at the start of any deflate block, by saving - the starting file offset and bit of that block, and the 32K bytes of - uncompressed data that precede that block. Also the uncompressed offset of - that block is saved to provide a reference for locating a desired starting - point in the uncompressed stream. deflate_index_build() works by - decompressing the input zlib or gzip stream a block at a time, and at the - end of each block deciding if enough uncompressed data has gone by to - justify the creation of a new access point. If so, that point is saved in a - data structure that grows as needed to accommodate the points. - - To use the index, an offset in the uncompressed data is provided, for which - the latest access point at or preceding that offset is located in the index. - The input file is positioned to the specified location in the index, and if - necessary the first few bits of the compressed data is read from the file. - inflate is initialized with those bits and the 32K of uncompressed data, and - the decompression then proceeds until the desired offset in the file is - reached. Then the decompression continues to read the desired uncompressed - data from the file. - - Another approach would be to generate the index on demand. In that case, - requests for random access reads from the compressed data would try to use - the index, but if a read far enough past the end of the index is required, - then further index entries would be generated and added. - - There is some fair bit of overhead to starting inflation for the random - access, mainly copying the 32K byte dictionary. So if small pieces of the - file are being accessed, it would make sense to implement a cache to hold - some lookahead and avoid many calls to deflate_index_extract() for small - lengths. - - Another way to build an index would be to use inflateCopy(). That would - not be constrained to have access points at block boundaries, but requires - more memory per access point, and also cannot be saved to file due to the - use of pointers in the state. The approach here allows for storage of the - index in a file. - */ - -#include -#include -#include -#include "zlib.h" -#include "zran.h" - -#define WINSIZE 32768U /* sliding window size */ -#define CHUNK 16384 /* file input buffer size */ - -/* Access point entry. */ -struct point { - off_t out; /* corresponding offset in uncompressed data */ - off_t in; /* offset in input file of first full byte */ - int bits; /* number of bits (1-7) from byte at in-1, or 0 */ - unsigned char window[WINSIZE]; /* preceding 32K of uncompressed data */ -}; - -/* See comments in zran.h. */ -void deflate_index_free(struct deflate_index *index) -{ - if (index != NULL) { - free(index->list); - free(index); - } -} - -/* Add an entry to the access point list. If out of memory, deallocate the - existing list and return NULL. index->gzip is the allocated size of the - index in point entries, until it is time for deflate_index_build() to - return, at which point gzip is set to indicate a gzip file or not. - */ -static struct deflate_index *addpoint(struct deflate_index *index, int bits, - off_t in, off_t out, unsigned left, - unsigned char *window) -{ - struct point *next; - - /* if list is empty, create it (start with eight points) */ - if (index == NULL) { - index = malloc(sizeof(struct deflate_index)); - if (index == NULL) return NULL; - index->list = malloc(sizeof(struct point) << 3); - if (index->list == NULL) { - free(index); - return NULL; - } - index->gzip = 8; - index->have = 0; - } - - /* if list is full, make it bigger */ - else if (index->have == index->gzip) { - index->gzip <<= 1; - next = realloc(index->list, sizeof(struct point) * index->gzip); - if (next == NULL) { - deflate_index_free(index); - return NULL; - } - index->list = next; - } - - /* fill in entry and increment how many we have */ - next = (struct point *)(index->list) + index->have; - next->bits = bits; - next->in = in; - next->out = out; - if (left) - memcpy(next->window, window + WINSIZE - left, left); - if (left < WINSIZE) - memcpy(next->window + left, window, WINSIZE - left); - index->have++; - - /* return list, possibly reallocated */ - return index; -} - -/* See comments in zran.h. */ -int deflate_index_build(FILE *in, off_t span, struct deflate_index **built) -{ - int ret; - int gzip = 0; /* true if reading a gzip file */ - off_t totin, totout; /* our own total counters to avoid 4GB limit */ - off_t last; /* totout value of last access point */ - struct deflate_index *index; /* access points being generated */ - z_stream strm; - unsigned char input[CHUNK]; - unsigned char window[WINSIZE]; - - /* initialize inflate */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit2(&strm, 47); /* automatic zlib or gzip decoding */ - if (ret != Z_OK) - return ret; - - /* inflate the input, maintain a sliding window, and build an index -- this - also validates the integrity of the compressed data using the check - information in the gzip or zlib stream */ - totin = totout = last = 0; - index = NULL; /* will be allocated by first addpoint() */ - strm.avail_out = 0; - do { - /* get some compressed data from input file */ - strm.avail_in = fread(input, 1, CHUNK, in); - if (ferror(in)) { - ret = Z_ERRNO; - goto deflate_index_build_error; - } - if (strm.avail_in == 0) { - ret = Z_DATA_ERROR; - goto deflate_index_build_error; - } - strm.next_in = input; - - /* check for a gzip stream */ - if (totin == 0 && strm.avail_in >= 3 && - input[0] == 31 && input[1] == 139 && input[2] == 8) - gzip = 1; - - /* process all of that, or until end of stream */ - do { - /* reset sliding window if necessary */ - if (strm.avail_out == 0) { - strm.avail_out = WINSIZE; - strm.next_out = window; - } - - /* inflate until out of input, output, or at end of block -- - update the total input and output counters */ - totin += strm.avail_in; - totout += strm.avail_out; - ret = inflate(&strm, Z_BLOCK); /* return at end of block */ - totin -= strm.avail_in; - totout -= strm.avail_out; - if (ret == Z_NEED_DICT) - ret = Z_DATA_ERROR; - if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR) - goto deflate_index_build_error; - if (ret == Z_STREAM_END) { - if (gzip && - (strm.avail_in || ungetc(getc(in), in) != EOF)) { - ret = inflateReset(&strm); - if (ret != Z_OK) - goto deflate_index_build_error; - continue; - } - break; - } - - /* if at end of block, consider adding an index entry (note that if - data_type indicates an end-of-block, then all of the - uncompressed data from that block has been delivered, and none - of the compressed data after that block has been consumed, - except for up to seven bits) -- the totout == 0 provides an - entry point after the zlib or gzip header, and assures that the - index always has at least one access point; we avoid creating an - access point after the last block by checking bit 6 of data_type - */ - if ((strm.data_type & 128) && !(strm.data_type & 64) && - (totout == 0 || totout - last > span)) { - index = addpoint(index, strm.data_type & 7, totin, - totout, strm.avail_out, window); - if (index == NULL) { - ret = Z_MEM_ERROR; - goto deflate_index_build_error; - } - last = totout; - } - } while (strm.avail_in != 0); - } while (ret != Z_STREAM_END); - - /* clean up and return index (release unused entries in list) */ - (void)inflateEnd(&strm); - index->list = realloc(index->list, sizeof(struct point) * index->have); - index->gzip = gzip; - index->length = totout; - *built = index; - return index->have; - - /* return error */ - deflate_index_build_error: - (void)inflateEnd(&strm); - deflate_index_free(index); - return ret; -} - -/* See comments in zran.h. */ -int deflate_index_extract(FILE *in, struct deflate_index *index, off_t offset, - unsigned char *buf, int len) -{ - int ret, skip; - z_stream strm; - struct point *here; - unsigned char input[CHUNK]; - unsigned char discard[WINSIZE]; - - /* proceed only if something reasonable to do */ - if (len < 0) - return 0; - - /* find where in stream to start */ - here = index->list; - ret = index->have; - while (--ret && here[1].out <= offset) - here++; - - /* initialize file and inflate state to start there */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit2(&strm, -15); /* raw inflate */ - if (ret != Z_OK) - return ret; - ret = fseeko(in, here->in - (here->bits ? 1 : 0), SEEK_SET); - if (ret == -1) - goto deflate_index_extract_ret; - if (here->bits) { - ret = getc(in); - if (ret == -1) { - ret = ferror(in) ? Z_ERRNO : Z_DATA_ERROR; - goto deflate_index_extract_ret; - } - (void)inflatePrime(&strm, here->bits, ret >> (8 - here->bits)); - } - (void)inflateSetDictionary(&strm, here->window, WINSIZE); - - /* skip uncompressed bytes until offset reached, then satisfy request */ - offset -= here->out; - strm.avail_in = 0; - skip = 1; /* while skipping to offset */ - do { - /* define where to put uncompressed data, and how much */ - if (offset > WINSIZE) { /* skip WINSIZE bytes */ - strm.avail_out = WINSIZE; - strm.next_out = discard; - offset -= WINSIZE; - } - else if (offset > 0) { /* last skip */ - strm.avail_out = (unsigned)offset; - strm.next_out = discard; - offset = 0; - } - else if (skip) { /* at offset now */ - strm.avail_out = len; - strm.next_out = buf; - skip = 0; /* only do this once */ - } - - /* uncompress until avail_out filled, or end of stream */ - do { - if (strm.avail_in == 0) { - strm.avail_in = fread(input, 1, CHUNK, in); - if (ferror(in)) { - ret = Z_ERRNO; - goto deflate_index_extract_ret; - } - if (strm.avail_in == 0) { - ret = Z_DATA_ERROR; - goto deflate_index_extract_ret; - } - strm.next_in = input; - } - ret = inflate(&strm, Z_NO_FLUSH); /* normal inflate */ - if (ret == Z_NEED_DICT) - ret = Z_DATA_ERROR; - if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR) - goto deflate_index_extract_ret; - if (ret == Z_STREAM_END) { - /* the raw deflate stream has ended */ - if (index->gzip == 0) - /* this is a zlib stream that has ended -- done */ - break; - - /* near the end of a gzip member, which might be followed by - another gzip member -- skip the gzip trailer and see if - there is more input after it */ - if (strm.avail_in < 8) { - fseeko(in, 8 - strm.avail_in, SEEK_CUR); - strm.avail_in = 0; - } - else { - strm.avail_in -= 8; - strm.next_in += 8; - } - if (strm.avail_in == 0 && ungetc(getc(in), in) == EOF) - /* the input ended after the gzip trailer -- done */ - break; - - /* there is more input, so another gzip member should follow -- - validate and skip the gzip header */ - ret = inflateReset2(&strm, 31); - if (ret != Z_OK) - goto deflate_index_extract_ret; - do { - if (strm.avail_in == 0) { - strm.avail_in = fread(input, 1, CHUNK, in); - if (ferror(in)) { - ret = Z_ERRNO; - goto deflate_index_extract_ret; - } - if (strm.avail_in == 0) { - ret = Z_DATA_ERROR; - goto deflate_index_extract_ret; - } - strm.next_in = input; - } - ret = inflate(&strm, Z_BLOCK); - if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR) - goto deflate_index_extract_ret; - } while ((strm.data_type & 128) == 0); - - /* set up to continue decompression of the raw deflate stream - that follows the gzip header */ - ret = inflateReset2(&strm, -15); - if (ret != Z_OK) - goto deflate_index_extract_ret; - } - - /* continue to process the available input before reading more */ - } while (strm.avail_out != 0); - - if (ret == Z_STREAM_END) - /* reached the end of the compressed data -- return the data that - was available, possibly less than requested */ - break; - - /* do until offset reached and requested data read */ - } while (skip); - - /* compute the number of uncompressed bytes read after the offset */ - ret = skip ? 0 : len - strm.avail_out; - - /* clean up and return the bytes read, or the negative error */ - deflate_index_extract_ret: - (void)inflateEnd(&strm); - return ret; -} - -#ifdef TEST - -#define SPAN 1048576L /* desired distance between access points */ -#define LEN 16384 /* number of bytes to extract */ - -/* Demonstrate the use of deflate_index_build() and deflate_index_extract() by - processing the file provided on the command line, and extracting LEN bytes - from 2/3rds of the way through the uncompressed output, writing that to - stdout. An offset can be provided as the second argument, in which case the - data is extracted from there instead. */ -int main(int argc, char **argv) -{ - int len; - off_t offset = -1; - FILE *in; - struct deflate_index *index = NULL; - unsigned char buf[LEN]; - - /* open input file */ - if (argc < 2 || argc > 3) { - fprintf(stderr, "usage: zran file.gz [offset]\n"); - return 1; - } - in = fopen(argv[1], "rb"); - if (in == NULL) { - fprintf(stderr, "zran: could not open %s for reading\n", argv[1]); - return 1; - } - - /* get optional offset */ - if (argc == 3) { - char *end; - offset = strtoll(argv[2], &end, 10); - if (*end || offset < 0) { - fprintf(stderr, "zran: %s is not a valid offset\n", argv[2]); - return 1; - } - } - - /* build index */ - len = deflate_index_build(in, SPAN, &index); - if (len < 0) { - fclose(in); - switch (len) { - case Z_MEM_ERROR: - fprintf(stderr, "zran: out of memory\n"); - break; - case Z_DATA_ERROR: - fprintf(stderr, "zran: compressed data error in %s\n", argv[1]); - break; - case Z_ERRNO: - fprintf(stderr, "zran: read error on %s\n", argv[1]); - break; - default: - fprintf(stderr, "zran: error %d while building index\n", len); - } - return 1; - } - fprintf(stderr, "zran: built index with %d access points\n", len); - - /* use index by reading some bytes from an arbitrary offset */ - if (offset == -1) - offset = (index->length << 1) / 3; - len = deflate_index_extract(in, index, offset, buf, LEN); - if (len < 0) - fprintf(stderr, "zran: extraction failed: %s error\n", - len == Z_MEM_ERROR ? "out of memory" : "input corrupted"); - else { - fwrite(buf, 1, len, stdout); - fprintf(stderr, "zran: extracted %d bytes at %llu\n", len, offset); - } - - /* clean up and exit */ - deflate_index_free(index); - fclose(in); - return 0; -} - -#endif diff --git a/src/zlib/zlib-1.2.13/examples/zran.h b/src/zlib/zlib-1.2.13/examples/zran.h deleted file mode 100644 index 2314125d6..000000000 --- a/src/zlib/zlib-1.2.13/examples/zran.h +++ /dev/null @@ -1,40 +0,0 @@ -/* zran.h -- example of zlib/gzip stream indexing and random access - * Copyright (C) 2005, 2012, 2018 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * Version 1.2 14 Oct 2018 Mark Adler */ - -#include -#include "zlib.h" - -/* Access point list. */ -struct deflate_index { - int have; /* number of list entries */ - int gzip; /* 1 if the index is of a gzip file, 0 if it is of a - zlib stream */ - off_t length; /* total length of uncompressed data */ - void *list; /* allocated list of entries */ -}; - -/* Make one entire pass through a zlib or gzip compressed stream and build an - index, with access points about every span bytes of uncompressed output. - gzip files with multiple members are indexed in their entirety. span should - be chosen to balance the speed of random access against the memory - requirements of the list, about 32K bytes per access point. The return value - is the number of access points on success (>= 1), Z_MEM_ERROR for out of - memory, Z_DATA_ERROR for an error in the input file, or Z_ERRNO for a file - read error. On success, *built points to the resulting index. */ -int deflate_index_build(FILE *in, off_t span, struct deflate_index **built); - -/* Deallocate an index built by deflate_index_build() */ -void deflate_index_free(struct deflate_index *index); - -/* Use the index to read len bytes from offset into buf. Return bytes read or - negative for error (Z_DATA_ERROR or Z_MEM_ERROR). If data is requested past - the end of the uncompressed data, then deflate_index_extract() will return a - value less than len, indicating how much was actually read into buf. This - function should not return a data error unless the file was modified since - the index was generated, since deflate_index_build() validated all of the - input. deflate_index_extract() will return Z_ERRNO if there is an error on - reading or seeking the input file. */ -int deflate_index_extract(FILE *in, struct deflate_index *index, off_t offset, - unsigned char *buf, int len); diff --git a/src/zlib/zlib-1.2.13/zlib.3.pdf b/src/zlib/zlib-1.2.13/zlib.3.pdf deleted file mode 100644 index 8132d840c..000000000 Binary files a/src/zlib/zlib-1.2.13/zlib.3.pdf and /dev/null differ diff --git a/src/zlib/zlib-1.2.13/zlib2ansi b/src/zlib/zlib-1.2.13/zlib2ansi deleted file mode 100755 index 23b2a1d5a..000000000 --- a/src/zlib/zlib-1.2.13/zlib2ansi +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/perl - -# Transform K&R C function definitions into ANSI equivalent. -# -# Author: Paul Marquess -# Version: 1.0 -# Date: 3 October 2006 - -# TODO -# -# Assumes no function pointer parameters. unless they are typedefed. -# Assumes no literal strings that look like function definitions -# Assumes functions start at the beginning of a line - -use strict; -use warnings; - -local $/; -$_ = <>; - -my $sp = qr{ \s* (?: /\* .*? \*/ )? \s* }x; # assume no nested comments - -my $d1 = qr{ $sp (?: [\w\*\s]+ $sp)* $sp \w+ $sp [\[\]\s]* $sp }x ; -my $decl = qr{ $sp (?: \w+ $sp )+ $d1 }xo ; -my $dList = qr{ $sp $decl (?: $sp , $d1 )* $sp ; $sp }xo ; - - -while (s/^ - ( # Start $1 - ( # Start $2 - .*? # Minimal eat content - ( ^ \w [\w\s\*]+ ) # $3 -- function name - \s* # optional whitespace - ) # $2 - Matched up to before parameter list - - \( \s* # Literal "(" + optional whitespace - ( [^\)]+ ) # $4 - one or more anythings except ")" - \s* \) # optional whitespace surrounding a Literal ")" - - ( (?: $dList )+ ) # $5 - - $sp ^ { # literal "{" at start of line - ) # Remember to $1 - //xsom - ) -{ - my $all = $1 ; - my $prefix = $2; - my $param_list = $4 ; - my $params = $5; - - StripComments($params); - StripComments($param_list); - $param_list =~ s/^\s+//; - $param_list =~ s/\s+$//; - - my $i = 0 ; - my %pList = map { $_ => $i++ } - split /\s*,\s*/, $param_list; - my $pMatch = '(\b' . join('|', keys %pList) . '\b)\W*$' ; - - my @params = split /\s*;\s*/, $params; - my @outParams = (); - foreach my $p (@params) - { - if ($p =~ /,/) - { - my @bits = split /\s*,\s*/, $p; - my $first = shift @bits; - $first =~ s/^\s*//; - push @outParams, $first; - $first =~ /^(\w+\s*)/; - my $type = $1 ; - push @outParams, map { $type . $_ } @bits; - } - else - { - $p =~ s/^\s+//; - push @outParams, $p; - } - } - - - my %tmp = map { /$pMatch/; $_ => $pList{$1} } - @outParams ; - - @outParams = map { " $_" } - sort { $tmp{$a} <=> $tmp{$b} } - @outParams ; - - print $prefix ; - print "(\n" . join(",\n", @outParams) . ")\n"; - print "{" ; - -} - -# Output any trailing code. -print ; -exit 0; - - -sub StripComments -{ - - no warnings; - - # Strip C & C++ comments - # From the perlfaq - $_[0] =~ - - s{ - /\* ## Start of /* ... */ comment - [^*]*\*+ ## Non-* followed by 1-or-more *'s - ( - [^/*][^*]*\*+ - )* ## 0-or-more things which don't start with / - ## but do end with '*' - / ## End of /* ... */ comment - - | ## OR C++ Comment - // ## Start of C++ comment // - [^\n]* ## followed by 0-or-more non end of line characters - - | ## OR various things which aren't comments: - - ( - " ## Start of " ... " string - ( - \\. ## Escaped char - | ## OR - [^"\\] ## Non "\ - )* - " ## End of " ... " string - - | ## OR - - ' ## Start of ' ... ' string - ( - \\. ## Escaped char - | ## OR - [^'\\] ## Non '\ - )* - ' ## End of ' ... ' string - - | ## OR - - . ## Anything other char - [^/"'\\]* ## Chars which doesn't start a comment, string or escape - ) - }{$2}gxs; - -} diff --git a/src/zlib/zlib-1.2.13/CMakeLists.txt b/src/zlib/zlib-1.3/CMakeLists.txt similarity index 99% rename from src/zlib/zlib-1.2.13/CMakeLists.txt rename to src/zlib/zlib-1.3/CMakeLists.txt index b412dc7fe..7f1b69f4a 100644 --- a/src/zlib/zlib-1.2.13/CMakeLists.txt +++ b/src/zlib/zlib-1.3/CMakeLists.txt @@ -1,9 +1,9 @@ -cmake_minimum_required(VERSION 2.4.4) +cmake_minimum_required(VERSION 2.4.4...3.15.0) set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) project(zlib C) -set(VERSION "1.2.13") +set(VERSION "1.3") set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") diff --git a/src/zlib/zlib-1.2.13/ChangeLog b/src/zlib/zlib-1.3/ChangeLog similarity index 98% rename from src/zlib/zlib-1.2.13/ChangeLog rename to src/zlib/zlib-1.3/ChangeLog index 457526bc6..8707988ac 100644 --- a/src/zlib/zlib-1.2.13/ChangeLog +++ b/src/zlib/zlib-1.3/ChangeLog @@ -1,6 +1,24 @@ ChangeLog file for zlib +Changes in 1.3 (18 Aug 2023) +- Remove K&R function definitions and zlib2ansi +- Fix bug in deflateBound() for level 0 and memLevel 9 +- Fix bug when gzungetc() is used immediately after gzopen() +- Fix bug when using gzflush() with a very small buffer +- Fix crash when gzsetparams() attempted for transparent write +- Fix test/example.c to work with FORCE_STORED +- Rewrite of zran in examples (see zran.c version history) +- Fix minizip to allow it to open an empty zip file +- Fix reading disk number start on zip64 files in minizip +- Fix logic error in minizip argument processing +- Add minizip testing to Makefile +- Read multiple bytes instead of byte-by-byte in minizip unzip.c +- Add memory sanitizer to configure (--memory) +- Various portability improvements +- Various documentation improvements +- Various spelling and typo corrections + Changes in 1.2.13 (13 Oct 2022) - Fix configure issue that discarded provided CC definition - Correct incorrect inputs provided to the CRC functions @@ -1445,7 +1463,7 @@ Changes in 0.99 (27 Jan 96) - fix typo in Make_vms.com (f$trnlnm -> f$getsyi) - in fcalloc, normalize pointer if size > 65520 bytes - don't use special fcalloc for 32 bit Borland C++ -- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc... +- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc. - use Z_BINARY instead of BINARY - document that gzclose after gzdopen will close the file - allow "a" as mode in gzopen diff --git a/src/zlib/zlib-1.2.13/FAQ b/src/zlib/zlib-1.3/FAQ similarity index 99% rename from src/zlib/zlib-1.2.13/FAQ rename to src/zlib/zlib-1.3/FAQ index 99b7cf92e..55f1cdc22 100644 --- a/src/zlib/zlib-1.2.13/FAQ +++ b/src/zlib/zlib-1.3/FAQ @@ -4,7 +4,7 @@ If your question is not there, please check the zlib home page http://zlib.net/ which may have more recent information. -The lastest zlib FAQ is at http://zlib.net/zlib_faq.html +The latest zlib FAQ is at http://zlib.net/zlib_faq.html 1. Is zlib Y2K-compliant? diff --git a/src/zlib/zlib-1.2.13/INDEX b/src/zlib/zlib-1.3/INDEX similarity index 100% rename from src/zlib/zlib-1.2.13/INDEX rename to src/zlib/zlib-1.3/INDEX diff --git a/src/zlib/zlib-1.2.13/LICENSE b/src/zlib/zlib-1.3/LICENSE similarity index 100% rename from src/zlib/zlib-1.2.13/LICENSE rename to src/zlib/zlib-1.3/LICENSE diff --git a/src/zlib/zlib-1.2.13/Makefile b/src/zlib/zlib-1.3/Makefile similarity index 100% rename from src/zlib/zlib-1.2.13/Makefile rename to src/zlib/zlib-1.3/Makefile diff --git a/src/zlib/zlib-1.2.13/Makefile.in b/src/zlib/zlib-1.3/Makefile.in similarity index 98% rename from src/zlib/zlib-1.2.13/Makefile.in rename to src/zlib/zlib-1.3/Makefile.in index 7d2713f4c..34d3cd722 100644 --- a/src/zlib/zlib-1.2.13/Makefile.in +++ b/src/zlib/zlib-1.3/Makefile.in @@ -28,7 +28,7 @@ CPP=$(CC) -E STATICLIB=libz.a SHAREDLIB=libz.so -SHAREDLIBV=libz.so.1.2.13 +SHAREDLIBV=libz.so.1.3 SHAREDLIBM=libz.so.1 LIBS=$(STATICLIB) $(SHAREDLIBV) @@ -359,8 +359,14 @@ zconf.h.cmakein: $(SRCDIR)zconf.h.in zconf: $(SRCDIR)zconf.h.in cp -p $(SRCDIR)zconf.h.in zconf.h +minizip-test: static + cd contrib/minizip && { CFLAGS="$(CFLAGS)" $(MAKE) test ; cd ../.. ; } + +minizip-clean: + cd contrib/minizip && { $(MAKE) clean ; cd ../.. ; } + mostlyclean: clean -clean: +clean: minizip-clean rm -f *.o *.lo *~ \ example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \ example64$(EXE) minigzip64$(EXE) \ diff --git a/src/zlib/zlib-1.2.13/README b/src/zlib/zlib-1.3/README similarity index 87% rename from src/zlib/zlib-1.2.13/README rename to src/zlib/zlib-1.3/README index ba34d1894..e02fc5aa2 100644 --- a/src/zlib/zlib-1.2.13/README +++ b/src/zlib/zlib-1.3/README @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.13 is a general purpose data compression library. All the code is +zlib 1.3 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and @@ -29,18 +29,17 @@ PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help. Mark Nelson wrote an article about zlib for the Jan. 1997 issue of Dr. Dobb's Journal; a copy of the article is available at -http://marknelson.us/1997/01/01/zlib-engine/ . +https://marknelson.us/posts/1997/01/01/zlib-engine.html . -The changes made in version 1.2.13 are documented in the file ChangeLog. +The changes made in version 1.3 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . -zlib is available in Java using the java.util.zip package, documented at -http://java.sun.com/developer/technicalArticles/Programming/compression/ . +zlib is available in Java using the java.util.zip package. Follow the API +Documentation link at: https://docs.oracle.com/search/?q=java.util.zip . -A Perl interface to zlib written by Paul Marquess is available -at CPAN (Comprehensive Perl Archive Network) sites, including -http://search.cpan.org/~pmqs/IO-Compress-Zlib/ . +A Perl interface to zlib and bzip2 written by Paul Marquess +can be found at https://github.com/pmqs/IO-Compress . A Python interface to zlib written by A.M. Kuchling is available in Python 1.5 and later versions, see @@ -64,7 +63,7 @@ Notes for some targets: - zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works when compiled with cc. -- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is +- On Digital Unix 4.0D (formerly OSF/1) on AlphaServer, the cc option -std1 is necessary to get gzprintf working correctly. This is done by configure. - zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with @@ -84,7 +83,7 @@ Acknowledgments: Copyright notice: - (C) 1995-2022 Jean-loup Gailly and Mark Adler + (C) 1995-2023 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/zlib/zlib-1.2.13/adler32.c b/src/zlib/zlib-1.3/adler32.c similarity index 88% rename from src/zlib/zlib-1.2.13/adler32.c rename to src/zlib/zlib-1.3/adler32.c index d0be4380a..04b81d29b 100644 --- a/src/zlib/zlib-1.2.13/adler32.c +++ b/src/zlib/zlib-1.3/adler32.c @@ -7,8 +7,6 @@ #include "zutil.h" -local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); - #define BASE 65521U /* largest prime smaller than 65536 */ #define NMAX 5552 /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ @@ -60,11 +58,7 @@ local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); #endif /* ========================================================================= */ -uLong ZEXPORT adler32_z(adler, buf, len) - uLong adler; - const Bytef *buf; - z_size_t len; -{ +uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) { unsigned long sum2; unsigned n; @@ -131,20 +125,12 @@ uLong ZEXPORT adler32_z(adler, buf, len) } /* ========================================================================= */ -uLong ZEXPORT adler32(adler, buf, len) - uLong adler; - const Bytef *buf; - uInt len; -{ +uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) { return adler32_z(adler, buf, len); } /* ========================================================================= */ -local uLong adler32_combine_(adler1, adler2, len2) - uLong adler1; - uLong adler2; - z_off64_t len2; -{ +local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) { unsigned long sum1; unsigned long sum2; unsigned rem; @@ -169,18 +155,10 @@ local uLong adler32_combine_(adler1, adler2, len2) } /* ========================================================================= */ -uLong ZEXPORT adler32_combine(adler1, adler2, len2) - uLong adler1; - uLong adler2; - z_off_t len2; -{ +uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) { return adler32_combine_(adler1, adler2, len2); } -uLong ZEXPORT adler32_combine64(adler1, adler2, len2) - uLong adler1; - uLong adler2; - z_off64_t len2; -{ +uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) { return adler32_combine_(adler1, adler2, len2); } diff --git a/src/zlib/zlib-1.2.13/amiga/Makefile.pup b/src/zlib/zlib-1.3/amiga/Makefile.pup similarity index 100% rename from src/zlib/zlib-1.2.13/amiga/Makefile.pup rename to src/zlib/zlib-1.3/amiga/Makefile.pup diff --git a/src/zlib/zlib-1.2.13/amiga/Makefile.sas b/src/zlib/zlib-1.3/amiga/Makefile.sas similarity index 100% rename from src/zlib/zlib-1.2.13/amiga/Makefile.sas rename to src/zlib/zlib-1.3/amiga/Makefile.sas diff --git a/src/zlib/zlib-1.2.13/compress.c b/src/zlib/zlib-1.3/compress.c similarity index 86% rename from src/zlib/zlib-1.2.13/compress.c rename to src/zlib/zlib-1.3/compress.c index 2ad5326c1..f43bacf7a 100644 --- a/src/zlib/zlib-1.2.13/compress.c +++ b/src/zlib/zlib-1.3/compress.c @@ -19,13 +19,8 @@ memory, Z_BUF_ERROR if there was not enough room in the output buffer, Z_STREAM_ERROR if the level parameter is invalid. */ -int ZEXPORT compress2(dest, destLen, source, sourceLen, level) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; - int level; -{ +int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source, + uLong sourceLen, int level) { z_stream stream; int err; const uInt max = (uInt)-1; @@ -65,12 +60,8 @@ int ZEXPORT compress2(dest, destLen, source, sourceLen, level) /* =========================================================================== */ -int ZEXPORT compress(dest, destLen, source, sourceLen) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; -{ +int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source, + uLong sourceLen) { return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); } @@ -78,9 +69,7 @@ int ZEXPORT compress(dest, destLen, source, sourceLen) If the default memLevel or windowBits for deflateInit() is changed, then this function needs to be updated. */ -uLong ZEXPORT compressBound(sourceLen) - uLong sourceLen; -{ +uLong ZEXPORT compressBound(uLong sourceLen) { return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + (sourceLen >> 25) + 13; } diff --git a/src/zlib/zlib-1.2.13/configure b/src/zlib/zlib-1.3/configure similarity index 97% rename from src/zlib/zlib-1.2.13/configure rename to src/zlib/zlib-1.3/configure index fa4d5daab..cc867c944 100755 --- a/src/zlib/zlib-1.2.13/configure +++ b/src/zlib/zlib-1.3/configure @@ -44,8 +44,6 @@ STATICLIB=libz.a # extract zlib version numbers from zlib.h VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < ${SRCDIR}zlib.h` -VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < ${SRCDIR}zlib.h` -VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h` VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h` # establish commands for library building @@ -90,7 +88,8 @@ build64=0 gcc=0 warn=0 debug=0 -sanitize=0 +address=0 +memory=0 old_cc="$CC" old_cflags="$CFLAGS" OBJC='$(OBJZ) $(OBJG)' @@ -102,7 +101,7 @@ leave() if test "$*" != "0"; then echo "** $0 aborting." | tee -a configure.log fi - rm -f $test.[co] $test $test$shared_ext $test.gcno ./--version + rm -rf $test.[co] $test $test$shared_ext $test.gcno $test.dSYM ./--version echo -------------------- >> configure.log echo >> configure.log echo >> configure.log @@ -141,7 +140,9 @@ case "$1" in -c* | --const) zconst=1; shift ;; -w* | --warn) warn=1; shift ;; -d* | --debug) debug=1; shift ;; - --sanitize) sanitize=1; shift ;; + --sanitize) address=1; shift ;; + --address) address=1; shift ;; + --memory) memory=1; shift ;; *) echo "unknown option: $1" | tee -a configure.log echo "$0 --help for help" | tee -a configure.log @@ -211,8 +212,11 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then CFLAGS="${CFLAGS} -Wall -Wextra" fi fi - if test $sanitize -eq 1; then - CFLAGS="${CFLAGS} -g -fsanitize=address" + if test $address -eq 1; then + CFLAGS="${CFLAGS} -g -fsanitize=address -fno-omit-frame-pointer" + fi + if test $memory -eq 1; then + CFLAGS="${CFLAGS} -g -fsanitize=memory -fno-omit-frame-pointer" fi if test $debug -eq 1; then CFLAGS="${CFLAGS} -DZLIB_DEBUG" @@ -259,8 +263,10 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then SHAREDLIB=libz$shared_ext SHAREDLIBV=libz.$VER$shared_ext SHAREDLIBM=libz.$VER1$shared_ext - LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"} - if libtool -V 2>&1 | grep Apple > /dev/null; then + LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"} + if "${CROSS_PREFIX}libtool" -V 2>&1 | grep Apple > /dev/null; then + AR="${CROSS_PREFIX}libtool" + elif libtool -V 2>&1 | grep Apple > /dev/null; then AR="libtool" else AR="/usr/bin/libtool" @@ -860,7 +866,7 @@ echo prefix = $prefix >> configure.log echo sharedlibdir = $sharedlibdir >> configure.log echo uname = $uname >> configure.log -# udpate Makefile with the configure results +# update Makefile with the configure results sed < ${SRCDIR}Makefile.in " /^CC *=/s#=.*#=$CC# /^CFLAGS *=/s#=.*#=$CFLAGS# diff --git a/src/zlib/zlib-1.2.13/contrib/README.contrib b/src/zlib/zlib-1.3/contrib/README.contrib similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/README.contrib rename to src/zlib/zlib-1.3/contrib/README.contrib diff --git a/src/zlib/zlib-1.2.13/contrib/ada/buffer_demo.adb b/src/zlib/zlib-1.3/contrib/ada/buffer_demo.adb similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/ada/buffer_demo.adb rename to src/zlib/zlib-1.3/contrib/ada/buffer_demo.adb diff --git a/src/zlib/zlib-1.2.13/contrib/ada/mtest.adb b/src/zlib/zlib-1.3/contrib/ada/mtest.adb similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/ada/mtest.adb rename to src/zlib/zlib-1.3/contrib/ada/mtest.adb diff --git a/src/zlib/zlib-1.2.13/contrib/ada/read.adb b/src/zlib/zlib-1.3/contrib/ada/read.adb similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/ada/read.adb rename to src/zlib/zlib-1.3/contrib/ada/read.adb diff --git a/src/zlib/zlib-1.2.13/contrib/ada/readme.txt b/src/zlib/zlib-1.3/contrib/ada/readme.txt similarity index 93% rename from src/zlib/zlib-1.2.13/contrib/ada/readme.txt rename to src/zlib/zlib-1.3/contrib/ada/readme.txt index ce4d2cadf..efdd639fb 100644 --- a/src/zlib/zlib-1.2.13/contrib/ada/readme.txt +++ b/src/zlib/zlib-1.3/contrib/ada/readme.txt @@ -8,8 +8,8 @@ It provides Ada-style access to the ZLib C library. Here are the main changes since ZLib.Ada 1.2: -- Attension: ZLib.Read generic routine have a initialization requirement - for Read_Last parameter now. It is a bit incompartible with previous version, +- Attention: ZLib.Read generic routine have a initialization requirement + for Read_Last parameter now. It is a bit incompatible with previous version, but extends functionality, we could use new parameters Allow_Read_Some and Flush now. diff --git a/src/zlib/zlib-1.2.13/contrib/ada/test.adb b/src/zlib/zlib-1.3/contrib/ada/test.adb similarity index 99% rename from src/zlib/zlib-1.2.13/contrib/ada/test.adb rename to src/zlib/zlib-1.3/contrib/ada/test.adb index 90773acfa..8b3503150 100644 --- a/src/zlib/zlib-1.2.13/contrib/ada/test.adb +++ b/src/zlib/zlib-1.3/contrib/ada/test.adb @@ -65,12 +65,12 @@ procedure Test is Time_Stamp : Ada.Calendar.Time; procedure Generate_File; - -- Generate file of spetsified size with some random data. + -- Generate file of specified size with some random data. -- The random data is repeatable, for the good compression. procedure Compare_Streams (Left, Right : in out Root_Stream_Type'Class); - -- The procedure compearing data in 2 streams. + -- The procedure comparing data in 2 streams. -- It is for compare data before and after compression/decompression. procedure Compare_Files (Left, Right : String); diff --git a/src/zlib/zlib-1.2.13/contrib/ada/zlib-streams.adb b/src/zlib/zlib-1.3/contrib/ada/zlib-streams.adb similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/ada/zlib-streams.adb rename to src/zlib/zlib-1.3/contrib/ada/zlib-streams.adb diff --git a/src/zlib/zlib-1.2.13/contrib/ada/zlib-streams.ads b/src/zlib/zlib-1.3/contrib/ada/zlib-streams.ads similarity index 98% rename from src/zlib/zlib-1.2.13/contrib/ada/zlib-streams.ads rename to src/zlib/zlib-1.3/contrib/ada/zlib-streams.ads index 8e26cd450..af136933e 100644 --- a/src/zlib/zlib-1.2.13/contrib/ada/zlib-streams.ads +++ b/src/zlib/zlib-1.3/contrib/ada/zlib-streams.ads @@ -62,7 +62,7 @@ package ZLib.Streams is := Default_Buffer_Size; Write_Buffer_Size : in Ada.Streams.Stream_Element_Offset := Default_Buffer_Size); - -- Create the Comression/Decompression stream. + -- Create the Compression/Decompression stream. -- If mode is In_Stream then Write operation is disabled. -- If mode is Out_Stream then Read operation is disabled. diff --git a/src/zlib/zlib-1.2.13/contrib/ada/zlib-thin.adb b/src/zlib/zlib-1.3/contrib/ada/zlib-thin.adb similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/ada/zlib-thin.adb rename to src/zlib/zlib-1.3/contrib/ada/zlib-thin.adb diff --git a/src/zlib/zlib-1.2.13/contrib/ada/zlib-thin.ads b/src/zlib/zlib-1.3/contrib/ada/zlib-thin.ads similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/ada/zlib-thin.ads rename to src/zlib/zlib-1.3/contrib/ada/zlib-thin.ads diff --git a/src/zlib/zlib-1.2.13/contrib/ada/zlib.adb b/src/zlib/zlib-1.3/contrib/ada/zlib.adb similarity index 99% rename from src/zlib/zlib-1.2.13/contrib/ada/zlib.adb rename to src/zlib/zlib-1.3/contrib/ada/zlib.adb index 8b6fd686a..c1abe791d 100644 --- a/src/zlib/zlib-1.2.13/contrib/ada/zlib.adb +++ b/src/zlib/zlib-1.3/contrib/ada/zlib.adb @@ -204,7 +204,7 @@ package body ZLib is end if; -- We allow ZLib to make header only in case of default header type. - -- Otherwise we would either do header by ourselfs, or do not do + -- Otherwise we would either do header by ourselves, or do not do -- header at all. if Header = None or else Header = GZip then diff --git a/src/zlib/zlib-1.2.13/contrib/ada/zlib.ads b/src/zlib/zlib-1.3/contrib/ada/zlib.ads similarity index 99% rename from src/zlib/zlib-1.2.13/contrib/ada/zlib.ads rename to src/zlib/zlib-1.3/contrib/ada/zlib.ads index 79ffc4095..81aaf1b6a 100644 --- a/src/zlib/zlib-1.2.13/contrib/ada/zlib.ads +++ b/src/zlib/zlib-1.3/contrib/ada/zlib.ads @@ -114,7 +114,7 @@ package ZLib is -- Compression strategy constants -- ------------------------------------ - -- RLE stategy could be used only in version 1.2.0 and later. + -- RLE strategy could be used only in version 1.2.0 and later. Filtered : constant Strategy_Type; Huffman_Only : constant Strategy_Type; diff --git a/src/zlib/zlib-1.2.13/contrib/ada/zlib.gpr b/src/zlib/zlib-1.3/contrib/ada/zlib.gpr similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/ada/zlib.gpr rename to src/zlib/zlib-1.3/contrib/ada/zlib.gpr diff --git a/src/zlib/zlib-1.2.13/contrib/blast/Makefile b/src/zlib/zlib-1.3/contrib/blast/Makefile similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/blast/Makefile rename to src/zlib/zlib-1.3/contrib/blast/Makefile diff --git a/src/zlib/zlib-1.2.13/contrib/blast/README b/src/zlib/zlib-1.3/contrib/blast/README similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/blast/README rename to src/zlib/zlib-1.3/contrib/blast/README diff --git a/src/zlib/zlib-1.2.13/contrib/blast/blast.c b/src/zlib/zlib-1.3/contrib/blast/blast.c similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/blast/blast.c rename to src/zlib/zlib-1.3/contrib/blast/blast.c diff --git a/src/zlib/zlib-1.2.13/contrib/blast/blast.h b/src/zlib/zlib-1.3/contrib/blast/blast.h similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/blast/blast.h rename to src/zlib/zlib-1.3/contrib/blast/blast.h diff --git a/src/zlib/zlib-1.2.13/contrib/blast/test.pk b/src/zlib/zlib-1.3/contrib/blast/test.pk similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/blast/test.pk rename to src/zlib/zlib-1.3/contrib/blast/test.pk diff --git a/src/zlib/zlib-1.2.13/contrib/blast/test.txt b/src/zlib/zlib-1.3/contrib/blast/test.txt similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/blast/test.txt rename to src/zlib/zlib-1.3/contrib/blast/test.txt diff --git a/src/zlib/zlib-1.2.13/contrib/delphi/ZLib.pas b/src/zlib/zlib-1.3/contrib/delphi/ZLib.pas similarity index 99% rename from src/zlib/zlib-1.2.13/contrib/delphi/ZLib.pas rename to src/zlib/zlib-1.3/contrib/delphi/ZLib.pas index 8be5fa22c..814ffa670 100644 --- a/src/zlib/zlib-1.2.13/contrib/delphi/ZLib.pas +++ b/src/zlib/zlib-1.3/contrib/delphi/ZLib.pas @@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; const OutBuf: Pointer; BufSize: Integer); const - zlib_version = '1.2.13'; + zlib_version = '1.3.0'; type EZlibError = class(Exception); diff --git a/src/zlib/zlib-1.2.13/contrib/delphi/ZLibConst.pas b/src/zlib/zlib-1.3/contrib/delphi/ZLibConst.pas similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/delphi/ZLibConst.pas rename to src/zlib/zlib-1.3/contrib/delphi/ZLibConst.pas diff --git a/src/zlib/zlib-1.2.13/contrib/delphi/readme.txt b/src/zlib/zlib-1.3/contrib/delphi/readme.txt similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/delphi/readme.txt rename to src/zlib/zlib-1.3/contrib/delphi/readme.txt diff --git a/src/zlib/zlib-1.2.13/contrib/delphi/zlibd32.mak b/src/zlib/zlib-1.3/contrib/delphi/zlibd32.mak similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/delphi/zlibd32.mak rename to src/zlib/zlib-1.3/contrib/delphi/zlibd32.mak diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib.build b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib.build similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib.build rename to src/zlib/zlib-1.3/contrib/dotzlib/DotZLib.build diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib.chm b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib.chm similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib.chm rename to src/zlib/zlib-1.3/contrib/dotzlib/DotZLib.chm diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib.sln b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib.sln similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib.sln rename to src/zlib/zlib-1.3/contrib/dotzlib/DotZLib.sln diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/AssemblyInfo.cs b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/AssemblyInfo.cs similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/AssemblyInfo.cs rename to src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/AssemblyInfo.cs diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/ChecksumImpl.cs b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/ChecksumImpl.cs similarity index 97% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/ChecksumImpl.cs rename to src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/ChecksumImpl.cs index 788b2fcec..c1230bf03 100644 --- a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/ChecksumImpl.cs +++ b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/ChecksumImpl.cs @@ -61,7 +61,7 @@ public ChecksumGeneratorBase(uint initialValue) /// The sum of offset and count is larger than the length of data /// data is a null reference /// Offset or count is negative. - /// All the other Update methods are implmeneted in terms of this one. + /// All the other Update methods are implemented in terms of this one. /// This is therefore the only method a derived class has to implement public abstract void Update(byte[] data, int offset, int count); diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/CircularBuffer.cs b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/CircularBuffer.cs similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/CircularBuffer.cs rename to src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/CircularBuffer.cs diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/CodecBase.cs b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/CodecBase.cs similarity index 96% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/CodecBase.cs rename to src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/CodecBase.cs index 42e6da3a5..c4bc8b879 100644 --- a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/CodecBase.cs +++ b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/CodecBase.cs @@ -139,7 +139,7 @@ public void Dispose() /// This must be implemented by a derived class protected abstract void CleanUp(); - // performs the release of the handles and calls the dereived CleanUp() + // performs the release of the handles and calls the derived CleanUp() private void CleanUp(bool isDisposing) { if (!_isDisposed) @@ -160,7 +160,7 @@ private void CleanUp(bool isDisposing) #region Helper methods /// - /// Copies a number of bytes to the internal codec buffer - ready for proccesing + /// Copies a number of bytes to the internal codec buffer - ready for processing /// /// The byte array that contains the data to copy /// The index of the first byte to copy diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/Deflater.cs b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/Deflater.cs similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/Deflater.cs rename to src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/Deflater.cs diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/DotZLib.cs b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/DotZLib.cs similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/DotZLib.cs rename to src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/DotZLib.cs diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/DotZLib.csproj b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/DotZLib.csproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/DotZLib.csproj rename to src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/DotZLib.csproj diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/GZipStream.cs b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/GZipStream.cs similarity index 96% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/GZipStream.cs rename to src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/GZipStream.cs index b161300b1..58091d3a3 100644 --- a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/GZipStream.cs +++ b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/GZipStream.cs @@ -246,7 +246,7 @@ public override void SetLength(long value) } /// - /// Not suppported. + /// Not supported. /// /// /// @@ -268,7 +268,7 @@ public override void Flush() } /// - /// Gets/sets the current position in the GZipStream. Not suppported. + /// Gets/sets the current position in the GZipStream. Not supported. /// /// In this implementation this property is not supported /// Always thrown @@ -285,7 +285,7 @@ public override long Position } /// - /// Gets the size of the stream. Not suppported. + /// Gets the size of the stream. Not supported. /// /// In this implementation this property is not supported /// Always thrown diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/Inflater.cs b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/Inflater.cs similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/Inflater.cs rename to src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/Inflater.cs diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/UnitTests.cs b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/UnitTests.cs similarity index 95% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/UnitTests.cs rename to src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/UnitTests.cs index 16a0ebb07..c5fce221a 100644 --- a/src/zlib/zlib-1.2.13/contrib/dotzlib/DotZLib/UnitTests.cs +++ b/src/zlib/zlib-1.3/contrib/dotzlib/DotZLib/UnitTests.cs @@ -156,7 +156,7 @@ public class InfoTests public void Info_Version() { Info info = new Info(); - Assert.AreEqual("1.2.13", Info.Version); + Assert.AreEqual("1.3.0", Info.Version); Assert.AreEqual(32, info.SizeOfUInt); Assert.AreEqual(32, info.SizeOfULong); Assert.AreEqual(32, info.SizeOfPointer); diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/LICENSE_1_0.txt b/src/zlib/zlib-1.3/contrib/dotzlib/LICENSE_1_0.txt similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/LICENSE_1_0.txt rename to src/zlib/zlib-1.3/contrib/dotzlib/LICENSE_1_0.txt diff --git a/src/zlib/zlib-1.2.13/contrib/dotzlib/readme.txt b/src/zlib/zlib-1.3/contrib/dotzlib/readme.txt similarity index 94% rename from src/zlib/zlib-1.2.13/contrib/dotzlib/readme.txt rename to src/zlib/zlib-1.3/contrib/dotzlib/readme.txt index b2395720d..47454fce3 100644 --- a/src/zlib/zlib-1.2.13/contrib/dotzlib/readme.txt +++ b/src/zlib/zlib-1.3/contrib/dotzlib/readme.txt @@ -36,7 +36,7 @@ Build instructions: in the same directory as the DotZLib.build file. You can define 2 properties on the nant command-line to control the build: debug={true|false} to toggle between release/debug builds (default=true). - nunit={true|false} to include or esclude unit tests (default=true). + nunit={true|false} to include or exclude unit tests (default=true). Also the target clean will remove binaries. Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on whether you are building the release diff --git a/src/zlib/zlib-1.2.13/contrib/gcc_gvmat64/gvmat64.S b/src/zlib/zlib-1.3/contrib/gcc_gvmat64/gvmat64.S similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/gcc_gvmat64/gvmat64.S rename to src/zlib/zlib-1.3/contrib/gcc_gvmat64/gvmat64.S diff --git a/src/zlib/zlib-1.2.13/contrib/infback9/README b/src/zlib/zlib-1.3/contrib/infback9/README similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/infback9/README rename to src/zlib/zlib-1.3/contrib/infback9/README diff --git a/src/zlib/zlib-1.2.13/contrib/infback9/infback9.c b/src/zlib/zlib-1.3/contrib/infback9/infback9.c similarity index 98% rename from src/zlib/zlib-1.2.13/contrib/infback9/infback9.c rename to src/zlib/zlib-1.3/contrib/infback9/infback9.c index 05fb3e338..742a39214 100644 --- a/src/zlib/zlib-1.2.13/contrib/infback9/infback9.c +++ b/src/zlib/zlib-1.3/contrib/infback9/infback9.c @@ -16,12 +16,8 @@ window is a user-supplied window and output buffer that is 64K bytes. */ -int ZEXPORT inflateBack9Init_(strm, window, version, stream_size) -z_stream FAR *strm; -unsigned char FAR *window; -const char *version; -int stream_size; -{ +int ZEXPORT inflateBack9Init_(z_stream FAR *strm, unsigned char FAR *window, + const char *version, int stream_size) { struct inflate_state FAR *state; if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || @@ -51,8 +47,7 @@ int stream_size; #ifdef MAKEFIXED #include -void makefixed9(void) -{ +void makefixed9(void) { unsigned sym, bits, low, size; code *next, *lenfix, *distfix; struct inflate_state state; @@ -214,13 +209,8 @@ void makefixed9(void) inflateBack() can also return Z_STREAM_ERROR if the input parameters are not correct, i.e. strm is Z_NULL or the state was not initialized. */ -int ZEXPORT inflateBack9(strm, in, in_desc, out, out_desc) -z_stream FAR *strm; -in_func in; -void FAR *in_desc; -out_func out; -void FAR *out_desc; -{ +int ZEXPORT inflateBack9(z_stream FAR *strm, in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc) { struct inflate_state FAR *state; z_const unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ @@ -603,9 +593,7 @@ void FAR *out_desc; return ret; } -int ZEXPORT inflateBack9End(strm) -z_stream FAR *strm; -{ +int ZEXPORT inflateBack9End(z_stream FAR *strm) { if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) return Z_STREAM_ERROR; ZFREE(strm, strm->state); diff --git a/src/zlib/zlib-1.2.13/contrib/infback9/infback9.h b/src/zlib/zlib-1.3/contrib/infback9/infback9.h similarity index 68% rename from src/zlib/zlib-1.2.13/contrib/infback9/infback9.h rename to src/zlib/zlib-1.3/contrib/infback9/infback9.h index 1073c0a38..8371b4ec7 100644 --- a/src/zlib/zlib-1.2.13/contrib/infback9/infback9.h +++ b/src/zlib/zlib-1.3/contrib/infback9/infback9.h @@ -20,14 +20,14 @@ extern "C" { #endif -ZEXTERN int ZEXPORT inflateBack9 OF((z_stream FAR *strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); -ZEXTERN int ZEXPORT inflateBack9End OF((z_stream FAR *strm)); -ZEXTERN int ZEXPORT inflateBack9Init_ OF((z_stream FAR *strm, - unsigned char FAR *window, - const char *version, - int stream_size)); +ZEXTERN int ZEXPORT inflateBack9(z_stream FAR *strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc); +ZEXTERN int ZEXPORT inflateBack9End(z_stream FAR *strm); +ZEXTERN int ZEXPORT inflateBack9Init_(z_stream FAR *strm, + unsigned char FAR *window, + const char *version, + int stream_size); #define inflateBack9Init(strm, window) \ inflateBack9Init_((strm), (window), \ ZLIB_VERSION, sizeof(z_stream)) diff --git a/src/zlib/zlib-1.2.13/contrib/infback9/inffix9.h b/src/zlib/zlib-1.3/contrib/infback9/inffix9.h similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/infback9/inffix9.h rename to src/zlib/zlib-1.3/contrib/infback9/inffix9.h diff --git a/src/zlib/zlib-1.2.13/contrib/infback9/inflate9.h b/src/zlib/zlib-1.3/contrib/infback9/inflate9.h similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/infback9/inflate9.h rename to src/zlib/zlib-1.3/contrib/infback9/inflate9.h diff --git a/src/zlib/zlib-1.2.13/contrib/infback9/inftree9.c b/src/zlib/zlib-1.3/contrib/infback9/inftree9.c similarity index 97% rename from src/zlib/zlib-1.2.13/contrib/infback9/inftree9.c rename to src/zlib/zlib-1.3/contrib/infback9/inftree9.c index 10827a6aa..dc38f24de 100644 --- a/src/zlib/zlib-1.2.13/contrib/infback9/inftree9.c +++ b/src/zlib/zlib-1.3/contrib/infback9/inftree9.c @@ -1,5 +1,5 @@ /* inftree9.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2022 Mark Adler + * Copyright (C) 1995-2023 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate9_copyright[] = - " inflate9 1.2.13 Copyright 1995-2022 Mark Adler "; + " inflate9 1.3 Copyright 1995-2023 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -29,14 +29,9 @@ const char inflate9_copyright[] = table index bits. It will differ if the request is greater than the longest code or if it is less than the shortest code. */ -int inflate_table9(type, lens, codes, table, bits, work) -codetype type; -unsigned short FAR *lens; -unsigned codes; -code FAR * FAR *table; -unsigned FAR *bits; -unsigned short FAR *work; -{ +int inflate_table9(codetype type, unsigned short FAR *lens, unsigned codes, + code FAR * FAR *table, unsigned FAR *bits, + unsigned short FAR *work) { unsigned len; /* a code's length in bits */ unsigned sym; /* index of code symbols */ unsigned min, max; /* minimum and maximum code lengths */ @@ -64,7 +59,7 @@ unsigned short FAR *work; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, - 133, 133, 133, 133, 144, 194, 65}; + 133, 133, 133, 133, 144, 198, 203}; static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, diff --git a/src/zlib/zlib-1.2.13/contrib/infback9/inftree9.h b/src/zlib/zlib-1.3/contrib/infback9/inftree9.h similarity index 92% rename from src/zlib/zlib-1.2.13/contrib/infback9/inftree9.h rename to src/zlib/zlib-1.3/contrib/infback9/inftree9.h index 3b394978e..2c1252f57 100644 --- a/src/zlib/zlib-1.2.13/contrib/infback9/inftree9.h +++ b/src/zlib/zlib-1.3/contrib/infback9/inftree9.h @@ -56,6 +56,6 @@ typedef enum { DISTS } codetype; -extern int inflate_table9 OF((codetype type, unsigned short FAR *lens, - unsigned codes, code FAR * FAR *table, - unsigned FAR *bits, unsigned short FAR *work)); +extern int inflate_table9(codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work); diff --git a/src/zlib/zlib-1.2.13/contrib/iostream/test.cpp b/src/zlib/zlib-1.3/contrib/iostream/test.cpp similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/iostream/test.cpp rename to src/zlib/zlib-1.3/contrib/iostream/test.cpp diff --git a/src/zlib/zlib-1.2.13/contrib/iostream/zfstream.cpp b/src/zlib/zlib-1.3/contrib/iostream/zfstream.cpp similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/iostream/zfstream.cpp rename to src/zlib/zlib-1.3/contrib/iostream/zfstream.cpp diff --git a/src/zlib/zlib-1.2.13/contrib/iostream/zfstream.h b/src/zlib/zlib-1.3/contrib/iostream/zfstream.h similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/iostream/zfstream.h rename to src/zlib/zlib-1.3/contrib/iostream/zfstream.h diff --git a/src/zlib/zlib-1.2.13/contrib/iostream2/zstream.h b/src/zlib/zlib-1.3/contrib/iostream2/zstream.h similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/iostream2/zstream.h rename to src/zlib/zlib-1.3/contrib/iostream2/zstream.h diff --git a/src/zlib/zlib-1.2.13/contrib/iostream2/zstream_test.cpp b/src/zlib/zlib-1.3/contrib/iostream2/zstream_test.cpp similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/iostream2/zstream_test.cpp rename to src/zlib/zlib-1.3/contrib/iostream2/zstream_test.cpp diff --git a/src/zlib/zlib-1.2.13/contrib/iostream3/README b/src/zlib/zlib-1.3/contrib/iostream3/README similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/iostream3/README rename to src/zlib/zlib-1.3/contrib/iostream3/README diff --git a/src/zlib/zlib-1.2.13/contrib/iostream3/TODO b/src/zlib/zlib-1.3/contrib/iostream3/TODO similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/iostream3/TODO rename to src/zlib/zlib-1.3/contrib/iostream3/TODO diff --git a/src/zlib/zlib-1.2.13/contrib/iostream3/test.cc b/src/zlib/zlib-1.3/contrib/iostream3/test.cc similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/iostream3/test.cc rename to src/zlib/zlib-1.3/contrib/iostream3/test.cc diff --git a/src/zlib/zlib-1.2.13/contrib/iostream3/zfstream.cc b/src/zlib/zlib-1.3/contrib/iostream3/zfstream.cc similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/iostream3/zfstream.cc rename to src/zlib/zlib-1.3/contrib/iostream3/zfstream.cc diff --git a/src/zlib/zlib-1.2.13/contrib/iostream3/zfstream.h b/src/zlib/zlib-1.3/contrib/iostream3/zfstream.h similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/iostream3/zfstream.h rename to src/zlib/zlib-1.3/contrib/iostream3/zfstream.h diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/Makefile b/src/zlib/zlib-1.3/contrib/minizip/Makefile similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/minizip/Makefile rename to src/zlib/zlib-1.3/contrib/minizip/Makefile diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/Makefile.am b/src/zlib/zlib-1.3/contrib/minizip/Makefile.am similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/minizip/Makefile.am rename to src/zlib/zlib-1.3/contrib/minizip/Makefile.am diff --git a/src/zlib/zlib-1.3/contrib/minizip/MiniZip64_Changes.txt b/src/zlib/zlib-1.3/contrib/minizip/MiniZip64_Changes.txt new file mode 100644 index 000000000..375946811 --- /dev/null +++ b/src/zlib/zlib-1.3/contrib/minizip/MiniZip64_Changes.txt @@ -0,0 +1,6 @@ + +MiniZip 1.1 was derived from MiniZip at version 1.01f + +Change in 1.0 (Okt 2009) + - **TODO - Add history** + diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/MiniZip64_info.txt b/src/zlib/zlib-1.3/contrib/minizip/MiniZip64_info.txt similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/minizip/MiniZip64_info.txt rename to src/zlib/zlib-1.3/contrib/minizip/MiniZip64_info.txt diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/configure.ac b/src/zlib/zlib-1.3/contrib/minizip/configure.ac similarity index 93% rename from src/zlib/zlib-1.2.13/contrib/minizip/configure.ac rename to src/zlib/zlib-1.3/contrib/minizip/configure.ac index bff300b30..df80e5b7e 100644 --- a/src/zlib/zlib-1.2.13/contrib/minizip/configure.ac +++ b/src/zlib/zlib-1.3/contrib/minizip/configure.ac @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_INIT([minizip], [1.2.13], [bugzilla.redhat.com]) +AC_INIT([minizip], [1.3.0], [bugzilla.redhat.com]) AC_CONFIG_SRCDIR([minizip.c]) AM_INIT_AUTOMAKE([foreign]) LT_INIT diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/crypt.h b/src/zlib/zlib-1.3/contrib/minizip/crypt.h similarity index 94% rename from src/zlib/zlib-1.2.13/contrib/minizip/crypt.h rename to src/zlib/zlib-1.3/contrib/minizip/crypt.h index 1cc41f19d..f4b93b78d 100644 --- a/src/zlib/zlib-1.2.13/contrib/minizip/crypt.h +++ b/src/zlib/zlib-1.3/contrib/minizip/crypt.h @@ -32,8 +32,7 @@ /*********************************************************************** * Return the next byte in the pseudo-random sequence */ -static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) -{ +static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) { unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an * unpredictable manner on 16-bit systems; not a problem * with any known compiler so far, though */ @@ -46,8 +45,7 @@ static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) /*********************************************************************** * Update the encryption keys with the next byte of plain text */ -static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c) -{ +static int update_keys(unsigned long* pkeys, const z_crc_t* pcrc_32_tab, int c) { (*(pkeys+0)) = CRC32((*(pkeys+0)), c); (*(pkeys+1)) += (*(pkeys+0)) & 0xff; (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1; @@ -63,8 +61,7 @@ static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c) * Initialize the encryption keys and the random header according to * the given password. */ -static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab) -{ +static void init_keys(const char* passwd, unsigned long* pkeys, const z_crc_t* pcrc_32_tab) { *(pkeys+0) = 305419896L; *(pkeys+1) = 591751049L; *(pkeys+2) = 878082192L; @@ -93,8 +90,7 @@ static unsigned crypthead(const char* passwd, /* password string */ int bufSize, unsigned long* pkeys, const z_crc_t* pcrc_32_tab, - unsigned long crcForCrypting) -{ + unsigned long crcForCrypting) { unsigned n; /* index in random header */ int t; /* temporary */ int c; /* random byte */ diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/ioapi.c b/src/zlib/zlib-1.3/contrib/minizip/ioapi.c similarity index 74% rename from src/zlib/zlib-1.2.13/contrib/minizip/ioapi.c rename to src/zlib/zlib-1.3/contrib/minizip/ioapi.c index 814a6fd38..782d32469 100644 --- a/src/zlib/zlib-1.2.13/contrib/minizip/ioapi.c +++ b/src/zlib/zlib-1.3/contrib/minizip/ioapi.c @@ -14,7 +14,7 @@ #define _CRT_SECURE_NO_WARNINGS #endif -#if defined(__APPLE__) || defined(IOAPI_NO_64) +#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__HAIKU__) || defined(MINIZIP_FOPEN_NO_64) // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions #define FOPEN_FUNC(filename, mode) fopen(filename, mode) #define FTELLO_FUNC(stream) ftello(stream) @@ -28,8 +28,7 @@ #include "ioapi.h" -voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode) -{ +voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc, const void*filename, int mode) { if (pfilefunc->zfile_func64.zopen64_file != NULL) return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode); else @@ -38,8 +37,7 @@ voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename } } -long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin) -{ +long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin) { if (pfilefunc->zfile_func64.zseek64_file != NULL) return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin); else @@ -52,8 +50,7 @@ long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZP } } -ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream) -{ +ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc, voidpf filestream) { if (pfilefunc->zfile_func64.zseek64_file != NULL) return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream); else @@ -66,11 +63,9 @@ ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream } } -void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32) -{ +void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32, const zlib_filefunc_def* p_filefunc32) { p_filefunc64_32->zfile_func64.zopen64_file = NULL; p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file; - p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file; p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file; p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file; p_filefunc64_32->zfile_func64.ztell64_file = NULL; @@ -84,16 +79,7 @@ void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filef -static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode)); -static uLong ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size)); -static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size)); -static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream)); -static long ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); -static int ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream)); -static int ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream)); - -static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode) -{ +static voidpf ZCALLBACK fopen_file_func(voidpf opaque, const char* filename, int mode) { FILE* file = NULL; const char* mode_fopen = NULL; (void)opaque; @@ -111,8 +97,7 @@ static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, in return file; } -static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode) -{ +static voidpf ZCALLBACK fopen64_file_func(voidpf opaque, const void* filename, int mode) { FILE* file = NULL; const char* mode_fopen = NULL; (void)opaque; @@ -131,24 +116,21 @@ static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, } -static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size) -{ +static uLong ZCALLBACK fread_file_func(voidpf opaque, voidpf stream, void* buf, uLong size) { uLong ret; (void)opaque; ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream); return ret; } -static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size) -{ +static uLong ZCALLBACK fwrite_file_func(voidpf opaque, voidpf stream, const void* buf, uLong size) { uLong ret; (void)opaque; ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream); return ret; } -static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream) -{ +static long ZCALLBACK ftell_file_func(voidpf opaque, voidpf stream) { long ret; (void)opaque; ret = ftell((FILE *)stream); @@ -156,16 +138,14 @@ static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream) } -static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream) -{ +static ZPOS64_T ZCALLBACK ftell64_file_func(voidpf opaque, voidpf stream) { ZPOS64_T ret; (void)opaque; ret = (ZPOS64_T)FTELLO_FUNC((FILE *)stream); return ret; } -static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin) -{ +static long ZCALLBACK fseek_file_func(voidpf opaque, voidpf stream, uLong offset, int origin) { int fseek_origin=0; long ret; (void)opaque; @@ -188,8 +168,7 @@ static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offs return ret; } -static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) -{ +static long ZCALLBACK fseek64_file_func(voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) { int fseek_origin=0; long ret; (void)opaque; @@ -208,32 +187,28 @@ static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T } ret = 0; - if(FSEEKO_FUNC((FILE *)stream, (z_off_t)offset, fseek_origin) != 0) + if(FSEEKO_FUNC((FILE *)stream, (z_off64_t)offset, fseek_origin) != 0) ret = -1; return ret; } -static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream) -{ +static int ZCALLBACK fclose_file_func(voidpf opaque, voidpf stream) { int ret; (void)opaque; ret = fclose((FILE *)stream); return ret; } -static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream) -{ +static int ZCALLBACK ferror_file_func(voidpf opaque, voidpf stream) { int ret; (void)opaque; ret = ferror((FILE *)stream); return ret; } -void fill_fopen_filefunc (pzlib_filefunc_def) - zlib_filefunc_def* pzlib_filefunc_def; -{ +void fill_fopen_filefunc(zlib_filefunc_def* pzlib_filefunc_def) { pzlib_filefunc_def->zopen_file = fopen_file_func; pzlib_filefunc_def->zread_file = fread_file_func; pzlib_filefunc_def->zwrite_file = fwrite_file_func; @@ -244,8 +219,7 @@ void fill_fopen_filefunc (pzlib_filefunc_def) pzlib_filefunc_def->opaque = NULL; } -void fill_fopen64_filefunc (zlib_filefunc64_def* pzlib_filefunc_def) -{ +void fill_fopen64_filefunc(zlib_filefunc64_def* pzlib_filefunc_def) { pzlib_filefunc_def->zopen64_file = fopen64_file_func; pzlib_filefunc_def->zread_file = fread_file_func; pzlib_filefunc_def->zwrite_file = fwrite_file_func; diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/ioapi.h b/src/zlib/zlib-1.3/contrib/minizip/ioapi.h similarity index 77% rename from src/zlib/zlib-1.2.13/contrib/minizip/ioapi.h rename to src/zlib/zlib-1.3/contrib/minizip/ioapi.h index ae9ca7e83..c588a18d0 100644 --- a/src/zlib/zlib-1.2.13/contrib/minizip/ioapi.h +++ b/src/zlib/zlib-1.3/contrib/minizip/ioapi.h @@ -50,7 +50,7 @@ #define ftello64 ftell #define fseeko64 fseek #else -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__) || defined(MINIZIP_FOPEN_NO_64) #define fopen64 fopen #define ftello64 ftello #define fseeko64 fseeko @@ -82,7 +82,7 @@ #include "mz64conf.h" #endif -/* a type choosen by DEFINE */ +/* a type chosen by DEFINE */ #ifdef HAVE_64BIT_INT_CUSTOM typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T; #else @@ -134,14 +134,14 @@ extern "C" { -typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); -typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); -typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); -typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); -typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); +typedef voidpf (ZCALLBACK *open_file_func) (voidpf opaque, const char* filename, int mode); +typedef uLong (ZCALLBACK *read_file_func) (voidpf opaque, voidpf stream, void* buf, uLong size); +typedef uLong (ZCALLBACK *write_file_func) (voidpf opaque, voidpf stream, const void* buf, uLong size); +typedef int (ZCALLBACK *close_file_func) (voidpf opaque, voidpf stream); +typedef int (ZCALLBACK *testerror_file_func) (voidpf opaque, voidpf stream); -typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); -typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); +typedef long (ZCALLBACK *tell_file_func) (voidpf opaque, voidpf stream); +typedef long (ZCALLBACK *seek_file_func) (voidpf opaque, voidpf stream, uLong offset, int origin); /* here is the "old" 32 bits structure structure */ @@ -157,9 +157,9 @@ typedef struct zlib_filefunc_def_s voidpf opaque; } zlib_filefunc_def; -typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream)); -typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); -typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque, const void* filename, int mode)); +typedef ZPOS64_T (ZCALLBACK *tell64_file_func) (voidpf opaque, voidpf stream); +typedef long (ZCALLBACK *seek64_file_func) (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin); +typedef voidpf (ZCALLBACK *open64_file_func) (voidpf opaque, const void* filename, int mode); typedef struct zlib_filefunc64_def_s { @@ -173,8 +173,8 @@ typedef struct zlib_filefunc64_def_s voidpf opaque; } zlib_filefunc64_def; -void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def)); -void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); +void fill_fopen64_filefunc(zlib_filefunc64_def* pzlib_filefunc_def); +void fill_fopen_filefunc(zlib_filefunc_def* pzlib_filefunc_def); /* now internal definition, only for zip.c and unzip.h */ typedef struct zlib_filefunc64_32_def_s @@ -193,11 +193,11 @@ typedef struct zlib_filefunc64_32_def_s #define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream)) #define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream)) -voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)); -long call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)); -ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)); +voidpf call_zopen64(const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode); +long call_zseek64(const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin); +ZPOS64_T call_ztell64(const zlib_filefunc64_32_def* pfilefunc,voidpf filestream); -void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32); +void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32); #define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode))) #define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream))) diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/iowin32.c b/src/zlib/zlib-1.3/contrib/minizip/iowin32.c similarity index 87% rename from src/zlib/zlib-1.2.13/contrib/minizip/iowin32.c rename to src/zlib/zlib-1.3/contrib/minizip/iowin32.c index 7df525172..08536e94b 100644 --- a/src/zlib/zlib-1.2.13/contrib/minizip/iowin32.c +++ b/src/zlib/zlib-1.3/contrib/minizip/iowin32.c @@ -38,14 +38,6 @@ #endif #endif -voidpf ZCALLBACK win32_open_file_func OF((voidpf opaque, const char* filename, int mode)); -uLong ZCALLBACK win32_read_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size)); -uLong ZCALLBACK win32_write_file_func OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); -ZPOS64_T ZCALLBACK win32_tell64_file_func OF((voidpf opaque, voidpf stream)); -long ZCALLBACK win32_seek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); -int ZCALLBACK win32_close_file_func OF((voidpf opaque, voidpf stream)); -int ZCALLBACK win32_error_file_func OF((voidpf opaque, voidpf stream)); - typedef struct { HANDLE hf; @@ -57,8 +49,7 @@ static void win32_translate_open_mode(int mode, DWORD* lpdwDesiredAccess, DWORD* lpdwCreationDisposition, DWORD* lpdwShareMode, - DWORD* lpdwFlagsAndAttributes) -{ + DWORD* lpdwFlagsAndAttributes) { *lpdwDesiredAccess = *lpdwShareMode = *lpdwFlagsAndAttributes = *lpdwCreationDisposition = 0; if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) @@ -79,8 +70,7 @@ static void win32_translate_open_mode(int mode, } } -static voidpf win32_build_iowin(HANDLE hFile) -{ +static voidpf win32_build_iowin(HANDLE hFile) { voidpf ret=NULL; if ((hFile != NULL) && (hFile != INVALID_HANDLE_VALUE)) @@ -98,8 +88,7 @@ static voidpf win32_build_iowin(HANDLE hFile) return ret; } -voidpf ZCALLBACK win32_open64_file_func (voidpf opaque,const void* filename,int mode) -{ +voidpf ZCALLBACK win32_open64_file_func(voidpf opaque, const void* filename, int mode) { const char* mode_fopen = NULL; DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; HANDLE hFile = NULL; @@ -127,8 +116,7 @@ voidpf ZCALLBACK win32_open64_file_func (voidpf opaque,const void* filename,int } -voidpf ZCALLBACK win32_open64_file_funcA (voidpf opaque,const void* filename,int mode) -{ +voidpf ZCALLBACK win32_open64_file_funcA(voidpf opaque, const void* filename, int mode) { const char* mode_fopen = NULL; DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; HANDLE hFile = NULL; @@ -151,8 +139,7 @@ voidpf ZCALLBACK win32_open64_file_funcA (voidpf opaque,const void* filename,int } -voidpf ZCALLBACK win32_open64_file_funcW (voidpf opaque,const void* filename,int mode) -{ +voidpf ZCALLBACK win32_open64_file_funcW(voidpf opaque, const void* filename, int mode) { const char* mode_fopen = NULL; DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; HANDLE hFile = NULL; @@ -171,8 +158,7 @@ voidpf ZCALLBACK win32_open64_file_funcW (voidpf opaque,const void* filename,int } -voidpf ZCALLBACK win32_open_file_func (voidpf opaque,const char* filename,int mode) -{ +voidpf ZCALLBACK win32_open_file_func(voidpf opaque, const char* filename, int mode) { const char* mode_fopen = NULL; DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; HANDLE hFile = NULL; @@ -200,8 +186,7 @@ voidpf ZCALLBACK win32_open_file_func (voidpf opaque,const char* filename,int mo } -uLong ZCALLBACK win32_read_file_func (voidpf opaque, voidpf stream, void* buf,uLong size) -{ +uLong ZCALLBACK win32_read_file_func(voidpf opaque, voidpf stream, void* buf,uLong size) { uLong ret=0; HANDLE hFile = NULL; if (stream!=NULL) @@ -222,8 +207,7 @@ uLong ZCALLBACK win32_read_file_func (voidpf opaque, voidpf stream, void* buf,uL } -uLong ZCALLBACK win32_write_file_func (voidpf opaque,voidpf stream,const void* buf,uLong size) -{ +uLong ZCALLBACK win32_write_file_func(voidpf opaque, voidpf stream, const void* buf, uLong size) { uLong ret=0; HANDLE hFile = NULL; if (stream!=NULL) @@ -243,8 +227,7 @@ uLong ZCALLBACK win32_write_file_func (voidpf opaque,voidpf stream,const void* b return ret; } -static BOOL MySetFilePointerEx(HANDLE hFile, LARGE_INTEGER pos, LARGE_INTEGER *newPos, DWORD dwMoveMethod) -{ +static BOOL MySetFilePointerEx(HANDLE hFile, LARGE_INTEGER pos, LARGE_INTEGER *newPos, DWORD dwMoveMethod) { #ifdef IOWIN32_USING_WINRT_API return SetFilePointerEx(hFile, pos, newPos, dwMoveMethod); #else @@ -263,8 +246,7 @@ static BOOL MySetFilePointerEx(HANDLE hFile, LARGE_INTEGER pos, LARGE_INTEGER *n #endif } -long ZCALLBACK win32_tell_file_func (voidpf opaque,voidpf stream) -{ +long ZCALLBACK win32_tell_file_func(voidpf opaque, voidpf stream) { long ret=-1; HANDLE hFile = NULL; if (stream!=NULL) @@ -286,8 +268,7 @@ long ZCALLBACK win32_tell_file_func (voidpf opaque,voidpf stream) return ret; } -ZPOS64_T ZCALLBACK win32_tell64_file_func (voidpf opaque, voidpf stream) -{ +ZPOS64_T ZCALLBACK win32_tell64_file_func(voidpf opaque, voidpf stream) { ZPOS64_T ret= (ZPOS64_T)-1; HANDLE hFile = NULL; if (stream!=NULL) @@ -311,8 +292,7 @@ ZPOS64_T ZCALLBACK win32_tell64_file_func (voidpf opaque, voidpf stream) } -long ZCALLBACK win32_seek_file_func (voidpf opaque,voidpf stream,uLong offset,int origin) -{ +long ZCALLBACK win32_seek_file_func(voidpf opaque, voidpf stream, uLong offset, int origin) { DWORD dwMoveMethod=0xFFFFFFFF; HANDLE hFile = NULL; @@ -349,8 +329,7 @@ long ZCALLBACK win32_seek_file_func (voidpf opaque,voidpf stream,uLong offset,in return ret; } -long ZCALLBACK win32_seek64_file_func (voidpf opaque, voidpf stream,ZPOS64_T offset,int origin) -{ +long ZCALLBACK win32_seek64_file_func(voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) { DWORD dwMoveMethod=0xFFFFFFFF; HANDLE hFile = NULL; long ret=-1; @@ -388,8 +367,7 @@ long ZCALLBACK win32_seek64_file_func (voidpf opaque, voidpf stream,ZPOS64_T off return ret; } -int ZCALLBACK win32_close_file_func (voidpf opaque, voidpf stream) -{ +int ZCALLBACK win32_close_file_func(voidpf opaque, voidpf stream) { int ret=-1; if (stream!=NULL) @@ -406,8 +384,7 @@ int ZCALLBACK win32_close_file_func (voidpf opaque, voidpf stream) return ret; } -int ZCALLBACK win32_error_file_func (voidpf opaque,voidpf stream) -{ +int ZCALLBACK win32_error_file_func(voidpf opaque, voidpf stream) { int ret=-1; if (stream!=NULL) { @@ -416,8 +393,7 @@ int ZCALLBACK win32_error_file_func (voidpf opaque,voidpf stream) return ret; } -void fill_win32_filefunc (zlib_filefunc_def* pzlib_filefunc_def) -{ +void fill_win32_filefunc(zlib_filefunc_def* pzlib_filefunc_def) { pzlib_filefunc_def->zopen_file = win32_open_file_func; pzlib_filefunc_def->zread_file = win32_read_file_func; pzlib_filefunc_def->zwrite_file = win32_write_file_func; @@ -428,8 +404,7 @@ void fill_win32_filefunc (zlib_filefunc_def* pzlib_filefunc_def) pzlib_filefunc_def->opaque = NULL; } -void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def) -{ +void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def) { pzlib_filefunc_def->zopen64_file = win32_open64_file_func; pzlib_filefunc_def->zread_file = win32_read_file_func; pzlib_filefunc_def->zwrite_file = win32_write_file_func; @@ -441,8 +416,7 @@ void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def) } -void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def) -{ +void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def) { pzlib_filefunc_def->zopen64_file = win32_open64_file_funcA; pzlib_filefunc_def->zread_file = win32_read_file_func; pzlib_filefunc_def->zwrite_file = win32_write_file_func; @@ -454,8 +428,7 @@ void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def) } -void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def) -{ +void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def) { pzlib_filefunc_def->zopen64_file = win32_open64_file_funcW; pzlib_filefunc_def->zread_file = win32_read_file_func; pzlib_filefunc_def->zwrite_file = win32_write_file_func; diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/iowin32.h b/src/zlib/zlib-1.3/contrib/minizip/iowin32.h similarity index 65% rename from src/zlib/zlib-1.2.13/contrib/minizip/iowin32.h rename to src/zlib/zlib-1.3/contrib/minizip/iowin32.h index 0ca0969a7..a23a65d43 100644 --- a/src/zlib/zlib-1.2.13/contrib/minizip/iowin32.h +++ b/src/zlib/zlib-1.3/contrib/minizip/iowin32.h @@ -18,10 +18,10 @@ extern "C" { #endif -void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); -void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def)); -void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def)); -void fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def)); +void fill_win32_filefunc(zlib_filefunc_def* pzlib_filefunc_def); +void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def); +void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def); +void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def); #ifdef __cplusplus } diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/make_vms.com b/src/zlib/zlib-1.3/contrib/minizip/make_vms.com similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/minizip/make_vms.com rename to src/zlib/zlib-1.3/contrib/minizip/make_vms.com diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/miniunz.c b/src/zlib/zlib-1.3/contrib/minizip/miniunz.c similarity index 92% rename from src/zlib/zlib-1.2.13/contrib/minizip/miniunz.c rename to src/zlib/zlib-1.3/contrib/minizip/miniunz.c index 0dc9b5081..a12aec8be 100644 --- a/src/zlib/zlib-1.2.13/contrib/minizip/miniunz.c +++ b/src/zlib/zlib-1.3/contrib/minizip/miniunz.c @@ -27,7 +27,7 @@ #endif #endif -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__HAIKU__) || defined(MINIZIP_FOPEN_NO_64) // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions #define FOPEN_FUNC(filename, mode) fopen(filename, mode) #define FTELLO_FUNC(stream) ftello(stream) @@ -81,11 +81,7 @@ filename : the filename of the file where date/time must be modified dosdate : the new date at the MSDos format (4 bytes) tmu_date : the SAME new date at the tm_unz format */ -static void change_file_date(filename,dosdate,tmu_date) - const char *filename; - uLong dosdate; - tm_unz tmu_date; -{ +static void change_file_date(const char *filename, uLong dosdate, tm_unz tmu_date) { #ifdef _WIN32 HANDLE hFile; FILETIME ftm,ftLocal,ftCreate,ftLastAcc,ftLastWrite; @@ -115,6 +111,10 @@ static void change_file_date(filename,dosdate,tmu_date) ut.actime=ut.modtime=mktime(&newdate); utime(filename,&ut); +#else + (void)filename; + (void)dosdate; + (void)tmu_date; #endif #endif } @@ -123,9 +123,7 @@ static void change_file_date(filename,dosdate,tmu_date) /* mymkdir and change_file_date are not 100 % portable As I don't know well Unix, I wait feedback for the unix portion */ -static int mymkdir(dirname) - const char* dirname; -{ +static int mymkdir(const char* dirname) { int ret=0; #ifdef _WIN32 ret = _mkdir(dirname); @@ -133,13 +131,13 @@ static int mymkdir(dirname) ret = mkdir (dirname,0775); #elif __APPLE__ ret = mkdir (dirname,0775); +#else + (void)dirname; #endif return ret; } -static int makedir (newdir) - const char *newdir; -{ +static int makedir(const char *newdir) { char *buffer ; char *p; size_t len = strlen(newdir); @@ -187,14 +185,12 @@ static int makedir (newdir) return 1; } -static void do_banner() -{ +static void do_banner(void) { printf("MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant\n"); printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n"); } -static void do_help() -{ +static void do_help(void) { printf("Usage : miniunz [-e] [-x] [-v] [-l] [-o] [-p password] file.zip [file_to_extr.] [-d extractdir]\n\n" \ " -e Extract without pathname (junk paths)\n" \ " -x Extract with pathname\n" \ @@ -202,11 +198,10 @@ static void do_help() " -l list files\n" \ " -d directory to extract into\n" \ " -o overwrite files without prompting\n" \ - " -p extract crypted file using password\n\n"); + " -p extract encrypted file using password\n\n"); } -static void Display64BitsSize(ZPOS64_T n, int size_char) -{ +static void Display64BitsSize(ZPOS64_T n, int size_char) { /* to avoid compatibility problem , we do here the conversion */ char number[21]; int offset=19; @@ -233,9 +228,7 @@ static void Display64BitsSize(ZPOS64_T n, int size_char) printf("%s",&number[pos_string]); } -static int do_list(uf) - unzFile uf; -{ +static int do_list(unzFile uf) { uLong i; unz_global_info64 gi; int err; @@ -250,7 +243,7 @@ static int do_list(uf) char filename_inzip[256]; unz_file_info64 file_info; uLong ratio=0; - const char *string_method; + const char *string_method = ""; char charCrypt=' '; err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0); if (err!=UNZ_OK) @@ -261,7 +254,7 @@ static int do_list(uf) if (file_info.uncompressed_size>0) ratio = (uLong)((file_info.compressed_size*100)/file_info.uncompressed_size); - /* display a '*' if the file is crypted */ + /* display a '*' if the file is encrypted */ if ((file_info.flag & 1) != 0) charCrypt='*'; @@ -311,12 +304,7 @@ static int do_list(uf) } -static int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password) - unzFile uf; - const int* popt_extract_without_path; - int* popt_overwrite; - const char* password; -{ +static int do_extract_currentfile(unzFile uf, const int* popt_extract_without_path, int* popt_overwrite, const char* password) { char filename_inzip[256]; char* filename_withoutpath; char* p; @@ -473,12 +461,7 @@ static int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,pa } -static int do_extract(uf,opt_extract_without_path,opt_overwrite,password) - unzFile uf; - int opt_extract_without_path; - int opt_overwrite; - const char* password; -{ +static int do_extract(unzFile uf, int opt_extract_without_path, int opt_overwrite, const char* password) { uLong i; unz_global_info64 gi; int err; @@ -508,13 +491,7 @@ static int do_extract(uf,opt_extract_without_path,opt_overwrite,password) return 0; } -static int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,password) - unzFile uf; - const char* filename; - int opt_extract_without_path; - int opt_overwrite; - const char* password; -{ +static int do_extract_onefile(unzFile uf, const char* filename, int opt_extract_without_path, int opt_overwrite, const char* password) { if (unzLocateFile(uf,filename,CASESENSITIVITY)!=UNZ_OK) { printf("file %s not found in the zipfile\n",filename); @@ -530,10 +507,7 @@ static int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite } -int main(argc,argv) - int argc; - char *argv[]; -{ +int main(int argc, char *argv[]) { const char *zipfilename=NULL; const char *filename_to_extract=NULL; const char *password=NULL; @@ -606,7 +580,7 @@ int main(argc,argv) # endif strncpy(filename_try, zipfilename,MAXFILENAME-1); - /* strncpy doesnt append the trailing NULL, of the string is too long. */ + /* strncpy doesn't append the trailing NULL, of the string is too long. */ filename_try[ MAXFILENAME ] = '\0'; # ifdef USEWIN32IOAPI diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/miniunzip.1 b/src/zlib/zlib-1.3/contrib/minizip/miniunzip.1 similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/minizip/miniunzip.1 rename to src/zlib/zlib-1.3/contrib/minizip/miniunzip.1 diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/minizip.1 b/src/zlib/zlib-1.3/contrib/minizip/minizip.1 similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/minizip/minizip.1 rename to src/zlib/zlib-1.3/contrib/minizip/minizip.1 diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/minizip.c b/src/zlib/zlib-1.3/contrib/minizip/minizip.c similarity index 91% rename from src/zlib/zlib-1.2.13/contrib/minizip/minizip.c rename to src/zlib/zlib-1.3/contrib/minizip/minizip.c index e8561b15f..26ee8d029 100644 --- a/src/zlib/zlib-1.2.13/contrib/minizip/minizip.c +++ b/src/zlib/zlib-1.3/contrib/minizip/minizip.c @@ -28,7 +28,7 @@ #endif #endif -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__HAIKU__) || defined(MINIZIP_FOPEN_NO_64) // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions #define FOPEN_FUNC(filename, mode) fopen(filename, mode) #define FTELLO_FUNC(stream) ftello(stream) @@ -71,11 +71,9 @@ #define MAXFILENAME (256) #ifdef _WIN32 -static int filetime(f, tmzip, dt) - const char *f; /* name of file to get info on */ - tm_zip *tmzip; /* return value: access, modific. and creation times */ - uLong *dt; /* dostime */ -{ +/* f: name of file to get info on, tmzip: return value: access, + modification and creation times, dt: dostime */ +static int filetime(const char *f, tm_zip *tmzip, uLong *dt) { int ret = 0; { FILETIME ftLocal; @@ -95,11 +93,9 @@ static int filetime(f, tmzip, dt) } #else #if defined(unix) || defined(__APPLE__) -static int filetime(f, tmzip, dt) - const char *f; /* name of file to get info on */ - tm_zip *tmzip; /* return value: access, modific. and creation times */ - uLong *dt; /* dostime */ -{ +/* f: name of file to get info on, tmzip: return value: access, + modification and creation times, dt: dostime */ +static int filetime(const char *f, tm_zip *tmzip, uLong *dt) { (void)dt; int ret=0; struct stat s; /* results of stat() */ @@ -114,7 +110,7 @@ static int filetime(f, tmzip, dt) len = MAXFILENAME; strncpy(name, f,MAXFILENAME-1); - /* strncpy doesnt append the trailing NULL, of the string is too long. */ + /* strncpy doesn't append the trailing NULL, of the string is too long. */ name[ MAXFILENAME ] = '\0'; if (name[len - 1] == '/') @@ -138,11 +134,12 @@ static int filetime(f, tmzip, dt) return ret; } #else -uLong filetime(f, tmzip, dt) - const char *f; /* name of file to get info on */ - tm_zip *tmzip; /* return value: access, modific. and creation times */ - uLong *dt; /* dostime */ -{ +/* f: name of file to get info on, tmzip: return value: access, + modification and creation times, dt: dostime */ +static int filetime(const char *f, tm_zip *tmzip, uLong *dt) { + (void)f; + (void)tmzip; + (void)dt; return 0; } #endif @@ -151,9 +148,7 @@ uLong filetime(f, tmzip, dt) -static int check_exist_file(filename) - const char* filename; -{ +static int check_exist_file(const char* filename) { FILE* ftestexist; int ret = 1; ftestexist = FOPEN_FUNC(filename,"rb"); @@ -164,14 +159,12 @@ static int check_exist_file(filename) return ret; } -static void do_banner() -{ +static void do_banner(void) { printf("MiniZip 1.1, demo of zLib + MiniZip64 package, written by Gilles Vollant\n"); printf("more info on MiniZip at http://www.winimage.com/zLibDll/minizip.html\n\n"); } -static void do_help() -{ +static void do_help(void) { printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] [-j] file.zip [files_to_add]\n\n" \ " -o Overwrite existing file.zip\n" \ " -a Append to existing file.zip\n" \ @@ -183,8 +176,7 @@ static void do_help() /* calculate the CRC32 of a file, because to encrypt a file, we need known the CRC32 of the file before */ -static int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigned long* result_crc) -{ +static int getFileCrc(const char* filenameinzip, void* buf, unsigned long size_buf, unsigned long* result_crc) { unsigned long calculate_crc=0; int err=ZIP_OK; FILE * fin = FOPEN_FUNC(filenameinzip,"rb"); @@ -222,8 +214,7 @@ static int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf, return err; } -static int isLargeFile(const char* filename) -{ +static int isLargeFile(const char* filename) { int largeFile = 0; ZPOS64_T pos = 0; FILE* pFile = FOPEN_FUNC(filename, "rb"); @@ -233,7 +224,7 @@ static int isLargeFile(const char* filename) FSEEKO_FUNC(pFile, 0, SEEK_END); pos = (ZPOS64_T)FTELLO_FUNC(pFile); - printf("File : %s is %lld bytes\n", filename, pos); + printf("File : %s is %llu bytes\n", filename, pos); if(pos >= 0xffffffff) largeFile = 1; @@ -244,10 +235,7 @@ static int isLargeFile(const char* filename) return largeFile; } -int main(argc,argv) - int argc; - char *argv[]; -{ +int main(int argc, char *argv[]) { int i; int opt_overwrite=0; int opt_compress_level=Z_DEFAULT_COMPRESSION; @@ -323,7 +311,7 @@ int main(argc,argv) zipok = 1 ; strncpy(filename_try, argv[zipfilenamearg],MAXFILENAME-1); - /* strncpy doesnt append the trailing NULL, of the string is too long. */ + /* strncpy doesn't append the trailing NULL, of the string is too long. */ filename_try[ MAXFILENAME ] = '\0'; len=(int)strlen(filename_try); @@ -393,10 +381,10 @@ int main(argc,argv) ((argv[i][1]=='o') || (argv[i][1]=='O') || (argv[i][1]=='a') || (argv[i][1]=='A') || (argv[i][1]=='p') || (argv[i][1]=='P') || - ((argv[i][1]>='0') || (argv[i][1]<='9'))) && + ((argv[i][1]>='0') && (argv[i][1]<='9'))) && (strlen(argv[i]) == 2))) { - FILE * fin; + FILE * fin = NULL; size_t size_read; const char* filenameinzip = argv[i]; const char *savefilenameinzip; diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/minizip.pc.in b/src/zlib/zlib-1.3/contrib/minizip/minizip.pc.in similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/minizip/minizip.pc.in rename to src/zlib/zlib-1.3/contrib/minizip/minizip.pc.in diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/mztools.c b/src/zlib/zlib-1.3/contrib/minizip/mztools.c similarity index 97% rename from src/zlib/zlib-1.2.13/contrib/minizip/mztools.c rename to src/zlib/zlib-1.3/contrib/minizip/mztools.c index 96891c2e0..c8d237561 100644 --- a/src/zlib/zlib-1.2.13/contrib/minizip/mztools.c +++ b/src/zlib/zlib-1.3/contrib/minizip/mztools.c @@ -27,13 +27,7 @@ WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \ } while(0) -extern int ZEXPORT unzRepair(file, fileOut, fileOutTmp, nRecovered, bytesRecovered) -const char* file; -const char* fileOut; -const char* fileOutTmp; -uLong* nRecovered; -uLong* bytesRecovered; -{ +extern int ZEXPORT unzRepair(const char* file, const char* fileOut, const char* fileOutTmp, uLong* nRecovered, uLong* bytesRecovered) { int err = Z_OK; FILE* fpZip = fopen(file, "rb"); FILE* fpOut = fopen(fileOut, "wb"); diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/mztools.h b/src/zlib/zlib-1.3/contrib/minizip/mztools.h similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/minizip/mztools.h rename to src/zlib/zlib-1.3/contrib/minizip/mztools.h diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/unzip.c b/src/zlib/zlib-1.3/contrib/minizip/unzip.c similarity index 81% rename from src/zlib/zlib-1.2.13/contrib/minizip/unzip.c rename to src/zlib/zlib-1.3/contrib/minizip/unzip.c index 3036b470b..ed763f89f 100644 --- a/src/zlib/zlib-1.2.13/contrib/minizip/unzip.c +++ b/src/zlib/zlib-1.3/contrib/minizip/unzip.c @@ -49,12 +49,12 @@ Copyright (C) 2007-2008 Even Rouault - Oct-2009 - Mathias Svensson - Removed cpl_* from symbol names (Even Rouault added them but since this is now moved to a new project (minizip64) I renamed them again). + Oct-2009 - Mathias Svensson - Removed cpl_* from symbol names (Even Rouault added them but since this is now moved to a new project (minizip64) I renamed them again). Oct-2009 - Mathias Svensson - Fixed problem if uncompressed size was > 4G and compressed size was <4G should only read the compressed/uncompressed size from the Zip64 format if the size from normal header was 0xFFFFFFFF - Oct-2009 - Mathias Svensson - Applied some bug fixes from paches recived from Gilles Vollant - Oct-2009 - Mathias Svensson - Applied support to unzip files with compression mathod BZIP2 (bzip2 lib is required) + Oct-2009 - Mathias Svensson - Applied some bug fixes from patches received from Gilles Vollant + Oct-2009 - Mathias Svensson - Applied support to unzip files with compression method BZIP2 (bzip2 lib is required) Patch created by Daniel Borca Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer @@ -77,8 +77,6 @@ #ifdef STDC # include -# include -# include #endif #ifdef NO_ERRNO_H extern int errno; @@ -111,9 +109,6 @@ #ifndef ALLOC # define ALLOC(size) (malloc(size)) #endif -#ifndef TRYFREE -# define TRYFREE(p) { free(p);} -#endif #define SIZECENTRALDIRITEM (0x2e) #define SIZEZIPLOCALHEADER (0x1e) @@ -153,7 +148,7 @@ typedef struct ZPOS64_T rest_read_compressed; /* number of byte to be decompressed */ ZPOS64_T rest_read_uncompressed;/*number of byte to be obtained after decomp*/ zlib_filefunc64_32_def z_filefunc; - voidpf filestream; /* io structore of the zipfile */ + voidpf filestream; /* io structure of the zipfile */ uLong compression_method; /* compression method (0==store) */ ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ int raw; @@ -166,7 +161,7 @@ typedef struct { zlib_filefunc64_32_def z_filefunc; int is64bitOpenFunction; - voidpf filestream; /* io structore of the zipfile */ + voidpf filestream; /* io structure of the zipfile */ unz_global_info64 gi; /* public global information */ ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ ZPOS64_T num_file; /* number of the current file in the zipfile*/ @@ -197,29 +192,24 @@ typedef struct #include "crypt.h" #endif + /* =========================================================================== - Read a byte from a gz_stream; update next_in and avail_in. Return EOF - for end of file. - IN assertion: the stream s has been successfully opened for reading. + Reads a long in LSB order from the given gz_stream. Sets */ - -local int unz64local_getByte OF(( - const zlib_filefunc64_32_def* pzlib_filefunc_def, - voidpf filestream, - int *pi)); - -local int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi) -{ - unsigned char c; - int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1); - if (err==1) +local int unz64local_getShort(const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX) { + unsigned char c[2]; + int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,c,2); + if (err==2) { - *pi = (int)c; + *pX = c[0] | ((uLong)c[1] << 8); return UNZ_OK; } else { + *pX = 0; if (ZERROR64(*pzlib_filefunc_def,filestream)) return UNZ_ERRNO; else @@ -227,127 +217,50 @@ local int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, v } } - -/* =========================================================================== - Reads a long in LSB order from the given gz_stream. Sets -*/ -local int unz64local_getShort OF(( - const zlib_filefunc64_32_def* pzlib_filefunc_def, - voidpf filestream, - uLong *pX)); - -local int unz64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, +local int unz64local_getLong(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, - uLong *pX) -{ - uLong x ; - int i = 0; - int err; - - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x = (uLong)i; - - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((uLong)i)<<8; - - if (err==UNZ_OK) - *pX = x; - else - *pX = 0; - return err; -} - -local int unz64local_getLong OF(( - const zlib_filefunc64_32_def* pzlib_filefunc_def, - voidpf filestream, - uLong *pX)); - -local int unz64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, - voidpf filestream, - uLong *pX) -{ - uLong x ; - int i = 0; - int err; - - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x = (uLong)i; - - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((uLong)i)<<8; - - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((uLong)i)<<16; - - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<24; - - if (err==UNZ_OK) - *pX = x; + uLong *pX) { + unsigned char c[4]; + int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,c,4); + if (err==4) + { + *pX = c[0] | ((uLong)c[1] << 8) | ((uLong)c[2] << 16) | ((uLong)c[3] << 24); + return UNZ_OK; + } else + { *pX = 0; - return err; + if (ZERROR64(*pzlib_filefunc_def,filestream)) + return UNZ_ERRNO; + else + return UNZ_EOF; + } } -local int unz64local_getLong64 OF(( - const zlib_filefunc64_32_def* pzlib_filefunc_def, - voidpf filestream, - ZPOS64_T *pX)); - - -local int unz64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, - voidpf filestream, - ZPOS64_T *pX) -{ - ZPOS64_T x ; - int i = 0; - int err; - - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x = (ZPOS64_T)i; - - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((ZPOS64_T)i)<<8; - - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((ZPOS64_T)i)<<16; - - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((ZPOS64_T)i)<<24; - - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((ZPOS64_T)i)<<32; - - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((ZPOS64_T)i)<<40; - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((ZPOS64_T)i)<<48; - - if (err==UNZ_OK) - err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); - x |= ((ZPOS64_T)i)<<56; - - if (err==UNZ_OK) - *pX = x; +local int unz64local_getLong64(const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + ZPOS64_T *pX) { + unsigned char c[8]; + int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,c,8); + if (err==8) + { + *pX = c[0] | ((ZPOS64_T)c[1] << 8) | ((ZPOS64_T)c[2] << 16) | ((ZPOS64_T)c[3] << 24) + | ((ZPOS64_T)c[4] << 32) | ((ZPOS64_T)c[5] << 40) | ((ZPOS64_T)c[6] << 48) | ((ZPOS64_T)c[7] << 56); + return UNZ_OK; + } else + { *pX = 0; - return err; + if (ZERROR64(*pzlib_filefunc_def,filestream)) + return UNZ_ERRNO; + else + return UNZ_EOF; + } } /* My own strcmpi / strcasecmp */ -local int strcmpcasenosensitive_internal (const char* fileName1, const char* fileName2) -{ +local int strcmpcasenosensitive_internal(const char* fileName1, const char* fileName2) { for (;;) { char c1=*(fileName1++); @@ -379,19 +292,17 @@ local int strcmpcasenosensitive_internal (const char* fileName1, const char* fil #endif /* - Compare two filename (fileName1,fileName2). - If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) - If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi + Compare two filenames (fileName1,fileName2). + If iCaseSensitivity = 1, comparison is case sensitive (like strcmp) + If iCaseSensitivity = 2, comparison is not case sensitive (like strcmpi or strcasecmp) - If iCaseSenisivity = 0, case sensitivity is defaut of your operating system + If iCaseSensitivity = 0, case sensitivity is default of your operating system (like 1 on Unix, 2 on Windows) */ extern int ZEXPORT unzStringFileNameCompare (const char* fileName1, - const char* fileName2, - int iCaseSensitivity) - -{ + const char* fileName2, + int iCaseSensitivity) { if (iCaseSensitivity==0) iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE; @@ -405,21 +316,23 @@ extern int ZEXPORT unzStringFileNameCompare (const char* fileName1, #define BUFREADCOMMENT (0x400) #endif +#ifndef CENTRALDIRINVALID +#define CENTRALDIRINVALID ((ZPOS64_T)(-1)) +#endif + /* Locate the Central directory of a zipfile (at the end, just before the global comment) */ -local ZPOS64_T unz64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); -local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) -{ +local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) { unsigned char* buf; ZPOS64_T uSizeFile; ZPOS64_T uBackRead; ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ - ZPOS64_T uPosFound=0; + ZPOS64_T uPosFound=CENTRALDIRINVALID; if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) - return 0; + return CENTRALDIRINVALID; uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); @@ -429,7 +342,7 @@ local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); if (buf==NULL) - return 0; + return CENTRALDIRINVALID; uBackRead = 4; while (uBackReadz_filefunc, s->filestream); - TRYFREE(s); + free(s); return UNZ_OK; } @@ -825,8 +727,7 @@ extern int ZEXPORT unzClose (unzFile file) Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed return UNZ_OK if there is no problem. */ -extern int ZEXPORT unzGetGlobalInfo64 (unzFile file, unz_global_info64* pglobal_info) -{ +extern int ZEXPORT unzGetGlobalInfo64(unzFile file, unz_global_info64* pglobal_info) { unz64_s* s; if (file==NULL) return UNZ_PARAMERROR; @@ -835,8 +736,7 @@ extern int ZEXPORT unzGetGlobalInfo64 (unzFile file, unz_global_info64* pglobal_ return UNZ_OK; } -extern int ZEXPORT unzGetGlobalInfo (unzFile file, unz_global_info* pglobal_info32) -{ +extern int ZEXPORT unzGetGlobalInfo(unzFile file, unz_global_info* pglobal_info32) { unz64_s* s; if (file==NULL) return UNZ_PARAMERROR; @@ -847,10 +747,9 @@ extern int ZEXPORT unzGetGlobalInfo (unzFile file, unz_global_info* pglobal_info return UNZ_OK; } /* - Translate date/time from Dos format to tm_unz (readable more easilty) + Translate date/time from Dos format to tm_unz (readable more easily) */ -local void unz64local_DosDateToTmuDate (ZPOS64_T ulDosDate, tm_unz* ptm) -{ +local void unz64local_DosDateToTmuDate(ZPOS64_T ulDosDate, tm_unz* ptm) { ZPOS64_T uDate; uDate = (ZPOS64_T)(ulDosDate>>16); ptm->tm_mday = (int)(uDate&0x1f) ; @@ -865,28 +764,16 @@ local void unz64local_DosDateToTmuDate (ZPOS64_T ulDosDate, tm_unz* ptm) /* Get Info about the current file in the zipfile, with internal only info */ -local int unz64local_GetCurrentFileInfoInternal OF((unzFile file, - unz_file_info64 *pfile_info, - unz_file_info64_internal - *pfile_info_internal, - char *szFileName, - uLong fileNameBufferSize, - void *extraField, - uLong extraFieldBufferSize, - char *szComment, - uLong commentBufferSize)); - -local int unz64local_GetCurrentFileInfoInternal (unzFile file, - unz_file_info64 *pfile_info, - unz_file_info64_internal - *pfile_info_internal, - char *szFileName, - uLong fileNameBufferSize, - void *extraField, - uLong extraFieldBufferSize, - char *szComment, - uLong commentBufferSize) -{ +local int unz64local_GetCurrentFileInfoInternal(unzFile file, + unz_file_info64 *pfile_info, + unz_file_info64_internal + *pfile_info_internal, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize) { unz64_s* s; unz_file_info64 file_info; unz_file_info64_internal file_info_internal; @@ -1038,33 +925,31 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, /* ZIP64 extra fields */ if (headerId == 0x0001) { - uLong uL; - - if(file_info.uncompressed_size == MAXU32) - { - if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) - err=UNZ_ERRNO; - } - - if(file_info.compressed_size == MAXU32) - { - if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) - err=UNZ_ERRNO; - } - - if(file_info_internal.offset_curfile == MAXU32) - { - /* Relative Header offset */ - if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) - err=UNZ_ERRNO; - } - - if(file_info.disk_num_start == MAXU32) - { - /* Disk Start Number */ - if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) - err=UNZ_ERRNO; - } + if(file_info.uncompressed_size == MAXU32) + { + if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) + err=UNZ_ERRNO; + } + + if(file_info.compressed_size == MAXU32) + { + if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) + err=UNZ_ERRNO; + } + + if(file_info_internal.offset_curfile == MAXU32) + { + /* Relative Header offset */ + if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) + err=UNZ_ERRNO; + } + + if(file_info.disk_num_start == 0xffff) + { + /* Disk Start Number */ + if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK) + err=UNZ_ERRNO; + } } else @@ -1121,24 +1006,22 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, No preparation of the structure is needed return UNZ_OK if there is no problem. */ -extern int ZEXPORT unzGetCurrentFileInfo64 (unzFile file, - unz_file_info64 * pfile_info, - char * szFileName, uLong fileNameBufferSize, - void *extraField, uLong extraFieldBufferSize, - char* szComment, uLong commentBufferSize) -{ +extern int ZEXPORT unzGetCurrentFileInfo64(unzFile file, + unz_file_info64 * pfile_info, + char * szFileName, uLong fileNameBufferSize, + void *extraField, uLong extraFieldBufferSize, + char* szComment, uLong commentBufferSize) { return unz64local_GetCurrentFileInfoInternal(file,pfile_info,NULL, - szFileName,fileNameBufferSize, - extraField,extraFieldBufferSize, - szComment,commentBufferSize); + szFileName,fileNameBufferSize, + extraField,extraFieldBufferSize, + szComment,commentBufferSize); } -extern int ZEXPORT unzGetCurrentFileInfo (unzFile file, - unz_file_info * pfile_info, - char * szFileName, uLong fileNameBufferSize, - void *extraField, uLong extraFieldBufferSize, - char* szComment, uLong commentBufferSize) -{ +extern int ZEXPORT unzGetCurrentFileInfo(unzFile file, + unz_file_info * pfile_info, + char * szFileName, uLong fileNameBufferSize, + void *extraField, uLong extraFieldBufferSize, + char* szComment, uLong commentBufferSize) { int err; unz_file_info64 file_info64; err = unz64local_GetCurrentFileInfoInternal(file,&file_info64,NULL, @@ -1162,7 +1045,7 @@ extern int ZEXPORT unzGetCurrentFileInfo (unzFile file, pfile_info->internal_fa = file_info64.internal_fa; pfile_info->external_fa = file_info64.external_fa; - pfile_info->tmu_date = file_info64.tmu_date, + pfile_info->tmu_date = file_info64.tmu_date; pfile_info->compressed_size = (uLong)file_info64.compressed_size; @@ -1175,8 +1058,7 @@ extern int ZEXPORT unzGetCurrentFileInfo (unzFile file, Set the current file of the zipfile to the first file. return UNZ_OK if there is no problem */ -extern int ZEXPORT unzGoToFirstFile (unzFile file) -{ +extern int ZEXPORT unzGoToFirstFile(unzFile file) { int err=UNZ_OK; unz64_s* s; if (file==NULL) @@ -1196,8 +1078,7 @@ extern int ZEXPORT unzGoToFirstFile (unzFile file) return UNZ_OK if there is no problem return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. */ -extern int ZEXPORT unzGoToNextFile (unzFile file) -{ +extern int ZEXPORT unzGoToNextFile(unzFile file) { unz64_s* s; int err; @@ -1229,8 +1110,7 @@ extern int ZEXPORT unzGoToNextFile (unzFile file) UNZ_OK if the file is found. It becomes the current file. UNZ_END_OF_LIST_OF_FILE if the file is not found */ -extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity) -{ +extern int ZEXPORT unzLocateFile(unzFile file, const char *szFileName, int iCaseSensitivity) { unz64_s* s; int err; @@ -1305,8 +1185,7 @@ typedef struct unz_file_pos_s } unz_file_pos; */ -extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos* file_pos) -{ +extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos* file_pos) { unz64_s* s; if (file==NULL || file_pos==NULL) @@ -1321,10 +1200,7 @@ extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos* file_pos) return UNZ_OK; } -extern int ZEXPORT unzGetFilePos( - unzFile file, - unz_file_pos* file_pos) -{ +extern int ZEXPORT unzGetFilePos(unzFile file, unz_file_pos* file_pos) { unz64_file_pos file_pos64; int err = unzGetFilePos64(file,&file_pos64); if (err==UNZ_OK) @@ -1335,8 +1211,7 @@ extern int ZEXPORT unzGetFilePos( return err; } -extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos) -{ +extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos) { unz64_s* s; int err; @@ -1357,10 +1232,7 @@ extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos return err; } -extern int ZEXPORT unzGoToFilePos( - unzFile file, - unz_file_pos* file_pos) -{ +extern int ZEXPORT unzGoToFilePos(unzFile file, unz_file_pos* file_pos) { unz64_file_pos file_pos64; if (file_pos == NULL) return UNZ_PARAMERROR; @@ -1382,10 +1254,9 @@ extern int ZEXPORT unzGoToFilePos( store in *piSizeVar the size of extra info in local header (filename and size of extra field data) */ -local int unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVar, - ZPOS64_T * poffset_local_extrafield, - uInt * psize_local_extrafield) -{ +local int unz64local_CheckCurrentFileCoherencyHeader(unz64_s* s, uInt* piSizeVar, + ZPOS64_T * poffset_local_extrafield, + uInt * psize_local_extrafield) { uLong uMagic,uData,uFlags; uLong size_filename; uLong size_extra_field; @@ -1469,9 +1340,8 @@ local int unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVa Open for reading data the current file in the zipfile. If there is no error and the file is opened, the return value is UNZ_OK. */ -extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method, - int* level, int raw, const char* password) -{ +extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int* method, + int* level, int raw, const char* password) { int err=UNZ_OK; uInt iSizeVar; unz64_s* s; @@ -1509,7 +1379,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method, if (pfile_in_zip_read_info->read_buffer==NULL) { - TRYFREE(pfile_in_zip_read_info); + free(pfile_in_zip_read_info); return UNZ_INTERNALERROR; } @@ -1566,8 +1436,8 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method, pfile_in_zip_read_info->stream_initialised=Z_BZIP2ED; else { - TRYFREE(pfile_in_zip_read_info->read_buffer); - TRYFREE(pfile_in_zip_read_info); + free(pfile_in_zip_read_info->read_buffer); + free(pfile_in_zip_read_info); return err; } #else @@ -1587,8 +1457,8 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method, pfile_in_zip_read_info->stream_initialised=Z_DEFLATED; else { - TRYFREE(pfile_in_zip_read_info->read_buffer); - TRYFREE(pfile_in_zip_read_info); + free(pfile_in_zip_read_info->read_buffer); + free(pfile_in_zip_read_info); return err; } /* windowBits is passed < 0 to tell that there is no zlib header. @@ -1640,25 +1510,21 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method, return UNZ_OK; } -extern int ZEXPORT unzOpenCurrentFile (unzFile file) -{ +extern int ZEXPORT unzOpenCurrentFile(unzFile file) { return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL); } -extern int ZEXPORT unzOpenCurrentFilePassword (unzFile file, const char* password) -{ +extern int ZEXPORT unzOpenCurrentFilePassword(unzFile file, const char* password) { return unzOpenCurrentFile3(file, NULL, NULL, 0, password); } -extern int ZEXPORT unzOpenCurrentFile2 (unzFile file, int* method, int* level, int raw) -{ +extern int ZEXPORT unzOpenCurrentFile2(unzFile file, int* method, int* level, int raw) { return unzOpenCurrentFile3(file, method, level, raw, NULL); } /** Addition for GDAL : START */ -extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64( unzFile file) -{ +extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64(unzFile file) { unz64_s* s; file_in_zip64_read_info_s* pfile_in_zip_read_info; s=(unz64_s*)file; @@ -1678,13 +1544,12 @@ extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64( unzFile file) buf contain buffer where data must be copied len the size of buf. - return the number of byte copied if somes bytes are copied + return the number of byte copied if some bytes are copied return 0 if the end of file was reached return <0 with error code if there is an error (UNZ_ERRNO for IO error, or zLib error for uncompress error) */ -extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len) -{ +extern int ZEXPORT unzReadCurrentFile(unzFile file, voidp buf, unsigned len) { int err=UNZ_OK; uInt iRead = 0; unz64_s* s; @@ -1891,8 +1756,7 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len) /* Give the current position in uncompressed data */ -extern z_off_t ZEXPORT unztell (unzFile file) -{ +extern z_off_t ZEXPORT unztell(unzFile file) { unz64_s* s; file_in_zip64_read_info_s* pfile_in_zip_read_info; if (file==NULL) @@ -1906,8 +1770,7 @@ extern z_off_t ZEXPORT unztell (unzFile file) return (z_off_t)pfile_in_zip_read_info->stream.total_out; } -extern ZPOS64_T ZEXPORT unztell64 (unzFile file) -{ +extern ZPOS64_T ZEXPORT unztell64(unzFile file) { unz64_s* s; file_in_zip64_read_info_s* pfile_in_zip_read_info; @@ -1926,8 +1789,7 @@ extern ZPOS64_T ZEXPORT unztell64 (unzFile file) /* return 1 if the end of file was reached, 0 elsewhere */ -extern int ZEXPORT unzeof (unzFile file) -{ +extern int ZEXPORT unzeof(unzFile file) { unz64_s* s; file_in_zip64_read_info_s* pfile_in_zip_read_info; if (file==NULL) @@ -1958,8 +1820,7 @@ more info in the local-header version than in the central-header) the return value is the number of bytes copied in buf, or (if <0) the error code */ -extern int ZEXPORT unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len) -{ +extern int ZEXPORT unzGetLocalExtrafield(unzFile file, voidp buf, unsigned len) { unz64_s* s; file_in_zip64_read_info_s* pfile_in_zip_read_info; uInt read_now; @@ -2006,8 +1867,7 @@ extern int ZEXPORT unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len) Close the file in zip opened with unzOpenCurrentFile Return UNZ_CRCERROR if all the file was read but the CRC is not good */ -extern int ZEXPORT unzCloseCurrentFile (unzFile file) -{ +extern int ZEXPORT unzCloseCurrentFile(unzFile file) { int err=UNZ_OK; unz64_s* s; @@ -2029,7 +1889,7 @@ extern int ZEXPORT unzCloseCurrentFile (unzFile file) } - TRYFREE(pfile_in_zip_read_info->read_buffer); + free(pfile_in_zip_read_info->read_buffer); pfile_in_zip_read_info->read_buffer = NULL; if (pfile_in_zip_read_info->stream_initialised == Z_DEFLATED) inflateEnd(&pfile_in_zip_read_info->stream); @@ -2040,7 +1900,7 @@ extern int ZEXPORT unzCloseCurrentFile (unzFile file) pfile_in_zip_read_info->stream_initialised = 0; - TRYFREE(pfile_in_zip_read_info); + free(pfile_in_zip_read_info); s->pfile_in_zip_read=NULL; @@ -2053,8 +1913,7 @@ extern int ZEXPORT unzCloseCurrentFile (unzFile file) uSizeBuf is the size of the szComment buffer. return the number of byte copied or an error code <0 */ -extern int ZEXPORT unzGetGlobalComment (unzFile file, char * szComment, uLong uSizeBuf) -{ +extern int ZEXPORT unzGetGlobalComment(unzFile file, char * szComment, uLong uSizeBuf) { unz64_s* s; uLong uReadThis ; if (file==NULL) @@ -2081,8 +1940,7 @@ extern int ZEXPORT unzGetGlobalComment (unzFile file, char * szComment, uLong uS } /* Additions by RX '2004 */ -extern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file) -{ +extern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file) { unz64_s* s; if (file==NULL) @@ -2096,8 +1954,7 @@ extern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file) return s->pos_in_central_dir; } -extern uLong ZEXPORT unzGetOffset (unzFile file) -{ +extern uLong ZEXPORT unzGetOffset(unzFile file) { ZPOS64_T offset64; if (file==NULL) @@ -2106,8 +1963,7 @@ extern uLong ZEXPORT unzGetOffset (unzFile file) return (uLong)offset64; } -extern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos) -{ +extern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos) { unz64_s* s; int err; @@ -2124,7 +1980,6 @@ extern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos) return err; } -extern int ZEXPORT unzSetOffset (unzFile file, uLong pos) -{ +extern int ZEXPORT unzSetOffset (unzFile file, uLong pos) { return unzSetOffset64(file,pos); } diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/unzip.h b/src/zlib/zlib-1.3/contrib/minizip/unzip.h similarity index 76% rename from src/zlib/zlib-1.2.13/contrib/minizip/unzip.h rename to src/zlib/zlib-1.3/contrib/minizip/unzip.h index 6f95e94d7..14105840f 100644 --- a/src/zlib/zlib-1.2.13/contrib/minizip/unzip.h +++ b/src/zlib/zlib-1.3/contrib/minizip/unzip.h @@ -150,21 +150,21 @@ typedef struct unz_file_info_s tm_unz tmu_date; } unz_file_info; -extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1, - const char* fileName2, - int iCaseSensitivity)); +extern int ZEXPORT unzStringFileNameCompare(const char* fileName1, + const char* fileName2, + int iCaseSensitivity); /* - Compare two filename (fileName1,fileName2). - If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) - If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi + Compare two filenames (fileName1,fileName2). + If iCaseSensitivity = 1, comparison is case sensitive (like strcmp) + If iCaseSensitivity = 2, comparison is not case sensitive (like strcmpi or strcasecmp) - If iCaseSenisivity = 0, case sensitivity is defaut of your operating system + If iCaseSensitivity = 0, case sensitivity is default of your operating system (like 1 on Unix, 2 on Windows) */ -extern unzFile ZEXPORT unzOpen OF((const char *path)); -extern unzFile ZEXPORT unzOpen64 OF((const void *path)); +extern unzFile ZEXPORT unzOpen(const char *path); +extern unzFile ZEXPORT unzOpen64(const void *path); /* Open a Zip file. path contain the full pathname (by example, on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer @@ -181,41 +181,41 @@ extern unzFile ZEXPORT unzOpen64 OF((const void *path)); */ -extern unzFile ZEXPORT unzOpen2 OF((const char *path, - zlib_filefunc_def* pzlib_filefunc_def)); +extern unzFile ZEXPORT unzOpen2(const char *path, + zlib_filefunc_def* pzlib_filefunc_def); /* Open a Zip file, like unzOpen, but provide a set of file low level API for read/write the zip file (see ioapi.h) */ -extern unzFile ZEXPORT unzOpen2_64 OF((const void *path, - zlib_filefunc64_def* pzlib_filefunc_def)); +extern unzFile ZEXPORT unzOpen2_64(const void *path, + zlib_filefunc64_def* pzlib_filefunc_def); /* Open a Zip file, like unz64Open, but provide a set of file low level API for read/write the zip file (see ioapi.h) */ -extern int ZEXPORT unzClose OF((unzFile file)); +extern int ZEXPORT unzClose(unzFile file); /* Close a ZipFile opened with unzOpen. If there is files inside the .Zip opened with unzOpenCurrentFile (see later), these files MUST be closed with unzCloseCurrentFile before call unzClose. return UNZ_OK if there is no problem. */ -extern int ZEXPORT unzGetGlobalInfo OF((unzFile file, - unz_global_info *pglobal_info)); +extern int ZEXPORT unzGetGlobalInfo(unzFile file, + unz_global_info *pglobal_info); -extern int ZEXPORT unzGetGlobalInfo64 OF((unzFile file, - unz_global_info64 *pglobal_info)); +extern int ZEXPORT unzGetGlobalInfo64(unzFile file, + unz_global_info64 *pglobal_info); /* Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed return UNZ_OK if there is no problem. */ -extern int ZEXPORT unzGetGlobalComment OF((unzFile file, - char *szComment, - uLong uSizeBuf)); +extern int ZEXPORT unzGetGlobalComment(unzFile file, + char *szComment, + uLong uSizeBuf); /* Get the global comment string of the ZipFile, in the szComment buffer. uSizeBuf is the size of the szComment buffer. @@ -226,22 +226,22 @@ extern int ZEXPORT unzGetGlobalComment OF((unzFile file, /***************************************************************************/ /* Unzip package allow you browse the directory of the zipfile */ -extern int ZEXPORT unzGoToFirstFile OF((unzFile file)); +extern int ZEXPORT unzGoToFirstFile(unzFile file); /* Set the current file of the zipfile to the first file. return UNZ_OK if there is no problem */ -extern int ZEXPORT unzGoToNextFile OF((unzFile file)); +extern int ZEXPORT unzGoToNextFile(unzFile file); /* Set the current file of the zipfile to the next file. return UNZ_OK if there is no problem return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. */ -extern int ZEXPORT unzLocateFile OF((unzFile file, - const char *szFileName, - int iCaseSensitivity)); +extern int ZEXPORT unzLocateFile(unzFile file, + const char *szFileName, + int iCaseSensitivity); /* Try locate the file szFileName in the zipfile. For the iCaseSensitivity signification, see unzStringFileNameCompare @@ -285,26 +285,26 @@ extern int ZEXPORT unzGoToFilePos64( /* ****************************************** */ -extern int ZEXPORT unzGetCurrentFileInfo64 OF((unzFile file, - unz_file_info64 *pfile_info, - char *szFileName, - uLong fileNameBufferSize, - void *extraField, - uLong extraFieldBufferSize, - char *szComment, - uLong commentBufferSize)); - -extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, - unz_file_info *pfile_info, - char *szFileName, - uLong fileNameBufferSize, - void *extraField, - uLong extraFieldBufferSize, - char *szComment, - uLong commentBufferSize)); +extern int ZEXPORT unzGetCurrentFileInfo64(unzFile file, + unz_file_info64 *pfile_info, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize); + +extern int ZEXPORT unzGetCurrentFileInfo(unzFile file, + unz_file_info *pfile_info, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize); /* Get Info about the current file - if pfile_info!=NULL, the *pfile_info structure will contain somes info about + if pfile_info!=NULL, the *pfile_info structure will contain some info about the current file if szFileName!=NULL, the filemane string will be copied in szFileName (fileNameBufferSize is the size of the buffer) @@ -318,7 +318,7 @@ extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, /** Addition for GDAL : START */ -extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file)); +extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64(unzFile file); /** Addition for GDAL : END */ @@ -328,24 +328,24 @@ extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file)); from it, and close it (you can close it before reading all the file) */ -extern int ZEXPORT unzOpenCurrentFile OF((unzFile file)); +extern int ZEXPORT unzOpenCurrentFile(unzFile file); /* Open for reading data the current file in the zipfile. If there is no error, the return value is UNZ_OK. */ -extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file, - const char* password)); +extern int ZEXPORT unzOpenCurrentFilePassword(unzFile file, + const char* password); /* Open for reading data the current file in the zipfile. password is a crypting password If there is no error, the return value is UNZ_OK. */ -extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file, - int* method, - int* level, - int raw)); +extern int ZEXPORT unzOpenCurrentFile2(unzFile file, + int* method, + int* level, + int raw); /* Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) if raw==1 @@ -355,11 +355,11 @@ extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file, but you CANNOT set method parameter as NULL */ -extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file, - int* method, - int* level, - int raw, - const char* password)); +extern int ZEXPORT unzOpenCurrentFile3(unzFile file, + int* method, + int* level, + int raw, + const char* password); /* Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) if raw==1 @@ -370,41 +370,41 @@ extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file, */ -extern int ZEXPORT unzCloseCurrentFile OF((unzFile file)); +extern int ZEXPORT unzCloseCurrentFile(unzFile file); /* Close the file in zip opened with unzOpenCurrentFile Return UNZ_CRCERROR if all the file was read but the CRC is not good */ -extern int ZEXPORT unzReadCurrentFile OF((unzFile file, - voidp buf, - unsigned len)); +extern int ZEXPORT unzReadCurrentFile(unzFile file, + voidp buf, + unsigned len); /* Read bytes from the current file (opened by unzOpenCurrentFile) buf contain buffer where data must be copied len the size of buf. - return the number of byte copied if somes bytes are copied + return the number of byte copied if some bytes are copied return 0 if the end of file was reached return <0 with error code if there is an error (UNZ_ERRNO for IO error, or zLib error for uncompress error) */ -extern z_off_t ZEXPORT unztell OF((unzFile file)); +extern z_off_t ZEXPORT unztell(unzFile file); -extern ZPOS64_T ZEXPORT unztell64 OF((unzFile file)); +extern ZPOS64_T ZEXPORT unztell64(unzFile file); /* Give the current position in uncompressed data */ -extern int ZEXPORT unzeof OF((unzFile file)); +extern int ZEXPORT unzeof(unzFile file); /* return 1 if the end of file was reached, 0 elsewhere */ -extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file, - voidp buf, - unsigned len)); +extern int ZEXPORT unzGetLocalExtrafield(unzFile file, + voidp buf, + unsigned len); /* Read extra field from the current file (opened by unzOpenCurrentFile) This is the local-header version of the extra field (sometimes, there is diff --git a/src/zlib/zlib-1.2.13/contrib/minizip/zip.c b/src/zlib/zlib-1.3/contrib/minizip/zip.c similarity index 85% rename from src/zlib/zlib-1.2.13/contrib/minizip/zip.c rename to src/zlib/zlib-1.3/contrib/minizip/zip.c index 66d693f85..3d3d4cadd 100644 --- a/src/zlib/zlib-1.2.13/contrib/minizip/zip.c +++ b/src/zlib/zlib-1.3/contrib/minizip/zip.c @@ -14,7 +14,7 @@ Oct-2009 - Mathias Svensson - Added Zip64 Support when creating new file archives Oct-2009 - Mathias Svensson - Did some code cleanup and refactoring to get better overview of some functions. Oct-2009 - Mathias Svensson - Added zipRemoveExtraInfoBlock to strip extra field data from its ZIP64 data - It is used when recreting zip archive with RAW when deleting items from a zip. + It is used when recreating zip archive with RAW when deleting items from a zip. ZIP64 data is automatically added to items that needs it, and existing ZIP64 data need to be removed. Oct-2009 - Mathias Svensson - Added support for BZIP2 as compression mode (bzip2 lib is required) Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer @@ -25,14 +25,13 @@ #include #include #include +#include #include #include "zlib.h" #include "zip.h" #ifdef STDC # include -# include -# include #endif #ifdef NO_ERRNO_H extern int errno; @@ -47,7 +46,7 @@ /* compile with -Dlocal if your debugger can't find static symbols */ #ifndef VERSIONMADEBY -# define VERSIONMADEBY (0x0) /* platform depedent */ +# define VERSIONMADEBY (0x0) /* platform dependent */ #endif #ifndef Z_BUFSIZE @@ -61,9 +60,6 @@ #ifndef ALLOC # define ALLOC(size) (malloc(size)) #endif -#ifndef TRYFREE -# define TRYFREE(p) {if (p) free(p);} -#endif /* #define SIZECENTRALDIRITEM (0x2e) @@ -138,20 +134,20 @@ typedef struct uInt pos_in_buffered_data; /* last written byte in buffered_data */ ZPOS64_T pos_local_header; /* offset of the local header of the file - currenty writing */ + currently writing */ char* central_header; /* central header data for the current file */ uLong size_centralExtra; uLong size_centralheader; /* size of the central header for cur file */ uLong size_centralExtraFree; /* Extra bytes allocated to the centralheader but that are not used */ uLong flag; /* flag of the file currently writing */ - int method; /* compression method of file currenty wr.*/ + int method; /* compression method of file currently wr.*/ int raw; /* 1 for directly writing raw data */ Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/ uLong dosDate; uLong crc32; int encrypt; - int zip64; /* Add ZIP64 extened information in the extra field */ + int zip64; /* Add ZIP64 extended information in the extra field */ ZPOS64_T pos_zip64extrainfo; ZPOS64_T totalCompressedData; ZPOS64_T totalUncompressedData; @@ -165,10 +161,10 @@ typedef struct typedef struct { zlib_filefunc64_32_def z_filefunc; - voidpf filestream; /* io structore of the zipfile */ + voidpf filestream; /* io structure of the zipfile */ linkedlist_data central_dir;/* datablock with central dir in construction*/ int in_opened_file_inzip; /* 1 if a file in the zip is currently writ.*/ - curfile64_info ci; /* info on the file curretly writing */ + curfile64_info ci; /* info on the file currently writing */ ZPOS64_T begin_pos; /* position of the beginning of the zipfile */ ZPOS64_T add_position_when_writing_offset; @@ -186,8 +182,7 @@ typedef struct #include "crypt.h" #endif -local linkedlist_datablock_internal* allocate_new_datablock() -{ +local linkedlist_datablock_internal* allocate_new_datablock(void) { linkedlist_datablock_internal* ldi; ldi = (linkedlist_datablock_internal*) ALLOC(sizeof(linkedlist_datablock_internal)); @@ -200,30 +195,26 @@ local linkedlist_datablock_internal* allocate_new_datablock() return ldi; } -local void free_datablock(linkedlist_datablock_internal* ldi) -{ +local void free_datablock(linkedlist_datablock_internal* ldi) { while (ldi!=NULL) { linkedlist_datablock_internal* ldinext = ldi->next_datablock; - TRYFREE(ldi); + free(ldi); ldi = ldinext; } } -local void init_linkedlist(linkedlist_data* ll) -{ +local void init_linkedlist(linkedlist_data* ll) { ll->first_block = ll->last_block = NULL; } -local void free_linkedlist(linkedlist_data* ll) -{ +local void free_linkedlist(linkedlist_data* ll) { free_datablock(ll->first_block); ll->first_block = ll->last_block = NULL; } -local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len) -{ +local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len) { linkedlist_datablock_internal* ldi; const unsigned char* from_copy; @@ -238,7 +229,7 @@ local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len) } ldi = ll->last_block; - from_copy = (unsigned char*)buf; + from_copy = (const unsigned char*)buf; while (len>0) { @@ -283,9 +274,7 @@ local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len) nbByte == 1, 2 ,4 or 8 (byte, short or long, ZPOS64_T) */ -local int zip64local_putValue OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte)); -local int zip64local_putValue (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte) -{ +local int zip64local_putValue(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte) { unsigned char buf[8]; int n; for (n = 0; n < nbByte; n++) @@ -307,9 +296,7 @@ local int zip64local_putValue (const zlib_filefunc64_32_def* pzlib_filefunc_def, return ZIP_OK; } -local void zip64local_putValue_inmemory OF((void* dest, ZPOS64_T x, int nbByte)); -local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte) -{ +local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte) { unsigned char* buf=(unsigned char*)dest; int n; for (n = 0; n < nbByte; n++) { @@ -329,8 +316,7 @@ local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte) /****************************************************************************/ -local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm) -{ +local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm) { uLong year = (uLong)ptm->tm_year; if (year>=1980) year-=1980; @@ -344,10 +330,7 @@ local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm) /****************************************************************************/ -local int zip64local_getByte OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi)); - -local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def,voidpf filestream,int* pi) -{ +local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int* pi) { unsigned char c; int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1); if (err==1) @@ -368,10 +351,7 @@ local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def,vo /* =========================================================================== Reads a long in LSB order from the given gz_stream. Sets */ -local int zip64local_getShort OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); - -local int zip64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) -{ +local int zip64local_getShort(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) { uLong x ; int i = 0; int err; @@ -390,10 +370,7 @@ local int zip64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, return err; } -local int zip64local_getLong OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); - -local int zip64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) -{ +local int zip64local_getLong(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) { uLong x ; int i = 0; int err; @@ -420,11 +397,8 @@ local int zip64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, return err; } -local int zip64local_getLong64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX)); - -local int zip64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX) -{ +local int zip64local_getLong64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX) { ZPOS64_T x; int i = 0; int err; @@ -475,10 +449,7 @@ local int zip64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def Locate the Central directory of a zipfile (at the end, just before the global comment) */ -local ZPOS64_T zip64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); - -local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) -{ +local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) { unsigned char* buf; ZPOS64_T uSizeFile; ZPOS64_T uBackRead; @@ -529,7 +500,7 @@ local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f if (uPosFound!=0) break; } - TRYFREE(buf); + free(buf); return uPosFound; } @@ -537,10 +508,7 @@ local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f Locate the End of Zip64 Central directory locator and from there find the CD of a zipfile (at the end, just before the global comment) */ -local ZPOS64_T zip64local_SearchCentralDir64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); - -local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) -{ +local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) { unsigned char* buf; ZPOS64_T uSizeFile; ZPOS64_T uBackRead; @@ -595,7 +563,7 @@ local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib break; } - TRYFREE(buf); + free(buf); if (uPosFound == 0) return 0; @@ -637,8 +605,7 @@ local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib return relativeOffset; } -local int LoadCentralDirectoryRecord(zip64_internal* pziinit) -{ +local int LoadCentralDirectoryRecord(zip64_internal* pziinit) { int err=ZIP_OK; ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ @@ -648,9 +615,9 @@ local int LoadCentralDirectoryRecord(zip64_internal* pziinit) uLong uL; uLong number_disk; /* number of the current dist, used for - spaning ZIP, unsupported, always 0*/ + spanning ZIP, unsupported, always 0*/ uLong number_disk_with_CD; /* number the the disk with central dir, used - for spaning ZIP, unsupported, always 0*/ + for spanning ZIP, unsupported, always 0*/ ZPOS64_T number_entry; ZPOS64_T number_entry_CD; /* total number of entries in the central dir @@ -830,7 +797,7 @@ local int LoadCentralDirectoryRecord(zip64_internal* pziinit) size_central_dir_to_read-=read_this; } - TRYFREE(buf_read); + free(buf_read); } pziinit->begin_pos = byte_before_the_zipfile; pziinit->number_entry = number_entry_CD; @@ -846,8 +813,7 @@ local int LoadCentralDirectoryRecord(zip64_internal* pziinit) /************************************************************/ -extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def) -{ +extern zipFile ZEXPORT zipOpen3(const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def) { zip64_internal ziinit; zip64_internal* zi; int err=ZIP_OK; @@ -905,9 +871,9 @@ extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* gl if (err != ZIP_OK) { # ifndef NO_ADDFILEINEXISTINGZIP - TRYFREE(ziinit.globalcomment); + free(ziinit.globalcomment); # endif /* !NO_ADDFILEINEXISTINGZIP*/ - TRYFREE(zi); + free(zi); return NULL; } else @@ -917,8 +883,7 @@ extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* gl } } -extern zipFile ZEXPORT zipOpen2 (const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def) -{ +extern zipFile ZEXPORT zipOpen2(const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def) { if (pzlib_filefunc32_def != NULL) { zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; @@ -929,8 +894,7 @@ extern zipFile ZEXPORT zipOpen2 (const char *pathname, int append, zipcharpc* gl return zipOpen3(pathname, append, globalcomment, NULL); } -extern zipFile ZEXPORT zipOpen2_64 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def) -{ +extern zipFile ZEXPORT zipOpen2_64(const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def) { if (pzlib_filefunc_def != NULL) { zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; @@ -945,18 +909,15 @@ extern zipFile ZEXPORT zipOpen2_64 (const void *pathname, int append, zipcharpc* -extern zipFile ZEXPORT zipOpen (const char* pathname, int append) -{ +extern zipFile ZEXPORT zipOpen(const char* pathname, int append) { return zipOpen3((const void*)pathname,append,NULL,NULL); } -extern zipFile ZEXPORT zipOpen64 (const void* pathname, int append) -{ +extern zipFile ZEXPORT zipOpen64(const void* pathname, int append) { return zipOpen3(pathname,append,NULL,NULL); } -local int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local) -{ +local int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local) { /* write the local header */ int err; uInt size_filename = (uInt)strlen(filename); @@ -1052,14 +1013,13 @@ local int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt s It is not done here because then we need to realloc a new buffer since parameters are 'const' and I want to minimize unnecessary allocations. */ -extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename, const zip_fileinfo* zipfi, - const void* extrafield_local, uInt size_extrafield_local, - const void* extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level, int raw, - int windowBits,int memLevel, int strategy, - const char* password, uLong crcForCrypting, - uLong versionMadeBy, uLong flagBase, int zip64) -{ +extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting, + uLong versionMadeBy, uLong flagBase, int zip64) { zip64_internal* zi; uInt size_filename; uInt size_comment; @@ -1262,35 +1222,33 @@ extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename, return err; } -extern int ZEXPORT zipOpenNewFileInZip4 (zipFile file, const char* filename, const zip_fileinfo* zipfi, - const void* extrafield_local, uInt size_extrafield_local, - const void* extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level, int raw, - int windowBits,int memLevel, int strategy, - const char* password, uLong crcForCrypting, - uLong versionMadeBy, uLong flagBase) -{ - return zipOpenNewFileInZip4_64 (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw, - windowBits, memLevel, strategy, - password, crcForCrypting, versionMadeBy, flagBase, 0); +extern int ZEXPORT zipOpenNewFileInZip4(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting, + uLong versionMadeBy, uLong flagBase) { + return zipOpenNewFileInZip4_64(file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, versionMadeBy, flagBase, 0); } -extern int ZEXPORT zipOpenNewFileInZip3 (zipFile file, const char* filename, const zip_fileinfo* zipfi, - const void* extrafield_local, uInt size_extrafield_local, - const void* extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level, int raw, - int windowBits,int memLevel, int strategy, - const char* password, uLong crcForCrypting) -{ - return zipOpenNewFileInZip4_64 (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw, - windowBits, memLevel, strategy, - password, crcForCrypting, VERSIONMADEBY, 0, 0); +extern int ZEXPORT zipOpenNewFileInZip3(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting) { + return zipOpenNewFileInZip4_64(file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, VERSIONMADEBY, 0, 0); } extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, @@ -1298,70 +1256,64 @@ extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, c const void* extrafield_global, uInt size_extrafield_global, const char* comment, int method, int level, int raw, int windowBits,int memLevel, int strategy, - const char* password, uLong crcForCrypting, int zip64) -{ - return zipOpenNewFileInZip4_64 (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw, - windowBits, memLevel, strategy, - password, crcForCrypting, VERSIONMADEBY, 0, zip64); + const char* password, uLong crcForCrypting, int zip64) { + return zipOpenNewFileInZip4_64(file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, VERSIONMADEBY, 0, zip64); } extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, const char* filename, const zip_fileinfo* zipfi, const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level, int raw) -{ - return zipOpenNewFileInZip4_64 (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw, - -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, - NULL, 0, VERSIONMADEBY, 0, 0); + const char* comment, int method, int level, int raw) { + return zipOpenNewFileInZip4_64(file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, 0); } extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, - const void* extrafield_local, uInt size_extrafield_local, - const void* extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level, int raw, int zip64) -{ - return zipOpenNewFileInZip4_64 (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw, - -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, - NULL, 0, VERSIONMADEBY, 0, zip64); + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, int zip64) { + return zipOpenNewFileInZip4_64(file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, zip64); } -extern int ZEXPORT zipOpenNewFileInZip64 (zipFile file, const char* filename, const zip_fileinfo* zipfi, - const void* extrafield_local, uInt size_extrafield_local, - const void*extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level, int zip64) -{ - return zipOpenNewFileInZip4_64 (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, 0, - -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, - NULL, 0, VERSIONMADEBY, 0, zip64); +extern int ZEXPORT zipOpenNewFileInZip64(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void*extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int zip64) { + return zipOpenNewFileInZip4_64(file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, 0, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, zip64); } -extern int ZEXPORT zipOpenNewFileInZip (zipFile file, const char* filename, const zip_fileinfo* zipfi, - const void* extrafield_local, uInt size_extrafield_local, - const void*extrafield_global, uInt size_extrafield_global, - const char* comment, int method, int level) -{ - return zipOpenNewFileInZip4_64 (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, 0, - -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, - NULL, 0, VERSIONMADEBY, 0, 0); +extern int ZEXPORT zipOpenNewFileInZip(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void*extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level) { + return zipOpenNewFileInZip4_64(file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, 0, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, 0); } -local int zip64FlushWriteBuffer(zip64_internal* zi) -{ +local int zip64FlushWriteBuffer(zip64_internal* zi) { int err=ZIP_OK; if (zi->ci.encrypt != 0) @@ -1399,8 +1351,7 @@ local int zip64FlushWriteBuffer(zip64_internal* zi) return err; } -extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned int len) -{ +extern int ZEXPORT zipWriteInFileInZip(zipFile file, const void* buf, unsigned int len) { zip64_internal* zi; int err=ZIP_OK; @@ -1450,7 +1401,7 @@ extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned in else #endif { - zi->ci.stream.next_in = (Bytef*)buf; + zi->ci.stream.next_in = (Bytef*)(uintptr_t)buf; zi->ci.stream.avail_in = len; while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) @@ -1501,13 +1452,11 @@ extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned in return err; } -extern int ZEXPORT zipCloseFileInZipRaw (zipFile file, uLong uncompressed_size, uLong crc32) -{ +extern int ZEXPORT zipCloseFileInZipRaw(zipFile file, uLong uncompressed_size, uLong crc32) { return zipCloseFileInZipRaw64 (file, uncompressed_size, crc32); } -extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_size, uLong crc32) -{ +extern int ZEXPORT zipCloseFileInZipRaw64(zipFile file, ZPOS64_T uncompressed_size, uLong crc32) { zip64_internal* zi; ZPOS64_T compressed_size; uLong invalidValue = 0xffffffff; @@ -1742,13 +1691,11 @@ extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_s return err; } -extern int ZEXPORT zipCloseFileInZip (zipFile file) -{ +extern int ZEXPORT zipCloseFileInZip(zipFile file) { return zipCloseFileInZipRaw (file,0,0); } -local int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip) -{ +local int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip) { int err = ZIP_OK; ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writing_offset; @@ -1769,8 +1716,7 @@ local int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T z return err; } -local int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) -{ +local int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) { int err = ZIP_OK; uLong Zip64DataSize = 44; @@ -1808,8 +1754,8 @@ local int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_ } return err; } -local int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) -{ + +local int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) { int err = ZIP_OK; /*signature*/ @@ -1856,8 +1802,7 @@ local int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centr return err; } -local int Write_GlobalComment(zip64_internal* zi, const char* global_comment) -{ +local int Write_GlobalComment(zip64_internal* zi, const char* global_comment) { int err = ZIP_OK; uInt size_global_comment = 0; @@ -1874,8 +1819,7 @@ local int Write_GlobalComment(zip64_internal* zi, const char* global_comment) return err; } -extern int ZEXPORT zipClose (zipFile file, const char* global_comment) -{ +extern int ZEXPORT zipClose(zipFile file, const char* global_comment) { zip64_internal* zi; int err = 0; uLong size_centraldir = 0; @@ -1936,15 +1880,14 @@ extern int ZEXPORT zipClose (zipFile file, const char* global_comment) err = ZIP_ERRNO; #ifndef NO_ADDFILEINEXISTINGZIP - TRYFREE(zi->globalcomment); + free(zi->globalcomment); #endif - TRYFREE(zi); + free(zi); return err; } -extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHeader) -{ +extern int ZEXPORT zipRemoveExtraInfoBlock(char* pData, int* dataLen, short sHeader) { char* p = pData; int size = 0; char* pNewHeader; @@ -1996,7 +1939,7 @@ extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHe else retVal = ZIP_ERRNO; - TRYFREE(pNewHeader); + free(pNewHeader); return retVal; } diff --git a/src/zlib/zlib-1.3/contrib/minizip/zip.h b/src/zlib/zlib-1.3/contrib/minizip/zip.h new file mode 100644 index 000000000..5fc084132 --- /dev/null +++ b/src/zlib/zlib-1.3/contrib/minizip/zip.h @@ -0,0 +1,364 @@ +/* zip.h -- IO on .zip files using zlib + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + --------------------------------------------------------------------------- + + Condition of use and distribution are the same than zlib : + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + --------------------------------------------------------------------------- + + Changes + + See header of zip.h + +*/ + +#ifndef _zip12_H +#define _zip12_H + +#ifdef __cplusplus +extern "C" { +#endif + +//#define HAVE_BZIP2 + +#ifndef _ZLIB_H +#include "zlib.h" +#endif + +#ifndef _ZLIBIOAPI_H +#include "ioapi.h" +#endif + +#ifdef HAVE_BZIP2 +#include "bzlib.h" +#endif + +#define Z_BZIP2ED 12 + +#if defined(STRICTZIP) || defined(STRICTZIPUNZIP) +/* like the STRICT of WIN32, we define a pointer that cannot be converted + from (void*) without cast */ +typedef struct TagzipFile__ { int unused; } zipFile__; +typedef zipFile__ *zipFile; +#else +typedef voidp zipFile; +#endif + +#define ZIP_OK (0) +#define ZIP_EOF (0) +#define ZIP_ERRNO (Z_ERRNO) +#define ZIP_PARAMERROR (-102) +#define ZIP_BADZIPFILE (-103) +#define ZIP_INTERNALERROR (-104) + +#ifndef DEF_MEM_LEVEL +# if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +# else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +# endif +#endif +/* default memLevel */ + +/* tm_zip contain date/time info */ +typedef struct tm_zip_s +{ + int tm_sec; /* seconds after the minute - [0,59] */ + int tm_min; /* minutes after the hour - [0,59] */ + int tm_hour; /* hours since midnight - [0,23] */ + int tm_mday; /* day of the month - [1,31] */ + int tm_mon; /* months since January - [0,11] */ + int tm_year; /* years - [1980..2044] */ +} tm_zip; + +typedef struct +{ + tm_zip tmz_date; /* date in understandable format */ + uLong dosDate; /* if dos_date == 0, tmu_date is used */ +/* uLong flag; */ /* general purpose bit flag 2 bytes */ + + uLong internal_fa; /* internal file attributes 2 bytes */ + uLong external_fa; /* external file attributes 4 bytes */ +} zip_fileinfo; + +typedef const char* zipcharpc; + + +#define APPEND_STATUS_CREATE (0) +#define APPEND_STATUS_CREATEAFTER (1) +#define APPEND_STATUS_ADDINZIP (2) + +extern zipFile ZEXPORT zipOpen(const char *pathname, int append); +extern zipFile ZEXPORT zipOpen64(const void *pathname, int append); +/* + Create a zipfile. + pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on + an Unix computer "zlib/zlib113.zip". + if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip + will be created at the end of the file. + (useful if the file contain a self extractor code) + if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will + add files in existing zip (be sure you don't add file that doesn't exist) + If the zipfile cannot be opened, the return value is NULL. + Else, the return value is a zipFile Handle, usable with other function + of this zip package. +*/ + +/* Note : there is no delete function into a zipfile. + If you want delete file into a zipfile, you must open a zipfile, and create another + Of course, you can use RAW reading and writing to copy the file you did not want delete +*/ + +extern zipFile ZEXPORT zipOpen2(const char *pathname, + int append, + zipcharpc* globalcomment, + zlib_filefunc_def* pzlib_filefunc_def); + +extern zipFile ZEXPORT zipOpen2_64(const void *pathname, + int append, + zipcharpc* globalcomment, + zlib_filefunc64_def* pzlib_filefunc_def); + +extern zipFile ZEXPORT zipOpen3(const void *pathname, + int append, + zipcharpc* globalcomment, + zlib_filefunc64_32_def* pzlib_filefunc64_32_def); + +extern int ZEXPORT zipOpenNewFileInZip(zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level); + +extern int ZEXPORT zipOpenNewFileInZip64(zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int zip64); + +/* + Open a file in the ZIP for writing. + filename : the filename in zip (if NULL, '-' without quote will be used + *zipfi contain supplemental information + if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local + contains the extrafield data the the local header + if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global + contains the extrafield data the the local header + if comment != NULL, comment contain the comment string + method contain the compression method (0 for store, Z_DEFLATED for deflate) + level contain the level of compression (can be Z_DEFAULT_COMPRESSION) + zip64 is set to 1 if a zip64 extended information block should be added to the local file header. + this MUST be '1' if the uncompressed size is >= 0xffffffff. + +*/ + + +extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw); + + +extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int zip64); +/* + Same than zipOpenNewFileInZip, except if raw=1, we write raw file + */ + +extern int ZEXPORT zipOpenNewFileInZip3(zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting); + +extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + int zip64); + +/* + Same than zipOpenNewFileInZip2, except + windowBits,memLevel,,strategy : see parameter strategy in deflateInit2 + password : crypting password (NULL for no crypting) + crcForCrypting : crc of file to compress (needed for crypting) + */ + +extern int ZEXPORT zipOpenNewFileInZip4(zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + uLong versionMadeBy, + uLong flagBase); + + +extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + uLong versionMadeBy, + uLong flagBase, + int zip64); +/* + Same than zipOpenNewFileInZip4, except + versionMadeBy : value for Version made by field + flag : value for flag field (compression level info will be added) + */ + + +extern int ZEXPORT zipWriteInFileInZip(zipFile file, + const void* buf, + unsigned len); +/* + Write data in the zipfile +*/ + +extern int ZEXPORT zipCloseFileInZip(zipFile file); +/* + Close the current file in the zipfile +*/ + +extern int ZEXPORT zipCloseFileInZipRaw(zipFile file, + uLong uncompressed_size, + uLong crc32); + +extern int ZEXPORT zipCloseFileInZipRaw64(zipFile file, + ZPOS64_T uncompressed_size, + uLong crc32); + +/* + Close the current file in the zipfile, for file opened with + parameter raw=1 in zipOpenNewFileInZip2 + uncompressed_size and crc32 are value for the uncompressed size +*/ + +extern int ZEXPORT zipClose(zipFile file, + const char* global_comment); +/* + Close the zipfile +*/ + + +extern int ZEXPORT zipRemoveExtraInfoBlock(char* pData, int* dataLen, short sHeader); +/* + zipRemoveExtraInfoBlock - Added by Mathias Svensson + + Remove extra information block from a extra information data for the local file header or central directory header + + It is needed to remove ZIP64 extra information blocks when before data is written if using RAW mode. + + 0x0001 is the signature header for the ZIP64 extra information blocks + + usage. + Remove ZIP64 Extra information from a central director extra field data + zipRemoveExtraInfoBlock(pCenDirExtraFieldData, &nCenDirExtraFieldDataLen, 0x0001); + + Remove ZIP64 Extra information from a Local File Header extra field data + zipRemoveExtraInfoBlock(pLocalHeaderExtraFieldData, &nLocalHeaderExtraFieldDataLen, 0x0001); +*/ + +#ifdef __cplusplus +} +#endif + +#endif /* _zip64_H */ diff --git a/src/zlib/zlib-1.2.13/contrib/pascal/example.pas b/src/zlib/zlib-1.3/contrib/pascal/example.pas similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/pascal/example.pas rename to src/zlib/zlib-1.3/contrib/pascal/example.pas diff --git a/src/zlib/zlib-1.2.13/contrib/pascal/readme.txt b/src/zlib/zlib-1.3/contrib/pascal/readme.txt similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/pascal/readme.txt rename to src/zlib/zlib-1.3/contrib/pascal/readme.txt diff --git a/src/zlib/zlib-1.2.13/contrib/pascal/zlibd32.mak b/src/zlib/zlib-1.3/contrib/pascal/zlibd32.mak similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/pascal/zlibd32.mak rename to src/zlib/zlib-1.3/contrib/pascal/zlibd32.mak diff --git a/src/zlib/zlib-1.2.13/contrib/pascal/zlibpas.pas b/src/zlib/zlib-1.3/contrib/pascal/zlibpas.pas similarity index 99% rename from src/zlib/zlib-1.2.13/contrib/pascal/zlibpas.pas rename to src/zlib/zlib-1.3/contrib/pascal/zlibpas.pas index bf3fff6ff..a2b24a593 100644 --- a/src/zlib/zlib-1.2.13/contrib/pascal/zlibpas.pas +++ b/src/zlib/zlib-1.3/contrib/pascal/zlibpas.pas @@ -10,7 +10,7 @@ interface const - ZLIB_VERSION = '1.2.13'; + ZLIB_VERSION = '1.3.0'; ZLIB_VERNUM = $12a0; type diff --git a/src/zlib/zlib-1.2.13/contrib/puff/Makefile b/src/zlib/zlib-1.3/contrib/puff/Makefile similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/puff/Makefile rename to src/zlib/zlib-1.3/contrib/puff/Makefile diff --git a/src/zlib/zlib-1.2.13/contrib/puff/README b/src/zlib/zlib-1.3/contrib/puff/README similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/puff/README rename to src/zlib/zlib-1.3/contrib/puff/README diff --git a/src/zlib/zlib-1.2.13/contrib/puff/puff.c b/src/zlib/zlib-1.3/contrib/puff/puff.c similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/puff/puff.c rename to src/zlib/zlib-1.3/contrib/puff/puff.c diff --git a/src/zlib/zlib-1.2.13/contrib/puff/puff.h b/src/zlib/zlib-1.3/contrib/puff/puff.h similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/puff/puff.h rename to src/zlib/zlib-1.3/contrib/puff/puff.h diff --git a/src/zlib/zlib-1.2.13/contrib/puff/pufftest.c b/src/zlib/zlib-1.3/contrib/puff/pufftest.c similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/puff/pufftest.c rename to src/zlib/zlib-1.3/contrib/puff/pufftest.c diff --git a/src/zlib/zlib-1.2.13/contrib/puff/zeros.raw b/src/zlib/zlib-1.3/contrib/puff/zeros.raw similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/puff/zeros.raw rename to src/zlib/zlib-1.3/contrib/puff/zeros.raw diff --git a/src/zlib/zlib-1.2.13/contrib/testzlib/testzlib.c b/src/zlib/zlib-1.3/contrib/testzlib/testzlib.c similarity index 95% rename from src/zlib/zlib-1.2.13/contrib/testzlib/testzlib.c rename to src/zlib/zlib-1.3/contrib/testzlib/testzlib.c index 5f659dea0..b3c0014f9 100644 --- a/src/zlib/zlib-1.2.13/contrib/testzlib/testzlib.c +++ b/src/zlib/zlib-1.3/contrib/testzlib/testzlib.c @@ -169,7 +169,7 @@ int main(int argc, char *argv[]) printf("error reading %s\n",argv[1]); return 1; } - else printf("file %s read, %u bytes\n",argv[1],lFileSize); + else printf("file %s read, %ld bytes\n",argv[1],lFileSize); if (argc>=3) BlockSizeCompress=atol(argv[2]); diff --git a/src/zlib/zlib-1.2.13/contrib/testzlib/testzlib.txt b/src/zlib/zlib-1.3/contrib/testzlib/testzlib.txt similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/testzlib/testzlib.txt rename to src/zlib/zlib-1.3/contrib/testzlib/testzlib.txt diff --git a/src/zlib/zlib-1.2.13/contrib/untgz/Makefile b/src/zlib/zlib-1.3/contrib/untgz/Makefile similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/untgz/Makefile rename to src/zlib/zlib-1.3/contrib/untgz/Makefile diff --git a/src/zlib/zlib-1.2.13/contrib/untgz/Makefile.msc b/src/zlib/zlib-1.3/contrib/untgz/Makefile.msc similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/untgz/Makefile.msc rename to src/zlib/zlib-1.3/contrib/untgz/Makefile.msc diff --git a/src/zlib/zlib-1.2.13/contrib/untgz/untgz.c b/src/zlib/zlib-1.3/contrib/untgz/untgz.c similarity index 94% rename from src/zlib/zlib-1.2.13/contrib/untgz/untgz.c rename to src/zlib/zlib-1.3/contrib/untgz/untgz.c index 2c391e598..78579211f 100644 --- a/src/zlib/zlib-1.2.13/contrib/untgz/untgz.c +++ b/src/zlib/zlib-1.3/contrib/untgz/untgz.c @@ -4,6 +4,22 @@ * written by Pedro A. Aranda Gutierrez * adaptation to Unix by Jean-loup Gailly * various fixes by Cosmin Truta + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. */ #include @@ -14,15 +30,10 @@ #include "zlib.h" -#ifdef unix -# include -#else +#ifdef _WIN32 # include # include -#endif - -#ifdef WIN32 -#include +# include # ifndef F_OK # define F_OK 0 # endif @@ -33,6 +44,8 @@ # define strdup(str) _strdup(str) # endif #else +# include +# include # include #endif @@ -102,28 +115,14 @@ struct attr_item enum { TGZ_EXTRACT, TGZ_LIST, TGZ_INVALID }; -char *TGZfname OF((const char *)); -void TGZnotfound OF((const char *)); - -int getoct OF((char *, int)); -char *strtime OF((time_t *)); -int setfiletime OF((char *, time_t)); -void push_attr OF((struct attr_item **, char *, int, time_t)); -void restore_attr OF((struct attr_item **)); - -int ExprMatch OF((char *, char *)); - -int makedir OF((char *)); -int matchname OF((int, int, char **, char *)); - -void error OF((const char *)); -int tar OF((gzFile, int, int, int, char **)); - -void help OF((int)); -int main OF((int, char **)); - char *prog; +void error(const char *msg) +{ + fprintf(stderr, "%s: %s\n", prog, msg); + exit(1); +} + const char *TGZsuffix[] = { "\0", ".tar", ".tar.gz", ".taz", ".tgz", NULL }; /* return the file name of the TGZ archive */ @@ -205,7 +204,7 @@ char *strtime (time_t *t) int setfiletime (char *fname,time_t ftime) { -#ifdef WIN32 +#ifdef _WIN32 static int isWinNT = -1; SYSTEMTIME st; FILETIME locft, modft; @@ -590,12 +589,6 @@ void help(int exitval) exit(exitval); } -void error(const char *msg) -{ - fprintf(stderr, "%s: %s\n", prog, msg); - exit(1); -} - /* ============================================================ */ @@ -608,7 +601,7 @@ int main(int argc,char **argv) int action = TGZ_EXTRACT; int arg = 1; char *TGZfile; - gzFile *f; + gzFile f; prog = strrchr(argv[0],'\\'); if (prog == NULL) diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/readme.txt b/src/zlib/zlib-1.3/contrib/vstudio/readme.txt similarity index 95% rename from src/zlib/zlib-1.2.13/contrib/vstudio/readme.txt rename to src/zlib/zlib-1.3/contrib/vstudio/readme.txt index 17e693ffd..05ba487c9 100644 --- a/src/zlib/zlib-1.2.13/contrib/vstudio/readme.txt +++ b/src/zlib/zlib-1.3/contrib/vstudio/readme.txt @@ -1,4 +1,4 @@ -Building instructions for the DLL versions of Zlib 1.2.13 +Building instructions for the DLL versions of Zlib 1.3.0 ======================================================== This directory contains projects that build zlib and minizip using diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/miniunz.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc10/miniunz.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/miniunz.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/miniunz.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/miniunz.vcxproj.filters b/src/zlib/zlib-1.3/contrib/vstudio/vc10/miniunz.vcxproj.filters similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/miniunz.vcxproj.filters rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/miniunz.vcxproj.filters diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/minizip.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc10/minizip.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/minizip.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/minizip.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/minizip.vcxproj.filters b/src/zlib/zlib-1.3/contrib/vstudio/vc10/minizip.vcxproj.filters similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/minizip.vcxproj.filters rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/minizip.vcxproj.filters diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/testzlib.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc10/testzlib.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/testzlib.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/testzlib.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/testzlib.vcxproj.filters b/src/zlib/zlib-1.3/contrib/vstudio/vc10/testzlib.vcxproj.filters similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/testzlib.vcxproj.filters rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/testzlib.vcxproj.filters diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/testzlibdll.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc10/testzlibdll.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/testzlibdll.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/testzlibdll.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/testzlibdll.vcxproj.filters b/src/zlib/zlib-1.3/contrib/vstudio/vc10/testzlibdll.vcxproj.filters similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/testzlibdll.vcxproj.filters rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/testzlibdll.vcxproj.filters diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc11/zlib.rc b/src/zlib/zlib-1.3/contrib/vstudio/vc10/zlib.rc similarity index 80% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc11/zlib.rc rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/zlib.rc index 876027498..29af8e11a 100644 --- a/src/zlib/zlib-1.2.13/contrib/vstudio/vc11/zlib.rc +++ b/src/zlib/zlib-1.3/contrib/vstudio/vc10/zlib.rc @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 13, 0 - PRODUCTVERSION 1, 2, 13, 0 + FILEVERSION 1, 3, 0, 0 + PRODUCTVERSION 1, 3, 0, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,12 +17,12 @@ BEGIN BEGIN VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.13\0" + VALUE "FileVersion", "1.3.0\0" VALUE "InternalName", "zlib\0" VALUE "OriginalFilename", "zlibwapi.dll\0" VALUE "ProductName", "ZLib.DLL\0" VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" + VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0" END END BLOCK "VarFileInfo" diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlibstat.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc10/zlibstat.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlibstat.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/zlibstat.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlibstat.vcxproj.filters b/src/zlib/zlib-1.3/contrib/vstudio/vc10/zlibstat.vcxproj.filters similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlibstat.vcxproj.filters rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/zlibstat.vcxproj.filters diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc11/zlibvc.def b/src/zlib/zlib-1.3/contrib/vstudio/vc10/zlibvc.def similarity index 97% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc11/zlibvc.def rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/zlibvc.def index ba09bc1b9..f28aa6c73 100644 --- a/src/zlib/zlib-1.2.13/contrib/vstudio/vc11/zlibvc.def +++ b/src/zlib/zlib-1.3/contrib/vstudio/vc10/zlibvc.def @@ -1,7 +1,7 @@ LIBRARY ; zlib data compression and ZIP file I/O library -VERSION 1.2 +VERSION 1.3 EXPORTS adler32 @1 diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlibvc.sln b/src/zlib/zlib-1.3/contrib/vstudio/vc10/zlibvc.sln similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlibvc.sln rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/zlibvc.sln diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlibvc.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc10/zlibvc.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlibvc.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/zlibvc.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlibvc.vcxproj.filters b/src/zlib/zlib-1.3/contrib/vstudio/vc10/zlibvc.vcxproj.filters similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlibvc.vcxproj.filters rename to src/zlib/zlib-1.3/contrib/vstudio/vc10/zlibvc.vcxproj.filters diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc11/miniunz.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc11/miniunz.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc11/miniunz.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc11/miniunz.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc11/minizip.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc11/minizip.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc11/minizip.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc11/minizip.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc11/testzlib.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc11/testzlib.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc11/testzlib.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc11/testzlib.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc11/testzlibdll.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc11/testzlibdll.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc11/testzlibdll.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc11/testzlibdll.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlib.rc b/src/zlib/zlib-1.3/contrib/vstudio/vc11/zlib.rc similarity index 80% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlib.rc rename to src/zlib/zlib-1.3/contrib/vstudio/vc11/zlib.rc index 876027498..29af8e11a 100644 --- a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlib.rc +++ b/src/zlib/zlib-1.3/contrib/vstudio/vc11/zlib.rc @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 13, 0 - PRODUCTVERSION 1, 2, 13, 0 + FILEVERSION 1, 3, 0, 0 + PRODUCTVERSION 1, 3, 0, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,12 +17,12 @@ BEGIN BEGIN VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.13\0" + VALUE "FileVersion", "1.3.0\0" VALUE "InternalName", "zlib\0" VALUE "OriginalFilename", "zlibwapi.dll\0" VALUE "ProductName", "ZLib.DLL\0" VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" + VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0" END END BLOCK "VarFileInfo" diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc11/zlibstat.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc11/zlibstat.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc11/zlibstat.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc11/zlibstat.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc14/zlibvc.def b/src/zlib/zlib-1.3/contrib/vstudio/vc11/zlibvc.def similarity index 97% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc14/zlibvc.def rename to src/zlib/zlib-1.3/contrib/vstudio/vc11/zlibvc.def index ba09bc1b9..f28aa6c73 100644 --- a/src/zlib/zlib-1.2.13/contrib/vstudio/vc14/zlibvc.def +++ b/src/zlib/zlib-1.3/contrib/vstudio/vc11/zlibvc.def @@ -1,7 +1,7 @@ LIBRARY ; zlib data compression and ZIP file I/O library -VERSION 1.2 +VERSION 1.3 EXPORTS adler32 @1 diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc11/zlibvc.sln b/src/zlib/zlib-1.3/contrib/vstudio/vc11/zlibvc.sln similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc11/zlibvc.sln rename to src/zlib/zlib-1.3/contrib/vstudio/vc11/zlibvc.sln diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc11/zlibvc.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc11/zlibvc.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc11/zlibvc.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc11/zlibvc.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc12/miniunz.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc12/miniunz.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc12/miniunz.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc12/miniunz.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc12/minizip.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc12/minizip.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc12/minizip.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc12/minizip.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc12/testzlib.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc12/testzlib.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc12/testzlib.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc12/testzlib.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc12/testzlibdll.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc12/testzlibdll.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc12/testzlibdll.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc12/testzlibdll.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc12/zlib.rc b/src/zlib/zlib-1.3/contrib/vstudio/vc12/zlib.rc similarity index 82% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc12/zlib.rc rename to src/zlib/zlib-1.3/contrib/vstudio/vc12/zlib.rc index cdd7985d4..57fb31a32 100644 --- a/src/zlib/zlib-1.2.13/contrib/vstudio/vc12/zlib.rc +++ b/src/zlib/zlib-1.3/contrib/vstudio/vc12/zlib.rc @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 13, 0 - PRODUCTVERSION 1, 2, 13, 0 + FILEVERSION 1, 3, 0, 0 + PRODUCTVERSION 1, 3, 0, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,12 +17,12 @@ BEGIN BEGIN VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.13\0" + VALUE "FileVersion", "1.3.0\0" VALUE "InternalName", "zlib\0" VALUE "OriginalFilename", "zlibwapi.dll\0" VALUE "ProductName", "ZLib.DLL\0" VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" + VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0" END END BLOCK "VarFileInfo" diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc12/zlibstat.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc12/zlibstat.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc12/zlibstat.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc12/zlibstat.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc12/zlibvc.def b/src/zlib/zlib-1.3/contrib/vstudio/vc12/zlibvc.def similarity index 97% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc12/zlibvc.def rename to src/zlib/zlib-1.3/contrib/vstudio/vc12/zlibvc.def index ba09bc1b9..f28aa6c73 100644 --- a/src/zlib/zlib-1.2.13/contrib/vstudio/vc12/zlibvc.def +++ b/src/zlib/zlib-1.3/contrib/vstudio/vc12/zlibvc.def @@ -1,7 +1,7 @@ LIBRARY ; zlib data compression and ZIP file I/O library -VERSION 1.2 +VERSION 1.3 EXPORTS adler32 @1 diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc12/zlibvc.sln b/src/zlib/zlib-1.3/contrib/vstudio/vc12/zlibvc.sln similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc12/zlibvc.sln rename to src/zlib/zlib-1.3/contrib/vstudio/vc12/zlibvc.sln diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc12/zlibvc.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc12/zlibvc.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc12/zlibvc.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc12/zlibvc.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc14/miniunz.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc14/miniunz.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc14/miniunz.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc14/miniunz.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc14/minizip.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc14/minizip.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc14/minizip.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc14/minizip.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc14/testzlib.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc14/testzlib.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc14/testzlib.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc14/testzlib.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc14/testzlibdll.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc14/testzlibdll.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc14/testzlibdll.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc14/testzlibdll.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc14/zlib.rc b/src/zlib/zlib-1.3/contrib/vstudio/vc14/zlib.rc similarity index 82% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc14/zlib.rc rename to src/zlib/zlib-1.3/contrib/vstudio/vc14/zlib.rc index cdd7985d4..57fb31a32 100644 --- a/src/zlib/zlib-1.2.13/contrib/vstudio/vc14/zlib.rc +++ b/src/zlib/zlib-1.3/contrib/vstudio/vc14/zlib.rc @@ -2,8 +2,8 @@ #define IDR_VERSION1 1 IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1, 2, 13, 0 - PRODUCTVERSION 1, 2, 13, 0 + FILEVERSION 1, 3, 0, 0 + PRODUCTVERSION 1, 3, 0, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0 FILEOS VOS_DOS_WINDOWS32 @@ -17,12 +17,12 @@ BEGIN BEGIN VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.13\0" + VALUE "FileVersion", "1.3.0\0" VALUE "InternalName", "zlib\0" VALUE "OriginalFilename", "zlibwapi.dll\0" VALUE "ProductName", "ZLib.DLL\0" VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" + VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0" END END BLOCK "VarFileInfo" diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc14/zlibstat.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc14/zlibstat.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc14/zlibstat.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc14/zlibstat.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlibvc.def b/src/zlib/zlib-1.3/contrib/vstudio/vc14/zlibvc.def similarity index 97% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlibvc.def rename to src/zlib/zlib-1.3/contrib/vstudio/vc14/zlibvc.def index ba09bc1b9..f28aa6c73 100644 --- a/src/zlib/zlib-1.2.13/contrib/vstudio/vc10/zlibvc.def +++ b/src/zlib/zlib-1.3/contrib/vstudio/vc14/zlibvc.def @@ -1,7 +1,7 @@ LIBRARY ; zlib data compression and ZIP file I/O library -VERSION 1.2 +VERSION 1.3 EXPORTS adler32 @1 diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc14/zlibvc.sln b/src/zlib/zlib-1.3/contrib/vstudio/vc14/zlibvc.sln similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc14/zlibvc.sln rename to src/zlib/zlib-1.3/contrib/vstudio/vc14/zlibvc.sln diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc14/zlibvc.vcxproj b/src/zlib/zlib-1.3/contrib/vstudio/vc14/zlibvc.vcxproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc14/zlibvc.vcxproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc14/zlibvc.vcxproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc9/miniunz.vcproj b/src/zlib/zlib-1.3/contrib/vstudio/vc9/miniunz.vcproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc9/miniunz.vcproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc9/miniunz.vcproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc9/minizip.vcproj b/src/zlib/zlib-1.3/contrib/vstudio/vc9/minizip.vcproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc9/minizip.vcproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc9/minizip.vcproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc9/testzlib.vcproj b/src/zlib/zlib-1.3/contrib/vstudio/vc9/testzlib.vcproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc9/testzlib.vcproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc9/testzlib.vcproj diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc9/testzlibdll.vcproj b/src/zlib/zlib-1.3/contrib/vstudio/vc9/testzlibdll.vcproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc9/testzlibdll.vcproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc9/testzlibdll.vcproj diff --git a/src/zlib/zlib-1.3/contrib/vstudio/vc9/zlib.rc b/src/zlib/zlib-1.3/contrib/vstudio/vc9/zlib.rc new file mode 100644 index 000000000..29af8e11a --- /dev/null +++ b/src/zlib/zlib-1.3/contrib/vstudio/vc9/zlib.rc @@ -0,0 +1,32 @@ +#include + +#define IDR_VERSION1 1 +IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE + FILEVERSION 1, 3, 0, 0 + PRODUCTVERSION 1, 3, 0, 0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS_DOS_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + + BEGIN + VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" + VALUE "FileVersion", "1.3.0\0" + VALUE "InternalName", "zlib\0" + VALUE "OriginalFilename", "zlibwapi.dll\0" + VALUE "ProductName", "ZLib.DLL\0" + VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc9/zlibstat.vcproj b/src/zlib/zlib-1.3/contrib/vstudio/vc9/zlibstat.vcproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc9/zlibstat.vcproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc9/zlibstat.vcproj diff --git a/src/zlib/zlib-1.3/contrib/vstudio/vc9/zlibvc.def b/src/zlib/zlib-1.3/contrib/vstudio/vc9/zlibvc.def new file mode 100644 index 000000000..f28aa6c73 --- /dev/null +++ b/src/zlib/zlib-1.3/contrib/vstudio/vc9/zlibvc.def @@ -0,0 +1,158 @@ +LIBRARY +; zlib data compression and ZIP file I/O library + +VERSION 1.3 + +EXPORTS + adler32 @1 + compress @2 + crc32 @3 + deflate @4 + deflateCopy @5 + deflateEnd @6 + deflateInit2_ @7 + deflateInit_ @8 + deflateParams @9 + deflateReset @10 + deflateSetDictionary @11 + gzclose @12 + gzdopen @13 + gzerror @14 + gzflush @15 + gzopen @16 + gzread @17 + gzwrite @18 + inflate @19 + inflateEnd @20 + inflateInit2_ @21 + inflateInit_ @22 + inflateReset @23 + inflateSetDictionary @24 + inflateSync @25 + uncompress @26 + zlibVersion @27 + gzprintf @28 + gzputc @29 + gzgetc @30 + gzseek @31 + gzrewind @32 + gztell @33 + gzeof @34 + gzsetparams @35 + zError @36 + inflateSyncPoint @37 + get_crc_table @38 + compress2 @39 + gzputs @40 + gzgets @41 + inflateCopy @42 + inflateBackInit_ @43 + inflateBack @44 + inflateBackEnd @45 + compressBound @46 + deflateBound @47 + gzclearerr @48 + gzungetc @49 + zlibCompileFlags @50 + deflatePrime @51 + deflatePending @52 + + unzOpen @61 + unzClose @62 + unzGetGlobalInfo @63 + unzGetCurrentFileInfo @64 + unzGoToFirstFile @65 + unzGoToNextFile @66 + unzOpenCurrentFile @67 + unzReadCurrentFile @68 + unzOpenCurrentFile3 @69 + unztell @70 + unzeof @71 + unzCloseCurrentFile @72 + unzGetGlobalComment @73 + unzStringFileNameCompare @74 + unzLocateFile @75 + unzGetLocalExtrafield @76 + unzOpen2 @77 + unzOpenCurrentFile2 @78 + unzOpenCurrentFilePassword @79 + + zipOpen @80 + zipOpenNewFileInZip @81 + zipWriteInFileInZip @82 + zipCloseFileInZip @83 + zipClose @84 + zipOpenNewFileInZip2 @86 + zipCloseFileInZipRaw @87 + zipOpen2 @88 + zipOpenNewFileInZip3 @89 + + unzGetFilePos @100 + unzGoToFilePos @101 + + fill_win32_filefunc @110 + +; zlibwapi v1.2.4 added: + fill_win32_filefunc64 @111 + fill_win32_filefunc64A @112 + fill_win32_filefunc64W @113 + + unzOpen64 @120 + unzOpen2_64 @121 + unzGetGlobalInfo64 @122 + unzGetCurrentFileInfo64 @124 + unzGetCurrentFileZStreamPos64 @125 + unztell64 @126 + unzGetFilePos64 @127 + unzGoToFilePos64 @128 + + zipOpen64 @130 + zipOpen2_64 @131 + zipOpenNewFileInZip64 @132 + zipOpenNewFileInZip2_64 @133 + zipOpenNewFileInZip3_64 @134 + zipOpenNewFileInZip4_64 @135 + zipCloseFileInZipRaw64 @136 + +; zlib1 v1.2.4 added: + adler32_combine @140 + crc32_combine @142 + deflateSetHeader @144 + deflateTune @145 + gzbuffer @146 + gzclose_r @147 + gzclose_w @148 + gzdirect @149 + gzoffset @150 + inflateGetHeader @156 + inflateMark @157 + inflatePrime @158 + inflateReset2 @159 + inflateUndermine @160 + +; zlib1 v1.2.6 added: + gzgetc_ @161 + inflateResetKeep @163 + deflateResetKeep @164 + +; zlib1 v1.2.7 added: + gzopen_w @165 + +; zlib1 v1.2.8 added: + inflateGetDictionary @166 + gzvprintf @167 + +; zlib1 v1.2.9 added: + inflateCodesUsed @168 + inflateValidate @169 + uncompress2 @170 + gzfread @171 + gzfwrite @172 + deflateGetDictionary @173 + adler32_z @174 + crc32_z @175 + +; zlib1 v1.2.12 added: + crc32_combine_gen @176 + crc32_combine_gen64 @177 + crc32_combine_op @178 diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc9/zlibvc.sln b/src/zlib/zlib-1.3/contrib/vstudio/vc9/zlibvc.sln similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc9/zlibvc.sln rename to src/zlib/zlib-1.3/contrib/vstudio/vc9/zlibvc.sln diff --git a/src/zlib/zlib-1.2.13/contrib/vstudio/vc9/zlibvc.vcproj b/src/zlib/zlib-1.3/contrib/vstudio/vc9/zlibvc.vcproj similarity index 100% rename from src/zlib/zlib-1.2.13/contrib/vstudio/vc9/zlibvc.vcproj rename to src/zlib/zlib-1.3/contrib/vstudio/vc9/zlibvc.vcproj diff --git a/src/zlib/zlib-1.2.13/crc32.c b/src/zlib/zlib-1.3/crc32.c similarity index 91% rename from src/zlib/zlib-1.2.13/crc32.c rename to src/zlib/zlib-1.3/crc32.c index f8357b083..6c38f5c04 100644 --- a/src/zlib/zlib-1.2.13/crc32.c +++ b/src/zlib/zlib-1.3/crc32.c @@ -103,19 +103,6 @@ # define ARMCRC32 #endif -/* Local functions. */ -local z_crc_t multmodp OF((z_crc_t a, z_crc_t b)); -local z_crc_t x2nmodp OF((z_off64_t n, unsigned k)); - -#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) - local z_word_t byte_swap OF((z_word_t word)); -#endif - -#if defined(W) && !defined(ARMCRC32) - local z_crc_t crc_word OF((z_word_t data)); - local z_word_t crc_word_big OF((z_word_t data)); -#endif - #if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) /* Swap the bytes in a z_word_t to convert between little and big endian. Any @@ -123,9 +110,7 @@ local z_crc_t x2nmodp OF((z_off64_t n, unsigned k)); instruction, if one is available. This assumes that word_t is either 32 bits or 64 bits. */ -local z_word_t byte_swap(word) - z_word_t word; -{ +local z_word_t byte_swap(z_word_t word) { # if W == 8 return (word & 0xff00000000000000) >> 56 | @@ -146,24 +131,77 @@ local z_word_t byte_swap(word) } #endif +#ifdef DYNAMIC_CRC_TABLE +/* ========================================================================= + * Table of powers of x for combining CRC-32s, filled in by make_crc_table() + * below. + */ + local z_crc_t FAR x2n_table[32]; +#else +/* ========================================================================= + * Tables for byte-wise and braided CRC-32 calculations, and a table of powers + * of x for combining CRC-32s, all made by make_crc_table(). + */ +# include "crc32.h" +#endif + /* CRC polynomial. */ #define POLY 0xedb88320 /* p(x) reflected, with x^32 implied */ -#ifdef DYNAMIC_CRC_TABLE +/* + Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial, + reflected. For speed, this requires that a not be zero. + */ +local z_crc_t multmodp(z_crc_t a, z_crc_t b) { + z_crc_t m, p; + + m = (z_crc_t)1 << 31; + p = 0; + for (;;) { + if (a & m) { + p ^= b; + if ((a & (m - 1)) == 0) + break; + } + m >>= 1; + b = b & 1 ? (b >> 1) ^ POLY : b >> 1; + } + return p; +} +/* + Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been + initialized. + */ +local z_crc_t x2nmodp(z_off64_t n, unsigned k) { + z_crc_t p; + + p = (z_crc_t)1 << 31; /* x^0 == 1 */ + while (n) { + if (n & 1) + p = multmodp(x2n_table[k & 31], p); + n >>= 1; + k++; + } + return p; +} + +#ifdef DYNAMIC_CRC_TABLE +/* ========================================================================= + * Build the tables for byte-wise and braided CRC-32 calculations, and a table + * of powers of x for combining CRC-32s. + */ local z_crc_t FAR crc_table[256]; -local z_crc_t FAR x2n_table[32]; -local void make_crc_table OF((void)); #ifdef W local z_word_t FAR crc_big_table[256]; local z_crc_t FAR crc_braid_table[W][256]; local z_word_t FAR crc_braid_big_table[W][256]; - local void braid OF((z_crc_t [][256], z_word_t [][256], int, int)); + local void braid(z_crc_t [][256], z_word_t [][256], int, int); #endif #ifdef MAKECRCH - local void write_table OF((FILE *, const z_crc_t FAR *, int)); - local void write_table32hi OF((FILE *, const z_word_t FAR *, int)); - local void write_table64 OF((FILE *, const z_word_t FAR *, int)); + local void write_table(FILE *, const z_crc_t FAR *, int); + local void write_table32hi(FILE *, const z_word_t FAR *, int); + local void write_table64(FILE *, const z_word_t FAR *, int); #endif /* MAKECRCH */ /* @@ -176,7 +214,6 @@ local void make_crc_table OF((void)); /* Definition of once functionality. */ typedef struct once_s once_t; -local void once OF((once_t *, void (*)(void))); /* Check for the availability of atomics. */ #if defined(__STDC__) && __STDC_VERSION__ >= 201112L && \ @@ -196,10 +233,7 @@ struct once_s { invoke once() at the same time. The state must be a once_t initialized with ONCE_INIT. */ -local void once(state, init) - once_t *state; - void (*init)(void); -{ +local void once(once_t *state, void (*init)(void)) { if (!atomic_load(&state->done)) { if (atomic_flag_test_and_set(&state->begun)) while (!atomic_load(&state->done)) @@ -222,10 +256,7 @@ struct once_s { /* Test and set. Alas, not atomic, but tries to minimize the period of vulnerability. */ -local int test_and_set OF((int volatile *)); -local int test_and_set(flag) - int volatile *flag; -{ +local int test_and_set(int volatile *flag) { int was; was = *flag; @@ -234,10 +265,7 @@ local int test_and_set(flag) } /* Run the provided init() function once. This is not thread-safe. */ -local void once(state, init) - once_t *state; - void (*init)(void); -{ +local void once(once_t *state, void (*init)(void)) { if (!state->done) { if (test_and_set(&state->begun)) while (!state->done) @@ -279,8 +307,7 @@ local once_t made = ONCE_INIT; combinations of CRC register values and incoming bytes. */ -local void make_crc_table() -{ +local void make_crc_table(void) { unsigned i, j, n; z_crc_t p; @@ -447,11 +474,7 @@ local void make_crc_table() Write the 32-bit values in table[0..k-1] to out, five per line in hexadecimal separated by commas. */ -local void write_table(out, table, k) - FILE *out; - const z_crc_t FAR *table; - int k; -{ +local void write_table(FILE *out, const z_crc_t FAR *table, int k) { int n; for (n = 0; n < k; n++) @@ -464,11 +487,7 @@ local void write_table(out, table, k) Write the high 32-bits of each value in table[0..k-1] to out, five per line in hexadecimal separated by commas. */ -local void write_table32hi(out, table, k) -FILE *out; -const z_word_t FAR *table; -int k; -{ +local void write_table32hi(FILE *out, const z_word_t FAR *table, int k) { int n; for (n = 0; n < k; n++) @@ -484,11 +503,7 @@ int k; bits. If not, then the type cast and format string can be adjusted accordingly. */ -local void write_table64(out, table, k) - FILE *out; - const z_word_t FAR *table; - int k; -{ +local void write_table64(FILE *out, const z_word_t FAR *table, int k) { int n; for (n = 0; n < k; n++) @@ -498,8 +513,7 @@ local void write_table64(out, table, k) } /* Actually do the deed. */ -int main() -{ +int main(void) { make_crc_table(); return 0; } @@ -511,12 +525,7 @@ int main() Generate the little and big-endian braid tables for the given n and z_word_t size w. Each array must have room for w blocks of 256 elements. */ -local void braid(ltl, big, n, w) - z_crc_t ltl[][256]; - z_word_t big[][256]; - int n; - int w; -{ +local void braid(z_crc_t ltl[][256], z_word_t big[][256], int n, int w) { int k; z_crc_t i, p, q; for (k = 0; k < w; k++) { @@ -531,69 +540,13 @@ local void braid(ltl, big, n, w) } #endif -#else /* !DYNAMIC_CRC_TABLE */ -/* ======================================================================== - * Tables for byte-wise and braided CRC-32 calculations, and a table of powers - * of x for combining CRC-32s, all made by make_crc_table(). - */ -#include "crc32.h" #endif /* DYNAMIC_CRC_TABLE */ -/* ======================================================================== - * Routines used for CRC calculation. Some are also required for the table - * generation above. - */ - -/* - Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial, - reflected. For speed, this requires that a not be zero. - */ -local z_crc_t multmodp(a, b) - z_crc_t a; - z_crc_t b; -{ - z_crc_t m, p; - - m = (z_crc_t)1 << 31; - p = 0; - for (;;) { - if (a & m) { - p ^= b; - if ((a & (m - 1)) == 0) - break; - } - m >>= 1; - b = b & 1 ? (b >> 1) ^ POLY : b >> 1; - } - return p; -} - -/* - Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been - initialized. - */ -local z_crc_t x2nmodp(n, k) - z_off64_t n; - unsigned k; -{ - z_crc_t p; - - p = (z_crc_t)1 << 31; /* x^0 == 1 */ - while (n) { - if (n & 1) - p = multmodp(x2n_table[k & 31], p); - n >>= 1; - k++; - } - return p; -} - /* ========================================================================= * This function can be used by asm versions of crc32(), and to force the * generation of the CRC tables in a threaded application. */ -const z_crc_t FAR * ZEXPORT get_crc_table() -{ +const z_crc_t FAR * ZEXPORT get_crc_table(void) { #ifdef DYNAMIC_CRC_TABLE once(&made, make_crc_table); #endif /* DYNAMIC_CRC_TABLE */ @@ -619,11 +572,8 @@ const z_crc_t FAR * ZEXPORT get_crc_table() #define Z_BATCH_ZEROS 0xa10d3d0c /* computed from Z_BATCH = 3990 */ #define Z_BATCH_MIN 800 /* fewest words in a final batch */ -unsigned long ZEXPORT crc32_z(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - z_size_t len; -{ +unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf, + z_size_t len) { z_crc_t val; z_word_t crc1, crc2; const z_word_t *word; @@ -723,18 +673,14 @@ unsigned long ZEXPORT crc32_z(crc, buf, len) least-significant byte of the word as the first byte of data, without any pre or post conditioning. This is used to combine the CRCs of each braid. */ -local z_crc_t crc_word(data) - z_word_t data; -{ +local z_crc_t crc_word(z_word_t data) { int k; for (k = 0; k < W; k++) data = (data >> 8) ^ crc_table[data & 0xff]; return (z_crc_t)data; } -local z_word_t crc_word_big(data) - z_word_t data; -{ +local z_word_t crc_word_big(z_word_t data) { int k; for (k = 0; k < W; k++) data = (data << 8) ^ @@ -745,11 +691,8 @@ local z_word_t crc_word_big(data) #endif /* ========================================================================= */ -unsigned long ZEXPORT crc32_z(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - z_size_t len; -{ +unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf, + z_size_t len) { /* Return initial CRC, if requested. */ if (buf == Z_NULL) return 0; @@ -781,8 +724,8 @@ unsigned long ZEXPORT crc32_z(crc, buf, len) words = (z_word_t const *)buf; /* Do endian check at execution time instead of compile time, since ARM - processors can change the endianess at execution time. If the - compiler knows what the endianess will be, it can optimize out the + processors can change the endianness at execution time. If the + compiler knows what the endianness will be, it can optimize out the check and the unused branch. */ endian = 1; if (*(unsigned char *)&endian) { @@ -1069,20 +1012,13 @@ unsigned long ZEXPORT crc32_z(crc, buf, len) #endif /* ========================================================================= */ -unsigned long ZEXPORT crc32(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - uInt len; -{ +unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf, + uInt len) { return crc32_z(crc, buf, len); } /* ========================================================================= */ -uLong ZEXPORT crc32_combine64(crc1, crc2, len2) - uLong crc1; - uLong crc2; - z_off64_t len2; -{ +uLong ZEXPORT crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2) { #ifdef DYNAMIC_CRC_TABLE once(&made, make_crc_table); #endif /* DYNAMIC_CRC_TABLE */ @@ -1090,18 +1026,12 @@ uLong ZEXPORT crc32_combine64(crc1, crc2, len2) } /* ========================================================================= */ -uLong ZEXPORT crc32_combine(crc1, crc2, len2) - uLong crc1; - uLong crc2; - z_off_t len2; -{ +uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2) { return crc32_combine64(crc1, crc2, (z_off64_t)len2); } /* ========================================================================= */ -uLong ZEXPORT crc32_combine_gen64(len2) - z_off64_t len2; -{ +uLong ZEXPORT crc32_combine_gen64(z_off64_t len2) { #ifdef DYNAMIC_CRC_TABLE once(&made, make_crc_table); #endif /* DYNAMIC_CRC_TABLE */ @@ -1109,17 +1039,11 @@ uLong ZEXPORT crc32_combine_gen64(len2) } /* ========================================================================= */ -uLong ZEXPORT crc32_combine_gen(len2) - z_off_t len2; -{ +uLong ZEXPORT crc32_combine_gen(z_off_t len2) { return crc32_combine_gen64((z_off64_t)len2); } /* ========================================================================= */ -uLong ZEXPORT crc32_combine_op(crc1, crc2, op) - uLong crc1; - uLong crc2; - uLong op; -{ +uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op) { return multmodp(op, crc1) ^ (crc2 & 0xffffffff); } diff --git a/src/zlib/zlib-1.2.13/crc32.h b/src/zlib/zlib-1.3/crc32.h similarity index 100% rename from src/zlib/zlib-1.2.13/crc32.h rename to src/zlib/zlib-1.3/crc32.h diff --git a/src/zlib/zlib-1.2.13/deflate.c b/src/zlib/zlib-1.3/deflate.c similarity index 94% rename from src/zlib/zlib-1.2.13/deflate.c rename to src/zlib/zlib-1.3/deflate.c index 4a689db35..bd0117519 100644 --- a/src/zlib/zlib-1.2.13/deflate.c +++ b/src/zlib/zlib-1.3/deflate.c @@ -1,5 +1,5 @@ /* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler + * Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.13 Copyright 1995-2022 Jean-loup Gailly and Mark Adler "; + " deflate 1.3 Copyright 1995-2023 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -60,9 +60,6 @@ const char deflate_copyright[] = copyright string in the executable of your product. */ -/* =========================================================================== - * Function prototypes. - */ typedef enum { need_more, /* block not completed, need more input or more output */ block_done, /* block flush performed */ @@ -70,29 +67,16 @@ typedef enum { finish_done /* finish done, accept no more input or output */ } block_state; -typedef block_state (*compress_func) OF((deflate_state *s, int flush)); +typedef block_state (*compress_func)(deflate_state *s, int flush); /* Compression function. Returns the block state after the call. */ -local int deflateStateCheck OF((z_streamp strm)); -local void slide_hash OF((deflate_state *s)); -local void fill_window OF((deflate_state *s)); -local block_state deflate_stored OF((deflate_state *s, int flush)); -local block_state deflate_fast OF((deflate_state *s, int flush)); +local block_state deflate_stored(deflate_state *s, int flush); +local block_state deflate_fast(deflate_state *s, int flush); #ifndef FASTEST -local block_state deflate_slow OF((deflate_state *s, int flush)); -#endif -local block_state deflate_rle OF((deflate_state *s, int flush)); -local block_state deflate_huff OF((deflate_state *s, int flush)); -local void lm_init OF((deflate_state *s)); -local void putShortMSB OF((deflate_state *s, uInt b)); -local void flush_pending OF((z_streamp strm)); -local unsigned read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); -local uInt longest_match OF((deflate_state *s, IPos cur_match)); - -#ifdef ZLIB_DEBUG -local void check_match OF((deflate_state *s, IPos start, IPos match, - int length)); +local block_state deflate_slow(deflate_state *s, int flush); #endif +local block_state deflate_rle(deflate_state *s, int flush); +local block_state deflate_huff(deflate_state *s, int flush); /* =========================================================================== * Local data @@ -195,9 +179,12 @@ local const config configuration_table[10] = { * bit values at the expense of memory usage). We slide even when level == 0 to * keep the hash table consistent if we switch back to level > 0 later. */ -local void slide_hash(s) - deflate_state *s; -{ +#if defined(__has_feature) +# if __has_feature(memory_sanitizer) + __attribute__((no_sanitize("memory"))) +# endif +#endif +local void slide_hash(deflate_state *s) { unsigned n, m; Posf *p; uInt wsize = s->w_size; @@ -221,30 +208,177 @@ local void slide_hash(s) #endif } +/* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->next_in buffer and copying from it. + * (See also flush_pending()). + */ +local unsigned read_buf(z_streamp strm, Bytef *buf, unsigned size) { + unsigned len = strm->avail_in; + + if (len > size) len = size; + if (len == 0) return 0; + + strm->avail_in -= len; + + zmemcpy(buf, strm->next_in, len); + if (strm->state->wrap == 1) { + strm->adler = adler32(strm->adler, buf, len); + } +#ifdef GZIP + else if (strm->state->wrap == 2) { + strm->adler = crc32(strm->adler, buf, len); + } +#endif + strm->next_in += len; + strm->total_in += len; + + return len; +} + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ +local void fill_window(deflate_state *s) { + unsigned n; + unsigned more; /* Amount of free space at the end of the window. */ + uInt wsize = s->w_size; + + Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); + + do { + more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); + + /* Deal with !@#$% 64K limit: */ + if (sizeof(int) <= 2) { + if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + more = wsize; + + } else if (more == (unsigned)(-1)) { + /* Very unlikely, but possible on 16 bit machine if + * strstart == 0 && lookahead == 1 (input done a byte at time) + */ + more--; + } + } + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + if (s->strstart >= wsize + MAX_DIST(s)) { + + zmemcpy(s->window, s->window + wsize, (unsigned)wsize - more); + s->match_start -= wsize; + s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ + s->block_start -= (long) wsize; + if (s->insert > s->strstart) + s->insert = s->strstart; + slide_hash(s); + more += wsize; + } + if (s->strm->avail_in == 0) break; + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + Assert(more >= 2, "more < 2"); + + n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); + s->lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s->lookahead + s->insert >= MIN_MATCH) { + uInt str = s->strstart - s->insert; + s->ins_h = s->window[str]; + UPDATE_HASH(s, s->ins_h, s->window[str + 1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + while (s->insert) { + UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); +#ifndef FASTEST + s->prev[str & s->w_mask] = s->head[s->ins_h]; +#endif + s->head[s->ins_h] = (Pos)str; + str++; + s->insert--; + if (s->lookahead + s->insert < MIN_MATCH) + break; + } + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + + } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); + + /* If the WIN_INIT bytes after the end of the current data have never been + * written, then zero those bytes in order to avoid memory check reports of + * the use of uninitialized (or uninitialised as Julian writes) bytes by + * the longest match routines. Update the high water mark for the next + * time through here. WIN_INIT is set to MAX_MATCH since the longest match + * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. + */ + if (s->high_water < s->window_size) { + ulg curr = s->strstart + (ulg)(s->lookahead); + ulg init; + + if (s->high_water < curr) { + /* Previous high water mark below current data -- zero WIN_INIT + * bytes or up to end of window, whichever is less. + */ + init = s->window_size - curr; + if (init > WIN_INIT) + init = WIN_INIT; + zmemzero(s->window + curr, (unsigned)init); + s->high_water = curr + init; + } + else if (s->high_water < (ulg)curr + WIN_INIT) { + /* High water mark at or above current data, but below current data + * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up + * to end of window, whichever is less. + */ + init = (ulg)curr + WIN_INIT - s->high_water; + if (init > s->window_size - s->high_water) + init = s->window_size - s->high_water; + zmemzero(s->window + s->high_water, (unsigned)init); + s->high_water += init; + } + } + + Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, + "not enough room for search"); +} + /* ========================================================================= */ -int ZEXPORT deflateInit_(strm, level, version, stream_size) - z_streamp strm; - int level; - const char *version; - int stream_size; -{ +int ZEXPORT deflateInit_(z_streamp strm, int level, const char *version, + int stream_size) { return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, version, stream_size); /* To do: ignore strm->next_in if we use it as window */ } /* ========================================================================= */ -int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, - version, stream_size) - z_streamp strm; - int level; - int method; - int windowBits; - int memLevel; - int strategy; - const char *version; - int stream_size; -{ +int ZEXPORT deflateInit2_(z_streamp strm, int level, int method, + int windowBits, int memLevel, int strategy, + const char *version, int stream_size) { deflate_state *s; int wrap = 1; static const char my_version[] = ZLIB_VERSION; @@ -386,9 +520,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, /* ========================================================================= * Check for a valid deflate stream state. Return 0 if ok, 1 if not. */ -local int deflateStateCheck(strm) - z_streamp strm; -{ +local int deflateStateCheck(z_streamp strm) { deflate_state *s; if (strm == Z_NULL || strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) @@ -409,11 +541,8 @@ local int deflateStateCheck(strm) } /* ========================================================================= */ -int ZEXPORT deflateSetDictionary(strm, dictionary, dictLength) - z_streamp strm; - const Bytef *dictionary; - uInt dictLength; -{ +int ZEXPORT deflateSetDictionary(z_streamp strm, const Bytef *dictionary, + uInt dictLength) { deflate_state *s; uInt str, n; int wrap; @@ -478,11 +607,8 @@ int ZEXPORT deflateSetDictionary(strm, dictionary, dictLength) } /* ========================================================================= */ -int ZEXPORT deflateGetDictionary(strm, dictionary, dictLength) - z_streamp strm; - Bytef *dictionary; - uInt *dictLength; -{ +int ZEXPORT deflateGetDictionary(z_streamp strm, Bytef *dictionary, + uInt *dictLength) { deflate_state *s; uInt len; @@ -500,9 +626,7 @@ int ZEXPORT deflateGetDictionary(strm, dictionary, dictLength) } /* ========================================================================= */ -int ZEXPORT deflateResetKeep(strm) - z_streamp strm; -{ +int ZEXPORT deflateResetKeep(z_streamp strm) { deflate_state *s; if (deflateStateCheck(strm)) { @@ -537,10 +661,32 @@ int ZEXPORT deflateResetKeep(strm) return Z_OK; } +/* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ +local void lm_init(deflate_state *s) { + s->window_size = (ulg)2L*s->w_size; + + CLEAR_HASH(s); + + /* Set the default configuration parameters: + */ + s->max_lazy_match = configuration_table[s->level].max_lazy; + s->good_match = configuration_table[s->level].good_length; + s->nice_match = configuration_table[s->level].nice_length; + s->max_chain_length = configuration_table[s->level].max_chain; + + s->strstart = 0; + s->block_start = 0L; + s->lookahead = 0; + s->insert = 0; + s->match_length = s->prev_length = MIN_MATCH-1; + s->match_available = 0; + s->ins_h = 0; +} + /* ========================================================================= */ -int ZEXPORT deflateReset(strm) - z_streamp strm; -{ +int ZEXPORT deflateReset(z_streamp strm) { int ret; ret = deflateResetKeep(strm); @@ -550,10 +696,7 @@ int ZEXPORT deflateReset(strm) } /* ========================================================================= */ -int ZEXPORT deflateSetHeader(strm, head) - z_streamp strm; - gz_headerp head; -{ +int ZEXPORT deflateSetHeader(z_streamp strm, gz_headerp head) { if (deflateStateCheck(strm) || strm->state->wrap != 2) return Z_STREAM_ERROR; strm->state->gzhead = head; @@ -561,11 +704,7 @@ int ZEXPORT deflateSetHeader(strm, head) } /* ========================================================================= */ -int ZEXPORT deflatePending(strm, pending, bits) - unsigned *pending; - int *bits; - z_streamp strm; -{ +int ZEXPORT deflatePending(z_streamp strm, unsigned *pending, int *bits) { if (deflateStateCheck(strm)) return Z_STREAM_ERROR; if (pending != Z_NULL) *pending = strm->state->pending; @@ -575,11 +714,7 @@ int ZEXPORT deflatePending(strm, pending, bits) } /* ========================================================================= */ -int ZEXPORT deflatePrime(strm, bits, value) - z_streamp strm; - int bits; - int value; -{ +int ZEXPORT deflatePrime(z_streamp strm, int bits, int value) { deflate_state *s; int put; @@ -602,11 +737,7 @@ int ZEXPORT deflatePrime(strm, bits, value) } /* ========================================================================= */ -int ZEXPORT deflateParams(strm, level, strategy) - z_streamp strm; - int level; - int strategy; -{ +int ZEXPORT deflateParams(z_streamp strm, int level, int strategy) { deflate_state *s; compress_func func; @@ -651,13 +782,8 @@ int ZEXPORT deflateParams(strm, level, strategy) } /* ========================================================================= */ -int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain) - z_streamp strm; - int good_length; - int max_lazy; - int nice_length; - int max_chain; -{ +int ZEXPORT deflateTune(z_streamp strm, int good_length, int max_lazy, + int nice_length, int max_chain) { deflate_state *s; if (deflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -693,10 +819,7 @@ int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain) * * Shifts are used to approximate divisions, for speed. */ -uLong ZEXPORT deflateBound(strm, sourceLen) - z_streamp strm; - uLong sourceLen; -{ +uLong ZEXPORT deflateBound(z_streamp strm, uLong sourceLen) { deflate_state *s; uLong fixedlen, storelen, wraplen; @@ -752,7 +875,8 @@ uLong ZEXPORT deflateBound(strm, sourceLen) /* if not default parameters, return one of the conservative bounds */ if (s->w_bits != 15 || s->hash_bits != 8 + 7) - return (s->w_bits <= s->hash_bits ? fixedlen : storelen) + wraplen; + return (s->w_bits <= s->hash_bits && s->level ? fixedlen : storelen) + + wraplen; /* default settings: return tight bound for that case -- ~0.03% overhead plus a small constant */ @@ -765,10 +889,7 @@ uLong ZEXPORT deflateBound(strm, sourceLen) * IN assertion: the stream state is correct and there is enough room in * pending_buf. */ -local void putShortMSB(s, b) - deflate_state *s; - uInt b; -{ +local void putShortMSB(deflate_state *s, uInt b) { put_byte(s, (Byte)(b >> 8)); put_byte(s, (Byte)(b & 0xff)); } @@ -779,9 +900,7 @@ local void putShortMSB(s, b) * applications may wish to modify it to avoid allocating a large * strm->next_out buffer and copying into it. (See also read_buf()). */ -local void flush_pending(strm) - z_streamp strm; -{ +local void flush_pending(z_streamp strm) { unsigned len; deflate_state *s = strm->state; @@ -812,10 +931,7 @@ local void flush_pending(strm) } while (0) /* ========================================================================= */ -int ZEXPORT deflate(strm, flush) - z_streamp strm; - int flush; -{ +int ZEXPORT deflate(z_streamp strm, int flush) { int old_flush; /* value of flush param for previous deflate call */ deflate_state *s; @@ -1127,9 +1243,7 @@ int ZEXPORT deflate(strm, flush) } /* ========================================================================= */ -int ZEXPORT deflateEnd(strm) - z_streamp strm; -{ +int ZEXPORT deflateEnd(z_streamp strm) { int status; if (deflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -1153,11 +1267,10 @@ int ZEXPORT deflateEnd(strm) * To simplify the source, this is not supported for 16-bit MSDOS (which * doesn't have enough memory anyway to duplicate compression states). */ -int ZEXPORT deflateCopy(dest, source) - z_streamp dest; - z_streamp source; -{ +int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) { #ifdef MAXSEG_64K + (void)dest; + (void)source; return Z_STREAM_ERROR; #else deflate_state *ds; @@ -1205,66 +1318,6 @@ int ZEXPORT deflateCopy(dest, source) #endif /* MAXSEG_64K */ } -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->next_in buffer and copying from it. - * (See also flush_pending()). - */ -local unsigned read_buf(strm, buf, size) - z_streamp strm; - Bytef *buf; - unsigned size; -{ - unsigned len = strm->avail_in; - - if (len > size) len = size; - if (len == 0) return 0; - - strm->avail_in -= len; - - zmemcpy(buf, strm->next_in, len); - if (strm->state->wrap == 1) { - strm->adler = adler32(strm->adler, buf, len); - } -#ifdef GZIP - else if (strm->state->wrap == 2) { - strm->adler = crc32(strm->adler, buf, len); - } -#endif - strm->next_in += len; - strm->total_in += len; - - return len; -} - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -local void lm_init(s) - deflate_state *s; -{ - s->window_size = (ulg)2L*s->w_size; - - CLEAR_HASH(s); - - /* Set the default configuration parameters: - */ - s->max_lazy_match = configuration_table[s->level].max_lazy; - s->good_match = configuration_table[s->level].good_length; - s->nice_match = configuration_table[s->level].nice_length; - s->max_chain_length = configuration_table[s->level].max_chain; - - s->strstart = 0; - s->block_start = 0L; - s->lookahead = 0; - s->insert = 0; - s->match_length = s->prev_length = MIN_MATCH-1; - s->match_available = 0; - s->ins_h = 0; -} - #ifndef FASTEST /* =========================================================================== * Set match_start to the longest match starting at the given string and @@ -1275,10 +1328,7 @@ local void lm_init(s) * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 * OUT assertion: the match length is not greater than s->lookahead. */ -local uInt longest_match(s, cur_match) - deflate_state *s; - IPos cur_match; /* current match */ -{ +local uInt longest_match(deflate_state *s, IPos cur_match) { unsigned chain_length = s->max_chain_length;/* max hash chain length */ register Bytef *scan = s->window + s->strstart; /* current string */ register Bytef *match; /* matched string */ @@ -1426,10 +1476,7 @@ local uInt longest_match(s, cur_match) /* --------------------------------------------------------------------------- * Optimized version for FASTEST only */ -local uInt longest_match(s, cur_match) - deflate_state *s; - IPos cur_match; /* current match */ -{ +local uInt longest_match(deflate_state *s, IPos cur_match) { register Bytef *scan = s->window + s->strstart; /* current string */ register Bytef *match; /* matched string */ register int len; /* length of current match */ @@ -1490,11 +1537,7 @@ local uInt longest_match(s, cur_match) /* =========================================================================== * Check that the match at match_start is indeed a match. */ -local void check_match(s, start, match, length) - deflate_state *s; - IPos start, match; - int length; -{ +local void check_match(deflate_state *s, IPos start, IPos match, int length) { /* check that the match is indeed a match */ if (zmemcmp(s->window + match, s->window + start, length) != EQUAL) { @@ -1514,137 +1557,6 @@ local void check_match(s, start, match, length) # define check_match(s, start, match, length) #endif /* ZLIB_DEBUG */ -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -local void fill_window(s) - deflate_state *s; -{ - unsigned n; - unsigned more; /* Amount of free space at the end of the window. */ - uInt wsize = s->w_size; - - Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); - - /* Deal with !@#$% 64K limit: */ - if (sizeof(int) <= 2) { - if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - more = wsize; - - } else if (more == (unsigned)(-1)) { - /* Very unlikely, but possible on 16 bit machine if - * strstart == 0 && lookahead == 1 (input done a byte at time) - */ - more--; - } - } - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s->strstart >= wsize + MAX_DIST(s)) { - - zmemcpy(s->window, s->window + wsize, (unsigned)wsize - more); - s->match_start -= wsize; - s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ - s->block_start -= (long) wsize; - if (s->insert > s->strstart) - s->insert = s->strstart; - slide_hash(s); - more += wsize; - } - if (s->strm->avail_in == 0) break; - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - Assert(more >= 2, "more < 2"); - - n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); - s->lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s->lookahead + s->insert >= MIN_MATCH) { - uInt str = s->strstart - s->insert; - s->ins_h = s->window[str]; - UPDATE_HASH(s, s->ins_h, s->window[str + 1]); -#if MIN_MATCH != 3 - Call UPDATE_HASH() MIN_MATCH-3 more times -#endif - while (s->insert) { - UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); -#ifndef FASTEST - s->prev[str & s->w_mask] = s->head[s->ins_h]; -#endif - s->head[s->ins_h] = (Pos)str; - str++; - s->insert--; - if (s->lookahead + s->insert < MIN_MATCH) - break; - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ - if (s->high_water < s->window_size) { - ulg curr = s->strstart + (ulg)(s->lookahead); - ulg init; - - if (s->high_water < curr) { - /* Previous high water mark below current data -- zero WIN_INIT - * bytes or up to end of window, whichever is less. - */ - init = s->window_size - curr; - if (init > WIN_INIT) - init = WIN_INIT; - zmemzero(s->window + curr, (unsigned)init); - s->high_water = curr + init; - } - else if (s->high_water < (ulg)curr + WIN_INIT) { - /* High water mark at or above current data, but below current data - * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up - * to end of window, whichever is less. - */ - init = (ulg)curr + WIN_INIT - s->high_water; - if (init > s->window_size - s->high_water) - init = s->window_size - s->high_water; - zmemzero(s->window + s->high_water, (unsigned)init); - s->high_water += init; - } - } - - Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, - "not enough room for search"); -} - /* =========================================================================== * Flush the current block, with given end-of-file flag. * IN assertion: strstart is set to the end of the current match. @@ -1687,10 +1599,7 @@ local void fill_window(s) * copied. It is most efficient with large input and output buffers, which * maximizes the opportunities to have a single copy from next_in to next_out. */ -local block_state deflate_stored(s, flush) - deflate_state *s; - int flush; -{ +local block_state deflate_stored(deflate_state *s, int flush) { /* Smallest worthy block size when not flushing or finishing. By default * this is 32K. This can be as small as 507 bytes for memLevel == 1. For * large input and output buffers, the stored block size will be larger. @@ -1874,10 +1783,7 @@ local block_state deflate_stored(s, flush) * new strings in the dictionary only for unmatched strings or for short * matches. It is used only for the fast compression options. */ -local block_state deflate_fast(s, flush) - deflate_state *s; - int flush; -{ +local block_state deflate_fast(deflate_state *s, int flush) { IPos hash_head; /* head of the hash chain */ int bflush; /* set if current block must be flushed */ @@ -1976,10 +1882,7 @@ local block_state deflate_fast(s, flush) * evaluation for matches: a match is finally adopted only if there is * no better match at the next window position. */ -local block_state deflate_slow(s, flush) - deflate_state *s; - int flush; -{ +local block_state deflate_slow(deflate_state *s, int flush) { IPos hash_head; /* head of hash chain */ int bflush; /* set if current block must be flushed */ @@ -2107,10 +2010,7 @@ local block_state deflate_slow(s, flush) * one. Do not maintain a hash table. (It will be regenerated if this run of * deflate switches away from Z_RLE.) */ -local block_state deflate_rle(s, flush) - deflate_state *s; - int flush; -{ +local block_state deflate_rle(deflate_state *s, int flush) { int bflush; /* set if current block must be flushed */ uInt prev; /* byte at distance one to match */ Bytef *scan, *strend; /* scan goes up to strend for length of run */ @@ -2181,10 +2081,7 @@ local block_state deflate_rle(s, flush) * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. * (It will be regenerated if this run of deflate switches away from Huffman.) */ -local block_state deflate_huff(s, flush) - deflate_state *s; - int flush; -{ +local block_state deflate_huff(deflate_state *s, int flush) { int bflush; /* set if current block must be flushed */ for (;;) { diff --git a/src/zlib/zlib-1.2.13/deflate.h b/src/zlib/zlib-1.3/deflate.h similarity index 96% rename from src/zlib/zlib-1.2.13/deflate.h rename to src/zlib/zlib-1.3/deflate.h index 1a06cd5f2..869679142 100644 --- a/src/zlib/zlib-1.2.13/deflate.h +++ b/src/zlib/zlib-1.3/deflate.h @@ -291,14 +291,14 @@ typedef struct internal_state { memory checker errors from longest match routines */ /* in trees.c */ -void ZLIB_INTERNAL _tr_init OF((deflate_state *s)); -int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); -void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf, - ulg stored_len, int last)); -void ZLIB_INTERNAL _tr_flush_bits OF((deflate_state *s)); -void ZLIB_INTERNAL _tr_align OF((deflate_state *s)); -void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, - ulg stored_len, int last)); +void ZLIB_INTERNAL _tr_init(deflate_state *s); +int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc); +void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, + ulg stored_len, int last); +void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s); +void ZLIB_INTERNAL _tr_align(deflate_state *s); +void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf, + ulg stored_len, int last); #define d_code(dist) \ ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) diff --git a/src/zlib/zlib-1.2.13/doc/algorithm.txt b/src/zlib/zlib-1.3/doc/algorithm.txt similarity index 100% rename from src/zlib/zlib-1.2.13/doc/algorithm.txt rename to src/zlib/zlib-1.3/doc/algorithm.txt diff --git a/src/zlib/zlib-1.2.13/doc/crc-doc.1.0.pdf b/src/zlib/zlib-1.3/doc/crc-doc.1.0.pdf similarity index 100% rename from src/zlib/zlib-1.2.13/doc/crc-doc.1.0.pdf rename to src/zlib/zlib-1.3/doc/crc-doc.1.0.pdf diff --git a/src/zlib/zlib-1.2.13/doc/rfc1950.txt b/src/zlib/zlib-1.3/doc/rfc1950.txt similarity index 100% rename from src/zlib/zlib-1.2.13/doc/rfc1950.txt rename to src/zlib/zlib-1.3/doc/rfc1950.txt diff --git a/src/zlib/zlib-1.2.13/doc/rfc1951.txt b/src/zlib/zlib-1.3/doc/rfc1951.txt similarity index 100% rename from src/zlib/zlib-1.2.13/doc/rfc1951.txt rename to src/zlib/zlib-1.3/doc/rfc1951.txt diff --git a/src/zlib/zlib-1.2.13/doc/rfc1952.txt b/src/zlib/zlib-1.3/doc/rfc1952.txt similarity index 100% rename from src/zlib/zlib-1.2.13/doc/rfc1952.txt rename to src/zlib/zlib-1.3/doc/rfc1952.txt diff --git a/src/zlib/zlib-1.2.13/doc/txtvsbin.txt b/src/zlib/zlib-1.3/doc/txtvsbin.txt similarity index 100% rename from src/zlib/zlib-1.2.13/doc/txtvsbin.txt rename to src/zlib/zlib-1.3/doc/txtvsbin.txt diff --git a/src/zlib/zlib-1.2.13/examples/README.examples b/src/zlib/zlib-1.3/examples/README.examples similarity index 100% rename from src/zlib/zlib-1.2.13/examples/README.examples rename to src/zlib/zlib-1.3/examples/README.examples diff --git a/src/zlib/zlib-1.2.13/examples/enough.c b/src/zlib/zlib-1.3/examples/enough.c similarity index 100% rename from src/zlib/zlib-1.2.13/examples/enough.c rename to src/zlib/zlib-1.3/examples/enough.c diff --git a/src/zlib/zlib-1.2.13/examples/fitblk.c b/src/zlib/zlib-1.3/examples/fitblk.c similarity index 99% rename from src/zlib/zlib-1.2.13/examples/fitblk.c rename to src/zlib/zlib-1.3/examples/fitblk.c index 68f56809d..723dc0028 100644 --- a/src/zlib/zlib-1.2.13/examples/fitblk.c +++ b/src/zlib/zlib-1.3/examples/fitblk.c @@ -198,7 +198,7 @@ int main(int argc, char **argv) if (ret == Z_MEM_ERROR) quit("out of memory"); - /* set up for next reocmpression */ + /* set up for next recompression */ ret = inflateReset(&inf); assert(ret != Z_STREAM_ERROR); ret = deflateReset(&def); diff --git a/src/zlib/zlib-1.2.13/examples/gun.c b/src/zlib/zlib-1.3/examples/gun.c similarity index 100% rename from src/zlib/zlib-1.2.13/examples/gun.c rename to src/zlib/zlib-1.3/examples/gun.c diff --git a/src/zlib/zlib-1.2.13/examples/gzappend.c b/src/zlib/zlib-1.3/examples/gzappend.c similarity index 100% rename from src/zlib/zlib-1.2.13/examples/gzappend.c rename to src/zlib/zlib-1.3/examples/gzappend.c diff --git a/src/zlib/zlib-1.2.13/examples/gzjoin.c b/src/zlib/zlib-1.3/examples/gzjoin.c similarity index 100% rename from src/zlib/zlib-1.2.13/examples/gzjoin.c rename to src/zlib/zlib-1.3/examples/gzjoin.c diff --git a/src/zlib/zlib-1.2.13/examples/gzlog.c b/src/zlib/zlib-1.3/examples/gzlog.c similarity index 100% rename from src/zlib/zlib-1.2.13/examples/gzlog.c rename to src/zlib/zlib-1.3/examples/gzlog.c diff --git a/src/zlib/zlib-1.2.13/examples/gzlog.h b/src/zlib/zlib-1.3/examples/gzlog.h similarity index 100% rename from src/zlib/zlib-1.2.13/examples/gzlog.h rename to src/zlib/zlib-1.3/examples/gzlog.h diff --git a/src/zlib/zlib-1.2.13/examples/gznorm.c b/src/zlib/zlib-1.3/examples/gznorm.c similarity index 100% rename from src/zlib/zlib-1.2.13/examples/gznorm.c rename to src/zlib/zlib-1.3/examples/gznorm.c diff --git a/src/zlib/zlib-1.2.13/examples/zlib_how.html b/src/zlib/zlib-1.3/examples/zlib_how.html similarity index 96% rename from src/zlib/zlib-1.2.13/examples/zlib_how.html rename to src/zlib/zlib-1.3/examples/zlib_how.html index 444ff1c9a..43271b988 100644 --- a/src/zlib/zlib-1.2.13/examples/zlib_how.html +++ b/src/zlib/zlib-1.3/examples/zlib_how.html @@ -1,10 +1,10 @@ - + zlib Usage Example - +

    zlib Usage Example

    @@ -17,7 +17,7 @@

    zlib Usage Example

    annotations are interspersed between lines of the code. So please read between the lines. We hope this helps explain some of the intricacies of zlib.

    -Without further adieu, here is the program zpipe.c: +Without further ado, here is the program zpipe.c:

    
     /* zpipe.c: example of proper use of zlib's inflate() and deflate()
        Not copyrighted -- provided to the public domain
    @@ -155,13 +155,11 @@ 

    zlib Usage Example

    We start off by reading data from the input file. The number of bytes read is put directly into avail_in, and a pointer to those bytes is put into next_in. We also -check to see if end-of-file on the input has been reached. If we are at the end of file, then flush is set to the +check to see if end-of-file on the input has been reached using feof(). +If we are at the end of file, then flush is set to the zlib constant Z_FINISH, which is later passed to deflate() to -indicate that this is the last chunk of input data to compress. We need to use feof() -to check for end-of-file as opposed to seeing if fewer than CHUNK bytes have been read. The -reason is that if the input file length is an exact multiple of CHUNK, we will miss -the fact that we got to the end-of-file, and not know to tell deflate() to finish -up the compressed stream. If we are not yet at the end of the input, then the zlib +indicate that this is the last chunk of input data to compress. +If we are not yet at the end of the input, then the zlib constant Z_NO_FLUSH will be passed to deflate to indicate that we are still in the middle of the uncompressed data.

    @@ -540,6 +538,12 @@

    zlib Usage Example

    }

    -Copyright (c) 2004, 2005 by Mark Adler
    Last modified 11 December 2005
    +Last modified 24 January 2023
    +Copyright © 2004-2023 Mark Adler

    + +Creative Commons License + +Creative Commons Attribution-NoDerivatives 4.0 International License. diff --git a/src/zlib/zlib-1.2.13/examples/zpipe.c b/src/zlib/zlib-1.3/examples/zpipe.c similarity index 100% rename from src/zlib/zlib-1.2.13/examples/zpipe.c rename to src/zlib/zlib-1.3/examples/zpipe.c diff --git a/src/zlib/zlib-1.3/examples/zran.c b/src/zlib/zlib-1.3/examples/zran.c new file mode 100644 index 000000000..32c93686c --- /dev/null +++ b/src/zlib/zlib-1.3/examples/zran.c @@ -0,0 +1,533 @@ +/* zran.c -- example of deflate stream indexing and random access + * Copyright (C) 2005, 2012, 2018, 2023 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * Version 1.4 13 Apr 2023 Mark Adler */ + +/* Version History: + 1.0 29 May 2005 First version + 1.1 29 Sep 2012 Fix memory reallocation error + 1.2 14 Oct 2018 Handle gzip streams with multiple members + Add a header file to facilitate usage in applications + 1.3 18 Feb 2023 Permit raw deflate streams as well as zlib and gzip + Permit crossing gzip member boundaries when extracting + Support a size_t size when extracting (was an int) + Do a binary search over the index for an access point + Expose the access point type to enable save and load + 1.4 13 Apr 2023 Add a NOPRIME define to not use inflatePrime() + */ + +// Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary() +// for random access of a compressed file. A file containing a raw deflate +// stream is provided on the command line. The compressed stream is decoded in +// its entirety, and an index built with access points about every SPAN bytes +// in the uncompressed output. The compressed file is left open, and can then +// be read randomly, having to decompress on the average SPAN/2 uncompressed +// bytes before getting to the desired block of data. +// +// An access point can be created at the start of any deflate block, by saving +// the starting file offset and bit of that block, and the 32K bytes of +// uncompressed data that precede that block. Also the uncompressed offset of +// that block is saved to provide a reference for locating a desired starting +// point in the uncompressed stream. deflate_index_build() decompresses the +// input raw deflate stream a block at a time, and at the end of each block +// decides if enough uncompressed data has gone by to justify the creation of a +// new access point. If so, that point is saved in a data structure that grows +// as needed to accommodate the points. +// +// To use the index, an offset in the uncompressed data is provided, for which +// the latest access point at or preceding that offset is located in the index. +// The input file is positioned to the specified location in the index, and if +// necessary the first few bits of the compressed data is read from the file. +// inflate is initialized with those bits and the 32K of uncompressed data, and +// decompression then proceeds until the desired offset in the file is reached. +// Then decompression continues to read the requested uncompressed data from +// the file. +// +// There is some fair bit of overhead to starting inflation for the random +// access, mainly copying the 32K byte dictionary. If small pieces of the file +// are being accessed, it would make sense to implement a cache to hold some +// lookahead to avoid many calls to deflate_index_extract() for small lengths. +// +// Another way to build an index would be to use inflateCopy(). That would not +// be constrained to have access points at block boundaries, but would require +// more memory per access point, and could not be saved to a file due to the +// use of pointers in the state. The approach here allows for storage of the +// index in a file. + +#include +#include +#include +#include +#include "zlib.h" +#include "zran.h" + +#define WINSIZE 32768U // sliding window size +#define CHUNK 16384 // file input buffer size + +// See comments in zran.h. +void deflate_index_free(struct deflate_index *index) { + if (index != NULL) { + free(index->list); + free(index); + } +} + +// Add an access point to the list. If out of memory, deallocate the existing +// list and return NULL. index->mode is temporarily the allocated number of +// access points, until it is time for deflate_index_build() to return. Then +// index->mode is set to the mode of inflation. +static struct deflate_index *add_point(struct deflate_index *index, int bits, + off_t in, off_t out, unsigned left, + unsigned char *window) { + if (index == NULL) { + // The list is empty. Create it, starting with eight access points. + index = malloc(sizeof(struct deflate_index)); + if (index == NULL) + return NULL; + index->have = 0; + index->mode = 8; + index->list = malloc(sizeof(point_t) * index->mode); + if (index->list == NULL) { + free(index); + return NULL; + } + } + + else if (index->have == index->mode) { + // The list is full. Make it bigger. + index->mode <<= 1; + point_t *next = realloc(index->list, sizeof(point_t) * index->mode); + if (next == NULL) { + deflate_index_free(index); + return NULL; + } + index->list = next; + } + + // Fill in the access point and increment how many we have. + point_t *next = (point_t *)(index->list) + index->have++; + if (index->have < 0) { + // Overflowed the int! + deflate_index_free(index); + return NULL; + } + next->out = out; + next->in = in; + next->bits = bits; + if (left) + memcpy(next->window, window + WINSIZE - left, left); + if (left < WINSIZE) + memcpy(next->window + left, window, WINSIZE - left); + + // Return the index, which may have been newly allocated or destroyed. + return index; +} + +// Decompression modes. These are the inflateInit2() windowBits parameter. +#define RAW -15 +#define ZLIB 15 +#define GZIP 31 + +// See comments in zran.h. +int deflate_index_build(FILE *in, off_t span, struct deflate_index **built) { + // Set up inflation state. + z_stream strm = {0}; // inflate engine (gets fired up later) + unsigned char buf[CHUNK]; // input buffer + unsigned char win[WINSIZE] = {0}; // output sliding window + off_t totin = 0; // total bytes read from input + off_t totout = 0; // total bytes uncompressed + int mode = 0; // mode: RAW, ZLIB, or GZIP (0 => not set yet) + + // Decompress from in, generating access points along the way. + int ret; // the return value from zlib, or Z_ERRNO + off_t last; // last access point uncompressed offset + struct deflate_index *index = NULL; // list of access points + do { + // Assure available input, at least until reaching EOF. + if (strm.avail_in == 0) { + strm.avail_in = fread(buf, 1, sizeof(buf), in); + totin += strm.avail_in; + strm.next_in = buf; + if (strm.avail_in < sizeof(buf) && ferror(in)) { + ret = Z_ERRNO; + break; + } + + if (mode == 0) { + // At the start of the input -- determine the type. Assume raw + // if it is neither zlib nor gzip. This could in theory result + // in a false positive for zlib, but in practice the fill bits + // after a stored block are always zeros, so a raw stream won't + // start with an 8 in the low nybble. + mode = strm.avail_in == 0 ? RAW : // empty -- will fail + (strm.next_in[0] & 0xf) == 8 ? ZLIB : + strm.next_in[0] == 0x1f ? GZIP : + /* else */ RAW; + ret = inflateInit2(&strm, mode); + if (ret != Z_OK) + break; + } + } + + // Assure available output. This rotates the output through, for use as + // a sliding window on the uncompressed data. + if (strm.avail_out == 0) { + strm.avail_out = sizeof(win); + strm.next_out = win; + } + + if (mode == RAW && index == NULL) + // We skip the inflate() call at the start of raw deflate data in + // order generate an access point there. Set data_type to imitate + // the end of a header. + strm.data_type = 0x80; + else { + // Inflate and update the number of uncompressed bytes. + unsigned before = strm.avail_out; + ret = inflate(&strm, Z_BLOCK); + totout += before - strm.avail_out; + } + + if ((strm.data_type & 0xc0) == 0x80 && + (index == NULL || totout - last >= span)) { + // We are at the end of a header or a non-last deflate block, so we + // can add an access point here. Furthermore, we are either at the + // very start for the first access point, or there has been span or + // more uncompressed bytes since the last access point, so we want + // to add an access point here. + index = add_point(index, strm.data_type & 7, totin - strm.avail_in, + totout, strm.avail_out, win); + if (index == NULL) { + ret = Z_MEM_ERROR; + break; + } + last = totout; + } + + if (ret == Z_STREAM_END && mode == GZIP && + (strm.avail_in || ungetc(getc(in), in) != EOF)) + // There is more input after the end of a gzip member. Reset the + // inflate state to read another gzip member. On success, this will + // set ret to Z_OK to continue decompressing. + ret = inflateReset2(&strm, GZIP); + + // Keep going until Z_STREAM_END or error. If the compressed data ends + // prematurely without a file read error, Z_BUF_ERROR is returned. + } while (ret == Z_OK); + inflateEnd(&strm); + + if (ret != Z_STREAM_END) { + // An error was encountered. Discard the index and return a negative + // error code. + deflate_index_free(index); + return ret == Z_NEED_DICT ? Z_DATA_ERROR : ret; + } + + // Shrink the index to only the occupied access points and return it. + index->mode = mode; + index->length = totout; + point_t *list = realloc(index->list, sizeof(point_t) * index->have); + if (list == NULL) { + // Seems like a realloc() to make something smaller should always work, + // but just in case. + deflate_index_free(index); + return Z_MEM_ERROR; + } + index->list = list; + *built = index; + return index->have; +} + +#ifdef NOPRIME +// Support zlib versions before 1.2.3 (July 2005), or incomplete zlib clones +// that do not have inflatePrime(). + +# define INFLATEPRIME inflatePreface + +// Append the low bits bits of value to in[] at bit position *have, updating +// *have. value must be zero above its low bits bits. bits must be positive. +// This assumes that any bits above the *have bits in the last byte are zeros. +// That assumption is preserved on return, as any bits above *have + bits in +// the last byte written will be set to zeros. +static inline void append_bits(unsigned value, int bits, + unsigned char *in, int *have) { + in += *have >> 3; // where the first bits from value will go + int k = *have & 7; // the number of bits already there + *have += bits; + if (k) + *in |= value << k; // write value above the low k bits + else + *in = value; + k = 8 - k; // the number of bits just appended + while (bits > k) { + value >>= k; // drop the bits appended + bits -= k; + k = 8; // now at a byte boundary + *++in = value; + } +} + +// Insert enough bits in the form of empty deflate blocks in front of the the +// low bits bits of value, in order to bring the sequence to a byte boundary. +// Then feed that to inflate(). This does what inflatePrime() does, except that +// a negative value of bits is not supported. bits must be in 0..16. If the +// arguments are invalid, Z_STREAM_ERROR is returned. Otherwise the return +// value from inflate() is returned. +static int inflatePreface(z_stream *strm, int bits, int value) { + // Check input. + if (strm == Z_NULL || bits < 0 || bits > 16) + return Z_STREAM_ERROR; + if (bits == 0) + return Z_OK; + value &= (2 << (bits - 1)) - 1; + + // An empty dynamic block with an odd number of bits (95). The high bit of + // the last byte is unused. + static const unsigned char dyn[] = { + 4, 0xe0, 0x81, 8, 0, 0, 0, 0, 0x20, 0xa8, 0xab, 0x1f + }; + const int dynlen = 95; // number of bits in the block + + // Build an input buffer for inflate that is a multiple of eight bits in + // length, and that ends with the low bits bits of value. + unsigned char in[(dynlen + 3 * 10 + 16 + 7) / 8]; + int have = 0; + if (bits & 1) { + // Insert an empty dynamic block to get to an odd number of bits, so + // when bits bits from value are appended, we are at an even number of + // bits. + memcpy(in, dyn, sizeof(dyn)); + have = dynlen; + } + while ((have + bits) & 7) + // Insert empty fixed blocks until appending bits bits would put us on + // a byte boundary. This will insert at most three fixed blocks. + append_bits(2, 10, in, &have); + + // Append the bits bits from value, which takes us to a byte boundary. + append_bits(value, bits, in, &have); + + // Deliver the input to inflate(). There is no output space provided, but + // inflate() can't get stuck waiting on output not ingesting all of the + // provided input. The reason is that there will be at most 16 bits of + // input from value after the empty deflate blocks (which themselves + // generate no output). At least ten bits are needed to generate the first + // output byte from a fixed block. The last two bytes of the buffer have to + // be ingested in order to get ten bits, which is the most that value can + // occupy. + strm->avail_in = have >> 3; + strm->next_in = in; + strm->avail_out = 0; + strm->next_out = in; // not used, but can't be NULL + return inflate(strm, Z_NO_FLUSH); +} + +#else +# define INFLATEPRIME inflatePrime +#endif + +// See comments in zran.h. +ptrdiff_t deflate_index_extract(FILE *in, struct deflate_index *index, + off_t offset, unsigned char *buf, size_t len) { + // Do a quick sanity check on the index. + if (index == NULL || index->have < 1 || index->list[0].out != 0) + return Z_STREAM_ERROR; + + // If nothing to extract, return zero bytes extracted. + if (len == 0 || offset < 0 || offset >= index->length) + return 0; + + // Find the access point closest to but not after offset. + int lo = -1, hi = index->have; + point_t *point = index->list; + while (hi - lo > 1) { + int mid = (lo + hi) >> 1; + if (offset < point[mid].out) + hi = mid; + else + lo = mid; + } + point += lo; + + // Initialize the input file and prime the inflate engine to start there. + int ret = fseeko(in, point->in - (point->bits ? 1 : 0), SEEK_SET); + if (ret == -1) + return Z_ERRNO; + int ch = 0; + if (point->bits && (ch = getc(in)) == EOF) + return ferror(in) ? Z_ERRNO : Z_BUF_ERROR; + z_stream strm = {0}; + ret = inflateInit2(&strm, RAW); + if (ret != Z_OK) + return ret; + if (point->bits) + INFLATEPRIME(&strm, point->bits, ch >> (8 - point->bits)); + inflateSetDictionary(&strm, point->window, WINSIZE); + + // Skip uncompressed bytes until offset reached, then satisfy request. + unsigned char input[CHUNK]; + unsigned char discard[WINSIZE]; + offset -= point->out; // number of bytes to skip to get to offset + size_t left = len; // number of bytes left to read after offset + do { + if (offset) { + // Discard up to offset uncompressed bytes. + strm.avail_out = offset < WINSIZE ? (unsigned)offset : WINSIZE; + strm.next_out = discard; + } + else { + // Uncompress up to left bytes into buf. + strm.avail_out = left < UINT_MAX ? (unsigned)left : UINT_MAX; + strm.next_out = buf + len - left; + } + + // Uncompress, setting got to the number of bytes uncompressed. + if (strm.avail_in == 0) { + // Assure available input. + strm.avail_in = fread(input, 1, CHUNK, in); + if (strm.avail_in < CHUNK && ferror(in)) { + ret = Z_ERRNO; + break; + } + strm.next_in = input; + } + unsigned got = strm.avail_out; + ret = inflate(&strm, Z_NO_FLUSH); + got -= strm.avail_out; + + // Update the appropriate count. + if (offset) + offset -= got; + else + left -= got; + + // If we're at the end of a gzip member and there's more to read, + // continue to the next gzip member. + if (ret == Z_STREAM_END && index->mode == GZIP) { + // Discard the gzip trailer. + unsigned drop = 8; // length of gzip trailer + if (strm.avail_in >= drop) { + strm.avail_in -= drop; + strm.next_in += drop; + } + else { + // Read and discard the remainder of the gzip trailer. + drop -= strm.avail_in; + strm.avail_in = 0; + do { + if (getc(in) == EOF) + // The input does not have a complete trailer. + return ferror(in) ? Z_ERRNO : Z_BUF_ERROR; + } while (--drop); + } + + if (strm.avail_in || ungetc(getc(in), in) != EOF) { + // There's more after the gzip trailer. Use inflate to skip the + // gzip header and resume the raw inflate there. + inflateReset2(&strm, GZIP); + do { + if (strm.avail_in == 0) { + strm.avail_in = fread(input, 1, CHUNK, in); + if (strm.avail_in < CHUNK && ferror(in)) { + ret = Z_ERRNO; + break; + } + strm.next_in = input; + } + strm.avail_out = WINSIZE; + strm.next_out = discard; + ret = inflate(&strm, Z_BLOCK); // stop at end of header + } while (ret == Z_OK && (strm.data_type & 0x80) == 0); + if (ret != Z_OK) + break; + inflateReset2(&strm, RAW); + } + } + + // Continue until we have the requested data, the deflate data has + // ended, or an error is encountered. + } while (ret == Z_OK && left); + inflateEnd(&strm); + + // Return the number of uncompressed bytes read into buf, or the error. + return ret == Z_OK || ret == Z_STREAM_END ? len - left : ret; +} + +#ifdef TEST + +#define SPAN 1048576L // desired distance between access points +#define LEN 16384 // number of bytes to extract + +// Demonstrate the use of deflate_index_build() and deflate_index_extract() by +// processing the file provided on the command line, and extracting LEN bytes +// from 2/3rds of the way through the uncompressed output, writing that to +// stdout. An offset can be provided as the second argument, in which case the +// data is extracted from there instead. +int main(int argc, char **argv) { + // Open the input file. + if (argc < 2 || argc > 3) { + fprintf(stderr, "usage: zran file.raw [offset]\n"); + return 1; + } + FILE *in = fopen(argv[1], "rb"); + if (in == NULL) { + fprintf(stderr, "zran: could not open %s for reading\n", argv[1]); + return 1; + } + + // Get optional offset. + off_t offset = -1; + if (argc == 3) { + char *end; + offset = strtoll(argv[2], &end, 10); + if (*end || offset < 0) { + fprintf(stderr, "zran: %s is not a valid offset\n", argv[2]); + return 1; + } + } + + // Build index. + struct deflate_index *index = NULL; + int len = deflate_index_build(in, SPAN, &index); + if (len < 0) { + fclose(in); + switch (len) { + case Z_MEM_ERROR: + fprintf(stderr, "zran: out of memory\n"); + break; + case Z_BUF_ERROR: + fprintf(stderr, "zran: %s ended prematurely\n", argv[1]); + break; + case Z_DATA_ERROR: + fprintf(stderr, "zran: compressed data error in %s\n", argv[1]); + break; + case Z_ERRNO: + fprintf(stderr, "zran: read error on %s\n", argv[1]); + break; + default: + fprintf(stderr, "zran: error %d while building index\n", len); + } + return 1; + } + fprintf(stderr, "zran: built index with %d access points\n", len); + + // Use index by reading some bytes from an arbitrary offset. + unsigned char buf[LEN]; + if (offset == -1) + offset = ((index->length + 1) << 1) / 3; + ptrdiff_t got = deflate_index_extract(in, index, offset, buf, LEN); + if (got < 0) + fprintf(stderr, "zran: extraction failed: %s error\n", + got == Z_MEM_ERROR ? "out of memory" : "input corrupted"); + else { + fwrite(buf, 1, got, stdout); + fprintf(stderr, "zran: extracted %ld bytes at %lld\n", got, offset); + } + + // Clean up and exit. + deflate_index_free(index); + fclose(in); + return 0; +} + +#endif diff --git a/src/zlib/zlib-1.3/examples/zran.h b/src/zlib/zlib-1.3/examples/zran.h new file mode 100644 index 000000000..ebf780d0c --- /dev/null +++ b/src/zlib/zlib-1.3/examples/zran.h @@ -0,0 +1,51 @@ +/* zran.h -- example of deflated stream indexing and random access + * Copyright (C) 2005, 2012, 2018, 2023 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * Version 1.3 18 Feb 2023 Mark Adler */ + +#include +#include "zlib.h" + +// Access point. +typedef struct point { + off_t out; // offset in uncompressed data + off_t in; // offset in compressed file of first full byte + int bits; // 0, or number of bits (1-7) from byte at in-1 + unsigned char window[32768]; // preceding 32K of uncompressed data +} point_t; + +// Access point list. +struct deflate_index { + int have; // number of access points in list + int mode; // -15 for raw, 15 for zlib, or 31 for gzip + off_t length; // total length of uncompressed data + point_t *list; // allocated list of access points +}; + +// Make one pass through a zlib, gzip, or raw deflate compressed stream and +// build an index, with access points about every span bytes of uncompressed +// output. gzip files with multiple members are fully indexed. span should be +// chosen to balance the speed of random access against the memory requirements +// of the list, which is about 32K bytes per access point. The return value is +// the number of access points on success (>= 1), Z_MEM_ERROR for out of +// memory, Z_BUF_ERROR for a premature end of input, Z_DATA_ERROR for a format +// or verification error in the input file, or Z_ERRNO for a file read error. +// On success, *built points to the resulting index. +int deflate_index_build(FILE *in, off_t span, struct deflate_index **built); + +// Use the index to read len bytes from offset into buf. Return the number of +// bytes read or a negative error code. If data is requested past the end of +// the uncompressed data, then deflate_index_extract() will return a value less +// than len, indicating how much was actually read into buf. If given a valid +// index, this function should not return an error unless the file was modified +// somehow since the index was generated, given that deflate_index_build() had +// validated all of the input. If nevertheless there is a failure, Z_BUF_ERROR +// is returned if the compressed data ends prematurely, Z_DATA_ERROR if the +// deflate compressed data is not valid, Z_MEM_ERROR if out of memory, +// Z_STREAM_ERROR if the index is not valid, or Z_ERRNO if there is an error +// reading or seeking on the input file. +ptrdiff_t deflate_index_extract(FILE *in, struct deflate_index *index, + off_t offset, unsigned char *buf, size_t len); + +// Deallocate an index built by deflate_index_build(). +void deflate_index_free(struct deflate_index *index); diff --git a/src/zlib/zlib-1.2.13/gzclose.c b/src/zlib/zlib-1.3/gzclose.c similarity index 93% rename from src/zlib/zlib-1.2.13/gzclose.c rename to src/zlib/zlib-1.3/gzclose.c index caeb99a31..48d6a86f0 100644 --- a/src/zlib/zlib-1.2.13/gzclose.c +++ b/src/zlib/zlib-1.3/gzclose.c @@ -8,9 +8,7 @@ /* gzclose() is in a separate file so that it is linked in only if it is used. That way the other gzclose functions can be used instead to avoid linking in unneeded compression or decompression routines. */ -int ZEXPORT gzclose(file) - gzFile file; -{ +int ZEXPORT gzclose(gzFile file) { #ifndef NO_GZCOMPRESS gz_statep state; diff --git a/src/zlib/zlib-1.2.13/gzguts.h b/src/zlib/zlib-1.3/gzguts.h similarity index 91% rename from src/zlib/zlib-1.2.13/gzguts.h rename to src/zlib/zlib-1.3/gzguts.h index 57faf3716..f9375047e 100644 --- a/src/zlib/zlib-1.2.13/gzguts.h +++ b/src/zlib/zlib-1.3/gzguts.h @@ -7,9 +7,8 @@ # ifndef _LARGEFILE_SOURCE # define _LARGEFILE_SOURCE 1 # endif -# ifdef _FILE_OFFSET_BITS -# undef _FILE_OFFSET_BITS -# endif +# undef _FILE_OFFSET_BITS +# undef _TIME_BITS #endif #ifdef HAVE_HIDDEN @@ -119,8 +118,8 @@ /* gz* functions always use library allocation functions */ #ifndef STDC - extern voidp malloc OF((uInt size)); - extern void free OF((voidpf ptr)); + extern voidp malloc(uInt size); + extern void free(voidpf ptr); #endif /* get errno and strerror definition */ @@ -138,10 +137,10 @@ /* provide prototypes for these when building zlib without LFS */ #if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); + ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int); + ZEXTERN z_off64_t ZEXPORT gztell64(gzFile); + ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile); #endif /* default memLevel */ @@ -203,9 +202,9 @@ typedef struct { typedef gz_state FAR *gz_statep; /* shared functions */ -void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *)); +void ZLIB_INTERNAL gz_error(gz_statep, int, const char *); #if defined UNDER_CE -char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error)); +char ZLIB_INTERNAL *gz_strwinerror(DWORD error); #endif /* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t @@ -214,6 +213,6 @@ char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error)); #ifdef INT_MAX # define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) #else -unsigned ZLIB_INTERNAL gz_intmax OF((void)); +unsigned ZLIB_INTERNAL gz_intmax(void); # define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) #endif diff --git a/src/zlib/zlib-1.2.13/gzlib.c b/src/zlib/zlib-1.3/gzlib.c similarity index 90% rename from src/zlib/zlib-1.2.13/gzlib.c rename to src/zlib/zlib-1.3/gzlib.c index 55da46a45..29fc4486f 100644 --- a/src/zlib/zlib-1.2.13/gzlib.c +++ b/src/zlib/zlib-1.3/gzlib.c @@ -15,10 +15,6 @@ #endif #endif -/* Local functions */ -local void gz_reset OF((gz_statep)); -local gzFile gz_open OF((const void *, int, const char *)); - #if defined UNDER_CE /* Map the Windows error number in ERROR to a locale-dependent error message @@ -30,9 +26,7 @@ local gzFile gz_open OF((const void *, int, const char *)); The gz_strwinerror function does not change the current setting of GetLastError. */ -char ZLIB_INTERNAL *gz_strwinerror(error) - DWORD error; -{ +char ZLIB_INTERNAL *gz_strwinerror(DWORD error) { static char buf[1024]; wchar_t *msgbuf; @@ -72,9 +66,7 @@ char ZLIB_INTERNAL *gz_strwinerror(error) #endif /* UNDER_CE */ /* Reset gzip file state */ -local void gz_reset(state) - gz_statep state; -{ +local void gz_reset(gz_statep state) { state->x.have = 0; /* no output data available */ if (state->mode == GZ_READ) { /* for reading ... */ state->eof = 0; /* not at end of file */ @@ -90,11 +82,7 @@ local void gz_reset(state) } /* Open a gzip file either by name or file descriptor. */ -local gzFile gz_open(path, fd, mode) - const void *path; - int fd; - const char *mode; -{ +local gzFile gz_open(const void *path, int fd, const char *mode) { gz_statep state; z_size_t len; int oflag; @@ -269,26 +257,17 @@ local gzFile gz_open(path, fd, mode) } /* -- see zlib.h -- */ -gzFile ZEXPORT gzopen(path, mode) - const char *path; - const char *mode; -{ +gzFile ZEXPORT gzopen(const char *path, const char *mode) { return gz_open(path, -1, mode); } /* -- see zlib.h -- */ -gzFile ZEXPORT gzopen64(path, mode) - const char *path; - const char *mode; -{ +gzFile ZEXPORT gzopen64(const char *path, const char *mode) { return gz_open(path, -1, mode); } /* -- see zlib.h -- */ -gzFile ZEXPORT gzdopen(fd, mode) - int fd; - const char *mode; -{ +gzFile ZEXPORT gzdopen(int fd, const char *mode) { char *path; /* identifier for error messages */ gzFile gz; @@ -306,19 +285,13 @@ gzFile ZEXPORT gzdopen(fd, mode) /* -- see zlib.h -- */ #ifdef WIDECHAR -gzFile ZEXPORT gzopen_w(path, mode) - const wchar_t *path; - const char *mode; -{ +gzFile ZEXPORT gzopen_w(const wchar_t *path, const char *mode) { return gz_open(path, -2, mode); } #endif /* -- see zlib.h -- */ -int ZEXPORT gzbuffer(file, size) - gzFile file; - unsigned size; -{ +int ZEXPORT gzbuffer(gzFile file, unsigned size) { gz_statep state; /* get internal structure and check integrity */ @@ -335,16 +308,14 @@ int ZEXPORT gzbuffer(file, size) /* check and set requested size */ if ((size << 1) < size) return -1; /* need to be able to double it */ - if (size < 2) - size = 2; /* need two bytes to check magic header */ + if (size < 8) + size = 8; /* needed to behave well with flushing */ state->want = size; return 0; } /* -- see zlib.h -- */ -int ZEXPORT gzrewind(file) - gzFile file; -{ +int ZEXPORT gzrewind(gzFile file) { gz_statep state; /* get internal structure */ @@ -365,11 +336,7 @@ int ZEXPORT gzrewind(file) } /* -- see zlib.h -- */ -z_off64_t ZEXPORT gzseek64(file, offset, whence) - gzFile file; - z_off64_t offset; - int whence; -{ +z_off64_t ZEXPORT gzseek64(gzFile file, z_off64_t offset, int whence) { unsigned n; z_off64_t ret; gz_statep state; @@ -442,11 +409,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence) } /* -- see zlib.h -- */ -z_off_t ZEXPORT gzseek(file, offset, whence) - gzFile file; - z_off_t offset; - int whence; -{ +z_off_t ZEXPORT gzseek(gzFile file, z_off_t offset, int whence) { z_off64_t ret; ret = gzseek64(file, (z_off64_t)offset, whence); @@ -454,9 +417,7 @@ z_off_t ZEXPORT gzseek(file, offset, whence) } /* -- see zlib.h -- */ -z_off64_t ZEXPORT gztell64(file) - gzFile file; -{ +z_off64_t ZEXPORT gztell64(gzFile file) { gz_statep state; /* get internal structure and check integrity */ @@ -471,9 +432,7 @@ z_off64_t ZEXPORT gztell64(file) } /* -- see zlib.h -- */ -z_off_t ZEXPORT gztell(file) - gzFile file; -{ +z_off_t ZEXPORT gztell(gzFile file) { z_off64_t ret; ret = gztell64(file); @@ -481,9 +440,7 @@ z_off_t ZEXPORT gztell(file) } /* -- see zlib.h -- */ -z_off64_t ZEXPORT gzoffset64(file) - gzFile file; -{ +z_off64_t ZEXPORT gzoffset64(gzFile file) { z_off64_t offset; gz_statep state; @@ -504,9 +461,7 @@ z_off64_t ZEXPORT gzoffset64(file) } /* -- see zlib.h -- */ -z_off_t ZEXPORT gzoffset(file) - gzFile file; -{ +z_off_t ZEXPORT gzoffset(gzFile file) { z_off64_t ret; ret = gzoffset64(file); @@ -514,9 +469,7 @@ z_off_t ZEXPORT gzoffset(file) } /* -- see zlib.h -- */ -int ZEXPORT gzeof(file) - gzFile file; -{ +int ZEXPORT gzeof(gzFile file) { gz_statep state; /* get internal structure and check integrity */ @@ -531,10 +484,7 @@ int ZEXPORT gzeof(file) } /* -- see zlib.h -- */ -const char * ZEXPORT gzerror(file, errnum) - gzFile file; - int *errnum; -{ +const char * ZEXPORT gzerror(gzFile file, int *errnum) { gz_statep state; /* get internal structure and check integrity */ @@ -552,9 +502,7 @@ const char * ZEXPORT gzerror(file, errnum) } /* -- see zlib.h -- */ -void ZEXPORT gzclearerr(file) - gzFile file; -{ +void ZEXPORT gzclearerr(gzFile file) { gz_statep state; /* get internal structure and check integrity */ @@ -578,11 +526,7 @@ void ZEXPORT gzclearerr(file) memory). Simply save the error message as a static string. If there is an allocation failure constructing the error message, then convert the error to out of memory. */ -void ZLIB_INTERNAL gz_error(state, err, msg) - gz_statep state; - int err; - const char *msg; -{ +void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg) { /* free previously allocated message and clear */ if (state->msg != NULL) { if (state->err != Z_MEM_ERROR) @@ -624,8 +568,7 @@ void ZLIB_INTERNAL gz_error(state, err, msg) available) -- we need to do this to cover cases where 2's complement not used, since C standard permits 1's complement and sign-bit representations, otherwise we could just use ((unsigned)-1) >> 1 */ -unsigned ZLIB_INTERNAL gz_intmax() -{ +unsigned ZLIB_INTERNAL gz_intmax(void) { unsigned p, q; p = 1; diff --git a/src/zlib/zlib-1.2.13/gzread.c b/src/zlib/zlib-1.3/gzread.c similarity index 93% rename from src/zlib/zlib-1.2.13/gzread.c rename to src/zlib/zlib-1.3/gzread.c index dd7738159..4168cbc88 100644 --- a/src/zlib/zlib-1.2.13/gzread.c +++ b/src/zlib/zlib-1.3/gzread.c @@ -5,25 +5,12 @@ #include "gzguts.h" -/* Local functions */ -local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *)); -local int gz_avail OF((gz_statep)); -local int gz_look OF((gz_statep)); -local int gz_decomp OF((gz_statep)); -local int gz_fetch OF((gz_statep)); -local int gz_skip OF((gz_statep, z_off64_t)); -local z_size_t gz_read OF((gz_statep, voidp, z_size_t)); - /* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from state->fd, and update state->eof, state->err, and state->msg as appropriate. This function needs to loop on read(), since read() is not guaranteed to read the number of bytes requested, depending on the type of descriptor. */ -local int gz_load(state, buf, len, have) - gz_statep state; - unsigned char *buf; - unsigned len; - unsigned *have; -{ +local int gz_load(gz_statep state, unsigned char *buf, unsigned len, + unsigned *have) { int ret; unsigned get, max = ((unsigned)-1 >> 2) + 1; @@ -53,9 +40,7 @@ local int gz_load(state, buf, len, have) If strm->avail_in != 0, then the current data is moved to the beginning of the input buffer, and then the remainder of the buffer is loaded with the available data from the input file. */ -local int gz_avail(state) - gz_statep state; -{ +local int gz_avail(gz_statep state) { unsigned got; z_streamp strm = &(state->strm); @@ -88,9 +73,7 @@ local int gz_avail(state) case, all further file reads will be directly to either the output buffer or a user buffer. If decompressing, the inflate state will be initialized. gz_look() will return 0 on success or -1 on failure. */ -local int gz_look(state) - gz_statep state; -{ +local int gz_look(gz_statep state) { z_streamp strm = &(state->strm); /* allocate read buffers and inflate memory */ @@ -170,9 +153,7 @@ local int gz_look(state) data. If the gzip stream completes, state->how is reset to LOOK to look for the next gzip stream or raw data, once state->x.have is depleted. Returns 0 on success, -1 on failure. */ -local int gz_decomp(state) - gz_statep state; -{ +local int gz_decomp(gz_statep state) { int ret = Z_OK; unsigned had; z_streamp strm = &(state->strm); @@ -224,9 +205,7 @@ local int gz_decomp(state) looked for to determine whether to copy or decompress. Returns -1 on error, otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the end of the input file has been reached and all data has been processed. */ -local int gz_fetch(state) - gz_statep state; -{ +local int gz_fetch(gz_statep state) { z_streamp strm = &(state->strm); do { @@ -254,10 +233,7 @@ local int gz_fetch(state) } /* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */ -local int gz_skip(state, len) - gz_statep state; - z_off64_t len; -{ +local int gz_skip(gz_statep state, z_off64_t len) { unsigned n; /* skip over len bytes or reach end-of-file, whichever comes first */ @@ -289,11 +265,7 @@ local int gz_skip(state, len) input. Return the number of bytes read. If zero is returned, either the end of file was reached, or there was an error. state->err must be consulted in that case to determine which. */ -local z_size_t gz_read(state, buf, len) - gz_statep state; - voidp buf; - z_size_t len; -{ +local z_size_t gz_read(gz_statep state, voidp buf, z_size_t len) { z_size_t got; unsigned n; @@ -370,11 +342,7 @@ local z_size_t gz_read(state, buf, len) } /* -- see zlib.h -- */ -int ZEXPORT gzread(file, buf, len) - gzFile file; - voidp buf; - unsigned len; -{ +int ZEXPORT gzread(gzFile file, voidp buf, unsigned len) { gz_statep state; /* get internal structure */ @@ -406,12 +374,7 @@ int ZEXPORT gzread(file, buf, len) } /* -- see zlib.h -- */ -z_size_t ZEXPORT gzfread(buf, size, nitems, file) - voidp buf; - z_size_t size; - z_size_t nitems; - gzFile file; -{ +z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems, gzFile file) { z_size_t len; gz_statep state; @@ -442,9 +405,7 @@ z_size_t ZEXPORT gzfread(buf, size, nitems, file) #else # undef gzgetc #endif -int ZEXPORT gzgetc(file) - gzFile file; -{ +int ZEXPORT gzgetc(gzFile file) { unsigned char buf[1]; gz_statep state; @@ -469,17 +430,12 @@ int ZEXPORT gzgetc(file) return gz_read(state, buf, 1) < 1 ? -1 : buf[0]; } -int ZEXPORT gzgetc_(file) -gzFile file; -{ +int ZEXPORT gzgetc_(gzFile file) { return gzgetc(file); } /* -- see zlib.h -- */ -int ZEXPORT gzungetc(c, file) - int c; - gzFile file; -{ +int ZEXPORT gzungetc(int c, gzFile file) { gz_statep state; /* get internal structure */ @@ -487,6 +443,10 @@ int ZEXPORT gzungetc(c, file) return -1; state = (gz_statep)file; + /* in case this was just opened, set up the input buffer */ + if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0) + (void)gz_look(state); + /* check that we're reading and that there's no (serious) error */ if (state->mode != GZ_READ || (state->err != Z_OK && state->err != Z_BUF_ERROR)) @@ -536,11 +496,7 @@ int ZEXPORT gzungetc(c, file) } /* -- see zlib.h -- */ -char * ZEXPORT gzgets(file, buf, len) - gzFile file; - char *buf; - int len; -{ +char * ZEXPORT gzgets(gzFile file, char *buf, int len) { unsigned left, n; char *str; unsigned char *eol; @@ -600,9 +556,7 @@ char * ZEXPORT gzgets(file, buf, len) } /* -- see zlib.h -- */ -int ZEXPORT gzdirect(file) - gzFile file; -{ +int ZEXPORT gzdirect(gzFile file) { gz_statep state; /* get internal structure */ @@ -620,9 +574,7 @@ int ZEXPORT gzdirect(file) } /* -- see zlib.h -- */ -int ZEXPORT gzclose_r(file) - gzFile file; -{ +int ZEXPORT gzclose_r(gzFile file) { int ret, err; gz_statep state; diff --git a/src/zlib/zlib-1.2.13/gzwrite.c b/src/zlib/zlib-1.3/gzwrite.c similarity index 92% rename from src/zlib/zlib-1.2.13/gzwrite.c rename to src/zlib/zlib-1.3/gzwrite.c index eb8a0e589..435b4621b 100644 --- a/src/zlib/zlib-1.2.13/gzwrite.c +++ b/src/zlib/zlib-1.3/gzwrite.c @@ -5,18 +5,10 @@ #include "gzguts.h" -/* Local functions */ -local int gz_init OF((gz_statep)); -local int gz_comp OF((gz_statep, int)); -local int gz_zero OF((gz_statep, z_off64_t)); -local z_size_t gz_write OF((gz_statep, voidpc, z_size_t)); - /* Initialize state for writing a gzip file. Mark initialization by setting state->size to non-zero. Return -1 on a memory allocation failure, or 0 on success. */ -local int gz_init(state) - gz_statep state; -{ +local int gz_init(gz_statep state) { int ret; z_streamp strm = &(state->strm); @@ -70,10 +62,7 @@ local int gz_init(state) deflate() flush value. If flush is Z_FINISH, then the deflate() state is reset to start a new gzip stream. If gz->direct is true, then simply write to the output file without compressing, and ignore flush. */ -local int gz_comp(state, flush) - gz_statep state; - int flush; -{ +local int gz_comp(gz_statep state, int flush) { int ret, writ; unsigned have, put, max = ((unsigned)-1 >> 2) + 1; z_streamp strm = &(state->strm); @@ -151,10 +140,7 @@ local int gz_comp(state, flush) /* Compress len zeros to output. Return -1 on a write error or memory allocation failure by gz_comp(), or 0 on success. */ -local int gz_zero(state, len) - gz_statep state; - z_off64_t len; -{ +local int gz_zero(gz_statep state, z_off64_t len) { int first; unsigned n; z_streamp strm = &(state->strm); @@ -184,11 +170,7 @@ local int gz_zero(state, len) /* Write len bytes from buf to file. Return the number of bytes written. If the returned value is less than len, then there was an error. */ -local z_size_t gz_write(state, buf, len) - gz_statep state; - voidpc buf; - z_size_t len; -{ +local z_size_t gz_write(gz_statep state, voidpc buf, z_size_t len) { z_size_t put = len; /* if len is zero, avoid unnecessary operations */ @@ -252,11 +234,7 @@ local z_size_t gz_write(state, buf, len) } /* -- see zlib.h -- */ -int ZEXPORT gzwrite(file, buf, len) - gzFile file; - voidpc buf; - unsigned len; -{ +int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len) { gz_statep state; /* get internal structure */ @@ -280,12 +258,8 @@ int ZEXPORT gzwrite(file, buf, len) } /* -- see zlib.h -- */ -z_size_t ZEXPORT gzfwrite(buf, size, nitems, file) - voidpc buf; - z_size_t size; - z_size_t nitems; - gzFile file; -{ +z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size, z_size_t nitems, + gzFile file) { z_size_t len; gz_statep state; @@ -310,10 +284,7 @@ z_size_t ZEXPORT gzfwrite(buf, size, nitems, file) } /* -- see zlib.h -- */ -int ZEXPORT gzputc(file, c) - gzFile file; - int c; -{ +int ZEXPORT gzputc(gzFile file, int c) { unsigned have; unsigned char buf[1]; gz_statep state; @@ -358,10 +329,7 @@ int ZEXPORT gzputc(file, c) } /* -- see zlib.h -- */ -int ZEXPORT gzputs(file, s) - gzFile file; - const char *s; -{ +int ZEXPORT gzputs(gzFile file, const char *s) { z_size_t len, put; gz_statep state; @@ -388,8 +356,7 @@ int ZEXPORT gzputs(file, s) #include /* -- see zlib.h -- */ -int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) -{ +int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) { int len; unsigned left; char *next; @@ -460,8 +427,7 @@ int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) return len; } -int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) -{ +int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) { va_list va; int ret; @@ -474,13 +440,10 @@ int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) #else /* !STDC && !Z_HAVE_STDARG_H */ /* -- see zlib.h -- */ -int ZEXPORTVA gzprintf(file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) - gzFile file; - const char *format; - int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; -{ +int ZEXPORTVA gzprintf(gzFile file, const char *format, int a1, int a2, int a3, + int a4, int a5, int a6, int a7, int a8, int a9, int a10, + int a11, int a12, int a13, int a14, int a15, int a16, + int a17, int a18, int a19, int a20) { unsigned len, left; char *next; gz_statep state; @@ -562,10 +525,7 @@ int ZEXPORTVA gzprintf(file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, #endif /* -- see zlib.h -- */ -int ZEXPORT gzflush(file, flush) - gzFile file; - int flush; -{ +int ZEXPORT gzflush(gzFile file, int flush) { gz_statep state; /* get internal structure */ @@ -594,11 +554,7 @@ int ZEXPORT gzflush(file, flush) } /* -- see zlib.h -- */ -int ZEXPORT gzsetparams(file, level, strategy) - gzFile file; - int level; - int strategy; -{ +int ZEXPORT gzsetparams(gzFile file, int level, int strategy) { gz_statep state; z_streamp strm; @@ -609,7 +565,7 @@ int ZEXPORT gzsetparams(file, level, strategy) strm = &(state->strm); /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) + if (state->mode != GZ_WRITE || state->err != Z_OK || state->direct) return Z_STREAM_ERROR; /* if no change is requested, then do nothing */ @@ -636,9 +592,7 @@ int ZEXPORT gzsetparams(file, level, strategy) } /* -- see zlib.h -- */ -int ZEXPORT gzclose_w(file) - gzFile file; -{ +int ZEXPORT gzclose_w(gzFile file) { int ret = Z_OK; gz_statep state; diff --git a/src/zlib/zlib-1.2.13/infback.c b/src/zlib/zlib-1.3/infback.c similarity index 97% rename from src/zlib/zlib-1.2.13/infback.c rename to src/zlib/zlib-1.3/infback.c index babeaf180..e7b25b307 100644 --- a/src/zlib/zlib-1.2.13/infback.c +++ b/src/zlib/zlib-1.3/infback.c @@ -15,9 +15,6 @@ #include "inflate.h" #include "inffast.h" -/* function prototypes */ -local void fixedtables OF((struct inflate_state FAR *state)); - /* strm provides memory allocation functions in zalloc and zfree, or Z_NULL to use the library memory allocation functions. @@ -25,13 +22,9 @@ local void fixedtables OF((struct inflate_state FAR *state)); windowBits is in the range 8..15, and window is a user-supplied window and output buffer that is 2**windowBits bytes. */ -int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size) -z_streamp strm; -int windowBits; -unsigned char FAR *window; -const char *version; -int stream_size; -{ +int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits, + unsigned char FAR *window, const char *version, + int stream_size) { struct inflate_state FAR *state; if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || @@ -80,9 +73,7 @@ int stream_size; used for threaded applications, since the rewriting of the tables and virgin may not be thread-safe. */ -local void fixedtables(state) -struct inflate_state FAR *state; -{ +local void fixedtables(struct inflate_state FAR *state) { #ifdef BUILDFIXED static int virgin = 1; static code *lenfix, *distfix; @@ -248,13 +239,8 @@ struct inflate_state FAR *state; inflateBack() can also return Z_STREAM_ERROR if the input parameters are not correct, i.e. strm is Z_NULL or the state was not initialized. */ -int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc) -z_streamp strm; -in_func in; -void FAR *in_desc; -out_func out; -void FAR *out_desc; -{ +int ZEXPORT inflateBack(z_streamp strm, in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc) { struct inflate_state FAR *state; z_const unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ @@ -632,9 +618,7 @@ void FAR *out_desc; return ret; } -int ZEXPORT inflateBackEnd(strm) -z_streamp strm; -{ +int ZEXPORT inflateBackEnd(z_streamp strm) { if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) return Z_STREAM_ERROR; ZFREE(strm, strm->state); diff --git a/src/zlib/zlib-1.2.13/inffast.c b/src/zlib/zlib-1.3/inffast.c similarity index 98% rename from src/zlib/zlib-1.2.13/inffast.c rename to src/zlib/zlib-1.3/inffast.c index 1fec7f363..9354676e7 100644 --- a/src/zlib/zlib-1.2.13/inffast.c +++ b/src/zlib/zlib-1.3/inffast.c @@ -47,10 +47,7 @@ requires strm->avail_out >= 258 for each loop to avoid checking for output space. */ -void ZLIB_INTERNAL inflate_fast(strm, start) -z_streamp strm; -unsigned start; /* inflate()'s starting value for strm->avail_out */ -{ +void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) { struct inflate_state FAR *state; z_const unsigned char FAR *in; /* local strm->next_in */ z_const unsigned char FAR *last; /* have enough input while in < last */ diff --git a/src/zlib/zlib-1.2.13/inffast.h b/src/zlib/zlib-1.3/inffast.h similarity index 83% rename from src/zlib/zlib-1.2.13/inffast.h rename to src/zlib/zlib-1.3/inffast.h index e5c1aa4ca..49c6d156c 100644 --- a/src/zlib/zlib-1.2.13/inffast.h +++ b/src/zlib/zlib-1.3/inffast.h @@ -8,4 +8,4 @@ subject to change. Applications should only use zlib.h. */ -void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); +void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start); diff --git a/src/zlib/zlib-1.2.13/inffixed.h b/src/zlib/zlib-1.3/inffixed.h similarity index 100% rename from src/zlib/zlib-1.2.13/inffixed.h rename to src/zlib/zlib-1.3/inffixed.h diff --git a/src/zlib/zlib-1.2.13/inflate.c b/src/zlib/zlib-1.3/inflate.c similarity index 96% rename from src/zlib/zlib-1.2.13/inflate.c rename to src/zlib/zlib-1.3/inflate.c index 8acbef44e..b0757a9b2 100644 --- a/src/zlib/zlib-1.2.13/inflate.c +++ b/src/zlib/zlib-1.3/inflate.c @@ -91,20 +91,7 @@ # endif #endif -/* function prototypes */ -local int inflateStateCheck OF((z_streamp strm)); -local void fixedtables OF((struct inflate_state FAR *state)); -local int updatewindow OF((z_streamp strm, const unsigned char FAR *end, - unsigned copy)); -#ifdef BUILDFIXED - void makefixed OF((void)); -#endif -local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf, - unsigned len)); - -local int inflateStateCheck(strm) -z_streamp strm; -{ +local int inflateStateCheck(z_streamp strm) { struct inflate_state FAR *state; if (strm == Z_NULL || strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) @@ -116,9 +103,7 @@ z_streamp strm; return 0; } -int ZEXPORT inflateResetKeep(strm) -z_streamp strm; -{ +int ZEXPORT inflateResetKeep(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -142,9 +127,7 @@ z_streamp strm; return Z_OK; } -int ZEXPORT inflateReset(strm) -z_streamp strm; -{ +int ZEXPORT inflateReset(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -155,10 +138,7 @@ z_streamp strm; return inflateResetKeep(strm); } -int ZEXPORT inflateReset2(strm, windowBits) -z_streamp strm; -int windowBits; -{ +int ZEXPORT inflateReset2(z_streamp strm, int windowBits) { int wrap; struct inflate_state FAR *state; @@ -195,12 +175,8 @@ int windowBits; return inflateReset(strm); } -int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size) -z_streamp strm; -int windowBits; -const char *version; -int stream_size; -{ +int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, + const char *version, int stream_size) { int ret; struct inflate_state FAR *state; @@ -239,22 +215,17 @@ int stream_size; return ret; } -int ZEXPORT inflateInit_(strm, version, stream_size) -z_streamp strm; -const char *version; -int stream_size; -{ +int ZEXPORT inflateInit_(z_streamp strm, const char *version, + int stream_size) { return inflateInit2_(strm, DEF_WBITS, version, stream_size); } -int ZEXPORT inflatePrime(strm, bits, value) -z_streamp strm; -int bits; -int value; -{ +int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + if (bits == 0) + return Z_OK; state = (struct inflate_state FAR *)strm->state; if (bits < 0) { state->hold = 0; @@ -278,9 +249,7 @@ int value; used for threaded applications, since the rewriting of the tables and virgin may not be thread-safe. */ -local void fixedtables(state) -struct inflate_state FAR *state; -{ +local void fixedtables(struct inflate_state FAR *state) { #ifdef BUILDFIXED static int virgin = 1; static code *lenfix, *distfix; @@ -342,7 +311,7 @@ struct inflate_state FAR *state; a.out > inffixed.h */ -void makefixed() +void makefixed(void) { unsigned low, size; struct inflate_state state; @@ -396,11 +365,7 @@ void makefixed() output will fall in the output data, making match copies simpler and faster. The advantage may be dependent on the size of the processor's data caches. */ -local int updatewindow(strm, end, copy) -z_streamp strm; -const Bytef *end; -unsigned copy; -{ +local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) { struct inflate_state FAR *state; unsigned dist; @@ -622,10 +587,7 @@ unsigned copy; will return Z_BUF_ERROR if it has not reached the end of the stream. */ -int ZEXPORT inflate(strm, flush) -z_streamp strm; -int flush; -{ +int ZEXPORT inflate(z_streamp strm, int flush) { struct inflate_state FAR *state; z_const unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ @@ -1301,9 +1263,7 @@ int flush; return ret; } -int ZEXPORT inflateEnd(strm) -z_streamp strm; -{ +int ZEXPORT inflateEnd(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -1315,11 +1275,8 @@ z_streamp strm; return Z_OK; } -int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength) -z_streamp strm; -Bytef *dictionary; -uInt *dictLength; -{ +int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary, + uInt *dictLength) { struct inflate_state FAR *state; /* check state */ @@ -1338,11 +1295,8 @@ uInt *dictLength; return Z_OK; } -int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength) -z_streamp strm; -const Bytef *dictionary; -uInt dictLength; -{ +int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary, + uInt dictLength) { struct inflate_state FAR *state; unsigned long dictid; int ret; @@ -1373,10 +1327,7 @@ uInt dictLength; return Z_OK; } -int ZEXPORT inflateGetHeader(strm, head) -z_streamp strm; -gz_headerp head; -{ +int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head) { struct inflate_state FAR *state; /* check state */ @@ -1401,11 +1352,8 @@ gz_headerp head; called again with more data and the *have state. *have is initialized to zero for the first call. */ -local unsigned syncsearch(have, buf, len) -unsigned FAR *have; -const unsigned char FAR *buf; -unsigned len; -{ +local unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf, + unsigned len) { unsigned got; unsigned next; @@ -1424,9 +1372,7 @@ unsigned len; return next; } -int ZEXPORT inflateSync(strm) -z_streamp strm; -{ +int ZEXPORT inflateSync(z_streamp strm) { unsigned len; /* number of bytes to look at or looked at */ int flags; /* temporary to save header status */ unsigned long in, out; /* temporary to save total_in and total_out */ @@ -1482,9 +1428,7 @@ z_streamp strm; block. When decompressing, PPP checks that at the end of input packet, inflate is waiting for these length bytes. */ -int ZEXPORT inflateSyncPoint(strm) -z_streamp strm; -{ +int ZEXPORT inflateSyncPoint(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -1492,10 +1436,7 @@ z_streamp strm; return state->mode == STORED && state->bits == 0; } -int ZEXPORT inflateCopy(dest, source) -z_streamp dest; -z_streamp source; -{ +int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) { struct inflate_state FAR *state; struct inflate_state FAR *copy; unsigned char FAR *window; @@ -1539,10 +1480,7 @@ z_streamp source; return Z_OK; } -int ZEXPORT inflateUndermine(strm, subvert) -z_streamp strm; -int subvert; -{ +int ZEXPORT inflateUndermine(z_streamp strm, int subvert) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -1557,10 +1495,7 @@ int subvert; #endif } -int ZEXPORT inflateValidate(strm, check) -z_streamp strm; -int check; -{ +int ZEXPORT inflateValidate(z_streamp strm, int check) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -1572,9 +1507,7 @@ int check; return Z_OK; } -long ZEXPORT inflateMark(strm) -z_streamp strm; -{ +long ZEXPORT inflateMark(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) @@ -1585,9 +1518,7 @@ z_streamp strm; (state->mode == MATCH ? state->was - state->length : 0)); } -unsigned long ZEXPORT inflateCodesUsed(strm) -z_streamp strm; -{ +unsigned long ZEXPORT inflateCodesUsed(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return (unsigned long)-1; state = (struct inflate_state FAR *)strm->state; diff --git a/src/zlib/zlib-1.2.13/inflate.h b/src/zlib/zlib-1.3/inflate.h similarity index 100% rename from src/zlib/zlib-1.2.13/inflate.h rename to src/zlib/zlib-1.3/inflate.h diff --git a/src/zlib/zlib-1.2.13/inftrees.c b/src/zlib/zlib-1.3/inftrees.c similarity index 97% rename from src/zlib/zlib-1.2.13/inftrees.c rename to src/zlib/zlib-1.3/inftrees.c index 57d2793be..8a208c2da 100644 --- a/src/zlib/zlib-1.2.13/inftrees.c +++ b/src/zlib/zlib-1.3/inftrees.c @@ -1,5 +1,5 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2022 Mark Adler + * Copyright (C) 1995-2023 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.13 Copyright 1995-2022 Mark Adler "; + " inflate 1.3 Copyright 1995-2023 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -29,14 +29,9 @@ const char inflate_copyright[] = table index bits. It will differ if the request is greater than the longest code or if it is less than the shortest code. */ -int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work) -codetype type; -unsigned short FAR *lens; -unsigned codes; -code FAR * FAR *table; -unsigned FAR *bits; -unsigned short FAR *work; -{ +int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work) { unsigned len; /* a code's length in bits */ unsigned sym; /* index of code symbols */ unsigned min, max; /* minimum and maximum code lengths */ @@ -62,7 +57,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 194, 65}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 198, 203}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, diff --git a/src/zlib/zlib-1.2.13/inftrees.h b/src/zlib/zlib-1.3/inftrees.h similarity index 92% rename from src/zlib/zlib-1.2.13/inftrees.h rename to src/zlib/zlib-1.3/inftrees.h index f53665311..a10712d8c 100644 --- a/src/zlib/zlib-1.2.13/inftrees.h +++ b/src/zlib/zlib-1.3/inftrees.h @@ -57,6 +57,6 @@ typedef enum { DISTS } codetype; -int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, - unsigned codes, code FAR * FAR *table, - unsigned FAR *bits, unsigned short FAR *work)); +int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work); diff --git a/src/zlib/zlib-1.2.13/make_vms.com b/src/zlib/zlib-1.3/make_vms.com similarity index 100% rename from src/zlib/zlib-1.2.13/make_vms.com rename to src/zlib/zlib-1.3/make_vms.com diff --git a/src/zlib/zlib-1.2.13/msdos/Makefile.bor b/src/zlib/zlib-1.3/msdos/Makefile.bor similarity index 100% rename from src/zlib/zlib-1.2.13/msdos/Makefile.bor rename to src/zlib/zlib-1.3/msdos/Makefile.bor diff --git a/src/zlib/zlib-1.2.13/msdos/Makefile.dj2 b/src/zlib/zlib-1.3/msdos/Makefile.dj2 similarity index 100% rename from src/zlib/zlib-1.2.13/msdos/Makefile.dj2 rename to src/zlib/zlib-1.3/msdos/Makefile.dj2 diff --git a/src/zlib/zlib-1.2.13/msdos/Makefile.emx b/src/zlib/zlib-1.3/msdos/Makefile.emx similarity index 100% rename from src/zlib/zlib-1.2.13/msdos/Makefile.emx rename to src/zlib/zlib-1.3/msdos/Makefile.emx diff --git a/src/zlib/zlib-1.2.13/msdos/Makefile.msc b/src/zlib/zlib-1.3/msdos/Makefile.msc similarity index 100% rename from src/zlib/zlib-1.2.13/msdos/Makefile.msc rename to src/zlib/zlib-1.3/msdos/Makefile.msc diff --git a/src/zlib/zlib-1.2.13/msdos/Makefile.tc b/src/zlib/zlib-1.3/msdos/Makefile.tc similarity index 100% rename from src/zlib/zlib-1.2.13/msdos/Makefile.tc rename to src/zlib/zlib-1.3/msdos/Makefile.tc diff --git a/src/zlib/zlib-1.2.13/nintendods/Makefile b/src/zlib/zlib-1.3/nintendods/Makefile similarity index 100% rename from src/zlib/zlib-1.2.13/nintendods/Makefile rename to src/zlib/zlib-1.3/nintendods/Makefile diff --git a/src/zlib/zlib-1.2.13/nintendods/README b/src/zlib/zlib-1.3/nintendods/README similarity index 100% rename from src/zlib/zlib-1.2.13/nintendods/README rename to src/zlib/zlib-1.3/nintendods/README diff --git a/src/zlib/zlib-1.2.13/old/Makefile.emx b/src/zlib/zlib-1.3/old/Makefile.emx similarity index 100% rename from src/zlib/zlib-1.2.13/old/Makefile.emx rename to src/zlib/zlib-1.3/old/Makefile.emx diff --git a/src/zlib/zlib-1.2.13/old/Makefile.riscos b/src/zlib/zlib-1.3/old/Makefile.riscos similarity index 100% rename from src/zlib/zlib-1.2.13/old/Makefile.riscos rename to src/zlib/zlib-1.3/old/Makefile.riscos diff --git a/src/zlib/zlib-1.2.13/old/README b/src/zlib/zlib-1.3/old/README similarity index 100% rename from src/zlib/zlib-1.2.13/old/README rename to src/zlib/zlib-1.3/old/README diff --git a/src/zlib/zlib-1.2.13/old/descrip.mms b/src/zlib/zlib-1.3/old/descrip.mms similarity index 100% rename from src/zlib/zlib-1.2.13/old/descrip.mms rename to src/zlib/zlib-1.3/old/descrip.mms diff --git a/src/zlib/zlib-1.2.13/old/os2/Makefile.os2 b/src/zlib/zlib-1.3/old/os2/Makefile.os2 similarity index 100% rename from src/zlib/zlib-1.2.13/old/os2/Makefile.os2 rename to src/zlib/zlib-1.3/old/os2/Makefile.os2 diff --git a/src/zlib/zlib-1.2.13/old/os2/zlib.def b/src/zlib/zlib-1.3/old/os2/zlib.def similarity index 100% rename from src/zlib/zlib-1.2.13/old/os2/zlib.def rename to src/zlib/zlib-1.3/old/os2/zlib.def diff --git a/src/zlib/zlib-1.2.13/old/visual-basic.txt b/src/zlib/zlib-1.3/old/visual-basic.txt similarity index 100% rename from src/zlib/zlib-1.2.13/old/visual-basic.txt rename to src/zlib/zlib-1.3/old/visual-basic.txt diff --git a/src/zlib/zlib-1.2.13/os400/README400 b/src/zlib/zlib-1.3/os400/README400 similarity index 96% rename from src/zlib/zlib-1.2.13/os400/README400 rename to src/zlib/zlib-1.3/os400/README400 index c06fa8459..6dd41aa65 100644 --- a/src/zlib/zlib-1.2.13/os400/README400 +++ b/src/zlib/zlib-1.3/os400/README400 @@ -1,4 +1,4 @@ - ZLIB version 1.2.13 for OS/400 installation instructions + ZLIB version 1.3.0 for OS/400 installation instructions 1) Download and unpack the zlib tarball to some IFS directory. (i.e.: /path/to/the/zlib/ifs/source/directory) diff --git a/src/zlib/zlib-1.2.13/os400/bndsrc b/src/zlib/zlib-1.3/os400/bndsrc similarity index 100% rename from src/zlib/zlib-1.2.13/os400/bndsrc rename to src/zlib/zlib-1.3/os400/bndsrc diff --git a/src/zlib/zlib-1.2.13/os400/make.sh b/src/zlib/zlib-1.3/os400/make.sh similarity index 100% rename from src/zlib/zlib-1.2.13/os400/make.sh rename to src/zlib/zlib-1.3/os400/make.sh diff --git a/src/zlib/zlib-1.2.13/os400/zlib.inc b/src/zlib/zlib-1.3/os400/zlib.inc similarity index 99% rename from src/zlib/zlib-1.2.13/os400/zlib.inc rename to src/zlib/zlib-1.3/os400/zlib.inc index c273c863c..0d9e2f209 100644 --- a/src/zlib/zlib-1.2.13/os400/zlib.inc +++ b/src/zlib/zlib-1.3/os400/zlib.inc @@ -1,7 +1,7 @@ * ZLIB.INC - Interface to the general purpose compression library * * ILE RPG400 version by Patrick Monnerat, DATASPHERE. - * Version 1.2.13 + * Version 1.3.0 * * * WARNING: @@ -22,12 +22,12 @@ * * Versioning information. * - D ZLIB_VERSION C '1.2.13' + D ZLIB_VERSION C '1.3.0' D ZLIB_VERNUM C X'12a0' D ZLIB_VER_MAJOR C 1 - D ZLIB_VER_MINOR C 2 + D ZLIB_VER_MINOR C 3 D ZLIB_VER_REVISION... - D C 13 + D C 0 D ZLIB_VER_SUBREVISION... D C 0 * diff --git a/src/zlib/zlib-1.2.13/qnx/package.qpg b/src/zlib/zlib-1.3/qnx/package.qpg similarity index 94% rename from src/zlib/zlib-1.2.13/qnx/package.qpg rename to src/zlib/zlib-1.3/qnx/package.qpg index ba2f1a2d6..d882af2bf 100644 --- a/src/zlib/zlib-1.2.13/qnx/package.qpg +++ b/src/zlib/zlib-1.3/qnx/package.qpg @@ -25,10 +25,10 @@ - - - - + + + + @@ -63,7 +63,7 @@ - 1.2.13 + 1.3.0 Medium Stable diff --git a/src/zlib/zlib-1.2.13/test/example.c b/src/zlib/zlib-1.3/test/example.c similarity index 84% rename from src/zlib/zlib-1.2.13/test/example.c rename to src/zlib/zlib-1.3/test/example.c index 1470bc842..582a17a3c 100644 --- a/src/zlib/zlib-1.2.13/test/example.c +++ b/src/zlib/zlib-1.3/test/example.c @@ -34,37 +34,14 @@ static z_const char hello[] = "hello, hello!"; static const char dictionary[] = "hello"; static uLong dictId; /* Adler32 value of the dictionary */ -void test_deflate OF((Byte *compr, uLong comprLen)); -void test_inflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_large_deflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_large_inflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_flush OF((Byte *compr, uLong *comprLen)); -void test_sync OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_dict_deflate OF((Byte *compr, uLong comprLen)); -void test_dict_inflate OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -int main OF((int argc, char *argv[])); - - #ifdef Z_SOLO -void *myalloc OF((void *, unsigned, unsigned)); -void myfree OF((void *, void *)); - -void *myalloc(q, n, m) - void *q; - unsigned n, m; -{ +void *myalloc(void *q, unsigned n, unsigned m) { (void)q; return calloc(n, m); } -void myfree(void *q, void *p) -{ +void myfree(void *q, void *p) { (void)q; free(p); } @@ -77,18 +54,11 @@ static free_func zfree = myfree; static alloc_func zalloc = (alloc_func)0; static free_func zfree = (free_func)0; -void test_compress OF((Byte *compr, uLong comprLen, - Byte *uncompr, uLong uncomprLen)); -void test_gzio OF((const char *fname, - Byte *uncompr, uLong uncomprLen)); - /* =========================================================================== * Test compress() and uncompress() */ -void test_compress(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ +void test_compress(Byte *compr, uLong comprLen, Byte *uncompr, + uLong uncomprLen) { int err; uLong len = (uLong)strlen(hello)+1; @@ -111,11 +81,7 @@ void test_compress(compr, comprLen, uncompr, uncomprLen) /* =========================================================================== * Test read/write of .gz files */ -void test_gzio(fname, uncompr, uncomprLen) - const char *fname; /* compressed file name */ - Byte *uncompr; - uLong uncomprLen; -{ +void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen) { #ifdef NO_GZCOMPRESS fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n"); #else @@ -197,10 +163,7 @@ void test_gzio(fname, uncompr, uncomprLen) /* =========================================================================== * Test deflate() with small buffers */ -void test_deflate(compr, comprLen) - Byte *compr; - uLong comprLen; -{ +void test_deflate(Byte *compr, uLong comprLen) { z_stream c_stream; /* compression stream */ int err; uLong len = (uLong)strlen(hello)+1; @@ -235,10 +198,8 @@ void test_deflate(compr, comprLen) /* =========================================================================== * Test inflate() with small buffers */ -void test_inflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ +void test_inflate(Byte *compr, uLong comprLen, Byte *uncompr, + uLong uncomprLen) { int err; z_stream d_stream; /* decompression stream */ @@ -276,10 +237,8 @@ void test_inflate(compr, comprLen, uncompr, uncomprLen) /* =========================================================================== * Test deflate() with large buffers and dynamic change of compression level */ -void test_large_deflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ +void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr, + uLong uncomprLen) { z_stream c_stream; /* compression stream */ int err; @@ -308,7 +267,7 @@ void test_large_deflate(compr, comprLen, uncompr, uncomprLen) /* Feed in already compressed data and switch to no compression: */ deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY); c_stream.next_in = compr; - c_stream.avail_in = (uInt)comprLen/2; + c_stream.avail_in = (uInt)uncomprLen/2; err = deflate(&c_stream, Z_NO_FLUSH); CHECK_ERR(err, "deflate"); @@ -331,10 +290,8 @@ void test_large_deflate(compr, comprLen, uncompr, uncomprLen) /* =========================================================================== * Test inflate() with large buffers */ -void test_large_inflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ +void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr, + uLong uncomprLen) { int err; z_stream d_stream; /* decompression stream */ @@ -361,7 +318,7 @@ void test_large_inflate(compr, comprLen, uncompr, uncomprLen) err = inflateEnd(&d_stream); CHECK_ERR(err, "inflateEnd"); - if (d_stream.total_out != 2*uncomprLen + comprLen/2) { + if (d_stream.total_out != 2*uncomprLen + uncomprLen/2) { fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out); exit(1); } else { @@ -372,10 +329,7 @@ void test_large_inflate(compr, comprLen, uncompr, uncomprLen) /* =========================================================================== * Test deflate() with full flush */ -void test_flush(compr, comprLen) - Byte *compr; - uLong *comprLen; -{ +void test_flush(Byte *compr, uLong *comprLen) { z_stream c_stream; /* compression stream */ int err; uInt len = (uInt)strlen(hello)+1; @@ -410,10 +364,7 @@ void test_flush(compr, comprLen) /* =========================================================================== * Test inflateSync() */ -void test_sync(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ +void test_sync(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen) { int err; z_stream d_stream; /* decompression stream */ @@ -453,10 +404,7 @@ void test_sync(compr, comprLen, uncompr, uncomprLen) /* =========================================================================== * Test deflate() with preset dictionary */ -void test_dict_deflate(compr, comprLen) - Byte *compr; - uLong comprLen; -{ +void test_dict_deflate(Byte *compr, uLong comprLen) { z_stream c_stream; /* compression stream */ int err; @@ -490,10 +438,8 @@ void test_dict_deflate(compr, comprLen) /* =========================================================================== * Test inflate() with a preset dictionary */ -void test_dict_inflate(compr, comprLen, uncompr, uncomprLen) - Byte *compr, *uncompr; - uLong comprLen, uncomprLen; -{ +void test_dict_inflate(Byte *compr, uLong comprLen, Byte *uncompr, + uLong uncomprLen) { int err; z_stream d_stream; /* decompression stream */ @@ -541,13 +487,10 @@ void test_dict_inflate(compr, comprLen, uncompr, uncomprLen) * Usage: example [output.gz [input.gz]] */ -int main(argc, argv) - int argc; - char *argv[]; -{ +int main(int argc, char *argv[]) { Byte *compr, *uncompr; - uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */ - uLong uncomprLen = comprLen; + uLong uncomprLen = 20000; + uLong comprLen = 3 * uncomprLen; static const char* myVersion = ZLIB_VERSION; if (zlibVersion()[0] != myVersion[0]) { @@ -590,7 +533,7 @@ int main(argc, argv) test_flush(compr, &comprLen); test_sync(compr, comprLen, uncompr, uncomprLen); - comprLen = uncomprLen; + comprLen = 3 * uncomprLen; test_dict_deflate(compr, comprLen); test_dict_inflate(compr, comprLen, uncompr, uncomprLen); diff --git a/src/zlib/zlib-1.2.13/test/infcover.c b/src/zlib/zlib-1.3/test/infcover.c similarity index 99% rename from src/zlib/zlib-1.2.13/test/infcover.c rename to src/zlib/zlib-1.3/test/infcover.c index 2be01646c..8912c403d 100644 --- a/src/zlib/zlib-1.2.13/test/infcover.c +++ b/src/zlib/zlib-1.3/test/infcover.c @@ -373,7 +373,7 @@ local void cover_support(void) mem_setup(&strm); strm.avail_in = 0; strm.next_in = Z_NULL; - ret = inflateInit_(&strm, ZLIB_VERSION - 1, (int)sizeof(z_stream)); + ret = inflateInit_(&strm, "!", (int)sizeof(z_stream)); assert(ret == Z_VERSION_ERROR); mem_done(&strm, "wrong version"); @@ -462,7 +462,8 @@ local unsigned pull(void *desc, unsigned char **buf) local int push(void *desc, unsigned char *buf, unsigned len) { - buf += len; + (void)buf; + (void)len; return desc != Z_NULL; /* force error if desc not null */ } diff --git a/src/zlib/zlib-1.2.13/test/minigzip.c b/src/zlib/zlib-1.3/test/minigzip.c similarity index 88% rename from src/zlib/zlib-1.2.13/test/minigzip.c rename to src/zlib/zlib-1.3/test/minigzip.c index a649d2b3d..8a21ddfb5 100644 --- a/src/zlib/zlib-1.2.13/test/minigzip.c +++ b/src/zlib/zlib-1.3/test/minigzip.c @@ -59,7 +59,7 @@ #if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE) #ifndef WIN32 /* unlink already in stdio.h for WIN32 */ - extern int unlink OF((const char *)); + extern int unlink(const char *); #endif #endif @@ -149,20 +149,12 @@ static void pwinerror (s) # include /* for unlink() */ #endif -void *myalloc OF((void *, unsigned, unsigned)); -void myfree OF((void *, void *)); - -void *myalloc(q, n, m) - void *q; - unsigned n, m; -{ +void *myalloc(void *q, unsigned n, unsigned m) { (void)q; return calloc(n, m); } -void myfree(q, p) - void *q, *p; -{ +void myfree(void *q, void *p) { (void)q; free(p); } @@ -175,29 +167,7 @@ typedef struct gzFile_s { z_stream strm; } *gzFile; -gzFile gzopen OF((const char *, const char *)); -gzFile gzdopen OF((int, const char *)); -gzFile gz_open OF((const char *, int, const char *)); - -gzFile gzopen(path, mode) -const char *path; -const char *mode; -{ - return gz_open(path, -1, mode); -} - -gzFile gzdopen(fd, mode) -int fd; -const char *mode; -{ - return gz_open(NULL, fd, mode); -} - -gzFile gz_open(path, fd, mode) - const char *path; - int fd; - const char *mode; -{ +gzFile gz_open(const char *path, int fd, const char *mode) { gzFile gz; int ret; @@ -231,13 +201,15 @@ gzFile gz_open(path, fd, mode) return gz; } -int gzwrite OF((gzFile, const void *, unsigned)); +gzFile gzopen(const char *path, const char *mode) { + return gz_open(path, -1, mode); +} -int gzwrite(gz, buf, len) - gzFile gz; - const void *buf; - unsigned len; -{ +gzFile gzdopen(int fd, const char *mode) { + return gz_open(NULL, fd, mode); +} + +int gzwrite(gzFile gz, const void *buf, unsigned len) { z_stream *strm; unsigned char out[BUFLEN]; @@ -255,13 +227,7 @@ int gzwrite(gz, buf, len) return len; } -int gzread OF((gzFile, void *, unsigned)); - -int gzread(gz, buf, len) - gzFile gz; - void *buf; - unsigned len; -{ +int gzread(gzFile gz, void *buf, unsigned len) { int ret; unsigned got; unsigned char in[1]; @@ -292,11 +258,7 @@ int gzread(gz, buf, len) return len - strm->avail_out; } -int gzclose OF((gzFile)); - -int gzclose(gz) - gzFile gz; -{ +int gzclose(gzFile gz) { z_stream *strm; unsigned char out[BUFLEN]; @@ -321,12 +283,7 @@ int gzclose(gz) return Z_OK; } -const char *gzerror OF((gzFile, int *)); - -const char *gzerror(gz, err) - gzFile gz; - int *err; -{ +const char *gzerror(gzFile gz, int *err) { *err = gz->err; return gz->msg; } @@ -335,67 +292,20 @@ const char *gzerror(gz, err) static char *prog; -void error OF((const char *msg)); -void gz_compress OF((FILE *in, gzFile out)); -#ifdef USE_MMAP -int gz_compress_mmap OF((FILE *in, gzFile out)); -#endif -void gz_uncompress OF((gzFile in, FILE *out)); -void file_compress OF((char *file, char *mode)); -void file_uncompress OF((char *file)); -int main OF((int argc, char *argv[])); - /* =========================================================================== * Display error message and exit */ -void error(msg) - const char *msg; -{ +void error(const char *msg) { fprintf(stderr, "%s: %s\n", prog, msg); exit(1); } -/* =========================================================================== - * Compress input to output then close both files. - */ - -void gz_compress(in, out) - FILE *in; - gzFile out; -{ - local char buf[BUFLEN]; - int len; - int err; - -#ifdef USE_MMAP - /* Try first compressing with mmap. If mmap fails (minigzip used in a - * pipe), use the normal fread loop. - */ - if (gz_compress_mmap(in, out) == Z_OK) return; -#endif - for (;;) { - len = (int)fread(buf, 1, sizeof(buf), in); - if (ferror(in)) { - perror("fread"); - exit(1); - } - if (len == 0) break; - - if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err)); - } - fclose(in); - if (gzclose(out) != Z_OK) error("failed gzclose"); -} - #ifdef USE_MMAP /* MMAP version, Miguel Albrecht */ /* Try compressing the input file at once using mmap. Return Z_OK if * if success, Z_ERRNO otherwise. */ -int gz_compress_mmap(in, out) - FILE *in; - gzFile out; -{ +int gz_compress_mmap(FILE *in, gzFile out) { int len; int err; int ifd = fileno(in); @@ -424,13 +334,39 @@ int gz_compress_mmap(in, out) } #endif /* USE_MMAP */ +/* =========================================================================== + * Compress input to output then close both files. + */ + +void gz_compress(FILE *in, gzFile out) { + local char buf[BUFLEN]; + int len; + int err; + +#ifdef USE_MMAP + /* Try first compressing with mmap. If mmap fails (minigzip used in a + * pipe), use the normal fread loop. + */ + if (gz_compress_mmap(in, out) == Z_OK) return; +#endif + for (;;) { + len = (int)fread(buf, 1, sizeof(buf), in); + if (ferror(in)) { + perror("fread"); + exit(1); + } + if (len == 0) break; + + if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err)); + } + fclose(in); + if (gzclose(out) != Z_OK) error("failed gzclose"); +} + /* =========================================================================== * Uncompress input to output then close both files. */ -void gz_uncompress(in, out) - gzFile in; - FILE *out; -{ +void gz_uncompress(gzFile in, FILE *out) { local char buf[BUFLEN]; int len; int err; @@ -454,10 +390,7 @@ void gz_uncompress(in, out) * Compress the given file: create a corresponding .gz file and remove the * original. */ -void file_compress(file, mode) - char *file; - char *mode; -{ +void file_compress(char *file, char *mode) { local char outfile[MAX_NAME_LEN]; FILE *in; gzFile out; @@ -493,9 +426,7 @@ void file_compress(file, mode) /* =========================================================================== * Uncompress the given file and remove the original. */ -void file_uncompress(file) - char *file; -{ +void file_uncompress(char *file) { local char buf[MAX_NAME_LEN]; char *infile, *outfile; FILE *out; @@ -553,10 +484,7 @@ void file_uncompress(file) * -1 to -9 : compression level */ -int main(argc, argv) - int argc; - char *argv[]; -{ +int main(int argc, char *argv[]) { int copyout = 0; int uncompr = 0; gzFile file; diff --git a/src/zlib/zlib-1.2.13/treebuild.xml b/src/zlib/zlib-1.3/treebuild.xml similarity index 96% rename from src/zlib/zlib-1.2.13/treebuild.xml rename to src/zlib/zlib-1.3/treebuild.xml index 0017a45d3..1d1b00770 100644 --- a/src/zlib/zlib-1.2.13/treebuild.xml +++ b/src/zlib/zlib-1.3/treebuild.xml @@ -1,6 +1,6 @@ - - + + zip compression library diff --git a/src/zlib/zlib-1.2.13/trees.c b/src/zlib/zlib-1.3/trees.c similarity index 90% rename from src/zlib/zlib-1.2.13/trees.c rename to src/zlib/zlib-1.3/trees.c index 5f305c472..8dbdc40ba 100644 --- a/src/zlib/zlib-1.2.13/trees.c +++ b/src/zlib/zlib-1.3/trees.c @@ -122,39 +122,116 @@ struct static_tree_desc_s { int max_length; /* max bit length for the codes */ }; -local const static_tree_desc static_l_desc = +#ifdef NO_INIT_GLOBAL_POINTERS +# define TCONST +#else +# define TCONST const +#endif + +local TCONST static_tree_desc static_l_desc = {static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; -local const static_tree_desc static_d_desc = +local TCONST static_tree_desc static_d_desc = {static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; -local const static_tree_desc static_bl_desc = +local TCONST static_tree_desc static_bl_desc = {(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; /* =========================================================================== - * Local (static) routines in this file. + * Output a short LSB first on the stream. + * IN assertion: there is enough room in pendingBuf. + */ +#define put_short(s, w) { \ + put_byte(s, (uch)((w) & 0xff)); \ + put_byte(s, (uch)((ush)(w) >> 8)); \ +} + +/* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 */ +local unsigned bi_reverse(unsigned code, int len) { + register unsigned res = 0; + do { + res |= code & 1; + code >>= 1, res <<= 1; + } while (--len > 0); + return res >> 1; +} -local void tr_static_init OF((void)); -local void init_block OF((deflate_state *s)); -local void pqdownheap OF((deflate_state *s, ct_data *tree, int k)); -local void gen_bitlen OF((deflate_state *s, tree_desc *desc)); -local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count)); -local void build_tree OF((deflate_state *s, tree_desc *desc)); -local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code)); -local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); -local int build_bl_tree OF((deflate_state *s)); -local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, - int blcodes)); -local void compress_block OF((deflate_state *s, const ct_data *ltree, - const ct_data *dtree)); -local int detect_data_type OF((deflate_state *s)); -local unsigned bi_reverse OF((unsigned code, int len)); -local void bi_windup OF((deflate_state *s)); -local void bi_flush OF((deflate_state *s)); +/* =========================================================================== + * Flush the bit buffer, keeping at most 7 bits in it. + */ +local void bi_flush(deflate_state *s) { + if (s->bi_valid == 16) { + put_short(s, s->bi_buf); + s->bi_buf = 0; + s->bi_valid = 0; + } else if (s->bi_valid >= 8) { + put_byte(s, (Byte)s->bi_buf); + s->bi_buf >>= 8; + s->bi_valid -= 8; + } +} + +/* =========================================================================== + * Flush the bit buffer and align the output on a byte boundary + */ +local void bi_windup(deflate_state *s) { + if (s->bi_valid > 8) { + put_short(s, s->bi_buf); + } else if (s->bi_valid > 0) { + put_byte(s, (Byte)s->bi_buf); + } + s->bi_buf = 0; + s->bi_valid = 0; +#ifdef ZLIB_DEBUG + s->bits_sent = (s->bits_sent + 7) & ~7; +#endif +} + +/* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ +local void gen_codes(ct_data *tree, int max_code, ushf *bl_count) { + ush next_code[MAX_BITS+1]; /* next code value for each bit length */ + unsigned code = 0; /* running code value */ + int bits; /* bit index */ + int n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS; bits++) { + code = (code + bl_count[bits - 1]) << 1; + next_code[bits] = (ush)code; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + Assert (code + bl_count[MAX_BITS] - 1 == (1 << MAX_BITS) - 1, + "inconsistent bit counts"); + Tracev((stderr,"\ngen_codes: max_code %d ", max_code)); + + for (n = 0; n <= max_code; n++) { + int len = tree[n].Len; + if (len == 0) continue; + /* Now reverse the bits */ + tree[n].Code = (ush)bi_reverse(next_code[len]++, len); + + Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ", + n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len] - 1)); + } +} #ifdef GEN_TREES_H -local void gen_trees_header OF((void)); +local void gen_trees_header(void); #endif #ifndef ZLIB_DEBUG @@ -167,27 +244,12 @@ local void gen_trees_header OF((void)); send_bits(s, tree[c].Code, tree[c].Len); } #endif -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -#define put_short(s, w) { \ - put_byte(s, (uch)((w) & 0xff)); \ - put_byte(s, (uch)((ush)(w) >> 8)); \ -} - /* =========================================================================== * Send a value on a given number of bits. * IN assertion: length <= 16 and value fits in length bits. */ #ifdef ZLIB_DEBUG -local void send_bits OF((deflate_state *s, int value, int length)); - -local void send_bits(s, value, length) - deflate_state *s; - int value; /* value to send */ - int length; /* number of bits */ -{ +local void send_bits(deflate_state *s, int value, int length) { Tracevv((stderr," l %2d v %4x ", length, value)); Assert(length > 0 && length <= 15, "invalid length"); s->bits_sent += (ulg)length; @@ -229,8 +291,7 @@ local void send_bits(s, value, length) /* =========================================================================== * Initialize the various 'constant' tables. */ -local void tr_static_init() -{ +local void tr_static_init(void) { #if defined(GEN_TREES_H) || !defined(STDC) static int static_init_done = 0; int n; /* iterates over tree elements */ @@ -323,8 +384,7 @@ local void tr_static_init() ((i) == (last)? "\n};\n\n" : \ ((i) % (width) == (width) - 1 ? ",\n" : ", ")) -void gen_trees_header() -{ +void gen_trees_header(void) { FILE *header = fopen("trees.h", "w"); int i; @@ -373,12 +433,26 @@ void gen_trees_header() } #endif /* GEN_TREES_H */ +/* =========================================================================== + * Initialize a new block. + */ +local void init_block(deflate_state *s) { + int n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; + for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; + for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; + + s->dyn_ltree[END_BLOCK].Freq = 1; + s->opt_len = s->static_len = 0L; + s->sym_next = s->matches = 0; +} + /* =========================================================================== * Initialize the tree data structures for a new zlib stream. */ -void ZLIB_INTERNAL _tr_init(s) - deflate_state *s; -{ +void ZLIB_INTERNAL _tr_init(deflate_state *s) { tr_static_init(); s->l_desc.dyn_tree = s->dyn_ltree; @@ -401,24 +475,6 @@ void ZLIB_INTERNAL _tr_init(s) init_block(s); } -/* =========================================================================== - * Initialize a new block. - */ -local void init_block(s) - deflate_state *s; -{ - int n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; - for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; - for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; - - s->dyn_ltree[END_BLOCK].Freq = 1; - s->opt_len = s->static_len = 0L; - s->sym_next = s->matches = 0; -} - #define SMALLEST 1 /* Index within the heap array of least frequent node in the Huffman tree */ @@ -448,11 +504,7 @@ local void init_block(s) * when the heap property is re-established (each father smaller than its * two sons). */ -local void pqdownheap(s, tree, k) - deflate_state *s; - ct_data *tree; /* the tree to restore */ - int k; /* node to move down */ -{ +local void pqdownheap(deflate_state *s, ct_data *tree, int k) { int v = s->heap[k]; int j = k << 1; /* left son of k */ while (j <= s->heap_len) { @@ -483,10 +535,7 @@ local void pqdownheap(s, tree, k) * The length opt_len is updated; static_len is also updated if stree is * not null. */ -local void gen_bitlen(s, desc) - deflate_state *s; - tree_desc *desc; /* the tree descriptor */ -{ +local void gen_bitlen(deflate_state *s, tree_desc *desc) { ct_data *tree = desc->dyn_tree; int max_code = desc->max_code; const ct_data *stree = desc->stat_desc->static_tree; @@ -561,48 +610,9 @@ local void gen_bitlen(s, desc) } } -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -local void gen_codes(tree, max_code, bl_count) - ct_data *tree; /* the tree to decorate */ - int max_code; /* largest code with non zero frequency */ - ushf *bl_count; /* number of codes at each bit length */ -{ - ush next_code[MAX_BITS+1]; /* next code value for each bit length */ - unsigned code = 0; /* running code value */ - int bits; /* bit index */ - int n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - code = (code + bl_count[bits - 1]) << 1; - next_code[bits] = (ush)code; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - Assert (code + bl_count[MAX_BITS] - 1 == (1 << MAX_BITS) - 1, - "inconsistent bit counts"); - Tracev((stderr,"\ngen_codes: max_code %d ", max_code)); - - for (n = 0; n <= max_code; n++) { - int len = tree[n].Len; - if (len == 0) continue; - /* Now reverse the bits */ - tree[n].Code = (ush)bi_reverse(next_code[len]++, len); - - Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ", - n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len] - 1)); - } -} +#ifdef DUMP_BL_TREE +# include +#endif /* =========================================================================== * Construct one Huffman tree and assigns the code bit strings and lengths. @@ -612,10 +622,7 @@ local void gen_codes(tree, max_code, bl_count) * and corresponding code. The length opt_len is updated; static_len is * also updated if stree is not null. The field max_code is set. */ -local void build_tree(s, desc) - deflate_state *s; - tree_desc *desc; /* the tree descriptor */ -{ +local void build_tree(deflate_state *s, tree_desc *desc) { ct_data *tree = desc->dyn_tree; const ct_data *stree = desc->stat_desc->static_tree; int elems = desc->stat_desc->elems; @@ -700,11 +707,7 @@ local void build_tree(s, desc) * Scan a literal or distance tree to determine the frequencies of the codes * in the bit length tree. */ -local void scan_tree(s, tree, max_code) - deflate_state *s; - ct_data *tree; /* the tree to be scanned */ - int max_code; /* and its largest code of non zero frequency */ -{ +local void scan_tree(deflate_state *s, ct_data *tree, int max_code) { int n; /* iterates over all tree elements */ int prevlen = -1; /* last emitted length */ int curlen; /* length of current code */ @@ -745,11 +748,7 @@ local void scan_tree(s, tree, max_code) * Send a literal or distance tree in compressed form, using the codes in * bl_tree. */ -local void send_tree(s, tree, max_code) - deflate_state *s; - ct_data *tree; /* the tree to be scanned */ - int max_code; /* and its largest code of non zero frequency */ -{ +local void send_tree(deflate_state *s, ct_data *tree, int max_code) { int n; /* iterates over all tree elements */ int prevlen = -1; /* last emitted length */ int curlen; /* length of current code */ @@ -796,9 +795,7 @@ local void send_tree(s, tree, max_code) * Construct the Huffman tree for the bit lengths and return the index in * bl_order of the last bit length code to send. */ -local int build_bl_tree(s) - deflate_state *s; -{ +local int build_bl_tree(deflate_state *s) { int max_blindex; /* index of last bit length code of non zero freq */ /* Determine the bit length frequencies for literal and distance trees */ @@ -831,10 +828,8 @@ local int build_bl_tree(s) * lengths of the bit length codes, the literal tree and the distance tree. * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. */ -local void send_all_trees(s, lcodes, dcodes, blcodes) - deflate_state *s; - int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ +local void send_all_trees(deflate_state *s, int lcodes, int dcodes, + int blcodes) { int rank; /* index in bl_order */ Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); @@ -860,12 +855,8 @@ local void send_all_trees(s, lcodes, dcodes, blcodes) /* =========================================================================== * Send a stored block */ -void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last) - deflate_state *s; - charf *buf; /* input block */ - ulg stored_len; /* length of input block */ - int last; /* one if this is the last block for a file */ -{ +void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf, + ulg stored_len, int last) { send_bits(s, (STORED_BLOCK<<1) + last, 3); /* send block type */ bi_windup(s); /* align on byte boundary */ put_short(s, (ush)stored_len); @@ -884,9 +875,7 @@ void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last) /* =========================================================================== * Flush the bits in the bit buffer to pending output (leaves at most 7 bits) */ -void ZLIB_INTERNAL _tr_flush_bits(s) - deflate_state *s; -{ +void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s) { bi_flush(s); } @@ -894,9 +883,7 @@ void ZLIB_INTERNAL _tr_flush_bits(s) * Send one empty static block to give enough lookahead for inflate. * This takes 10 bits, of which 7 may remain in the bit buffer. */ -void ZLIB_INTERNAL _tr_align(s) - deflate_state *s; -{ +void ZLIB_INTERNAL _tr_align(deflate_state *s) { send_bits(s, STATIC_TREES<<1, 3); send_code(s, END_BLOCK, static_ltree); #ifdef ZLIB_DEBUG @@ -905,16 +892,99 @@ void ZLIB_INTERNAL _tr_align(s) bi_flush(s); } +/* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ +local void compress_block(deflate_state *s, const ct_data *ltree, + const ct_data *dtree) { + unsigned dist; /* distance of matched string */ + int lc; /* match length or unmatched char (if dist == 0) */ + unsigned sx = 0; /* running index in sym_buf */ + unsigned code; /* the code to send */ + int extra; /* number of extra bits to send */ + + if (s->sym_next != 0) do { + dist = s->sym_buf[sx++] & 0xff; + dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8; + lc = s->sym_buf[sx++]; + if (dist == 0) { + send_code(s, lc, ltree); /* send a literal byte */ + Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = _length_code[lc]; + send_code(s, code + LITERALS + 1, ltree); /* send length code */ + extra = extra_lbits[code]; + if (extra != 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); /* send the extra length bits */ + } + dist--; /* dist is now the match distance - 1 */ + code = d_code(dist); + Assert (code < D_CODES, "bad d_code"); + + send_code(s, code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra != 0) { + dist -= (unsigned)base_dist[code]; + send_bits(s, dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + + /* Check that the overlay between pending_buf and sym_buf is ok: */ + Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow"); + + } while (sx < s->sym_next); + + send_code(s, END_BLOCK, ltree); +} + +/* =========================================================================== + * Check if the data type is TEXT or BINARY, using the following algorithm: + * - TEXT if the two conditions below are satisfied: + * a) There are no non-portable control characters belonging to the + * "block list" (0..6, 14..25, 28..31). + * b) There is at least one printable character belonging to the + * "allow list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). + * - BINARY otherwise. + * - The following partially-portable control characters form a + * "gray list" that is ignored in this detection algorithm: + * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). + * IN assertion: the fields Freq of dyn_ltree are set. + */ +local int detect_data_type(deflate_state *s) { + /* block_mask is the bit mask of block-listed bytes + * set bits 0..6, 14..25, and 28..31 + * 0xf3ffc07f = binary 11110011111111111100000001111111 + */ + unsigned long block_mask = 0xf3ffc07fUL; + int n; + + /* Check for non-textual ("block-listed") bytes. */ + for (n = 0; n <= 31; n++, block_mask >>= 1) + if ((block_mask & 1) && (s->dyn_ltree[n].Freq != 0)) + return Z_BINARY; + + /* Check for textual ("allow-listed") bytes. */ + if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0 + || s->dyn_ltree[13].Freq != 0) + return Z_TEXT; + for (n = 32; n < LITERALS; n++) + if (s->dyn_ltree[n].Freq != 0) + return Z_TEXT; + + /* There are no "block-listed" or "allow-listed" bytes: + * this stream either is empty or has tolerated ("gray-listed") bytes only. + */ + return Z_BINARY; +} + /* =========================================================================== * Determine the best encoding for the current block: dynamic trees, static * trees or store, and write out the encoded block. */ -void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) - deflate_state *s; - charf *buf; /* input block, or NULL if too old */ - ulg stored_len; /* length of input block */ - int last; /* one if this is the last block for a file */ -{ +void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, + ulg stored_len, int last) { ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ int max_blindex = 0; /* index of last bit length code of non zero freq */ @@ -1011,11 +1081,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) * Save the match info and tally the frequency counts. Return true if * the current block must be flushed. */ -int ZLIB_INTERNAL _tr_tally(s, dist, lc) - deflate_state *s; - unsigned dist; /* distance of matched string */ - unsigned lc; /* match length - MIN_MATCH or unmatched char (dist==0) */ -{ +int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc) { s->sym_buf[s->sym_next++] = (uch)dist; s->sym_buf[s->sym_next++] = (uch)(dist >> 8); s->sym_buf[s->sym_next++] = (uch)lc; @@ -1035,147 +1101,3 @@ int ZLIB_INTERNAL _tr_tally(s, dist, lc) } return (s->sym_next == s->sym_end); } - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -local void compress_block(s, ltree, dtree) - deflate_state *s; - const ct_data *ltree; /* literal tree */ - const ct_data *dtree; /* distance tree */ -{ - unsigned dist; /* distance of matched string */ - int lc; /* match length or unmatched char (if dist == 0) */ - unsigned sx = 0; /* running index in sym_buf */ - unsigned code; /* the code to send */ - int extra; /* number of extra bits to send */ - - if (s->sym_next != 0) do { - dist = s->sym_buf[sx++] & 0xff; - dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8; - lc = s->sym_buf[sx++]; - if (dist == 0) { - send_code(s, lc, ltree); /* send a literal byte */ - Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send length code */ - extra = extra_lbits[code]; - if (extra != 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra != 0) { - dist -= (unsigned)base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and sym_buf is ok: */ - Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow"); - - } while (sx < s->sym_next); - - send_code(s, END_BLOCK, ltree); -} - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "block list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "allow list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -local int detect_data_type(s) - deflate_state *s; -{ - /* block_mask is the bit mask of block-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - unsigned long block_mask = 0xf3ffc07fUL; - int n; - - /* Check for non-textual ("block-listed") bytes. */ - for (n = 0; n <= 31; n++, block_mask >>= 1) - if ((block_mask & 1) && (s->dyn_ltree[n].Freq != 0)) - return Z_BINARY; - - /* Check for textual ("allow-listed") bytes. */ - if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0 - || s->dyn_ltree[13].Freq != 0) - return Z_TEXT; - for (n = 32; n < LITERALS; n++) - if (s->dyn_ltree[n].Freq != 0) - return Z_TEXT; - - /* There are no "block-listed" or "allow-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -local unsigned bi_reverse(code, len) - unsigned code; /* the value to invert */ - int len; /* its bit length */ -{ - register unsigned res = 0; - do { - res |= code & 1; - code >>= 1, res <<= 1; - } while (--len > 0); - return res >> 1; -} - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -local void bi_flush(s) - deflate_state *s; -{ - if (s->bi_valid == 16) { - put_short(s, s->bi_buf); - s->bi_buf = 0; - s->bi_valid = 0; - } else if (s->bi_valid >= 8) { - put_byte(s, (Byte)s->bi_buf); - s->bi_buf >>= 8; - s->bi_valid -= 8; - } -} - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -local void bi_windup(s) - deflate_state *s; -{ - if (s->bi_valid > 8) { - put_short(s, s->bi_buf); - } else if (s->bi_valid > 0) { - put_byte(s, (Byte)s->bi_buf); - } - s->bi_buf = 0; - s->bi_valid = 0; -#ifdef ZLIB_DEBUG - s->bits_sent = (s->bits_sent + 7) & ~7; -#endif -} diff --git a/src/zlib/zlib-1.2.13/trees.h b/src/zlib/zlib-1.3/trees.h similarity index 100% rename from src/zlib/zlib-1.2.13/trees.h rename to src/zlib/zlib-1.3/trees.h diff --git a/src/zlib/zlib-1.2.13/uncompr.c b/src/zlib/zlib-1.3/uncompr.c similarity index 90% rename from src/zlib/zlib-1.2.13/uncompr.c rename to src/zlib/zlib-1.3/uncompr.c index f9532f46c..5e256663b 100644 --- a/src/zlib/zlib-1.2.13/uncompr.c +++ b/src/zlib/zlib-1.3/uncompr.c @@ -24,12 +24,8 @@ Z_DATA_ERROR if the input data was corrupted, including if the input data is an incomplete zlib stream. */ -int ZEXPORT uncompress2(dest, destLen, source, sourceLen) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong *sourceLen; -{ +int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen, const Bytef *source, + uLong *sourceLen) { z_stream stream; int err; const uInt max = (uInt)-1; @@ -83,11 +79,7 @@ int ZEXPORT uncompress2(dest, destLen, source, sourceLen) err; } -int ZEXPORT uncompress(dest, destLen, source, sourceLen) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; -{ +int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, + uLong sourceLen) { return uncompress2(dest, destLen, source, &sourceLen); } diff --git a/src/zlib/zlib-1.2.13/watcom/watcom_f.mak b/src/zlib/zlib-1.3/watcom/watcom_f.mak similarity index 100% rename from src/zlib/zlib-1.2.13/watcom/watcom_f.mak rename to src/zlib/zlib-1.3/watcom/watcom_f.mak diff --git a/src/zlib/zlib-1.2.13/watcom/watcom_l.mak b/src/zlib/zlib-1.3/watcom/watcom_l.mak similarity index 100% rename from src/zlib/zlib-1.2.13/watcom/watcom_l.mak rename to src/zlib/zlib-1.3/watcom/watcom_l.mak diff --git a/src/zlib/zlib-1.2.13/win32/DLL_FAQ.txt b/src/zlib/zlib-1.3/win32/DLL_FAQ.txt similarity index 100% rename from src/zlib/zlib-1.2.13/win32/DLL_FAQ.txt rename to src/zlib/zlib-1.3/win32/DLL_FAQ.txt diff --git a/src/zlib/zlib-1.2.13/win32/Makefile.bor b/src/zlib/zlib-1.3/win32/Makefile.bor similarity index 100% rename from src/zlib/zlib-1.2.13/win32/Makefile.bor rename to src/zlib/zlib-1.3/win32/Makefile.bor diff --git a/src/zlib/zlib-1.2.13/win32/Makefile.gcc b/src/zlib/zlib-1.3/win32/Makefile.gcc similarity index 100% rename from src/zlib/zlib-1.2.13/win32/Makefile.gcc rename to src/zlib/zlib-1.3/win32/Makefile.gcc diff --git a/src/zlib/zlib-1.2.13/win32/Makefile.msc b/src/zlib/zlib-1.3/win32/Makefile.msc similarity index 100% rename from src/zlib/zlib-1.2.13/win32/Makefile.msc rename to src/zlib/zlib-1.3/win32/Makefile.msc diff --git a/src/zlib/zlib-1.2.13/win32/README-WIN32.txt b/src/zlib/zlib-1.3/win32/README-WIN32.txt similarity index 96% rename from src/zlib/zlib-1.2.13/win32/README-WIN32.txt rename to src/zlib/zlib-1.3/win32/README-WIN32.txt index 050197d80..384c988fa 100644 --- a/src/zlib/zlib-1.2.13/win32/README-WIN32.txt +++ b/src/zlib/zlib-1.3/win32/README-WIN32.txt @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.13 is a general purpose data compression library. All the code is +zlib 1.3.0 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) @@ -22,7 +22,7 @@ before asking for help. Manifest: -The package zlib-1.2.13-win32-x86.zip will contain the following files: +The package zlib-1.3.0-win32-x86.zip will contain the following files: README-WIN32.txt This document ChangeLog Changes since previous zlib packages diff --git a/src/zlib/zlib-1.2.13/win32/VisualC.txt b/src/zlib/zlib-1.3/win32/VisualC.txt similarity index 100% rename from src/zlib/zlib-1.2.13/win32/VisualC.txt rename to src/zlib/zlib-1.3/win32/VisualC.txt diff --git a/src/zlib/zlib-1.2.13/win32/zlib.def b/src/zlib/zlib-1.3/win32/zlib.def similarity index 100% rename from src/zlib/zlib-1.2.13/win32/zlib.def rename to src/zlib/zlib-1.3/win32/zlib.def diff --git a/src/zlib/zlib-1.2.13/win32/zlib1.rc b/src/zlib/zlib-1.3/win32/zlib1.rc similarity index 100% rename from src/zlib/zlib-1.2.13/win32/zlib1.rc rename to src/zlib/zlib-1.3/win32/zlib1.rc diff --git a/src/zlib/zlib-1.2.13/zconf.h b/src/zlib/zlib-1.3/zconf.h similarity index 99% rename from src/zlib/zlib-1.2.13/zconf.h rename to src/zlib/zlib-1.3/zconf.h index bf977d3e7..fb76ffe31 100644 --- a/src/zlib/zlib-1.2.13/zconf.h +++ b/src/zlib/zlib-1.3/zconf.h @@ -241,7 +241,11 @@ #endif #ifdef Z_SOLO - typedef unsigned long z_size_t; +# ifdef _WIN64 + typedef unsigned long long z_size_t; +# else + typedef unsigned long z_size_t; +# endif #else # define z_longlong long long # if defined(NO_SIZE_T) @@ -520,7 +524,7 @@ typedef uLong FAR uLongf; #if !defined(_WIN32) && defined(Z_LARGE64) # define z_off64_t off64_t #else -# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) +# if defined(_WIN32) && !defined(__GNUC__) # define z_off64_t __int64 # else # define z_off64_t z_off_t diff --git a/src/zlib/zlib-1.2.13/zconf.h.cmakein b/src/zlib/zlib-1.3/zconf.h.cmakein similarity index 99% rename from src/zlib/zlib-1.2.13/zconf.h.cmakein rename to src/zlib/zlib-1.3/zconf.h.cmakein index 247ba2461..310c43928 100644 --- a/src/zlib/zlib-1.2.13/zconf.h.cmakein +++ b/src/zlib/zlib-1.3/zconf.h.cmakein @@ -243,7 +243,11 @@ #endif #ifdef Z_SOLO - typedef unsigned long z_size_t; +# ifdef _WIN64 + typedef unsigned long long z_size_t; +# else + typedef unsigned long z_size_t; +# endif #else # define z_longlong long long # if defined(NO_SIZE_T) @@ -522,7 +526,7 @@ typedef uLong FAR uLongf; #if !defined(_WIN32) && defined(Z_LARGE64) # define z_off64_t off64_t #else -# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) +# if defined(_WIN32) && !defined(__GNUC__) # define z_off64_t __int64 # else # define z_off64_t z_off_t diff --git a/src/zlib/zlib-1.2.13/zconf.h.in b/src/zlib/zlib-1.3/zconf.h.in similarity index 99% rename from src/zlib/zlib-1.2.13/zconf.h.in rename to src/zlib/zlib-1.3/zconf.h.in index bf977d3e7..fb76ffe31 100644 --- a/src/zlib/zlib-1.2.13/zconf.h.in +++ b/src/zlib/zlib-1.3/zconf.h.in @@ -241,7 +241,11 @@ #endif #ifdef Z_SOLO - typedef unsigned long z_size_t; +# ifdef _WIN64 + typedef unsigned long long z_size_t; +# else + typedef unsigned long z_size_t; +# endif #else # define z_longlong long long # if defined(NO_SIZE_T) @@ -520,7 +524,7 @@ typedef uLong FAR uLongf; #if !defined(_WIN32) && defined(Z_LARGE64) # define z_off64_t off64_t #else -# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) +# if defined(_WIN32) && !defined(__GNUC__) # define z_off64_t __int64 # else # define z_off64_t z_off_t diff --git a/src/zlib/zlib-1.2.13/zlib.3 b/src/zlib/zlib-1.3/zlib.3 similarity index 97% rename from src/zlib/zlib-1.2.13/zlib.3 rename to src/zlib/zlib-1.3/zlib.3 index 6f6e91404..4dd289675 100644 --- a/src/zlib/zlib-1.2.13/zlib.3 +++ b/src/zlib/zlib-1.3/zlib.3 @@ -1,4 +1,4 @@ -.TH ZLIB 3 "13 Oct 2022" +.TH ZLIB 3 "18 Aug 2023" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -105,9 +105,9 @@ before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). .SH AUTHORS AND LICENSE -Version 1.2.13 +Version 1.3 .LP -Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler +Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler .LP This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/zlib/zlib-1.3/zlib.3.pdf b/src/zlib/zlib-1.3/zlib.3.pdf new file mode 100644 index 000000000..da12d3718 Binary files /dev/null and b/src/zlib/zlib-1.3/zlib.3.pdf differ diff --git a/src/zlib/zlib-1.2.13/zlib.h b/src/zlib/zlib-1.3/zlib.h similarity index 88% rename from src/zlib/zlib-1.2.13/zlib.h rename to src/zlib/zlib-1.3/zlib.h index 953cb5012..6b7244f99 100644 --- a/src/zlib/zlib-1.2.13/zlib.h +++ b/src/zlib/zlib-1.3/zlib.h @@ -1,7 +1,7 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.13, October 13th, 2022 + version 1.3, August 18th, 2023 - Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -37,11 +37,11 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.13" -#define ZLIB_VERNUM 0x12d0 +#define ZLIB_VERSION "1.3" +#define ZLIB_VERNUM 0x1300 #define ZLIB_VER_MAJOR 1 -#define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 13 +#define ZLIB_VER_MINOR 3 +#define ZLIB_VER_REVISION 0 #define ZLIB_VER_SUBREVISION 0 /* @@ -78,8 +78,8 @@ extern "C" { even in the case of corrupted input. */ -typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); -typedef void (*free_func) OF((voidpf opaque, voidpf address)); +typedef voidpf (*alloc_func)(voidpf opaque, uInt items, uInt size); +typedef void (*free_func)(voidpf opaque, voidpf address); struct internal_state; @@ -217,7 +217,7 @@ typedef gz_header FAR *gz_headerp; /* basic functions */ -ZEXTERN const char * ZEXPORT zlibVersion OF((void)); +ZEXTERN const char * ZEXPORT zlibVersion(void); /* The application can compare zlibVersion and ZLIB_VERSION for consistency. If the first character differs, the library code actually used is not compatible with the zlib.h header file used by the application. This check @@ -225,12 +225,12 @@ ZEXTERN const char * ZEXPORT zlibVersion OF((void)); */ /* -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); +ZEXTERN int ZEXPORT deflateInit(z_streamp strm, int level); Initializes the internal stream state for compression. The fields zalloc, zfree and opaque must be initialized before by the caller. If zalloc and zfree are set to Z_NULL, deflateInit updates them to use default - allocation functions. + allocation functions. total_in, total_out, adler, and msg are initialized. The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: 1 gives best speed, 9 gives best compression, 0 gives no compression at all @@ -247,7 +247,7 @@ ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); */ -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); +ZEXTERN int ZEXPORT deflate(z_streamp strm, int flush); /* deflate compresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full. It may introduce @@ -320,8 +320,8 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); with the same value of the flush parameter and more output space (updated avail_out), until the flush is complete (deflate returns with non-zero avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that - avail_out is greater than six to avoid repeated flush markers due to - avail_out == 0 on return. + avail_out is greater than six when the flush marker begins, in order to avoid + repeated flush markers upon calling deflate() again when avail_out == 0. If the parameter flush is set to Z_FINISH, pending input is processed, pending output is flushed and deflate returns with Z_STREAM_END if there was @@ -360,7 +360,7 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); */ -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); +ZEXTERN int ZEXPORT deflateEnd(z_streamp strm); /* All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any pending @@ -375,7 +375,7 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); /* -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateInit(z_streamp strm); Initializes the internal stream state for decompression. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by @@ -383,7 +383,8 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); read or consumed. The allocation of a sliding window will be deferred to the first call of inflate (if the decompression does not complete on the first call). If zalloc and zfree are set to Z_NULL, inflateInit updates - them to use default allocation functions. + them to use default allocation functions. total_in, total_out, adler, and + msg are initialized. inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_VERSION_ERROR if the zlib library version is incompatible with the @@ -397,7 +398,7 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); */ -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); +ZEXTERN int ZEXPORT inflate(z_streamp strm, int flush); /* inflate decompresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full. It may introduce @@ -517,7 +518,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); */ -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateEnd(z_streamp strm); /* All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any pending @@ -535,12 +536,12 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); */ /* -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy)); +ZEXTERN int ZEXPORT deflateInit2(z_streamp strm, + int level, + int method, + int windowBits, + int memLevel, + int strategy); This is another version of deflateInit with more compression options. The fields zalloc, zfree and opaque must be initialized before by the caller. @@ -607,9 +608,9 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, compression: this will be done by deflate(). */ -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); +ZEXTERN int ZEXPORT deflateSetDictionary(z_streamp strm, + const Bytef *dictionary, + uInt dictLength); /* Initializes the compression dictionary from the given byte sequence without producing any compressed output. When using the zlib format, this @@ -651,9 +652,9 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, not perform any compression: this will be done by deflate(). */ -ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); +ZEXTERN int ZEXPORT deflateGetDictionary(z_streamp strm, + Bytef *dictionary, + uInt *dictLength); /* Returns the sliding dictionary being maintained by deflate. dictLength is set to the number of bytes in the dictionary, and that many bytes are copied @@ -673,8 +674,8 @@ ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, stream state is inconsistent. */ -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, - z_streamp source)); +ZEXTERN int ZEXPORT deflateCopy(z_streamp dest, + z_streamp source); /* Sets the destination stream as a complete copy of the source stream. @@ -691,20 +692,20 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, destination. */ -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); +ZEXTERN int ZEXPORT deflateReset(z_streamp strm); /* This function is equivalent to deflateEnd followed by deflateInit, but does not free and reallocate the internal compression state. The stream will leave the compression level and any other attributes that may have been - set unchanged. + set unchanged. total_in, total_out, adler, and msg are initialized. deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL). */ -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, - int level, - int strategy)); +ZEXTERN int ZEXPORT deflateParams(z_streamp strm, + int level, + int strategy); /* Dynamically update the compression level and compression strategy. The interpretation of level and strategy is as in deflateInit2(). This can be @@ -729,7 +730,7 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, Then no more input data should be provided before the deflateParams() call. If this is done, the old level and strategy will be applied to the data compressed before deflateParams(), and the new level and strategy will be - applied to the the data compressed after deflateParams(). + applied to the data compressed after deflateParams(). deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if @@ -740,11 +741,11 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, retried with more output space. */ -ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, - int good_length, - int max_lazy, - int nice_length, - int max_chain)); +ZEXTERN int ZEXPORT deflateTune(z_streamp strm, + int good_length, + int max_lazy, + int nice_length, + int max_chain); /* Fine tune deflate's internal compression parameters. This should only be used by someone who understands the algorithm used by zlib's deflate for @@ -757,8 +758,8 @@ ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. */ -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, - uLong sourceLen)); +ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm, + uLong sourceLen); /* deflateBound() returns an upper bound on the compressed size after deflation of sourceLen bytes. It must be called after deflateInit() or @@ -772,9 +773,9 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, than Z_FINISH or Z_NO_FLUSH are used. */ -ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, - unsigned *pending, - int *bits)); +ZEXTERN int ZEXPORT deflatePending(z_streamp strm, + unsigned *pending, + int *bits); /* deflatePending() returns the number of bytes and bits of output that have been generated, but not yet provided in the available output. The bytes not @@ -787,9 +788,9 @@ ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, stream state was inconsistent. */ -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, - int bits, - int value)); +ZEXTERN int ZEXPORT deflatePrime(z_streamp strm, + int bits, + int value); /* deflatePrime() inserts bits in the deflate output stream. The intent is that this function is used to start off the deflate output with the bits @@ -804,8 +805,8 @@ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, source stream state was inconsistent. */ -ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, - gz_headerp head)); +ZEXTERN int ZEXPORT deflateSetHeader(z_streamp strm, + gz_headerp head); /* deflateSetHeader() provides gzip header information for when a gzip stream is requested by deflateInit2(). deflateSetHeader() may be called @@ -821,16 +822,17 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, gzip file" and give up. If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to 255, with no extra, name, or comment - fields. The gzip header is returned to the default state by deflateReset(). + the time set to zero, and os set to the current operating system, with no + extra, name, or comment fields. The gzip header is returned to the default + state by deflateReset(). deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ /* -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, - int windowBits)); +ZEXTERN int ZEXPORT inflateInit2(z_streamp strm, + int windowBits); This is another version of inflateInit with an extra parameter. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized @@ -883,9 +885,9 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, deferred until inflate() is called. */ -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); +ZEXTERN int ZEXPORT inflateSetDictionary(z_streamp strm, + const Bytef *dictionary, + uInt dictLength); /* Initializes the decompression dictionary from the given uncompressed byte sequence. This function must be called immediately after a call of inflate, @@ -906,9 +908,9 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, inflate(). */ -ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); +ZEXTERN int ZEXPORT inflateGetDictionary(z_streamp strm, + Bytef *dictionary, + uInt *dictLength); /* Returns the sliding dictionary being maintained by inflate. dictLength is set to the number of bytes in the dictionary, and that many bytes are copied @@ -921,7 +923,7 @@ ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, stream state is inconsistent. */ -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateSync(z_streamp strm); /* Skips invalid compressed data until a possible full flush point (see above for the description of deflate with Z_FULL_FLUSH) can be found, or until all @@ -940,8 +942,8 @@ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); input each time, until success or end of the input data. */ -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, - z_streamp source)); +ZEXTERN int ZEXPORT inflateCopy(z_streamp dest, + z_streamp source); /* Sets the destination stream as a complete copy of the source stream. @@ -956,18 +958,19 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, destination. */ -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateReset(z_streamp strm); /* This function is equivalent to inflateEnd followed by inflateInit, but does not free and reallocate the internal decompression state. The stream will keep attributes that may have been set by inflateInit2. + total_in, total_out, adler, and msg are initialized. inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL). */ -ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, - int windowBits)); +ZEXTERN int ZEXPORT inflateReset2(z_streamp strm, + int windowBits); /* This function is the same as inflateReset, but it also permits changing the wrap and window size requests. The windowBits parameter is interpreted @@ -980,9 +983,9 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, the windowBits parameter is invalid. */ -ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, - int bits, - int value)); +ZEXTERN int ZEXPORT inflatePrime(z_streamp strm, + int bits, + int value); /* This function inserts bits in the inflate input stream. The intent is that this function is used to start inflating at a bit position in the @@ -1001,7 +1004,7 @@ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, stream state was inconsistent. */ -ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); +ZEXTERN long ZEXPORT inflateMark(z_streamp strm); /* This function returns two values, one in the lower 16 bits of the return value, and the other in the remaining upper bits, obtained by shifting the @@ -1029,8 +1032,8 @@ ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); source stream state was inconsistent. */ -ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, - gz_headerp head)); +ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm, + gz_headerp head); /* inflateGetHeader() requests that gzip header information be stored in the provided gz_header structure. inflateGetHeader() may be called after @@ -1070,8 +1073,8 @@ ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, */ /* -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, - unsigned char FAR *window)); +ZEXTERN int ZEXPORT inflateBackInit(z_streamp strm, int windowBits, + unsigned char FAR *window); Initialize the internal stream state for decompression using inflateBack() calls. The fields zalloc, zfree and opaque in strm must be initialized @@ -1091,13 +1094,13 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, the version of the header file. */ -typedef unsigned (*in_func) OF((void FAR *, - z_const unsigned char FAR * FAR *)); -typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); +typedef unsigned (*in_func)(void FAR *, + z_const unsigned char FAR * FAR *); +typedef int (*out_func)(void FAR *, unsigned char FAR *, unsigned); -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); +ZEXTERN int ZEXPORT inflateBack(z_streamp strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc); /* inflateBack() does a raw inflate with a single call using a call-back interface for input and output. This is potentially more efficient than @@ -1165,7 +1168,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, cannot return Z_OK. */ -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateBackEnd(z_streamp strm); /* All memory allocated by inflateBackInit() is freed. @@ -1173,7 +1176,7 @@ ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); state was inconsistent. */ -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); +ZEXTERN uLong ZEXPORT zlibCompileFlags(void); /* Return flags indicating compile-time options. Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: @@ -1226,8 +1229,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); you need special options. */ -ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); +ZEXTERN int ZEXPORT compress(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen); /* Compresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size @@ -1241,9 +1244,9 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, buffer. */ -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); +ZEXTERN int ZEXPORT compress2(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level); /* Compresses the source buffer into the destination buffer. The level parameter has the same meaning as in deflateInit. sourceLen is the byte @@ -1257,15 +1260,15 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, Z_STREAM_ERROR if the level parameter is invalid. */ -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); +ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen); /* compressBound() returns an upper bound on the compressed size after compress() or compress2() on sourceLen bytes. It would be used before a compress() or compress2() call to allocate the destination buffer. */ -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); +ZEXTERN int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen); /* Decompresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size @@ -1282,8 +1285,8 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, buffer with the uncompressed data up to that point. */ -ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong *sourceLen)); +ZEXTERN int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong *sourceLen); /* Same as uncompress, except that sourceLen is a pointer, where the length of the source is *sourceLen. On return, *sourceLen is the number of @@ -1302,7 +1305,7 @@ ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ /* -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); +ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode); Open the gzip (.gz) file at path for reading and decompressing, or compressing and writing. The mode parameter is as in fopen ("rb" or "wb") @@ -1339,7 +1342,7 @@ ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); file could not be opened. */ -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode); /* Associate a gzFile with the file descriptor fd. File descriptors are obtained from calls like open, dup, creat, pipe or fileno (if the file has @@ -1362,7 +1365,7 @@ ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); will not detect if fd is invalid (unless fd is -1). */ -ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); +ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size); /* Set the internal buffer size used by this library's functions for file to size. The default buffer size is 8192 bytes. This function must be called @@ -1378,7 +1381,7 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); too late. */ -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); +ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy); /* Dynamically update the compression level and strategy for file. See the description of deflateInit2 for the meaning of these parameters. Previously @@ -1389,7 +1392,7 @@ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); or Z_MEM_ERROR if there is a memory allocation error. */ -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); +ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len); /* Read and decompress up to len uncompressed bytes from file into buf. If the input file is not in gzip format, gzread copies the given number of @@ -1419,8 +1422,8 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); Z_STREAM_ERROR. */ -ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, - gzFile file)); +ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems, + gzFile file); /* Read and decompress up to nitems items of size size from file into buf, otherwise operating as gzread() does. This duplicates the interface of @@ -1445,14 +1448,14 @@ ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, file, resetting and retrying on end-of-file, when size is not 1. */ -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, voidpc buf, unsigned len)); +ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len); /* Compress and write the len uncompressed bytes at buf to file. gzwrite returns the number of uncompressed bytes written or 0 in case of error. */ -ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, - z_size_t nitems, gzFile file)); +ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size, + z_size_t nitems, gzFile file); /* Compress and write nitems items of size size from buf to file, duplicating the interface of stdio's fwrite(), with size_t request and return types. If @@ -1465,7 +1468,7 @@ ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, is returned, and the error state is set to Z_STREAM_ERROR. */ -ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); +ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...); /* Convert, format, compress, and write the arguments (...) to file under control of the string format, as in fprintf. gzprintf returns the number of @@ -1480,7 +1483,7 @@ ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); This can be determined using zlibCompileFlags(). */ -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); +ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s); /* Compress and write the given null-terminated string s to file, excluding the terminating null character. @@ -1488,7 +1491,7 @@ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); gzputs returns the number of characters written, or -1 in case of error. */ -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); +ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len); /* Read and decompress bytes from file into buf, until len-1 characters are read, or until a newline character is read and transferred to buf, or an @@ -1502,13 +1505,13 @@ ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); buf are indeterminate. */ -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); +ZEXTERN int ZEXPORT gzputc(gzFile file, int c); /* Compress and write c, converted to an unsigned char, into file. gzputc returns the value that was written, or -1 in case of error. */ -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); +ZEXTERN int ZEXPORT gzgetc(gzFile file); /* Read and decompress one byte from file. gzgetc returns this byte or -1 in case of end of file or error. This is implemented as a macro for speed. @@ -1517,7 +1520,7 @@ ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); points to has been clobbered or not. */ -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); +ZEXTERN int ZEXPORT gzungetc(int c, gzFile file); /* Push c back onto the stream for file to be read as the first character on the next read. At least one character of push-back is always allowed. @@ -1529,7 +1532,7 @@ ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); gzseek() or gzrewind(). */ -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); +ZEXTERN int ZEXPORT gzflush(gzFile file, int flush); /* Flush all pending output to file. The parameter flush is as in the deflate() function. The return value is the zlib error number (see function @@ -1545,8 +1548,8 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); */ /* -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); +ZEXTERN z_off_t ZEXPORT gzseek(gzFile file, + z_off_t offset, int whence); Set the starting position to offset relative to whence for the next gzread or gzwrite on file. The offset represents a number of bytes in the @@ -1564,7 +1567,7 @@ ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, would be before the current position. */ -ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); +ZEXTERN int ZEXPORT gzrewind(gzFile file); /* Rewind file. This function is supported only for reading. @@ -1572,7 +1575,7 @@ ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); */ /* -ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); +ZEXTERN z_off_t ZEXPORT gztell(gzFile file); Return the starting position for the next gzread or gzwrite on file. This position represents a number of bytes in the uncompressed data stream, @@ -1583,7 +1586,7 @@ ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); */ /* -ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); +ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file); Return the current compressed (actual) read or write offset of file. This offset includes the count of bytes that precede the gzip stream, for example @@ -1592,7 +1595,7 @@ ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); be used for a progress indicator. On error, gzoffset() returns -1. */ -ZEXTERN int ZEXPORT gzeof OF((gzFile file)); +ZEXTERN int ZEXPORT gzeof(gzFile file); /* Return true (1) if the end-of-file indicator for file has been set while reading, false (0) otherwise. Note that the end-of-file indicator is set @@ -1607,7 +1610,7 @@ ZEXTERN int ZEXPORT gzeof OF((gzFile file)); has grown since the previous end of file was detected. */ -ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); +ZEXTERN int ZEXPORT gzdirect(gzFile file); /* Return true (1) if file is being copied directly while reading, or false (0) if file is a gzip stream being decompressed. @@ -1628,7 +1631,7 @@ ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); gzip file reading and decompression, which may not be desired.) */ -ZEXTERN int ZEXPORT gzclose OF((gzFile file)); +ZEXTERN int ZEXPORT gzclose(gzFile file); /* Flush all pending output for file, if necessary, close file and deallocate the (de)compression state. Note that once file is closed, you @@ -1641,8 +1644,8 @@ ZEXTERN int ZEXPORT gzclose OF((gzFile file)); last read ended in the middle of a gzip stream, or Z_OK on success. */ -ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); -ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); +ZEXTERN int ZEXPORT gzclose_r(gzFile file); +ZEXTERN int ZEXPORT gzclose_w(gzFile file); /* Same as gzclose(), but gzclose_r() is only for use when reading, and gzclose_w() is only for use when writing or appending. The advantage to @@ -1653,7 +1656,7 @@ ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); zlib library. */ -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); +ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum); /* Return the error message for the last error which occurred on file. errnum is set to zlib error number. If an error occurred in the file system @@ -1669,7 +1672,7 @@ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); functions above that do not distinguish those cases in their return values. */ -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); +ZEXTERN void ZEXPORT gzclearerr(gzFile file); /* Clear the error and end-of-file flags for file. This is analogous to the clearerr() function in stdio. This is useful for continuing to read a gzip @@ -1686,7 +1689,7 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); library. */ -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); +ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len); /* Update a running Adler-32 checksum with the bytes buf[0..len-1] and return the updated checksum. An Adler-32 value is in the range of a 32-bit @@ -1706,15 +1709,15 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); if (adler != original_adler) error(); */ -ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf, - z_size_t len)); +ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, + z_size_t len); /* Same as adler32(), but with a size_t length. */ /* -ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, - z_off_t len2)); +ZEXTERN uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, + z_off_t len2); Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for @@ -1724,7 +1727,7 @@ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, negative, the result has no meaning or utility. */ -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); +ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len); /* Update a running CRC-32 with the bytes buf[0..len-1] and return the updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer. @@ -1742,14 +1745,14 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); if (crc != original_crc) error(); */ -ZEXTERN uLong ZEXPORT crc32_z OF((uLong crc, const Bytef *buf, - z_size_t len)); +ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf, + z_size_t len); /* Same as crc32(), but with a size_t length. */ /* -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); +ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2); Combine two CRC-32 check values into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, CRC-32 check values were @@ -1759,13 +1762,13 @@ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); */ /* -ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2)); +ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2); Return the operator corresponding to length len2, to be used with crc32_combine_op(). */ -ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op)); +ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op); /* Give the same result as crc32_combine(), using op in place of len2. op is is generated from len2 by crc32_combine_gen(). This will be faster than @@ -1778,20 +1781,20 @@ ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op)); /* deflateInit and inflateInit are macros to allow checking the zlib version * and the compiler's view of z_stream: */ -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, - unsigned char FAR *window, - const char *version, - int stream_size)); +ZEXTERN int ZEXPORT deflateInit_(z_streamp strm, int level, + const char *version, int stream_size); +ZEXTERN int ZEXPORT inflateInit_(z_streamp strm, + const char *version, int stream_size); +ZEXTERN int ZEXPORT deflateInit2_(z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size); +ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, + const char *version, int stream_size); +ZEXTERN int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits, + unsigned char FAR *window, + const char *version, + int stream_size); #ifdef Z_PREFIX_SET # define z_deflateInit(strm, level) \ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) @@ -1836,7 +1839,7 @@ struct gzFile_s { unsigned char *next; z_off64_t pos; }; -ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ +ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */ #ifdef Z_PREFIX_SET # undef z_gzgetc # define z_gzgetc(g) \ @@ -1853,13 +1856,13 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ * without large file support, _LFS64_LARGEFILE must also be true */ #ifdef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off64_t)); + ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); + ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int); + ZEXTERN z_off64_t ZEXPORT gztell64(gzFile); + ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t); + ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t); #endif #if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) @@ -1881,50 +1884,50 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ # define crc32_combine_gen crc32_combine_gen64 # endif # ifndef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t)); + ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); + ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int); + ZEXTERN z_off_t ZEXPORT gztell64(gzFile); + ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t); # endif #else - ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t)); + ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *); + ZEXTERN z_off_t ZEXPORT gzseek(gzFile, z_off_t, int); + ZEXTERN z_off_t ZEXPORT gztell(gzFile); + ZEXTERN z_off_t ZEXPORT gzoffset(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t); #endif #else /* Z_SOLO */ - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t)); + ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t); #endif /* !Z_SOLO */ /* undocumented functions */ -ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); -ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); -ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); -ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int)); -ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF((z_streamp)); -ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); -ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); +ZEXTERN const char * ZEXPORT zError(int); +ZEXTERN int ZEXPORT inflateSyncPoint(z_streamp); +ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table(void); +ZEXTERN int ZEXPORT inflateUndermine(z_streamp, int); +ZEXTERN int ZEXPORT inflateValidate(z_streamp, int); +ZEXTERN unsigned long ZEXPORT inflateCodesUsed(z_streamp); +ZEXTERN int ZEXPORT inflateResetKeep(z_streamp); +ZEXTERN int ZEXPORT deflateResetKeep(z_streamp); #if defined(_WIN32) && !defined(Z_SOLO) -ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, - const char *mode)); +ZEXTERN gzFile ZEXPORT gzopen_w(const wchar_t *path, + const char *mode); #endif #if defined(STDC) || defined(Z_HAVE_STDARG_H) # ifndef Z_SOLO -ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, - const char *format, - va_list va)); +ZEXTERN int ZEXPORTVA gzvprintf(gzFile file, + const char *format, + va_list va); # endif #endif diff --git a/src/zlib/zlib-1.2.13/zlib.map b/src/zlib/zlib-1.3/zlib.map similarity index 100% rename from src/zlib/zlib-1.2.13/zlib.map rename to src/zlib/zlib-1.3/zlib.map diff --git a/src/zlib/zlib-1.2.13/zlib.pc.cmakein b/src/zlib/zlib-1.3/zlib.pc.cmakein similarity index 100% rename from src/zlib/zlib-1.2.13/zlib.pc.cmakein rename to src/zlib/zlib-1.3/zlib.pc.cmakein diff --git a/src/zlib/zlib-1.2.13/zlib.pc.in b/src/zlib/zlib-1.3/zlib.pc.in similarity index 100% rename from src/zlib/zlib-1.2.13/zlib.pc.in rename to src/zlib/zlib-1.3/zlib.pc.in diff --git a/src/zlib/zlib-1.2.13/zutil.c b/src/zlib/zlib-1.3/zutil.c similarity index 87% rename from src/zlib/zlib-1.2.13/zutil.c rename to src/zlib/zlib-1.3/zutil.c index 9543ae825..b1c5d2d3c 100644 --- a/src/zlib/zlib-1.2.13/zutil.c +++ b/src/zlib/zlib-1.3/zutil.c @@ -24,13 +24,11 @@ z_const char * const z_errmsg[10] = { }; -const char * ZEXPORT zlibVersion() -{ +const char * ZEXPORT zlibVersion(void) { return ZLIB_VERSION; } -uLong ZEXPORT zlibCompileFlags() -{ +uLong ZEXPORT zlibCompileFlags(void) { uLong flags; flags = 0; @@ -121,9 +119,7 @@ uLong ZEXPORT zlibCompileFlags() # endif int ZLIB_INTERNAL z_verbose = verbose; -void ZLIB_INTERNAL z_error(m) - char *m; -{ +void ZLIB_INTERNAL z_error(char *m) { fprintf(stderr, "%s\n", m); exit(1); } @@ -132,9 +128,7 @@ void ZLIB_INTERNAL z_error(m) /* exported to allow conversion of error code to string for compress() and * uncompress() */ -const char * ZEXPORT zError(err) - int err; -{ +const char * ZEXPORT zError(int err) { return ERR_MSG(err); } @@ -148,22 +142,14 @@ const char * ZEXPORT zError(err) #ifndef HAVE_MEMCPY -void ZLIB_INTERNAL zmemcpy(dest, source, len) - Bytef* dest; - const Bytef* source; - uInt len; -{ +void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len) { if (len == 0) return; do { *dest++ = *source++; /* ??? to be unrolled */ } while (--len != 0); } -int ZLIB_INTERNAL zmemcmp(s1, s2, len) - const Bytef* s1; - const Bytef* s2; - uInt len; -{ +int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len) { uInt j; for (j = 0; j < len; j++) { @@ -172,10 +158,7 @@ int ZLIB_INTERNAL zmemcmp(s1, s2, len) return 0; } -void ZLIB_INTERNAL zmemzero(dest, len) - Bytef* dest; - uInt len; -{ +void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len) { if (len == 0) return; do { *dest++ = 0; /* ??? to be unrolled */ @@ -216,8 +199,7 @@ local ptr_table table[MAX_PTR]; * a protected system like OS/2. Use Microsoft C instead. */ -voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) -{ +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) { voidpf buf; ulg bsize = (ulg)items*size; @@ -242,8 +224,7 @@ voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) return buf; } -void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) -{ +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { int n; (void)opaque; @@ -279,14 +260,12 @@ void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) # define _hfree hfree #endif -voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, uInt items, uInt size) -{ +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, uInt items, uInt size) { (void)opaque; return _halloc((long)items, size); } -void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) -{ +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { (void)opaque; _hfree(ptr); } @@ -299,25 +278,18 @@ void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) #ifndef MY_ZCALLOC /* Any system without a special alloc function */ #ifndef STDC -extern voidp malloc OF((uInt size)); -extern voidp calloc OF((uInt items, uInt size)); -extern void free OF((voidpf ptr)); +extern voidp malloc(uInt size); +extern voidp calloc(uInt items, uInt size); +extern void free(voidpf ptr); #endif -voidpf ZLIB_INTERNAL zcalloc(opaque, items, size) - voidpf opaque; - unsigned items; - unsigned size; -{ +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) { (void)opaque; return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : (voidpf)calloc(items, size); } -void ZLIB_INTERNAL zcfree(opaque, ptr) - voidpf opaque; - voidpf ptr; -{ +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { (void)opaque; free(ptr); } diff --git a/src/zlib/zlib-1.2.13/zutil.h b/src/zlib/zlib-1.3/zutil.h similarity index 90% rename from src/zlib/zlib-1.2.13/zutil.h rename to src/zlib/zlib-1.3/zutil.h index 0bc7f4ecd..902a304cc 100644 --- a/src/zlib/zlib-1.2.13/zutil.h +++ b/src/zlib/zlib-1.3/zutil.h @@ -191,9 +191,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* provide prototypes for these when building zlib without LFS */ #if !defined(_WIN32) && \ (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t)); + ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t); #endif /* common defaults */ @@ -232,16 +232,16 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define zmemzero(dest, len) memset(dest, 0, len) # endif #else - void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); - int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); - void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len)); + void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len); + int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len); + void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len); #endif /* Diagnostic functions */ #ifdef ZLIB_DEBUG # include extern int ZLIB_INTERNAL z_verbose; - extern void ZLIB_INTERNAL z_error OF((char *m)); + extern void ZLIB_INTERNAL z_error(char *m); # define Assert(cond,msg) {if(!(cond)) z_error(msg);} # define Trace(x) {if (z_verbose>=0) fprintf x ;} # define Tracev(x) {if (z_verbose>0) fprintf x ;} @@ -258,9 +258,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #endif #ifndef Z_SOLO - voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items, - unsigned size)); - void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr)); + voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, + unsigned size); + void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr); #endif #define ZALLOC(strm, items, size) \