Commit d21297e6 authored by johan's avatar johan

Merge branch 'master' of git.linphone.org:bctoolbox

parents 2af1acae f0080ffc
LOCAL_PATH:= $(call my-dir)/../../src/
include $(CLEAR_VARS)
LOCAL_MODULE:= libbctoolbox
LOCAL_SRC_FILES := \
crypto_mbedtls.c
LOCAL_CFLAGS += -Wno-maybe-uninitialized
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/ \
$(LOCAL_PATH)/../include \
$(LOCAL_PATH)/../../externals/mbedtls/include
LOCAL_STATIC_LIBRARIES := \
mbedtls
include $(BUILD_STATIC_LIBRARY)
LOCAL_PATH:= $(call my-dir)/../../src/
include $(CLEAR_VARS)
LOCAL_MODULE:= libbctoolbox
LOCAL_SRC_FILES := \
crypto_polarssl.c
LOCAL_CFLAGS += -Wno-maybe-uninitialized
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/ \
$(LOCAL_PATH)/../include \
$(LOCAL_PATH)/../../externals/polarssl/include
LOCAL_STATIC_LIBRARIES := \
polarssl
include $(BUILD_STATIC_LIBRARY)
......@@ -326,7 +326,7 @@ int32_t bctoolbox_x509_certificate_generate_selfsigned(const char *subject, bcto
/* copy the key+cert in pem format into the given buffer */
if (pem != NULL) {
if (strlen(file_buffer)+1>pem_length) {
bctoolbox_error("Certificate generation can't copy the certificate to pem buffer: too short [%ld] but need [%ld] bytes", pem_length, strlen(file_buffer));
bctoolbox_error("Certificate generation can't copy the certificate to pem buffer: too short [%ld] but need [%ld] bytes", (long)pem_length, (long)strlen(file_buffer));
return BCTOOLBOX_ERROR_OUTPUT_BUFFER_TOO_SMALL;
}
strncpy(pem, file_buffer, pem_length);
......
......@@ -315,7 +315,7 @@ int32_t bctoolbox_x509_certificate_generate_selfsigned(const char *subject, bcto
/* copy the key+cert in pem format into the given buffer */
if (pem != NULL) {
if (strlen(file_buffer)+1>pem_length) {
bctoolbox_error("Certificate generation can't copy the certificate to pem buffer: too short [%ld] but need [%ld] bytes", pem_length, strlen(file_buffer));
bctoolbox_error("Certificate generation can't copy the certificate to pem buffer: too short [%ld] but need [%ld] bytes", (long)pem_length, (long)strlen(file_buffer));
return BCTOOLBOX_ERROR_OUTPUT_BUFFER_TOO_SMALL;
}
strncpy(pem, file_buffer, pem_length);
......
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