Merge branch 'master' into doppins/pytest-equals-3.5.0

This commit is contained in:
Curtis 2018-03-26 08:07:15 -07:00 committed by GitHub
commit 98d303c6c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 7 deletions

View File

@ -332,9 +332,8 @@ class Certificate(db.Model):
return_extensions['authority_key_identifier'] = aki return_extensions['authority_key_identifier'] = aki
# TODO: Don't support CRLDistributionPoints yet https://github.com/Netflix/lemur/issues/662
elif isinstance(value, x509.CRLDistributionPoints): elif isinstance(value, x509.CRLDistributionPoints):
current_app.logger.warning('CRLDistributionPoints not yet supported for clone operation.') return_extensions['crl_distribution_points'] = {'include_crl_dp': value}
# TODO: Not supporting custom OIDs yet. https://github.com/Netflix/lemur/issues/665 # TODO: Not supporting custom OIDs yet. https://github.com/Netflix/lemur/issues/665
else: else:

View File

@ -220,6 +220,14 @@ class CertificateInfoAccessSchema(BaseExtensionSchema):
return {'includeAIA': data['include_aia']} return {'includeAIA': data['include_aia']}
class CRLDistributionPointsSchema(BaseExtensionSchema):
include_crl_dp = fields.String()
@post_dump
def handle_keys(self, data):
return {'includeCRLDP': data['include_crl_dp']}
class SubjectKeyIdentifierSchema(BaseExtensionSchema): class SubjectKeyIdentifierSchema(BaseExtensionSchema):
include_ski = fields.Boolean() include_ski = fields.Boolean()
@ -240,13 +248,14 @@ class NamesSchema(BaseExtensionSchema):
class ExtensionSchema(BaseExtensionSchema): class ExtensionSchema(BaseExtensionSchema):
basic_constraints = BasicConstraintsExtension(missing={'ca': False}) basic_constraints = BasicConstraintsExtension() # some devices balk on default basic constraints
key_usage = KeyUsageExtension() key_usage = KeyUsageExtension()
extended_key_usage = ExtendedKeyUsageExtension() extended_key_usage = ExtendedKeyUsageExtension()
subject_key_identifier = fields.Nested(SubjectKeyIdentifierSchema) subject_key_identifier = fields.Nested(SubjectKeyIdentifierSchema)
sub_alt_names = fields.Nested(NamesSchema) sub_alt_names = fields.Nested(NamesSchema)
authority_key_identifier = fields.Nested(AuthorityKeyIdentifierSchema) authority_key_identifier = fields.Nested(AuthorityKeyIdentifierSchema)
certificate_info_access = fields.Nested(CertificateInfoAccessSchema) certificate_info_access = fields.Nested(CertificateInfoAccessSchema)
crl_distribution_points = fields.Nested(CRLDistributionPointsSchema, dump_to='cRL_distribution_points')
# FIXME: Convert custom OIDs to a custom field in fields.py like other Extensions # FIXME: Convert custom OIDs to a custom field in fields.py like other Extensions
# FIXME: Remove support in UI for Critical custom extensions https://github.com/Netflix/lemur/issues/665 # FIXME: Remove support in UI for Critical custom extensions https://github.com/Netflix/lemur/issues/665
custom = fields.List(fields.Nested(CustomOIDSchema)) custom = fields.List(fields.Nested(CustomOIDSchema))

View File

@ -182,7 +182,7 @@
cRL Distribution Points cRL Distribution Points
</label> </label>
<div class="col-sm-8"> <div class="col-sm-8">
<select class="form-control" ng-model="authority.extensions.cRLDistributionPoints.includeCRLDP" ng-options="item for item in ['yes', 'no', 'default']"></select> <select class="form-control" ng-model="authority.extensions.crlDistributionPoints.includeCrlDp" ng-options="item for item in ['yes', 'no', 'default']"></select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

View File

@ -196,7 +196,7 @@
cRL Distribution Points cRL Distribution Points
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<select class="form-control" ng-model="certificate.extensions.cRLDistributionPoints.includeCRLDP" <select class="form-control" ng-model="certificate.extensions.crlDistributionPoints.includeCrlDp"
ng-options="item for item in ['yes', 'no', 'default']"></select> ng-options="item for item in ['yes', 'no', 'default']"></select>
</div> </div>
</div> </div>

View File

@ -43,7 +43,7 @@ pyflakes==1.6.0
pytest-flask==0.10.0 pytest-flask==0.10.0
pytest-mock==1.7.1 pytest-mock==1.7.1
pytest==3.5.0 pytest==3.5.0
python-dateutil==2.6.1 # via botocore, faker, freezegun, moto python-dateutil==2.7.1 # via botocore, faker, freezegun, moto
pytz==2018.3 # via moto pytz==2018.3 # via moto
pyyaml==3.12 # via pyaml pyyaml==3.12 # via pyaml
requests-mock==1.4.0 requests-mock==1.4.0