Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Discontinue Java 7 support.
Browse files Browse the repository at this point in the history
The primary reason to drop that support is because Bazel [1] and Protobuf [2] have stopped supporting Java 7.

The second reason is that nobody in the wild should rely on Java 7 any more because it was discontinued years ago.

The third reason is, due to the first reason, Tink 1.4.0-rc1 and 1.4.0-rc2 were accidentally compiled with Java 8. No user, however, has complained.

Remove the JAVACOPTS option. Because Tink depends on Protobuf, Tink cannot really specify which Java version it can support, but it has to use whatever version that Protobuf supports.

[1] bazelbuild/bazel#9450
[2] protocolbuffers/protobuf#7306

PiperOrigin-RevId: 321114818
  • Loading branch information
thaidn authored and copybara-github committed Jul 14, 2020
1 parent e08b03a commit 34cc5a1
Show file tree
Hide file tree
Showing 28 changed files with 12 additions and 115 deletions.
9 changes: 4 additions & 5 deletions docs/KNOWN-ISSUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ tickets or emailing the maintainers at `tink-users@googlegroups.com`.

## Java

* Tink supports Java 7 or newer. Please file a ticket if you want to support
Java 6.
* Tink supports Java 8 or newer. Java 7 support was removed since 1.4.0.

* Tink is built on top of Java security providers, but, via [Project
Wycheproof](https://github.com/google/wycheproof), we found many security
issues in popular providers. Tink provides countermeasures for most
* Tink is built on top of Java security providers, but, via
[Project Wycheproof](https://github.com/google/wycheproof), we found many
security issues in popular providers. Tink provides countermeasures for most
problems, and we've also helped upstream fix many issues. Still, there are
some issues in old providers that we cannot fix. We recommend use Tink with
the latest version of Conscrypt, Oracle JDK, OpenJDK or Bouncy Castle. If
Expand Down
4 changes: 0 additions & 4 deletions java_src/src/main/java/com/google/crypto/tink/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("//tools/build_defs:javac.bzl", "JAVACOPTS_OSS")
load("@build_bazel_rules_android//android:rules.bzl", "android_library")
load("@tink_base//:tink_version.bzl", "TINK_VERSION_LABEL")
load("@tink_base//tools:common.bzl", "template_rule")
Expand Down Expand Up @@ -587,7 +586,6 @@ PRIMITIVES_SRCS = [
java_library(
name = "primitives",
srcs = PRIMITIVES_SRCS,
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
)

Expand Down Expand Up @@ -648,7 +646,6 @@ java_library(
"TextFormatKeysetWriters.java",
],
) + [":version_java"],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = lite_protos + [
":primitives",
Expand Down Expand Up @@ -676,7 +673,6 @@ java_library(
srcs = [
":cleartext_keyset_handle_srcs",
],
javacopts = JAVACOPTS_OSS,
deps = lite_protos + [
":android",
"@com_google_protobuf//:protobuf_javalite",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("//tools/build_defs:javac.bzl", "JAVACOPTS_OSS")
load("@build_bazel_rules_android//android:rules.bzl", "android_library")

licenses(["notice"])
Expand Down Expand Up @@ -483,7 +482,6 @@ lite_protos = [
java_library(
name = "aead",
srcs = [":srcs"],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = full_protos + [
"//src/main/java/com/google/crypto/tink",
Expand All @@ -498,7 +496,6 @@ java_library(
java_library(
name = "android",
srcs = [":srcs"],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = lite_protos + [
"//src/main/java/com/google/crypto/tink:android",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
load("//tools/build_defs:javac.bzl", "JAVACOPTS_OSS")

licenses(["notice"])

package(default_visibility = ["//:__subpackages__"])

java_library(
name = "aead_factory",
srcs = ["AeadFactory.java"],
javacopts = JAVACOPTS_OSS,
deps = [
"//src/main/java/com/google/crypto/tink:aead",
"@maven//:com_google_errorprone_error_prone_annotations",
Expand All @@ -17,7 +14,6 @@ java_library(
java_library(
name = "aes_gcm_factory",
srcs = ["AesGcmFactory.java"],
javacopts = JAVACOPTS_OSS,
deps = [
":aead_factory",
"//src/main/java/com/google/crypto/tink:aead",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
load("//tools/build_defs:javac.bzl", "JAVACOPTS_OSS")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])
Expand All @@ -16,5 +14,4 @@ java_library(
srcs = glob([
"*.java",
]),
javacopts = JAVACOPTS_OSS,
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("//tools/build_defs:javac.bzl", "JAVACOPTS_OSS")
load("@build_bazel_rules_android//android:rules.bzl", "android_library")

licenses(["notice"])
Expand Down Expand Up @@ -45,7 +44,6 @@ filegroup(
java_library(
name = "config",
srcs = [":srcs"],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = [
"//proto:config_java_proto",
Expand All @@ -60,7 +58,6 @@ java_library(
java_library(
name = "android",
srcs = [":srcs"],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = [
"//proto:config_java_proto_lite",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("//tools/build_defs:javac.bzl", "JAVACOPTS_OSS")
load("@build_bazel_rules_android//android:rules.bzl", "android_library")

licenses(["notice"])
Expand Down Expand Up @@ -157,7 +156,6 @@ lite_protos = [
java_library(
name = "daead",
srcs = [":srcs"],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = full_protos + [
"//src/main/java/com/google/crypto/tink",
Expand All @@ -170,7 +168,6 @@ java_library(
java_library(
name = "android",
srcs = [":srcs"],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = lite_protos + [
"//src/main/java/com/google/crypto/tink:android",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("//tools/build_defs:javac.bzl", "JAVACOPTS_OSS")
load("@build_bazel_rules_android//android:rules.bzl", "android_library")

licenses(["notice"])
Expand Down Expand Up @@ -371,7 +370,6 @@ java_library(
srcs = [
":srcs",
],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = full_protos + [
"//src/main/java/com/google/crypto/tink",
Expand All @@ -388,7 +386,6 @@ java_library(
srcs = [
":srcs",
],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = lite_protos + [
"//src/main/java/com/google/crypto/tink:android",
Expand Down
3 changes: 0 additions & 3 deletions java_src/src/main/java/com/google/crypto/tink/mac/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("//tools/build_defs:javac.bzl", "JAVACOPTS_OSS")
load("@build_bazel_rules_android//android:rules.bzl", "android_library")

licenses(["notice"])
Expand Down Expand Up @@ -207,7 +206,6 @@ lite_protos = [
java_library(
name = "mac",
srcs = [":srcs"],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = full_protos + [
"//src/main/java/com/google/crypto/tink",
Expand All @@ -220,7 +218,6 @@ java_library(
java_library(
name = "android",
srcs = [":srcs"],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = lite_protos + [
"//src/main/java/com/google/crypto/tink:android",
Expand Down
11 changes: 0 additions & 11 deletions java_src/src/main/java/com/google/crypto/tink/prf/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
load("//tools/build_defs:javac.bzl", "JAVACOPTS_OSS")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

java_library(
name = "hkdf_prf_key_manager",
srcs = ["HkdfPrfKeyManager.java"],
javacopts = JAVACOPTS_OSS,
deps = [
":prf_set",
"//proto:common_java_proto",
Expand All @@ -29,7 +26,6 @@ java_library(
java_library(
name = "prf_key_templates",
srcs = ["PrfKeyTemplates.java"],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = [
":hkdf_prf_key_manager",
Expand All @@ -42,7 +38,6 @@ java_library(
java_library(
name = "prf_config",
srcs = ["PrfConfig.java"],
javacopts = JAVACOPTS_OSS,
deps = [
":hkdf_prf_key_manager",
":prf_set_wrapper",
Expand All @@ -55,7 +50,6 @@ java_library(
"Prf.java",
"PrfSet.java",
],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = [
"@maven//:com_google_errorprone_error_prone_annotations",
Expand All @@ -67,7 +61,6 @@ java_library(
srcs = [
"PrfSetWrapper.java",
],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = [
":prf_set",
Expand All @@ -82,7 +75,6 @@ java_library(
java_library(
name = "hkdf_prf_key_manager-android",
srcs = ["HkdfPrfKeyManager.java"],
javacopts = JAVACOPTS_OSS,
deps = [
":prf_set",
"//proto:common_java_proto_lite",
Expand All @@ -104,7 +96,6 @@ java_library(
java_library(
name = "prf_key_templates-android",
srcs = ["PrfKeyTemplates.java"],
javacopts = JAVACOPTS_OSS,
deps = [
":hkdf_prf_key_manager-android",
"//proto:common_java_proto_lite",
Expand All @@ -116,7 +107,6 @@ java_library(
java_library(
name = "prf_config-android",
srcs = ["PrfConfig.java"],
javacopts = JAVACOPTS_OSS,
deps = [
":hkdf_prf_key_manager-android",
":prf_set_wrapper-android",
Expand All @@ -126,7 +116,6 @@ java_library(
java_library(
name = "prf_set_wrapper-android",
srcs = ["PrfSetWrapper.java"],
javacopts = JAVACOPTS_OSS,
deps = [
":prf_set",
"//proto:tink_java_proto_lite",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("//tools/build_defs:javac.bzl", "JAVACOPTS_OSS")
load("@build_bazel_rules_android//android:rules.bzl", "android_library")

licenses(["notice"])
Expand Down Expand Up @@ -605,7 +604,6 @@ lite_protos = [
java_library(
name = "signature",
srcs = [":srcs"],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = full_protos + [
"//src/main/java/com/google/crypto/tink",
Expand All @@ -619,7 +617,6 @@ java_library(
java_library(
name = "android",
srcs = [":srcs"],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = lite_protos + [
"//src/main/java/com/google/crypto/tink:android",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("//tools/build_defs:javac.bzl", "JAVACOPTS_OSS")
load("@build_bazel_rules_android//android:rules.bzl", "android_library")

licenses(["notice"])
Expand Down Expand Up @@ -313,7 +312,6 @@ lite_protos = [
java_library(
name = "streamingaead",
srcs = [":srcs"],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = full_protos + [
"//src/main/java/com/google/crypto/tink",
Expand All @@ -327,7 +325,6 @@ java_library(
java_library(
name = "android",
srcs = [":srcs"],
javacopts = JAVACOPTS_OSS,
visibility = ["//visibility:public"],
deps = lite_protos + [
"//src/main/java/com/google/crypto/tink:android",
Expand Down
10 changes: 0 additions & 10 deletions java_src/src/main/java/com/google/crypto/tink/subtle/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
load("//tools/build_defs:javac.bzl", "JAVACOPTS_OSS")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])
Expand Down Expand Up @@ -524,7 +522,6 @@ java_library(
"SubtleUtil.java",
"Validators.java",
],
javacopts = JAVACOPTS_OSS,
)

# aead subtle
Expand All @@ -545,7 +542,6 @@ java_library(
"XChaCha20.java",
"XChaCha20Poly1305.java",
],
javacopts = JAVACOPTS_OSS,
deps = [
":mac",
":subtle",
Expand All @@ -560,7 +556,6 @@ java_library(
srcs = [
"AesSiv.java",
],
javacopts = JAVACOPTS_OSS,
deps = [
":mac",
":subtle",
Expand All @@ -578,7 +573,6 @@ java_library(
"PrfHmacJce.java",
"PrfMac.java",
],
javacopts = JAVACOPTS_OSS,
deps = [
":subtle",
"//src/main/java/com/google/crypto/tink:primitives",
Expand All @@ -604,7 +598,6 @@ java_library(
"RsaSsaPssSignJce.java",
"RsaSsaPssVerifyJce.java",
],
javacopts = JAVACOPTS_OSS,
deps = [
":curve25519",
":subtle",
Expand All @@ -625,7 +618,6 @@ java_library(
"EciesHkdfSenderKem.java",
"Hkdf.java",
],
javacopts = JAVACOPTS_OSS,
deps = [
":subtle",
"//src/main/java/com/google/crypto/tink:primitives",
Expand All @@ -650,7 +642,6 @@ java_library(
"StreamingAeadEncryptingStream.java",
"StreamingAeadSeekableDecryptingChannel.java",
],
javacopts = JAVACOPTS_OSS,
deps = [
":subtle",
"//src/main/java/com/google/crypto/tink:primitives",
Expand All @@ -664,7 +655,6 @@ java_library(
srcs = [
"Kwp.java",
],
javacopts = JAVACOPTS_OSS,
deps = [
":subtle",
"//src/main/java/com/google/crypto/tink:primitives",
Expand Down
Loading

0 comments on commit 34cc5a1

Please sign in to comment.