Commit 463c28f2 authored by ROOL's avatar ROOL 🤖
Browse files

Insert a CMHG compatible version string into the config

Detail:
  Parse the mbedtls/version.h file and turn that into an unquoted string suitable for CMHG.
Admin:
  Submission for TCP/IP bounty.

Version 2.06. Tagged as 'mbedTLS-2_06'
parent ab335107
......@@ -46,12 +46,16 @@ OBJS_CRYPTO = aes aesni aria arc4 \
version_features xtea
OBJS = ${OBJS_X509} ${OBJS_TLS} ${OBJS_CRYPTO}
HDRS = ro_config check_config other_mbedtls_hdrs
RO_CONFIG = h${SEP}ro_config
CINCLUDES = -ITCPIPLibs:
CDEFINES = -DMBEDTLS_CONFIG_FILE="\"ro_config.h\"" -DRISCOS
CDEFINES = -DMBEDTLS_CONFIG_FILE="\"${RO_CONFIG}\"" -DRISCOS
CFLAGS = -Wp
include CLibrary
exphdr.ro_config:
${AWK} -f ${RO_CONFIG}awk ${RO_CONFIG} > ${EXPDIR}${SEP}${RO_CONFIG}
exphdr.other_mbedtls_hdrs:
${CP} mbedtls ${EXPDIR}${SEP}mbedtls ${CPFLAGS}
......
/* (2.05)
/* (2.06)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 2.05
#define Module_MajorVersion_CMHG 2.06
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 25 Aug 2018
#define Module_Date_CMHG 14 Sep 2018
#define Module_MajorVersion "2.05"
#define Module_Version 205
#define Module_MajorVersion "2.06"
#define Module_Version 206
#define Module_MinorVersion ""
#define Module_Date "25 Aug 2018"
#define Module_Date "14 Sep 2018"
#define Module_ApplicationDate "25-Aug-18"
#define Module_ApplicationDate "14-Sep-18"
#define Module_ComponentName "mbedTLS"
#define Module_ComponentPath "mixed/RiscOS/Sources/Lib/mbedTLS"
#define Module_FullVersion "2.05"
#define Module_HelpVersion "2.05 (25 Aug 2018)"
#define Module_LibraryVersionInfo "2:5"
#define Module_FullVersion "2.06"
#define Module_HelpVersion "2.06 (14 Sep 2018)"
#define Module_LibraryVersionInfo "2:6"
......@@ -33,6 +33,10 @@
#define _CRT_SECURE_NO_DEPRECATE 1
#endif
#ifdef __riscos
#define MBEDTLS_VERSION_STRING_CMHG
#endif
/**
* \name SECTION: System support
*
......
#!/usr/bin/env awk
#
# Copyright (c) 2018, RISC OS Open Ltd
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Pick the mbedTLS version string from its version header and place
# it into the MBEDTLS_CONFIG_FILE without the quote marks for CMHG
BEGIN {
while (getline < "mbedtls.h.version" > 0) {
split($0, Version)
if (Version[2] == "MBEDTLS_VERSION_STRING") {
split($0, VString, "\"")
}
}
}
/^#define\ MBEDTLS_VERSION_STRING_CMHG/ {
printf("#define MBEDTLS_VERSION_STRING_CMHG mbedTLS %s\n", VString[2])
next
}
{ print }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment