[openssl] openssl-3.0 update
matthias.st.pierre at ncp-e.com
matthias.st.pierre at ncp-e.com
Sun Feb 20 11:58:45 UTC 2022
The branch openssl-3.0 has been updated
via 18e046c8a2e562cf947aa2b5b4cce31bb0ff75a1 (commit)
from 6ff03e39189b4b1767157d1e1035365036f4f907 (commit)
- Log -----------------------------------------------------------------
commit 18e046c8a2e562cf947aa2b5b4cce31bb0ff75a1
Author: yangyangtiantianlonglong <yangtianlong1224 at 163.com>
Date: Wed Feb 16 23:33:17 2022 +0800
doc: Refactored the example in crypto.pod
Added return value and error code in the sample
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Tim Hudson <tjh at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17721)
(cherry picked from commit 4a4f446008938775c2bea3001c4c8e7a674992ad)
-----------------------------------------------------------------------
Summary of changes:
doc/man7/crypto.pod | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/doc/man7/crypto.pod b/doc/man7/crypto.pod
index 2b09ad8903..a0cdca4fb3 100644
--- a/doc/man7/crypto.pod
+++ b/doc/man7/crypto.pod
@@ -380,6 +380,7 @@ encryption/decryption, signatures, message authentication codes, etc.
#include <stdio.h>
#include <openssl/evp.h>
#include <openssl/bio.h>
+ #include <openssl/err.h>
int main(void)
{
@@ -390,6 +391,7 @@ encryption/decryption, signatures, message authentication codes, etc.
};
unsigned int len = 0;
unsigned char *outdigest = NULL;
+ int ret = 1;
/* Create a context for the digest operation */
ctx = EVP_MD_CTX_new();
@@ -430,11 +432,16 @@ encryption/decryption, signatures, message authentication codes, etc.
/* Print out the digest result */
BIO_dump_fp(stdout, outdigest, len);
+ ret = 0;
+
err:
/* Clean up all the resources we allocated */
OPENSSL_free(outdigest);
EVP_MD_free(sha256);
EVP_MD_CTX_free(ctx);
+ if (ret != 0)
+ ERR_print_errors_fp(stderr);
+ return ret;
}
=head1 CONFIGURATION
More information about the openssl-commits
mailing list