summaryrefslogtreecommitdiff
path: root/src/components/security_manager/include
diff options
context:
space:
mode:
authorAKalinich-Luxoft <AKalinich@luxoft.com>2017-06-21 14:44:07 +0300
committerAKalinich-Luxoft <AKalinich@luxoft.com>2017-06-22 16:22:12 +0300
commit5850a6840bab9630ede9a2fe9260a128e79c4093 (patch)
treee5481a7fdf3b8c48ea5008695420959ce5ad520b /src/components/security_manager/include
parent22a014b3746b28d2b8a3a4049c60bb76db6a0861 (diff)
downloadsdl_core-5850a6840bab9630ede9a2fe9260a128e79c4093.tar.gz
Fix SSL certificate output information in log
The problem was that SDL prints out to log full information about SSL certificates including CN and serial number. According to requirements It is correct for FS project, but incorrect for GENIVI. In this commit: - Added RemoveDisallowedInfo() function to filter disallowed params from input data - Added string filtering for subject and issuer data - C-style casts were replaced with C++ casts for ASN1_TIME - Small code refactoring in PrintCertData() function
Diffstat (limited to 'src/components/security_manager/include')
-rw-r--r--src/components/security_manager/include/security_manager/crypto_manager_impl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/components/security_manager/include/security_manager/crypto_manager_impl.h b/src/components/security_manager/include/security_manager/crypto_manager_impl.h
index 6aea2e28b1..4daf58b004 100644
--- a/src/components/security_manager/include/security_manager/crypto_manager_impl.h
+++ b/src/components/security_manager/include/security_manager/crypto_manager_impl.h
@@ -80,6 +80,15 @@ class CryptoManagerImpl : public CryptoManager {
private:
void PrintCertInfo();
+
+ /**
+ * @brief Removes disallowed for printing certificate information from input
+ * data
+ * @param in_data input data with certificate information
+ * @return filtered string with allowed for printing information
+ */
+ const std::string RemoveDisallowedInfo(X509_NAME* in_data) const;
+
HandshakeResult CheckCertContext();
bool ReadHandshakeData(const uint8_t** const out_data,
size_t* out_data_size);