Import Upstream version 1.23 upstream/1.23
authorThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Fri, 11 Aug 2017 22:35:30 +0000 (19:35 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Fri, 11 Aug 2017 22:35:30 +0000 (19:35 -0300)
Changes
INSTALL
META.yml
README
examples/send-url.xml
examples/sendxmpp-raw-messages
sendxmpp

diff --git a/Changes b/Changes
index 4657b7e..ccd9c72 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,11 @@
+2012-10-28:
+       - release version 1.23
+       - added options --no-tls-verify and --tls-ca-path, thanks to Alexander Weidinger <aw AT sz9i.net>
+
+2012-10-20:
+       - CVS repository of sendxmpp migrated to Git repository https://github.com/lhost/sendxmpp
+       - Homepage URL changed to http://sendxmpp.hostname.sk
+
 2008-10-21:
        - Added support for 'chat' message type. Implemented modified version of
          messsage-type-chat.patch from Marc Mims <marc AT questright.com>
diff --git a/INSTALL b/INSTALL
index 3add5de..104a712 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,16 +1,15 @@
 INSTALL
 -------
-sendxmpp requires perl 5.x, Getopt::Long and Net::XMPP.
-
-$ tar xvfz sendxmpp-(version).tar.gz
-$ cd sendxmpp-(version)
-$ perl Makefile.PL
-$ make
-$ make install
 
-This will install under /usr/local; to install under another prefix, for exampl;e "/usr", do:
+Installation from Git repository:
+---------------------------------
 
-$ perl Makefile.PL PREFIX=/usr
+       cd /tmp
+       git clone https://github.com/lhost/sendxmpp.git
+       cd sendxmpp/
+       perl Makefile.PL
+       make
+       make install
 
-instead.
+sendxmpp requires perl 5.x, Getopt::Long and Net::XMPP.
 
index becf49d..35c0dba 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -1,7 +1,5 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         sendxmpp
-version:      0.0.8
+version:      1.23
 version_from: sendxmpp
 installdirs:  site
 requires:
diff --git a/README b/README
index e132c82..6db4c75 100644 (file)
--- a/README
+++ b/README
@@ -21,7 +21,7 @@ sent.
 
 I am interested in hearing about other uses.
 
-Homepage: http://sendxmpp.platon.sk
+Homepage: http://sendxmpp.hostname.sk
 
 Lubomir Host 'rajo' <rajo AT platon.sk>
 Jabber: <rajo AT jabber.platon.sk> (IM)
index ac20bde..120cf68 100644 (file)
@@ -1,6 +1,6 @@
 <message to='rajo@server.somewhere.sk'>
        <body>Check out the new sendxmpp website!</body>
        <x xmlns='jabber:x:oob'>
-               <url>http://sendxmpp.platon.sk/</url>
+               <url>http://sendxmpp.hostname.sk/</url>
        </x>
 </message>
index dde029e..e5b93df 100644 (file)
@@ -10,7 +10,7 @@
 <message to='foo@server.com'>
        <body>Check out the new sendxmpp website!</body>
        <x xmlns='jabber:x:oob'>
-               <url>http://sendxmpp.platon.sk/</url>
+               <url>http://sendxmpp.hostname.sk/</url>
        </x>
 </message>
 
index b78fbc2..8348398 100755 (executable)
--- a/sendxmpp
+++ b/sendxmpp
@@ -10,14 +10,12 @@ if 0; # not running under some shell
 # Author:     Dirk-Jan C. Binnema <djcb AT djcbsoftware.nl>
 # Maintainer: Lubomir Host 'rajo' <rajo AT platon.sk>
 # Copyright (c) 2004 - 2005 Dirk-Jan C. Binnema
-# Copyright (c) 2006 - 2009 Lubomir Host 'rajo'
+# Copyright (c) 2006 - 2012 Lubomir Host 'rajo'
 #
-# Homepage: http://sendxmpp.platon.sk
+# Homepage: http://sendxmpp.hostname.sk
 #
 # Released under the terms of the GNU General Public License v2
 #
-# $Platon: sendxmpp/sendxmpp,v 1.22 2010-10-03 19:36:35 rajo Exp $
-# $Id: $
 
 use Authen::SASL qw(Perl); # authentication broken if Authen::SASL::Cyrus module installed
 use Net::XMPP;
@@ -28,7 +26,7 @@ use open ':utf8';
 use open ':std';
 
 # subroutines decls
-sub xmpp_login($$$$$$$$$);
+sub xmpp_login($$$$$$$$$$$);
 sub xmpp_send ($$$$);
 sub xmpp_send_raw_xml($$);
 sub xmpp_send_message($$$$$$);
@@ -44,7 +42,7 @@ sub terminate();
 sub main();
 
 my # MakeMaker
-$VERSION       = [ q$Revision: 1.22 $ =~ m/(\S+)\s*$/g ]->[0];
+$VERSION       = [ q$Revision: 1.23 $ =~ m/(\S+)\s*$/g ]->[0];
 my $RESOURCE = 'sendxmpp';
 my $VERBOSE  = 0;
 my $DEBUG    = 0;
@@ -76,8 +74,10 @@ sub main () {
                           $$cmdline{'username'} || $$config{'username'},
                           $$cmdline{'password'} || $$config{'password'},
                           $$cmdline{'component'}|| $$config{'component'},
-                          $$cmdline{'resource'},
-                          $$cmdline{'tls'},
+                          $$cmdline{'resource'},
+                          $$cmdline{'tls'} || $$config{'tls'},
+                          $$cmdline{'no-tls-verify'} || $$config{'no-tls-verify'},
+                          $$cmdline{'tls-ca-path'} || $$config{'tls-ca-path'} || '',
                           $$cmdline{'ssl'},
                           $$cmdline{'debug'})
       or error_exit("cannot login: $!");
@@ -207,7 +207,9 @@ sub parse_cmdline () {
     usage() unless (scalar(@ARGV));
 
        my ($subject,$file,$resource,$jserver,$port,$username,$password,$component,
-       $message, $chatroom, $headline, $debug, $tls, $ssl, $interactive, $help, $raw, $verbose);
+       $message, $chatroom, $headline, $debug, $tls, $ssl,
+       $no_tls_verify, $tls_ca_path,
+       $interactive, $help, $raw, $verbose);
     my $res = GetOptions ('subject|s=s'    => \$subject,
                          'file|f=s'       => \$file,
                          'resource|r=s'   => \$resource,
@@ -220,6 +222,8 @@ sub parse_cmdline () {
                          'message-type=s' => \$message_type,
                          'chatroom|c'     => \$chatroom,
                          'tls|t'          => \$tls,
+                         'no-tls-verify|n' => \$no_tls_verify,
+                         'tls-ca-path|a=s' => \$tls_ca_path,
                          'ssl|e'          => \$ssl,
                          'interactive|i'  => \$interactive,
                          'help|usage|h'   => \$help,
@@ -279,6 +283,8 @@ sub parse_cmdline () {
                'message-type'    => $message_type,
                'interactive' => ($interactive or 0),
                'tls'         => ($tls or 0),
+               'no-tls-verify' => ($no_tls_verify or 0),
+               'tls-ca-path' => ($tls_ca_path or ''),
                'ssl'         => ($ssl or 0),
                'debug'       => ($debug or 0),
                'verbose'     => ($verbose or 0),
@@ -301,18 +307,26 @@ sub parse_cmdline () {
 # input: hostname,port,username,password,resource,tls,ssl,debug
 # output: an XMPP connection object
 #
-sub xmpp_login ($$$$$$$$$) {
+sub xmpp_login ($$$$$$$$$$$) {
 
-    my ($host, $port, $user, $pw, $comp, $res, $tls, $ssl, $debug) = @_;
+    my ($host, $port, $user, $pw, $comp, $res, $tls, $no_tls_verify, $tls_ca_path, $ssl, $debug) = @_;
     my $cnx = new Net::XMPP::Client(debuglevel=>($debug?2:0));
     error_exit "could not create XMPP client object: $!"
        unless ($cnx);
 
+       my $ssl_verify = 0x01;
+       if ($no_tls_verify) { $ssl_verify = 0x00; }
+       debug_print "ssl_verify: $ssl_verify";
+
+       debug_print "tls_ca_path: $tls_ca_path";
+
     my @res;
        my $arghash = {
                hostname                => $host,
                port            => $port,
                tls                             => $tls,
+               ssl_verify              => $ssl_verify,
+               ssl_ca_path             => $tls_ca_path,
                ssl             => $ssl,
                connectiontype  => 'tcpip',
                componentname   => $comp
@@ -595,6 +609,14 @@ Connect securely, using TLS
 
 Connect securely, using SSL
 
+=item B<-n>,B<--no-tls-verify>
+
+Deactivate the verification of SSL certificates. Better way is to use parameter B<--tls-ca-path> with the needed path to CA certificates.
+
+=item B<-a>,B<--tls-ca-path>
+
+Path to your custom CA certificates, so you can verificate SSL certificates during connecting.
+
 =item B<-l>,B<--headline>
 
 Backward compatibility option. You should use B<--message-type=headline> instead. Send a headline type message (not stored in offline messages)
@@ -691,12 +713,12 @@ Documentation for the L<Net::XMPP> module
 
 The jabber homepage: L<http://www.jabber.org/>
 
-The sendxmpp homepage: L<http://sendxmpp.platon.sk>
+The sendxmpp homepage: L<http://sendxmpp.hostname.sk>
 
 =head1 AUTHOR
 
 sendxmpp has been written by Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>, and uses
 the L<Net::XMPP> modules written by Ryan Eatmon. Current maintainer is
-Lubomir Host 'rajo' <rajo AT platon.sk>, L<http://rajo.platon.sk>
+Lubomir Host 'rajo' <rajo AT platon.sk>, L<http://blog.hostname.sk>
 
 =cut