Permalink
Browse files

removed the SQOP global variable hack that I used in tests

to change qop for the server
  • Loading branch information...
1 parent 56442c4 commit 163888c0bb4a1d404ffb264dff7972607e9f68b7 @yannk yannk committed with gbarr Jan 24, 2009
Showing with 3 additions and 9 deletions.
  1. +2 −3 lib/Authen/SASL/Perl/DIGEST_MD5.pm
  2. +1 −6 t/server/digest_md5.t
@@ -8,7 +8,7 @@
package Authen::SASL::Perl::DIGEST_MD5;
use strict;
-use vars qw($VERSION @ISA $CNONCE $NONCE $SQOP);
+use vars qw($VERSION @ISA $CNONCE $NONCE);
use Digest::MD5 qw(md5_hex md5);
use Digest::HMAC_MD5 qw(hmac_md5);
@@ -167,8 +167,7 @@ sub _init_server {
or $options->{no_confidentiality}
or $NO_CRYPT_AVAILABLE;
- my $qop = $SQOP || \@qop;
- $server->{supported_qop} = { map { $_ => 1 } @$qop };
+ $server->{supported_qop} = { map { $_ => 1 } @qop };
}
sub init_sec_layer {
View
@@ -26,10 +26,9 @@ ok($sasl,'new');
no warnings 'once';
# override for testing as by default it uses $$, time and rand
$Authen::SASL::Perl::DIGEST_MD5::NONCE = "foobaz";
-$Authen::SASL::Perl::DIGEST_MD5::SQOP = [ "auth" ];
is($sasl->mechanism, 'DIGEST-MD5', 'sasl mechanism');
-my $server = $sasl->server_new("ldap","elwood.innosoft.com");
+my $server = $sasl->server_new("ldap","elwood.innosoft.com", { no_integrity => 1 });
is($server->mechanism, 'DIGEST-MD5', 'conn mechanism');
## simple success without authzid
@@ -107,7 +106,6 @@ is($server->mechanism, 'DIGEST-MD5', 'conn mechanism');
## using auth-conf
{
- $Authen::SASL::Perl::DIGEST_MD5::SQOP = [ "auth", "auth-int", "auth-conf" ];
$server = $sasl->server_new("ldap","elwood.innosoft.com");
my $expected_ss = join ",",
'algorithm=md5-sess',
@@ -143,7 +141,6 @@ is($server->mechanism, 'DIGEST-MD5', 'conn mechanism');
}
## wrong challenge response
{
- $Authen::SASL::Perl::DIGEST_MD5::SQOP = [ "auth", "auth-int", "auth-conf" ];
$server = $sasl->server_new("ldap","elwood.innosoft.com");
$server->server_start('');
@@ -166,7 +163,6 @@ is($server->mechanism, 'DIGEST-MD5', 'conn mechanism');
## multiple digest-uri;
{
- $Authen::SASL::Perl::DIGEST_MD5::SQOP = [ "auth", "auth-int", "auth-conf" ];
$server = $sasl->server_new("ldap","elwood.innosoft.com");
$server->server_start('');
@@ -190,7 +186,6 @@ is($server->mechanism, 'DIGEST-MD5', 'conn mechanism');
## nonce-count;
{
- $Authen::SASL::Perl::DIGEST_MD5::SQOP = [ "auth", "auth-int", "auth-conf" ];
$server = $sasl->server_new("ldap","elwood.innosoft.com");
$server->server_start('');

0 comments on commit 163888c

Please sign in to comment.