From 5850a6840bab9630ede9a2fe9260a128e79c4093 Mon Sep 17 00:00:00 2001 From: AKalinich-Luxoft Date: Wed, 21 Jun 2017 14:44:07 +0300 Subject: 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 --- .../include/security_manager/crypto_manager_impl.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/components/security_manager/include') 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); -- cgit v1.2.1