|
19 | 19 | is_cybertrust=$(openssl x509 -in $filename -text -nocert | grep "O = \"Cybertrust, Inc\"") |
20 | 20 | is_usertrust=$(openssl x509 -in $filename -text -nocert | grep "O = The USERTRUST Network") |
21 | 21 |
|
| 22 | + openssl_opts="-text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions" |
| 23 | + |
22 | 24 | if [ ! -z "$is_amazon" ] |
23 | 25 | then |
24 | 26 | echo $is_amazon |
25 | | - openssl x509 -in $filename -text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions >> roots.pem |
| 27 | + openssl x509 -in $filename $openssl_opts >> roots.pem |
26 | 28 | fi |
27 | 29 |
|
28 | 30 | if [ ! -z "$is_google" ] |
29 | 31 | then |
30 | 32 | echo $is_google |
31 | | - openssl x509 -in $filename -text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions >> roots.pem |
| 33 | + openssl x509 -in $filename $openssl_opts >> roots.pem |
32 | 34 | fi |
33 | 35 |
|
34 | 36 | if [ ! -z "$is_comodo_uppercase" ] |
35 | 37 | then |
36 | 38 | echo $is_comodo_uppercase |
37 | | - openssl x509 -in $filename -text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions >> roots.pem |
| 39 | + openssl x509 -in $filename $openssl_opts >> roots.pem |
38 | 40 | fi |
39 | 41 |
|
40 | 42 | if [ ! -z "$is_comodo" ] |
41 | 43 | then |
42 | 44 | echo $is_comodo |
43 | | - openssl x509 -in $filename -text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions >> roots.pem |
| 45 | + openssl x509 -in $filename $openssl_opts >> roots.pem |
44 | 46 | fi |
45 | 47 |
|
46 | 48 | if [ ! -z "$is_digicert" ] |
47 | 49 | then |
48 | 50 | echo $is_digicert |
49 | | - openssl x509 -in $filename -text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions >> roots.pem |
| 51 | + openssl x509 -in $filename $openssl_opts >> roots.pem |
50 | 52 | fi |
51 | 53 |
|
52 | 54 | if [ ! -z "$is_isrg" ] |
53 | 55 | then |
54 | 56 | echo $is_isrg |
55 | | - openssl x509 -in $filename -text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions >> roots.pem |
| 57 | + openssl x509 -in $filename $openssl_opts >> roots.pem |
56 | 58 | fi |
57 | 59 |
|
58 | 60 | if [ ! -z "$is_verisign" ] |
59 | 61 | then |
60 | 62 | echo $is_verisign |
61 | | - openssl x509 -in $filename -text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions >> roots.pem |
| 63 | + openssl x509 -in $filename $openssl_opts >> roots.pem |
62 | 64 | fi |
63 | 65 |
|
64 | 66 | if [ ! -z "$is_baltimore" ] |
65 | 67 | then |
66 | 68 | echo $is_baltimore |
67 | | - openssl x509 -in $filename -text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions >> roots.pem |
| 69 | + openssl x509 -in $filename $openssl_opts >> roots.pem |
68 | 70 | fi |
69 | 71 |
|
70 | 72 | if [ ! -z "$is_globalsign" ] |
71 | 73 | then |
72 | 74 | echo $is_globalsign |
73 | | - openssl x509 -in $filename -text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions >> roots.pem |
| 75 | + openssl x509 -in $filename $openssl_opts >> roots.pem |
74 | 76 | fi |
75 | 77 |
|
76 | 78 | if [ ! -z "$is_starfield" ] |
77 | 79 | then |
78 | 80 | echo $is_starfield |
79 | | - openssl x509 -in $filename -text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions >> roots.pem |
| 81 | + openssl x509 -in $filename $openssl_opts >> roots.pem |
80 | 82 | fi |
81 | 83 |
|
82 | 84 | if [ ! -z "$is_dst" ] |
83 | 85 | then |
84 | 86 | echo $is_dst |
85 | | - openssl x509 -in $filename -text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions >> roots.pem |
| 87 | + openssl x509 -in $filename $openssl_opts >> roots.pem |
86 | 88 | fi |
87 | 89 |
|
88 | 90 | if [ ! -z "$is_cybertrust" ] |
89 | 91 | then |
90 | 92 | echo $is_cybertrust |
91 | | - openssl x509 -in $filename -text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions >> roots.pem |
| 93 | + openssl x509 -in $filename $openssl_opts >> roots.pem |
92 | 94 | fi |
93 | 95 |
|
94 | 96 | if [ ! -z "$is_usertrust" ] |
95 | 97 | then |
96 | 98 | echo $is_usertrust |
97 | | - openssl x509 -in $filename -text -certopt no_header,no_pubkey,no_subject,no_issuer,no_signame,no_version,no_serial,no_validity,no_extensions,no_sigdump,no_aux,no_extensions >> roots.pem |
| 99 | + openssl x509 -in $filename $openssl_opts >> roots.pem |
98 | 100 | fi |
99 | 101 |
|
100 | 102 | done |
0 commit comments