Commit a75e930
authored
Add openssl version -a and -p flag support (#3092)
### Description of changes:
For compatibility, we should implement these CLI flags to prevent
certain test scripts from erroring out.
Add -a (all) and -p (platform) boolean flags to the version subcommand:
- No flags: print version line only (preserves existing behavior)
- -a: print version, built on, platform, compiler, OPENSSLDIR
- -p: print platform line only
### Call-outs:
This doesn't actually print anything useful, but it does call the
OpenSSL APIs and prints the stub strings that we had in place. If I had
to hazard a guess this was either an intentional attempt to avoid
leaking implementation details or they were lazy (Occam's razor suggests
the latter).
### Testing:
How is this change tested (unit tests, fuzz tests, etc.)? Are there any
testing steps to be verified by the reviewer?
```
# Sample outputs
➜ aws-lc git:(version-a) ✗ ./build/tool-openssl/openssl version -p
platform: n/a
➜ aws-lc git:(version-a) ✗ ./build/tool-openssl/openssl version -a
OpenSSL 1.1.1 (compatible; AWS-LC 1.69.0)
built on: n/a
platform: n/a
compiler: n/a
OPENSSLDIR: n/a
```
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.1 parent 474a12c commit a75e930
1 file changed
Lines changed: 32 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | | - | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
20 | 50 | | |
21 | 51 | | |
22 | 52 | | |
0 commit comments