|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2023 the original author or authors. |
| 2 | + * Copyright 2002-2025 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -119,7 +119,15 @@ public List<String> getX509CertificateChain() {
|
119 | 119 | * thumbprint (a.k.a. digest) of the DER encoding of the X.509 certificate
|
120 | 120 | * corresponding to the key used to digitally sign the JWS or encrypt the JWE.
|
121 | 121 | * @return the X.509 certificate SHA-1 thumbprint
|
| 122 | + * @deprecated The SHA-1 algorithm has been proven to be vulnerable to collision |
| 123 | + * attacks and should not be used. See the <a target="_blank" href= |
| 124 | + * "https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html">Google |
| 125 | + * Security Blog</a> for more info. |
| 126 | + * @see <a target="_blank" href= |
| 127 | + * "https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html">Announcing |
| 128 | + * the first SHA1 collision</a> |
122 | 129 | */
|
| 130 | + @Deprecated |
123 | 131 | public String getX509SHA1Thumbprint() {
|
124 | 132 | return getHeader(JoseHeaderNames.X5T);
|
125 | 133 | }
|
@@ -271,7 +279,15 @@ public B x509CertificateChain(List<String> x509CertificateChain) {
|
271 | 279 | * corresponding to the key used to digitally sign the JWS or encrypt the JWE.
|
272 | 280 | * @param x509SHA1Thumbprint the X.509 certificate SHA-1 thumbprint
|
273 | 281 | * @return the {@link AbstractBuilder}
|
| 282 | + * @deprecated The SHA-1 algorithm has been proven to be vulnerable to collision |
| 283 | + * attacks and should not be used. See the <a target="_blank" href= |
| 284 | + * "https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html">Google |
| 285 | + * Security Blog</a> for more info. |
| 286 | + * @see <a target="_blank" href= |
| 287 | + * "https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html">Announcing |
| 288 | + * the first SHA1 collision</a> |
274 | 289 | */
|
| 290 | + @Deprecated |
275 | 291 | public B x509SHA1Thumbprint(String x509SHA1Thumbprint) {
|
276 | 292 | return header(JoseHeaderNames.X5T, x509SHA1Thumbprint);
|
277 | 293 | }
|
|
0 commit comments