load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

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

licenses(["notice"])  # keep

go_library(
    name = "signature",
    srcs = [
        "ecdsa_signer_key_manager.go",
        "ecdsa_verifier_key_manager.go",
        "ed25519_signer_key_manager.go",
        "ed25519_verifier_key_manager.go",
        "proto.go",
        "rsa.go",
        "rsassapkcs1_signer_key_manager.go",
        "rsassapkcs1_verifier_key_manager.go",
        "signature.go",
        "signature_key_templates.go",
        "signer_factory.go",
        "verifier_factory.go",
    ],
    importpath = "github.com/google/tink/go/signature",
    visibility = ["//visibility:public"],
    deps = [
        "//core/cryptofmt",
        "//core/primitiveset",
        "//core/registry",
        "//keyset",
        "//proto/common_go_proto",
        "//proto/ecdsa_go_proto",
        "//proto/ed25519_go_proto",
        "//proto/rsa_ssa_pkcs1_go_proto",
        "//proto/tink_go_proto",
        "//signature/internal",
        "//signature/subtle",
        "//subtle",
        "//tink",
        "@org_golang_google_protobuf//proto",
        "@org_golang_x_crypto//ed25519",
    ],
)

go_test(
    name = "signature_test",
    srcs = [
        "ecdsa_signer_key_manager_test.go",
        "ecdsa_verifier_key_manager_test.go",
        "ed25519_signer_key_manager_test.go",
        "ed25519_verifier_key_manager_test.go",
        "rsassapkcs1_signer_key_manager_test.go",
        "rsassapkcs1_verifier_key_manager_test.go",
        "signature_factory_test.go",
        "signature_key_templates_test.go",
        "signature_test.go",
    ],
    deps = [
        ":signature",
        "//core/registry",
        "//keyset",
        "//mac",
        "//proto/common_go_proto",
        "//proto/ecdsa_go_proto",
        "//proto/ed25519_go_proto",
        "//proto/rsa_ssa_pkcs1_go_proto",
        "//proto/tink_go_proto",
        "//signature/internal",
        "//signature/subtle",
        "//subtle/random",
        "//testkeyset",
        "//testutil",
        "@com_github_google_go_cmp//cmp",
        "@org_golang_google_protobuf//proto",
        "@org_golang_google_protobuf//testing/protocmp",
    ],
)

alias(
    name = "go_default_library",
    actual = ":signature",
    visibility = ["//visibility:public"],
)
