summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-05-19 17:02:29 +0100
committerDr. Stephen Henson <steve@openssl.org>2015-05-20 15:04:19 +0100
commitc5f2810581380bc248279207a4c58a126047acd8 (patch)
tree13b1e96391f89ddfddeae8c8e3792fe7dbf4507c /doc
parentde57d2372985d2640ae82f7954bf9dc07caf2f09 (diff)
Add functions to convert between uint64_t and ASN1_INTEGER.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/crypto/ASN1_INTEGER_get_int64.pod10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/crypto/ASN1_INTEGER_get_int64.pod b/doc/crypto/ASN1_INTEGER_get_int64.pod
index 98944b8ba3..8911afdc2b 100644
--- a/doc/crypto/ASN1_INTEGER_get_int64.pod
+++ b/doc/crypto/ASN1_INTEGER_get_int64.pod
@@ -14,6 +14,9 @@ ASN1_INTEGER_get_int64, ASN1_INTEGER_get, ASN1_INTEGER_set_int64, ASN1_INTEGER_s
int ASN1_INTEGER_set_int64(ASN1_INTEGER *a, int64_t r);
long ASN1_INTEGER_set(const ASN1_INTEGER *a);
+ int ASN1_INTEGER_get_uint64(uint64_t *pr, const ASN1_INTEGER *a);
+ int ASN1_INTEGER_set_uint64(ASN1_INTEGER *a, uint64_t r);
+
ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
@@ -36,6 +39,10 @@ If successful it returns 1 and sets B<*pr> to the value of B<a>. If it fails
(due to invalid type or the value being too big to fit into an B<int64_t> type)
it returns 0.
+ASN1_INTEGER_get_uint64() is similar to ASN1_INTEGER_get_int64_t() except it
+converts to a B<uint64_t> type and an error is returned if the passed integer
+is negative.
+
ASN1_INTEGER_get() also returns the value of B<a> but it returns 0 if B<a> is
NULL and -1 on error (which is ambiguous because -1 is a legitimate value for
an B<ASN1_INTEGER>). New applications should use ASN1_INTEGER_get_int64()
@@ -44,6 +51,9 @@ instead.
ASN1_INTEGER_set_int64() sets the value of B<ASN1_INTEGER> B<a> to the
B<int64_t> value B<r>.
+ASN1_INTEGER_set_uint64() sets the value of B<ASN1_INTEGER> B<a> to the
+B<uint64_t> value B<r>.
+
ASN1_INTEGER_set() sets the value of B<ASN1_INTEGER> B<a> to the B<long> value
B<v>.