d2i_DSAPublicKey.pod 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. =pod
  2. =head1 NAME
  3. d2i_DSAPublicKey, i2d_DSAPublicKey, d2i_DSAPrivateKey, i2d_DSAPrivateKey,
  4. d2i_DSA_PUBKEY, i2d_DSA_PUBKEY, d2i_DSAparams, i2d_DSAparams, d2i_DSA_SIG, i2d_DSA_SIG - DSA key encoding
  5. and parsing functions.
  6. =head1 SYNOPSIS
  7. #include <openssl/dsa.h>
  8. #include <openssl/x509.h>
  9. DSA * d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
  10. int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
  11. DSA * d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);
  12. int i2d_DSA_PUBKEY(const DSA *a, unsigned char **pp);
  13. DSA * d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
  14. int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
  15. DSA * d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
  16. int i2d_DSAparams(const DSA *a, unsigned char **pp);
  17. DSA * d2i_DSA_SIG(DSA_SIG **a, const unsigned char **pp, long length);
  18. int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
  19. =head1 DESCRIPTION
  20. d2i_DSAPublicKey() and i2d_DSAPublicKey() decode and encode the DSA public key
  21. components structure.
  22. d2i_DSA_PUBKEY() and i2d_DSA_PUBKEY() decode and encode an DSA public key using
  23. a SubjectPublicKeyInfo (certificate public key) structure.
  24. d2i_DSAPrivateKey(), i2d_DSAPrivateKey() decode and encode the DSA private key
  25. components.
  26. d2i_DSAparams(), i2d_DSAparams() decode and encode the DSA parameters using
  27. a B<Dss-Parms> structure as defined in RFC2459.
  28. d2i_DSA_SIG(), i2d_DSA_SIG() decode and encode a DSA signature using a
  29. B<Dss-Sig-Value> structure as defined in RFC2459.
  30. The usage of all of these functions is similar to the d2i_X509() and
  31. i2d_X509() described in the L<d2i_X509(3)|d2i_X509(3)> manual page.
  32. =head1 NOTES
  33. The B<DSA> structure passed to the private key encoding functions should have
  34. all the private key components present.
  35. The data encoded by the private key functions is unencrypted and therefore
  36. offers no private key security.
  37. The B<DSA_PUBKEY> functions should be used in preference to the B<DSAPublicKey>
  38. functions when encoding public keys because they use a standard format.
  39. The B<DSAPublicKey> functions use an non standard format the actual data encoded
  40. depends on the value of the B<write_params> field of the B<a> key parameter.
  41. If B<write_params> is zero then only the B<pub_key> field is encoded as an
  42. B<INTEGER>. If B<write_params> is 1 then a B<SEQUENCE> consisting of the
  43. B<p>, B<q>, B<g> and B<pub_key> respectively fields are encoded.
  44. The B<DSAPrivateKey> functions also use a non standard structure consiting
  45. consisting of a SEQUENCE containing the B<p>, B<q>, B<g> and B<pub_key> and
  46. B<priv_key> fields respectively.
  47. =head1 SEE ALSO
  48. L<d2i_X509(3)|d2i_X509(3)>
  49. =head1 HISTORY
  50. TBA
  51. =cut