aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/asn1/asn1_oid.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-12-11 15:28:38 -0500
committerJack Lloyd <[email protected]>2016-12-18 16:48:24 -0500
commitf3cb3edb512bdcab498d825886c3366c341b3f78 (patch)
tree645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/asn1/asn1_oid.cpp
parentc1dd21253c1f3188ff45d3ad47698efd08235ae8 (diff)
Convert to using standard uintN_t integer types
Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
Diffstat (limited to 'src/lib/asn1/asn1_oid.cpp')
-rw-r--r--src/lib/asn1/asn1_oid.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/asn1/asn1_oid.cpp b/src/lib/asn1/asn1_oid.cpp
index 5b0a557d2..d9436e6d9 100644
--- a/src/lib/asn1/asn1_oid.cpp
+++ b/src/lib/asn1/asn1_oid.cpp
@@ -75,7 +75,7 @@ bool OID::operator==(const OID& oid) const
/*
* Append another component to the OID
*/
-OID& OID::operator+=(u32bit component)
+OID& OID::operator+=(uint32_t component)
{
m_id.push_back(component);
return (*this);
@@ -84,7 +84,7 @@ OID& OID::operator+=(u32bit component)
/*
* Append another component to the OID
*/
-OID operator+(const OID& oid, u32bit component)
+OID operator+(const OID& oid, uint32_t component)
{
OID new_oid(oid);
new_oid += component;
@@ -104,8 +104,8 @@ bool operator!=(const OID& a, const OID& b)
*/
bool operator<(const OID& a, const OID& b)
{
- const std::vector<u32bit>& oid1 = a.get_id();
- const std::vector<u32bit>& oid2 = b.get_id();
+ const std::vector<uint32_t>& oid1 = a.get_id();
+ const std::vector<uint32_t>& oid2 = b.get_id();
if(oid1.size() < oid2.size())
return true;
@@ -129,7 +129,7 @@ void OID::encode_into(DER_Encoder& der) const
if(m_id.size() < 2)
throw Invalid_Argument("OID::encode_into: OID is invalid");
- std::vector<byte> encoding;
+ std::vector<uint8_t> encoding;
encoding.push_back(40 * m_id[0] + m_id[1]);
for(size_t i = 2; i != m_id.size(); ++i)
@@ -171,7 +171,7 @@ void OID::decode_from(BER_Decoder& decoder)
size_t i = 0;
while(i != obj.value.size() - 1)
{
- u32bit component = 0;
+ uint32_t component = 0;
while(i != obj.value.size() - 1)
{
++i;