-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert PKCS#12 loading to Rust (#10434)
- Loading branch information
Showing
11 changed files
with
222 additions
and
153 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This file is dual licensed under the terms of the Apache License, Version | ||
# 2.0, and the BSD License. See the LICENSE file in the root of this repository | ||
# for complete details. | ||
|
||
import typing | ||
|
||
from cryptography import x509 | ||
from cryptography.hazmat.primitives.asymmetric.types import PrivateKeyTypes | ||
from cryptography.hazmat.primitives.serialization.pkcs12 import ( | ||
PKCS12KeyAndCertificates, | ||
) | ||
|
||
def load_key_and_certificates( | ||
data: bytes, | ||
password: bytes | None, | ||
backend: typing.Any = None, | ||
) -> tuple[ | ||
PrivateKeyTypes | None, | ||
x509.Certificate | None, | ||
list[x509.Certificate], | ||
]: ... | ||
def load_pkcs12( | ||
data: bytes, | ||
password: bytes | None, | ||
backend: typing.Any = None, | ||
) -> PKCS12KeyAndCertificates: ... |
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
Oops, something went wrong.