| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# Copyright (c) 2002 Graham Barr . All rights reserved. |
|
2
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or |
|
3
|
|
|
|
|
|
|
# modify it under the same terms as Perl itself. |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Authen::SASL::Perl::CRAM_MD5; |
|
6
|
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
11
|
use strict; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
92
|
|
|
8
|
2
|
|
|
2
|
|
10
|
use vars qw($VERSION @ISA); |
|
|
2
|
|
|
|
|
6
|
|
|
|
2
|
|
|
|
|
130
|
|
|
9
|
2
|
|
|
2
|
|
12
|
use Digest::HMAC_MD5 qw(hmac_md5_hex); |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
1014
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
$VERSION = "2.14"; |
|
12
|
|
|
|
|
|
|
@ISA = qw(Authen::SASL::Perl); |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my %secflags = ( |
|
15
|
|
|
|
|
|
|
noplaintext => 1, |
|
16
|
|
|
|
|
|
|
noanonymous => 1, |
|
17
|
|
|
|
|
|
|
); |
|
18
|
|
|
|
|
|
|
|
|
19
|
35
|
|
|
35
|
|
169
|
sub _order { 2 } |
|
20
|
|
|
|
|
|
|
sub _secflags { |
|
21
|
12
|
|
|
12
|
|
26
|
shift; |
|
22
|
12
|
|
|
|
|
67
|
scalar grep { $secflags{$_} } @_; |
|
|
2
|
|
|
|
|
16
|
|
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
5
|
|
|
5
|
0
|
2490
|
sub mechanism { 'CRAM-MD5' } |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub client_start { |
|
28
|
1
|
|
|
1
|
0
|
4
|
''; |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub client_step { |
|
32
|
1
|
|
|
1
|
0
|
2
|
my ($self, $string) = @_; |
|
33
|
2
|
|
|
|
|
11
|
my ($user, $pass) = map { |
|
34
|
1
|
|
|
|
|
2
|
my $v = $self->_call($_); |
|
35
|
2
|
50
|
|
|
|
8
|
defined($v) ? $v : '' |
|
36
|
|
|
|
|
|
|
} qw(user pass); |
|
37
|
|
|
|
|
|
|
|
|
38
|
1
|
|
|
|
|
110
|
$user . " " . hmac_md5_hex($string,$pass); |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |