|
|
b3353e |
diff -up openssl-1.1.1h/apps/openssl.cnf.ts-sha256-default openssl-1.1.1h/apps/openssl.cnf
|
|
|
b3353e |
--- openssl-1.1.1h/apps/openssl.cnf.ts-sha256-default 2020-11-06 11:07:28.850100899 +0100
|
|
|
b3353e |
+++ openssl-1.1.1h/apps/openssl.cnf 2020-11-06 11:11:28.042913791 +0100
|
|
|
b3353e |
@@ -364,5 +348,5 @@ tsa_name = yes # Must the TSA name be i
|
|
|
b3353e |
# (optional, default: no)
|
|
|
b3353e |
ess_cert_id_chain = no # Must the ESS cert id chain be included?
|
|
|
b3353e |
# (optional, default: no)
|
|
|
b3353e |
-ess_cert_id_alg = sha1 # algorithm to compute certificate
|
|
|
b3353e |
+ess_cert_id_alg = sha256 # algorithm to compute certificate
|
|
|
b3353e |
# identifier (optional, default: sha1)
|
|
|
b3353e |
diff -up openssl-1.1.1h/apps/ts.c.ts-sha256-default openssl-1.1.1h/apps/ts.c
|
|
|
b3353e |
--- openssl-1.1.1h/apps/ts.c.ts-sha256-default 2020-09-22 14:55:07.000000000 +0200
|
|
|
b3353e |
+++ openssl-1.1.1h/apps/ts.c 2020-11-06 11:07:28.883101220 +0100
|
|
|
b3353e |
@@ -423,7 +423,7 @@ static TS_REQ *create_query(BIO *data_bi
|
|
|
acdedc |
ASN1_OBJECT *policy_obj = NULL;
|
|
|
acdedc |
ASN1_INTEGER *nonce_asn1 = NULL;
|
|
|
acdedc |
|
|
|
acdedc |
- if (md == NULL && (md = EVP_get_digestbyname("sha1")) == NULL)
|
|
|
acdedc |
+ if (md == NULL && (md = EVP_get_digestbyname("sha256")) == NULL)
|
|
|
acdedc |
goto err;
|
|
|
acdedc |
if ((ts_req = TS_REQ_new()) == NULL)
|
|
|
acdedc |
goto err;
|
|
|
b3353e |
diff -up openssl-1.1.1h/crypto/ts/ts_conf.c.ts-sha256-default openssl-1.1.1h/crypto/ts/ts_conf.c
|
|
|
b3353e |
--- openssl-1.1.1h/crypto/ts/ts_conf.c.ts-sha256-default 2020-11-06 12:03:51.226372867 +0100
|
|
|
b3353e |
+++ openssl-1.1.1h/crypto/ts/ts_conf.c 2020-11-06 12:04:01.713488990 +0100
|
|
|
b3353e |
@@ -476,7 +476,7 @@ int TS_CONF_set_ess_cert_id_digest(CONF
|
|
|
b3353e |
const char *md = NCONF_get_string(conf, section, ENV_ESS_CERT_ID_ALG);
|
|
|
b3353e |
|
|
|
b3353e |
if (md == NULL)
|
|
|
b3353e |
- md = "sha1";
|
|
|
b3353e |
+ md = "sha256";
|
|
|
b3353e |
|
|
|
b3353e |
cert_md = EVP_get_digestbyname(md);
|
|
|
b3353e |
if (cert_md == NULL) {
|
|
|
b3353e |
diff -up openssl-1.1.1h/doc/man1/ts.pod.ts-sha256-default openssl-1.1.1h/doc/man1/ts.pod
|
|
|
b3353e |
--- openssl-1.1.1h/doc/man1/ts.pod.ts-sha256-default 2020-09-22 14:55:07.000000000 +0200
|
|
|
b3353e |
+++ openssl-1.1.1h/doc/man1/ts.pod 2020-11-06 11:07:28.883101220 +0100
|
|
|
b3353e |
@@ -518,7 +518,7 @@ included. Default is no. (Optional)
|
|
|
acdedc |
=item B<ess_cert_id_alg>
|
|
|
acdedc |
|
|
|
acdedc |
This option specifies the hash function to be used to calculate the TSA's
|
|
|
acdedc |
-public key certificate identifier. Default is sha1. (Optional)
|
|
|
acdedc |
+public key certificate identifier. Default is sha256. (Optional)
|
|
|
acdedc |
|
|
|
acdedc |
=back
|
|
|
acdedc |
|
|
|
b3353e |
@@ -530,7 +530,7 @@ openssl/apps/openssl.cnf will do.
|
|
|
acdedc |
|
|
|
acdedc |
=head2 Time Stamp Request
|
|
|
acdedc |
|
|
|
b3353e |
-To create a timestamp request for design1.txt with SHA-1
|
|
|
b3353e |
+To create a timestamp request for design1.txt with SHA-256
|
|
|
acdedc |
without nonce and policy and no certificate is required in the response:
|
|
|
acdedc |
|
|
|
acdedc |
openssl ts -query -data design1.txt -no_nonce \
|
|
|
b3353e |
@@ -546,12 +546,12 @@ To print the content of the previous req
|
|
|
acdedc |
|
|
|
acdedc |
openssl ts -query -in design1.tsq -text
|
|
|
acdedc |
|
|
|
b3353e |
-To create a timestamp request which includes the MD-5 digest
|
|
|
b3353e |
+To create a timestamp request which includes the SHA-512 digest
|
|
|
acdedc |
of design2.txt, requests the signer certificate and nonce,
|
|
|
acdedc |
specifies a policy id (assuming the tsa_policy1 name is defined in the
|
|
|
acdedc |
OID section of the config file):
|
|
|
acdedc |
|
|
|
acdedc |
- openssl ts -query -data design2.txt -md5 \
|
|
|
acdedc |
+ openssl ts -query -data design2.txt -sha512 \
|
|
|
acdedc |
-tspolicy tsa_policy1 -cert -out design2.tsq
|
|
|
acdedc |
|
|
|
acdedc |
=head2 Time Stamp Response
|