diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-11-20 16:30:23 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-11-20 16:30:23 +0000 |
commit | 52c65ff6607aee6ae0afd05555b6931e573dc659 (patch) | |
tree | 1faab25ffb6581425a0e3914755fda0ee4e3c443 | |
parent | e88dab516b30532329822bc89eb7856a962497f9 (diff) |
Add Copyright and license.
More details about BN_hex2bn(3) lifted from the OpenSSL manual,
but worded less clumsily.
-rw-r--r-- | lib/libcrypto/man/BN_bn2bin.3 | 70 |
1 files changed, 62 insertions, 8 deletions
diff --git a/lib/libcrypto/man/BN_bn2bin.3 b/lib/libcrypto/man/BN_bn2bin.3 index bf1c19ffd4d..082ae6ee535 100644 --- a/lib/libcrypto/man/BN_bn2bin.3 +++ b/lib/libcrypto/man/BN_bn2bin.3 @@ -1,6 +1,54 @@ -.\" $OpenBSD: BN_bn2bin.3,v 1.3 2016/11/08 22:19:45 jmc Exp $ +.\" $OpenBSD: BN_bn2bin.3,v 1.4 2016/11/20 16:30:22 schwarze Exp $ +.\" OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400 .\" -.Dd $Mdocdate: November 8 2016 $ +.\" This file was written by Ulf Moeller <ulf@openssl.org>. +.\" Copyright (c) 2000, 2002, 2016 The OpenSSL Project. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in +.\" the documentation and/or other materials provided with the +.\" distribution. +.\" +.\" 3. All advertising materials mentioning features or use of this +.\" software must display the following acknowledgment: +.\" "This product includes software developed by the OpenSSL Project +.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" +.\" +.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to +.\" endorse or promote products derived from this software without +.\" prior written permission. For written permission, please contact +.\" openssl-core@openssl.org. +.\" +.\" 5. Products derived from this software may not be called "OpenSSL" +.\" nor may "OpenSSL" appear in their names without prior written +.\" permission of the OpenSSL Project. +.\" +.\" 6. Redistributions of any form whatsoever must retain the following +.\" acknowledgment: +.\" "This product includes software developed by the OpenSSL Project +.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY +.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR +.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +.\" OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd $Mdocdate: November 20 2016 $ .Dt BN_BN2BIN 3 .Os .Sh NAME @@ -106,11 +154,15 @@ The string must be freed later using .Xr free 3 . .Pp .Fn BN_hex2bn -converts the string +interprets .Fa str -containing a hexadecimal number to a +as a hexadecimal number. +The string may start with a minus sign +.Pq Sq - . +Conversion stops at the first byte that is not a hexadecimal digit. +The number is converted to a .Vt BIGNUM -and stores it in +and stored in .Pf * Fa a . If .Pf * Fa a @@ -124,7 +176,7 @@ If is .Dv NULL , it only computes the number's length in hexadecimal digits. -If the string starts with a minus sign, the number is negative. +A "negative zero" is converted to zero. .Fn BN_dec2bn is the same using the decimal system. .Pp @@ -196,8 +248,10 @@ on error. .Fn BN_hex2bn and .Fn BN_dec2bn -return the number's length in hexadecimal or decimal digits, and 0 on -error. +return the number's length in hexadecimal or decimal digits +or 0 on error, in which case no new +.Vt BIGNUM +will be created. .Pp .Fn BN_print_fp and |