r70788 - in /trunk/libnet-epp-perl: debian/ debian/patches/ lib/Net/ lib/Net/EPP/ lib/Net/EPP/Frame/Command/ lib/Net/EPP/Frame/Command/Create/ lib/Net/EPP/Frame/Command/Renew/ lib/Net/EPP/Frame/Command/Update/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Mon Mar 7 11:41:03 UTC 2011


Author: jawnsy-guest
Date: Mon Mar  7 11:40:49 2011
New Revision: 70788

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=70788
Log:
builds clean, dch -r

Added:
    trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Renew/
      - copied from r70783, branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Renew/
Modified:
    trunk/libnet-epp-perl/debian/changelog
    trunk/libnet-epp-perl/debian/compat
    trunk/libnet-epp-perl/debian/control
    trunk/libnet-epp-perl/debian/copyright
    trunk/libnet-epp-perl/debian/patches/01-manpages.patch
    trunk/libnet-epp-perl/lib/Net/EPP.pm
    trunk/libnet-epp-perl/lib/Net/EPP/Client.pm
    trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Contact.pm
    trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Domain.pm
    trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Host.pm
    trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Renew.pm
    trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Update/Contact.pm
    trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Update/Domain.pm
    trunk/libnet-epp-perl/lib/Net/EPP/Simple.pm

Modified: trunk/libnet-epp-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-epp-perl/debian/changelog?rev=70788&op=diff
==============================================================================
--- trunk/libnet-epp-perl/debian/changelog (original)
+++ trunk/libnet-epp-perl/debian/changelog Mon Mar  7 11:40:49 2011
@@ -1,3 +1,14 @@
+libnet-epp-perl (0.16-1) unstable; urgency=low
+
+  * New upstream release
+  * Refresh copyright information
+  * Rewrite control description
+  * Standards-Version 3.9.1 (specifically refer to GPL-1)
+  * Refresh manpage patch
+  * Bump debhelper compat to 8
+
+ -- Jonathan Yu <jawnsy at cpan.org>  Mon, 07 Mar 2011 07:04:58 -0500
+
 libnet-epp-perl (0.15-1) unstable; urgency=low
 
   * New upstream release

Modified: trunk/libnet-epp-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-epp-perl/debian/compat?rev=70788&op=diff
==============================================================================
--- trunk/libnet-epp-perl/debian/compat (original)
+++ trunk/libnet-epp-perl/debian/compat Mon Mar  7 11:40:49 2011
@@ -1,1 +1,1 @@
-7
+8

Modified: trunk/libnet-epp-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-epp-perl/debian/control?rev=70788&op=diff
==============================================================================
--- trunk/libnet-epp-perl/debian/control (original)
+++ trunk/libnet-epp-perl/debian/control Mon Mar  7 11:40:49 2011
@@ -1,30 +1,30 @@
 Source: libnet-epp-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 7)
-Build-Depends-Indep: perl, libio-socket-ssl-perl, libdigest-sha1-perl,
+Build-Depends: debhelper (>= 8)
+Build-Depends-Indep: perl,
+ libio-socket-ssl-perl,
+ libdigest-sha1-perl,
  libxml-libxml-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Jonathan Yu <jawnsy at cpan.org>
-Standards-Version: 3.8.4
+Standards-Version: 3.9.1
 Homepage: http://search.cpan.org/dist/Net-EPP/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libnet-epp-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libnet-epp-perl/
 
 Package: libnet-epp-perl
 Architecture: all
