-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add REST API endpoint for PKIX certificates (#119)
* Add REST API endpoint for PKIX certificates * Create venv for test execution * Fix linter groups test * Bump REST API version for new PKIX cert endpoint
- Loading branch information
Showing
6 changed files
with
93 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.12.0 | ||
0.12.1 |
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,35 @@ | ||
from pkilint.pkix import certificate, name, extension | ||
from pkilint.rest import model | ||
|
||
|
||
class PkixCertificateLinterGroup(model.LinterGroup): | ||
def __init__(self, linters): | ||
super().__init__(name='pkix', linters=linters) | ||
|
||
def determine_linter(self, doc): | ||
return self.linters[0] | ||
|
||
|
||
def create_linter_group_instance(): | ||
return PkixCertificateLinterGroup( | ||
[ | ||
model.Linter( | ||
validator=certificate.create_pkix_certificate_validator_container( | ||
certificate.create_decoding_validators(name.ATTRIBUTE_TYPE_MAPPINGS, extension.EXTENSION_MAPPINGS), | ||
[ | ||
certificate.create_issuer_validator_container( | ||
[] | ||
), | ||
certificate.create_validity_validator_container(), | ||
certificate.create_subject_validator_container( | ||
[] | ||
), | ||
certificate.create_extensions_validator_container( | ||
[] | ||
), | ||
] | ||
), | ||
name='certificate' | ||
) | ||
] | ||
) |
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