Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
bctoolbox
Commits
6974ec34
Commit
6974ec34
authored
Feb 09, 2016
by
jehan
Browse files
fix cmake builder integration
parent
47dfcd36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
CMakeLists.txt
CMakeLists.txt
+6
-2
src/crypto_polarssl.c
src/crypto_polarssl.c
+1
-1
No files found.
CMakeLists.txt
View file @
6974ec34
...
...
@@ -33,6 +33,8 @@ set(PACKAGE_TARNAME "bctoolbox")
set
(
PACKAGE_URL
""
)
set
(
VERSION
"
${
PACKAGE_VERSION
}
"
)
option
(
ENABLE_POLARSSL
"Enable polarssl support"
ON
)
option
(
ENABLE_MBEDTLS
"Enable mabedtls support"
OFF
)
include
(
CheckLibraryExists
)
include
(
CheckSymbolExists
)
...
...
@@ -47,9 +49,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
find_package
(
MbedTLS
)
if
(
MBEDTLS_FOUND
)
if
(
ENABLE_MBEDTLS AND
MBEDTLS_FOUND
)
message
(
"Use mbedTLS"
)
else
(
)
else
if
(
ENABLE_POLARSSL
)
find_package
(
PolarSSL
)
if
(
POLARSSL_FOUND
)
message
(
"Use polarSSL"
)
...
...
@@ -60,6 +62,8 @@ else()
else
()
message
(
FATAL_ERROR
" No polarSSL or mbedTLS found"
)
endif
()
else
()
message
(
FATAL_ERROR
"Neither polarSSL nor mbedTLS enabled"
)
endif
()
set
(
prefix
${
CMAKE_INSTALL_PREFIX
}
)
...
...
src/crypto_polarssl.c
View file @
6974ec34
...
...
@@ -378,7 +378,7 @@ int32_t bctoolbox_x509_certificate_get_fingerprint(const bctoolbox_x509_certific
unsigned
char
buffer
[
64
]
=
{
0
};
/* buffer is max length of returned hash, which is 64 in case we use sha-512 */
size_t
hash_length
=
0
;
const
char
*
hash_alg_string
=
NULL
;
size_t
fingerprint_size
;
size_t
fingerprint_size
=
0
;
x509_crt
*
crt
;
md_type_t
hash_id
;
if
(
certificate
==
NULL
)
return
BCTOOLBOX_ERROR_INVALID_CERTIFICATE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment