diff options
author | Beat Bolli <dev@drbeat.li> | 2016-11-19 00:10:05 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-06-08 11:54:15 +0100 |
commit | 2947af32a0ec6666efd5b287ac4609ba3a984f0d (patch) | |
tree | 7f024902fa2741965c415283a734267fcd083976 /doc/man3/EVP_PKEY_encrypt.pod | |
parent | 52df25cf2e656146cb3b206d8220124f0417d03f (diff) | |
download | openssl-2947af32a0ec6666efd5b287ac4609ba3a984f0d.tar.gz |
doc/man3: use the documented coding style in the example code
Adjust brace placement, whitespace after keywords, indentation and empty
lines after variable declarations according to
https://www.openssl.org/policies/codingstyle.html.
Indent literal sections by exactly one space.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1956)
Diffstat (limited to 'doc/man3/EVP_PKEY_encrypt.pod')
-rw-r--r-- | doc/man3/EVP_PKEY_encrypt.pod | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/man3/EVP_PKEY_encrypt.pod b/doc/man3/EVP_PKEY_encrypt.pod index 24a0b0a137..2234897bd2 100644 --- a/doc/man3/EVP_PKEY_encrypt.pod +++ b/doc/man3/EVP_PKEY_encrypt.pod @@ -56,28 +56,29 @@ set 'eng = NULL;' to start with the default OpenSSL RSA implementation: unsigned char *out, *in; size_t outlen, inlen; EVP_PKEY *key; - /* NB: assumes eng, key, in, inlen are already set up, + /* + * NB: assumes eng, key, in, inlen are already set up, * and that key is an RSA public key */ ctx = EVP_PKEY_CTX_new(key, eng); if (!ctx) - /* Error occurred */ + /* Error occurred */ if (EVP_PKEY_encrypt_init(ctx) <= 0) - /* Error */ + /* Error */ if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_OAEP_PADDING) <= 0) - /* Error */ + /* Error */ /* Determine buffer length */ if (EVP_PKEY_encrypt(ctx, NULL, &outlen, in, inlen) <= 0) - /* Error */ + /* Error */ out = OPENSSL_malloc(outlen); if (!out) - /* malloc failure */ + /* malloc failure */ if (EVP_PKEY_encrypt(ctx, out, &outlen, in, inlen) <= 0) - /* Error */ + /* Error */ /* Encrypted data is outlen bytes written to buffer out */ |