-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from cisco-open/add-sign-task
Add sign task
- Loading branch information
Showing
6 changed files
with
69 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright (c) 2024 Cisco Systems, Inc. and its affiliates. | ||
# Use of this source code is governed by a BSD-style | ||
# license that can be found in the LICENSE file. | ||
# | ||
# SPDX-License-Identifier: bsd | ||
from typing import Union | ||
|
||
from .utils import create_cert, load_certificate_details, setup_logging, track_progress | ||
|
||
|
||
def main(csr_file_path: str, loglevel: Union[int, str]) -> None: | ||
|
||
# Setup logging | ||
log = setup_logging(loglevel) | ||
|
||
# Prepare the CA for controllers certificate signing | ||
track_progress(log, "Loading root CA details...") | ||
ca_cert, ca_key, ca_chain = load_certificate_details() | ||
|
||
track_progress(log, "Loading csr from file...") | ||
with open(csr_file_path, "r") as file: | ||
csr = file.read() | ||
|
||
track_progress(log, "Signing CSR...") | ||
cert = create_cert(ca_cert.encode(), ca_key.encode(), csr.encode()) | ||
|
||
track_progress(log, "Certificate signed: \n") | ||
print(cert.decode()) | ||
|
||
return |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "catalyst-sdwan-lab" | ||
version = "2.0.10" | ||
version = "2.0.11" | ||
description = "Catalyst SD-WAN Lab Deployment Tool - Automation Tool for managing Cisco Catalyst SD-WAN labs inside Cisco Modeling Labs" | ||
license = "BSD-3-Clause" | ||
authors = ["Tomasz Zarski <[email protected]>"] | ||
|
@@ -19,7 +19,7 @@ requests = "^2.28.1" | |
pyopenssl = "^24.0.0" | ||
pyats = ">=23.1,<=24.2" | ||
passlib = "^1.7.4" | ||
jinja2 = "^3.1.3" | ||
jinja2 = "3.1.4" | ||
cisco-sdwan = "^1.23" | ||
ruamel-yaml = "^0.17.21" | ||
urllib3 = "^1.26.18" | ||
|