X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=Util.pm;h=3a9841683dcd24cdb33446345f604698c776b373;hb=b0f8e57cce2bf0ab7a693ffac1ab1cc62f59b13c;hp=f6be1ed9ffdcc428fd363fddc1da06e1a63c1603;hpb=9b394648f35965c5b6e18a8ff12af25d73866f7a;p=mirror%2Fuserdir-ldap-cgi.git diff --git a/Util.pm b/Util.pm index f6be1ed..3a98416 100644 --- a/Util.pm +++ b/Util.pm @@ -33,37 +33,26 @@ sub CreateKey { } sub CreateCryptSalt { + # CreateCryptSalt(type = 0, skip_header = 0) # this can create either a DES type salt or a MD5 salt + # 0 for DES, 1 for MD5 salt + # if skip_header is 0, does not add $1$ for md5 salts. my $md5 = shift; # do we want a MD5 salt? + my $no_crypttype_header = shift; my $validstr = './0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; my @valid = split(//,$validstr); my ($in, $out); - + my $cryptsaltlen = ($md5 ? 8 : 2); - - open (F, "start_tls( verify => 'require', - cafile => '/etc/ssl/certs/spi-cacert-2008.pem' + # Cannot specify the server cert, must specify the CA cert + #cafile => '/etc/ssl/servicecerts/db.debian.org.crt' + #cafile => '/etc/ssl/certs/UTN_USERFirst_Hardware_Root_CA.pem' + cafile => '/usr/share/ca-certificates/mozilla/AddTrust_External_Root.crt' ); $mesg->sync; if ($mesg->code != LDAP_SUCCESS) {