Skip to content

BIO datagram functions #2321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ add_library(
bio/bio.c
bio/bio_mem.c
bio/connect.c
bio/dgram.c
bio/errno.c
bio/fd.c
bio/file.c
Expand Down
4 changes: 4 additions & 0 deletions crypto/bio/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,10 @@ int BIO_set_close(BIO *bio, int close_flag) {
return (int)BIO_ctrl(bio, BIO_CTRL_SET_CLOSE, close_flag, NULL);
}

int BIO_get_close(BIO *bio) {
return (int)BIO_ctrl(bio, BIO_CTRL_GET_CLOSE, 0, NULL);
}

OPENSSL_EXPORT uint64_t BIO_number_read(const BIO *bio) {
return bio->num_read;
}
Expand Down
2 changes: 1 addition & 1 deletion crypto/bio/bio_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ static long mem_ctrl(BIO *bio, int cmd, long num, void *ptr) {
b->data -= b->max - b->length;
b->length = b->max;
} else {
OPENSSL_memset(b->data, 0, b->max);
OPENSSL_cleanse(b->data, b->max);
b->length = 0;
}
}
Expand Down
Loading
Loading