Skip to content

Commit ac4c9cc

Browse files
author
Tor Didriksen
committed
Bug #33084073 BUILD AUTHENTICATION_FIDO_CLIENT ALSO FOR COMMUNITY BUILDS [move]
Move 3rd party libcor and libfido2 into <source root>/extra/ Change-Id: I4a1372881a4a2c9f0514f8df12355898b2c591e7
1 parent ac13352 commit ac4c9cc

File tree

334 files changed

+50080
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

334 files changed

+50080
-2
lines changed

cmake/fido2.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ MACRO(MYSQL_USE_BUNDLED_FIDO)
8686

8787
FIND_SYSTEM_UDEV_OR_HID()
8888

89-
SET(CBOR_BUNDLE_SRC_PATH "internal/extra/libcbor")
89+
SET(CBOR_BUNDLE_SRC_PATH "extra/libcbor")
9090

91-
SET(FIDO_BUNDLE_SRC_PATH "internal/extra/libfido2")
91+
SET(FIDO_BUNDLE_SRC_PATH "extra/libfido2")
9292
SET(FIDO_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${FIDO_BUNDLE_SRC_PATH}/src)
9393

9494
# We use the bundled version, so:

extra/libcbor/.clang-format

+151
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: Google
4+
AccessModifierOffset: -1
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignEscapedNewlines: Left
9+
AlignOperands: true
10+
AlignTrailingComments: true
11+
AllowAllParametersOfDeclarationOnNextLine: true
12+
AllowShortBlocksOnASingleLine: false
13+
AllowShortCaseLabelsOnASingleLine: false
14+
AllowShortFunctionsOnASingleLine: All
15+
AllowShortIfStatementsOnASingleLine: true
16+
AllowShortLoopsOnASingleLine: true
17+
AlwaysBreakAfterDefinitionReturnType: None
18+
AlwaysBreakAfterReturnType: None
19+
AlwaysBreakBeforeMultilineStrings: true
20+
AlwaysBreakTemplateDeclarations: true
21+
BinPackArguments: true
22+
BinPackParameters: true
23+
BraceWrapping:
24+
AfterClass: false
25+
AfterControlStatement: false
26+
AfterEnum: false
27+
AfterFunction: false
28+
AfterNamespace: false
29+
AfterObjCDeclaration: false
30+
AfterStruct: false
31+
AfterUnion: false
32+
AfterExternBlock: false
33+
BeforeCatch: false
34+
BeforeElse: false
35+
IndentBraces: false
36+
SplitEmptyFunction: true
37+
SplitEmptyRecord: true
38+
SplitEmptyNamespace: true
39+
BreakBeforeBinaryOperators: None
40+
BreakBeforeBraces: Attach
41+
BreakBeforeInheritanceComma: false
42+
BreakInheritanceList: BeforeColon
43+
BreakBeforeTernaryOperators: true
44+
BreakConstructorInitializersBeforeComma: false
45+
BreakConstructorInitializers: BeforeColon
46+
BreakAfterJavaFieldAnnotations: false
47+
BreakStringLiterals: true
48+
ColumnLimit: 80
49+
CommentPragmas: '^ IWYU pragma:'
50+
CompactNamespaces: false
51+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
52+
ConstructorInitializerIndentWidth: 4
53+
ContinuationIndentWidth: 4
54+
Cpp11BracedListStyle: true
55+
DerivePointerAlignment: true
56+
DisableFormat: false
57+
ExperimentalAutoDetectBinPacking: false
58+
FixNamespaceComments: true
59+
ForEachMacros:
60+
- foreach
61+
- Q_FOREACH
62+
- BOOST_FOREACH
63+
IncludeBlocks: Preserve
64+
IncludeCategories:
65+
- Regex: '^<ext/.*\.h>'
66+
Priority: 2
67+
- Regex: '^<.*\.h>'
68+
Priority: 1
69+
- Regex: '^<.*'
70+
Priority: 2
71+
- Regex: '.*'
72+
Priority: 3
73+
IncludeIsMainRegex: '([-_](test|unittest))?$'
74+
IndentCaseLabels: true
75+
IndentPPDirectives: None
76+
IndentWidth: 2
77+
IndentWrappedFunctionNames: false
78+
JavaScriptQuotes: Leave
79+
JavaScriptWrapImports: true
80+
KeepEmptyLinesAtTheStartOfBlocks: false
81+
MacroBlockBegin: ''
82+
MacroBlockEnd: ''
83+
MaxEmptyLinesToKeep: 1
84+
NamespaceIndentation: None
85+
ObjCBinPackProtocolList: Never
86+
ObjCBlockIndentWidth: 2
87+
ObjCSpaceAfterProperty: false
88+
ObjCSpaceBeforeProtocolList: true
89+
PenaltyBreakAssignment: 2
90+
PenaltyBreakBeforeFirstCallParameter: 1
91+
PenaltyBreakComment: 300
92+
PenaltyBreakFirstLessLess: 120
93+
PenaltyBreakString: 1000
94+
PenaltyBreakTemplateDeclaration: 10
95+
PenaltyExcessCharacter: 1000000
96+
PenaltyReturnTypeOnItsOwnLine: 200
97+
PointerAlignment: Left
98+
RawStringFormats:
99+
- Language: Cpp
100+
Delimiters:
101+
- cc
102+
- CC
103+
- cpp
104+
- Cpp
105+
- CPP
106+
- 'c++'
107+
- 'C++'
108+
CanonicalDelimiter: ''
109+
BasedOnStyle: google
110+
- Language: TextProto
111+
Delimiters:
112+
- pb
113+
- PB
114+
- proto
115+
- PROTO
116+
EnclosingFunctions:
117+
- EqualsProto
118+
- EquivToProto
119+
- PARSE_PARTIAL_TEXT_PROTO
120+
- PARSE_TEST_PROTO
121+
- PARSE_TEXT_PROTO
122+
- ParseTextOrDie
123+
- ParseTextProtoOrDie
124+
CanonicalDelimiter: ''
125+
BasedOnStyle: google
126+
ReflowComments: true
127+
SortIncludes: true
128+
SortUsingDeclarations: true
129+
SpaceAfterCStyleCast: false
130+
SpaceAfterTemplateKeyword: true
131+
SpaceBeforeAssignmentOperators: true
132+
SpaceBeforeCpp11BracedList: false
133+
SpaceBeforeCtorInitializerColon: true
134+
SpaceBeforeInheritanceColon: true
135+
SpaceBeforeParens: ControlStatements
136+
SpaceBeforeRangeBasedForLoopColon: true
137+
SpaceInEmptyParentheses: false
138+
SpacesBeforeTrailingComments: 2
139+
SpacesInAngles: false
140+
SpacesInContainerLiterals: true
141+
SpacesInCStyleCastParentheses: false
142+
SpacesInParentheses: false
143+
SpacesInSquareBrackets: false
144+
Standard: Auto
145+
StatementMacros:
146+
- Q_UNUSED
147+
- QT_REQUIRE_VERSION
148+
TabWidth: 8
149+
UseTab: Never
150+
...
151+
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CIFuzz
2+
on: [pull_request]
3+
jobs:
4+
Fuzzing:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Build Fuzzers
8+
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
9+
with:
10+
oss-fuzz-project-name: 'libcbor'
11+
dry-run: false
12+
- name: Run Fuzzers
13+
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
14+
with:
15+
oss-fuzz-project-name: 'libcbor'
16+
fuzz-seconds: 600
17+
dry-run: false
18+
- name: Upload Crash
19+
uses: actions/upload-artifact@v1
20+
if: failure()
21+
with:
22+
name: artifacts
23+
path: ./out/artifacts

