diff options
author | Daniel Neus <[email protected]> | 2016-01-11 11:55:42 +0100 |
---|---|---|
committer | Daniel Neus <[email protected]> | 2016-03-05 19:50:29 +0100 |
commit | f95cd9245d2e889a756b187452dafaf68e795179 (patch) | |
tree | d0d8afe2159821f3c89545ea7711fba05c97e720 /src/lib/cert/x509 | |
parent | a3ce0bd1e9e018ea69741c4380bf065cccedec93 (diff) |
Remaining cppcheck fixes that are not covered by GH #444
Diffstat (limited to 'src/lib/cert/x509')
-rw-r--r-- | src/lib/cert/x509/x509_ext.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/lib/cert/x509/x509_ext.cpp b/src/lib/cert/x509/x509_ext.cpp index b2a53181b..7dd4a3190 100644 --- a/src/lib/cert/x509/x509_ext.cpp +++ b/src/lib/cert/x509/x509_ext.cpp @@ -309,11 +309,8 @@ void Subject_Key_ID::contents_to(Data_Store& subject, Data_Store&) const /* * Subject_Key_ID Constructor */ -Subject_Key_ID::Subject_Key_ID(const std::vector<byte>& pub_key) - { - SHA_160 hash; - m_key_id = unlock(hash.process(pub_key)); - } +Subject_Key_ID::Subject_Key_ID(const std::vector<byte>& pub_key) : m_key_id(unlock(SHA_160().process(pub_key))) + {} /* * Encode the extension @@ -384,11 +381,8 @@ void Alternative_Name::contents_to(Data_Store& subject_info, * Alternative_Name Constructor */ Alternative_Name::Alternative_Name(const AlternativeName& alt_name, - const std::string& oid_name_str) - { - this->m_alt_name = alt_name; - this->m_oid_name_str = oid_name_str; - } + const std::string& oid_name_str) : m_alt_name(alt_name), m_oid_name_str(oid_name_str) + {} /* * Subject_Alternative_Name Constructor @@ -476,7 +470,7 @@ std::vector<byte> Certificate_Policies::encode_inner() const std::vector<Policy_Information> policies; for(size_t i = 0; i != m_oids.size(); ++i) - policies.push_back(Policy_Information( m_oids[i] )); + policies.push_back(Policy_Information(m_oids[i])); return DER_Encoder() .start_cons(SEQUENCE) |