Skip to content

Commit

Permalink
Add option to set string_mask via profile for non-utf8 DNs, closes #796
Browse files Browse the repository at this point in the history
  • Loading branch information
oliwel committed Jan 12, 2021
1 parent ea36571 commit acfcde8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/server/OpenXPKI/Crypto/Backend/OpenSSL/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ sub __get_ca
"policy = dn_policy\n".
"name_opt = RFC2253,-esc_msb\n".
"utf8 = yes\n".
"string_mask = utf8only\n".
"string_mask = ".$self->{PROFILE}->get_string_mask()."\n".
"\n";

# add the copy_extensions only if set, this prevents adding it to the CRL config
Expand Down
7 changes: 7 additions & 0 deletions core/server/OpenXPKI/Crypto/Profile/Certificate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ sub __load_profile
DIGEST => 'sha256',
INCREASING_SERIALS => 1,
RANDOMIZED_SERIAL_BYTES => 8,
STRING_MASK => 'utf8only',
};

## check if those are overriden in config
Expand Down Expand Up @@ -262,6 +263,12 @@ sub get_digest
return $self->{PROFILE}->{DIGEST};
}

sub get_string_mask
{
my $self = shift;
return $self->{PROFILE}->{STRING_MASK};
}

sub set_subject
{
my $self = shift;
Expand Down

0 comments on commit acfcde8

Please sign in to comment.