diff options
author | schwarze <> | 2015-02-23 17:43:24 +0000 |
---|---|---|
committer | schwarze <> | 2015-02-23 17:43:24 +0000 |
commit | 9cb1a51933a1847042ee88e16d560485f682bcad (patch) | |
tree | 5a76fb973ee649bdb33c7731bc1ca457abfcec1e /src/lib/libcrypto/man/BN_new.3 | |
parent | 2820d04ee847cb7bede0b25e49194c3ade7ebdbf (diff) | |
download | openbsd-9cb1a51933a1847042ee88e16d560485f682bcad.tar.gz openbsd-9cb1a51933a1847042ee88e16d560485f682bcad.tar.bz2 openbsd-9cb1a51933a1847042ee88e16d560485f682bcad.zip |
fourth batch of perlpod(1) to mdoc(7) conversion
Diffstat (limited to 'src/lib/libcrypto/man/BN_new.3')
-rw-r--r-- | src/lib/libcrypto/man/BN_new.3 | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/BN_new.3 b/src/lib/libcrypto/man/BN_new.3 new file mode 100644 index 0000000000..ad8ce886d9 --- /dev/null +++ b/src/lib/libcrypto/man/BN_new.3 | |||
@@ -0,0 +1,84 @@ | |||
1 | .Dd $Mdocdate: February 23 2015 $ | ||
2 | .Dt BN_NEW 3 | ||
3 | .Os | ||
4 | .Sh NAME | ||
5 | .Nm BN_new , | ||
6 | .Nm BN_init , | ||
7 | .Nm BN_clear , | ||
8 | .Nm BN_free , | ||
9 | .Nm BN_clear_free | ||
10 | .Nd allocate and free BIGNUMs | ||
11 | .Sh SYNOPSIS | ||
12 | .In openssl/bn.h | ||
13 | .Ft BIGNUM * | ||
14 | .Fo BN_new | ||
15 | .Fa void | ||
16 | .Fc | ||
17 | .Ft void | ||
18 | .Fo BN_init | ||
19 | .Fa "BIGNUM *" | ||
20 | .Fc | ||
21 | .Ft void | ||
22 | .Fo BN_clear | ||
23 | .Fa "BIGNUM *a" | ||
24 | .Fc | ||
25 | .Ft void | ||
26 | .Fo BN_free | ||
27 | .Fa "BIGNUM *a" | ||
28 | .Fc | ||
29 | .Ft void | ||
30 | .Fo BN_clear_free | ||
31 | .Fa "BIGNUM *a" | ||
32 | .Fc | ||
33 | .Sh DESCRIPTION | ||
34 | .Fn BN_new | ||
35 | allocates and initializes a | ||
36 | .Vt BIGNUM | ||
37 | structure. | ||
38 | .Fn BN_init | ||
39 | initializes an existing uninitialized | ||
40 | .Vt BIGNUM . | ||
41 | .Pp | ||
42 | .Fn BN_clear | ||
43 | is used to destroy sensitive data such as keys when they are no longer | ||
44 | needed. | ||
45 | It erases the memory used by | ||
46 | .Fa a | ||
47 | and sets it to the value 0. | ||
48 | .Pp | ||
49 | .Fn BN_free | ||
50 | frees the components of the | ||
51 | .Vt BIGNUM , | ||
52 | and if it was created by | ||
53 | .Fn BN_new , | ||
54 | also the structure itself. | ||
55 | .Fn BN_clear_free | ||
56 | additionally overwrites the data before the memory is returned to the | ||
57 | system. | ||
58 | .Sh RETURN VALUES | ||
59 | .Fn BN_new | ||
60 | returns a pointer to the | ||
61 | .Vt BIGNUM . | ||
62 | If the allocation fails, it returns | ||
63 | .Dv NULL | ||
64 | and sets an error code that can be obtained by | ||
65 | .Xr ERR_get_error 3 . | ||
66 | .Pp | ||
67 | .Fn BN_init , | ||
68 | .Fn BN_clear , | ||
69 | .Fn BN_free , | ||
70 | and | ||
71 | .Fn BN_clear_free | ||
72 | return no values. | ||
73 | .Sh SEE ALSO | ||
74 | .Xr bn 3 , | ||
75 | .Xr ERR_get_error 3 | ||
76 | .Sh HISTORY | ||
77 | .Fn BN_new , | ||
78 | .Fn BN_clear , | ||
79 | .Fn BN_free , | ||
80 | and | ||
81 | .Fn BN_clear_free | ||
82 | are available in all versions on SSLeay and OpenSSL. | ||
83 | .Fn BN_init | ||
84 | was added in SSLeay 0.9.1b. | ||