summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/der_writer.c12
-rw-r--r--doc/internal/man3/ossl_DER_w_bn.pod6
-rw-r--r--doc/internal/man7/DERlib.pod2
-rw-r--r--include/internal/der.h2
-rw-r--r--providers/common/der/der_rsa_key.c4
5 files changed, 13 insertions, 13 deletions
diff --git a/crypto/der_writer.c b/crypto/der_writer.c
index c6fd4c4298..bd330785f9 100644
--- a/crypto/der_writer.c
+++ b/crypto/der_writer.c
@@ -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);
}
diff --git a/doc/internal/man3/ossl_DER_w_bn.pod b/doc/internal/man3/ossl_DER_w_bn.pod
index a5bdd848bf..3d67067a9e 100644
--- a/doc/internal/man3/ossl_DER_w_bn.pod
+++ b/doc/internal/man3/ossl_DER_w_bn.pod
@@ -2,7 +2,7 @@
=head1 NAME
-ossl_DER_w_boolean, ossl_DER_w_ulong, ossl_DER_w_bn, ossl_DER_w_null,
+ossl_DER_w_boolean, ossl_DER_w_uint32, ossl_DER_w_bn, ossl_DER_w_null,
ossl_DER_w_octet_string, ossl_DER_w_octet_string_uint32
- internal DER writers for DER primitives
@@ -11,7 +11,7 @@ ossl_DER_w_octet_string, ossl_DER_w_octet_string_uint32
#include "internal/der.h"
int ossl_DER_w_boolean(WPACKET *pkt, int tag, int b);
- int ossl_DER_w_ulong(WPACKET *pkt, int tag, unsigned long v);
+ int ossl_DER_w_uint32(WPACKET *pkt, int tag, uint32_t v);
int ossl_DER_w_bn(WPACKET *pkt, int tag, const BIGNUM *v);
int ossl_DER_w_null(WPACKET *pkt, int tag);
int ossl_DER_w_octet_string(WPACKET *pkt, int tag,
@@ -29,7 +29,7 @@ ossl_DER_w_boolean() writes the primitive BOOLEAN using the value I<b>.
Any value that evaluates as true will render a B<true> BOOLEAN,
otherwise a B<false> BOOLEAN.
-ossl_DER_w_ulong() and ossl_DER_w_bn() both write the primitive INTEGER using
+ossl_DER_w_uint32() and ossl_DER_w_bn() both write the primitive INTEGER using
the value I<v>.
=for comment Other similar functions for diverse C integers should be
diff --git a/doc/internal/man7/DERlib.pod b/doc/internal/man7/DERlib.pod
index 3129a9b74d..f4f3abab51 100644
--- a/doc/internal/man7/DERlib.pod
+++ b/doc/internal/man7/DERlib.pod
@@ -118,7 +118,7 @@ value:
{
return ossl_DER_w_begin_sequence(pkt, tag)
&& (ossl_DER_w_begin_sequence(pkt, DER_NO_CONTEXT)
- && ossl_DER_w_ulong(pkt, 2, 20)
+ && ossl_DER_w_uint32(pkt, 2, 20)
&& ossl_DER_w_precompiled(pkt, 1,
der_mgf1SHA256Identifier,
sizeof(der_mgf1SHA256Identifier))
diff --git a/include/internal/der.h b/include/internal/der.h
index 86b0d936e0..8d6db8f066 100644
--- a/include/internal/der.h
+++ b/include/internal/der.h
@@ -78,7 +78,7 @@ int ossl_DER_w_precompiled(WPACKET *pkt, int tag,
size_t precompiled_n);
int ossl_DER_w_boolean(WPACKET *pkt, int tag, int b);
-int ossl_DER_w_ulong(WPACKET *pkt, int tag, unsigned long v);
+int ossl_DER_w_uint32(WPACKET *pkt, int tag, uint32_t v);
int ossl_DER_w_bn(WPACKET *pkt, int tag, const BIGNUM *v);
int ossl_DER_w_null(WPACKET *pkt, int tag);
int ossl_DER_w_octet_string(WPACKET *pkt, int tag,
diff --git a/providers/common/der/der_rsa_key.c b/providers/common/der/der_rsa_key.c
index e1c078b906..4bad32ee6d 100644
--- a/providers/common/der/der_rsa_key.c
+++ b/providers/common/der/der_rsa_key.c
@@ -347,8 +347,8 @@ int ossl_DER_w_RSASSA_PSS_params(WPACKET *pkt, int tag,
return ossl_DER_w_begin_sequence(pkt, tag)
&& (trailerfield == default_trailerfield
- || ossl_DER_w_ulong(pkt, 3, trailerfield))
- && (saltlen == default_saltlen || ossl_DER_w_ulong(pkt, 2, saltlen))
+ || ossl_DER_w_uint32(pkt, 3, trailerfield))
+ && (saltlen == default_saltlen || ossl_DER_w_uint32(pkt, 2, saltlen))
&& DER_w_MaskGenAlgorithm(pkt, 1, pss)
&& (hashalg_nid == default_hashalg_nid
|| ossl_DER_w_precompiled(pkt, 0, hashalg, hashalg_sz))