2002-10-07 21:07:00 +08:00
|
|
|
=pod
|
|
|
|
|
|
|
|
=head1 NAME
|
|
|
|
|
|
|
|
d2i_DSAPublicKey, i2d_DSAPublicKey, d2i_DSAPrivateKey, i2d_DSAPrivateKey,
|
2016-03-23 08:07:52 +08:00
|
|
|
d2i_DSA_PUBKEY, i2d_DSA_PUBKEY, d2i_DSAparams, i2d_DSAparams,
|
|
|
|
d2i_DSA_SIG, i2d_DSA_SIG - DSA key encoding and parsing functions.
|
2002-10-07 21:07:00 +08:00
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
|
|
|
#include <openssl/dsa.h>
|
2003-12-10 21:57:51 +08:00
|
|
|
#include <openssl/x509.h>
|
2002-10-07 21:07:00 +08:00
|
|
|
|
|
|
|
DSA * d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
|
|
|
|
|
|
|
|
int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
|
|
|
|
|
|
|
|
DSA * d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);
|
|
|
|
|
|
|
|
int i2d_DSA_PUBKEY(const DSA *a, unsigned char **pp);
|
|
|
|
|
2016-03-23 08:07:52 +08:00
|
|
|
DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
|
|
|
|
DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
|
|
|
|
|
|
|
|
int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa);
|
|
|
|
int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa);
|
|
|
|
|
2002-10-07 21:07:00 +08:00
|
|
|
DSA * d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
|
|
|
|
|
|
|
|
int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
|
|
|
|
|
|
|
|
DSA * d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
|
|
|
|
|
|
|
|
int i2d_DSAparams(const DSA *a, unsigned char **pp);
|
|
|
|
|
|
|
|
DSA * d2i_DSA_SIG(DSA_SIG **a, const unsigned char **pp, long length);
|
|
|
|
|
|
|
|
int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
|
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
|
|
|
d2i_DSAPublicKey() and i2d_DSAPublicKey() decode and encode the DSA public key
|
|
|
|
components structure.
|
|
|
|
|
2003-12-10 21:57:51 +08:00
|
|
|
d2i_DSA_PUBKEY() and i2d_DSA_PUBKEY() decode and encode an DSA public key using
|
|
|
|
a SubjectPublicKeyInfo (certificate public key) structure.
|
2002-10-07 21:07:00 +08:00
|
|
|
|
2016-03-23 08:07:52 +08:00
|
|
|
d2i_DSA_PUBKEY_bio(), d2i_DSA_PUBKEY_fp(), i2d_DSA_PUBKEY_bio() and
|
|
|
|
i2d_DSA_PUBKEY_fp() are similar to d2i_DSA_PUBKEY() and i2d_DSA_PUBKEY()
|
|
|
|
except they decode or encode using a B<BIO> or B<FILE> pointer.
|
|
|
|
|
2002-10-07 21:07:00 +08:00
|
|
|
d2i_DSAPrivateKey(), i2d_DSAPrivateKey() decode and encode the DSA private key
|
|
|
|
components.
|
|
|
|
|
|
|
|
d2i_DSAparams(), i2d_DSAparams() decode and encode the DSA parameters using
|
|
|
|
a B<Dss-Parms> structure as defined in RFC2459.
|
|
|
|
|
|
|
|
d2i_DSA_SIG(), i2d_DSA_SIG() decode and encode a DSA signature using a
|
|
|
|
B<Dss-Sig-Value> structure as defined in RFC2459.
|
|
|
|
|
|
|
|
The usage of all of these functions is similar to the d2i_X509() and
|
2015-08-18 03:21:33 +08:00
|
|
|
i2d_X509() described in the L<d2i_X509(3)> manual page.
|
2002-10-07 21:07:00 +08:00
|
|
|
|
|
|
|
=head1 NOTES
|
|
|
|
|
|
|
|
The B<DSA> structure passed to the private key encoding functions should have
|
|
|
|
all the private key components present.
|
|
|
|
|
2016-05-20 20:11:46 +08:00
|
|
|
The data encoded by the private key functions is unencrypted and therefore
|
2002-10-07 21:07:00 +08:00
|
|
|
offers no private key security.
|
|
|
|
|
|
|
|
The B<DSA_PUBKEY> functions should be used in preference to the B<DSAPublicKey>
|
|
|
|
functions when encoding public keys because they use a standard format.
|
|
|
|
|
2016-01-29 07:57:46 +08:00
|
|
|
The B<DSAPublicKey> functions use a non standard format which is a
|
|
|
|
B<SEQUENCE> consisting of the B<p>, B<q>, B<g> and B<pub_key> fields
|
|
|
|
respectively.
|
2002-10-07 21:07:00 +08:00
|
|
|
|
2015-04-14 02:05:13 +08:00
|
|
|
The B<DSAPrivateKey> functions also use a non standard structure consisting
|
2002-10-07 21:07:00 +08:00
|
|
|
consisting of a SEQUENCE containing the B<p>, B<q>, B<g> and B<pub_key> and
|
|
|
|
B<priv_key> fields respectively.
|
|
|
|
|
|
|
|
=head1 SEE ALSO
|
|
|
|
|
2015-08-18 03:21:33 +08:00
|
|
|
L<d2i_X509(3)>
|
2002-10-07 21:07:00 +08:00
|
|
|
|
2016-05-18 23:44:05 +08:00
|
|
|
=head1 COPYRIGHT
|
|
|
|
|
|
|
|
Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
|
|
|
|
|
|
|
|
Licensed under the OpenSSL license (the "License"). You may not use
|
|
|
|
this file except in compliance with the License. You can obtain a copy
|
|
|
|
in the file LICENSE in the source distribution or at
|
|
|
|
L<https://www.openssl.org/source/license.html>.
|
|
|
|
|
|
|
|
=cut
|