diff options
Diffstat (limited to 'src/lib/libcrypto/man/ENGINE_add.3')
| -rw-r--r-- | src/lib/libcrypto/man/ENGINE_add.3 | 84 |
1 files changed, 78 insertions, 6 deletions
diff --git a/src/lib/libcrypto/man/ENGINE_add.3 b/src/lib/libcrypto/man/ENGINE_add.3 index faecb8a2ab..c54fa5cf05 100644 --- a/src/lib/libcrypto/man/ENGINE_add.3 +++ b/src/lib/libcrypto/man/ENGINE_add.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: ENGINE_add.3,v 1.1 2018/04/15 01:43:45 schwarze Exp $ | 1 | .\" $OpenBSD: ENGINE_add.3,v 1.2 2018/04/15 17:02:03 schwarze Exp $ |
| 2 | .\" content checked up to: OpenSSL 1f13ad31 Dec 25 17:50:39 2017 +0800 | 2 | .\" content checked up to: OpenSSL 1f13ad31 Dec 25 17:50:39 2017 +0800 |
| 3 | .\" | 3 | .\" |
| 4 | .\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org> | 4 | .\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org> |
| @@ -20,7 +20,12 @@ | |||
| 20 | .Os | 20 | .Os |
| 21 | .Sh NAME | 21 | .Sh NAME |
| 22 | .Nm ENGINE_add , | 22 | .Nm ENGINE_add , |
| 23 | .Nm ENGINE_set_id , | ||
| 24 | .Nm ENGINE_get_id , | ||
| 25 | .Nm ENGINE_set_name , | ||
| 26 | .Nm ENGINE_get_name , | ||
| 23 | .Nm ENGINE_remove , | 27 | .Nm ENGINE_remove , |
| 28 | .Nm ENGINE_cleanup , | ||
| 24 | .Nm ENGINE_get_first , | 29 | .Nm ENGINE_get_first , |
| 25 | .Nm ENGINE_get_last , | 30 | .Nm ENGINE_get_last , |
| 26 | .Nm ENGINE_get_next , | 31 | .Nm ENGINE_get_next , |
| @@ -34,9 +39,29 @@ | |||
| 34 | .Fa "ENGINE *e" | 39 | .Fa "ENGINE *e" |
| 35 | .Fc | 40 | .Fc |
| 36 | .Ft int | 41 | .Ft int |
| 42 | .Fo ENGINE_set_id | ||
| 43 | .Fa "ENGINE *e" | ||
| 44 | .Fa "const char *id" | ||
| 45 | .Fc | ||
| 46 | .Ft const char * | ||
| 47 | .Fo ENGINE_get_id | ||
| 48 | .Fa "const ENGINE *e" | ||
| 49 | .Fc | ||
| 50 | .Ft int | ||
| 51 | .Fo ENGINE_set_name | ||
| 52 | .Fa "ENGINE *e" | ||
| 53 | .Fa "const char *name" | ||
| 54 | .Fc | ||
| 55 | .Ft const char * | ||
| 56 | .Fo ENGINE_get_name | ||
| 57 | .Fa "const ENGINE *e" | ||
| 58 | .Fc | ||
| 59 | .Ft int | ||
| 37 | .Fo ENGINE_remove | 60 | .Fo ENGINE_remove |
| 38 | .Fa "ENGINE *e" | 61 | .Fa "ENGINE *e" |
| 39 | .Fc | 62 | .Fc |
| 63 | .Ft void | ||
| 64 | .Fn ENGINE_cleanup void | ||
| 40 | .Ft ENGINE * | 65 | .Ft ENGINE * |
| 41 | .Fn ENGINE_get_first void | 66 | .Fn ENGINE_get_first void |
| 42 | .Ft ENGINE * | 67 | .Ft ENGINE * |
| @@ -63,12 +88,12 @@ appends | |||
| 63 | .Fa e | 88 | .Fa e |
| 64 | to the end of the list | 89 | to the end of the list |
| 65 | and increments its structural reference count by 1. | 90 | and increments its structural reference count by 1. |
| 66 | The name and identifier of | 91 | A unique identifier and a name of |
| 67 | .Fa e | 92 | .Fa e |
| 68 | have to be set with | 93 | have to be set with |
| 69 | .Xr ENGINE_set_name 3 | 94 | .Fn ENGINE_set_id |
| 70 | and | 95 | and |
| 71 | .Xr ENGINE_set_id 3 | 96 | .Fn ENGINE_set_name |
| 72 | before calling this function. | 97 | before calling this function. |
| 73 | .Fn ENGINE_add | 98 | .Fn ENGINE_add |
| 74 | fails if the list already contains an | 99 | fails if the list already contains an |
| @@ -84,6 +109,26 @@ If successful, it calls | |||
| 84 | on | 109 | on |
| 85 | .Fa e . | 110 | .Fa e . |
| 86 | .Pp | 111 | .Pp |
| 112 | .Fn ENGINE_cleanup | ||
| 113 | calls | ||
| 114 | .Xr ENGINE_finish 3 | ||
| 115 | on all | ||
| 116 | .Vt ENGINE | ||
| 117 | objects that were selected as default engines, for example using the | ||
| 118 | functions documented in the | ||
| 119 | .Xr ENGINE_set_default 3 | ||
| 120 | and | ||
| 121 | .Xr ENGINE_get_default_RSA 3 | ||
| 122 | manual pages, and it calls | ||
| 123 | .Fn ENGINE_remove | ||
| 124 | on all | ||
| 125 | .Vt ENGINE | ||
| 126 | objects that were added to the global list with | ||
| 127 | .Fn ENGINE_add . | ||
| 128 | Calling this function is required at the end of each program using | ||
| 129 | .Fn ENGINE_add , | ||
| 130 | even if no engines are explicitly registered or used. | ||
| 131 | .Pp | ||
| 87 | .Fn ENGINE_get_first | 132 | .Fn ENGINE_get_first |
| 88 | and | 133 | and |
| 89 | .Fn ENGINE_get_last | 134 | .Fn ENGINE_get_last |
| @@ -109,13 +154,40 @@ searches the list for an | |||
| 109 | .Vt ENGINE | 154 | .Vt ENGINE |
| 110 | object with a matching | 155 | object with a matching |
| 111 | .Fa id . | 156 | .Fa id . |
| 112 | If found, it increments the structural reference count of the | 157 | If found, it increments the structural reference count of the |
| 113 | retrieved object by 1. | 158 | retrieved object by 1. |
| 159 | If | ||
| 160 | .Dv ENGINE_FLAGS_BY_ID_COPY | ||
| 161 | was set on | ||
| 162 | .Fa e | ||
| 163 | with | ||
| 164 | .Xr ENGINE_set_flags 3 , | ||
| 165 | it returns a shallow copy of the object rather than incrementing | ||
| 166 | the reference count and returning a pointer to the original. | ||
| 114 | .Sh RETURN VALUES | 167 | .Sh RETURN VALUES |
| 115 | .Fn ENGINE_add | 168 | .Fn ENGINE_add , |
| 169 | .Fn ENGINE_set_id , | ||
| 170 | .Fn ENGINE_set_name , | ||
| 116 | and | 171 | and |
| 117 | .Fn ENGINE_remove | 172 | .Fn ENGINE_remove |
| 118 | return 1 on success or 0 on error. | 173 | return 1 on success or 0 on error. |
| 174 | .Fn ENGINE_set_id | ||
| 175 | and | ||
| 176 | .Fn ENGINE_set_name | ||
| 177 | can only fail if the supplied | ||
| 178 | .Fa id | ||
| 179 | or | ||
| 180 | .Fa name | ||
| 181 | is | ||
| 182 | .Dv NULL . | ||
| 183 | .Pp | ||
| 184 | .Fn ENGINE_get_id | ||
| 185 | and | ||
| 186 | .Fn ENGINE_get_name | ||
| 187 | return a pointer to an internal string | ||
| 188 | representing the identifier and the name of | ||
| 189 | .Fa e , | ||
| 190 | respectively. | ||
| 119 | .Pp | 191 | .Pp |
| 120 | .Fn ENGINE_get_first | 192 | .Fn ENGINE_get_first |
| 121 | and | 193 | and |
