Skip to content

Commit

Permalink
Update mbedtls submodule (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
muneebahmed10 authored Jul 24, 2021
1 parent c4c517f commit d6a5191
Show file tree
Hide file tree
Showing 50 changed files with 84 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_CLONE_SUBMODULES=ON \
-DSYSTEM_TESTS=1 \
-DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG'
-DCMAKE_C_FLAGS='-Wall -Wextra -DNDEBUG -DLIBRARY_LOG_LEVEL=LOG_DEBUG'
make -C build/ all
- name: System Tests
run: |
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Change Log for corePKCS11 Library

## v3.0.2 (July 2021)
## v3.1.0 (July 2021)
- [#119](https://github.com/FreeRTOS/corePKCS11/pull/119) Update mbedTLS submodule to [v2.26.0](https://github.com/ARMmbed/mbedtls/tree/v2.26.0).
* [#118](https://github.com/FreeRTOS/corePKCS11/pull/118) Update version numbers and add C++ header guards
* [#116](https://github.com/FreeRTOS/corePKCS11/pull/116) Remove redundant mbedtls error sources
* [#115](https://github.com/FreeRTOS/corePKCS11/pull/115) Update broken links to MISRA in documentation
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ A list of all the configurations and their default values are defined in the dox

### Platform Prerequisites

- For building the library, **CMake 3.13.0 or later** and a **C90 compiler**.
- For building the library, **CMake 3.13.0 or later** and a **C99 compiler**.
- For running unit tests, Ruby 2.0.0 or later is additionally required for the CMock test framework (that we use).
- For running the coverage target, gcov is additionally required.

Expand Down
2 changes: 1 addition & 1 deletion docs/doxygen/config.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "corePKCS11"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "v3.0.2"
PROJECT_NUMBER = "v3.1.0"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
4 changes: 2 additions & 2 deletions manifest.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name : "corePKCS11"
version: "v3.0.2"
version: "v3.1.0"
description: |
"Software implementation of the PKCS #11 standard.\n"
dependencies:
- name : "mbedtls"
version: "v2.16.8"
version: "v2.26.0"
repository:
type: "git"
url: "https://github.com/ARMmbed/mbedtls/"
Expand Down
2 changes: 1 addition & 1 deletion source/core_pkcs11.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion source/core_pki_utils.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion source/dependency/3rdparty/mbedtls
2 changes: 1 addition & 1 deletion source/include/core_pkcs11.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion source/include/core_pkcs11_pal.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion source/include/core_pki_utils.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion source/portable/mbedtls/core_pkcs11_mbedtls.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
13 changes: 3 additions & 10 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
cmake_minimum_required ( VERSION 3.13.0 )
project ( "corePKCS11 unit test"
VERSION 3.0.1
LANGUAGES C )

# Allow the project to be organized into folders.
set_property( GLOBAL PROPERTY USE_FOLDERS ON )

# Use C90.
set( CMAKE_C_STANDARD 90 )
set( CMAKE_C_STANDARD_REQUIRED ON )

# Do not allow in-source build.
if( ${PROJECT_SOURCE_DIR} STREQUAL ${PROJECT_BINARY_DIR} )
message( FATAL_ERROR "In-source build is not allowed. Please build in a separate directory, such as ${PROJECT_SOURCE_DIR}/build." )
Expand Down Expand Up @@ -41,6 +36,9 @@ add_library( coverity_analysis
# Build corePKCS11 library target without custom config dependency.
target_compile_definitions( coverity_analysis PUBLIC -DMBEDTLS_CONFIG_FILE="aws_mbedtls_config.h" )

# Build corePKCS11 library with gnuC90 standard due to mbedtls compatbility issues.
target_compile_options( coverity_analysis PUBLIC -std=gnu90 )

# corePKCS11 public include path.
target_include_directories( coverity_analysis PUBLIC ${PKCS_INCLUDE_PUBLIC_DIRS} ${MODULE_ROOT_DIR}/source/dependency/3rdparty/mbedtls/include ${MODULE_ROOT_DIR}/source/dependency/3rdparty/mbedtls_utils ${MODULE_ROOT_DIR}/test/unit-test/config )

Expand Down Expand Up @@ -69,11 +67,6 @@ endif()
# defining test targets with add_test()
enable_testing()

# We do this to swap out the default mbed TLS config for one geared towards the
# unit tests.
add_compile_definitions( MBEDTLS_CONFIG_FILE="aws_mbedtls_config.h" )


# Add build targets for CMock and Unit, required for unit testing.
add_cmock_targets()

Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_CloseSession/C_CloseSession_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_CreateObject/C_CreateObject_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_DestroyObject/C_DestroyObject_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_DigestFinal/C_DigestFinal_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_DigestInit/C_DigestInit_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_DigestUpdate/C_DigestUpdate_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_Finalize/C_Finalize_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_FindObjects/C_FindObjects_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_GetSlotList/C_GetSlotList_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_Initialize/C_Initialize_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_OpenSession/C_OpenSession_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_Sign/C_Sign_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_SignInit/C_SignInit_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_Verify/C_Verify_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/C_VerifyInit/C_VerifyInit_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/xGetSlotList/xGetSlotList_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/stubs/mbedtls_stubs.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* corePKCS11 v3.0.2
* corePKCS11 v3.1.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
13 changes: 10 additions & 3 deletions test/system-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ create_real_library(${real_name}
# Empty mock name as create_real_library needs the 4th argument.
""
)

target_compile_definitions(
${real_name}
PUBLIC
-DMBEDTLS_CONFIG_FILE="mbedtls_config.h"
MBEDTLS_CONFIG_FILE="mbedtls_config.h"
)

list(APPEND stest_link_list
Expand Down Expand Up @@ -112,8 +113,14 @@ set_source_files_properties(
"-Wno-pedantic -Wno-error"
)

set_source_files_properties(
${MBEDTLS_FILES}
PROPERTY C_STANDARD
gnu90
)

set_source_files_properties(
${MBEDTLS_FILES_INCLUDES}
PROPERTIES COMPILE_FLAGS
"-Wno-pedantic"
PROPERTY C_STANDARD
gnu90
)
Loading

0 comments on commit d6a5191

Please sign in to comment.