X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-fingerserv;fp=ud-fingerserv;h=687a62cd470d51e03f3cb661bf6a881b649aa358;hb=80146a86375f4c509537667a3c7a13c1d020d251;hp=6356d2367b328fb46cd0de689f41f92f4b7d89dc;hpb=7dfa05f74d2cae112117a729ba2c61c3f94bc793;p=mirror%2Fuserdir-ldap.git diff --git a/ud-fingerserv b/ud-fingerserv index 6356d23..687a62c 100755 --- a/ud-fingerserv +++ b/ud-fingerserv @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: ud-fingerserv,v 1.15 2004/10/24 18:28:50 joey Exp $ +# $Id: ud-fingerserv,v 1.16 2004/10/24 18:34:12 joey Exp $ # (c) 1999 Randolph Chung. Licensed under the GPL. @@ -25,13 +25,14 @@ my %attrs = ( 'mn' => 'Middle name', 'sn' => 'Last name', 'email' => 'Email', - 'keyFingerPrint' => 'Fingerprint', + 'keyfingerprint' => 'Fingerprint', 'key' => 'Key block', 'ircnick' => 'IRC nickname', + 'icquin' => 'ICQ UIN', 'labeleduri' => 'URL' ); -my @summarykeys = ('cn', 'mn', 'sn', 'email', 'labeleduri', 'ircnick', 'keyFingerPrint', 'key'); +my @summarykeys = ('cn', 'mn', 'sn', 'email', 'labeleduri', 'ircnick', 'icquin', 'keyfingerprint', 'key'); $SIG{__DIE__} = \&DieHandler; $SIG{INT} = \&DieHandler; @@ -123,7 +124,7 @@ sub ProcessQuery { $data = $entries->{$dn}; $data->{key} = []; - foreach (@{$data->{keyFingerPrint}}) { + foreach (@{$data->{keyfingerprint}}) { push (@{$data->{key}}, "\n".&Util::FetchKey($_)); } @@ -133,6 +134,10 @@ sub ProcessQuery { $data->{email}->[0] =~ s/\s+/ /g; + for (my $i=0; $i <= $#{$data->{'keyfingerprint'}}; $i++) { + $data->{keyfingerprint}->[$i] = &Util::FormatFingerPrint($data->{keyfingerprint}->[$i]); + $data->{keyfingerprint}->[$i] =~ s, , ,; + } print $client "$dn\n"; if (!$fields) { foreach $key (@summarykeys) {