| 1 | # Copyright (c) 2002 Graham Barr <gbarr@pobox.com>. 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 2.2100; | ||||||||||
| 6 | |||||||||||
| 7 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 3 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 3 | ▶ | use vars qw(@ISA); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 3 | ▶ | use Digest::HMAC_MD5 qw(hmac_md5_hex); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 3 | warnings::warnif( | |||||||||
| 13 | 'deprecated', | ||||||||||
| 14 | 'The CRAM-MD5 SASL mechanism is effectively deprecated by RFC8314 and should no longer be used' | ||||||||||
| 15 | ); | ||||||||||
| 16 | |||||||||||
| 17 | 3 | @ISA = qw(Authen::SASL::Perl); | |||||||||
| 18 | |||||||||||
| 19 | 3 | my %secflags = ( | |||||||||
| 20 | noplaintext => 1, | ||||||||||
| 21 | noanonymous => 1, | ||||||||||
| 22 | ); | ||||||||||
| 23 | |||||||||||
| 24 | 37 | ▶ | sub _order { 2 } | ||||||||
|
Subroutine
_order: called CC=1 SCAR=0.0
| |||||||||||
| 25 | 14 | ▶ | sub _secflags { | ||||||||
|
Subroutine
_secflags: called CC=1 SCAR=0.0
| |||||||||||
| 26 | 14 | shift; | |||||||||
| 27 | 14 | scalar grep { $secflags{$_} } @_; | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 6 | ▶ | sub mechanism { 'CRAM-MD5' } | ||||||||
|
Subroutine
mechanism: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 31 | |||||||||||
| 32 | 2 | ▶ | sub client_start { | ||||||||
|
Subroutine
client_start: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 33 | 2 | ''; | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 3 | ▶ | sub client_step { | ||||||||
|
Subroutine
client_step: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 37 | 3 | my ($self, $string) = @_; | |||||||||
| 38 | my ($user, $pass) = map { | ||||||||||
| 39 | 3 | my $v = $self->_call($_); | |||||||||
| 40 | 6 | ▶ | defined($v) ? $v : '' | ||||||||
|
Branch: 1 branch
| |||||||||||
| 41 | } qw(user pass); | ||||||||||
| 42 | |||||||||||
| 43 | 3 | $user . " " . hmac_md5_hex($string,$pass); | |||||||||
| 44 | } | ||||||||||
| 45 | |||||||||||
| 46 | 3 | 1; | |||||||||
| 47 | |||||||||||
| 48 | __END__ | ||||||||||