mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
update to p5-Authen-SASL-2.1800, adding Authen::SASL::Perl::OAUTHBEARER
and Authen::SASL::Perl::XOAUTH2 - add patch to use 16 bytes of arc4random_buf via Crypt::URandom rather than md5(pid:time:rand)
This commit is contained in:
@@ -2,14 +2,14 @@ COMMENT= perl interface to the SASL auth framework
|
||||
|
||||
MODULES= cpan
|
||||
PKG_ARCH= *
|
||||
DISTNAME= Authen-SASL-2.16
|
||||
DISTNAME= Authen-SASL-2.1800
|
||||
CATEGORIES= security
|
||||
REVISION= 0
|
||||
|
||||
# Perl
|
||||
PERMIT_PACKAGE= Yes
|
||||
|
||||
BUILD_DEPENDS= ${RUN_DEPENDS}
|
||||
RUN_DEPENDS= security/p5-Digest-HMAC
|
||||
RUN_DEPENDS= security/p5-Digest-HMAC \
|
||||
security/p5-Crypt-URandom
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
SHA256 (Authen-SASL-2.16.tar.gz) = ZhT6dRjwlPhTdBtjxz82JxaMXTrKibHQKxAW3DKFTgk=
|
||||
SIZE (Authen-SASL-2.16.tar.gz) = 45129
|
||||
SHA256 (Authen-SASL-2.1800.tar.gz) = CwNoa92799XGVI5GjQeaQFHJtzhR33QK4oz9LbI06SI=
|
||||
SIZE (Authen-SASL-2.1800.tar.gz) = 39499
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
Index: Makefile.PL
|
||||
--- Makefile.PL.orig
|
||||
+++ Makefile.PL
|
||||
@@ -3,6 +3,7 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use 5.005;
|
||||
+BEGIN { push @INC, '.'; }
|
||||
use inc::Module::Install;
|
||||
|
||||
name 'Authen-SASL';
|
||||
@@ -0,0 +1,36 @@
|
||||
From 82e12b25963bd9d156a9006c9a0929f459b8536a Mon Sep 17 00:00:00 2001
|
||||
From: Robert Rothenberg <rrwo@cpan.org>
|
||||
Date: Thu, 10 Jul 2025 21:05:29 +0100
|
||||
Subject: [PATCH] Generate cnonce and nonce from system randomness
|
||||
|
||||
https://github.com/gbarr/perl-authen-sasl/pull/22
|
||||
|
||||
Index: lib/Authen/SASL/Perl/DIGEST_MD5.pm
|
||||
--- lib/Authen/SASL/Perl/DIGEST_MD5.pm.orig
|
||||
+++ lib/Authen/SASL/Perl/DIGEST_MD5.pm
|
||||
@@ -10,6 +10,7 @@ $Authen::SASL::Perl::DIGEST_MD5::VERSION = '2.1800';
|
||||
use strict;
|
||||
use warnings;
|
||||
use vars qw(@ISA $CNONCE $NONCE);
|
||||
+use Crypt::URandom qw(urandom);
|
||||
use Digest::MD5 qw(md5_hex md5);
|
||||
use Digest::HMAC_MD5 qw(hmac_md5);
|
||||
|
||||
@@ -201,7 +202,7 @@ sub server_start {
|
||||
|
||||
$self->{need_step} = 1;
|
||||
$self->{error} = undef;
|
||||
- $self->{nonce} = md5_hex($NONCE || join (":", $$, time, rand));
|
||||
+ $self->{nonce} = $NONCE? md5_hex($NONCE) : unpack('H32',urandom(16));
|
||||
|
||||
$self->init_sec_layer;
|
||||
|
||||
@@ -260,7 +261,7 @@ sub client_step { # $self, $server_sasl_credentials
|
||||
|
||||
my %response = (
|
||||
nonce => $sparams{'nonce'},
|
||||
- cnonce => md5_hex($CNONCE || join (":", $$, time, rand)),
|
||||
+ cnonce => $CNONCE? md5_hex($CNONCE) : unpack('H32',urandom(16)),
|
||||
'digest-uri' => $self->service . '/' . $self->host,
|
||||
# calc how often the server nonce has been seen; server expects "00000001"
|
||||
nc => sprintf("%08d", ++$self->{nonce_counts}{$sparams{'nonce'}}),
|
||||
@@ -13,7 +13,9 @@ ${P5SITE}/Authen/SASL/Perl/DIGEST_MD5.pm
|
||||
${P5SITE}/Authen/SASL/Perl/EXTERNAL.pm
|
||||
${P5SITE}/Authen/SASL/Perl/GSSAPI.pm
|
||||
${P5SITE}/Authen/SASL/Perl/LOGIN.pm
|
||||
${P5SITE}/Authen/SASL/Perl/OAUTHBEARER.pm
|
||||
${P5SITE}/Authen/SASL/Perl/PLAIN.pm
|
||||
${P5SITE}/Authen/SASL/Perl/XOAUTH2.pm
|
||||
@man man/man3p/Authen::SASL.3p
|
||||
@man man/man3p/Authen::SASL::Perl.3p
|
||||
@man man/man3p/Authen::SASL::Perl::ANONYMOUS.3p
|
||||
@@ -22,4 +24,6 @@ ${P5SITE}/Authen/SASL/Perl/PLAIN.pm
|
||||
@man man/man3p/Authen::SASL::Perl::EXTERNAL.3p
|
||||
@man man/man3p/Authen::SASL::Perl::GSSAPI.3p
|
||||
@man man/man3p/Authen::SASL::Perl::LOGIN.3p
|
||||
@man man/man3p/Authen::SASL::Perl::OAUTHBEARER.3p
|
||||
@man man/man3p/Authen::SASL::Perl::PLAIN.3p
|
||||
@man man/man3p/Authen::SASL::Perl::XOAUTH2.3p
|
||||
|
||||
Reference in New Issue
Block a user