1# Copyright 2019 Google LLC. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15# Description: 16# Contains libraries for openssl big num operations. 17 18load("@pip_deps//:requirements.bzl", "requirement") 19load("@rules_python//python:defs.bzl", "py_library", "py_test") 20 21package(default_visibility = ["//visibility:public"]) 22 23py_library( 24 name = "converters", 25 srcs = [ 26 "converters.py", 27 ], 28 deps = [ 29 requirement("six"), 30 ], 31) 32 33py_test( 34 name = "converters_test", 35 size = "small", 36 srcs = ["converters_test.py"], 37 deps = [ 38 ":converters", 39 ], 40) 41 42py_library( 43 name = "ssl_util", 44 srcs = [ 45 "ssl_util.py", 46 ], 47 deps = [ 48 ":converters", 49 ":supported_hashes", 50 requirement("six"), 51 requirement("absl-py"), 52 ], 53) 54 55py_library( 56 name = "supported_curves", 57 srcs = [ 58 "supported_curves.py", 59 ], 60) 61 62py_library( 63 name = "supported_hashes", 64 srcs = [ 65 "supported_hashes.py", 66 ], 67) 68 69py_test( 70 name = "ssl_util_test", 71 size = "small", 72 srcs = ["ssl_util_test.py"], 73 deps = [ 74 ":ssl_util", 75 requirement("absl-py"), 76 ], 77) 78 79py_library( 80 name = "elliptic_curve", 81 srcs = [ 82 "elliptic_curve.py", 83 ], 84 deps = [ 85 ":converters", 86 ":ssl_util", 87 ":supported_curves", 88 ":supported_hashes", 89 requirement("six"), 90 ], 91) 92 93py_test( 94 name = "elliptic_curve_test", 95 size = "small", 96 srcs = ["elliptic_curve_test.py"], 97 deps = [ 98 ":converters", 99 ":elliptic_curve", 100 ":ssl_util", 101 ":supported_curves", 102 ":supported_hashes", 103 ], 104) 105