-Depends: ${perl:Depends}, ${misc:Depends}, libio-socket-ssl-perl,
- libdigest-sha1-perl, libxml-libxml-perl
-Description: EPP XML frame system built on XML::LibXML
- EPP is the Extensible Provisioning Protocol. EPP (defined in RFC 4930) is an
- application layer client-server protocol for the provisioning and management
- of objects stored in a shared central repository. Specified in XML, the
- protocol defines generic object management operations and an extensible
- framework that maps protocol operations to objects. As of writing, its only
- well-developed application is the provisioning of Internet domain names,
- hosts, and related contact details.
+Depends: ${perl:Depends}, ${misc:Depends},
+ libio-socket-ssl-perl,
+ libdigest-sha1-perl,
+ libxml-libxml-perl
+Description: module implementing the Extensible Provisioning Protocol
+ Net::EPP is a collection of Perl modules that collectively implement the
+ Extensible Provisioning Protocol (EPP) as defined in RFC 4930. EPP is used
+ for provisioning and management of objects stored in a shared repository.
+ The protocol defines generic object management operations and an extensible
+ framework that maps operations to objects.
  .
- EPP uses XML documents called "frames" send data to and from clients and
- servers. Net::EPP implements a subclass of the XML::LibXML::Document module
- that simplifies the process of creation of these frames. It is designed to be
- used alongside the Net::EPP::Client module.
+ Many Network Information Centres use EPP to provide services for provisioning
+ of Internet domain names, hosts, and related contact details.

