EC_KEY_get_enc_flags.pod 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. =pod
  2. =head1 NAME
  3. EC_KEY_get_enc_flags, EC_KEY_set_enc_flags
  4. - Get and set flags for encoding EC_KEY structures
  5. =head1 SYNOPSIS
  6. #include <openssl/ec.h>
  7. unsigned int EC_KEY_get_enc_flags(const EC_KEY *key);
  8. void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
  9. =head1 DESCRIPTION
  10. The format of the external representation of the public key written by
  11. i2d_ECPrivateKey() (such as whether it is stored in a compressed form or not) is
  12. described by the point_conversion_form. See L<EC_GROUP_copy(3)>
  13. for a description of point_conversion_form.
  14. When reading a private key encoded without an associated public key (e.g. if
  15. EC_PKEY_NO_PUBKEY has been used - see below), then d2i_ECPrivateKey() generates
  16. the missing public key automatically. Private keys encoded without parameters
  17. (e.g. if EC_PKEY_NO_PARAMETERS has been used - see below) cannot be loaded using
  18. d2i_ECPrivateKey().
  19. The functions EC_KEY_get_enc_flags() and EC_KEY_set_enc_flags() get and set the
  20. value of the encoding flags for the B<key>. There are two encoding flags
  21. currently defined - EC_PKEY_NO_PARAMETERS and EC_PKEY_NO_PUBKEY. These flags
  22. define the behaviour of how the B<key> is converted into ASN1 in a call to
  23. i2d_ECPrivateKey(). If EC_PKEY_NO_PARAMETERS is set then the public parameters for
  24. the curve are not encoded along with the private key. If EC_PKEY_NO_PUBKEY is
  25. set then the public key is not encoded along with the private key.
  26. =head1 RETURN VALUES
  27. EC_KEY_get_enc_flags() returns the value of the current encoding flags for the
  28. EC_KEY.
  29. =head1 SEE ALSO
  30. L<crypto(7)>, L<EC_GROUP_new(3)>,
  31. L<EC_GROUP_copy(3)>, L<EC_POINT_new(3)>,
  32. L<EC_POINT_add(3)>,
  33. L<EC_GFp_simple_method(3)>,
  34. L<d2i_ECPKParameters(3)>,
  35. L<d2i_ECPrivateKey(3)>
  36. =head1 COPYRIGHT
  37. Copyright 2015-2017 The OpenSSL Project Authors. All Rights Reserved.
  38. Licensed under the Apache License 2.0 (the "License"). You may not use
  39. this file except in compliance with the License. You can obtain a copy
  40. in the file LICENSE in the source distribution or at
  41. L<https://www.openssl.org/source/license.html>.
  42. =cut