|
@@ -106,11 +106,11 @@ static int int_der_w_integer(WPACKET *pkt, int tag,
|
|
|
&& int_end_context(pkt, tag);
|
|
|
}
|
|
|
|
|
|
-static int int_put_bytes_ulong(WPACKET *pkt, const void *v,
|
|
|
+static int int_put_bytes_uint32(WPACKET *pkt, const void *v,
|
|
|
unsigned int *top_byte)
|
|
|
{
|
|
|
- const unsigned long *value = v;
|
|
|
- unsigned long tmp = *value;
|
|
|
+ const uint32_t *value = v;
|
|
|
+ uint32_t tmp = *value;
|
|
|
size_t n = 0;
|
|
|
|
|
|
while (tmp != 0) {
|
|
@@ -125,9 +125,9 @@ static int int_put_bytes_ulong(WPACKET *pkt, const void *v,
|
|
|
}
|
|
|
|
|
|
/* For integers, we only support unsigned values for now */
|
|
|
-int ossl_DER_w_ulong(WPACKET *pkt, int tag, unsigned long v)
|
|
|
+int ossl_DER_w_uint32(WPACKET *pkt, int tag, uint32_t v)
|
|
|
{
|
|
|
- return int_der_w_integer(pkt, tag, int_put_bytes_ulong, &v);
|
|
|
+ return int_der_w_integer(pkt, tag, int_put_bytes_uint32, &v);
|
|
|
}
|
|
|
|
|
|
static int int_put_bytes_bn(WPACKET *pkt, const void *v,
|
|
@@ -153,7 +153,7 @@ int ossl_DER_w_bn(WPACKET *pkt, int tag, const BIGNUM *v)
|
|
|
if (v == NULL || BN_is_negative(v))
|
|
|
return 0;
|
|
|
if (BN_is_zero(v))
|
|
|
- return ossl_DER_w_ulong(pkt, tag, 0);
|
|
|
+ return ossl_DER_w_uint32(pkt, tag, 0);
|
|
|
|
|
|
return int_der_w_integer(pkt, tag, int_put_bytes_bn, v);
|
|
|
}
|