From 45e5efc43ae9fa8da98284856b776948682fa6f0 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Fri, 11 Aug 2017 19:35:30 -0300 Subject: [PATCH] Import Upstream version 1.23 --- Changes | 8 ++++++ INSTALL | 19 +++++++------- META.yml | 4 +-- README | 2 +- examples/send-url.xml | 2 +- examples/sendxmpp-raw-messages | 2 +- sendxmpp | 48 +++++++++++++++++++++++++--------- 7 files changed, 56 insertions(+), 29 deletions(-) diff --git a/Changes b/Changes index 4657b7e..ccd9c72 100644 --- 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 + +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 diff --git a/INSTALL b/INSTALL index 3add5de..104a712 100644 --- 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. diff --git a/META.yml b/META.yml index becf49d..35c0dba 100644 --- 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 --- 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' Jabber: (IM) diff --git a/examples/send-url.xml b/examples/send-url.xml index ac20bde..120cf68 100644 --- a/examples/send-url.xml +++ b/examples/send-url.xml @@ -1,6 +1,6 @@ Check out the new sendxmpp website! - http://sendxmpp.platon.sk/ + http://sendxmpp.hostname.sk/ diff --git a/examples/sendxmpp-raw-messages b/examples/sendxmpp-raw-messages index dde029e..e5b93df 100644 --- a/examples/sendxmpp-raw-messages +++ b/examples/sendxmpp-raw-messages @@ -10,7 +10,7 @@ Check out the new sendxmpp website! - http://sendxmpp.platon.sk/ + http://sendxmpp.hostname.sk/ diff --git a/sendxmpp b/sendxmpp index b78fbc2..8348398 100755 --- a/sendxmpp +++ b/sendxmpp @@ -10,14 +10,12 @@ if 0; # not running under some shell # Author: Dirk-Jan C. Binnema # Maintainer: Lubomir Host 'rajo' # 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 module The jabber homepage: L -The sendxmpp homepage: L +The sendxmpp homepage: L =head1 AUTHOR sendxmpp has been written by Dirk-Jan C. Binnema , and uses the L modules written by Ryan Eatmon. Current maintainer is -Lubomir Host 'rajo' , L +Lubomir Host 'rajo' , L =cut -- 2.20.1