Commit e9415c4fc6 for openssl.org

commit e9415c4fc64a42f57507e5edd5e2333dd018a465
Author: Shreenidhi Shedi <yesshedi@gmail.com>
Date:   Thu Jul 9 16:24:08 2026 +0530

    apps/tsget: use three-arg open and binmode for binary safety

    Switch bareword INPUT filehandle to a lexical filehandle with
    three-argument open. Add binmode on both the STDIN and file paths
    so timestamp request data is read as raw bytes on all platforms.

    Assisted-by: Claude:claude-sonnet-4-6
    Signed-off-by: Shreenidhi Shedi <yesshedi@gmail.com>

    Reviewed-by: Andrew Dinh <andrewd@openssl.org>
    Reviewed-by: Matt Caswell <matt@openssl.foundation>
    MergeDate: Fri Aug  7 13:29:38 2026
    (Merged from https://github.com/openssl/openssl/pull/31445)

diff --git a/apps/tsget.in b/apps/tsget.in
index 51b78e9245..027d5666e5 100644
--- a/apps/tsget.in
+++ b/apps/tsget.in
@@ -138,14 +138,15 @@ REQUEST: foreach (@ARGV) {
     # Read request.
     my $body;
     if ($input eq "-") {
-        # Read the request from STDIN;
+        binmode STDIN;
         $body = <STDIN>;
     } else {
         # Read the request from file.
-        open INPUT, "<" . $input
+        open my $in, '<', $input
             or warn("$input: could not open input file: $!\n"), next REQUEST;
-        $body = <INPUT>;
-        close INPUT
+        binmode $in;
+        $body = <$in>;
+        close $in
             or warn("$input: could not close input file: $!\n"), next REQUEST;
     }