Skip to content

Commit

Permalink
crypt.t also punts on OpenBSD now.
Browse files Browse the repository at this point in the history
OpenBSD claims to have crypt(), but it does something other than DES.  Eg:

    my $x = '$2b$12$FPWWO2RJ3CK4FINTw0Hi8OiPKJcX653gzSS.jqltHFMxyDmmQ0Hqq';
    print crypt('', $x);

The OpenBSD crypt man page implies that it is backward compat unless
it sees this "$2" or other number in the salt field, but on my
OpenBSD provided 5.20.2, this outputs nothing:

    print crypt("hi there", "aa");

So it seems like there's a ports problem or a Perl-on-OpenBSD bug.
At any rate, I don't want this to keep people from installing the
module, so I'm skipping the test on OpenBSD.
  • Loading branch information
scottwalters committed Jan 1, 2016
1 parent fd2565d commit ae6aa29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion t/crypt.t
Expand Up @@ -6,5 +6,6 @@ use autobox::Core;
use Config;
SKIP: {
skip("crypt not defined on this system", 1) unless $Config{d_crypt};
skip("crypt redefined to use a different algorithm", 1) if $Config{osname} eq 'openbsd';
is 'PLAINTEXT'->crypt('SALT'), 'SAPH9ylAEPe62';
}
}

0 comments on commit ae6aa29

Please sign in to comment.