BuildRequires: pkgconfig(cynara-admin)
BuildRequires: pkgconfig(cynara-client-async)
BuildRequires: pkgconfig(security-privilege-manager)
-BuildRequires: pkgconfig(openssl)
+BuildRequires: pkgconfig(openssl1.1)
BuildRequires: pkgconfig(mount)
BuildRequires: boost-devel
%{?systemd_requires}
-# Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+# Copyright (c) 2017-2019 Samsung Electronics Co., 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.
REQUIRED
cynara-agent
libsystemd
- openssl
+ openssl1.1
)
SET(AGENT_SOURCES
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2017-2019 Samsung Electronics Co., 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.
int cn_pos = -1;
X509_NAME_ENTRY *cn_entry = nullptr;
ASN1_STRING *cn_asn1 = nullptr;
- char *cn_str = nullptr;
+ const char *cn_str = nullptr;
// Find the position of the CN field in the Subject field of the certificate
cn_pos = X509_NAME_get_index_by_NID(X509_get_subject_name((X509 *) cert.get()), NID_commonName, -1);
if (!cn_asn1) {
return -1;
}
- cn_str = (char *) ASN1_STRING_data(cn_asn1);
+ cn_str = (const char *) ASN1_STRING_get0_data(cn_asn1);
// Make sure there isn't an embedded NULL character in the CN
if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn_str)) {
} else if (0 == X509_STORE_CTX_init(storeCtx.get(), store.get(), clientCert.get(), nullptr)) { // check this nullptr
ALOGD("X509_STORE_CTX_init failed");
} else {
- X509_VERIFY_PARAM_set_flags(storeCtx->param, X509_V_FLAG_X509_STRICT);
+ X509_VERIFY_PARAM_set_flags(X509_STORE_CTX_get0_param(storeCtx.get()), X509_V_FLAG_X509_STRICT);
status = X509_verify_cert(storeCtx.get()); // 1 == ok; 0 == fail; -1 == error
}