Skip to content

Commit

Permalink
Merge pull request #243 from Castaglia/ssh-hostkey-secmem
Browse files Browse the repository at this point in the history
Use `BIO_s_secmem()` for `ProxySFTPHostKey` files, when available.
  • Loading branch information
Castaglia authored Feb 20, 2023
2 parents 50538cf + 7b49992 commit 61b81ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/proxy/ssh/keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,11 @@ static BIO *load_hostkey_bio(pool *p, int fd) {

bufsz = st.st_blksize;
buf = palloc(p, bufsz);
#if defined(PR_USE_OPENSSL_BIO_SECMEM)
bio = BIO_new(BIO_s_secmem());
#else
bio = BIO_new(BIO_s_mem());
#endif /* PR_USE_OPENSSL_BIO_SECMEM */

res = read(fd, buf, bufsz);
xerrno = errno;
Expand Down

0 comments on commit 61b81ba

Please sign in to comment.