Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 47 lines (29 sloc) 1.136 kb
5a237be @gbarr Remove croaks from SSL/TLS methods
gbarr authored
1 #!perl
2
3 BEGIN {
4 require "t/common.pl";
5 }
6
86c99b5 @gbarr Fix test to work with slapd 2.2.29
gbarr authored
7 unless (eval { require IO::Socket::SSL; 1} ) {
8 print "1..0 # IO::Socket::SSL not installed\n";
9 exit;
10 }
11
12 start_server(version => 3, ssl => 1);
13
d63e222 @gbarr Fix test count
gbarr authored
14 print "1..15\n";
5a237be @gbarr Remove croaks from SSL/TLS methods
gbarr authored
15
16 $ldap = client();
ccae27f @gbarr Some testcase tweaks
gbarr authored
17 ok($ldap, "client");
5a237be @gbarr Remove croaks from SSL/TLS methods
gbarr authored
18
19 $mesg = $ldap->bind($MANAGERDN, password => $PASSWD, version => 3);
20
ccae27f @gbarr Some testcase tweaks
gbarr authored
21 ok(!$mesg->code, "bind: " . $mesg->code . ": " . $mesg->error);
5a237be @gbarr Remove croaks from SSL/TLS methods
gbarr authored
22
ccae27f @gbarr Some testcase tweaks
gbarr authored
23 ok(ldif_populate($ldap, "data/50-in.ldif"), "data/50-in.ldif");
5a237be @gbarr Remove croaks from SSL/TLS methods
gbarr authored
24
25 $mesg = $ldap->start_tls;
d76c747 @marschap t/55ssl.t: fix typos in output text
marschap authored
26 ok(!$mesg->code, "start_tls: " . $mesg->code . ": " . $mesg->error);
5a237be @gbarr Remove croaks from SSL/TLS methods
gbarr authored
27
28 $mesg = $ldap->start_tls;
d76c747 @marschap t/55ssl.t: fix typos in output text
marschap authored
29 ok($mesg->code, "start_tls: " . $mesg->code . ": " . $mesg->error);
5a237be @gbarr Remove croaks from SSL/TLS methods
gbarr authored
30
31 $mesg = $ldap->search(base => $BASEDN, filter => 'objectclass=*');
ccae27f @gbarr Some testcase tweaks
gbarr authored
32 ok(!$mesg->code, "search: " . $mesg->code . ": " . $mesg->error);
5a237be @gbarr Remove croaks from SSL/TLS methods
gbarr authored
33
ccae27f @gbarr Some testcase tweaks
gbarr authored
34 compare_ldif("50",$mesg,$mesg->sorted);
5a237be @gbarr Remove croaks from SSL/TLS methods
gbarr authored
35
ccae27f @gbarr Some testcase tweaks
gbarr authored
36 $ldap = client(ssl => 1);
37 ok($ldap, "ssl client");
5a237be @gbarr Remove croaks from SSL/TLS methods
gbarr authored
38
39 $mesg = $ldap->start_tls;
d76c747 @marschap t/55ssl.t: fix typos in output text
marschap authored
40 ok($mesg->code, "start_tls: " . $mesg->code . ": " . $mesg->error);
5a237be @gbarr Remove croaks from SSL/TLS methods
gbarr authored
41
42 $mesg = $ldap->search(base => $BASEDN, filter => 'objectclass=*');
ccae27f @gbarr Some testcase tweaks
gbarr authored
43 ok(!$mesg->code, "search: " . $mesg->code . ": " . $mesg->error);
5a237be @gbarr Remove croaks from SSL/TLS methods
gbarr authored
44
ccae27f @gbarr Some testcase tweaks
gbarr authored
45 compare_ldif("50",$mesg,$mesg->sorted);
5a237be @gbarr Remove croaks from SSL/TLS methods
gbarr authored
46
Something went wrong with that request. Please try again.