]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - doc/man3/EVP_PKEY_encrypt.pod
doc/man3: use the documented coding style in the example code
[thirdparty/openssl.git] / doc / man3 / EVP_PKEY_encrypt.pod
index 24a0b0a137f110bfb313c9c625f49b9aae969071..2234897bd24a161c8555ebd387913cf37e2bf385 100644 (file)
@@ -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 */