From 9a653403ae6427a1d4f5127aca9eaa8cc5853643 Mon Sep 17 00:00:00 2001 From: Mike Grima Date: Wed, 8 Jun 2016 16:41:31 -0700 Subject: [PATCH] Fix for Issue #352. --- lemur/common/validators.py | 8 ++++---- lemur/schemas.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lemur/common/validators.py b/lemur/common/validators.py index fc037ba0..60cc91ed 100644 --- a/lemur/common/validators.py +++ b/lemur/common/validators.py @@ -52,15 +52,15 @@ def sensitive_domain(domain): to issue the certificate.'.format(domain)) -def oid_type(oid_type): +def encoding(oid_encoding): """ Determines if the specified oid type is valid. - :param oid_type: + :param oid_encoding: :return: """ valid_types = ['b64asn1', 'string', 'ia5string'] - if oid_type.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))) + if oid_encoding.lower() not in [o_type.lower() for o_type in valid_types]: + raise ValidationError('Invalid Oid Encoding: {0} choose from {1}'.format(oid_encoding, ",".join(valid_types))) def sub_alt_type(alt_type): diff --git a/lemur/schemas.py b/lemur/schemas.py index 24848d42..bd4a674a 100644 --- a/lemur/schemas.py +++ b/lemur/schemas.py @@ -196,7 +196,7 @@ class SubAltNamesSchema(BaseExtensionSchema): class CustomOIDSchema(BaseExtensionSchema): oid = fields.String() - oid_type = fields.String(validate=validators.oid_type) + encoding = fields.String(validate=validators.encoding) value = fields.String()