diff options
author | Jack Lloyd <[email protected]> | 2018-12-23 14:21:48 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-12-23 14:21:48 -0500 |
commit | f10db2ae3d361132202e8e31376374d0d280482a (patch) | |
tree | 9997453e4d28a1a9e4495c44a97f3ac934dc470d /src/lib/x509/x509_ext.cpp | |
parent | 935506524f7bcf52d10662a08a4e3e1376cd180a (diff) |
Make significant_words const time also
Only used in one place, where const time doesn't matter, but can't hurt.
Remove low_bit, can be replaced by ctz.
Diffstat (limited to 'src/lib/x509/x509_ext.cpp')
-rw-r--r-- | src/lib/x509/x509_ext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/x509/x509_ext.cpp b/src/lib/x509/x509_ext.cpp index 97c291f6e..a6bc09a82 100644 --- a/src/lib/x509/x509_ext.cpp +++ b/src/lib/x509/x509_ext.cpp @@ -345,7 +345,7 @@ std::vector<uint8_t> Key_Usage::encode_inner() const if(m_constraints == NO_CONSTRAINTS) throw Encoding_Error("Cannot encode zero usage constraints"); - const size_t unused_bits = low_bit(m_constraints) - 1; + const size_t unused_bits = ctz(static_cast<uint32_t>(m_constraints)); std::vector<uint8_t> der; der.push_back(BIT_STRING); |