File: bind-sasl.rb

package info (click to toggle)
ruby-ldap 0.9.20-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 452 kB
  • sloc: ansic: 4,097; ruby: 1,525; makefile: 5
file content (17 lines) | stat: -rw-r--r-- 366 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- ruby -*-
# This file is a part of test scripts of LDAP extension module.

$test = File.dirname($0)
require "#{$test}/conf"
require "./ldap"

cred = "secret"

conn = LDAP::Conn.new($HOST, $PORT)

v = conn.get_option(LDAP::LDAP_OPT_PROTOCOL_VERSION)
printf("protocol version = #{v}\n")

conn.sasl_bind(nil, LDAP::LDAP_SASL_SIMPLE, cred){
  conn.perror("bind")
}