Make it possible for external code to flag a certificate as a proxy one.
[openssl.git] / doc / crypto / EVP_PKEY_verify_recover.pod
index ba7ddfdfd4c9ba219b6fdfc3773d6589bd6e1c23..837bc64ec2275ae358388cae7b3431cc004c689f 100644 (file)
@@ -10,8 +10,8 @@ EVP_PKEY_verify_recover_init, EVP_PKEY_verify_recover - recover signature using
 
  int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
  int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
-                       unsigned char *rout, size_t *routlen,
-                       const unsigned char *sig, size_t siglen);
+                        unsigned char *rout, size_t *routlen,
+                        const unsigned char *sig, size_t siglen);
 
 =head1 DESCRIPTION
 
@@ -29,7 +29,7 @@ B<rout> and the amount of data written to B<routlen>.
 =head1 NOTES
 
 Normally an application is only interested in whether a signature verification
-operation is successful in those cases the EVP_verify() function should be 
+operation is successful in those cases the EVP_verify() function should be
 used.
 
 Sometimes however it is useful to obtain the data originally signed using a
@@ -58,32 +58,32 @@ Recover digest originally signed using PKCS#1 and SHA256 digest:
 
  EVP_PKEY_CTX *ctx;
  unsigned char *rout, *sig;
- size_t routlen, siglen; 
+ size_t routlen, siglen;
  EVP_PKEY *verify_key;
  /* NB: assumes verify_key, sig and siglen are already set up
   * and that verify_key is an RSA public key
   */
  ctx = EVP_PKEY_CTX_new(verify_key);
  if (!ctx)
-       /* Error occurred */
+        /* Error occurred */
  if (EVP_PKEY_verify_recover_init(ctx) <= 0)
-       /* Error */
+        /* Error */
  if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING) <= 0)
-       /* Error */
+        /* Error */
  if (EVP_PKEY_CTX_set_signature_md(ctx, EVP_sha256()) <= 0)
-       /* Error */
+        /* Error */
 
  /* Determine buffer length */
  if (EVP_PKEY_verify_recover(ctx, NULL, &routlen, sig, siglen) <= 0)
-       /* Error */
+        /* Error */
 
  rout = OPENSSL_malloc(routlen);
 
  if (!rout)
-       /* malloc failure */
+        /* malloc failure */
+
  if (EVP_PKEY_verify_recover(ctx, rout, &routlen, sig, siglen) <= 0)
-       /* Error */
+        /* Error */
 
  /* Recovered data is routlen bytes written to buffer rout */
 
@@ -94,14 +94,12 @@ L<EVP_PKEY_encrypt(3)>,
 L<EVP_PKEY_decrypt(3)>,
 L<EVP_PKEY_sign(3)>,
 L<EVP_PKEY_verify(3)>,
-L<EVP_PKEY_derive(3)> 
+L<EVP_PKEY_derive(3)>
 
 =head1 HISTORY
 
 These functions were first added to OpenSSL 1.0.0.
 
-=cut
-
 =head1 COPYRIGHT
 
 Copyright 2013-2016 The OpenSSL Project Authors. All Rights Reserved.