Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 41 lines (25 sloc) 1.029 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
#!perl

BEGIN {
  require "t/common.pl";
  start_server(version => 3, ssl => 1);
}

print "1..15\n";

$ldap = client();
ok($ldap, "client");

$mesg = $ldap->bind($MANAGERDN, password => $PASSWD, version => 3);

ok(!$mesg->code, "bind: " . $mesg->code . ": " . $mesg->error);

ok(ldif_populate($ldap, "data/50-in.ldif"), "data/50-in.ldif");

$mesg = $ldap->start_tls;
ok(!$mesg->code, "start_stl: " . $mesg->code . ": " . $mesg->error);

$mesg = $ldap->start_tls;
ok($mesg->code, "start_stl: " . $mesg->code . ": " . $mesg->error);

$mesg = $ldap->search(base => $BASEDN, filter => 'objectclass=*');
ok(!$mesg->code, "search: " . $mesg->code . ": " . $mesg->error);

compare_ldif("50",$mesg,$mesg->sorted);

$ldap = client(ssl => 1);
ok($ldap, "ssl client");

$mesg = $ldap->start_tls;
ok($mesg->code, "start_stl: " . $mesg->code . ": " . $mesg->error);

$mesg = $ldap->search(base => $BASEDN, filter => 'objectclass=*');
ok(!$mesg->code, "search: " . $mesg->code . ": " . $mesg->error);

compare_ldif("50",$mesg,$mesg->sorted);

Something went wrong with that request. Please try again.