extra/libcbor/.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
build
2+
*~
3+
nbproject
4+
.idea
5+
doxygen_docs
6+
*/*.out
7+
cmake-build-debug

extra/libcbor/.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "doxygen-theme"]
2+
path = doxygen-theme
3+
url = https://github.com/nnen/doxygen-theme.git

extra/libcbor/.travis.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
language: c
2+
3+
matrix:
4+
include:
5+
- arch: amd64
6+
os: linux
7+
dist: bionic
8+
compiler: clang
9+
env: TRAVIS_ARCH="amd64"
10+
- arch: amd64
11+
os: linux
12+
dist: bionic
13+
compiler: gcc
14+
env: TRAVIS_ARCH="amd64"
15+
- arch: arm64
16+
os: linux
17+
dist: bionic
18+
compiler: gcc
19+
env: TRAVIS_ARCH="arm64"
20+
- arch: ppc64le
21+
os: linux
22+
dist: bionic
23+
compiler: gcc
24+
env: TRAVIS_ARCH="ppc64le"
25+
- arch: amd64
26+
os: osx
27+
compiler: gcc
28+
env: TRAVIS_ARCH="amd64"
29+
30+
before_install:
31+
- pushd ${HOME}
32+
- git clone https://gitlab.com/cmocka/cmocka.git
33+
- cd cmocka && mkdir build && cd build
34+
- cmake .. && make -j2 && sudo make install
35+
- cd .. && popd
36+
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; sudo apt-get install -y clang-format-8 cppcheck; fi
37+
- if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" -a "$TRAVIS_ARCH" = "amd64" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi
38+
39+
script:
40+
- >
41+
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
42+
cppcheck . --error-exitcode=1
43+
# Fail if re-formatting creates diffs (implying bad formatting)
44+
/clang-format.sh --verbose
45+
git diff-index --quiet HEAD
46+
fi;
47+
- mkdir build && cd build
48+
- cmake -DWITH_TESTS=ON
49+
-DCBOR_CUSTOM_ALLOC=ON
50+
-DCMAKE_BUILD_TYPE=Debug
51+
-DSANITIZE=OFF
52+
..
53+
- make VERBOSE=1
54+
- ctest -VV
55+
- ctest -T memcheck | tee memcheck.out
56+
- >
57+
if grep -q 'Memory Leak\|IPW\|Uninitialized Memory Conditional\|Uninitialized Memory Read' memcheck.out; then
58+
exit 1
59+
fi;
60+
61+
62+
after_success:
63+
- if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" -a "$TRAVIS_ARCH" = "amd64" ]; then codecov; fi
64+
65+
notifications:
66+
email: false

extra/libcbor/CHANGELOG.md

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
Next
2+
---------------------
3+
- BUILD BREAKING: Use BUILD_SHARED_LIBS to determine how to build libraries (fixed Windows linkage) [[#148]](https://github.com/PJK/libcbor/pull/148) (by [intelligide@](https://github.com/intelligide))
4+
- BREAKING: Fix `cbor_tag_item` not increasing the reference count on the tagged item reference it returns [[Fixes #109](https://github.com/PJK/libcbor/issues/109)] (discovered bt [JohnGilmour](https://github.com/JohnGilmour))
5+
- If you have previously relied on the broken behavior, you can use `cbor_move` to emulate as long as the returned handle is an "rvalue"
6+
7+
0.7.0 (2020-04-25)
8+
---------------------
9+
- Fix bad encoding of NaN half-floats [[Fixes #53]](https://github.com/PJK/libcbor/issues/53) (discovered by [BSipos-RKF](https://github.com/BSipos-RKF))
10+
- **Warning**: Previous versions encoded NaNs as `0xf9e700` instead of `0xf97e00`; if you rely on the broken behavior, this will be a breaking change
11+
- Fix potentially bad encoding of negative half-float with exponent < -14 [[Fixes #112]](https://github.com/PJK/libcbor/issues/112) (discovered by [yami36](https://github.com/yami36))
12+
- BREAKING: Improved bool support [[Fixes #63]](https://github.com/PJK/libcbor/issues/63)
13+
- Rename `cbor_ctrl_is_bool` to `cbor_get_bool` and fix the behavior
14+
- Add `cbor_set_bool`
15+
- Fix memory_allocation_test breaking the build without CBOR_CUSTOM_ALLOC [[Fixes #128]](https://github.com/PJK/libcbor/issues/128) (by [panlinux](https://github.com/panlinux))
16+
- [Fix a potential build issue where cJSON includes may be misconfigured](https://github.com/PJK/libcbor/pull/132)
17+
- Breaking: [Add a limit on the size of the decoding context stack](https://github.com/PJK/libcbor/pull/138) (by [James-ZHANG](https://github.com/James-ZHANG))
18+
- If your usecase requires parsing very deeply nested structures, you might need to increase the default 2k limit via `CBOR_MAX_STACK_SIZE`
19+
- Enable LTO/IPO based on [CheckIPOSupported](https://cmake.org/cmake/help/latest/module/CheckIPOSupported.html#module:CheckIPOSupported) [[#143]](https://github.com/PJK/libcbor/pull/143) (by [xanderlent](https://github.com/xanderlent))
20+
- If you rely on LTO being enabled and use CMake version older than 3.9, you will need to re-enable it manually or upgrade your CMake
21+
22+
0.6.1 (2020-03-26)
23+
---------------------
24+
- [Fix bad shared library version number](https://github.com/PJK/libcbor/pull/131)
25+
- **Warning**: Shared library built from the 0.6.0 release is erroneously marked as version "0.6.0", which makes it incompatible with future releases *including the v0.6.X line* even though they may be compatible API/ABI-wise. Refer to the documentation for the new SO versioning scheme.
26+
27+
0.6.0 (2020-03-15)
28+
---------------------
29+
- Correctly set .so version [[Fixes #52]](https://github.com/PJK/libcbor/issues/52).
30+
- **Warning**: All previous releases will be identified as 0.0 by the linker.
31+
- Fix & prevent heap overflow error in example code [[#74]](https://github.com/PJK/libcbor/pull/74) [[#76]](https://github.com/PJK/libcbor/pull/76) (by @nevun)
32+
- Correctly set OSX dynamic library version [[Fixes #75]](https://github.com/PJK/libcbor/issues/75)
33+
- [Fix misplaced 0xFF bytes in maps possibly causing memory corruption](https://github.com/PJK/libcbor/pull/82)
34+
- BREAKING: Fix handling & cleanup of failed memory allocation in constructor
35+
and builder helper functions [[Fixes #84]](https://github.com/PJK/libcbor/issues/84)
36+
- All cbor_new_* and cbor_build_* functions will now explicitly return NULL when memory allocation fails
37+
- It is up to the client to handle such cases
38+
- Globally enforced code style [[Fixes #83]](https://github.com/PJK/libcbor/issues/83)
39+
- Fix issue possible memory corruption bug on repeated
40+
cbor_(byte)string_add_chunk calls with intermittently failing realloc calls
41+
- Fix possibly misaligned reads and writes when endian.h is uses or when
42+
running on a big-endian machine [[Fixes #99](https://github.com/PJK/libcbor/issues/99), [#100](https://github.com/PJK/libcbor/issues/100)]
43+
- [Improved CI setup with Travis-native arm64 support](https://github.com/PJK/libcbor/pull/116)
44+
- [Docs migrated to Sphinx 2.4 and Python3](https://github.com/PJK/libcbor/pull/117)
45+
46+
0.5.0 (2017-02-06)
47+
---------------------
48+
- Remove cmocka from the subtree (always rely on system or user-provided version)
49+
- Windows CI
50+
- Only build tests if explicitly enabled (`-DWITH_TESTS=ON`)
51+
- Fixed static header declarations (by cedric-d)
52+
- Improved documentation (by Michael Richardson)
53+
- Improved `examples/readfile.c`
54+
- Reworked (re)allocation to handle huge inputs and overflows in size_t [[Fixes #16]](https://github.com/PJK/libcbor/issues/16)
55+
- Improvements to C++ linkage (corrected `cbor_empty_callbacks`, fixed `restrict` pointers) (by Dennis Bijwaard)
56+
- Fixed Linux installation directory depending on architecture [[Fixes #34]](https://github.com/PJK/libcbor/issues/34) (by jvymazal)
57+
- Improved 32-bit support [[Fixes #35]](https://github.com/PJK/libcbor/issues/35)
58+
- Fixed MSVC compatibility [[Fixes #31]](https://github.com/PJK/libcbor/issues/31)
59+
- Fixed and improved half-float encoding [[Fixes #5](https://github.com/PJK/libcbor/issues/5), [#11](https://github.com/PJK/libcbor/issues/11)]
60+
61+
0.4.0 (2015-12-25)
62+
---------------------
63+
Breaks build & header compatibility due to:
64+
65+
- Improved build configuration and feature check macros
66+
- Endianess configuration fixes (by Erwin Kroon and David Grigsby)
67+
- pkg-config compatibility (by Vincent Bernat)
68+
- enable use of versioned SONAME (by Vincent Bernat)
69+
- better fuzzer (wasn't random until now, ooops)
70+
71+
0.3.1 (2015-05-21)
72+
---------------------
73+
- documentation and comments improvements, mostly for the API reference
74+
75+
0.3.0 (2015-05-21)
76+
---------------------
77+
78+
- Fixes, polishing, niceties across the code base
79+
- Updated examples
80+
- `cbor_copy`
81+
- `cbor_build_negint8`, 16, 32, 64, matching asserts
82+
- `cbor_build_stringn`
83+
- `cbor_build_tag`
84+
- `cbor_build_float2`, ...
85+
86+
0.2.1 (2015-05-17)
87+
---------------------
88+
- C99 support
89+
90+
0.2.0 (2015-05-17)
91+
---------------------
92+
93+
- `cbor_ctrl_bool` -> `cbor_ctrl_is_bool`
94+
- Added `cbor_array_allocated` & map equivalent
95+
- Overhauled endianess conversion - ARM now works as expected
96+
- 'sort.c' example added
97+
- Significantly improved and doxyfied documentation
98+
99+
0.1.0 (2015-05-06)
100+
---------------------
101+
102+
The initial release, yay!

0 commit comments

Comments
 (0)