aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/asn1/asn1_obj.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_obj.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_obj.cpp')
-rw-r--r--src/lib/asn1/asn1_obj.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/asn1/asn1_obj.cpp b/src/lib/asn1/asn1_obj.cpp
index 7bf2d92ca..4ccb11c3f 100644
--- a/src/lib/asn1/asn1_obj.cpp
+++ b/src/lib/asn1/asn1_obj.cpp
@@ -32,7 +32,7 @@ namespace ASN1 {
/*
* Put some arbitrary bytes into a SEQUENCE
*/
-std::vector<byte> put_in_sequence(const std::vector<byte>& contents)
+std::vector<uint8_t> put_in_sequence(const std::vector<uint8_t>& contents)
{
return DER_Encoder()
.start_cons(SEQUENCE)
@@ -54,14 +54,14 @@ std::string to_string(const BER_Object& obj)
*/
bool maybe_BER(DataSource& source)
{
- byte first_byte;
- if(!source.peek_byte(first_byte))
+ uint8_t first_u8;
+ if(!source.peek_byte(first_u8))
{
- BOTAN_ASSERT_EQUAL(source.read_byte(first_byte), 0, "Expected EOF");
+ BOTAN_ASSERT_EQUAL(source.read_byte(first_u8), 0, "Expected EOF");
throw Stream_IO_Error("ASN1::maybe_BER: Source was empty");
}
- if(first_byte == (SEQUENCE | CONSTRUCTED))
+ if(first_u8 == (SEQUENCE | CONSTRUCTED))
return true;
return false;
}