diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/man/CRYPTO_lock.3 | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/src/lib/libcrypto/man/CRYPTO_lock.3 b/src/lib/libcrypto/man/CRYPTO_lock.3 deleted file mode 100644 index afc5eb54c5..0000000000 --- a/src/lib/libcrypto/man/CRYPTO_lock.3 +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
1 | .\" $OpenBSD: CRYPTO_lock.3,v 1.3 2024/03/14 22:09:40 tb Exp $ | ||
2 | .\" OpenSSL doc/crypto/threads.pod fb552ac6 Sep 30 23:43:01 2009 +0000 | ||
3 | .\" | ||
4 | .\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org> | ||
5 | .\" | ||
6 | .\" Permission to use, copy, modify, and distribute this software for any | ||
7 | .\" purpose with or without fee is hereby granted, provided that the above | ||
8 | .\" copyright notice and this permission notice appear in all copies. | ||
9 | .\" | ||
10 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | .\" | ||
18 | .Dd $Mdocdate: March 14 2024 $ | ||
19 | .Dt CRYPTO_LOCK 3 | ||
20 | .Os | ||
21 | .Sh NAME | ||
22 | .Nm CRYPTO_lock , | ||
23 | .Nm CRYPTO_w_lock , | ||
24 | .Nm CRYPTO_w_unlock , | ||
25 | .Nm CRYPTO_r_lock , | ||
26 | .Nm CRYPTO_r_unlock , | ||
27 | .Nm CRYPTO_add | ||
28 | .Nd thread support | ||
29 | .Sh SYNOPSIS | ||
30 | .In openssl/crypto.h | ||
31 | .Ft void | ||
32 | .Fo CRYPTO_lock | ||
33 | .Fa "int mode" | ||
34 | .Fa "int type" | ||
35 | .Fa "const char *file" | ||
36 | .Fa "int line" | ||
37 | .Fc | ||
38 | .Ft int | ||
39 | .Fo CRYPTO_add | ||
40 | .Fa "int *p" | ||
41 | .Fa "int amount" | ||
42 | .Fa "int type" | ||
43 | .Fc | ||
44 | .Bd -literal | ||
45 | #define CRYPTO_w_lock(type) \e | ||
46 | CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE, type, __FILE__, __LINE__) | ||
47 | #define CRYPTO_w_unlock(type) \e | ||
48 | CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE, type, __FILE__, __LINE__) | ||
49 | #define CRYPTO_r_lock(type) \e | ||
50 | CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ, type, __FILE__, __LINE__) | ||
51 | #define CRYPTO_r_unlock(type) \e | ||
52 | CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ, type, __FILE__, __LINE__) | ||
53 | .Ed | ||
54 | .Sh DESCRIPTION | ||
55 | These functions are obsolete. | ||
56 | .Pp | ||
57 | .Fn CRYPTO_lock | ||
58 | locks or unlocks a mutex lock. | ||
59 | .Pp | ||
60 | .Fa mode | ||
61 | is a bitfield describing what should be done with the lock. | ||
62 | For each call, either | ||
63 | .Dv CRYPTO_LOCK | ||
64 | or | ||
65 | .Dv CRYPTO_UNLOCK | ||
66 | must be included. | ||
67 | In the LibreSSL implementation, | ||
68 | .Dv CRYPTO_READ | ||
69 | and | ||
70 | .Dv CRYPTO_WRITE | ||
71 | are ignored. | ||
72 | .Pp | ||
73 | .Fa type | ||
74 | is a number in the range 0 <= | ||
75 | .Fa type No < Dv CRYPTO_NUM_LOCKS | ||
76 | identifying a particular lock. | ||
77 | Currently, the value of | ||
78 | .Dv CRYPTO_NUM_LOCKS | ||
79 | is 41. | ||
80 | .Pp | ||
81 | The | ||
82 | .Ar file | ||
83 | and | ||
84 | .Ar line | ||
85 | arguments are ignored. | ||
86 | .Pp | ||
87 | In the LibreSSL implementation, | ||
88 | .Fn CRYPTO_lock | ||
89 | is a wrapper around | ||
90 | .Xr pthread_mutex_lock 3 | ||
91 | and | ||
92 | .Xr pthread_mutex_unlock 3 . | ||
93 | .Pp | ||
94 | .Fn CRYPTO_add | ||
95 | locks the lock number | ||
96 | .Fa type , | ||
97 | adds | ||
98 | .Fa amount | ||
99 | to | ||
100 | .Pf * Fa p , | ||
101 | and unlocks the lock number | ||
102 | .Fa type | ||
103 | again. | ||
104 | .Sh RETURN VALUES | ||
105 | .Fn CRYPTO_add | ||
106 | returns the new value of | ||
107 | .Pf * Fa p . | ||
108 | .Sh SEE ALSO | ||
109 | .Xr crypto 3 | ||
110 | .Sh HISTORY | ||
111 | .Fn CRYPTO_lock , | ||
112 | .Fn CRYPTO_w_lock , | ||
113 | .Fn CRYPTO_w_unlock , | ||
114 | .Fn CRYPTO_r_lock , | ||
115 | and | ||
116 | .Fn CRYPTO_r_unlock | ||
117 | first appeared in SSLeay 0.6.0. | ||
118 | .Fn CRYPTO_add | ||
119 | first appeared in SSLeay 0.6.2. | ||
120 | These functions have been available since | ||
121 | .Ox 2.4 . | ||