summaryrefslogtreecommitdiffstats
path: root/doc/man3/BIO_f_md.pod
diff options
context:
space:
mode:
Diffstat (limited to 'doc/man3/BIO_f_md.pod')
-rw-r--r--doc/man3/BIO_f_md.pod4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/man3/BIO_f_md.pod b/doc/man3/BIO_f_md.pod
index 3c8d4311ae..7074202a56 100644
--- a/doc/man3/BIO_f_md.pod
+++ b/doc/man3/BIO_f_md.pod
@@ -79,6 +79,7 @@ checking has been omitted for clarity.
BIO *bio, *mdtmp;
char message[] = "Hello World";
+
bio = BIO_new(BIO_s_null());
mdtmp = BIO_new(BIO_f_md());
BIO_set_md(mdtmp, EVP_sha1());
@@ -98,6 +99,7 @@ The next example digests data by reading through a chain instead:
BIO *bio, *mdtmp;
char buf[1024];
int rdlen;
+
bio = BIO_new_file(file, "rb");
mdtmp = BIO_new(BIO_f_md());
BIO_set_md(mdtmp, EVP_sha1());
@@ -117,9 +119,11 @@ outputs them. This could be used with the examples above.
unsigned char mdbuf[EVP_MAX_MD_SIZE];
int mdlen;
int i;
+
mdtmp = bio; /* Assume bio has previously been set up */
do {
EVP_MD *md;
+
mdtmp = BIO_find_type(mdtmp, BIO_TYPE_MD);
if (!mdtmp)
break;