Skip to content

Commit c6e2604

Browse files
Validation cleanup, remove CN limit
1 parent ec596b6 commit c6e2604

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/Certify.Models/Shared/Validation/CertificateEditorService.cs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -310,18 +310,6 @@ public static ValidationResult Validate(ManagedCertificate item, SiteInfo? selec
310310
ValidationErrorCodes.PRIMARY_IDENTIFIER_REQUIRED.ToString()
311311
);
312312
}
313-
else
314-
{
315-
// CN/Primary Subject has a limit of 64 characters
316-
if (GetPrimarySubjectDomain(item)?.Domain?.Length > 64 == true)
317-
{
318-
return new ValidationResult(
319-
false,
320-
$"Certificate CN (primary subject/domain) cannot exceed 64 characters.",
321-
ValidationErrorCodes.CN_LIMIT.ToString()
322-
);
323-
}
324-
}
325313

326314
if (!(preferredCA != null && preferredCA.AllowInternalHostnames))
327315
{
@@ -435,7 +423,7 @@ public static ValidationResult Validate(ManagedCertificate item, SiteInfo? selec
435423
{
436424
return new ValidationResult(
437425
false,
438-
$"One or more challenge configurations required",
426+
$"One or more authorization challenge response configurations are required, see Certificate > Authorization",
439427
ValidationErrorCodes.REQUIRED_CHALLENGE_CONFIG_PARAM.ToString()
440428
);
441429
}
@@ -451,7 +439,7 @@ public static ValidationResult Validate(ManagedCertificate item, SiteInfo? selec
451439
{
452440
return new ValidationResult(
453441
false,
454-
$"Challenge configuration parameter required: {p.Name}",
442+
$"Authorization challenge response configuration parameter required: {p.Name}",
455443
ValidationErrorCodes.REQUIRED_CHALLENGE_CONFIG_PARAM.ToString()
456444
);
457445
}

0 commit comments

Comments
 (0)