File: Cyrus.pm

package info (click to toggle)
libauthen-sasl-cyrus-perl 0.12-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 92 kB
  • ctags: 16
  • sloc: perl: 91; makefile: 43
file content (33 lines) | stat: -rw-r--r-- 692 bytes parent folder | download
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
package Authen::SASL::Cyrus;
require DynaLoader;
require Authen::SASL::Cyrus::Security;
@ISA = qw(DynaLoader);
$VERSION = "0.12";
bootstrap Authen::SASL::Cyrus $VERSION;



#
# Take a client filehandle and tie it to the Security subclass to
# perform SASL encryption and decryption on the network traffic
#
sub tiesocket {
  my($sasl, $fh) = @_;

  new Authen::SASL::Cyrus::Security($fh, $sasl);
}



# Create a new client filehandle and tie it to the Security subclass to
# perform SASL encryption and decryption on the network traffic
sub securesocket {
  my ($sasl, $fh) = @_;
  my $glob = \do { local *GLOB; };
  tie(*$glob, "Authen::SASL::Cyrus::Security", $fh, $sasl);
  $glob;
}



1;