summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2023-07-07 07:04:24 +0000
committertb <>2023-07-07 07:04:24 +0000
commit87bbb7970b95630cb663ed01ef2de6f7c27882b1 (patch)
tree617adce64963a7366ea2ffb3459423c8ef55f783 /src
parentded7e344eeedbff393fe259288df7a0f543c49ba (diff)
downloadopenbsd-87bbb7970b95630cb663ed01ef2de6f7c27882b1.tar.gz
openbsd-87bbb7970b95630cb663ed01ef2de6f7c27882b1.tar.bz2
openbsd-87bbb7970b95630cb663ed01ef2de6f7c27882b1.zip
Use an unsigned long long and corresponding formats
Fixes build on 32 bit. Reported by claudio
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bn/bn_print.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_print.c b/src/lib/libcrypto/bn/bn_print.c
index 18984d7d4f..84b8203968 100644
--- a/src/lib/libcrypto/bn/bn_print.c
+++ b/src/lib/libcrypto/bn/bn_print.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_print.c,v 1.41 2023/07/07 06:41:59 tb Exp $ */ 1/* $OpenBSD: bn_print.c,v 1.42 2023/07/07 07:04:24 tb Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2023 Theo Buehler <tb@openbsd.org>
@@ -41,7 +41,7 @@ bn_print_zero(BIO *bio, const BIGNUM *bn)
41static int 41static int
42bn_print_word(BIO *bio, const BIGNUM *bn) 42bn_print_word(BIO *bio, const BIGNUM *bn)
43{ 43{
44 BN_ULONG word; 44 unsigned long long word;
45 const char *neg = ""; 45 const char *neg = "";
46 46
47 if (BN_is_zero(bn) || BN_num_bytes(bn) > BN_BYTES) 47 if (BN_is_zero(bn) || BN_num_bytes(bn) > BN_BYTES)
@@ -51,7 +51,7 @@ bn_print_word(BIO *bio, const BIGNUM *bn)
51 neg = "-"; 51 neg = "-";
52 52
53 word = BN_get_word(bn); 53 word = BN_get_word(bn);
54 if (BIO_printf(bio, " %s%lu (%s0x%lx)\n", neg, word, neg, word) <= 0) 54 if (BIO_printf(bio, " %s%llu (%s0x%llx)\n", neg, word, neg, word) <= 0)
55 return 0; 55 return 0;
56 56
57 return 1; 57 return 1;