Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-06-12 08:30:48 +0300
committerAdam Langley <agl@google.com>2015-07-01 22:35:26 +0300
commit7e5f5944c847167f30ebdeb13b5e506f317882d6 (patch)
treed43786f33ff8904c72df07413742bf762f6d5762 /include/openssl/evp.h
parent507b8193040384c3b1414ed7fd2ff115e3ee9548 (diff)
Document i2d_PublicKey better.
The name is confusing. EC keys aren't serialized to DER. DSA keys are also weird, but left alone for now. i2d_DSAPublicKey either serializes to a DSAPublicKey per RFC 3279 if write_params is 0 or what seems to be an OpenSSL-specific format that includes the group if write_params is 1. See upstream's ea6b07b54c1f8fc2275a121cdda071e2df7bd6c1. Change-Id: I0d15140acc2d688a563b615fc6a9e3abec929753 Reviewed-on: https://boringssl-review.googlesource.com/5261 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'include/openssl/evp.h')
-rw-r--r--include/openssl/evp.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index 55f360a3..d0acb487 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -209,10 +209,13 @@ OPENSSL_EXPORT EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **out, const uint8_t **inp,
* the result, whether written or not, or a negative value on error. */
OPENSSL_EXPORT int i2d_PrivateKey(const EVP_PKEY *key, uint8_t **outp);
-/* i2d_PublicKey marshals a public key from |key| to an ASN.1, DER
- * structure. If |outp| is not NULL then the result is written to |*outp| and
+/* i2d_PublicKey marshals a public key from |key| to a type-specific format.
+ * If |outp| is not NULL then the result is written to |*outp| and
* |*outp| is advanced just past the output. It returns the number of bytes in
- * the result, whether written or not, or a negative value on error. */
+ * the result, whether written or not, or a negative value on error.
+ *
+ * RSA keys are serialized as a DER-encoded RSAPublicKey (RFC 3447) structure.
+ * EC keys are serialized as an EC point per SEC 1. */
OPENSSL_EXPORT int i2d_PublicKey(EVP_PKEY *key, uint8_t **outp);