Commit c1cf8640 authored by Tom Mitchell's avatar Tom Mitchell

Improve email extraction from certs.

Add a more general email regular expression for extracting the email
address from the Subject DN in a certificate.
parent cc7e1656
......@@ -150,7 +150,8 @@ sub email($)
{
my ($self) = @_;
if ($self->DN() =~ /\/emailAddress=(.*)/ ||
if ($self->DN() =~ /emailAddress=([A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4})/i ||
$self->DN() =~ /\/emailAddress=(.*)/ ||
$self->DN() =~ /^emailAddress=(.*),/) {
return $1
if ($1 ne "");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment