diff options
| author | schwarze <> | 2016-12-25 17:05:59 +0000 |
|---|---|---|
| committer | schwarze <> | 2016-12-25 17:05:59 +0000 |
| commit | b2f86408e8e75c40843e1aa1b516e0ce1d9e4142 (patch) | |
| tree | 160f9ca38a3af5452bc07bd90d3af04b62b072cf /src | |
| parent | 9a8331c777966b9f0bb29f2ba224f1d443f509ae (diff) | |
| download | openbsd-b2f86408e8e75c40843e1aa1b516e0ce1d9e4142.tar.gz openbsd-b2f86408e8e75c40843e1aa1b516e0ce1d9e4142.tar.bz2 openbsd-b2f86408e8e75c40843e1aa1b516e0ce1d9e4142.zip | |
Basic cleanup to prepare for content improvements:
Use the same parameter names as in ASN1_item_d2i(3).
Point to ASN1_item_d2i(3) for details.
Delete lots of rendundant text.
While here, add ten missing functions found in OpenSSL doc/man3/d2i_X509.pod
and fix errors in the prototypes of i2d_ECPKParameters_bio(3)
and i2d_ECPKParameters_fp(3).
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/d2i_ECPKParameters.3 | 343 |
1 files changed, 172 insertions, 171 deletions
diff --git a/src/lib/libcrypto/man/d2i_ECPKParameters.3 b/src/lib/libcrypto/man/d2i_ECPKParameters.3 index edecdee67c..3ad7c16cab 100644 --- a/src/lib/libcrypto/man/d2i_ECPKParameters.3 +++ b/src/lib/libcrypto/man/d2i_ECPKParameters.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: d2i_ECPKParameters.3,v 1.7 2016/12/11 14:22:43 schwarze Exp $ | 1 | .\" $OpenBSD: d2i_ECPKParameters.3,v 1.8 2016/12/25 17:05:59 schwarze Exp $ |
| 2 | .\" OpenSSL 05ea606a May 20 20:52:46 2016 -0400 | 2 | .\" OpenSSL 05ea606a May 20 20:52:46 2016 -0400 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file was written by Matt Caswell <matt@openssl.org>. | 4 | .\" This file was written by Matt Caswell <matt@openssl.org>. |
| @@ -48,7 +48,7 @@ | |||
| 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 50 | .\" | 50 | .\" |
| 51 | .Dd $Mdocdate: December 11 2016 $ | 51 | .Dd $Mdocdate: December 25 2016 $ |
| 52 | .Dt D2I_ECPKPARAMETERS 3 | 52 | .Dt D2I_ECPKPARAMETERS 3 |
| 53 | .Os | 53 | .Os |
| 54 | .Sh NAME | 54 | .Sh NAME |
| @@ -63,190 +63,186 @@ | |||
| 63 | .Nm ECParameters_dup , | 63 | .Nm ECParameters_dup , |
| 64 | .Nm d2i_ECPrivateKey , | 64 | .Nm d2i_ECPrivateKey , |
| 65 | .Nm i2d_ECPrivateKey , | 65 | .Nm i2d_ECPrivateKey , |
| 66 | .Nm d2i_ECPrivateKey_bio , | ||
| 67 | .Nm i2d_ECPrivateKey_bio , | ||
| 68 | .Nm d2i_ECPrivateKey_fp , | ||
| 69 | .Nm i2d_ECPrivateKey_fp , | ||
| 66 | .Nm o2i_ECPublicKey , | 70 | .Nm o2i_ECPublicKey , |
| 67 | .Nm i2o_ECPublicKey , | 71 | .Nm i2o_ECPublicKey , |
| 68 | .Nm ECPKParameters_print , | 72 | .Nm ECPKParameters_print , |
| 69 | .Nm ECPKParameters_print_fp , | 73 | .Nm ECPKParameters_print_fp , |
| 70 | .Nm ECParameters_print , | 74 | .Nm ECParameters_print , |
| 71 | .Nm ECParameters_print_fp | 75 | .Nm ECParameters_print_fp , |
| 76 | .Nm d2i_EC_PUBKEY , | ||
| 77 | .Nm i2d_EC_PUBKEY , | ||
| 78 | .Nm d2i_EC_PUBKEY_bio , | ||
| 79 | .Nm i2d_EC_PUBKEY_bio , | ||
| 80 | .Nm d2i_EC_PUBKEY_fp , | ||
| 81 | .Nm i2d_EC_PUBKEY_fp | ||
| 72 | .Nd decode and encode ASN.1 representations of elliptic curve entities | 82 | .Nd decode and encode ASN.1 representations of elliptic curve entities |
| 73 | .Sh SYNOPSIS | 83 | .Sh SYNOPSIS |
| 74 | .In openssl/ec.h | 84 | .In openssl/ec.h |
| 75 | .Ft EC_GROUP * | 85 | .Ft EC_GROUP * |
| 76 | .Fo d2i_ECPKParameters | 86 | .Fo d2i_ECPKParameters |
| 77 | .Fa "EC_GROUP **px" | 87 | .Fa "EC_GROUP **val_out" |
| 78 | .Fa "const unsigned char **in" | 88 | .Fa "const unsigned char **des_in" |
| 79 | .Fa "long len" | 89 | .Fa "long length" |
| 80 | .Fc | 90 | .Fc |
| 81 | .Ft int | 91 | .Ft int |
| 82 | .Fo i2d_ECPKParameters | 92 | .Fo i2d_ECPKParameters |
| 83 | .Fa "const EC_GROUP *x" | 93 | .Fa "const EC_GROUP *val_in" |
| 84 | .Fa "unsigned char **out" | 94 | .Fa "unsigned char **des_out" |
| 85 | .Fc | 95 | .Fc |
| 86 | .Ft EC_GROUP * | 96 | .Ft EC_GROUP * |
| 87 | .Fo d2i_ECPKParameters_bio | 97 | .Fo d2i_ECPKParameters_bio |
| 88 | .Fa "BIO *bp" | 98 | .Fa "BIO *in_bio" |
| 89 | .Fa "EC_GROUP **px" | 99 | .Fa "EC_GROUP **val_out" |
| 90 | .Fc | 100 | .Fc |
| 91 | .Ft int | 101 | .Ft int |
| 92 | .Fo i2d_ECPKParameters_bio | 102 | .Fo i2d_ECPKParameters_bio |
| 93 | .Fa "BIO *bp" | 103 | .Fa "BIO *out_bio" |
| 94 | .Fa "EC_GROUP **px" | 104 | .Fa "EC_GROUP *val_in" |
| 95 | .Fc | 105 | .Fc |
| 96 | .Ft EC_GROUP * | 106 | .Ft EC_GROUP * |
| 97 | .Fo d2i_ECPKParameters_fp | 107 | .Fo d2i_ECPKParameters_fp |
| 98 | .Fa "FILE *fp" | 108 | .Fa "FILE *in_fp" |
| 99 | .Fa "EC_GROUP **px" | 109 | .Fa "EC_GROUP **val_out" |
| 100 | .Fc | 110 | .Fc |
| 101 | .Ft int | 111 | .Ft int |
| 102 | .Fo i2d_ECPKParameters_fp | 112 | .Fo i2d_ECPKParameters_fp |
| 103 | .Fa "FILE *fp" | 113 | .Fa "FILE *out_fp" |
| 104 | .Fa "EC_GROUP **px" | 114 | .Fa "EC_GROUP *val_in" |
| 105 | .Fc | 115 | .Fc |
| 106 | .Ft EC_KEY * | 116 | .Ft EC_KEY * |
| 107 | .Fo d2i_ECParameters | 117 | .Fo d2i_ECParameters |
| 108 | .Fa "EC_KEY **key" | 118 | .Fa "EC_KEY **val_out" |
| 109 | .Fa "const unsigned char **in" | 119 | .Fa "const unsigned char **des_in" |
| 110 | .Fa "long len" | 120 | .Fa "long length" |
| 111 | .Fc | 121 | .Fc |
| 112 | .Ft int | 122 | .Ft int |
| 113 | .Fo i2d_ECParameters | 123 | .Fo i2d_ECParameters |
| 114 | .Fa "EC_KEY *key" | 124 | .Fa "EC_KEY *val_in" |
| 115 | .Fa "unsigned char **out" | 125 | .Fa "unsigned char **des_out" |
| 116 | .Fc | 126 | .Fc |
| 117 | .Ft EC_KEY * | 127 | .Ft EC_KEY * |
| 118 | .Fo ECParameters_dup | 128 | .Fo ECParameters_dup |
| 119 | .Fa "EC_KEY *key" | 129 | .Fa "EC_KEY *val_in" |
| 120 | .Fc | 130 | .Fc |
| 121 | .Ft EC_KEY * | 131 | .Ft EC_KEY * |
| 122 | .Fo d2i_ECPrivateKey | 132 | .Fo d2i_ECPrivateKey |
| 123 | .Fa "EC_KEY **key" | 133 | .Fa "EC_KEY **val_out" |
| 124 | .Fa "const unsigned char **in" | 134 | .Fa "const unsigned char **des_in" |
| 125 | .Fa "long len" | 135 | .Fa "long length" |
| 126 | .Fc | 136 | .Fc |
| 127 | .Ft int | 137 | .Ft int |
| 128 | .Fo i2d_ECPrivateKey | 138 | .Fo i2d_ECPrivateKey |
| 129 | .Fa "EC_KEY *key" | 139 | .Fa "EC_KEY *val_in" |
| 130 | .Fa "unsigned char **out" | 140 | .Fa "unsigned char **des_out" |
| 141 | .Fc | ||
| 142 | .Ft EC_KEY * | ||
| 143 | .Fo d2i_ECPrivateKey_bio | ||
| 144 | .Fa "BIO *in_bio" | ||
| 145 | .Fa "EC_KEY **val_out" | ||
| 146 | .Fc | ||
| 147 | .Ft int | ||
| 148 | .Fo i2d_ECPrivateKey_bio | ||
| 149 | .Fa "BIO *out_bio" | ||
| 150 | .Fa "EC_KEY *val_in" | ||
| 151 | .Fc | ||
| 152 | .Ft EC_KEY * | ||
| 153 | .Fo d2i_ECPrivateKey_fp | ||
| 154 | .Fa "FILE *in_fp" | ||
| 155 | .Fa "EC_KEY **val_out" | ||
| 156 | .Fc | ||
| 157 | .Ft int | ||
| 158 | .Fo i2d_ECPKPrivateKey_fp | ||
| 159 | .Fa "FILE *out_fp" | ||
| 160 | .Fa "EC_KEY *val_in" | ||
| 131 | .Fc | 161 | .Fc |
| 132 | .Ft EC_KEY * | 162 | .Ft EC_KEY * |
| 133 | .Fo o2i_ECPublicKey | 163 | .Fo o2i_ECPublicKey |
| 134 | .Fa "EC_KEY **key" | 164 | .Fa "EC_KEY **val_out" |
| 135 | .Fa "const unsigned char **in" | 165 | .Fa "const unsigned char **des_in" |
| 136 | .Fa "long len" | 166 | .Fa "long length" |
| 137 | .Fc | 167 | .Fc |
| 138 | .Ft int | 168 | .Ft int |
| 139 | .Fo i2o_ECPublicKey | 169 | .Fo i2o_ECPublicKey |
| 140 | .Fa "EC_KEY *key" | 170 | .Fa "EC_KEY *val_in" |
| 141 | .Fa "unsigned char **out" | 171 | .Fa "unsigned char **des_out" |
| 142 | .Fc | 172 | .Fc |
| 143 | .Ft int | 173 | .Ft int |
| 144 | .Fo ECPKParameters_print | 174 | .Fo ECPKParameters_print |
| 145 | .Fa "BIO *bp" | 175 | .Fa "BIO *out_bio" |
| 146 | .Fa "const EC_GROUP *x" | 176 | .Fa "const EC_GROUP *val_in" |
| 147 | .Fa "int off" | 177 | .Fa "int indent" |
| 148 | .Fc | 178 | .Fc |
| 149 | .Ft int | 179 | .Ft int |
| 150 | .Fo ECPKParameters_print_fp | 180 | .Fo ECPKParameters_print_fp |
| 151 | .Fa "FILE *fp" | 181 | .Fa "FILE *out_fp" |
| 152 | .Fa "const EC_GROUP *x" | 182 | .Fa "const EC_GROUP *val_in" |
| 153 | .Fa "int off" | 183 | .Fa "int indent" |
| 154 | .Fc | 184 | .Fc |
| 155 | .Ft int | 185 | .Ft int |
| 156 | .Fo ECParameters_print | 186 | .Fo ECParameters_print |
| 157 | .Fa "BIO *bp" | 187 | .Fa "BIO *out_bio" |
| 158 | .Fa "const EC_KEY *key" | 188 | .Fa "const EC_KEY *val_in" |
| 159 | .Fc | 189 | .Fc |
| 160 | .Ft int | 190 | .Ft int |
| 161 | .Fo ECParameters_print_fp | 191 | .Fo ECParameters_print_fp |
| 162 | .Fa "FILE *fp" | 192 | .Fa "FILE *out_fp" |
| 163 | .Fa "const EC_KEY *key" | 193 | .Fa "const EC_KEY *val_in" |
| 194 | .Fc | ||
| 195 | .In openssl/x509.h | ||
| 196 | .Ft EC_KEY * | ||
| 197 | .Fo d2i_EC_PUBKEY | ||
| 198 | .Fa "EC_KEY **val_out" | ||
| 199 | .Fa "const unsigned char **des_in" | ||
| 200 | .Fa "long length" | ||
| 201 | .Fc | ||
| 202 | .Ft int | ||
| 203 | .Fo i2d_EC_PUBKEY | ||
| 204 | .Fa "EC_KEY *val_in" | ||
| 205 | .Fa "unsigned char **des_out" | ||
| 206 | .Fc | ||
| 207 | .Ft EC_KEY * | ||
| 208 | .Fo d2i_EC_PUBKEY_bio | ||
| 209 | .Fa "BIO *in_bio" | ||
| 210 | .Fa "EC_KEY **val_out" | ||
| 211 | .Fc | ||
| 212 | .Ft int | ||
| 213 | .Fo i2d_EC_PUBKEY_bio | ||
| 214 | .Fa "BIO *out_bio" | ||
| 215 | .Fa "EC_KEY *val_in" | ||
| 216 | .Fc | ||
| 217 | .Ft EC_KEY * | ||
| 218 | .Fo d2i_EC_PUBKEY_fp | ||
| 219 | .Fa "FILE *in_fp" | ||
| 220 | .Fa "EC_KEY **val_out" | ||
| 221 | .Fc | ||
| 222 | .Ft int | ||
| 223 | .Fo i2d_ECPK_PUBKEY_fp | ||
| 224 | .Fa "FILE *out_fp" | ||
| 225 | .Fa "EC_KEY *val_in" | ||
| 164 | .Fc | 226 | .Fc |
| 165 | .Sh DESCRIPTION | 227 | .Sh DESCRIPTION |
| 166 | .Fn d2i_ECPKParameters | 228 | These functions decode and encode elliptic curve keys and parameters. |
| 167 | attempts to decode | 229 | For details about the semantics, examples, caveats, and bugs, see |
| 168 | .Fa len | 230 | .Xr ASN1_item_d2i 3 . |
| 169 | bytes at | ||
| 170 | .Pf * Fa in . | ||
| 171 | If successful, a pointer to the | ||
| 172 | .Vt EC_GROUP | ||
| 173 | structure is returned. | ||
| 174 | If an error occurred, then | ||
| 175 | .Dv NULL | ||
| 176 | is returned. | ||
| 177 | If | ||
| 178 | .Fa px | ||
| 179 | is not | ||
| 180 | .Dv NULL , | ||
| 181 | then the returned structure is written to | ||
| 182 | .Pf * Fa px . | ||
| 183 | If | ||
| 184 | .Pf * Fa px | ||
| 185 | is not | ||
| 186 | .Dv NULL , | ||
| 187 | then it is assumed that | ||
| 188 | .Pf * Fa px | ||
| 189 | contains a valid | ||
| 190 | .Vt EC_GROUP | ||
| 191 | structure and an attempt is made to reuse it. | ||
| 192 | If the call is successful, | ||
| 193 | .Pf * Fa in | ||
| 194 | is incremented to the byte following the parsed data. | ||
| 195 | .Pp | ||
| 196 | .Fn i2d_ECPKParameters | ||
| 197 | encodes the structure pointed to by | ||
| 198 | .Fa x | ||
| 199 | into DER format. | ||
| 200 | If | ||
| 201 | .Fa out | ||
| 202 | is not | ||
| 203 | .Dv NULL , | ||
| 204 | is writes the DER encoded data to the buffer at | ||
| 205 | .Pf * Fa out | ||
| 206 | and increments it to point after the data just written. | ||
| 207 | If the return value is negative, an error occurred, otherwise it returns | ||
| 208 | the length of the encoded data. | ||
| 209 | .Pp | ||
| 210 | If | ||
| 211 | .Pf * Fa out | ||
| 212 | is | ||
| 213 | .Dv NULL , | ||
| 214 | memory will be allocated for a buffer and the encoded data written to it. | ||
| 215 | In this case | ||
| 216 | .Pf * Fa out | ||
| 217 | is not incremented, and it points to the start of the data just written. | ||
| 218 | .Pp | 231 | .Pp |
| 219 | .Fn d2i_ECPKParameters_bio | ||
| 220 | is similar to | ||
| 221 | .Fn d2i_ECPKParameters | ||
| 222 | except it attempts to parse data from | ||
| 223 | .Vt BIO | ||
| 224 | .Fa bp . | ||
| 225 | .Fn d2i_ECPKParameters_fp | ||
| 226 | is similar to | ||
| 227 | .Fn d2i_ECPKParameters | 232 | .Fn d2i_ECPKParameters |
| 228 | except it attempts to parse data from the | 233 | and |
| 229 | .Vt FILE | ||
| 230 | pointer | ||
| 231 | .Fa fp . | ||
| 232 | .Fn i2d_ECPKParameters_bio | ||
| 233 | is similar to | ||
| 234 | .Fn i2d_ECPKParameters | 234 | .Fn i2d_ECPKParameters |
| 235 | except it writes the encoding of the structure | 235 | decode and encode the parameters of an elliptic curve. |
| 236 | .Fa x | 236 | .Fn d2i_ECPKParameters_bio , |
| 237 | to | 237 | .Fn i2d_ECPKParameters_bio , |
| 238 | .Vt BIO | 238 | .Fn d2i_ECPKParameters_fp , |
| 239 | .Fa bp | 239 | and |
| 240 | and it returns 1 for success or 0 for failure. | ||
| 241 | .Fn i2d_ECPKParameters_fp | 240 | .Fn i2d_ECPKParameters_fp |
| 242 | is similar to | 241 | are similar except that they decode or encode using a |
| 243 | .Fn i2d_ECPKParameters | ||
| 244 | except it writes the encoding of the structure | ||
| 245 | .Fa x | ||
| 246 | to | ||
| 247 | .Vt BIO | 242 | .Vt BIO |
| 248 | .Sy bp | 243 | or |
| 249 | and it returns 1 for success or 0 for failure. | 244 | .Vt FILE |
| 245 | pointer. | ||
| 250 | These four functions are currently implemented as macros. | 246 | These four functions are currently implemented as macros. |
| 251 | .Pp | 247 | .Pp |
| 252 | .Fn d2i_ECParameters | 248 | .Fn d2i_ECParameters |
| @@ -262,82 +258,77 @@ structure. | |||
| 262 | produces the same output as | 258 | produces the same output as |
| 263 | .Fn i2d_ECPKParameters | 259 | .Fn i2d_ECPKParameters |
| 264 | but uses | 260 | but uses |
| 265 | .Fa key->group | 261 | .Fa val_in->group |
| 266 | for input instead of | 262 | for input instead of |
| 267 | .Fa px . | 263 | .Fa val_in . |
| 268 | .Pp | 264 | .Pp |
| 269 | .Fn ECParameters_dup | 265 | .Fn ECParameters_dup |
| 270 | copies | 266 | copies |
| 271 | .Fa key | 267 | .Fa val_in |
| 272 | by calling | 268 | by calling |
| 273 | .Fn i2d_ECParameters | 269 | .Fn i2d_ECParameters |
| 274 | and | 270 | and |
| 275 | .Fn d2i_ECParameters . | 271 | .Fn d2i_ECParameters . |
| 276 | .Pp | 272 | .Pp |
| 277 | .Fn d2i_ECPrivateKey | 273 | .Fn d2i_ECPrivateKey |
| 278 | interprets | 274 | and |
| 279 | .Fa len | ||
| 280 | bytes at | ||
| 281 | .Fa in | ||
| 282 | as a DER-encoded private key, decodes it, stores the result in | ||
| 283 | .Fa key | ||
| 284 | as described above, and returns a pointer to it. | ||
| 285 | .Pp | ||
| 286 | .Fn i2d_ECPrivateKey | 275 | .Fn i2d_ECPrivateKey |
| 287 | encodes the private key | 276 | decode and encode an EC private key. |
| 288 | .Fa a | 277 | .Fn d2i_ECPrivateKey_bio , |
| 289 | into DER format and writes it to | 278 | .Fn i2d_ECPrivateKey_bio , |
| 290 | .Fa out | 279 | .Fn d2i_ECPrivateKey_fp , |
| 291 | as described above. | 280 | and |
| 281 | .Fn i2d_ECPrivateKey_fp | ||
| 282 | are similar except that they decode or encode using a | ||
| 283 | .Vt BIO | ||
| 284 | or | ||
| 285 | .Vt FILE | ||
| 286 | pointer. | ||
| 292 | .Pp | 287 | .Pp |
| 293 | .Fn o2i_ECPublicKey | 288 | .Fn o2i_ECPublicKey |
| 294 | takes a string of | 289 | and |
| 295 | .Fa len | ||
| 296 | octets from | ||
| 297 | .Fa in , | ||
| 298 | decodes them, and stores the resulting EC public key in the existing | ||
| 299 | .Pf * Fa key . | ||
| 300 | .Pp | ||
| 301 | .Fn i2o_ECPublicKey | 290 | .Fn i2o_ECPublicKey |
| 302 | encodes the public | 291 | decode and encode an EC public key. |
| 303 | .Fa key | 292 | .Fn o2i_ECPublicKey |
| 304 | into the octet string buffer | 293 | can store a key into an existing object. |
| 305 | .Pf * Fa out . | ||
| 306 | If | ||
| 307 | .Pf * Fa out | ||
| 308 | is | ||
| 309 | .Dv NULL , | ||
| 310 | a new buffer of the required size is allocated; | ||
| 311 | otherwise, the pointer is advanced to point to the octet | ||
| 312 | after the last one written. | ||
| 313 | .Pp | ||
| 314 | These functions are very similar to the X.509 functions described in | ||
| 315 | .Xr d2i_X509 3 , | ||
| 316 | where further notes and examples are available. | ||
| 317 | .Pp | 294 | .Pp |
| 318 | The | ||
| 319 | .Fn ECPKParameters_print | 295 | .Fn ECPKParameters_print |
| 320 | and | 296 | and |
| 321 | .Fn ECPKParameters_print_fp | 297 | .Fn ECPKParameters_print_fp |
| 322 | functions print human-readable output of the public parameters of the | 298 | print human-readable output of the public parameters of the |
| 323 | .Vt EC_GROUP | 299 | .Vt EC_GROUP |
| 324 | to | 300 | to |
| 325 | .Fa bp | 301 | .Fa out_bio |
| 326 | or | 302 | or |
| 327 | .Fa fp . | 303 | .Fa out_fp . |
| 328 | The output lines are indented by | 304 | The output lines are indented by |
| 329 | .Fa off | 305 | .Fa indent |
| 330 | spaces. | 306 | spaces. |
| 331 | .Pp | 307 | .Pp |
| 332 | .Fn ECParameters_print | 308 | .Fn ECParameters_print |
| 333 | and | 309 | and |
| 334 | .Fn ECParameters_print_fp | 310 | .Fn ECParameters_print_fp |
| 335 | print the parameter components of | 311 | print the parameter components of |
| 336 | .Fa key | 312 | .Fa val_in |
| 337 | to | 313 | to |
| 338 | .Fa bp | 314 | .Fa out_bio |
| 339 | or | 315 | or |
| 340 | .Fa fp . | 316 | .Fa out_fp . |
| 317 | .Pp | ||
| 318 | .Fn d2i_EC_PUBKEY | ||
| 319 | and | ||
| 320 | .Fn i2d_EC_PUBKEY | ||
| 321 | decode and encode an EC public key. | ||
| 322 | .Fn d2i_EC_PUBKEY_bio , | ||
| 323 | .Fn i2d_EC_PUBKEY_bio , | ||
| 324 | .Fn d2i_EC_PUBKEY_fp , | ||
| 325 | and | ||
| 326 | .Fn i2d_EC_PUBKEY_fp | ||
| 327 | are similar except that they decode or encode using a | ||
| 328 | .Vt BIO | ||
| 329 | or | ||
| 330 | .Vt FILE | ||
| 331 | pointer. | ||
| 341 | .Sh RETURN VALUES | 332 | .Sh RETURN VALUES |
| 342 | .Fn d2i_ECPKParameters , | 333 | .Fn d2i_ECPKParameters , |
| 343 | .Fn d2i_ECPKParameters_bio , | 334 | .Fn d2i_ECPKParameters_bio , |
| @@ -352,8 +343,13 @@ if an error occurs. | |||
| 352 | .Fn d2i_ECParameters , | 343 | .Fn d2i_ECParameters , |
| 353 | .Fn ECParameters_dup , | 344 | .Fn ECParameters_dup , |
| 354 | .Fn d2i_ECPrivateKey , | 345 | .Fn d2i_ECPrivateKey , |
| 346 | .Fn d2i_ECPrivateKey_bio , | ||
| 347 | .Fn d2i_ECPrivateKey_fp , | ||
| 348 | .Fn o2i_ECPublicKey , | ||
| 349 | .Fn d2i_EC_PUBKEY , | ||
| 350 | .Fn d2i_EC_PUBKEY_bio , | ||
| 355 | and | 351 | and |
| 356 | .Fn o2i_ECPublicKey | 352 | .Fn d2i_EC_PUBKEY_fp |
| 357 | return a valid | 353 | return a valid |
| 358 | .Vt EC_KEY | 354 | .Vt EC_KEY |
| 359 | structure or | 355 | structure or |
| @@ -363,21 +359,26 @@ if an error occurs. | |||
| 363 | .Fn i2d_ECPKParameters , | 359 | .Fn i2d_ECPKParameters , |
| 364 | .Fn i2d_ECParameters , | 360 | .Fn i2d_ECParameters , |
| 365 | .Fn i2d_ECPrivateKey , | 361 | .Fn i2d_ECPrivateKey , |
| 362 | .Fn i2o_ECPublicKey , | ||
| 366 | and | 363 | and |
| 367 | .Fn i2o_ECPublicKey | 364 | .Fn i2d_EC_PUBKEY |
| 368 | return the number of bytes successfully encoded or a negative value if | 365 | return the number of bytes successfully encoded or a negative value if |
| 369 | an error occurs. | 366 | an error occurs. |
| 370 | .Pp | 367 | .Pp |
| 371 | .Fn i2d_ECPKParameters_bio , | 368 | .Fn i2d_ECPKParameters_bio , |
| 372 | .Fn i2d_ECPKParameters_fp , | 369 | .Fn i2d_ECPKParameters_fp , |
| 370 | .Fn i2d_ECPrivateKey_bio , | ||
| 371 | .Fn i2d_ECPKPrivateKey_fp , | ||
| 373 | .Fn ECPKParameters_print , | 372 | .Fn ECPKParameters_print , |
| 374 | .Fn ECPKParameters_print_fp , | 373 | .Fn ECPKParameters_print_fp , |
| 375 | .Fn ECParameters_print , | 374 | .Fn ECParameters_print , |
| 375 | .Fn ECParameters_print_fp , | ||
| 376 | .Fn i2d_EC_PUBKEY_bio , | ||
| 376 | and | 377 | and |
| 377 | .Fn ECParameters_print_fp | 378 | .Fn i2d_ECPK_PUBKEY_fp |
| 378 | return 1 for success or 0 if an error occurs. | 379 | return 1 for success or 0 if an error occurs. |
| 379 | .Sh SEE ALSO | 380 | .Sh SEE ALSO |
| 380 | .Xr d2i_X509 3 , | 381 | .Xr ASN1_item_d2i 3 , |
| 381 | .Xr EC_GFp_simple_method 3 , | 382 | .Xr EC_GFp_simple_method 3 , |
| 382 | .Xr EC_GROUP_copy 3 , | 383 | .Xr EC_GROUP_copy 3 , |
| 383 | .Xr EC_GROUP_new 3 , | 384 | .Xr EC_GROUP_new 3 , |
