File: //usr/local/openssl/man/man3/d2i_DSAPublicKey.3
.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "d2i_DSAPublicKey 3"
.TH d2i_DSAPublicKey 3 2019-12-20 1.0.2u OpenSSL
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
d2i_DSAPublicKey, i2d_DSAPublicKey, d2i_DSAPrivateKey, i2d_DSAPrivateKey,
d2i_DSA_PUBKEY, i2d_DSA_PUBKEY, d2i_DSAparams, i2d_DSAparams, d2i_DSA_SIG, i2d_DSA_SIG \- DSA key encoding
and parsing functions.
.SH SYNOPSIS
.IX Header "SYNOPSIS"
.Vb 2
\& #include <openssl/dsa.h>
\& #include <openssl/x509.h>
\&
\& 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);
\&
\& 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);
.Ve
.SH DESCRIPTION
.IX Header "DESCRIPTION"
\&\fBd2i_DSAPublicKey()\fR and \fBi2d_DSAPublicKey()\fR decode and encode the DSA public key
components structure.
.PP
\&\fBd2i_DSA_PUBKEY()\fR and \fBi2d_DSA_PUBKEY()\fR decode and encode an DSA public key using
a SubjectPublicKeyInfo (certificate public key) structure.
.PP
\&\fBd2i_DSAPrivateKey()\fR, \fBi2d_DSAPrivateKey()\fR decode and encode the DSA private key
components.
.PP
\&\fBd2i_DSAparams()\fR, \fBi2d_DSAparams()\fR decode and encode the DSA parameters using
a \fBDss-Parms\fR structure as defined in RFC2459.
.PP
\&\fBd2i_DSA_SIG()\fR, \fBi2d_DSA_SIG()\fR decode and encode a DSA signature using a
\&\fBDss-Sig-Value\fR structure as defined in RFC2459.
.PP
The usage of all of these functions is similar to the \fBd2i_X509()\fR and
\&\fBi2d_X509()\fR described in the \fBd2i_X509\fR\|(3) manual page.
.SH NOTES
.IX Header "NOTES"
The \fBDSA\fR structure passed to the private key encoding functions should have
all the private key components present.
.PP
The data encoded by the private key functions is unencrypted and therefore
offers no private key security.
.PP
The \fBDSA_PUBKEY\fR functions should be used in preference to the \fBDSAPublicKey\fR
functions when encoding public keys because they use a standard format.
.PP
The \fBDSAPublicKey\fR functions use an non standard format the actual data encoded
depends on the value of the \fBwrite_params\fR field of the \fBa\fR key parameter.
If \fBwrite_params\fR is zero then only the \fBpub_key\fR field is encoded as an
\&\fBINTEGER\fR. If \fBwrite_params\fR is 1 then a \fBSEQUENCE\fR consisting of the
\&\fBp\fR, \fBq\fR, \fBg\fR and \fBpub_key\fR respectively fields are encoded.
.PP
The \fBDSAPrivateKey\fR functions also use a non standard structure consiting
consisting of a SEQUENCE containing the \fBp\fR, \fBq\fR, \fBg\fR and \fBpub_key\fR and
\&\fBpriv_key\fR fields respectively.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBd2i_X509\fR\|(3)
.SH HISTORY
.IX Header "HISTORY"
TBA