return talloc_free(bio);
}
+static ssize_t fr_bio_shutdown_read(UNUSED fr_bio_t *bio, UNUSED void *packet_ctx, UNUSED void *buffer, UNUSED size_t size)
+{
+ return fr_bio_error(SHUTDOWN);
+}
+
+static ssize_t fr_bio_shutdown_write(UNUSED fr_bio_t *bio, UNUSED void *packet_ctx, UNUSED void const *buffer, UNUSED size_t size)
+{
+ return fr_bio_error(SHUTDOWN);
+}
+
/** Shut down a set of BIOs
*
* We shut down the BIOs from the top to the bottom. This gives the TLS BIO an opportunity to
*/
my->priv_cb.shutdown(&my->bio);
my->priv_cb.shutdown = NULL;
+
+ my->bio.read = fr_bio_shutdown_read;
+ my->bio.write = fr_bio_shutdown_write;
}
/*
FR_BIO_ERROR_VERIFY, //!< some packet verification error
FR_BIO_ERROR_BUFFER_FULL, //!< the buffer is full
FR_BIO_ERROR_BUFFER_TOO_SMALL, //!< the output buffer is too small for the data
+ FR_BIO_ERROR_SHUTDOWN, //!< the BIO has been shut down
} fr_bio_error_type_t;
typedef struct fr_bio_s fr_bio_t;