Skip to content

Commit

Permalink
Accept CNs containing upper-case characters. Convert CNs and DNS subj…
Browse files Browse the repository at this point in the history
…ectAltNames to lower case so that comparison will be case-insensitive. This reflects the way that the Shibboleth trust engine works.
  • Loading branch information
iay committed May 12, 2010
1 parent a47bd05 commit f76fc34
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build/check_embedded.pl
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ sub comment {
next;
}

if (/^\s*Subject:\s*.*?CN=([a-z0-9\-\.]+).*$/) {
if (/^\s*Subject:\s*.*?CN=([a-zA-Z0-9\-\.]+).*$/) {
$subjectCN = $1;
$names{$subjectCN}++;
$names{lc $subjectCN}++;
# print "subjectCN = $subjectCN\n";
next;
}
Expand Down Expand Up @@ -248,7 +248,7 @@ sub comment {
#
while (@altNames) {
my ($type, $altName) = split(":", pop @altNames);
$names{$altName}++ if $type eq 'DNS';
$names{lc $altName}++ if $type eq 'DNS';
}
next;
}
Expand All @@ -260,7 +260,7 @@ sub comment {
#
# Check KeyName if one has been supplied.
#
if ($hasKeyName && !defined($names{$keyname})) {
if ($hasKeyName && !defined($names{lc $keyname})) {
my $nameList = join ", ", sort keys %names;
error("KeyName mismatch: $keyname not in {$nameList}");
}
Expand Down

0 comments on commit f76fc34

Please sign in to comment.