I believe there's an error in man page BIO_should_retry(3). BIO_get_retry_reason() IMHO does NOT return a mask of the cause of a retry condition, but BIO_retry_type() does.
Index: BIO_should_retry.pod =================================================================== RCS file: /v/openssl/cvs/openssl/doc/crypto/BIO_should_retry.pod,v retrieving revision 1.7 diff -u -r1.7 BIO_should_retry.pod --- BIO_should_retry.pod 16 Sep 2000 16:00:22 -0000 1.7 +++ BIO_should_retry.pod 28 Mar 2010 17:19:52 -0000 @@ -45,7 +45,7 @@ BIO_should_io_special() is true if some "special" condition, that is a reason other than reading or writing is the cause of the condition. -BIO_get_retry_reason() returns a mask of the cause of a retry condition +BIO_retry_type() returns a mask of the cause of a retry condition consisting of the values B<BIO_FLAGS_READ>, B<BIO_FLAGS_WRITE>, B<BIO_FLAGS_IO_SPECIAL> though current BIO types will only set one of these.
