Fix for Issue #352.

This commit is contained in:
Mike Grima 2016-06-08 16:41:31 -07:00
parent 77f13c9edb
commit 9a653403ae
2 changed files with 5 additions and 5 deletions

View File

@ -52,15 +52,15 @@ def sensitive_domain(domain):
to issue the certificate.'.format(domain)) to issue the certificate.'.format(domain))
def oid_type(oid_type): def encoding(oid_encoding):
""" """
Determines if the specified oid type is valid. Determines if the specified oid type is valid.
:param oid_type: :param oid_encoding:
:return: :return:
""" """
valid_types = ['b64asn1', 'string', 'ia5string'] valid_types = ['b64asn1', 'string', 'ia5string']
if oid_type.lower() not in [o_type.lower() for o_type in valid_types]: if oid_encoding.lower() not in [o_type.lower() for o_type in valid_types]:
raise ValidationError('Invalid Oid Type: {0} choose from {1}'.format(oid_type, ",".join(valid_types))) raise ValidationError('Invalid Oid Encoding: {0} choose from {1}'.format(oid_encoding, ",".join(valid_types)))
def sub_alt_type(alt_type): def sub_alt_type(alt_type):

View File

@ -196,7 +196,7 @@ class SubAltNamesSchema(BaseExtensionSchema):
class CustomOIDSchema(BaseExtensionSchema): class CustomOIDSchema(BaseExtensionSchema):
oid = fields.String() oid = fields.String()
oid_type = fields.String(validate=validators.oid_type) encoding = fields.String(validate=validators.encoding)
value = fields.String() value = fields.String()