@@ -0,0 +1,1542 @@
+diff -uNr whois-5.2.0/config.h whois-5.2.3/config.h
+--- whois-5.2.0/config.h 2014-08-02 03:31:54.000000000 +0200
++++ whois-5.2.3/config.h 2014-12-26 19:56:21.000000000 +0100
+@@ -81,6 +81,15 @@
+ # define RANDOM_DEVICE "/dev/urandom"
+ #endif
+
++/* use arc4random_buf instead if it is available */
++#if (defined __FreeBSD__ && __FreeBSD__ >= 9) || \
++ (defined __NetBSD__ && __NetBSD_Version__ >= 600000000) || \
++ (defined OpenBSD && OpenBSD >= 200805) || \
++ (defined __APPLE__ && defined __MACH__)
++# define HAVE_ARC4RANDOM_BUF
++# undef RANDOM_DEVICE
++#endif
++
+ #ifdef ENABLE_NLS
+ # ifndef NLS_CAT_NAME
+ # define NLS_CAT_NAME "whois"
+diff -uNr whois-5.2.0/data.h whois-5.2.3/data.h
+--- whois-5.2.0/data.h 2014-08-02 03:41:06.000000000 +0200
++++ whois-5.2.3/data.h 2014-10-16 01:57:19.000000000 +0200
+@@ -11,17 +11,13 @@
+ "whois.apnic.net",
+ "whois.afrinic.net",
+ "rr.arin.net", /* does not accept the old syntax */
+- "whois.6bone.net", /* 3.0.0b1 */
+ "whois.connect.com.au", /* 3.0.0b1 */
+ "whois.nic.fr",
+- "whois.telstra.net",
+ "whois.restena.lu",
+ "rr.level3.net", /* 3.0.0a13 */
+ "whois.ripn.net",
+ "whois.arnes.si",
+- "www.registry.co.ug",
+ "whois.nic.ir",
+- "whois.nic.ck",
+ "whois.ra.net",
+ "whois.bgpmon.net",
+ NULL
+@@ -159,6 +155,11 @@
+ NULL, NULL
+ };
+
++const char *nic_handles_post[] = {
++#include "nic_handles.h"
++ NULL, NULL
++};
++
+ #ifdef HAVE_ICONV
+ struct server_charset {
+ const char *name;
+diff -uNr whois-5.2.0/debian/changelog whois-5.2.3/debian/changelog
+--- whois-5.2.0/debian/changelog 2014-09-13 05:13:21.000000000 +0200
++++ whois-5.2.3/debian/changelog 2014-12-26 20:14:35.000000000 +0100
+@@ -1,3 +1,36 @@
++whois (5.2.3) unstable; urgency=medium
++
++ * Added the .gw TLD server.
++ * Updated the .bm, .gr, .gt, .md, .np, .py, .tc, .tg, .vi, .net.za,
++ .org.za and .web.za TLD servers. (Closes: #773489)
++ * Removed the .cg TLD server.
++ * Updated the list of new gTLDs.
++ * mkpasswd: use arc4random_buf(3) where available.
++ * mkpasswd: support OpenBSD's new hash 2b.
++ * Updated some IPv4 allocations.
++ * Remove the new_gtlds.h generated file from the Debian source package.
++
++ -- Marco d'Itri <md@linux.it> Fri, 26 Dec 2014 20:12:24 +0100
++
++whois (5.2.2) unstable; urgency=medium
++
++ * Fixed the code that removes trailing dots. (Closes: #763834)
++ * Added the .xn--d1alf (.мкд, Macedonia) and .xn--node (.გე, Georgia)
++ TLD servers.
++ * Updated the list of new gTLDs.
++
++ -- Marco d'Itri <md@linux.it> Thu, 06 Nov 2014 03:47:43 +0100
++
++whois (5.2.1) unstable; urgency=medium
++
++ * Added the .aw and .zm TLD servers.
++ * Added the charset for whois.domain.kg.
++ * Updated the list of new gTLDs.
++ * Queries for bare TLDs will be directed to whois.iana.org.
++ (Closes: #763833)
++
++ -- Marco d'Itri <md@linux.it> Thu, 16 Oct 2014 02:01:20 +0200
++
+ whois (5.2.0) unstable; urgency=medium
+
+ * Implemented support for the long RIPE flags.
+diff -uNr whois-5.2.0/debian/control whois-5.2.3/debian/control
+--- whois-5.2.0/debian/control 2013-12-26 18:03:01.000000000 +0100
++++ whois-5.2.3/debian/control 2014-10-16 01:57:19.000000000 +0200
+@@ -2,7 +2,7 @@
+ Section: net
+ Priority: standard
+ Maintainer: Marco d'Itri <md@linux.it>
+-Standards-Version: 3.9.5
++Standards-Version: 3.9.6
+ Build-Depends: debhelper (>= 5), gettext, libidn11-dev
+ Vcs-Git: git://github.com/rfc1036/whois.git
+ Vcs-Browser: https://github.com/rfc1036/whois
+diff -uNr whois-5.2.0/ip_del_list whois-5.2.3/ip_del_list
+--- whois-5.2.0/ip_del_list 2014-08-02 03:31:54.000000000 +0200
++++ whois-5.2.3/ip_del_list 2014-12-26 19:56:21.000000000 +0100
+@@ -19,6 +19,7 @@
+ 39.0.0.0/8 apnic
+ 41.0.0.0/8 afrinic
+ 42.0.0.0/8 apnic
++43.224.0.0/11 apnic
+ 43.0.0.0/8 whois.nic.ad.jp
+ 46.0.0.0/8 ripe
+ 49.0.0.0/8 apnic
+@@ -149,11 +150,6 @@
+ 196.0.0.0/7 afrinic
+ 198.0.0.0/7 arin
+
+-200.17.0.0/16 whois.nic.br
+-200.18.0.0/15 whois.nic.br
+-200.20.0.0/16 whois.nic.br
+-200.96.0.0/13 whois.nic.br
+-200.128.0.0/9 whois.nic.br
+ 200.0.0.0/7 lacnic
+ 202.11.0.0/16 whois.nic.ad.jp
+ 202.13.0.0/16 whois.nic.ad.jp
+diff -uNr whois-5.2.0/Makefile whois-5.2.3/Makefile
+--- whois-5.2.0/Makefile 2014-08-02 03:31:54.000000000 +0200
++++ whois-5.2.3/Makefile 2014-12-26 20:14:34.000000000 +0100
+@@ -87,6 +87,9 @@
+ new_gtlds.h: new_gtlds_list make_new_gtlds.pl
+ $(PERL) make_new_gtlds.pl < $< > $@
+
++nic_handles.h: nic_handles_list make_nic_handles.pl
++ $(PERL) make_nic_handles.pl < $< > $@
++
+ tld_serv.h: tld_serv_list make_tld_serv.pl
+ $(PERL) make_tld_serv.pl < $< > $@
+
+@@ -118,7 +121,7 @@
+
+ clean:
+ rm -f Makefile.depend as_del.h as32_del.h ip_del.h ip6_del.h \
+- tld_serv.h servers_charset.h *.o whois mkpasswd
++ new_gtlds.h tld_serv.h servers_charset.h *.o whois mkpasswd
+ rm -f po/*.mo
+
+ pos:
+diff -uNr whois-5.2.0/make_new_gtlds.pl whois-5.2.3/make_new_gtlds.pl
+--- whois-5.2.0/make_new_gtlds.pl 2014-08-02 03:31:54.000000000 +0200
++++ whois-5.2.3/make_new_gtlds.pl 2014-10-16 01:57:19.000000000 +0200
+@@ -9,8 +9,8 @@
+ s/^\s+//; s/\s+$//;
+ next if /^$/;
+
+- die "format error: $_" if not /^((?:xn--)?[a-z0-9]+)$/;
++ die "format error: $_" if not /^(xn--[a-z0-9-]+|[a-z]+)$/;
+
+- print qq| ".$_",\n|;
++ print qq| "$_",\n|;
+ }
+
+diff -uNr whois-5.2.0/make_nic_handles.pl whois-5.2.3/make_nic_handles.pl
+--- whois-5.2.0/make_nic_handles.pl 1970-01-01 01:00:00.000000000 +0100
++++ whois-5.2.3/make_nic_handles.pl 2014-10-16 01:57:19.000000000 +0200
+@@ -0,0 +1,17 @@
++#!/usr/bin/perl
++
++use warnings;
++use strict;
++
++while (<>) {
++ chomp;
++ s/#.*$//;
++ s/^\s+//; s/\s+$//;
++ next if /^$/;
++
++ die "format error: $_" if not
++ (my ($a, $b) = /^(-\w+)\s+([\w\d\.:-]+)$/);
++
++ print qq| "$a",\t"$b",\n|;
++}
++
+diff -uNr whois-5.2.0/make_tld_serv.pl whois-5.2.3/make_tld_serv.pl
+--- whois-5.2.0/make_tld_serv.pl 2014-08-02 03:31:54.000000000 +0200
++++ whois-5.2.3/make_tld_serv.pl 2014-10-16 01:57:19.000000000 +0200
+@@ -10,7 +10,7 @@
+ next if /^$/;
+
+ die "format error: $_" if not
+- (my ($a, $b) = /^([\w\d\.-]+)\s+([\w\d\.:-]+|[A-Z]+\s+.*)$/);
++ (my ($a, $b) = /^\.(\w[\w\d\.-]+)\s+([\w\d\.:-]+|[A-Z]+\s+.*)$/);
+
+ $b =~ s/^W(?:EB)?\s+/\\x01/;
+ $b =~ s/^VERISIGN\s+/\\x04" "/;
+diff -uNr whois-5.2.0/mkpasswd.c whois-5.2.3/mkpasswd.c
+--- whois-5.2.0/mkpasswd.c 2014-09-13 02:42:29.000000000 +0200
++++ whois-5.2.3/mkpasswd.c 2014-12-26 19:56:21.000000000 +0100
|