File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -119,10 +119,22 @@ TEST_F(PKeyUtlTest, VerifyTest) {
119
119
// Just opening and closing the file
120
120
}
121
121
fprintf (stderr, " DEBUG: Now reading with ReadFileToString\n " );
122
- std::string output = ReadFileToString (out_path);
122
+ // Create a BIO for reading the file
123
+ bssl::UniquePtr<BIO> bio (BIO_new_file (out_path, " rb" ));
124
+ ASSERT_TRUE (bio);
125
+
126
+ // Read the file contents
127
+ const int buffer_size = 1024 ;
128
+ std::vector<char > buffer (buffer_size);
129
+ std::string output;
130
+ int bytes_read;
131
+
132
+ while ((bytes_read = BIO_read (bio.get (), buffer.data (), buffer_size)) > 0 ) {
133
+ output.append (buffer.data (), bytes_read);
134
+ }
135
+
123
136
fprintf (stderr, " DEBUG: Output file content length: %zu\n " , output.length ());
124
137
ASSERT_NE (output.find (" Signature Verified Successfully" ), std::string::npos);
125
- fprintf (stderr, " DEBUG: VerifyTest completed successfully\n " );
126
138
}
127
139
}
128
140
You can’t perform that action at this time.
0 commit comments