Modified: trunk/libnet-epp-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-epp-perl/debian/copyright?rev=70788&op=diff
==============================================================================
--- trunk/libnet-epp-perl/debian/copyright (original)
+++ trunk/libnet-epp-perl/debian/copyright Mon Mar  7 11:40:49 2011
@@ -8,7 +8,7 @@
 License: Artistic or GPL-1+
 
 Files: debian/*
-Copyright: 2009-2010, Jonathan Yu <jawnsy at cpan.org>
+Copyright: 2009-2011, Jonathan Yu <jawnsy at cpan.org>
  2009, Peter Pentchev <roam at ringlet.net>
 License: Artistic or GPL-1+
 
@@ -16,8 +16,8 @@
  This program is free software; you can redistribute it and/or modify
  it under the terms of the Artistic License, which comes with Perl.
  .
- On Debian GNU/Linux systems, the complete text of the Artistic License
- can be found in `/usr/share/common-licenses/Artistic'
+ On Debian systems, the complete text of the Artistic License can be
+ found in `/usr/share/common-licenses/Artistic'
 
 License: GPL-1+
  This program is free software; you can redistribute it and/or modify
@@ -25,6 +25,6 @@
  the Free Software Foundation; either version 1, or (at your option)
  any later version.
  .
- On Debian GNU/Linux systems, the complete text of the GNU General
- Public License can be found in `/usr/share/common-licenses/GPL'
+ On Debian systems, the complete text of version 1 of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL-1'
 

Modified: trunk/libnet-epp-perl/debian/patches/01-manpages.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-epp-perl/debian/patches/01-manpages.patch?rev=70788&op=diff
==============================================================================
--- trunk/libnet-epp-perl/debian/patches/01-manpages.patch (original)
+++ trunk/libnet-epp-perl/debian/patches/01-manpages.patch Mon Mar  7 11:40:49 2011
@@ -96,7 +96,7 @@
  =item  AUTH_FAILED_BYE (2501)
 --- a/lib/Net/EPP/Simple.pm
 +++ b/lib/Net/EPP/Simple.pm
-@@ -315,6 +315,8 @@
+@@ -445,6 +445,8 @@
  
  =pod
  

Modified: trunk/libnet-epp-perl/lib/Net/EPP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-epp-perl/lib/Net/EPP.pm?rev=70788&op=diff
==============================================================================
--- trunk/libnet-epp-perl/lib/Net/EPP.pm (original)
+++ trunk/libnet-epp-perl/lib/Net/EPP.pm Mon Mar  7 11:40:49 2011
@@ -12,6 +12,60 @@
 use Net::EPP::Simple;
 use strict;
 
-our $VERSION = '0.15';
+our $VERSION = '0.16';
 
 1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+C<Net::EPP> - a Perl library for the Extensible Provisioning Protocol (EPP)
+
+=head1 DESCRIPTION
+
+EPP is the Extensible Provisioning Protocol. EPP (defined in RFC 5730)
+is an application layer client-server protocol for the provisioning and
+management of objects stored in a shared central repository. Specified
+in XML, the protocol defines generic object management operations and an
+extensible framework that maps protocol operations to objects. As of
+writing, its only well-developed application is the provisioning of
+Internet domain names, hosts, and related contact details.
+
+This project offers a number of Perl modules which implement various
+EPP-related functions:
+
+=over
+
+=item * a low level protocol implementation (L<Net::EPP::Protocol>)
+
+=item * a low-level client (L<Net::EPP::Client>)
+
+=item * a high-level client (L<Net::EPP::Simple>)
+
+=item * an EPP frame builder (L<Net::EPP::Frame>)
+
+=item * a utility library to export EPP responde codes (L<Net::EPP::ResponseCodes>)
+
+=back
+
+These modules were originally created and maintained by CentralNic for
+use by their own registrars, but since their original release have
+become widely used by registrars and registries of all kinds.
+
+CentralNic has chosen to create this project to allow interested third
+parties to contribute to the development of these libraries, and to
+guarantee their long-term stability and maintenance. 
+
+=head1 AUTHOR
+
+CentralNic Ltd (L<http://www.centralnic.com/>).
+
+=head1 COPYRIGHT
+
+This module is (c) 2010 CentralNic Ltd. This module is free software; you can
+redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut

Modified: trunk/libnet-epp-perl/lib/Net/EPP/Client.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-epp-perl/lib/Net/EPP/Client.pm?rev=70788&op=diff
==============================================================================
--- trunk/libnet-epp-perl/lib/Net/EPP/Client.pm (original)
+++ trunk/libnet-epp-perl/lib/Net/EPP/Client.pm Mon Mar  7 11:40:49 2011
@@ -185,7 +185,7 @@
 This method will C<croak()> if connection fails, so be sure to use C<eval()> if
 you want to catch the error.
 
-The return value for C<connect()> will be the EPP C<E<lt>greetingE<gt>> frame
+The return value for C<connect()> will be the EPP E<lt>greetingE<gt> frame
 returned by the server. Please note that the same caveat about blocking applies
 to this method as to C<get_frame()> (see below).
 
@@ -237,7 +237,7 @@
 		%params
 	);
 
-	croak("Connection to $self->{'host'}:$self->{'port'} failed: \"$@\"") if (!defined($self->{'connection'}) || ($@ && $@ ne ''));
+	croak("Connection to $self->{'host'}:$self->{'port'} failed: $@") if (!defined($self->{'connection'}) || ($@ && $@ ne ''));
 
 	return 1;
 
@@ -390,7 +390,7 @@
 	$epp->disconnect;
 
 This closes the connection. An EPP server should always close a connection after
-a C<E<lt>logoutE<gt>> frame has been received and acknowledged; this method
+a E<lt>logoutE<gt> frame has been received and acknowledged; this method
 is provided to allow you to clean up on the client side, or close the
 connection out of sync with the server.
 

Modified: trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Contact.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Contact.pm?rev=70788&op=diff
==============================================================================
--- trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Contact.pm (original)
+++ trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Contact.pm Mon Mar  7 11:40:49 2011
@@ -20,7 +20,7 @@
 	use Net::EPP::Frame::Command::Create::Contact;
 	use strict;
 
-	my $check = Net::EPP::Frame::Command::Create::Contact->new;
+	my $create = Net::EPP::Frame::Command::Create::Contact->new;
 	$create->setContact('contact-id);
 
 	print $create->toString(1);
@@ -99,7 +99,7 @@
 sub setAuthInfo {
 	my ($self, $authInfo) = @_;
 	my $el = $self->addEl('authInfo');
-	my $pw = $self->createElement('pw');
+	my $pw = $self->createElement('contact:pw');
 	$pw->appendText($authInfo);
 	$el->appendChild($pw);
 	return $el;
@@ -133,7 +133,7 @@
 	}
 
 	$el->appendChild($nel);
-	$el->appendChild($oel);
+	$el->appendChild($oel) if $org;
 	$el->appendChild($ael);
 
 	return $el;

Modified: trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Domain.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Domain.pm?rev=70788&op=diff
==============================================================================
--- trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Domain.pm (original)
+++ trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Domain.pm Mon Mar  7 11:40:49 2011
@@ -20,7 +20,7 @@
 	use Net::EPP::Frame::Command::Create::Domain;
 	use strict;
 
-	my $check = Net::EPP::Frame::Command::Create::Domain->new;
+	my $create = Net::EPP::Frame::Command::Create::Domain->new;
 	$create->setDomain('example.uk.com);
 
 	print $create->toString(1);
@@ -202,7 +202,7 @@
 sub setAuthInfo {
 	my ($self, $authInfo) = @_;
 	my $el = $self->addEl('authInfo');
-	my $pw = $self->createElement('pw');
+	my $pw = $self->createElement('domain:pw');
 	$pw->appendText($authInfo);
 	$el->appendChild($pw);
 	return $el;

Modified: trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Host.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Host.pm?rev=70788&op=diff
==============================================================================
--- trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Host.pm (original)
+++ trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Create/Host.pm Mon Mar  7 11:40:49 2011
@@ -9,3 +9,22 @@
 use strict;
 
 1;
+
+=pod
+
+=head1 NAME
+
+Net::EPP::Frame::Command::Create::Host - an instance of L<Net::EPP::Frame::Command::Create>
+for host objects.
+
+=head1 OBJECT HIERARCHY
+
+    L<XML::LibXML::Node>
+    +----L<XML::LibXML::Document>
+        +----L<Net::EPP::Frame>
+            +----L<Net::EPP::Frame::Command>
+                +----L<Net::EPP::Frame::Command::Create>
+                    +----L<Net::EPP::Frame::Command::Create::Host>
+
+=cut
+

Modified: trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Renew.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Renew.pm?rev=70788&op=diff
==============================================================================
--- trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Renew.pm (original)
+++ trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Renew.pm Mon Mar  7 11:40:49 2011
@@ -4,6 +4,7 @@
 # 
 # $Id: Renew.pm,v 1.3 2007/12/03 11:44:52 gavin Exp $
 package Net::EPP::Frame::Command::Renew;
+use Net::EPP::Frame::Command::Renew::Domain;
 use base qw(Net::EPP::Frame::Command);
 use strict;
 

Modified: trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Update/Contact.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Update/Contact.pm?rev=70788&op=diff
==============================================================================
--- trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Update/Contact.pm (original)
+++ trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Update/Contact.pm Mon Mar  7 11:40:49 2011
@@ -21,7 +21,7 @@
 	use strict;
 
 	my $info = Net::EPP::Frame::Command::Update::Contact->new;
-	$info->setID('REG-12345');
+	$info->setContact('REG-12345');
 
 	print $info->toString(1);
 
@@ -86,7 +86,8 @@
 	my $el = $self->createElement('contact:id');
 	$el->appendText($id);
 
-	$self->getNode('update')->getChildNodes->shift->appendChild($el);
+	my $n = $self->getNode('update')->getChildNodes->shift;
+	$n->insertBefore( $el, $n->firstChild );
 
 	return 1;
 }

Modified: trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Update/Domain.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Update/Domain.pm?rev=70788&op=diff
==============================================================================
--- trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Update/Domain.pm (original)
+++ trunk/libnet-epp-perl/lib/Net/EPP/Frame/Command/Update/Domain.pm Mon Mar  7 11:40:49 2011
@@ -86,7 +86,8 @@
 	my $name = $self->createElement('domain:name');
 	$name->appendText($domain);
 
-	$self->getNode('update')->getChildNodes->shift->appendChild($name);
+	my $n = $self->getNode('update')->getChildNodes->shift;
+	$n->insertBefore( $name, $n->firstChild );
 
 	return 1;
 }

Modified: trunk/libnet-epp-perl/lib/Net/EPP/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-epp-perl/lib/Net/EPP/Simple.pm?rev=70788&op=diff
==============================================================================
--- trunk/libnet-epp-perl/lib/Net/EPP/Simple.pm (original)
+++ trunk/libnet-epp-perl/lib/Net/EPP/Simple.pm Mon Mar  7 11:40:49 2011
@@ -22,11 +22,11 @@
 
 =pod
 
-=head1 NAME
+=head1 Name
 
 Net::EPP::Simple - a simple EPP client interface for the most common jobs
 
-=head1 SYNOPSIS
+=head1 Synopsis
 
 	#!/usr/bin/perl
 	use Net::EPP::Simple;
@@ -49,7 +49,7 @@
 
 	}
 
-=head1 DESCRIPTION
+=head1 Description
 
 EPP is the Extensible Provisioning Protocol. EPP (defined in RFC 4930) is an
 application layer client-server protocol for the provisioning and management of
@@ -66,7 +66,7 @@
 It is based on the C<Net::EPP::Client> module and uses C<Net::EPP::Frame>
 to build request frames.
 
-=head1 CONSTRUCTOR
+=head1 Constructor
 
 The constructor for C<Net::EPP::Simple> has the same general form as the
 one for C<Net::EPP::Client>, but with the following exceptions:
@@ -81,14 +81,114 @@
 
 =item * The C<timeout> parameter controls how long the client waits for a response from the server before returning an error.
 
+=item * if C<debug> is set, C<Net::EPP::Simple> will output verbose debugging information on C<STDERR>, including all frames sent to and received from the server.
+
+=item * C<reconnect> can be used to disable automatic reconnection (it is enabled by default). Before sending a frame to the server, C<Net::EPP::Simple> will send a C<E<lt>helloE<gt>> to check that the connection is up, if not, it will try to reconnect, aborting after the I<n>th time, where I<n> is the value of C<reconnect> (the default is 3).
+
 =back
 
 The constructor will establish a connection to the server and retrieve the
-greeting (which is available via C<$epp-E<gt>{greeting}>) and then send a
-C<E<lt>loginE<gt>> request.
+greeting (which is available via $epp-E<gt>{greeting}) and then send a
+E<lt>loginE<gt> request.
 
 If the login fails, the constructor will return C<undef> and set
 C<$Net::EPP::Simple::Error> and C<$Net::EPP::Simple::Code>.
+
+=head2 Client and Server SSL options
+
+RFC 5730 requires that all EPP instances must be protected using "mutual,
+strong client-server authentication". In practice, this means that both
+client and server must present an SSL certificate, and that they must
+both verify the certificate of their peer.
+
+=head3 Server Certificate Verification
+
+C<Net::EPP::Simple> will verify the certificate presented by a server if
+the C<verify>, and either C<ca_file> or C<ca_path> are passed to the
+constructor:
+
+	my $epp = Net::EPP::Simple->new(
+		host	=> 'epp.nic.tld',
+		user	=> 'my-id',
+		pass	=> 'my-password',
+		verify	=> 1,
+		ca_file	=> '/etc/pki/tls/certs/ca-bundle.crt',
+		ca_path	=> '/etc/pki/tls/certs',
+	);
+
+C<Net::EPP::Simple> will fail to connect to the server if the
+certificate is not valid.
+
+=head3 SSL Cipher Selection
+
+You can restrict the ciphers that you will use to connect to the server
+by passing a C<ciphers> parameter to the constructor. This is a colon-
+separated list of cipher names and aliases. See L<http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS>
+for further details. As an example, the following cipher list is
+suggested for clients who wish to ensure high-security connections to
+servers:
+
+	HIGH:!ADH:!MEDIUM:!LOW:!SSLv2:!EXP
+
+=head3 Client Certificates
+
+If you are connecting to an EPP server which requires a client
+certificate, you can configure C<Net::EPP::Simple> to use one as
+follows:
+
+	my $epp = Net::EPP::Simple->new(
+		host		=> 'epp.nic.tld',
+		user		=> 'my-id',
+		pass		=> 'my-password',
+		key		=> '/path/to/my.key',
+		cert		=> '/path/to/my.crt',
+		passphrase	=> 'foobar123',
+	);
+
+C<key> is the filename of the private key, C<cert> is the filename of
+the certificate. If the private key is encrypted, the C<passphrase>
+parameter will be used to decrypt it.
+
+=head2 Configuration File
+
+C<Net::EPP::Simple> supports the use of a simple configuration file. To 
+use this feature, you need to install the L<Config::Simple> module.
+
+When starting up, C<Net::EPP::Simple> will look for 
+C<$HOME/.net-epp-simple-rc>. This file is an ini-style configuration 
+file.
+
+=head3 Default Options
+
+You can specify default options for all EPP servers using the C<[default]>
+section:
+
+	[default]
+	default=epp.nic.tld
+	debug=1
+
+=head3 Server Specific Options
+
+You can specify options for for specific EPP servers by giving each EPP server
+its own section:
+
+	[epp.nic.tld]
+	user=abc123
+	pass=foo2bar
+	port=777
+	ssl=0
+
+This means that when you write a script that uses C<Net::EPP::Simple>, you can
+do the following:
+
+	# config file has a default server:
+	my $epp = Net::EPP::Simple->new;
+
+	# config file has connection options for this EPP server:
+	my $epp = Net::EPP:Simple->new('host' => 'epp.nic.tld');
+
+Any parameters provided to the constructor will override those in the config
+file.
 
 =cut
 
@@ -137,6 +237,13 @@
 	$self->{authenticated}	= undef;
 	$self->{connect}	= (exists($params{connect}) ? $params{connect} : 1);
 	$self->{login}		= (exists($params{login}) ? $params{login} : 1);
+	$self->{key}		= $params{key};
+	$self->{cert}		= $params{cert};
+	$self->{key_passphrase}	= $params{key_passphrase};
+	$self->{verify}		= $params{verify};
+	$self->{ca_file}	= $params{ca_file};
+	$self->{ca_path}	= $params{ca_path};
+	$self->{ciphers}	= $params{ciphers};
 
 	bless($self, $package);
 
@@ -152,9 +259,27 @@
 sub _connect {
 	my ($self, $login) = @_;
 
+	my %params;
+
+	$params{SSL_cipher_list} = $self->{ciphers} if (defined($self->{ssl}) && defined($self->{ciphers}));
+
+	if (defined($self->{key}) && defined($self->{cert}) && defined($self->{ssl})) {
+		$self->debug('configuring client certificate parameters');
+		$params{SSL_key_file}	= $self->{key};
+		$params{SSL_cert_file}	= $self->{cert};
+		$params{SSL_passwd_cb}	= sub { $self->{key_passphrase} };
+	}
+
+	if (defined($self->{ssl}) && defined($self->{verify})) {
+		$self->debug('configuring server verification');
+		$params{SSL_verify_mode}	= 0x01;
+		$params{SSL_ca_file}		= $self->{ca_file};
+		$params{SSL_ca_path}		= $self->{ca_path};
+	}
+
 	$self->debug(sprintf('Attempting to connect to %s:%d', $self->{host}, $self->{port}));
 	eval {
-		$self->{greeting} = $self->connect;
+		$self->{greeting} = $self->connect(%params);
 	};
 	if ($@ ne '' || ref($self->{greeting}) ne 'Net::EPP::Frame::Response') {
 		chomp($@);
@@ -198,10 +323,15 @@
 		$login->svcs->appendChild($el);
 	}
 	$objects = $self->{greeting}->getElementsByTagNameNS(EPP_XMLNS, 'extURI');
+	my $svcext;
+	if ($objects->size) {
+		$svcext = $login->createElement('svcExtension');
+		$login->svcs->appendChild($svcext);
+	}
 	while (my $object = $objects->shift) {
-		my $el = $login->createElement('objURI');
+		my $el = $login->createElement('extURI');
 		$el->appendText($object->firstChild->data);
-		$login->svcs->appendChild($el);
+		$svcext->appendChild($el);
 	}
 
 	$self->debug(sprintf("Attempting to login as client ID '%s'", $self->{user}));
@@ -332,7 +462,7 @@
 C<$Net::EPP::Simple::Error> and C<$Net::EPP::Simple::Code>.
 
 If C<$authInfo> is defined, it will be sent to the server as per RFC
-4931, Section 3.1.2 and RRC 4933, Section 3.1.2. If the supplied
+5731, Section 3.1.2 and RFC 5733, Section 3.1.2. If the supplied
 authInfo code is validated by the registry, additional information will
 appear in the response. If it is invalid, you should get an error.
 
@@ -939,7 +1069,7 @@
 	$frame->setPeriod($domain->{'period'});
 	$frame->setRegistrant($domain->{'registrant'});
 	$frame->setContacts($domain->{'contacts'});
-	$frame->setNS(@{$domain->{'ns'}});
+	$frame->setNS(@{$domain->{'ns'}}) if $domain->{'ns'} and @{$domain->{'ns'}};
 
 	$frame->setAuthInfo($domain->{authInfo}) if ($domain->{authInfo} ne '');
 
@@ -974,10 +1104,6 @@
 	my $frame = Net::EPP::Frame::Command::Create::Contact->new;
 
 	$frame->setContact($contact->{id});
-	$frame->setEmail($contact->{email});
-	$frame->setVoice($contact->{voice}) if ($contact->{voice} ne '');
-	$frame->setFax($contact->{fax}) if ($contact->{fax} ne '');
-	$frame->setAuthInfo($contact->{authInfo}) if ($contact->{authInfo} ne '');
 
 	if (ref($contact->{postalInfo}) eq 'HASH') {
 		foreach my $type (keys(%{$contact->{postalInfo}})) {
@@ -989,6 +1115,11 @@
 			);
 		}
 	}
+
+	$frame->setVoice($contact->{voice}) if ($contact->{voice} ne '');
+	$frame->setFax($contact->{fax}) if ($contact->{fax} ne '');
+	$frame->setEmail($contact->{email});
+	$frame->setAuthInfo($contact->{authInfo}) if ($contact->{authInfo} ne '');
 
 	if (ref($contact->{status}) eq 'ARRAY') {
 		foreach my $status (grep { /^client/ } @{$contact->{status}}) {
@@ -1322,13 +1453,13 @@
 be set to 2400 (C<COMMAND_FAILED>). See L<Net::EPP::ResponseCodes> for
 more information about thes codes.
 
-=head1 AUTHOR
+=head1 Author
 
 CentralNic Ltd (L<http://www.centralnic.com/>).
 
-=head1 COPYRIGHT
-
-This module is (c) 2007 CentralNic Ltd. This module is free software; you can
+=head1 Copyright
+
+This module is (c) 2011 CentralNic Ltd. This module is free software; you can
 redistribute it and/or modify it under the same terms as Perl itself.
 
 =head1 SEE ALSO
@@ -1341,9 +1472,9 @@
 
 =item * L<Net::EPP::Proxy>
 
-=item * RFCs 4930 and RFC 4934, available from L<http://www.ietf.org/>.
-
-=item * The CentralNic EPP site at L<http://www.centralnic.com/resellers/epp>.
+=item * RFCs 5730 and RFC 4934, available from L<http://www.ietf.org/>.
+
+=item * The CentralNic EPP site at L<http://www.centralnic.com/registrars/epp>.
 
 =back
 




More information about the Pkg-perl-cvs-commits mailing list