diff options
Diffstat (limited to 'src/lib/libcrypto/man/BN_CTX_new.3')
-rw-r--r-- | src/lib/libcrypto/man/BN_CTX_new.3 | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/BN_CTX_new.3 b/src/lib/libcrypto/man/BN_CTX_new.3 new file mode 100644 index 0000000000..1a77314854 --- /dev/null +++ b/src/lib/libcrypto/man/BN_CTX_new.3 | |||
@@ -0,0 +1,91 @@ | |||
1 | .Dd $Mdocdate: February 23 2015 $ | ||
2 | .Dt BN_CTX_NEW 3 | ||
3 | .Os | ||
4 | .Sh NAME | ||
5 | .Nm BN_CTX_new , | ||
6 | .Nm BN_CTX_init , | ||
7 | .Nm BN_CTX_free | ||
8 | .Nd allocate and free BN_CTX structures | ||
9 | .Sh SYNOPSIS | ||
10 | .In openssl/bn.h | ||
11 | .Ft BN_CTX * | ||
12 | .Fo BN_CTX_new | ||
13 | .Fa void | ||
14 | .Fc | ||
15 | .Ft void | ||
16 | .Fo BN_CTX_free | ||
17 | .Fa "BN_CTX *c" | ||
18 | .Fc | ||
19 | .Pp | ||
20 | Deprecated: | ||
21 | .Pp | ||
22 | .Ft void | ||
23 | .Fo BN_CTX_init | ||
24 | .Fa "BN_CTX *c" | ||
25 | .Fc | ||
26 | .Sh DESCRIPTION | ||
27 | A | ||
28 | .Vt BN_CTX | ||
29 | is a structure that holds | ||
30 | .Vt BIGNUM | ||
31 | temporary variables used by library functions. | ||
32 | Since dynamic memory allocation to create | ||
33 | .Vt BIGNUM Ns s | ||
34 | is rather expensive when used in conjunction with repeated subroutine | ||
35 | calls, the | ||
36 | .Vt BN_CTX | ||
37 | structure is used. | ||
38 | .Pp | ||
39 | .Fn BN_CTX_new | ||
40 | allocates and initializes a | ||
41 | .Vt BN_CTX | ||
42 | structure. | ||
43 | .Pp | ||
44 | .Fn BN_CTX_free | ||
45 | frees the components of the | ||
46 | .Vt BN_CTX , | ||
47 | and if it was created by | ||
48 | .Fn BN_CTX_new , | ||
49 | also the structure itself. | ||
50 | If | ||
51 | .Xr BN_CTX_start 3 | ||
52 | has been used on the | ||
53 | .Vt BN_CTX , | ||
54 | .Xr BN_CTX_end 3 | ||
55 | must be called before the | ||
56 | .Vt BN_CTX | ||
57 | may be freed by | ||
58 | .Fn BN_CTX_free . | ||
59 | .Pp | ||
60 | .Fn BN_CTX_init | ||
61 | (deprecated) initializes an existing uninitialized | ||
62 | .Vt BN_CTX . | ||
63 | This should not be used for new programs. | ||
64 | Use | ||
65 | .Fn BN_CTX_new | ||
66 | instead. | ||
67 | .Sh RETURN VALUES | ||
68 | .Fn BN_CTX_new | ||
69 | returns a pointer to the | ||
70 | .Vt BN_CTX . | ||
71 | If the allocation fails, it returns | ||
72 | .Dv NULL | ||
73 | and sets an error code that can be obtained by | ||
74 | .Xr ERR_get_error 3 . | ||
75 | .Pp | ||
76 | .Fn BN_CTX_init | ||
77 | and | ||
78 | .Fn BN_CTX_free | ||
79 | return no value. | ||
80 | .Sh SEE ALSO | ||
81 | .Xr bn 3 , | ||
82 | .Xr BN_add 3 , | ||
83 | .Xr BN_CTX_start 3 , | ||
84 | .Xr ERR_get_error 3 | ||
85 | .Sh HISTORY | ||
86 | .Fn BN_CTX_new | ||
87 | and | ||
88 | .Fn BN_CTX_free | ||
89 | are available in all versions on SSLeay and OpenSSL. | ||
90 | .Fn BN_CTX_init | ||
91 | was added in SSLeay 0.9.1b. | ||