From 4ea385852a7416f70275b63a30d625c8fa73f957 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Fri, 10 Apr 2020 09:27:48 +0200 Subject: [PATCH] remove distribute_key completely (#197) Signed-off-by: Mikael Arguedas --- sros2/setup.py | 3 +-- sros2/sros2/api/__init__.py | 17 -------------- sros2/sros2/verb/distribute_key.py | 36 ------------------------------ 3 files changed, 1 insertion(+), 55 deletions(-) delete mode 100644 sros2/sros2/verb/distribute_key.py diff --git a/sros2/setup.py b/sros2/setup.py index a0ac928e..29f6f3b1 100644 --- a/sros2/setup.py +++ b/sros2/setup.py @@ -47,7 +47,7 @@ def package_files(directory): ], description='SROS2 provides tools to help manage security keys.', long_description="""\ -SROS2 provides command-line tools to help generate and distribute keys and \ +SROS2 provides command-line tools to help generate keys and \ certificates which are then used by supported middleware implementations to \ enhance the security of ROS 2 deployments.""", license='Apache License, Version 2.0', @@ -64,7 +64,6 @@ def package_files(directory): 'create_keystore = sros2.verb.create_keystore:CreateKeystoreVerb', 'create_permission = sros2.verb.create_permission' ':CreatePermissionVerb', - 'distribute_key = sros2.verb.distribute_key:DistributeKeyVerb', 'generate_artifacts = sros2.verb.generate_artifacts:GenerateArtifactsVerb', # TODO(ivanpauno): Reactivate this after having a way to introspect # security context names in rclpy. diff --git a/sros2/sros2/api/__init__.py b/sros2/sros2/api/__init__.py index 88c33479..e69de29b 100644 --- a/sros2/sros2/api/__init__.py +++ b/sros2/sros2/api/__init__.py @@ -1,17 +0,0 @@ -# Copyright 2016-2019 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -def distribute_key(source_keystore_path, taget_keystore_path): - raise NotImplementedError() diff --git a/sros2/sros2/verb/distribute_key.py b/sros2/sros2/verb/distribute_key.py deleted file mode 100644 index 48c38edf..00000000 --- a/sros2/sros2/verb/distribute_key.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2016-2017 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -try: - from argcomplete.completers import DirectoriesCompleter -except ImportError: - def DirectoriesCompleter(): - return None - -from sros2.api import distribute_key -from sros2.verb import VerbExtension - - -class DistributeKeyVerb(VerbExtension): - """Distribute key.""" - - def add_arguments(self, parser, cli_name): - arg = parser.add_argument('ROOT', help='root path of keystore') - arg.completer = DirectoriesCompleter() - parser.add_argument('TARGET', help='target keystore path') - arg.completer = DirectoriesCompleter() - - def main(self, *, args): - success = distribute_key(args.ROOT, args.TARGET) - return 0 if success else 1