diff options
| author | schwarze <> | 2021-11-06 15:00:25 +0000 |
|---|---|---|
| committer | schwarze <> | 2021-11-06 15:00:25 +0000 |
| commit | 799657a69a1e18c0e3e5eb094ab7533af4643905 (patch) | |
| tree | 5079523fad37826c35f37cd971af0b9f93751fd7 /src | |
| parent | f01f56497c4c06d0958a4016fdb914ec1d2d496c (diff) | |
| download | openbsd-799657a69a1e18c0e3e5eb094ab7533af4643905.tar.gz openbsd-799657a69a1e18c0e3e5eb094ab7533af4643905.tar.bz2 openbsd-799657a69a1e18c0e3e5eb094ab7533af4643905.zip | |
Improve formatting. The line breaks in the lists of methods were very ugly.
While here, put descriptions right after the prototypes they describe.
No content change.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_asn1_new.3 | 192 |
1 files changed, 76 insertions, 116 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_asn1_new.3 b/src/lib/libcrypto/man/EVP_PKEY_asn1_new.3 index a363a9615f..75d25d7f11 100644 --- a/src/lib/libcrypto/man/EVP_PKEY_asn1_new.3 +++ b/src/lib/libcrypto/man/EVP_PKEY_asn1_new.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: EVP_PKEY_asn1_new.3,v 1.6 2021/10/25 13:48:12 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_PKEY_asn1_new.3,v 1.7 2021/11/06 15:00:25 schwarze Exp $ |
| 2 | .\" selective merge up to: | 2 | .\" selective merge up to: |
| 3 | .\" OpenSSL man3/EVP_PKEY_ASN1_METHOD b0004708 Nov 1 00:45:24 2017 +0800 | 3 | .\" OpenSSL man3/EVP_PKEY_ASN1_METHOD b0004708 Nov 1 00:45:24 2017 +0800 |
| 4 | .\" | 4 | .\" |
| @@ -49,7 +49,7 @@ | |||
| 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 51 | .\" | 51 | .\" |
| 52 | .Dd $Mdocdate: October 25 2021 $ | 52 | .Dd $Mdocdate: November 6 2021 $ |
| 53 | .Dt EVP_PKEY_ASN1_NEW 3 | 53 | .Dt EVP_PKEY_ASN1_NEW 3 |
| 54 | .Os | 54 | .Os |
| 55 | .Sh NAME | 55 | .Sh NAME |
| @@ -150,205 +150,167 @@ key algorithm present by the | |||
| 150 | .Vt EVP_PKEY | 150 | .Vt EVP_PKEY |
| 151 | object. | 151 | object. |
| 152 | .Bd -unfilled | 152 | .Bd -unfilled |
| 153 | .Ft int Fo (*pub_decode) | 153 | .Ft int Fn (*pub_decode) "EVP_PKEY *pk" "X509_PUBKEY *pub" |
| 154 | .Fa "EVP_PKEY *pk" | 154 | .Ft int Fn (*pub_encode) "X509_PUBKEY *pub" "const EVP_PKEY *pk" |
| 155 | .Fa "X509_PUBKEY *pub" | ||
| 156 | .Fc | ||
| 157 | .Ft int Fo (*pub_encode) | ||
| 158 | .Fa "X509_PUBKEY *pub" | ||
| 159 | .Fa "const EVP_PKEY *pk" | ||
| 160 | .Fc | ||
| 161 | .Ft int Fo (*pub_cmp) | ||
| 162 | .Fa "const EVP_PKEY *a" | ||
| 163 | .Fa "const EVP_PKEY *b" | ||
| 164 | .Fc | ||
| 165 | .Ft int Fo (*pub_print) | ||
| 166 | .Fa "BIO *out" | ||
| 167 | .Fa "const EVP_PKEY *pkey" | ||
| 168 | .Fa "int indent" | ||
| 169 | .Fa "ASN1_PCTX *pctx" | ||
| 170 | .Fc | ||
| 171 | .Ed | 155 | .Ed |
| 172 | .Pp | 156 | .Pp |
| 173 | The | 157 | Decode and encode |
| 174 | .Fn pub_decode | ||
| 175 | and | ||
| 176 | .Fn pub_encode | ||
| 177 | methods are called to decode and encode | ||
| 178 | .Vt X509_PUBKEY | 158 | .Vt X509_PUBKEY |
| 179 | ASN.1 parameters to and from | 159 | ASN.1 parameters to and from |
| 180 | .Fa pk . | 160 | .Fa pk . |
| 181 | They must return 0 on error and 1 on success. | 161 | These methods must return 0 on error and 1 on success. |
| 182 | They are called by | 162 | They are called by |
| 183 | .Xr X509_PUBKEY_get 3 | 163 | .Xr X509_PUBKEY_get 3 |
| 184 | and | 164 | and |
| 185 | .Xr X509_PUBKEY_set 3 . | 165 | .Xr X509_PUBKEY_set 3 . |
| 166 | .Bd -unfilled | ||
| 167 | .Ft int Fn (*pub_cmp) "const EVP_PKEY *a" "const EVP_PKEY *b" | ||
| 168 | .Ed | ||
| 186 | .Pp | 169 | .Pp |
| 187 | The | 170 | Compare two public keys. |
| 188 | .Fn pub_cmp | 171 | This method must return 1 when the keys are equal and 0 otherwise. |
| 189 | method is called when two public keys are compared. | ||
| 190 | It must return 1 when the keys are equal and 0 otherwise. | ||
| 191 | It is called by | 172 | It is called by |
| 192 | .Xr EVP_PKEY_cmp 3 . | 173 | .Xr EVP_PKEY_cmp 3 . |
| 174 | .Bd -filled | ||
| 175 | .Ft int Fo (*pub_print) | ||
| 176 | .Fa "BIO *out" | ||
| 177 | .Fa "const EVP_PKEY *pkey" | ||
| 178 | .Fa "int indent" | ||
| 179 | .Fa "ASN1_PCTX *pctx" | ||
| 180 | .Fc | ||
| 181 | .Ed | ||
| 193 | .Pp | 182 | .Pp |
| 194 | The | 183 | Print a public key in humanly readable text to |
| 195 | .Fn pub_print | ||
| 196 | method is called to print a public key in humanly readable text to | ||
| 197 | .Fa out , | 184 | .Fa out , |
| 198 | indented | 185 | indented |
| 199 | .Fa indent | 186 | .Fa indent |
| 200 | spaces. | 187 | spaces. |
| 201 | It must return 0 on error and 1 on success. | 188 | This method must return 0 on error and 1 on success. |
| 202 | It is called by | 189 | It is called by |
| 203 | .Xr EVP_PKEY_print_public 3 . | 190 | .Xr EVP_PKEY_print_public 3 . |
| 204 | .Bd -unfilled | 191 | .Bd -unfilled |
| 205 | .Ft int Fo (*priv_decode) | 192 | .Ft int Fn (*priv_decode) "EVP_PKEY *pk" "const PKCS8_PRIV_KEY_INFO *p8inf" |
| 206 | .Fa "EVP_PKEY *pk" | 193 | .Ft int Fn (*priv_encode) "PKCS8_PRIV_KEY_INFO *p8" "const EVP_PKEY *pk" |
| 207 | .Fa "const PKCS8_PRIV_KEY_INFO *p8inf" | ||
| 208 | .Fc | ||
| 209 | .Ft int Fo (*priv_encode) | ||
| 210 | .Fa "PKCS8_PRIV_KEY_INFO *p8" | ||
| 211 | .Fa "const EVP_PKEY *pk" | ||
| 212 | .Fc | ||
| 213 | .Ft int Fo (*priv_print) | ||
| 214 | .Fa "BIO *out" | ||
| 215 | .Fa "const EVP_PKEY *pkey" | ||
| 216 | .Fa "int indent" | ||
| 217 | .Fa "ASN1_PCTX *pctx" | ||
| 218 | .Fc | ||
| 219 | .Ed | 194 | .Ed |
| 220 | .Pp | 195 | .Pp |
| 221 | The | 196 | Decode and encode |
| 222 | .Fn priv_decode | ||
| 223 | and | ||
| 224 | .Fn priv_encode | ||
| 225 | methods are called to decode and encode | ||
| 226 | .Vt PKCS8_PRIV_KEY_INFO | 197 | .Vt PKCS8_PRIV_KEY_INFO |
| 227 | form private key to and from | 198 | form private key to and from |
| 228 | .Fa pk . | 199 | .Fa pk . |
| 229 | They must return 0 on error, 1 on success. | 200 | These methods must return 0 on error, 1 on success. |
| 230 | They are called by | 201 | They are called by |
| 231 | .Xr EVP_PKCS82PKEY 3 | 202 | .Xr EVP_PKCS82PKEY 3 |
| 232 | and | 203 | and |
| 233 | .Xr EVP_PKEY2PKCS8 3 . | 204 | .Xr EVP_PKEY2PKCS8 3 . |
| 205 | .Bd -filled | ||
| 206 | .Ft int Fo (*priv_print) | ||
| 207 | .Fa "BIO *out" | ||
| 208 | .Fa "const EVP_PKEY *pkey" | ||
| 209 | .Fa "int indent" | ||
| 210 | .Fa "ASN1_PCTX *pctx" | ||
| 211 | .Fc | ||
| 212 | .Ed | ||
| 234 | .Pp | 213 | .Pp |
| 235 | The | 214 | Print a private key in humanly readable text to |
| 236 | .Fn priv_print | ||
| 237 | method is called to print a private key in humanly readable text to | ||
| 238 | .Fa out , | 215 | .Fa out , |
| 239 | indented | 216 | indented |
| 240 | .Fa indent | 217 | .Fa indent |
| 241 | spaces. | 218 | spaces. |
| 242 | It must return 0 on error and 1 on success. | 219 | This method must return 0 on error and 1 on success. |
| 243 | It is called by | 220 | It is called by |
| 244 | .Xr EVP_PKEY_print_private 3 . | 221 | .Xr EVP_PKEY_print_private 3 . |
| 245 | .Bd -unfilled | 222 | .Bd -unfilled |
| 246 | .Ft int Fn (*pkey_size) "const EVP_PKEY *pk" | 223 | .Ft int Fn (*pkey_size) "const EVP_PKEY *pk" |
| 247 | .Ft int Fn (*pkey_bits) "const EVP_PKEY *pk"; | ||
| 248 | .Ed | 224 | .Ed |
| 249 | .Pp | 225 | .Pp |
| 250 | The | 226 | Returns the key size in bytes. |
| 251 | .Fn pkey_size | 227 | This method is called by |
| 252 | method returns the key size in bytes. | ||
| 253 | It is called by | ||
| 254 | .Xr EVP_PKEY_size 3 . | 228 | .Xr EVP_PKEY_size 3 . |
| 229 | .Bd -unfilled | ||
| 230 | .Ft int Fn (*pkey_bits) "const EVP_PKEY *pk" | ||
| 231 | .Ed | ||
| 255 | .Pp | 232 | .Pp |
| 256 | The | 233 | Returns the key size in bits. |
| 257 | .Fn pkey_bits | 234 | This method is called by |
| 258 | method returns the key size in bits. | ||
| 259 | It is called by | ||
| 260 | .Xr EVP_PKEY_bits 3 . | 235 | .Xr EVP_PKEY_bits 3 . |
| 261 | .Bd -unfilled | 236 | .Bd -filled |
| 262 | .Ft int Fo (*param_decode) | 237 | .Ft int Fo (*param_decode) |
| 263 | .Fa "EVP_PKEY *pkey" | 238 | .Fa "EVP_PKEY *pkey" |
| 264 | .Fa "const unsigned char **pder" | 239 | .Fa "const unsigned char **pder" |
| 265 | .Fa "int derlen" | 240 | .Fa "int derlen" |
| 266 | .Fc | 241 | .Fc |
| 242 | .br | ||
| 267 | .Ft int Fo (*param_encode) | 243 | .Ft int Fo (*param_encode) |
| 268 | .Fa "const EVP_PKEY *pkey" | 244 | .Fa "const EVP_PKEY *pkey" |
| 269 | .Fa "unsigned char **pder" | 245 | .Fa "unsigned char **pder" |
| 270 | .Fc | 246 | .Fc |
| 271 | .Ft int Fo (*param_missing) | ||
| 272 | .Fa "const EVP_PKEY *pk" | ||
| 273 | .Fc | ||
| 274 | .Ft int Fo (*param_copy) | ||
| 275 | .Fa "EVP_PKEY *to" | ||
| 276 | .Fa "const EVP_PKEY *from" | ||
| 277 | .Fc | ||
| 278 | .Ft int Fo (*param_cmp) | ||
| 279 | .Fa "const EVP_PKEY *a" | ||
| 280 | .Fa "const EVP_PKEY *b" | ||
| 281 | .Fc | ||
| 282 | .Ft int Fo (*param_print) | ||
| 283 | .Fa "BIO *out" | ||
| 284 | .Fa "const EVP_PKEY *pkey" | ||
| 285 | .Fa "int indent" | ||
| 286 | .Fa "ASN1_PCTX *pctx" | ||
| 287 | .Fc | ||
| 288 | .Ed | 247 | .Ed |
| 289 | .Pp | 248 | .Pp |
| 290 | The | 249 | Decode and encode DER formatted parameters to and from |
| 291 | .Fn param_decode | ||
| 292 | and | ||
| 293 | .Fn param_encode | ||
| 294 | methods are called to decode and encode DER formatted parameters to and from | ||
| 295 | .Fa pk . | 250 | .Fa pk . |
| 296 | They must return 0 on error and 1 on success. | 251 | These methods must return 0 on error and 1 on success. |
| 297 | They are called by | 252 | They are called by |
| 298 | .Fn PEM_read_bio_Parameters . | 253 | .Fn PEM_read_bio_Parameters . |
| 254 | .Bd -unfilled | ||
| 255 | .Ft int Fn (*param_missing) "const EVP_PKEY *pk" | ||
| 256 | .Ed | ||
| 299 | .Pp | 257 | .Pp |
| 300 | The | 258 | Return 0 if a key parameter is missing or 1 otherwise. |
| 301 | .Fn param_missing | 259 | This method is called by |
| 302 | method returns 0 if a key parameter is missing or otherwise 1. | ||
| 303 | It is called by | ||
| 304 | .Xr EVP_PKEY_missing_parameters 3 . | 260 | .Xr EVP_PKEY_missing_parameters 3 . |
| 261 | .Bd -unfilled | ||
| 262 | .Ft int Fn (*param_copy) "EVP_PKEY *to" "const EVP_PKEY *from" | ||
| 263 | .Ed | ||
| 305 | .Pp | 264 | .Pp |
| 306 | The | 265 | Copy key parameters from |
| 307 | .Fn param_copy | ||
| 308 | method copies key parameters from | ||
| 309 | .Fa from | 266 | .Fa from |
| 310 | to | 267 | to |
| 311 | .Fa to . | 268 | .Fa to . |
| 312 | It must return 0 on error and 1 on success. | 269 | This method must return 0 on error and 1 on success. |
| 313 | It is called by | 270 | It is called by |
| 314 | .Xr EVP_PKEY_copy_parameters 3 . | 271 | .Xr EVP_PKEY_copy_parameters 3 . |
| 272 | .Bd -unfilled | ||
| 273 | .Ft int Fn (*param_cmp) "const EVP_PKEY *a" "const EVP_PKEY *b" | ||
| 274 | .Ed | ||
| 315 | .Pp | 275 | .Pp |
| 316 | The | 276 | Compare the parameters of the keys |
| 317 | .Fn param_cmp | ||
| 318 | method compares the parameters of the keys | ||
| 319 | .Fa a | 277 | .Fa a |
| 320 | and | 278 | and |
| 321 | .Fa b . | 279 | .Fa b . |
| 322 | It must return 1 when the keys are equal, 0 when not equal, and a | 280 | This method must return 1 when the keys are equal, 0 when not equal, and a |
| 323 | negative number on error. | 281 | negative number on error. |
| 324 | It is called by | 282 | It is called by |
| 325 | .Xr EVP_PKEY_cmp_parameters 3 . | 283 | .Xr EVP_PKEY_cmp_parameters 3 . |
| 284 | .Bd -filled | ||
| 285 | .Ft int Fo (*param_print) | ||
| 286 | .Fa "BIO *out" | ||
| 287 | .Fa "const EVP_PKEY *pkey" | ||
| 288 | .Fa "int indent" | ||
| 289 | .Fa "ASN1_PCTX *pctx" | ||
| 290 | .Fc | ||
| 291 | .Ed | ||
| 326 | .Pp | 292 | .Pp |
| 327 | The | 293 | Print the private key parameters in humanly readable text to |
| 328 | .Fn param_print | ||
| 329 | method prints the private key parameters in humanly readable text to | ||
| 330 | .Fa out , | 294 | .Fa out , |
| 331 | indented | 295 | indented |
| 332 | .Fa indent | 296 | .Fa indent |
| 333 | spaces. | 297 | spaces. |
| 334 | It must return 0 on error and 1 on success. | 298 | This method must return 0 on error and 1 on success. |
| 335 | It is called by | 299 | It is called by |
| 336 | .Xr EVP_PKEY_print_params 3 . | 300 | .Xr EVP_PKEY_print_params 3 . |
| 337 | .Bd -unfilled | 301 | .Bd -unfilled |
| 338 | .Ft void Fn (*pkey_free) "EVP_PKEY *pkey" | 302 | .Ft void Fn (*pkey_free) "EVP_PKEY *pkey" |
| 339 | .Ed | 303 | .Ed |
| 340 | .Pp | 304 | .Pp |
| 341 | The | 305 | Free the internals of |
| 342 | .Fn pkey_free | ||
| 343 | method helps freeing the internals of | ||
| 344 | .Fa pkey . | 306 | .Fa pkey . |
| 345 | It is called by | 307 | This method is called by |
| 346 | .Xr EVP_PKEY_free 3 , | 308 | .Xr EVP_PKEY_free 3 , |
| 347 | .Xr EVP_PKEY_set_type 3 , | 309 | .Xr EVP_PKEY_set_type 3 , |
| 348 | .Fn EVP_PKEY_set_type_str , | 310 | .Fn EVP_PKEY_set_type_str , |
| 349 | and | 311 | and |
| 350 | .Xr EVP_PKEY_assign 3 . | 312 | .Xr EVP_PKEY_assign 3 . |
| 351 | .Bd -unfilled | 313 | .Bd -filled |
| 352 | .Ft int Fo (*pkey_ctrl) | 314 | .Ft int Fo (*pkey_ctrl) |
| 353 | .Fa "EVP_PKEY *pkey" | 315 | .Fa "EVP_PKEY *pkey" |
| 354 | .Fa "int op" | 316 | .Fa "int op" |
| @@ -357,10 +319,8 @@ and | |||
| 357 | .Fc | 319 | .Fc |
| 358 | .Ed | 320 | .Ed |
| 359 | .Pp | 321 | .Pp |
| 360 | The | 322 | Add extra algorithm specific control. |
| 361 | .Fn pkey_ctrl | 323 | This method is called by |
| 362 | method adds extra algorithm specific control. | ||
| 363 | It is called by | ||
| 364 | .Xr EVP_PKEY_get_default_digest_nid 3 , | 324 | .Xr EVP_PKEY_get_default_digest_nid 3 , |
| 365 | .Fn PKCS7_SIGNER_INFO_set , | 325 | .Fn PKCS7_SIGNER_INFO_set , |
| 366 | .Fn PKCS7_RECIP_INFO_set , | 326 | .Fn PKCS7_RECIP_INFO_set , |
