update docs with descriptions and deprecation
[openssl.git] / doc / crypto / ASN1_INTEGER_get_int64.pod
index 98944b8ba3640bef8f65302c1f4421a138125a4b..9299a51267942429e6bfaf425dc22e29a6965a35 100644 (file)
@@ -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>.
 
@@ -75,9 +85,9 @@ an appropriate C integer type.
 
 =head1 BUGS
 
-The ambigious return values of ASN1_INTEGER_get() and ASN1_ENUMERATED_get()
+The ambiguous return values of ASN1_INTEGER_get() and ASN1_ENUMERATED_get()
 mean these functions should be avoided if possible. They are retained for
-compatibility. Normally the ambigious return values are not legitimate
+compatibility. Normally the ambiguous return values are not legitimate
 values for the fields they represent.
 
 =head1 RETURN VALUES
@@ -96,12 +106,12 @@ B<ASN1_ENUMERATED> structure respectively or NULL if an error occurs. They will
 only fail due to a memory allocation error.
 
 ASN1_INTEGER_to_BN() and ASN1_ENUMERATED_to_BN() return a B<BIGNUM> structure
-of NULL if an error occurs. They can fail if the pased type is incorrect
+of NULL if an error occurs. They can fail if the passed type is incorrect
 (due to programming error) or due to a memory allocation failure.
 
 =head1 SEE ALSO
 
-L<ERR_get_error(3)|ERR_get_error(3)>
+L<ERR_get_error(3)>
 
 =head1 HISTORY
 
@@ -109,4 +119,13 @@ ASN1_INTEGER_set_int64(), ASN1_INTEGER_get_int64(),
 ASN1_ENUMERATED_set_int64() and ASN1_ENUMERATED_get_int64()
 were added to OpenSSL 1.1.0.
 
+=head1 COPYRIGHT
+
+Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
+
+Licensed under the OpenSSL license (the "License").  You may not use
+this file except in compliance with the License.  You can obtain a copy
+in the file LICENSE in the source distribution or at
+L<https://www.openssl.org/source/license.html>.
+
 =cut