mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-29 20:04:57 +01:00
Compare commits
103
Commits
stable/9
...
releng/9.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eec2228f55 | ||
|
|
e9e69dbafd | ||
|
|
7cebf7e583 | ||
|
|
eb5534a05f | ||
|
|
7e0b0363b8 | ||
|
|
51a48ba65f | ||
|
|
6043a9470f | ||
|
|
83ca486c2c | ||
|
|
de3e3817e7 | ||
|
|
1347b266dd | ||
|
|
667a868f37 | ||
|
|
753be378f3 | ||
|
|
ae2b78f369 | ||
|
|
d1a5b5c5bf | ||
|
|
b779b28d36 | ||
|
|
a462572dbf | ||
|
|
337b0b5de8 | ||
|
|
772e608bdc | ||
|
|
26a053bf13 | ||
|
|
092516cf26 | ||
|
|
26815336a3 | ||
|
|
b1796cb268 | ||
|
|
9d5d6c82d3 | ||
|
|
66538f3053 | ||
|
|
fe40a99982 | ||
|
|
b0973980cd | ||
|
|
6036375edf | ||
|
|
0d52dfa919 | ||
|
|
1d1620e2c6 | ||
|
|
9ea3d85408 | ||
|
|
6e9d26e200 | ||
|
|
3ec0667fbd | ||
|
|
181544fef6 | ||
|
|
451a0efc67 | ||
|
|
a2a1ebc1d9 | ||
|
|
b112fea108 | ||
|
|
b65e97f42f | ||
|
|
7c3664f6ea | ||
|
|
77ab896b5e | ||
|
|
e41158e404 | ||
|
|
5fe9da68d0 | ||
|
|
e2668e870b | ||
|
|
c953610431 | ||
|
|
bc9a3f6771 | ||
|
|
1271043562 | ||
|
|
1bd1803812 | ||
|
|
5b42ee7dc0 | ||
|
|
a0a3906f02 | ||
|
|
8c3ae676eb | ||
|
|
c7967de6ec | ||
|
|
3aa37f13ad | ||
|
|
0f5cc5c69a | ||
|
|
ac7c27672f | ||
|
|
bd38854403 | ||
|
|
af4a9c6b42 | ||
|
|
7c5b1b3572 | ||
|
|
53b78a2173 | ||
|
|
7454a3a680 | ||
|
|
fa256a574a | ||
|
|
077c6ce245 | ||
|
|
0f13f2f843 | ||
|
|
ed4580d436 | ||
|
|
e8afab5aaf | ||
|
|
3671b1dd2a | ||
|
|
1d19b637ce | ||
|
|
de965712ea | ||
|
|
13b846c147 | ||
|
|
c98f547370 | ||
|
|
6e454f2559 | ||
|
|
bc4d556a78 | ||
|
|
f883bbac60 | ||
|
|
a5bb2bb1ed | ||
|
|
ae4dde5329 | ||
|
|
f80458d328 | ||
|
|
6f7d8f3312 | ||
|
|
1bd9009862 | ||
|
|
2170de9374 | ||
|
|
9226ac52e0 | ||
|
|
48e8de7473 | ||
|
|
c386ec146a | ||
|
|
bcdef61dc3 | ||
|
|
50053ba19c | ||
|
|
b265a8ad92 | ||
|
|
2e4e6062ac | ||
|
|
c2560c0507 | ||
|
|
fada2c6805 | ||
|
|
c119949d0e | ||
|
|
6f1e4b111a | ||
|
|
28a23d4587 | ||
|
|
1f93d28092 | ||
|
|
2241e750e9 | ||
|
|
c692e6c480 | ||
|
|
99bf3b17c0 | ||
|
|
7a59c6c055 | ||
|
|
98774675ca | ||
|
|
eb3971766d | ||
|
|
56943182f9 | ||
|
|
859939252e | ||
|
|
994d4633d6 | ||
|
|
e3480a5ecf | ||
|
|
a0bf6025cb | ||
|
|
97ffd12921 | ||
|
|
524afbfe74 |
No files matched your search
@@ -9,6 +9,182 @@ handbook.
|
||||
Items affecting the ports and packages system can be found in
|
||||
/usr/ports/UPDATING. Please read that file before running portupgrade.
|
||||
|
||||
20141223: p24 FreeBSD-SA-14:31.ntp
|
||||
FreeBSD-EN-14:13.freebsd-update
|
||||
|
||||
Fix multiple vulnerabilities in NTP suite. [SA-14:31]
|
||||
Fix directory deletion issue in freebsd-update. [EN-14:13]
|
||||
|
||||
20141210: p23 FreeBSD-SA-14:28.file
|
||||
FreeBSD-SA-14:29.bind
|
||||
|
||||
Fix multiple vulnerabilities in file(1) and libmagic(3).
|
||||
[SA-14:28]
|
||||
|
||||
Fix BIND remote denial of service vulnerability. [SA-14:29]
|
||||
|
||||
20141104: p22 FreeBSD-SA-14:24.sshd
|
||||
FreeBSD-SA-14:25.setlogin
|
||||
FreeBSD-SA-14:26.ftp
|
||||
FreeBSD-EN-14:12.zfs
|
||||
|
||||
Fix denial of service attack against sshd(8). [SA-14:24]
|
||||
|
||||
Fix kernel stack disclosure in setlogin(2) / getlogin(2).
|
||||
[SA-14:25]
|
||||
|
||||
Fix remote command execution in ftp(1). [SA-14:26]
|
||||
|
||||
Fix NFSv4 and ZFS cache consistency issue. [EN-14:12]
|
||||
|
||||
20141022: p21 FreeBSD-EN-14:10.tzdata
|
||||
|
||||
Time zone data file update. [EN-14:10]
|
||||
|
||||
20141021: p20 FreeBSD-SA-14:20.rtsold
|
||||
FreeBSD-SA-14:21.routed
|
||||
FreeBSD-SA-14:22.namei
|
||||
FreeBSD-SA-14:23.openssl
|
||||
|
||||
Fix rtsold(8) remote buffer overflow vulnerability. [SA-14:20]
|
||||
|
||||
Fix routed(8) remote denial of service vulnerability. [SA-14:21]
|
||||
|
||||
Fix memory leak in sandboxed namei lookup. [SA-14:22]
|
||||
|
||||
Fix OpenSSL multiple vulnerabilities. [SA-14:23]
|
||||
|
||||
20140916: p19 FreeBSD-SA-14:19.tcp
|
||||
Fix Denial of Service in TCP packet processing. [SA-14:19]
|
||||
|
||||
20140909: p18 FreeBSD-SA-14:18.openssl
|
||||
Fix OpenSSL multiple vulnerabilities. [SA-14:18]
|
||||
|
||||
20140708: p17 FreeBSD-SA-14:17.kmem
|
||||
Fix kernel memory disclosure in control messages and SCTP
|
||||
notifications. [SA-14:17]
|
||||
|
||||
20140624: p16 FreeBSD-SA-14:16.file
|
||||
FreeBSD-EN-14:08.heimdal
|
||||
|
||||
Fix multiple vulnerabilities in file(1) and libmagic(3).
|
||||
[SA-14:16]
|
||||
|
||||
Fix gss_pseudo_random interoperability issue. [EN-14:08]
|
||||
|
||||
20140605: p15 FreeBSD-SA-14:14.openssl
|
||||
Fix OpenSSL multiple vulnerabilities. [SA-14:14]
|
||||
|
||||
20140603: p14 FreeBSD-SA-14:11.sendmail
|
||||
FreeBSD-SA-14:12.ktrace
|
||||
FreeBSD-SA-14:13.pam
|
||||
FreeBSD-EN-14:06.exec
|
||||
|
||||
Fix sendmail improper close-on-exec flag handling. [SA-14:11]
|
||||
|
||||
Fix ktrace memory disclosure. [SA-14:12]
|
||||
|
||||
Fix incorrect error handling in PAM policy parser. [SA-14:13]
|
||||
|
||||
Fix triple-fault when executing from a threaded process.
|
||||
[EN-14:06]
|
||||
|
||||
20140513: p13 FreeBSD-EN-14:03.pkg
|
||||
FreeBSD-EN-14:04.kldxref
|
||||
FreeBSD-EN-14:05.ciss
|
||||
|
||||
Add pkg bootstrapping, configuration and public keys. [EN-14:03]
|
||||
|
||||
Improve build repeatability for kldxref(8). [EN-14:04]
|
||||
|
||||
Fix data corruption with ciss(4). [EN-14:05]
|
||||
|
||||
20140430: p12 FreeBSD-SA-14:08.tcp
|
||||
|
||||
Fix TCP reassembly vulnerability. [SA-14:08]
|
||||
|
||||
20140408: p11 FreeBSD-SA-14:05.nfsserver
|
||||
FreeBSD-SA-14:06.openssl
|
||||
Fix deadlock in the NFS server. [SA-14:05]
|
||||
|
||||
Fix for ECDSA Cache Side-channel Attack in OpenSSL. [SA-14:06]
|
||||
|
||||
20140114: p10 FreeBSD-SA-14:01.bsnmpd
|
||||
FreeBSD-SA-14:02.ntpd
|
||||
FreeBSD-SA-14:04.bind
|
||||
FreeBSD-EN-14:01.random
|
||||
FreeBSD-EN-14:02.mmap
|
||||
Fix bsnmpd remote denial of service vulnerability. [SA-14:01]
|
||||
|
||||
Fix ntpd distributed reflection Denial of Service
|
||||
vulnerability. [SA-14:02]
|
||||
|
||||
Fix BIND remote denial of service vulnerability. [SA-14:04]
|
||||
|
||||
Disable hardware RNGs by default. [EN-14:01]
|
||||
|
||||
Fix incorrect coalescing of stack entry with mmap. [EN-14:02]
|
||||
|
||||
20131128: p9 FreeBSD-EN-13:05.freebsd-update
|
||||
Fix error in patch for FreeBSD-EN-13:04.freebsd-update.
|
||||
|
||||
20131026: p8 FreeBSD-EN-13:04.freebsd-update
|
||||
Fix multiple freebsd-update bugs that break upgrading to
|
||||
FreeBSD 10.0.
|
||||
|
||||
20130910: p7 FreeBSD-SA-13:12.ifioctl
|
||||
FreeBSD-SA-13:13.nullfs
|
||||
|
||||
In IPv6 and NetATM, stop SIOCSIFADDR, SIOCSIFBRDADDR,
|
||||
SIOCSIFDSTADDR and SIOCSIFNETMASK at the socket layer rather
|
||||
than pass them on to the link layer without validation or
|
||||
credential checks. [SA-13:12]
|
||||
|
||||
Prevent cross-mount hardlinks between different nullfs mounts
|
||||
of the same underlying filesystem. [SA-13:13]
|
||||
|
||||
20130822: p6 FreeBSD-SA-13:09.ip_multicast
|
||||
FreeBSD-SA-13:10.sctp
|
||||
FreeBSD-EN-13:03.mfi
|
||||
Fix an integer overflow in computing the size of a temporary buffer
|
||||
can result in a buffer which is too small for the requested
|
||||
operation. [13:09]
|
||||
|
||||
Fix a bug that could lead to kernel memory disclosure with
|
||||
SCTP state cookie. [13:10]
|
||||
|
||||
Fix a data corruption problem with mfi(4) operating on > 2TB
|
||||
disks in a JBOD. [EN-13:03]
|
||||
|
||||
20130726: p5 FreeBSD-SA-13:07.bind FreeBSD-SA-13:08.nfsserver
|
||||
Fix Denial of Service vulnerability in named(8). [13:07]
|
||||
|
||||
Fix a bug that allows remote client bypass the normal
|
||||
access checks when when -network or -host restrictions are
|
||||
used at the same time with -mapall. [13:08]
|
||||
|
||||
20130618: p4 FreeBSD-SA-13:06.mmap
|
||||
Fix a bug that allowed a tracing process (e.g. gdb) to write
|
||||
to a memory-mapped file in the traced process's address space
|
||||
even if neither the traced process nor the tracing process had
|
||||
write access to that file.
|
||||
|
||||
20130429: p3 FreeBSD-SA-13:05.nfsserver
|
||||
Fix a bug that allows NFS clients to issue READDIR on files.
|
||||
|
||||
20130402: p2 FreeBSD-SA-13:03.openssl FreeBSD-SA-13:04.bind
|
||||
Fix multiple vulnerabilities in OpenSSL.
|
||||
|
||||
Fix Denial of Service vulnerability in named(8).
|
||||
|
||||
20130218: p1 FreeBSD-SA-13:01.bind FreeBSD-SA-13:02.libc
|
||||
Fix Denial of Service vulnerability in named(8) with DNS64.
|
||||
|
||||
Fix Denial of Service vulnerability in libc's glob(3) functionality.
|
||||
|
||||
20121205:
|
||||
9.1-RELEASE.
|
||||
|
||||
20120727:
|
||||
The sparc64 ZFS loader has been changed to no longer try to auto-
|
||||
detect ZFS providers based on diskN aliases but now requires these
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd November 26, 2011
|
||||
.Dd August 12, 2012
|
||||
.Dt ZFS 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -2241,7 +2241,7 @@ properties, and current snapshot and file system names are set when the stream
|
||||
is received. If the
|
||||
.Fl F
|
||||
flag is specified when this stream is received, snapshots and file systems that
|
||||
do not exist on the sending side are destroyed.
|
||||
do not exist on the sending side are destroyed.
|
||||
.It Fl D
|
||||
Generate a deduplicated stream. Blocks which would have been sent multiple
|
||||
times in the send stream will only be sent once. The receiving system must
|
||||
@@ -3021,9 +3021,9 @@ a new snapshot, as follows:
|
||||
.Li # Ic zfs destroy -r pool/users@7daysago
|
||||
.Li # Ic zfs rename -r pool/users@6daysago @7daysago
|
||||
.Li # Ic zfs rename -r pool/users@5daysago @6daysago
|
||||
.Li # Ic zfs rename -r pool/users@yesterday @5daysago
|
||||
.Li # Ic zfs rename -r pool/users@yesterday @4daysago
|
||||
.Li # Ic zfs rename -r pool/users@yesterday @3daysago
|
||||
.Li # Ic zfs rename -r pool/users@4daysago @5daysago
|
||||
.Li # Ic zfs rename -r pool/users@3daysago @4daysago
|
||||
.Li # Ic zfs rename -r pool/users@2daysago @3daysago
|
||||
.Li # Ic zfs rename -r pool/users@yesterday @2daysago
|
||||
.Li # Ic zfs rename -r pool/users@today @yesterday
|
||||
.Li # Ic zfs snapshot -r pool/users@today
|
||||
|
||||
@@ -1,3 +1,26 @@
|
||||
4006. [security] A flaw in delegation handling could be exploited
|
||||
to put named into an infinite loop. This has
|
||||
been addressed by placing limits on the number
|
||||
of levels of recursion named will allow (default 7),
|
||||
and the number of iterative queries that it will
|
||||
send (default 50) before terminating a recursive
|
||||
query (CVE-2014-8500).
|
||||
|
||||
The recursion depth limit is configured via the
|
||||
"max-recursion-depth" option, and the query limit
|
||||
via the "max-recursion-queries" option. [RT #37580]
|
||||
|
||||
--- 9.8.3-P4 released ---
|
||||
|
||||
3383. [security] A certain combination of records in the RBT could
|
||||
cause named to hang while populating the additional
|
||||
section of a response. [RT #31090]
|
||||
|
||||
--- 9.8.3-P3 released ---
|
||||
|
||||
3364. [security] Named could die on specially crafted record.
|
||||
[RT #30416]
|
||||
|
||||
--- 9.8.3-P2 released ---
|
||||
|
||||
3346. [security] Bad-cache data could be used before it was
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: config.c,v 1.113.16.2 2011/02/28 01:19:58 tbox Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
@@ -158,6 +156,8 @@ options {\n\
|
||||
dnssec-accept-expired no;\n\
|
||||
clients-per-query 10;\n\
|
||||
max-clients-per-query 100;\n\
|
||||
max-recursion-depth 7;\n\
|
||||
max-recursion-queries 50;\n\
|
||||
zero-no-soa-ttl-cache no;\n\
|
||||
nsec3-test-zone no;\n\
|
||||
allow-new-zones no;\n\
|
||||
|
||||
@@ -1119,13 +1119,6 @@ query_isduplicate(ns_client_t *client, dns_name_t *name,
|
||||
mname = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the dns_name_t we're looking up is already in the message,
|
||||
* we don't want to trigger the caller's name replacement logic.
|
||||
*/
|
||||
if (name == mname)
|
||||
mname = NULL;
|
||||
|
||||
if (mnamep != NULL)
|
||||
*mnamep = mname;
|
||||
|
||||
@@ -1324,6 +1317,7 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
|
||||
if (dns_rdataset_isassociated(rdataset) &&
|
||||
!query_isduplicate(client, fname, type, &mname)) {
|
||||
if (mname != NULL) {
|
||||
INSIST(mname != fname);
|
||||
query_releasename(client, &fname);
|
||||
fname = mname;
|
||||
} else
|
||||
@@ -1393,11 +1387,13 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
|
||||
#endif
|
||||
if (!query_isduplicate(client, fname,
|
||||
dns_rdatatype_a, &mname)) {
|
||||
if (mname != NULL) {
|
||||
query_releasename(client, &fname);
|
||||
fname = mname;
|
||||
} else
|
||||
need_addname = ISC_TRUE;
|
||||
if (mname != fname) {
|
||||
if (mname != NULL) {
|
||||
query_releasename(client, &fname);
|
||||
fname = mname;
|
||||
} else
|
||||
need_addname = ISC_TRUE;
|
||||
}
|
||||
ISC_LIST_APPEND(fname->list, rdataset, link);
|
||||
added_something = ISC_TRUE;
|
||||
if (sigrdataset != NULL &&
|
||||
@@ -1450,11 +1446,13 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
|
||||
#endif
|
||||
if (!query_isduplicate(client, fname,
|
||||
dns_rdatatype_aaaa, &mname)) {
|
||||
if (mname != NULL) {
|
||||
query_releasename(client, &fname);
|
||||
fname = mname;
|
||||
} else
|
||||
need_addname = ISC_TRUE;
|
||||
if (mname != fname) {
|
||||
if (mname != NULL) {
|
||||
query_releasename(client, &fname);
|
||||
fname = mname;
|
||||
} else
|
||||
need_addname = ISC_TRUE;
|
||||
}
|
||||
ISC_LIST_APPEND(fname->list, rdataset, link);
|
||||
added_something = ISC_TRUE;
|
||||
if (sigrdataset != NULL &&
|
||||
@@ -1977,22 +1975,24 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
|
||||
crdataset->type == dns_rdatatype_aaaa) {
|
||||
if (!query_isduplicate(client, fname, crdataset->type,
|
||||
&mname)) {
|
||||
if (mname != NULL) {
|
||||
/*
|
||||
* A different type of this name is
|
||||
* already stored in the additional
|
||||
* section. We'll reuse the name.
|
||||
* Note that this should happen at most
|
||||
* once. Otherwise, fname->link could
|
||||
* leak below.
|
||||
*/
|
||||
INSIST(mname0 == NULL);
|
||||
if (mname != fname) {
|
||||
if (mname != NULL) {
|
||||
/*
|
||||
* A different type of this name is
|
||||
* already stored in the additional
|
||||
* section. We'll reuse the name.
|
||||
* Note that this should happen at most
|
||||
* once. Otherwise, fname->link could
|
||||
* leak below.
|
||||
*/
|
||||
INSIST(mname0 == NULL);
|
||||
|
||||
query_releasename(client, &fname);
|
||||
fname = mname;
|
||||
mname0 = mname;
|
||||
} else
|
||||
need_addname = ISC_TRUE;
|
||||
query_releasename(client, &fname);
|
||||
fname = mname;
|
||||
mname0 = mname;
|
||||
} else
|
||||
need_addname = ISC_TRUE;
|
||||
}
|
||||
ISC_LIST_UNLINK(cfname.list, crdataset, link);
|
||||
ISC_LIST_APPEND(fname->list, crdataset, link);
|
||||
added_something = ISC_TRUE;
|
||||
@@ -3761,12 +3761,11 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname,
|
||||
peeraddr = &client->peeraddr;
|
||||
else
|
||||
peeraddr = NULL;
|
||||
result = dns_resolver_createfetch2(client->view->resolver,
|
||||
result = dns_resolver_createfetch3(client->view->resolver,
|
||||
qname, qtype, qdomain, nameservers,
|
||||
NULL, peeraddr, client->message->id,
|
||||
client->query.fetchoptions,
|
||||
client->task,
|
||||
query_resume, client,
|
||||
client->query.fetchoptions, 0, NULL,
|
||||
client->task, query_resume, client,
|
||||
rdataset, sigrdataset,
|
||||
&client->query.fetch);
|
||||
|
||||
@@ -5022,8 +5021,7 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db,
|
||||
dns_fixedname_t fixed;
|
||||
dns_hash_t hash;
|
||||
dns_name_t name;
|
||||
int order;
|
||||
unsigned int count;
|
||||
unsigned int skip = 0, labels;
|
||||
dns_rdata_nsec3_t nsec3;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
isc_boolean_t optout;
|
||||
@@ -5036,6 +5034,7 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db,
|
||||
|
||||
dns_name_init(&name, NULL);
|
||||
dns_name_clone(qname, &name);
|
||||
labels = dns_name_countlabels(&name);
|
||||
|
||||
/*
|
||||
* Map unknown algorithm to known value.
|
||||
@@ -5067,13 +5066,14 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db,
|
||||
dns_rdata_reset(&rdata);
|
||||
optout = ISC_TF((nsec3.flags & DNS_NSEC3FLAG_OPTOUT) != 0);
|
||||
if (found != NULL && optout &&
|
||||
dns_name_fullcompare(&name, dns_db_origin(db), &order,
|
||||
&count) == dns_namereln_subdomain) {
|
||||
dns_name_issubdomain(&name, dns_db_origin(db)))
|
||||
{
|
||||
dns_rdataset_disassociate(rdataset);
|
||||
if (dns_rdataset_isassociated(sigrdataset))
|
||||
dns_rdataset_disassociate(sigrdataset);
|
||||
count = dns_name_countlabels(&name) - 1;
|
||||
dns_name_getlabelsequence(&name, 1, count, &name);
|
||||
skip++;
|
||||
dns_name_getlabelsequence(qname, skip, labels - skip,
|
||||
&name);
|
||||
ns_client_log(client, DNS_LOGCATEGORY_DNSSEC,
|
||||
NS_LOGMODULE_QUERY, ISC_LOG_DEBUG(3),
|
||||
"looking for closest provable encloser");
|
||||
@@ -5091,7 +5091,11 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db,
|
||||
ns_client_log(client, DNS_LOGCATEGORY_DNSSEC,
|
||||
NS_LOGMODULE_QUERY, ISC_LOG_WARNING,
|
||||
"expected covering NSEC3, got an exact match");
|
||||
if (found != NULL)
|
||||
if (found == qname) {
|
||||
if (skip != 0U)
|
||||
dns_name_getlabelsequence(qname, skip, labels - skip,
|
||||
found);
|
||||
} else if (found != NULL)
|
||||
dns_name_copy(&name, found, NULL);
|
||||
return;
|
||||
}
|
||||
@@ -5117,10 +5121,12 @@ dns64_ttl(dns_db_t *db, dns_dbversion_t *version) {
|
||||
isc_result_t result;
|
||||
isc_uint32_t ttl = ISC_UINT32_MAX;
|
||||
|
||||
dns_rdataset_init(&rdataset);
|
||||
|
||||
result = dns_db_getoriginnode(db, &node);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
dns_rdataset_init(&rdataset);
|
||||
|
||||
result = dns_db_findrdataset(db, node, version, dns_rdatatype_soa,
|
||||
0, 0, &rdataset, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
|
||||
@@ -2566,6 +2566,16 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
|
||||
cfg_obj_asuint32(obj),
|
||||
max_clients_per_query);
|
||||
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "max-recursion-depth", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
dns_resolver_setmaxdepth(view->resolver, cfg_obj_asuint32(obj));
|
||||
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "max-recursion-queries", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
dns_resolver_setmaxqueries(view->resolver, cfg_obj_asuint32(obj));
|
||||
|
||||
#ifdef ALLOW_FILTER_AAAA_ON_V4
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "filter-aaaa-on-v4", &obj);
|
||||
|
||||
+33
-12
@@ -200,6 +200,7 @@ struct dns_adbfetch {
|
||||
unsigned int magic;
|
||||
dns_fetch_t *fetch;
|
||||
dns_rdataset_t rdataset;
|
||||
unsigned int depth;
|
||||
};
|
||||
|
||||
/*%
|
||||
@@ -299,8 +300,7 @@ static inline isc_boolean_t dec_entry_refcnt(dns_adb_t *, isc_boolean_t,
|
||||
static inline void violate_locking_hierarchy(isc_mutex_t *, isc_mutex_t *);
|
||||
static isc_boolean_t clean_namehooks(dns_adb_t *, dns_adbnamehooklist_t *);
|
||||
static void clean_target(dns_adb_t *, dns_name_t *);
|
||||
static void clean_finds_at_name(dns_adbname_t *, isc_eventtype_t,
|
||||
unsigned int);
|
||||
static void clean_finds_at_name(dns_adbname_t *, isc_eventtype_t, unsigned int);
|
||||
static isc_boolean_t check_expire_namehooks(dns_adbname_t *, isc_stdtime_t);
|
||||
static isc_boolean_t check_expire_entry(dns_adb_t *, dns_adbentry_t **,
|
||||
isc_stdtime_t);
|
||||
@@ -308,6 +308,7 @@ static void cancel_fetches_at_name(dns_adbname_t *);
|
||||
static isc_result_t dbfind_name(dns_adbname_t *, isc_stdtime_t,
|
||||
dns_rdatatype_t);
|
||||
static isc_result_t fetch_name(dns_adbname_t *, isc_boolean_t,
|
||||
unsigned int, isc_counter_t *qc,
|
||||
dns_rdatatype_t);
|
||||
static inline void check_exit(dns_adb_t *);
|
||||
static void destroy(dns_adb_t *);
|
||||
@@ -2742,6 +2743,19 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
||||
dns_rdatatype_t qtype, unsigned int options,
|
||||
isc_stdtime_t now, dns_name_t *target,
|
||||
in_port_t port, dns_adbfind_t **findp)
|
||||
{
|
||||
return (dns_adb_createfind2(adb, task, action, arg, name,
|
||||
qname, qtype, options, now,
|
||||
target, port, 0, NULL, findp));
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
||||
void *arg, dns_name_t *name, dns_name_t *qname,
|
||||
dns_rdatatype_t qtype, unsigned int options,
|
||||
isc_stdtime_t now, dns_name_t *target,
|
||||
in_port_t port, unsigned int depth, isc_counter_t *qc,
|
||||
dns_adbfind_t **findp)
|
||||
{
|
||||
dns_adbfind_t *find;
|
||||
dns_adbname_t *adbname;
|
||||
@@ -2973,7 +2987,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
||||
* Start V4.
|
||||
*/
|
||||
if (WANT_INET(wanted_fetches) &&
|
||||
fetch_name(adbname, start_at_zone,
|
||||
fetch_name(adbname, start_at_zone, depth, qc,
|
||||
dns_rdatatype_a) == ISC_R_SUCCESS) {
|
||||
DP(DEF_LEVEL,
|
||||
"dns_adb_createfind: started A fetch for name %p",
|
||||
@@ -2984,7 +2998,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
||||
* Start V6.
|
||||
*/
|
||||
if (WANT_INET6(wanted_fetches) &&
|
||||
fetch_name(adbname, start_at_zone,
|
||||
fetch_name(adbname, start_at_zone, depth, qc,
|
||||
dns_rdatatype_aaaa) == ISC_R_SUCCESS) {
|
||||
DP(DEF_LEVEL,
|
||||
"dns_adb_createfind: "
|
||||
@@ -3727,6 +3741,12 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
|
||||
DP(DEF_LEVEL, "adb: fetch of '%s' %s failed: %s",
|
||||
buf, address_type == DNS_ADBFIND_INET ? "A" : "AAAA",
|
||||
dns_result_totext(dev->result));
|
||||
/*
|
||||
* Don't record a failure unless this is the initial
|
||||
* fetch of a chain.
|
||||
*/
|
||||
if (fetch->depth > 1)
|
||||
goto out;
|
||||
/* XXXMLG Don't pound on bad servers. */
|
||||
if (address_type == DNS_ADBFIND_INET) {
|
||||
name->expire_v4 = ISC_MIN(name->expire_v4, now + 300);
|
||||
@@ -3764,9 +3784,8 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
fetch_name(dns_adbname_t *adbname,
|
||||
isc_boolean_t start_at_zone,
|
||||
dns_rdatatype_t type)
|
||||
fetch_name(dns_adbname_t *adbname, isc_boolean_t start_at_zone,
|
||||
unsigned int depth, isc_counter_t *qc, dns_rdatatype_t type)
|
||||
{
|
||||
isc_result_t result;
|
||||
dns_adbfetch_t *fetch = NULL;
|
||||
@@ -3811,12 +3830,14 @@ fetch_name(dns_adbname_t *adbname,
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
fetch->depth = depth;
|
||||
|
||||
result = dns_resolver_createfetch(adb->view->resolver, &adbname->name,
|
||||
type, name, nameservers, NULL,
|
||||
options, adb->task, fetch_callback,
|
||||
adbname, &fetch->rdataset, NULL,
|
||||
&fetch->fetch);
|
||||
result = dns_resolver_createfetch3(adb->view->resolver, &adbname->name,
|
||||
type, name, nameservers, NULL,
|
||||
NULL, 0, options, depth, qc,
|
||||
adb->task, fetch_callback, adbname,
|
||||
&fetch->rdataset, NULL,
|
||||
&fetch->fetch);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
|
||||
|
||||
@@ -334,6 +334,13 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
||||
dns_rdatatype_t qtype, unsigned int options,
|
||||
isc_stdtime_t now, dns_name_t *target,
|
||||
in_port_t port, dns_adbfind_t **find);
|
||||
isc_result_t
|
||||
dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
||||
void *arg, dns_name_t *name, dns_name_t *qname,
|
||||
dns_rdatatype_t qtype, unsigned int options,
|
||||
isc_stdtime_t now, dns_name_t *target, in_port_t port,
|
||||
unsigned int depth, isc_counter_t *qc,
|
||||
dns_adbfind_t **find);
|
||||
/*%<
|
||||
* Main interface for clients. The adb will look up the name given in
|
||||
* "name" and will build up a list of found addresses, and perhaps start
|
||||
|
||||
@@ -146,6 +146,17 @@ struct dns_rdata {
|
||||
#define DNS_RDATA_VALIDFLAGS(rdata) \
|
||||
(((rdata)->flags & ~(DNS_RDATA_UPDATE|DNS_RDATA_OFFLINE)) == 0)
|
||||
|
||||
/*
|
||||
* The maximum length of a RDATA that can be sent on the wire.
|
||||
* Max packet size (65535) less header (12), less name (1), type (2),
|
||||
* class (2), ttl(4), length (2).
|
||||
*
|
||||
* None of the defined types that support name compression can exceed
|
||||
* this and all new types are to be sent uncompressed.
|
||||
*/
|
||||
|
||||
#define DNS_RDATA_MAXLENGTH 65512U
|
||||
|
||||
/*
|
||||
* Flags affecting rdata formatting style. Flags 0xFFFF0000
|
||||
* are used by masterfile-level formatting and defined elsewhere.
|
||||
|
||||
@@ -271,6 +271,18 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
|
||||
dns_rdataset_t *rdataset,
|
||||
dns_rdataset_t *sigrdataset,
|
||||
dns_fetch_t **fetchp);
|
||||
isc_result_t
|
||||
dns_resolver_createfetch3(dns_resolver_t *res, dns_name_t *name,
|
||||
dns_rdatatype_t type,
|
||||
dns_name_t *domain, dns_rdataset_t *nameservers,
|
||||
dns_forwarders_t *forwarders,
|
||||
isc_sockaddr_t *client, isc_uint16_t id,
|
||||
unsigned int options, unsigned int depth,
|
||||
isc_counter_t *qc, isc_task_t *task,
|
||||
isc_taskaction_t action, void *arg,
|
||||
dns_rdataset_t *rdataset,
|
||||
dns_rdataset_t *sigrdataset,
|
||||
dns_fetch_t **fetchp);
|
||||
/*%<
|
||||
* Recurse to answer a question.
|
||||
*
|
||||
@@ -572,6 +584,30 @@ dns_resolver_printbadcache(dns_resolver_t *resolver, FILE *fp);
|
||||
* \li resolver to be valid.
|
||||
*/
|
||||
|
||||
void
|
||||
dns_resolver_setmaxdepth(dns_resolver_t *resolver, unsigned int maxdepth);
|
||||
unsigned int
|
||||
dns_resolver_getmaxdepth(dns_resolver_t *resolver);
|
||||
/*%
|
||||
* Get and set how many NS indirections will be followed when looking for
|
||||
* nameserver addresses.
|
||||
*
|
||||
* Requires:
|
||||
* \li resolver to be valid.
|
||||
*/
|
||||
|
||||
void
|
||||
dns_resolver_setmaxqueries(dns_resolver_t *resolver, unsigned int queries);
|
||||
unsigned int
|
||||
dns_resolver_getmaxqueries(dns_resolver_t *resolver);
|
||||
/*%
|
||||
* Get and set how many iterative queries will be allowed before
|
||||
* terminating a recursive query.
|
||||
*
|
||||
* Requires:
|
||||
* \li resolver to be valid.
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_RESOLVER_H */
|
||||
@@ -75,7 +75,7 @@
|
||||
/*%
|
||||
* max message size - header - root - type - class - ttl - rdlen
|
||||
*/
|
||||
#define MINTSIZ (65535 - 12 - 1 - 2 - 2 - 4 - 2)
|
||||
#define MINTSIZ DNS_RDATA_MAXLENGTH
|
||||
/*%
|
||||
* Size for tokens in the presentation format,
|
||||
* The largest tokens are the base64 blocks in KEY and CERT records,
|
||||
|
||||
@@ -429,6 +429,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
||||
isc_buffer_t st;
|
||||
isc_boolean_t use_default = ISC_FALSE;
|
||||
isc_uint32_t activelength;
|
||||
size_t length;
|
||||
|
||||
REQUIRE(dctx != NULL);
|
||||
if (rdata != NULL) {
|
||||
@@ -458,6 +459,14 @@ dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Reject any rdata that expands out to more than DNS_RDATA_MAXLENGTH
|
||||
* as we cannot transmit it.
|
||||
*/
|
||||
length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st);
|
||||
if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH)
|
||||
result = DNS_R_FORMERR;
|
||||
|
||||
/*
|
||||
* We should have consumed all of our buffer.
|
||||
*/
|
||||
@@ -466,8 +475,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
||||
|
||||
if (rdata != NULL && result == ISC_R_SUCCESS) {
|
||||
region.base = isc_buffer_used(&st);
|
||||
region.length = isc_buffer_usedlength(target) -
|
||||
isc_buffer_usedlength(&st);
|
||||
region.length = length;
|
||||
dns_rdata_fromregion(rdata, rdclass, type, ®ion);
|
||||
}
|
||||
|
||||
@@ -602,6 +610,7 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
||||
unsigned long line;
|
||||
void (*callback)(dns_rdatacallbacks_t *, const char *, ...);
|
||||
isc_result_t tresult;
|
||||
size_t length;
|
||||
|
||||
REQUIRE(origin == NULL || dns_name_isabsolute(origin) == ISC_TRUE);
|
||||
if (rdata != NULL) {
|
||||
@@ -673,10 +682,13 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
||||
}
|
||||
} while (1);
|
||||
|
||||
length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st);
|
||||
if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH)
|
||||
result = ISC_R_NOSPACE;
|
||||
|
||||
if (rdata != NULL && result == ISC_R_SUCCESS) {
|
||||
region.base = isc_buffer_used(&st);
|
||||
region.length = isc_buffer_usedlength(target) -
|
||||
isc_buffer_usedlength(&st);
|
||||
region.length = length;
|
||||
dns_rdata_fromregion(rdata, rdclass, type, ®ion);
|
||||
}
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
@@ -804,6 +816,7 @@ dns_rdata_fromstruct(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
||||
isc_buffer_t st;
|
||||
isc_region_t region;
|
||||
isc_boolean_t use_default = ISC_FALSE;
|
||||
size_t length;
|
||||
|
||||
REQUIRE(source != NULL);
|
||||
if (rdata != NULL) {
|
||||
@@ -818,10 +831,13 @@ dns_rdata_fromstruct(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
||||
if (use_default)
|
||||
(void)NULL;
|
||||
|
||||
length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st);
|
||||
if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH)
|
||||
result = ISC_R_NOSPACE;
|
||||
|
||||
if (rdata != NULL && result == ISC_R_SUCCESS) {
|
||||
region.base = isc_buffer_used(&st);
|
||||
region.length = isc_buffer_usedlength(target) -
|
||||
isc_buffer_usedlength(&st);
|
||||
region.length = length;
|
||||
dns_rdata_fromregion(rdata, rdclass, type, ®ion);
|
||||
}
|
||||
if (result != ISC_R_SUCCESS)
|
||||
|
||||
@@ -176,7 +176,7 @@ fromwire_keydata(ARGS_FROMWIRE) {
|
||||
UNUSED(options);
|
||||
|
||||
isc_buffer_activeregion(source, &sr);
|
||||
if (sr.length < 4)
|
||||
if (sr.length < 16)
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
|
||||
isc_buffer_forward(source, sr.length);
|
||||
|
||||
@@ -305,6 +305,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
|
||||
length = x[i].rdata.length;
|
||||
if (rdataset->type == dns_rdatatype_rrsig)
|
||||
length++;
|
||||
INSIST(length <= 0xffff);
|
||||
*rawbuf++ = (length & 0xff00) >> 8;
|
||||
*rawbuf++ = (length & 0x00ff);
|
||||
#if DNS_RDATASET_FIXED
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <isc/counter.h>
|
||||
#include <isc/platform.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/string.h>
|
||||
@@ -113,6 +114,16 @@
|
||||
#define MAXIMUM_QUERY_TIMEOUT 30 /* The maximum time in seconds for the whole query to live. */
|
||||
#endif
|
||||
|
||||
/* The default maximum number of recursions to follow before giving up. */
|
||||
#ifndef DEFAULT_RECURSION_DEPTH
|
||||
#define DEFAULT_RECURSION_DEPTH 7
|
||||
#endif
|
||||
|
||||
/* The default maximum number of iterative queries to allow before giving up. */
|
||||
#ifndef DEFAULT_MAX_QUERIES
|
||||
#define DEFAULT_MAX_QUERIES 50
|
||||
#endif
|
||||
|
||||
/*%
|
||||
* Maximum EDNS0 input packet size.
|
||||
*/
|
||||
@@ -214,12 +225,13 @@ struct fetchctx {
|
||||
isc_sockaddrlist_t edns;
|
||||
isc_sockaddrlist_t edns512;
|
||||
isc_sockaddrlist_t bad_edns;
|
||||
dns_validator_t *validator;
|
||||
dns_validator_t * validator;
|
||||
ISC_LIST(dns_validator_t) validators;
|
||||
dns_db_t * cache;
|
||||
dns_adb_t * adb;
|
||||
isc_boolean_t ns_ttl_ok;
|
||||
isc_uint32_t ns_ttl;
|
||||
isc_counter_t * qc;
|
||||
|
||||
/*%
|
||||
* The number of events we're waiting for.
|
||||
@@ -287,6 +299,7 @@ struct fetchctx {
|
||||
isc_boolean_t timeout;
|
||||
dns_adbaddrinfo_t *addrinfo;
|
||||
isc_sockaddr_t *client;
|
||||
unsigned int depth;
|
||||
};
|
||||
|
||||
#define FCTX_MAGIC ISC_MAGIC('F', '!', '!', '!')
|
||||
@@ -399,6 +412,8 @@ struct dns_resolver {
|
||||
isc_timer_t * spillattimer;
|
||||
isc_boolean_t zero_no_soa_ttl;
|
||||
unsigned int query_timeout;
|
||||
unsigned int maxdepth;
|
||||
unsigned int maxqueries;
|
||||
|
||||
/* Locked by lock. */
|
||||
unsigned int references;
|
||||
@@ -1545,6 +1560,7 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_dispatch;
|
||||
}
|
||||
|
||||
fctx->querysent++;
|
||||
|
||||
ISC_LIST_APPEND(fctx->queries, query, link);
|
||||
@@ -2186,9 +2202,9 @@ fctx_finddone(isc_task_t *task, isc_event_t *event) {
|
||||
*/
|
||||
INSIST(!SHUTTINGDOWN(fctx));
|
||||
fctx->attributes &= ~FCTX_ATTR_ADDRWAIT;
|
||||
if (event->ev_type == DNS_EVENT_ADBMOREADDRESSES)
|
||||
if (event->ev_type == DNS_EVENT_ADBMOREADDRESSES) {
|
||||
want_try = ISC_TRUE;
|
||||
else {
|
||||
} else {
|
||||
fctx->findfail++;
|
||||
if (fctx->pending == 0) {
|
||||
/*
|
||||
@@ -2217,7 +2233,7 @@ fctx_finddone(isc_task_t *task, isc_event_t *event) {
|
||||
else if (want_done)
|
||||
fctx_done(fctx, ISC_R_FAILURE, __LINE__);
|
||||
else if (destroy) {
|
||||
fctx_destroy(fctx);
|
||||
fctx_destroy(fctx);
|
||||
if (bucket_empty)
|
||||
empty_bucket(res);
|
||||
}
|
||||
@@ -2471,12 +2487,13 @@ findname(fetchctx_t *fctx, dns_name_t *name, in_port_t port,
|
||||
* See what we know about this address.
|
||||
*/
|
||||
find = NULL;
|
||||
result = dns_adb_createfind(fctx->adb,
|
||||
res->buckets[fctx->bucketnum].task,
|
||||
fctx_finddone, fctx, name,
|
||||
&fctx->name, fctx->type,
|
||||
options, now, NULL,
|
||||
res->view->dstport, &find);
|
||||
result = dns_adb_createfind2(fctx->adb,
|
||||
res->buckets[fctx->bucketnum].task,
|
||||
fctx_finddone, fctx, name,
|
||||
&fctx->name, fctx->type,
|
||||
options, now, NULL,
|
||||
res->view->dstport,
|
||||
fctx->depth + 1, fctx->qc, &find);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result == DNS_R_ALIAS) {
|
||||
/*
|
||||
@@ -2584,6 +2601,14 @@ fctx_getaddresses(fetchctx_t *fctx, isc_boolean_t badcache) {
|
||||
|
||||
res = fctx->res;
|
||||
|
||||
if (fctx->depth > res->maxdepth) {
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
|
||||
DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3),
|
||||
"too much NS indirection resolving '%s'",
|
||||
fctx->info);
|
||||
return (DNS_R_SERVFAIL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Forwarders.
|
||||
*/
|
||||
@@ -3059,6 +3084,16 @@ fctx_try(fetchctx_t *fctx, isc_boolean_t retrying, isc_boolean_t badcache) {
|
||||
}
|
||||
}
|
||||
|
||||
result = isc_counter_increment(fctx->qc);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
|
||||
DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3),
|
||||
"exceeded max queries resolving '%s'",
|
||||
fctx->info);
|
||||
fctx_done(fctx, DNS_R_SERVFAIL, __LINE__);
|
||||
return;
|
||||
}
|
||||
|
||||
result = fctx_query(fctx, addrinfo, fctx->options);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fctx_done(fctx, result, __LINE__);
|
||||
@@ -3157,6 +3192,7 @@ fctx_destroy(fetchctx_t *fctx) {
|
||||
isc_mem_put(fctx->mctx, sa, sizeof(*sa));
|
||||
}
|
||||
|
||||
isc_counter_detach(&fctx->qc);
|
||||
isc_timer_detach(&fctx->timer);
|
||||
dns_message_destroy(&fctx->rmessage);
|
||||
dns_message_destroy(&fctx->qmessage);
|
||||
@@ -3485,7 +3521,8 @@ log_ns_ttl(fetchctx_t *fctx, const char *where) {
|
||||
static isc_result_t
|
||||
fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
|
||||
dns_name_t *domain, dns_rdataset_t *nameservers,
|
||||
unsigned int options, unsigned int bucketnum, fetchctx_t **fctxp)
|
||||
unsigned int options, unsigned int bucketnum, unsigned int depth,
|
||||
isc_counter_t *qc, fetchctx_t **fctxp)
|
||||
{
|
||||
fetchctx_t *fctx;
|
||||
isc_result_t result;
|
||||
@@ -3507,6 +3544,21 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
|
||||
fctx = isc_mem_get(mctx, sizeof(*fctx));
|
||||
if (fctx == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
fctx->qc = NULL;
|
||||
if (qc != NULL) {
|
||||
isc_counter_attach(qc, &fctx->qc);
|
||||
} else {
|
||||
result = isc_counter_create(res->mctx,
|
||||
res->maxqueries, &fctx->qc);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_fetch;
|
||||
}
|
||||
|
||||
/*
|
||||
* Make fctx->info point to a copy of a formatted string
|
||||
* "name/type".
|
||||
*/
|
||||
dns_name_format(name, buf, sizeof(buf));
|
||||
dns_rdatatype_format(type, typebuf, sizeof(typebuf));
|
||||
strcat(buf, "/"); /* checked */
|
||||
@@ -3514,7 +3566,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
|
||||
fctx->info = isc_mem_strdup(mctx, buf);
|
||||
if (fctx->info == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup_fetch;
|
||||
goto cleanup_counter;
|
||||
}
|
||||
FCTXTRACE("create");
|
||||
dns_name_init(&fctx->name, NULL);
|
||||
@@ -3537,6 +3589,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
|
||||
fctx->state = fetchstate_init;
|
||||
fctx->want_shutdown = ISC_FALSE;
|
||||
fctx->cloned = ISC_FALSE;
|
||||
fctx->depth = depth;
|
||||
ISC_LIST_INIT(fctx->queries);
|
||||
ISC_LIST_INIT(fctx->finds);
|
||||
ISC_LIST_INIT(fctx->altfinds);
|
||||
@@ -3742,6 +3795,9 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
|
||||
cleanup_info:
|
||||
isc_mem_free(mctx, fctx->info);
|
||||
|
||||
cleanup_counter:
|
||||
isc_counter_detach(&fctx->qc);
|
||||
|
||||
cleanup_fetch:
|
||||
isc_mem_put(mctx, fctx, sizeof(*fctx));
|
||||
|
||||
@@ -5453,7 +5509,7 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname,
|
||||
char qbuf[DNS_NAME_FORMATSIZE];
|
||||
char nbuf[DNS_NAME_FORMATSIZE];
|
||||
char tbuf[DNS_RDATATYPE_FORMATSIZE];
|
||||
dns_rdatatype_format(fctx->type, tbuf,
|
||||
dns_rdatatype_format(type, tbuf,
|
||||
sizeof(tbuf));
|
||||
dns_name_format(name, nbuf,
|
||||
sizeof(nbuf));
|
||||
@@ -5462,7 +5518,7 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname,
|
||||
log_formerr(fctx,
|
||||
"unrelated %s %s in "
|
||||
"%s authority section",
|
||||
tbuf, qbuf, nbuf);
|
||||
tbuf, nbuf, qbuf);
|
||||
return (DNS_R_FORMERR);
|
||||
}
|
||||
if (type == dns_rdatatype_ns) {
|
||||
@@ -7504,6 +7560,8 @@ dns_resolver_create(dns_view_t *view,
|
||||
res->query_timeout = DEFAULT_QUERY_TIMEOUT;
|
||||
res->ndisps = 0;
|
||||
res->nextdisp = 0; /* meaningless at this point, but init it */
|
||||
res->maxdepth = DEFAULT_RECURSION_DEPTH;
|
||||
res->maxqueries = DEFAULT_MAX_QUERIES;
|
||||
res->nbuckets = ntasks;
|
||||
res->activebuckets = ntasks;
|
||||
res->buckets = isc_mem_get(view->mctx,
|
||||
@@ -7943,9 +8001,9 @@ dns_resolver_createfetch(dns_resolver_t *res, dns_name_t *name,
|
||||
dns_rdataset_t *sigrdataset,
|
||||
dns_fetch_t **fetchp)
|
||||
{
|
||||
return (dns_resolver_createfetch2(res, name, type, domain,
|
||||
return (dns_resolver_createfetch3(res, name, type, domain,
|
||||
nameservers, forwarders, NULL, 0,
|
||||
options, task, action, arg,
|
||||
options, 0, NULL, task, action, arg,
|
||||
rdataset, sigrdataset, fetchp));
|
||||
}
|
||||
|
||||
@@ -7960,6 +8018,25 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
|
||||
dns_rdataset_t *rdataset,
|
||||
dns_rdataset_t *sigrdataset,
|
||||
dns_fetch_t **fetchp)
|
||||
{
|
||||
return (dns_resolver_createfetch3(res, name, type, domain,
|
||||
nameservers, forwarders, client, id,
|
||||
options, 0, NULL, task, action, arg,
|
||||
rdataset, sigrdataset, fetchp));
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_resolver_createfetch3(dns_resolver_t *res, dns_name_t *name,
|
||||
dns_rdatatype_t type,
|
||||
dns_name_t *domain, dns_rdataset_t *nameservers,
|
||||
dns_forwarders_t *forwarders,
|
||||
isc_sockaddr_t *client, dns_messageid_t id,
|
||||
unsigned int options, unsigned int depth,
|
||||
isc_counter_t *qc, isc_task_t *task,
|
||||
isc_taskaction_t action, void *arg,
|
||||
dns_rdataset_t *rdataset,
|
||||
dns_rdataset_t *sigrdataset,
|
||||
dns_fetch_t **fetchp)
|
||||
{
|
||||
dns_fetch_t *fetch;
|
||||
fetchctx_t *fctx = NULL;
|
||||
@@ -8047,11 +8124,12 @@ dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
|
||||
|
||||
if (fctx == NULL) {
|
||||
result = fctx_create(res, name, type, domain, nameservers,
|
||||
options, bucketnum, &fctx);
|
||||
options, bucketnum, depth, qc, &fctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto unlock;
|
||||
new_fctx = ISC_TRUE;
|
||||
}
|
||||
} else if (fctx->depth > depth)
|
||||
fctx->depth = depth;
|
||||
|
||||
result = fctx_join(fctx, task, client, id, action, arg,
|
||||
rdataset, sigrdataset, fetch);
|
||||
@@ -8821,3 +8899,27 @@ dns_resolver_settimeout(dns_resolver_t *resolver, unsigned int seconds) {
|
||||
|
||||
resolver->query_timeout = seconds;
|
||||
}
|
||||
|
||||
void
|
||||
dns_resolver_setmaxdepth(dns_resolver_t *resolver, unsigned int maxdepth) {
|
||||
REQUIRE(VALID_RESOLVER(resolver));
|
||||
resolver->maxdepth = maxdepth;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
dns_resolver_getmaxdepth(dns_resolver_t *resolver) {
|
||||
REQUIRE(VALID_RESOLVER(resolver));
|
||||
return (resolver->maxdepth);
|
||||
}
|
||||
|
||||
void
|
||||
dns_resolver_setmaxqueries(dns_resolver_t *resolver, unsigned int queries) {
|
||||
REQUIRE(VALID_RESOLVER(resolver));
|
||||
resolver->maxqueries = queries;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
dns_resolver_getmaxqueries(dns_resolver_t *resolver) {
|
||||
REQUIRE(VALID_RESOLVER(resolver));
|
||||
return (resolver->maxqueries);
|
||||
}
|
||||
@@ -63,7 +63,7 @@ WIN32OBJS = win32/condition.@O@ win32/dir.@O@ win32/file.@O@ \
|
||||
# Alphabetically
|
||||
OBJS = @ISC_EXTRA_OBJS@ \
|
||||
assertions.@O@ backtrace.@O@ backtrace-emptytbl.@O@ base32.@O@ \
|
||||
base64.@O@ buffer.@O@ bufferlist.@O@ \
|
||||
base64.@O@ buffer.@O@ bufferlist.@O@ counter.@O@ \
|
||||
error.@O@ event.@O@ \
|
||||
hash.@O@ hex.@O@ hmacmd5.@O@ hmacsha.@O@ \
|
||||
inet_aton.@O@ iterated_hash.@O@ lex.@O@ lfsr.@O@ log.@O@ \
|
||||
@@ -86,7 +86,7 @@ ISCDRIVERSRCS = mem.c task.c lib.c timer.c heap.c
|
||||
|
||||
SRCS = @ISC_EXTRA_SRCS@ \
|
||||
assertions.c backtrace.c backtrace-emptytbl.c base32.c \
|
||||
base64.c buffer.c bufferlist.c \
|
||||
base64.c buffer.c bufferlist.c counter.c \
|
||||
error.c event.c \
|
||||
hash.c hex.c hmacmd5.c hmacsha.c \
|
||||
inet_aton.c iterated_hash.c lex.c log.c lfsr.c \
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id$
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
@@ -53,7 +51,7 @@ WIN32OBJS = win32/condition.@O@ win32/dir.@O@ win32/file.@O@ \
|
||||
OBJS = @ISC_EXTRA_OBJS@ \
|
||||
assertions.@O@ backtrace.@O@ base32.@O@ base64.@O@ \
|
||||
bitstring.@O@ buffer.@O@ bufferlist.@O@ commandline.@O@ \
|
||||
error.@O@ event.@O@ \
|
||||
counter.@O@ error.@O@ event.@O@ \
|
||||
hash.@O@ heap.@O@ hex.@O@ hmacmd5.@O@ hmacsha.@O@ \
|
||||
httpd.@O@ inet_aton.@O@ iterated_hash.@O@ \
|
||||
lex.@O@ lfsr.@O@ lib.@O@ log.@O@ \
|
||||
@@ -69,8 +67,8 @@ SYMTBLOBJS = backtrace-emptytbl.@O@
|
||||
# Alphabetically
|
||||
SRCS = @ISC_EXTRA_SRCS@ \
|
||||
assertions.c backtrace.c base32.c base64.c bitstring.c \
|
||||
buffer.c bufferlist.c commandline.c error.c event.c \
|
||||
heap.c hex.c hmacmd5.c hmacsha.c \
|
||||
buffer.c bufferlist.c commandline.c counter.c \
|
||||
error.c event.c heap.c hex.c hmacmd5.c hmacsha.c \
|
||||
httpd.c inet_aton.c iterated_hash.c \
|
||||
lex.c lfsr.c lib.c log.c \
|
||||
md5.c mem.c mutexblock.c \
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <isc/counter.h>
|
||||
#include <isc/magic.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#define COUNTER_MAGIC ISC_MAGIC('C', 'n', 't', 'r')
|
||||
#define VALID_COUNTER(r) ISC_MAGIC_VALID(r, COUNTER_MAGIC)
|
||||
|
||||
struct isc_counter {
|
||||
unsigned int magic;
|
||||
isc_mem_t *mctx;
|
||||
isc_mutex_t lock;
|
||||
unsigned int references;
|
||||
unsigned int limit;
|
||||
unsigned int used;
|
||||
};
|
||||
|
||||
isc_result_t
|
||||
isc_counter_create(isc_mem_t *mctx, int limit, isc_counter_t **counterp) {
|
||||
isc_result_t result;
|
||||
isc_counter_t *counter;
|
||||
|
||||
REQUIRE(counterp != NULL && *counterp == NULL);
|
||||
|
||||
counter = isc_mem_get(mctx, sizeof(*counter));
|
||||
if (counter == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
result = isc_mutex_init(&counter->lock);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_mem_put(mctx, counter, sizeof(*counter));
|
||||
return (result);
|
||||
}
|
||||
|
||||
counter->mctx = NULL;
|
||||
isc_mem_attach(mctx, &counter->mctx);
|
||||
|
||||
counter->references = 1;
|
||||
counter->limit = limit;
|
||||
counter->used = 0;
|
||||
|
||||
counter->magic = COUNTER_MAGIC;
|
||||
*counterp = counter;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
isc_counter_increment(isc_counter_t *counter) {
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
|
||||
LOCK(&counter->lock);
|
||||
counter->used++;
|
||||
if (counter->limit != 0 && counter->used >= counter->limit)
|
||||
result = ISC_R_QUOTA;
|
||||
UNLOCK(&counter->lock);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
isc_counter_used(isc_counter_t *counter) {
|
||||
REQUIRE(VALID_COUNTER(counter));
|
||||
|
||||
return (counter->used);
|
||||
}
|
||||
|
||||
void
|
||||
isc_counter_setlimit(isc_counter_t *counter, int limit) {
|
||||
REQUIRE(VALID_COUNTER(counter));
|
||||
|
||||
LOCK(&counter->lock);
|
||||
counter->limit = limit;
|
||||
UNLOCK(&counter->lock);
|
||||
}
|
||||
|
||||
void
|
||||
isc_counter_attach(isc_counter_t *source, isc_counter_t **targetp) {
|
||||
REQUIRE(VALID_COUNTER(source));
|
||||
REQUIRE(targetp != NULL && *targetp == NULL);
|
||||
|
||||
LOCK(&source->lock);
|
||||
source->references++;
|
||||
INSIST(source->references > 0);
|
||||
UNLOCK(&source->lock);
|
||||
|
||||
*targetp = source;
|
||||
}
|
||||
|
||||
static void
|
||||
destroy(isc_counter_t *counter) {
|
||||
counter->magic = 0;
|
||||
isc_mutex_destroy(&counter->lock);
|
||||
isc_mem_putanddetach(&counter->mctx, counter, sizeof(*counter));
|
||||
}
|
||||
|
||||
void
|
||||
isc_counter_detach(isc_counter_t **counterp) {
|
||||
isc_counter_t *counter;
|
||||
isc_boolean_t want_destroy = ISC_FALSE;
|
||||
|
||||
REQUIRE(counterp != NULL && *counterp != NULL);
|
||||
counter = *counterp;
|
||||
REQUIRE(VALID_COUNTER(counter));
|
||||
|
||||
*counterp = NULL;
|
||||
|
||||
LOCK(&counter->lock);
|
||||
INSIST(counter->references > 0);
|
||||
counter->references--;
|
||||
if (counter->references == 0)
|
||||
want_destroy = ISC_TRUE;
|
||||
UNLOCK(&counter->lock);
|
||||
|
||||
if (want_destroy)
|
||||
destroy(counter);
|
||||
}
|
||||
@@ -13,8 +13,6 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id$
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
@@ -27,7 +25,8 @@ top_srcdir = @top_srcdir@
|
||||
# install target below.
|
||||
#
|
||||
HEADERS = app.h assertions.h base64.h bind9.h bitstring.h boolean.h \
|
||||
buffer.h bufferlist.h commandline.h entropy.h error.h event.h \
|
||||
buffer.h bufferlist.h \
|
||||
commandline.h counter.h entropy.h error.h event.h \
|
||||
eventclass.h file.h formatcheck.h fsaccess.h \
|
||||
hash.h heap.h hex.h hmacmd5.h hmacsha.h \
|
||||
httpd.h \
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef ISC_COUNTER_H
|
||||
#define ISC_COUNTER_H 1
|
||||
|
||||
/*****
|
||||
***** Module Info
|
||||
*****/
|
||||
|
||||
/*! \file isc/counter.h
|
||||
*
|
||||
* \brief The isc_counter_t object is a simplified version of the
|
||||
* isc_quota_t object; it tracks the consumption of limited
|
||||
* resources, returning an error condition when the quota is
|
||||
* exceeded. However, unlike isc_quota_t, attaching and detaching
|
||||
* from a counter object does not increment or decrement the counter.
|
||||
*/
|
||||
|
||||
/***
|
||||
*** Imports.
|
||||
***/
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
/*****
|
||||
***** Types.
|
||||
*****/
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
isc_counter_create(isc_mem_t *mctx, int limit, isc_counter_t **counterp);
|
||||
/*%<
|
||||
* Allocate and initialize a counter object.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
isc_counter_increment(isc_counter_t *counter);
|
||||
/*%<
|
||||
* Increment the counter.
|
||||
*
|
||||
* If the counter limit is nonzero and has been reached, then
|
||||
* return ISC_R_QUOTA, otherwise ISC_R_SUCCESS. (The counter is
|
||||
* incremented regardless of return value.)
|
||||
*/
|
||||
|
||||
unsigned int
|
||||
isc_counter_used(isc_counter_t *counter);
|
||||
/*%<
|
||||
* Return the current counter value.
|
||||
*/
|
||||
|
||||
void
|
||||
isc_counter_setlimit(isc_counter_t *counter, int limit);
|
||||
/*%<
|
||||
* Set the counter limit.
|
||||
*/
|
||||
|
||||
void
|
||||
isc_counter_attach(isc_counter_t *source, isc_counter_t **targetp);
|
||||
/*%<
|
||||
* Attach to a counter object, increasing its reference counter.
|
||||
*/
|
||||
|
||||
void
|
||||
isc_counter_detach(isc_counter_t **counterp);
|
||||
/*%<
|
||||
* Detach (and destroy if reference counter has dropped to zero)
|
||||
* a counter object.
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* ISC_COUNTER_H */
|
||||
@@ -50,6 +50,7 @@ typedef struct isc_buffer isc_buffer_t; /*%< Buffer */
|
||||
typedef ISC_LIST(isc_buffer_t) isc_bufferlist_t; /*%< Buffer List */
|
||||
typedef struct isc_constregion isc_constregion_t; /*%< Const region */
|
||||
typedef struct isc_consttextregion isc_consttextregion_t; /*%< Const Text Region */
|
||||
typedef struct isc_counter isc_counter_t; /*%< Counter */
|
||||
typedef struct isc_entropy isc_entropy_t; /*%< Entropy */
|
||||
typedef struct isc_entropysource isc_entropysource_t; /*%< Entropy Source */
|
||||
typedef struct isc_event isc_event_t; /*%< Event */
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
@@ -1244,6 +1242,8 @@ view_clauses[] = {
|
||||
{ "max-cache-ttl", &cfg_type_uint32, 0 },
|
||||
{ "max-clients-per-query", &cfg_type_uint32, 0 },
|
||||
{ "max-ncache-ttl", &cfg_type_uint32, 0 },
|
||||
{ "max-recursion-depth", &cfg_type_uint32, 0 },
|
||||
{ "max-recursion-queries", &cfg_type_uint32, 0 },
|
||||
{ "max-udp-size", &cfg_type_uint32, 0 },
|
||||
{ "min-roots", &cfg_type_uint32, CFG_CLAUSEFLAG_NOTIMP },
|
||||
{ "minimal-responses", &cfg_type_boolean, 0 },
|
||||
|
||||
@@ -7,4 +7,4 @@ MAJORVER=9
|
||||
MINORVER=8
|
||||
PATCHVER=3
|
||||
RELEASETYPE=-P
|
||||
RELEASEVER=2
|
||||
RELEASEVER=4
|
||||
@@ -499,6 +499,11 @@ snmp_getbulk(struct snmp_pdu *pdu, struct asn_buf *resp_b,
|
||||
for (cnt = 0; cnt < pdu->error_index; cnt++) {
|
||||
eomib = 1;
|
||||
for (i = non_rep; i < pdu->nbindings; i++) {
|
||||
|
||||
if (resp->nbindings == SNMP_MAX_BINDINGS)
|
||||
/* PDU is full */
|
||||
goto done;
|
||||
|
||||
if (cnt == 0)
|
||||
result = do_getnext(&context, &pdu->bindings[i],
|
||||
&resp->bindings[resp->nbindings], pdu);
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
!:mime text/x-awk
|
||||
0 string/wt #!\ /usr/bin/awk awk script text executable
|
||||
!:mime text/x-awk
|
||||
0 regex =^\\s*BEGIN\\s*[{] awk script text
|
||||
0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
|
||||
!:strength - 12
|
||||
|
||||
# AT&T Bell Labs' Plan 9 shell
|
||||
0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
|
||||
|
||||
@@ -648,7 +648,6 @@ set_test_type(struct magic *mstart, struct magic *m)
|
||||
break;
|
||||
case FILE_REGEX:
|
||||
case FILE_SEARCH:
|
||||
#ifndef COMPILE_ONLY
|
||||
/* Check for override */
|
||||
if (mstart->str_flags & STRING_BINTEST)
|
||||
mstart->flag |= BINTEST;
|
||||
@@ -664,7 +663,6 @@ set_test_type(struct magic *mstart, struct magic *m)
|
||||
mstart->flag |= BINTEST;
|
||||
else
|
||||
mstart->flag |= TEXTTEST;
|
||||
#endif
|
||||
break;
|
||||
case FILE_DEFAULT:
|
||||
/* can't deduce anything; we shouldn't see this at the
|
||||
|
||||
@@ -147,7 +147,7 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf,
|
||||
== NULL)
|
||||
goto done;
|
||||
if ((rv = file_softmagic(ms, utf8_buf,
|
||||
(size_t)(utf8_end - utf8_buf), TEXTTEST, text)) == 0)
|
||||
(size_t)(utf8_end - utf8_buf), 0, TEXTTEST, text)) == 0)
|
||||
rv = -1;
|
||||
}
|
||||
|
||||
|
||||
+16
-8
@@ -35,10 +35,12 @@
|
||||
switch (type) {
|
||||
#ifdef ELFCORE
|
||||
case ET_CORE:
|
||||
phnum = elf_getu16(swap, elfhdr.e_phnum);
|
||||
if (phnum > MAX_PHNUM)
|
||||
return toomany(ms, "program", phnum);
|
||||
flags |= FLAGS_IS_CORE;
|
||||
if (dophn_core(ms, clazz, swap, fd,
|
||||
(off_t)elf_getu(swap, elfhdr.e_phoff),
|
||||
elf_getu16(swap, elfhdr.e_phnum),
|
||||
(off_t)elf_getu(swap, elfhdr.e_phoff), phnum,
|
||||
(size_t)elf_getu16(swap, elfhdr.e_phentsize),
|
||||
fsize, &flags) == -1)
|
||||
return -1;
|
||||
@@ -46,18 +48,24 @@
|
||||
#endif
|
||||
case ET_EXEC:
|
||||
case ET_DYN:
|
||||
phnum = elf_getu16(swap, elfhdr.e_phnum);
|
||||
if (phnum > MAX_PHNUM)
|
||||
return toomany(ms, "program", phnum);
|
||||
shnum = elf_getu16(swap, elfhdr.e_shnum);
|
||||
if (shnum > MAX_SHNUM)
|
||||
return toomany(ms, "section", shnum);
|
||||
if (dophn_exec(ms, clazz, swap, fd,
|
||||
(off_t)elf_getu(swap, elfhdr.e_phoff),
|
||||
elf_getu16(swap, elfhdr.e_phnum),
|
||||
(off_t)elf_getu(swap, elfhdr.e_phoff), phnum,
|
||||
(size_t)elf_getu16(swap, elfhdr.e_phentsize),
|
||||
fsize, &flags, elf_getu16(swap, elfhdr.e_shnum))
|
||||
== -1)
|
||||
fsize, &flags, shnum) == -1)
|
||||
return -1;
|
||||
/*FALLTHROUGH*/
|
||||
case ET_REL:
|
||||
shnum = elf_getu16(swap, elfhdr.e_shnum);
|
||||
if (shnum > MAX_SHNUM)
|
||||
return toomany(ms, "section", shnum);
|
||||
if (doshn(ms, clazz, swap, fd,
|
||||
(off_t)elf_getu(swap, elfhdr.e_shoff),
|
||||
elf_getu16(swap, elfhdr.e_shnum),
|
||||
(off_t)elf_getu(swap, elfhdr.e_shoff), shnum,
|
||||
(size_t)elf_getu16(swap, elfhdr.e_shentsize),
|
||||
fsize, &flags, elf_getu16(swap, elfhdr.e_machine)) == -1)
|
||||
return -1;
|
||||
|
||||
+1
-1
@@ -414,7 +414,7 @@ protected int file_encoding(struct magic_set *, const unsigned char *, size_t,
|
||||
unichar **, size_t *, const char **, const char **, const char **);
|
||||
protected int file_is_tar(struct magic_set *, const unsigned char *, size_t);
|
||||
protected int file_softmagic(struct magic_set *, const unsigned char *, size_t,
|
||||
int, int);
|
||||
size_t, int, int);
|
||||
protected struct mlist *file_apprentice(struct magic_set *, const char *, int);
|
||||
protected uint64_t file_signextend(struct magic_set *, struct magic *,
|
||||
uint64_t);
|
||||
|
||||
@@ -228,7 +228,7 @@ file_buffer(struct magic_set *ms, int fd, const char *inname __attribute__ ((unu
|
||||
|
||||
/* try soft magic tests */
|
||||
if ((ms->flags & MAGIC_NO_CHECK_SOFT) == 0)
|
||||
if ((m = file_softmagic(ms, ubuf, nb, BINTEST,
|
||||
if ((m = file_softmagic(ms, ubuf, nb, 0, BINTEST,
|
||||
looks_text)) != 0) {
|
||||
if ((ms->flags & MAGIC_DEBUG) != 0)
|
||||
(void)fprintf(stderr, "softmagic %d\n", m);
|
||||
|
||||
+20
-3
@@ -60,6 +60,18 @@ private uint16_t getu16(int, uint16_t);
|
||||
private uint32_t getu32(int, uint32_t);
|
||||
private uint64_t getu64(int, uint64_t);
|
||||
|
||||
#define MAX_PHNUM 256
|
||||
#define MAX_SHNUM 1024
|
||||
|
||||
private int
|
||||
toomany(struct magic_set *ms, const char *name, uint16_t num)
|
||||
{
|
||||
if (file_printf(ms, ", too many %s header sections (%u)", name, num
|
||||
) == -1)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
private uint16_t
|
||||
getu16(int swap, uint16_t value)
|
||||
{
|
||||
@@ -384,13 +396,13 @@ donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size,
|
||||
if (namesz & 0x80000000) {
|
||||
(void)file_printf(ms, ", bad note name size 0x%lx",
|
||||
(unsigned long)namesz);
|
||||
return offset;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (descsz & 0x80000000) {
|
||||
(void)file_printf(ms, ", bad note description size 0x%lx",
|
||||
(unsigned long)descsz);
|
||||
return offset;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -847,6 +859,7 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
|
||||
Elf32_Shdr sh32;
|
||||
Elf64_Shdr sh64;
|
||||
int stripped = 1;
|
||||
size_t nbadcap = 0;
|
||||
void *nbuf;
|
||||
off_t noff, coff;
|
||||
uint64_t cap_hw1 = 0; /* SunOS 5.x hardware capabilites */
|
||||
@@ -919,6 +932,8 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
|
||||
free(nbuf);
|
||||
break;
|
||||
case SHT_SUNW_cap:
|
||||
if (nbadcap > 5)
|
||||
break;
|
||||
if (lseek(fd, (off_t)xsh_offset, SEEK_SET) ==
|
||||
(off_t)-1) {
|
||||
file_badseek(ms);
|
||||
@@ -955,6 +970,8 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
|
||||
(unsigned long long)xcap_tag,
|
||||
(unsigned long long)xcap_val) == -1)
|
||||
return -1;
|
||||
if (nbadcap++ > 2)
|
||||
coff = xsh_size;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1142,7 +1159,7 @@ file_tryelf(struct magic_set *ms, int fd, const unsigned char *buf,
|
||||
int flags = 0;
|
||||
Elf32_Ehdr elf32hdr;
|
||||
Elf64_Ehdr elf64hdr;
|
||||
uint16_t type;
|
||||
uint16_t type, phnum, shnum;
|
||||
|
||||
if (ms->flags & (MAGIC_MIME|MAGIC_APPLE))
|
||||
return 0;
|
||||
|
||||
+35
-22
@@ -43,9 +43,9 @@ FILE_RCSID("@(#)$File: softmagic.c,v 1.147 2011/11/05 15:44:22 rrt Exp $")
|
||||
|
||||
|
||||
private int match(struct magic_set *, struct magic *, uint32_t,
|
||||
const unsigned char *, size_t, int, int);
|
||||
const unsigned char *, size_t, int, int, int);
|
||||
private int mget(struct magic_set *, const unsigned char *,
|
||||
struct magic *, size_t, unsigned int, int);
|
||||
struct magic *, size_t, unsigned int, int, int);
|
||||
private int magiccheck(struct magic_set *, struct magic *);
|
||||
private int32_t mprint(struct magic_set *, struct magic *);
|
||||
private int32_t moffset(struct magic_set *, struct magic *);
|
||||
@@ -60,6 +60,10 @@ private void cvt_16(union VALUETYPE *, const struct magic *);
|
||||
private void cvt_32(union VALUETYPE *, const struct magic *);
|
||||
private void cvt_64(union VALUETYPE *, const struct magic *);
|
||||
|
||||
#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o)))
|
||||
|
||||
#define MAX_RECURSION_LEVEL 10
|
||||
|
||||
/*
|
||||
* softmagic - lookup one file in parsed, in-memory copy of database
|
||||
* Passed the name and FILE * of one file to be typed.
|
||||
@@ -67,13 +71,13 @@ private void cvt_64(union VALUETYPE *, const struct magic *);
|
||||
/*ARGSUSED1*/ /* nbytes passed for regularity, maybe need later */
|
||||
protected int
|
||||
file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes,
|
||||
int mode, int text)
|
||||
size_t level, int mode, int text)
|
||||
{
|
||||
struct mlist *ml;
|
||||
int rv;
|
||||
for (ml = ms->mlist->next; ml != ms->mlist; ml = ml->next)
|
||||
if ((rv = match(ms, ml->magic, ml->nmagic, buf, nbytes, mode,
|
||||
text)) != 0)
|
||||
text, level)) != 0)
|
||||
return rv;
|
||||
|
||||
return 0;
|
||||
@@ -108,7 +112,8 @@ file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes,
|
||||
*/
|
||||
private int
|
||||
match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
|
||||
const unsigned char *s, size_t nbytes, int mode, int text)
|
||||
const unsigned char *s, size_t nbytes, int mode, int text,
|
||||
int recursion_level)
|
||||
{
|
||||
uint32_t magindex = 0;
|
||||
unsigned int cont_level = 0;
|
||||
@@ -140,7 +145,7 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
|
||||
ms->line = m->lineno;
|
||||
|
||||
/* if main entry matches, print it... */
|
||||
switch (mget(ms, s, m, nbytes, cont_level, text)) {
|
||||
switch (mget(ms, s, m, nbytes, cont_level, text, recursion_level + 1)) {
|
||||
case -1:
|
||||
return -1;
|
||||
case 0:
|
||||
@@ -223,7 +228,7 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
switch (mget(ms, s, m, nbytes, cont_level, text)) {
|
||||
switch (mget(ms, s, m, nbytes, cont_level, text, recursion_level + 1)) {
|
||||
case -1:
|
||||
return -1;
|
||||
case 0:
|
||||
@@ -1018,12 +1023,18 @@ mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir,
|
||||
|
||||
private int
|
||||
mget(struct magic_set *ms, const unsigned char *s,
|
||||
struct magic *m, size_t nbytes, unsigned int cont_level, int text)
|
||||
struct magic *m, size_t nbytes, unsigned int cont_level, int text,
|
||||
int recursion_level)
|
||||
{
|
||||
uint32_t offset = ms->offset;
|
||||
uint32_t count = m->str_range;
|
||||
union VALUETYPE *p = &ms->ms_value;
|
||||
|
||||
if (recursion_level >= MAX_RECURSION_LEVEL) {
|
||||
file_error(ms, 0, "recursion nesting exceeded");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (mcopy(ms, p, m->type, m->flag & INDIR, s, offset, nbytes, count) == -1)
|
||||
return -1;
|
||||
|
||||
@@ -1073,7 +1084,7 @@ mget(struct magic_set *ms, const unsigned char *s,
|
||||
}
|
||||
switch (m->in_type) {
|
||||
case FILE_BYTE:
|
||||
if (nbytes < (offset + 1))
|
||||
if (OFFSET_OOB(nbytes, offset, 1))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1108,7 +1119,7 @@ mget(struct magic_set *ms, const unsigned char *s,
|
||||
offset = ~offset;
|
||||
break;
|
||||
case FILE_BESHORT:
|
||||
if (nbytes < (offset + 2))
|
||||
if (OFFSET_OOB(nbytes, offset, 2))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1160,7 +1171,7 @@ mget(struct magic_set *ms, const unsigned char *s,
|
||||
offset = ~offset;
|
||||
break;
|
||||
case FILE_LESHORT:
|
||||
if (nbytes < (offset + 2))
|
||||
if (OFFSET_OOB(nbytes, offset, 2))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1212,7 +1223,7 @@ mget(struct magic_set *ms, const unsigned char *s,
|
||||
offset = ~offset;
|
||||
break;
|
||||
case FILE_SHORT:
|
||||
if (nbytes < (offset + 2))
|
||||
if (OFFSET_OOB(nbytes, offset, 2))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1249,7 +1260,7 @@ mget(struct magic_set *ms, const unsigned char *s,
|
||||
break;
|
||||
case FILE_BELONG:
|
||||
case FILE_BEID3:
|
||||
if (nbytes < (offset + 4))
|
||||
if (OFFSET_OOB(nbytes, offset, 4))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1320,7 +1331,7 @@ mget(struct magic_set *ms, const unsigned char *s,
|
||||
break;
|
||||
case FILE_LELONG:
|
||||
case FILE_LEID3:
|
||||
if (nbytes < (offset + 4))
|
||||
if (OFFSET_OOB(nbytes, offset, 4))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1390,7 +1401,7 @@ mget(struct magic_set *ms, const unsigned char *s,
|
||||
offset = ~offset;
|
||||
break;
|
||||
case FILE_MELONG:
|
||||
if (nbytes < (offset + 4))
|
||||
if (OFFSET_OOB(nbytes, offset, 4))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1460,7 +1471,7 @@ mget(struct magic_set *ms, const unsigned char *s,
|
||||
offset = ~offset;
|
||||
break;
|
||||
case FILE_LONG:
|
||||
if (nbytes < (offset + 4))
|
||||
if (OFFSET_OOB(nbytes, offset, 4))
|
||||
return 0;
|
||||
if (off) {
|
||||
switch (m->in_op & FILE_OPS_MASK) {
|
||||
@@ -1527,14 +1538,14 @@ mget(struct magic_set *ms, const unsigned char *s,
|
||||
/* Verify we have enough data to match magic type */
|
||||
switch (m->type) {
|
||||
case FILE_BYTE:
|
||||
if (nbytes < (offset + 1)) /* should alway be true */
|
||||
if (OFFSET_OOB(nbytes, offset, 1))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case FILE_SHORT:
|
||||
case FILE_BESHORT:
|
||||
case FILE_LESHORT:
|
||||
if (nbytes < (offset + 2))
|
||||
if (OFFSET_OOB(nbytes, offset, 2))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
@@ -1553,21 +1564,21 @@ mget(struct magic_set *ms, const unsigned char *s,
|
||||
case FILE_FLOAT:
|
||||
case FILE_BEFLOAT:
|
||||
case FILE_LEFLOAT:
|
||||
if (nbytes < (offset + 4))
|
||||
if (OFFSET_OOB(nbytes, offset, 4))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case FILE_DOUBLE:
|
||||
case FILE_BEDOUBLE:
|
||||
case FILE_LEDOUBLE:
|
||||
if (nbytes < (offset + 8))
|
||||
if (OFFSET_OOB(nbytes, offset, 8))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case FILE_STRING:
|
||||
case FILE_PSTRING:
|
||||
case FILE_SEARCH:
|
||||
if (nbytes < (offset + m->vallen))
|
||||
if (OFFSET_OOB(nbytes, offset, m->vallen))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
@@ -1577,13 +1588,15 @@ mget(struct magic_set *ms, const unsigned char *s,
|
||||
break;
|
||||
|
||||
case FILE_INDIRECT:
|
||||
if (offset == 0)
|
||||
return 0;
|
||||
if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
|
||||
file_printf(ms, "%s", m->desc) == -1)
|
||||
return -1;
|
||||
if (nbytes < offset)
|
||||
return 0;
|
||||
return file_softmagic(ms, s + offset, nbytes - offset,
|
||||
BINTEST, text);
|
||||
recursion_level, BINTEST, text);
|
||||
|
||||
case FILE_DEFAULT: /* nothing to check */
|
||||
default:
|
||||
|
||||
@@ -597,6 +597,8 @@ getconfig(
|
||||
#endif /* not SYS_WINNT */
|
||||
}
|
||||
|
||||
proto_config(PROTO_MONITOR, 0, 0., NULL);
|
||||
|
||||
for (;;) {
|
||||
if (tok == CONFIG_END)
|
||||
break;
|
||||
@@ -1885,7 +1887,7 @@ getconfig(
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
for (j = 1; j < 100; ++j) {
|
||||
rankey[i] = (char) (ntp_random() & 0xff);
|
||||
rankey[i] = (char) (arc4random() & 0xff);
|
||||
if (rankey[i] != 0) break;
|
||||
}
|
||||
rankey[8] = 0;
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) (((a) <= (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Structure to hold request procedure information
|
||||
*/
|
||||
@@ -893,6 +897,7 @@ ctl_putdata(
|
||||
)
|
||||
{
|
||||
int overhead;
|
||||
unsigned int currentlen;
|
||||
|
||||
overhead = 0;
|
||||
if (!bin) {
|
||||
@@ -916,12 +921,22 @@ ctl_putdata(
|
||||
/*
|
||||
* Save room for trailing junk
|
||||
*/
|
||||
if (dlen + overhead + datapt > dataend) {
|
||||
while (dlen + overhead + datapt > dataend) {
|
||||
/*
|
||||
* Not enough room in this one, flush it out.
|
||||
*/
|
||||
currentlen = MIN(dlen, dataend - datapt);
|
||||
|
||||
memcpy(datapt, dp, currentlen);
|
||||
|
||||
datapt += currentlen;
|
||||
dp += currentlen;
|
||||
dlen -= currentlen;
|
||||
datalinelen += currentlen;
|
||||
|
||||
ctl_flushpkt(CTL_MORE);
|
||||
}
|
||||
|
||||
memmove((char *)datapt, dp, (unsigned)dlen);
|
||||
datapt += dlen;
|
||||
datalinelen += dlen;
|
||||
|
||||
@@ -864,12 +864,24 @@ crypto_recv(
|
||||
* errors.
|
||||
*/
|
||||
if (vallen == (u_int) EVP_PKEY_size(host_pkey)) {
|
||||
RSA_private_decrypt(vallen,
|
||||
u_int32 *cookiebuf = malloc(
|
||||
RSA_size(host_pkey->pkey.rsa));
|
||||
if (cookiebuf == NULL) {
|
||||
rval = XEVNT_CKY;
|
||||
break;
|
||||
}
|
||||
if (RSA_private_decrypt(vallen,
|
||||
(u_char *)ep->pkt,
|
||||
(u_char *)&temp32,
|
||||
(u_char *)cookiebuf,
|
||||
host_pkey->pkey.rsa,
|
||||
RSA_PKCS1_OAEP_PADDING);
|
||||
cookie = ntohl(temp32);
|
||||
RSA_PKCS1_OAEP_PADDING) != 4) {
|
||||
rval = XEVNT_CKY;
|
||||
free(cookiebuf);
|
||||
break;
|
||||
} else {
|
||||
cookie = ntohl(*cookiebuf);
|
||||
free(cookiebuf);
|
||||
}
|
||||
} else {
|
||||
rval = XEVNT_CKY;
|
||||
break;
|
||||
@@ -3914,7 +3926,7 @@ crypto_setup(void)
|
||||
rand_file);
|
||||
exit (-1);
|
||||
}
|
||||
get_systime(&seed);
|
||||
arc4random_buf(&seed, sizeof(l_fp));
|
||||
RAND_seed(&seed, sizeof(l_fp));
|
||||
RAND_write_file(rand_file);
|
||||
OpenSSL_add_all_algorithms();
|
||||
|
||||
@@ -646,12 +646,6 @@ local_clock(
|
||||
msyslog(LOG_NOTICE,
|
||||
"kernel time sync error %04x", ntv.status);
|
||||
ntv.status &= ~(STA_PPSFREQ | STA_PPSTIME);
|
||||
} else {
|
||||
if ((ntv.status ^ pll_status) & ~STA_FLL)
|
||||
NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT)
|
||||
msyslog(LOG_NOTICE,
|
||||
"kernel time sync status change %04x",
|
||||
ntv.status);
|
||||
}
|
||||
pll_status = ntv.status;
|
||||
#ifdef STA_NANO
|
||||
|
||||
@@ -649,6 +649,7 @@ receive(
|
||||
has_mac)) {
|
||||
is_authentic = AUTH_ERROR;
|
||||
sys_badauth++;
|
||||
return;
|
||||
} else {
|
||||
is_authentic = AUTH_OK;
|
||||
}
|
||||
|
||||
@@ -642,7 +642,7 @@ gen_md5(
|
||||
for (i = 1; i <= MD5KEYS; i++) {
|
||||
for (j = 0; j < 16; j++) {
|
||||
while (1) {
|
||||
temp = ntp_random() & 0xff;
|
||||
temp = arc4random() & 0xff;
|
||||
if (temp == '#')
|
||||
continue;
|
||||
if (temp > 0x20 && temp < 0x7f)
|
||||
@@ -675,7 +675,7 @@ gen_rsa(
|
||||
FILE *str;
|
||||
|
||||
fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus);
|
||||
rsa = RSA_generate_key(modulus, 3, cb, "RSA");
|
||||
rsa = RSA_generate_key(modulus, 65537, cb, "RSA");
|
||||
fprintf(stderr, "\n");
|
||||
if (rsa == NULL) {
|
||||
fprintf(stderr, "RSA generate keys fails\n%s\n",
|
||||
@@ -954,7 +954,7 @@ gen_gqpar(
|
||||
*/
|
||||
fprintf(stderr,
|
||||
"Generating GQ parameters (%d bits)...\n", modulus);
|
||||
rsa = RSA_generate_key(modulus, 3, cb, "GQ");
|
||||
rsa = RSA_generate_key(modulus, 65537, cb, "GQ");
|
||||
fprintf(stderr, "\n");
|
||||
if (rsa == NULL) {
|
||||
fprintf(stderr, "RSA generate keys fails\n%s\n",
|
||||
|
||||
@@ -17,6 +17,8 @@ you didn't get a copy, you may request one from <[email protected]>.
|
||||
$FreeBSD$
|
||||
*/
|
||||
|
||||
#include <sys/endian.h>
|
||||
|
||||
#include "opie_cfg.h"
|
||||
#include "opie.h"
|
||||
|
||||
@@ -39,6 +41,13 @@ unsigned algorithm)
|
||||
SHA1_Final((unsigned char *)digest, &sha);
|
||||
results[0] = digest[0] ^ digest[2] ^ digest[4];
|
||||
results[1] = digest[1] ^ digest[3];
|
||||
|
||||
/*
|
||||
* RFC2289 mandates that we convert SHA1 digest from big-endian to little
|
||||
* see Appendix A.
|
||||
*/
|
||||
results[0] = bswap32(results[0]);
|
||||
results[1] = bswap32(results[1]);
|
||||
};
|
||||
break;
|
||||
case 4:
|
||||
|
||||
@@ -14,6 +14,8 @@ you didn't get a copy, you may request one from <[email protected]>.
|
||||
$FreeBSD$
|
||||
*/
|
||||
|
||||
#include <sys/endian.h>
|
||||
|
||||
#include "opie_cfg.h"
|
||||
#include "opie.h"
|
||||
|
||||
@@ -36,6 +38,13 @@ VOIDPTR in AND struct opie_otpkey *out AND int n)
|
||||
SHA1_Final((unsigned char *)digest, &sha);
|
||||
results[0] = digest[0] ^ digest[2] ^ digest[4];
|
||||
results[1] = digest[1] ^ digest[3];
|
||||
|
||||
/*
|
||||
* RFC2289 mandates that we convert SHA1 digest from big-endian to little
|
||||
* see Appendix A.
|
||||
*/
|
||||
results[0] = bswap32(results[0]);
|
||||
results[1] = bswap32(results[1]);
|
||||
break;
|
||||
}
|
||||
case 4: {
|
||||
|
||||
@@ -5256,8 +5256,8 @@ closefd_walk(lowest, fd)
|
||||
*/
|
||||
|
||||
void
|
||||
sm_close_on_exec(highest, lowest)
|
||||
int highest, lowest;
|
||||
sm_close_on_exec(lowest, highest)
|
||||
int lowest, highest;
|
||||
{
|
||||
#if HASFDWALK
|
||||
(void) fdwalk(closefd_walk, &lowest);
|
||||
|
||||
+22
-14
@@ -547,7 +547,7 @@ fetch_url(const char *url, const char *proxyenv, char *proxyauth, char *wwwauth)
|
||||
url_decode(decodedpath);
|
||||
|
||||
if (outfile)
|
||||
savefile = ftp_strdup(outfile);
|
||||
savefile = outfile;
|
||||
else {
|
||||
cp = strrchr(decodedpath, '/'); /* find savefile */
|
||||
if (cp != NULL)
|
||||
@@ -571,8 +571,7 @@ fetch_url(const char *url, const char *proxyenv, char *proxyauth, char *wwwauth)
|
||||
rangestart = rangeend = entitylen = -1;
|
||||
mtime = -1;
|
||||
if (restartautofetch) {
|
||||
if (strcmp(savefile, "-") != 0 && *savefile != '|' &&
|
||||
stat(savefile, &sb) == 0)
|
||||
if (stat(savefile, &sb) == 0)
|
||||
restart_point = sb.st_size;
|
||||
}
|
||||
if (urltype == FILE_URL_T) { /* file:// URLs */
|
||||
@@ -1098,17 +1097,25 @@ fetch_url(const char *url, const char *proxyenv, char *proxyauth, char *wwwauth)
|
||||
} /* end of ftp:// or http:// specific setup */
|
||||
|
||||
/* Open the output file. */
|
||||
if (strcmp(savefile, "-") == 0) {
|
||||
fout = stdout;
|
||||
} else if (*savefile == '|') {
|
||||
oldintp = xsignal(SIGPIPE, SIG_IGN);
|
||||
fout = popen(savefile + 1, "w");
|
||||
if (fout == NULL) {
|
||||
warn("Can't execute `%s'", savefile + 1);
|
||||
goto cleanup_fetch_url;
|
||||
|
||||
/*
|
||||
* Only trust filenames with special meaning if they came from
|
||||
* the command line
|
||||
*/
|
||||
if (outfile == savefile) {
|
||||
if (strcmp(savefile, "-") == 0) {
|
||||
fout = stdout;
|
||||
} else if (*savefile == '|') {
|
||||
oldintp = xsignal(SIGPIPE, SIG_IGN);
|
||||
fout = popen(savefile + 1, "w");
|
||||
if (fout == NULL) {
|
||||
warn("Can't execute `%s'", savefile + 1);
|
||||
goto cleanup_fetch_url;
|
||||
}
|
||||
closefunc = pclose;
|
||||
}
|
||||
closefunc = pclose;
|
||||
} else {
|
||||
}
|
||||
if (fout == NULL) {
|
||||
if ((rangeend != -1 && rangeend <= restart_point) ||
|
||||
(rangestart == -1 && filesize != -1 && filesize <= restart_point)) {
|
||||
/* already done */
|
||||
@@ -1318,7 +1325,8 @@ fetch_url(const char *url, const char *proxyenv, char *proxyauth, char *wwwauth)
|
||||
(*closefunc)(fout);
|
||||
if (res0)
|
||||
freeaddrinfo(res0);
|
||||
FREEPTR(savefile);
|
||||
if (savefile != outfile)
|
||||
FREEPTR(savefile);
|
||||
FREEPTR(uuser);
|
||||
if (pass != NULL)
|
||||
memset(pass, 0, strlen(pass));
|
||||
|
||||
+379
-256
File diff suppressed because it is too large.
Load diff
+103
-130
@@ -1,25 +1,21 @@
|
||||
# <pre>
|
||||
# @(#)antarctica 8.10
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# From Paul Eggert (1999-11-15):
|
||||
# To keep things manageable, we list only locations occupied year-round; see
|
||||
# <a href="http://www.comnap.aq/comnap/comnap.nsf/P/Stations/">
|
||||
# COMNAP - Stations and Bases
|
||||
# </a>
|
||||
# <http://www.comnap.aq/comnap/comnap.nsf/P/Stations/>
|
||||
# and
|
||||
# <a href="http://www.spri.cam.ac.uk/bob/periant.htm">
|
||||
# Summary of the Peri-Antarctic Islands (1998-07-23)
|
||||
# </a>
|
||||
# <http://www.spri.cam.ac.uk/bob/periant.htm>
|
||||
# for information.
|
||||
# Unless otherwise specified, we have no time zone information.
|
||||
#
|
||||
# Except for the French entries,
|
||||
# I made up all time zone abbreviations mentioned here; corrections welcome!
|
||||
# FORMAT is `zzz' and GMTOFF is 0 for locations while uninhabited.
|
||||
# FORMAT is 'zzz' and GMTOFF is 0 for locations while uninhabited.
|
||||
|
||||
# These rules are stolen from the `southamerica' file.
|
||||
# These rules are stolen from the 'southamerica' file.
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule ArgAQ 1964 1966 - Mar 1 0:00 0 -
|
||||
Rule ArgAQ 1964 1966 - Oct 15 0:00 1:00 S
|
||||
@@ -51,54 +47,24 @@ Rule ChileAQ 2009 only - Mar Sun>=9 3:00u 0 -
|
||||
Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 -
|
||||
Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 -
|
||||
Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S
|
||||
Rule ChileAQ 2012 only - Apr Sun>=23 3:00u 0 -
|
||||
Rule ChileAQ 2012 only - Sep Sun>=2 4:00u 1:00 S
|
||||
Rule ChileAQ 2013 max - Mar Sun>=9 3:00u 0 -
|
||||
Rule ChileAQ 2013 max - Oct Sun>=9 4:00u 1:00 S
|
||||
|
||||
# These rules are stolen from the `australasia' file.
|
||||
Rule AusAQ 1917 only - Jan 1 0:01 1:00 -
|
||||
Rule AusAQ 1917 only - Mar 25 2:00 0 -
|
||||
Rule AusAQ 1942 only - Jan 1 2:00 1:00 -
|
||||
Rule AusAQ 1942 only - Mar 29 2:00 0 -
|
||||
Rule AusAQ 1942 only - Sep 27 2:00 1:00 -
|
||||
Rule AusAQ 1943 1944 - Mar lastSun 2:00 0 -
|
||||
Rule AusAQ 1943 only - Oct 3 2:00 1:00 -
|
||||
Rule ATAQ 1967 only - Oct Sun>=1 2:00s 1:00 -
|
||||
Rule ATAQ 1968 only - Mar lastSun 2:00s 0 -
|
||||
Rule ATAQ 1968 1985 - Oct lastSun 2:00s 1:00 -
|
||||
Rule ATAQ 1969 1971 - Mar Sun>=8 2:00s 0 -
|
||||
Rule ATAQ 1972 only - Feb lastSun 2:00s 0 -
|
||||
Rule ATAQ 1973 1981 - Mar Sun>=1 2:00s 0 -
|
||||
Rule ATAQ 1982 1983 - Mar lastSun 2:00s 0 -
|
||||
Rule ATAQ 1984 1986 - Mar Sun>=1 2:00s 0 -
|
||||
Rule ATAQ 1986 only - Oct Sun>=15 2:00s 1:00 -
|
||||
Rule ATAQ 1987 1990 - Mar Sun>=15 2:00s 0 -
|
||||
Rule ATAQ 1987 only - Oct Sun>=22 2:00s 1:00 -
|
||||
Rule ATAQ 1988 1990 - Oct lastSun 2:00s 1:00 -
|
||||
Rule ATAQ 1991 1999 - Oct Sun>=1 2:00s 1:00 -
|
||||
Rule ATAQ 1991 2005 - Mar lastSun 2:00s 0 -
|
||||
Rule ATAQ 2000 only - Aug lastSun 2:00s 1:00 -
|
||||
Rule ATAQ 2001 max - Oct Sun>=1 2:00s 1:00 -
|
||||
Rule ATAQ 2006 only - Apr Sun>=1 2:00s 0 -
|
||||
Rule ATAQ 2007 only - Mar lastSun 2:00s 0 -
|
||||
Rule ATAQ 2008 max - Apr Sun>=1 2:00s 0 -
|
||||
Rule ChileAQ 2012 max - Apr Sun>=23 3:00u 0 -
|
||||
Rule ChileAQ 2012 max - Sep Sun>=2 4:00u 1:00 S
|
||||
|
||||
# Argentina - year-round bases
|
||||
# Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
|
||||
# Esperanza, San Martin Land, -6323-05659, since 1952-12-17
|
||||
# Jubany, Potter Peninsula, King George Island, -6414-0602320, since 1982-01
|
||||
# Marambio, Seymour I, -6414-05637, since 1969-10-29
|
||||
# Carlini, Potter Cove, King George Island, -6414-0602320, since 1982-01
|
||||
# Esperanza, Hope Bay, -6323-05659, since 1952-12-17
|
||||
# Marambio, -6414-05637, since 1969-10-29
|
||||
# Orcadas, Laurie I, -6016-04444, since 1904-02-22
|
||||
# San Martin, Debenham I, -6807-06708, since 1951-03-21
|
||||
# San Martín, Barry I, -6808-06706, since 1951-03-21
|
||||
# (except 1960-03 / 1976-03-21)
|
||||
|
||||
# Australia - territories
|
||||
# Heard Island, McDonald Islands (uninhabited)
|
||||
# previously sealers and scientific personnel wintered
|
||||
# <a href="http://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html">
|
||||
# Margaret Turner reports
|
||||
# </a> (1999-09-30) that they're UTC+5, with no DST;
|
||||
# <http://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html>
|
||||
# (1999-09-30) that they're UTC+5, with no DST;
|
||||
# presumably this is when they have visitors.
|
||||
#
|
||||
# year-round bases
|
||||
@@ -115,20 +81,13 @@ Rule ATAQ 2008 max - Apr Sun>=1 2:00s 0 -
|
||||
# The changes occurred on 2009-10-18 at 02:00 (local times).
|
||||
#
|
||||
# Government source: (Australian Antarctic Division)
|
||||
# <a href="http://www.aad.gov.au/default.asp?casid=37079">
|
||||
# http://www.aad.gov.au/default.asp?casid=37079
|
||||
# </a>
|
||||
#
|
||||
# We have more background information here:
|
||||
# <a href="http://www.timeanddate.com/news/time/antarctica-new-times.html">
|
||||
# http://www.timeanddate.com/news/time/antarctica-new-times.html
|
||||
# </a>
|
||||
|
||||
# From Steffen Thorsen (2010-03-10):
|
||||
# We got these changes from the Australian Antarctic Division:
|
||||
# - Macquarie Island will stay on UTC+11 for winter and therefore not
|
||||
# switch back from daylight savings time when other parts of Australia do
|
||||
# on 4 April.
|
||||
# We got these changes from the Australian Antarctic Division: ...
|
||||
#
|
||||
# - Casey station reverted to its normal time of UTC+8 on 5 March 2010.
|
||||
# The change to UTC+11 is being considered as a regular summer thing but
|
||||
@@ -139,23 +98,18 @@ Rule ATAQ 2008 max - Apr Sun>=1 2:00s 0 -
|
||||
#
|
||||
# - Mawson station stays on UTC+5.
|
||||
#
|
||||
# In addition to the Rule changes for Casey/Davis, it means that Macquarie
|
||||
# will no longer be like Hobart and will have to have its own Zone created.
|
||||
#
|
||||
# Background:
|
||||
# <a href="http://www.timeanddate.com/news/time/antartica-time-changes-2010.html">
|
||||
# http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
|
||||
# </a>
|
||||
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/Casey 0 - zzz 1969
|
||||
8:00 - WST 2009 Oct 18 2:00
|
||||
# Western (Aus) Standard Time
|
||||
8:00 - AWST 2009 Oct 18 2:00
|
||||
# Australian Western Std Time
|
||||
11:00 - CAST 2010 Mar 5 2:00
|
||||
# Casey Time
|
||||
8:00 - WST 2011 Oct 28 2:00
|
||||
8:00 - AWST 2011 Oct 28 2:00
|
||||
11:00 - CAST 2012 Feb 21 17:00u
|
||||
8:00 - WST
|
||||
8:00 - AWST
|
||||
Zone Antarctica/Davis 0 - zzz 1957 Jan 13
|
||||
7:00 - DAVT 1964 Nov # Davis Time
|
||||
0 - zzz 1969 Feb
|
||||
@@ -168,31 +122,28 @@ Zone Antarctica/Mawson 0 - zzz 1954 Feb 13
|
||||
6:00 - MAWT 2009 Oct 18 2:00
|
||||
# Mawson Time
|
||||
5:00 - MAWT
|
||||
Zone Antarctica/Macquarie 0 - zzz 1911
|
||||
10:00 - EST 1916 Oct 1 2:00
|
||||
10:00 1:00 EST 1917 Feb
|
||||
10:00 AusAQ EST 1967
|
||||
10:00 ATAQ EST 2010 Apr 4 3:00
|
||||
11:00 - MIST # Macquarie Island Time
|
||||
# References:
|
||||
# <a href="http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html">
|
||||
# Casey Weather (1998-02-26)
|
||||
# </a>
|
||||
# <a href="http://www.antdiv.gov.au/aad/exop/sfo/davis/video.html">
|
||||
# <http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html>
|
||||
# Davis Station, Antarctica (1998-02-26)
|
||||
# </a>
|
||||
# <a href="http://www.antdiv.gov.au/aad/exop/sfo/mawson/video.html">
|
||||
# <http://www.antdiv.gov.au/aad/exop/sfo/davis/video.html>
|
||||
# Mawson Station, Antarctica (1998-02-25)
|
||||
# </a>
|
||||
# <http://www.antdiv.gov.au/aad/exop/sfo/mawson/video.html>
|
||||
|
||||
# Belgium - year-round base
|
||||
# Princess Elisabeth, Queen Maud Land, -713412+0231200, since 2007
|
||||
|
||||
# Brazil - year-round base
|
||||
# Comandante Ferraz, King George Island, -6205+05824, since 1983/4
|
||||
# Ferraz, King George Island, -6205+05824, since 1983/4
|
||||
|
||||
# Bulgaria - year-round base
|
||||
# St. Kliment Ohridski, Livingston Island, -623829-0602153, since 1988
|
||||
|
||||
# Chile - year-round bases and towns
|
||||
# Escudero, South Shetland Is, -621157-0585735, since 1994
|
||||
# Presidente Eduadro Frei, King George Island, -6214-05848, since 1969-03-07
|
||||
# General Bernardo O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
|
||||
# Capitan Arturo Prat, -6230-05941
|
||||
# Frei Montalva, King George Island, -6214-05848, since 1969-03-07
|
||||
# O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
|
||||
# Prat, -6230-05941
|
||||
# Villa Las Estrellas (a town), around the Frei base, since 1984-04-09
|
||||
# These locations have always used Santiago time; use TZ='America/Santiago'.
|
||||
|
||||
@@ -200,31 +151,35 @@ Zone Antarctica/Macquarie 0 - zzz 1911
|
||||
# Great Wall, King George Island, -6213-05858, since 1985-02-20
|
||||
# Zhongshan, Larsemann Hills, Prydz Bay, -6922+07623, since 1989-02-26
|
||||
|
||||
# France - year-round bases
|
||||
# France - year-round bases (also see "France & Italy")
|
||||
#
|
||||
# From Antoine Leca (1997-01-20):
|
||||
# Time data are from Nicole Pailleau at the IFRTP
|
||||
# (French Institute for Polar Research and Technology).
|
||||
# She confirms that French Southern Territories and Terre Adelie bases
|
||||
# don't observe daylight saving time, even if Terre Adelie supplies came
|
||||
# She confirms that French Southern Territories and Terre Adélie bases
|
||||
# don't observe daylight saving time, even if Terre Adélie supplies came
|
||||
# from Tasmania.
|
||||
#
|
||||
# French Southern Territories with year-round inhabitants
|
||||
#
|
||||
# Martin-de-Vivies Base, Amsterdam Island, -374105+0773155, since 1950
|
||||
# Alfred-Faure Base, Crozet Islands, -462551+0515152, since 1964
|
||||
# Port-aux-Francais, Kerguelen Islands, -492110+0701303, since 1951;
|
||||
# Alfred Faure, Possession Island, Crozet Islands, -462551+0515152, since 1964;
|
||||
# sealing & whaling stations operated variously 1802/1911+;
|
||||
# see Indian/Reunion.
|
||||
#
|
||||
# Martin-de-Viviès, Amsterdam Island, -374105+0773155, since 1950
|
||||
# Port-aux-Français, Kerguelen Islands, -492110+0701303, since 1951;
|
||||
# whaling & sealing station operated 1908/1914, 1920/1929, and 1951/1956
|
||||
#
|
||||
# St Paul Island - near Amsterdam, uninhabited
|
||||
# fishing stations operated variously 1819/1931
|
||||
#
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Indian/Kerguelen 0 - zzz 1950 # Port-aux-Francais
|
||||
Zone Indian/Kerguelen 0 - zzz 1950 # Port-aux-Français
|
||||
5:00 - TFT # ISO code TF Time
|
||||
#
|
||||
# year-round base in the main continent
|
||||
# Dumont-d'Urville, Ile des Petrels, -6640+14001, since 1956-11
|
||||
# Dumont d'Urville, Île des Pétrels, -6640+14001, since 1956-11
|
||||
# <http://en.wikipedia.org/wiki/Dumont_d'Urville_Station> (2005-12-05)
|
||||
#
|
||||
# Another base at Port-Martin, 50km east, began operation in 1947.
|
||||
# It was destroyed by fire on 1952-01-14.
|
||||
@@ -234,20 +189,22 @@ Zone Antarctica/DumontDUrville 0 - zzz 1947
|
||||
10:00 - PMT 1952 Jan 14 # Port-Martin Time
|
||||
0 - zzz 1956 Nov
|
||||
10:00 - DDUT # Dumont-d'Urville Time
|
||||
# Reference:
|
||||
# <a href="http://en.wikipedia.org/wiki/Dumont_d'Urville_Station">
|
||||
# Dumont d'Urville Station (2005-12-05)
|
||||
# </a>
|
||||
|
||||
# France & Italy - year-round base
|
||||
# Concordia, -750600+1232000, since 2005
|
||||
|
||||
# Germany - year-round base
|
||||
# Georg von Neumayer, -7039-00815
|
||||
# Neumayer III, -704080-0081602, since 2009
|
||||
|
||||
# India - year-round base
|
||||
# Dakshin Gangotri, -7005+01200
|
||||
# India - year-round bases
|
||||
# Bharati, -692428+0761114, since 2012
|
||||
# Maitri, -704558+0114356, since 1989
|
||||
|
||||
# Italy - year-round base (also see "France & Italy")
|
||||
# Zuchelli, Terra Nova Bay, -744140+1640647, since 1986
|
||||
|
||||
# Japan - year-round bases
|
||||
# Dome Fuji, -7719+03942
|
||||
# Syowa, -690022+0393524
|
||||
# Syowa (also known as Showa), -690022+0393524, since 1957
|
||||
#
|
||||
# From Hideyuki Suzuki (1999-02-06):
|
||||
# In all Japanese stations, +0300 is used as the standard time.
|
||||
@@ -259,11 +216,11 @@ Zone Antarctica/DumontDUrville 0 - zzz 1947
|
||||
Zone Antarctica/Syowa 0 - zzz 1957 Jan 29
|
||||
3:00 - SYOT # Syowa Time
|
||||
# See:
|
||||
# <a href="http://www.nipr.ac.jp/english/ara01.html">
|
||||
# NIPR Antarctic Research Activities (1999-08-17)
|
||||
# </a>
|
||||
# <http://www.nipr.ac.jp/english/ara01.html>
|
||||
|
||||
# S Korea - year-round base
|
||||
# Jang Bogo, Terra Nova Bay, -743700+1641205 since 2014
|
||||
# King Sejong, King George Island, -6213-05847, since 1988
|
||||
|
||||
# New Zealand - claims
|
||||
@@ -271,29 +228,50 @@ Zone Antarctica/Syowa 0 - zzz 1957 Jan 29
|
||||
# Scott Island (never inhabited)
|
||||
#
|
||||
# year-round base
|
||||
# Scott, Ross Island, since 1957-01, is like Antarctica/McMurdo.
|
||||
#
|
||||
# These rules for New Zealand are stolen from the `australasia' file.
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule NZAQ 1974 only - Nov 3 2:00s 1:00 D
|
||||
Rule NZAQ 1975 1988 - Oct lastSun 2:00s 1:00 D
|
||||
Rule NZAQ 1989 only - Oct 8 2:00s 1:00 D
|
||||
Rule NZAQ 1990 2006 - Oct Sun>=1 2:00s 1:00 D
|
||||
Rule NZAQ 1975 only - Feb 23 2:00s 0 S
|
||||
Rule NZAQ 1976 1989 - Mar Sun>=1 2:00s 0 S
|
||||
Rule NZAQ 1990 2007 - Mar Sun>=15 2:00s 0 S
|
||||
Rule NZAQ 2007 max - Sep lastSun 2:00s 1:00 D
|
||||
Rule NZAQ 2008 max - Apr Sun>=1 2:00s 0 S
|
||||
# Scott Base, Ross Island, since 1957-01.
|
||||
# See Pacific/Auckland.
|
||||
|
||||
# Norway - territories
|
||||
# Bouvet (never inhabited)
|
||||
#
|
||||
# claims
|
||||
# Peter I Island (never inhabited)
|
||||
#
|
||||
# year-round base
|
||||
# Troll, Queen Maud Land, -720041+0023206, since 2005-02-12
|
||||
#
|
||||
# From Paul-Inge Flakstad (2014-03-10):
|
||||
# I recently had a long dialog about this with the developer of timegenie.com.
|
||||
# In the absence of specific dates, he decided to choose some likely ones:
|
||||
# GMT +1 - From March 1 to the last Sunday in March
|
||||
# GMT +2 - From the last Sunday in March until the last Sunday in October
|
||||
# GMT +1 - From the last Sunday in October until November 7
|
||||
# GMT +0 - From November 7 until March 1
|
||||
# The dates for switching to and from UTC+0 will probably not be absolutely
|
||||
# correct, but they should be quite close to the actual dates.
|
||||
#
|
||||
# From Paul Eggert (2014-03-21):
|
||||
# The CET-switching Troll rules require zic from tzcode 2014b or later, so as
|
||||
# suggested by Bengt-Inge Larsson comment them out for now, and approximate
|
||||
# with only UTC and CEST. Uncomment them when 2014b is more prevalent.
|
||||
#
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
#Rule Troll 2005 max - Mar 1 1:00u 1:00 CET
|
||||
Rule Troll 2005 max - Mar lastSun 1:00u 2:00 CEST
|
||||
#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 CET
|
||||
#Rule Troll 2004 max - Nov 7 1:00u 0:00 UTC
|
||||
# Remove the following line when uncommenting the above '#Rule' lines.
|
||||
Rule Troll 2004 max - Oct lastSun 1:00u 0:00 UTC
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/Troll 0 - zzz 2005 Feb 12
|
||||
0:00 Troll %s
|
||||
|
||||
# Poland - year-round base
|
||||
# Arctowski, King George Island, -620945-0582745, since 1977
|
||||
|
||||
# Romania - year-bound base
|
||||
# Law-Racoviță, Larsemann Hills, -692319+0762251, since 1986
|
||||
|
||||
# Russia - year-round bases
|
||||
# Bellingshausen, King George Island, -621159-0585337, since 1968-02-22
|
||||
# Mirny, Davis coast, -6633+09301, since 1956-02
|
||||
@@ -303,23 +281,23 @@ Rule NZAQ 2008 max - Apr Sun>=1 2:00s 0 S
|
||||
# year-round from 1960/61 to 1992
|
||||
|
||||
# Vostok, since 1957-12-16, temporarily closed 1994-02/1994-11
|
||||
# <a href="http://quest.arc.nasa.gov/antarctica/QA/computers/Directions,Time,ZIP">
|
||||
# From Craig Mundell (1994-12-15)</a>:
|
||||
# From Craig Mundell (1994-12-15)
|
||||
# <http://quest.arc.nasa.gov/antarctica/QA/computers/Directions,Time,ZIP>:
|
||||
# Vostok, which is one of the Russian stations, is set on the same
|
||||
# time as Moscow, Russia.
|
||||
#
|
||||
# From Lee Hotz (2001-03-08):
|
||||
# I queried the folks at Columbia who spent the summer at Vostok and this is
|
||||
# what they had to say about time there:
|
||||
# ``in the US Camp (East Camp) we have been on New Zealand (McMurdo)
|
||||
# "in the US Camp (East Camp) we have been on New Zealand (McMurdo)
|
||||
# time, which is 12 hours ahead of GMT. The Russian Station Vostok was
|
||||
# 6 hours behind that (although only 2 miles away, i.e. 6 hours ahead
|
||||
# of GMT). This is a time zone I think two hours east of Moscow. The
|
||||
# natural time zone is in between the two: 8 hours ahead of GMT.''
|
||||
# natural time zone is in between the two: 8 hours ahead of GMT."
|
||||
#
|
||||
# From Paul Eggert (2001-05-04):
|
||||
# This seems to be hopelessly confusing, so I asked Lee Hotz about it
|
||||
# in person. He said that some Antartic locations set their local
|
||||
# in person. He said that some Antarctic locations set their local
|
||||
# time so that noon is the warmest part of the day, and that this
|
||||
# changes during the year and does not necessarily correspond to mean
|
||||
# solar noon. So the Vostok time might have been whatever the clocks
|
||||
@@ -331,9 +309,12 @@ Zone Antarctica/Vostok 0 - zzz 1957 Dec 16
|
||||
|
||||
# S Africa - year-round bases
|
||||
# Marion Island, -4653+03752
|
||||
# Sanae, -7141-00250
|
||||
# SANAE IV, Vesleskarvet, Queen Maud Land, -714022-0025026, since 1997
|
||||
|
||||
# UK
|
||||
# Ukraine - year-round base
|
||||
# Vernadsky (formerly Faraday), Galindez Island, -651445-0641526, since 1954
|
||||
|
||||
# United Kingdom
|
||||
#
|
||||
# British Antarctic Territories (BAT) claims
|
||||
# South Orkney Islands
|
||||
@@ -380,16 +361,8 @@ Zone Antarctica/Palmer 0 - zzz 1965
|
||||
-4:00 ChileAQ CL%sT
|
||||
#
|
||||
#
|
||||
# McMurdo, Ross Island, since 1955-12
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/McMurdo 0 - zzz 1956
|
||||
12:00 NZAQ NZ%sT
|
||||
#
|
||||
# Amundsen-Scott, South Pole, continuously occupied since 1956-11-20
|
||||
#
|
||||
# From Paul Eggert (1996-09-03):
|
||||
# Normally it wouldn't have a separate entry, since it's like the
|
||||
# larger Antarctica/McMurdo since 1970, but it's too famous to omit.
|
||||
# McMurdo Station, Ross Island, since 1955-12
|
||||
# Amundsen-Scott South Pole Station, continuously occupied since 1956-11-20
|
||||
#
|
||||
# From Chris Carrier (1996-06-27):
|
||||
# Siple, the first commander of the South Pole station,
|
||||
@@ -397,7 +370,7 @@ Zone Antarctica/McMurdo 0 - zzz 1956
|
||||
# but that he found it more convenient to keep GMT+12
|
||||
# as supplies for the station were coming from McMurdo Sound,
|
||||
# which was on GMT+12 because New Zealand was on GMT+12 all year
|
||||
# at that time (1957). (Source: Siple's book 90 degrees SOUTH.)
|
||||
# at that time (1957). (Source: Siple's book 90 Degrees South.)
|
||||
#
|
||||
# From Susan Smith
|
||||
# http://www.cybertours.com/whs/pole10.html
|
||||
@@ -411,4 +384,4 @@ Zone Antarctica/McMurdo 0 - zzz 1956
|
||||
# we have to go around and set them back 5 minutes or so.
|
||||
# Maybe if we let them run fast all of the time, we'd get to leave here sooner!!
|
||||
#
|
||||
Link Antarctica/McMurdo Antarctica/South_Pole
|
||||
# See 'australasia' for Antarctica/McMurdo.
|
||||
+601
-470
File diff suppressed because it is too large.
Load diff
+507
-474
File diff suppressed because it is too large.
Load diff
+14
-11
@@ -1,5 +1,3 @@
|
||||
# <pre>
|
||||
# @(#)backward 8.11
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
@@ -7,7 +5,7 @@
|
||||
# and their old names. Many names changed in late 1993.
|
||||
|
||||
Link Africa/Asmara Africa/Asmera
|
||||
Link Africa/Bamako Africa/Timbuktu
|
||||
Link Africa/Abidjan Africa/Timbuktu
|
||||
Link America/Argentina/Catamarca America/Argentina/ComodRivadavia
|
||||
Link America/Adak America/Atka
|
||||
Link America/Argentina/Buenos_Aires America/Buenos_Aires
|
||||
@@ -23,15 +21,20 @@ Link America/Kentucky/Louisville America/Louisville
|
||||
Link America/Argentina/Mendoza America/Mendoza
|
||||
Link America/Rio_Branco America/Porto_Acre
|
||||
Link America/Argentina/Cordoba America/Rosario
|
||||
Link America/St_Thomas America/Virgin
|
||||
Link America/Denver America/Shiprock
|
||||
Link America/Port_of_Spain America/Virgin
|
||||
Link Pacific/Auckland Antarctica/South_Pole
|
||||
Link Asia/Ashgabat Asia/Ashkhabad
|
||||
Link Asia/Chongqing Asia/Chungking
|
||||
Link Asia/Dhaka Asia/Dacca
|
||||
Link Asia/Kathmandu Asia/Katmandu
|
||||
Link Asia/Kolkata Asia/Calcutta
|
||||
Link Asia/Shanghai Asia/Chongqing
|
||||
Link Asia/Shanghai Asia/Chungking
|
||||
Link Asia/Dhaka Asia/Dacca
|
||||
Link Asia/Shanghai Asia/Harbin
|
||||
Link Asia/Urumqi Asia/Kashgar
|
||||
Link Asia/Kathmandu Asia/Katmandu
|
||||
Link Asia/Macau Asia/Macao
|
||||
Link Asia/Jerusalem Asia/Tel_Aviv
|
||||
Link Asia/Ho_Chi_Minh Asia/Saigon
|
||||
Link Asia/Jerusalem Asia/Tel_Aviv
|
||||
Link Asia/Thimphu Asia/Thimbu
|
||||
Link Asia/Makassar Asia/Ujung_Pandang
|
||||
Link Asia/Ulaanbaatar Asia/Ulan_Bator
|
||||
@@ -89,10 +92,10 @@ Link Pacific/Auckland NZ
|
||||
Link Pacific/Chatham NZ-CHAT
|
||||
Link America/Denver Navajo
|
||||
Link Asia/Shanghai PRC
|
||||
Link Pacific/Pago_Pago Pacific/Samoa
|
||||
Link Pacific/Chuuk Pacific/Yap
|
||||
Link Pacific/Chuuk Pacific/Truk
|
||||
Link Pacific/Pohnpei Pacific/Ponape
|
||||
Link Pacific/Pago_Pago Pacific/Samoa
|
||||
Link Pacific/Chuuk Pacific/Truk
|
||||
Link Pacific/Chuuk Pacific/Yap
|
||||
Link Europe/Warsaw Poland
|
||||
Link Europe/Lisbon Portugal
|
||||
Link Asia/Taipei ROC
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# <pre>
|
||||
# @(#)etcetera 8.3
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
@@ -15,7 +13,7 @@ Zone Etc/UTC 0 - UTC
|
||||
Zone Etc/UCT 0 - UCT
|
||||
|
||||
# The following link uses older naming conventions,
|
||||
# but it belongs here, not in the file `backward',
|
||||
# but it belongs here, not in the file 'backward',
|
||||
# as functions like gmtime load the "UTC" file to handle leap seconds properly.
|
||||
# We want this to work even on installations that omit the other older names.
|
||||
Link Etc/UTC UTC
|
||||
@@ -32,9 +30,9 @@ Link Etc/GMT Etc/GMT0
|
||||
# even though this is the opposite of what many people expect.
|
||||
# POSIX has positive signs west of Greenwich, but many people expect
|
||||
# positive signs east of Greenwich. For example, TZ='Etc/GMT+4' uses
|
||||
# the abbreviation "GMT+4" and corresponds to 4 hours behind UTC
|
||||
# the abbreviation "GMT+4" and corresponds to 4 hours behind UT
|
||||
# (i.e. west of Greenwich) even though many people would expect it to
|
||||
# mean 4 hours ahead of UTC (i.e. east of Greenwich).
|
||||
# mean 4 hours ahead of UT (i.e. east of Greenwich).
|
||||
#
|
||||
# In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for
|
||||
# TZ='<GMT-4>+4'; if you want time zone abbreviations conforming to
|
||||
|
||||
+848
-365
File diff suppressed because it is too large.
Load diff
@@ -1,5 +1,3 @@
|
||||
# <pre>
|
||||
# @(#)factory 8.2
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
#
|
||||
# In the following text, the symbol '#' introduces
|
||||
# a comment, which continues from that symbol until
|
||||
# the end of the line. A plain comment line has a
|
||||
# whitespace character following the comment indicator.
|
||||
# There are also special comment lines defined below.
|
||||
# A special comment will always have a non-whitespace
|
||||
# character in column 2.
|
||||
#
|
||||
# A blank line should be ignored.
|
||||
#
|
||||
# The following table shows the corrections that must
|
||||
# be applied to compute International Atomic Time (TAI)
|
||||
# from the Coordinated Universal Time (UTC) values that
|
||||
# are transmitted by almost all time services.
|
||||
#
|
||||
# The first column shows an epoch as a number of seconds
|
||||
# since 1 January 1900, 00:00:00 (1900.0 is also used to
|
||||
# indicate the same epoch.) Both of these time stamp formats
|
||||
# ignore the complexities of the time scales that were
|
||||
# used before the current definition of UTC at the start
|
||||
# of 1972. (See note 3 below.)
|
||||
# The second column shows the number of seconds that
|
||||
# must be added to UTC to compute TAI for any timestamp
|
||||
# at or after that epoch. The value on each line is
|
||||
# valid from the indicated initial instant until the
|
||||
# epoch given on the next one or indefinitely into the
|
||||
# future if there is no next line.
|
||||
# (The comment on each line shows the representation of
|
||||
# the corresponding initial epoch in the usual
|
||||
# day-month-year format. The epoch always begins at
|
||||
# 00:00:00 UTC on the indicated day. See Note 5 below.)
|
||||
#
|
||||
# Important notes:
|
||||
#
|
||||
# 1. Coordinated Universal Time (UTC) is often referred to
|
||||
# as Greenwich Mean Time (GMT). The GMT time scale is no
|
||||
# longer used, and the use of GMT to designate UTC is
|
||||
# discouraged.
|
||||
#
|
||||
# 2. The UTC time scale is realized by many national
|
||||
# laboratories and timing centers. Each laboratory
|
||||
# identifies its realization with its name: Thus
|
||||
# UTC(NIST), UTC(USNO), etc. The differences among
|
||||
# these different realizations are typically on the
|
||||
# order of a few nanoseconds (i.e., 0.000 000 00x s)
|
||||
# and can be ignored for many purposes. These differences
|
||||
# are tabulated in Circular T, which is published monthly
|
||||
# by the International Bureau of Weights and Measures
|
||||
# (BIPM). See www.bipm.fr for more information.
|
||||
#
|
||||
# 3. The current definition of the relationship between UTC
|
||||
# and TAI dates from 1 January 1972. A number of different
|
||||
# time scales were in use before that epoch, and it can be
|
||||
# quite difficult to compute precise timestamps and time
|
||||
# intervals in those "prehistoric" days. For more information,
|
||||
# consult:
|
||||
#
|
||||
# The Explanatory Supplement to the Astronomical
|
||||
# Ephemeris.
|
||||
# or
|
||||
# Terry Quinn, "The BIPM and the Accurate Measurement
|
||||
# of Time," Proc. of the IEEE, Vol. 79, pp. 894-905,
|
||||
# July, 1991.
|
||||
#
|
||||
# 4. The decision to insert a leap second into UTC is currently
|
||||
# the responsibility of the International Earth Rotation and
|
||||
# Reference Systems Service. (The name was changed from the
|
||||
# International Earth Rotation Service, but the acronym IERS
|
||||
# is still used.)
|
||||
#
|
||||
# Leap seconds are announced by the IERS in its Bulletin C.
|
||||
#
|
||||
# See www.iers.org for more details.
|
||||
#
|
||||
# Every national laboratory and timing center uses the
|
||||
# data from the BIPM and the IERS to construct UTC(lab),
|
||||
# their local realization of UTC.
|
||||
#
|
||||
# Although the definition also includes the possibility
|
||||
# of dropping seconds ("negative" leap seconds), this has
|
||||
# never been done and is unlikely to be necessary in the
|
||||
# foreseeable future.
|
||||
#
|
||||
# 5. If your system keeps time as the number of seconds since
|
||||
# some epoch (e.g., NTP timestamps), then the algorithm for
|
||||
# assigning a UTC time stamp to an event that happens during a positive
|
||||
# leap second is not well defined. The official name of that leap
|
||||
# second is 23:59:60, but there is no way of representing that time
|
||||
# in these systems.
|
||||
# Many systems of this type effectively stop the system clock for
|
||||
# one second during the leap second and use a time that is equivalent
|
||||
# to 23:59:59 UTC twice. For these systems, the corresponding TAI
|
||||
# timestamp would be obtained by advancing to the next entry in the
|
||||
# following table when the time equivalent to 23:59:59 UTC
|
||||
# is used for the second time. Thus the leap second which
|
||||
# occurred on 30 June 1972 at 23:59:59 UTC would have TAI
|
||||
# timestamps computed as follows:
|
||||
#
|
||||
# ...
|
||||
# 30 June 1972 23:59:59 (2287785599, first time): TAI= UTC + 10 seconds
|
||||
# 30 June 1972 23:59:60 (2287785599,second time): TAI= UTC + 11 seconds
|
||||
# 1 July 1972 00:00:00 (2287785600) TAI= UTC + 11 seconds
|
||||
# ...
|
||||
#
|
||||
# If your system realizes the leap second by repeating 00:00:00 UTC twice
|
||||
# (this is possible but not usual), then the advance to the next entry
|
||||
# in the table must occur the second time that a time equivalent to
|
||||
# 00:00:00 UTC is used. Thus, using the same example as above:
|
||||
#
|
||||
# ...
|
||||
# 30 June 1972 23:59:59 (2287785599): TAI= UTC + 10 seconds
|
||||
# 30 June 1972 23:59:60 (2287785600, first time): TAI= UTC + 10 seconds
|
||||
# 1 July 1972 00:00:00 (2287785600,second time): TAI= UTC + 11 seconds
|
||||
# ...
|
||||
#
|
||||
# in both cases the use of timestamps based on TAI produces a smooth
|
||||
# time scale with no discontinuity in the time interval. However,
|
||||
# although the long-term behavior of the time scale is correct in both
|
||||
# methods, the second method is technically not correct because it adds
|
||||
# the extra second to the wrong day.
|
||||
#
|
||||
# This complexity would not be needed for negative leap seconds (if they
|
||||
# are ever used). The UTC time would skip 23:59:59 and advance from
|
||||
# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by
|
||||
# 1 second at the same instant. This is a much easier situation to deal
|
||||
# with, since the difficulty of unambiguously representing the epoch
|
||||
# during the leap second does not arise.
|
||||
#
|
||||
# Questions or comments to:
|
||||
# Judah Levine
|
||||
# Time and Frequency Division
|
||||
# NIST
|
||||
# Boulder, Colorado
|
||||
# [email protected]
|
||||
#
|
||||
# Last Update of leap second values: 11 January 2012
|
||||
#
|
||||
# The following line shows this last update date in NTP timestamp
|
||||
# format. This is the date on which the most recent change to
|
||||
# the leap second data was added to the file. This line can
|
||||
# be identified by the unique pair of characters in the first two
|
||||
# columns as shown below.
|
||||
#
|
||||
#$ 3535228800
|
||||
#
|
||||
# The NTP timestamps are in units of seconds since the NTP epoch,
|
||||
# which is 1 January 1900, 00:00:00. The Modified Julian Day number
|
||||
# corresponding to the NTP time stamp, X, can be computed as
|
||||
#
|
||||
# X/86400 + 15020
|
||||
#
|
||||
# where the first term converts seconds to days and the second
|
||||
# term adds the MJD corresponding to the time origin defined above.
|
||||
# The integer portion of the result is the integer MJD for that
|
||||
# day, and any remainder is the time of day, expressed as the
|
||||
# fraction of the day since 0 hours UTC. The conversion from day
|
||||
# fraction to seconds or to hours, minutes, and seconds may involve
|
||||
# rounding or truncation, depending on the method used in the
|
||||
# computation.
|
||||
#
|
||||
# The data in this file will be updated periodically as new leap
|
||||
# seconds are announced. In addition to being entered on the line
|
||||
# above, the update time (in NTP format) will be added to the basic
|
||||
# file name leap-seconds to form the name leap-seconds.<NTP TIME>.
|
||||
# In addition, the generic name leap-seconds.list will always point to
|
||||
# the most recent version of the file.
|
||||
#
|
||||
# This update procedure will be performed only when a new leap second
|
||||
# is announced.
|
||||
#
|
||||
# The following entry specifies the expiration date of the data
|
||||
# in this file in units of seconds since the origin at the instant
|
||||
# 1 January 1900, 00:00:00. This expiration date will be changed
|
||||
# at least twice per year whether or not a new leap second is
|
||||
# announced. These semi-annual changes will be made no later
|
||||
# than 1 June and 1 December of each year to indicate what
|
||||
# action (if any) is to be taken on 30 June and 31 December,
|
||||
# respectively. (These are the customary effective dates for new
|
||||
# leap seconds.) This expiration date will be identified by a
|
||||
# unique pair of characters in columns 1 and 2 as shown below.
|
||||
# In the unlikely event that a leap second is announced with an
|
||||
# effective date other than 30 June or 31 December, then this
|
||||
# file will be edited to include that leap second as soon as it is
|
||||
# announced or at least one month before the effective date
|
||||
# (whichever is later).
|
||||
# If an announcement by the IERS specifies that no leap second is
|
||||
# scheduled, then only the expiration date of the file will
|
||||
# be advanced to show that the information in the file is still
|
||||
# current -- the update time stamp, the data and the name of the file
|
||||
# will not change.
|
||||
#
|
||||
# Updated through IERS Bulletin C48
|
||||
# File expires on: 28 June 2015
|
||||
#
|
||||
#@ 3644438400
|
||||
#
|
||||
2272060800 10 # 1 Jan 1972
|
||||
2287785600 11 # 1 Jul 1972
|
||||
2303683200 12 # 1 Jan 1973
|
||||
2335219200 13 # 1 Jan 1974
|
||||
2366755200 14 # 1 Jan 1975
|
||||
2398291200 15 # 1 Jan 1976
|
||||
2429913600 16 # 1 Jan 1977
|
||||
2461449600 17 # 1 Jan 1978
|
||||
2492985600 18 # 1 Jan 1979
|
||||
2524521600 19 # 1 Jan 1980
|
||||
2571782400 20 # 1 Jul 1981
|
||||
2603318400 21 # 1 Jul 1982
|
||||
2634854400 22 # 1 Jul 1983
|
||||
2698012800 23 # 1 Jul 1985
|
||||
2776982400 24 # 1 Jan 1988
|
||||
2840140800 25 # 1 Jan 1990
|
||||
2871676800 26 # 1 Jan 1991
|
||||
2918937600 27 # 1 Jul 1992
|
||||
2950473600 28 # 1 Jul 1993
|
||||
2982009600 29 # 1 Jul 1994
|
||||
3029443200 30 # 1 Jan 1996
|
||||
3076704000 31 # 1 Jul 1997
|
||||
3124137600 32 # 1 Jan 1999
|
||||
3345062400 33 # 1 Jan 2006
|
||||
3439756800 34 # 1 Jan 2009
|
||||
3550089600 35 # 1 Jul 2012
|
||||
#
|
||||
# the following special comment contains the
|
||||
# hash value of the data in this file computed
|
||||
# use the secure hash algorithm as specified
|
||||
# by FIPS 180-1. See the files in ~/pub/sha for
|
||||
# the details of how this hash value is
|
||||
# computed. Note that the hash computation
|
||||
# ignores comments and whitespace characters
|
||||
# in data lines. It includes the NTP values
|
||||
# of both the last modification time and the
|
||||
# expiration time of the file, but not the
|
||||
# white space on those lines.
|
||||
# the hash line is also ignored in the
|
||||
# computation.
|
||||
#
|
||||
#h a4862ccd c6f43c6 964f3604 85944a26 b5cfad4e
|
||||
@@ -1,5 +1,4 @@
|
||||
# <pre>
|
||||
# @(#)leapseconds 8.13
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
@@ -78,8 +77,8 @@ Leap 2012 Jun 30 23:59:60 + S
|
||||
#
|
||||
#
|
||||
# A positive leap second will be introduced at the end of June 2012.
|
||||
# The sequence of dates of the UTC second markers will be:
|
||||
#
|
||||
# The sequence of dates of the UTC second markers will be:
|
||||
#
|
||||
# 2012 June 30, 23h 59m 59s
|
||||
# 2012 June 30, 23h 59m 60s
|
||||
# 2012 July 1, 0h 0m 0s
|
||||
@@ -96,6 +95,6 @@ Leap 2012 Jun 30 23:59:60 + S
|
||||
#
|
||||
#
|
||||
# Daniel GAMBIS
|
||||
# Head
|
||||
# Head
|
||||
# Earth Orientation Center of IERS
|
||||
# Observatoire de Paris, France
|
||||
+279
-320
File diff suppressed because it is too large.
Load diff
@@ -1,5 +1,3 @@
|
||||
# <pre>
|
||||
# @(#)pacificnew 8.2
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
|
||||
+274
-276
File diff suppressed because it is too large.
Load diff
@@ -1,5 +1,3 @@
|
||||
# <pre>
|
||||
# @(#)systemv 8.2
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
: 'This file is in the public domain, so clarified as of'
|
||||
: '2006-07-17 by Arthur David Olson.'
|
||||
|
||||
: '@(#)yearistype.sh 8.2'
|
||||
|
||||
case $#-$1 in
|
||||
2-|2-0*|2-*[!0-9]*)
|
||||
echo "$0: wild year - $1" >&2
|
||||
echo "$0: wild year: $1" >&2
|
||||
exit 1 ;;
|
||||
esac
|
||||
|
||||
@@ -33,7 +31,7 @@ case $#-$2 in
|
||||
*) exit 1 ;;
|
||||
esac ;;
|
||||
2-*)
|
||||
echo "$0: wild type - $2" >&2 ;;
|
||||
echo "$0: wild type: $2" >&2 ;;
|
||||
esac
|
||||
|
||||
echo "$0: usage is $0 year even|odd|uspres|nonpres|nonuspres" >&2
|
||||
|
||||
+41
-44
@@ -1,27 +1,24 @@
|
||||
# <pre>
|
||||
# @(#)zone.tab 8.54
|
||||
# tz zone descriptions (deprecated version)
|
||||
#
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
#
|
||||
# TZ zone descriptions
|
||||
# From Paul Eggert (2014-07-31):
|
||||
# This file is intended as a backward-compatibility aid for older programs.
|
||||
# New programs should use zone1970.tab. This file is like zone1970.tab (see
|
||||
# zone1970.tab's comments), but with the following additional restrictions:
|
||||
#
|
||||
# From Paul Eggert (1996-08-05):
|
||||
# 1. This file contains only ASCII characters.
|
||||
# 2. The first data column contains exactly one country code.
|
||||
#
|
||||
# This file contains a table with the following columns:
|
||||
# 1. ISO 3166 2-character country code. See /usr/share/misc/iso3166.
|
||||
# 2. Latitude and longitude of the zone's principal location
|
||||
# in ISO 6709 sign-degrees-minutes-seconds format,
|
||||
# either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
|
||||
# first latitude (+ is north), then longitude (+ is east).
|
||||
# 3. Zone name used in value of TZ environment variable.
|
||||
# 4. Comments; present if and only if the country has multiple rows.
|
||||
# Because of (2), each row stands for an area that is the intersection
|
||||
# of a region identified by a country code and of a zone where civil
|
||||
# clocks have agreed since 1970; this is a narrower definition than
|
||||
# that of zone1970.tab.
|
||||
#
|
||||
# Columns are separated by a single tab.
|
||||
# The table is sorted first by country, then an order within the country that
|
||||
# (1) makes some geographical sense, and
|
||||
# (2) puts the most populous zones first, where that does not contradict (1).
|
||||
#
|
||||
# Lines beginning with `#' are comments.
|
||||
# This table is intended as an aid for users, to help them select time
|
||||
# zone data appropriate for their practical needs. It is not intended
|
||||
# to take or endorse any position on legal or territorial claims.
|
||||
#
|
||||
#country-
|
||||
#code coordinates TZ comments
|
||||
@@ -33,8 +30,7 @@ AI +1812-06304 America/Anguilla
|
||||
AL +4120+01950 Europe/Tirane
|
||||
AM +4011+04430 Asia/Yerevan
|
||||
AO -0848+01314 Africa/Luanda
|
||||
AQ -7750+16636 Antarctica/McMurdo McMurdo Station, Ross Island
|
||||
AQ -9000+00000 Antarctica/South_Pole Amundsen-Scott Station, South Pole
|
||||
AQ -7750+16636 Antarctica/McMurdo McMurdo, South Pole, Scott (New Zealand time)
|
||||
AQ -6734-06808 Antarctica/Rothera Rothera Station, Adelaide Island
|
||||
AQ -6448-06406 Antarctica/Palmer Palmer Station, Anvers Island
|
||||
AQ -6736+06253 Antarctica/Mawson Mawson Station, Holme Bay
|
||||
@@ -43,7 +39,7 @@ AQ -6617+11031 Antarctica/Casey Casey Station, Bailey Peninsula
|
||||
AQ -7824+10654 Antarctica/Vostok Vostok Station, Lake Vostok
|
||||
AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville Station, Terre Adelie
|
||||
AQ -690022+0393524 Antarctica/Syowa Syowa Station, E Ongul I
|
||||
AQ -5430+15857 Antarctica/Macquarie Macquarie Island Station, Macquarie Island
|
||||
AQ -720041+0023206 Antarctica/Troll Troll Station, Queen Maud Land
|
||||
AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF)
|
||||
AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, MN, SE, SF)
|
||||
AR -2447-06525 America/Argentina/Salta (SA, LP, NQ, RN)
|
||||
@@ -59,6 +55,7 @@ AR -5448-06818 America/Argentina/Ushuaia Tierra del Fuego (TF)
|
||||
AS -1416-17042 Pacific/Pago_Pago
|
||||
AT +4813+01620 Europe/Vienna
|
||||
AU -3133+15905 Australia/Lord_Howe Lord Howe Island
|
||||
AU -5430+15857 Antarctica/Macquarie Macquarie Island
|
||||
AU -4253+14719 Australia/Hobart Tasmania - most locations
|
||||
AU -3956+14352 Australia/Currie Tasmania - King Island
|
||||
AU -3749+14458 Australia/Melbourne Victoria
|
||||
@@ -114,13 +111,12 @@ CA +4612-05957 America/Glace_Bay Atlantic Time - Nova Scotia - places that did n
|
||||
CA +4606-06447 America/Moncton Atlantic Time - New Brunswick
|
||||
CA +5320-06025 America/Goose_Bay Atlantic Time - Labrador - most locations
|
||||
CA +5125-05707 America/Blanc-Sablon Atlantic Standard Time - Quebec - Lower North Shore
|
||||
CA +4531-07334 America/Montreal Eastern Time - Quebec - most locations
|
||||
CA +4339-07923 America/Toronto Eastern Time - Ontario - most locations
|
||||
CA +4339-07923 America/Toronto Eastern Time - Ontario & Quebec - most locations
|
||||
CA +4901-08816 America/Nipigon Eastern Time - Ontario & Quebec - places that did not observe DST 1967-1973
|
||||
CA +4823-08915 America/Thunder_Bay Eastern Time - Thunder Bay, Ontario
|
||||
CA +6344-06828 America/Iqaluit Eastern Time - east Nunavut - most locations
|
||||
CA +6608-06544 America/Pangnirtung Eastern Time - Pangnirtung, Nunavut
|
||||
CA +744144-0944945 America/Resolute Central Standard Time - Resolute, Nunavut
|
||||
CA +744144-0944945 America/Resolute Central Time - Resolute, Nunavut
|
||||
CA +484531-0913718 America/Atikokan Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
|
||||
CA +624900-0920459 America/Rankin_Inlet Central Time - central Nunavut
|
||||
CA +4953-09709 America/Winnipeg Central Time - Manitoba & west Ontario
|
||||
@@ -131,7 +127,7 @@ CA +5333-11328 America/Edmonton Mountain Time - Alberta, east British Columbia &
|
||||
CA +690650-1050310 America/Cambridge_Bay Mountain Time - west Nunavut
|
||||
CA +6227-11421 America/Yellowknife Mountain Time - central Northwest Territories
|
||||
CA +682059-1334300 America/Inuvik Mountain Time - west Northwest Territories
|
||||
CA +4906-11631 America/Creston Mountain Standard Time - Creston, British Columbia
|
||||
CA +4906-11631 America/Creston Mountain Standard Time - Creston, British Columbia
|
||||
CA +5946-12014 America/Dawson_Creek Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia
|
||||
CA +4916-12307 America/Vancouver Pacific Time - west British Columbia
|
||||
CA +6043-13503 America/Whitehorse Pacific Time - south Yukon
|
||||
@@ -145,13 +141,10 @@ CH +4723+00832 Europe/Zurich
|
||||
CI +0519-00402 Africa/Abidjan
|
||||
CK -2114-15946 Pacific/Rarotonga
|
||||
CL -3327-07040 America/Santiago most locations
|
||||
CL -2709-10926 Pacific/Easter Easter Island & Sala y Gomez
|
||||
CL -2709-10926 Pacific/Easter Easter Island
|
||||
CM +0403+00942 Africa/Douala
|
||||
CN +3114+12128 Asia/Shanghai east China - Beijing, Guangdong, Shanghai, etc.
|
||||
CN +4545+12641 Asia/Harbin Heilongjiang (except Mohe), Jilin
|
||||
CN +2934+10635 Asia/Chongqing central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.
|
||||
CN +4348+08735 Asia/Urumqi most of Tibet & Xinjiang
|
||||
CN +3929+07559 Asia/Kashgar west Tibet & Xinjiang
|
||||
CN +3114+12128 Asia/Shanghai Beijing Time
|
||||
CN +4348+08735 Asia/Urumqi Xinjiang Time
|
||||
CO +0436-07405 America/Bogota
|
||||
CR +0956-08405 America/Costa_Rica
|
||||
CU +2308-08222 America/Havana
|
||||
@@ -160,7 +153,8 @@ CW +1211-06900 America/Curacao
|
||||
CX -1025+10543 Indian/Christmas
|
||||
CY +3510+03322 Asia/Nicosia
|
||||
CZ +5005+01426 Europe/Prague
|
||||
DE +5230+01322 Europe/Berlin
|
||||
DE +5230+01322 Europe/Berlin most locations
|
||||
DE +4742+00841 Europe/Busingen Busingen
|
||||
DJ +1136+04309 Africa/Djibouti
|
||||
DK +5540+01235 Europe/Copenhagen
|
||||
DM +1518-06124 America/Dominica
|
||||
@@ -216,7 +210,7 @@ ID -0002+10920 Asia/Pontianak west & central Borneo
|
||||
ID -0507+11924 Asia/Makassar east & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor
|
||||
ID -0232+14042 Asia/Jayapura west New Guinea (Irian Jaya) & Malukus (Moluccas)
|
||||
IE +5320-00615 Europe/Dublin
|
||||
IL +3146+03514 Asia/Jerusalem
|
||||
IL +314650+0351326 Asia/Jerusalem
|
||||
IM +5409-00428 Europe/Isle_of_Man
|
||||
IN +2232+08822 Asia/Kolkata
|
||||
IO -0720+07225 Indian/Chagos
|
||||
@@ -225,7 +219,7 @@ IR +3540+05126 Asia/Tehran
|
||||
IS +6409-02151 Atlantic/Reykjavik
|
||||
IT +4154+01229 Europe/Rome
|
||||
JE +4912-00207 Europe/Jersey
|
||||
JM +1800-07648 America/Jamaica
|
||||
JM +175805-0764736 America/Jamaica
|
||||
JO +3157+03556 Asia/Amman
|
||||
JP +353916+1394441 Asia/Tokyo
|
||||
KE -0117+03649 Africa/Nairobi
|
||||
@@ -332,21 +326,26 @@ RE -2052+05528 Indian/Reunion
|
||||
RO +4426+02606 Europe/Bucharest
|
||||
RS +4450+02030 Europe/Belgrade
|
||||
RU +5443+02030 Europe/Kaliningrad Moscow-01 - Kaliningrad
|
||||
RU +5545+03735 Europe/Moscow Moscow+00 - west Russia
|
||||
RU +554521+0373704 Europe/Moscow Moscow+00 - west Russia
|
||||
RU +4457+03406 Europe/Simferopol Moscow+00 - Crimea
|
||||
RU +4844+04425 Europe/Volgograd Moscow+00 - Caspian Sea
|
||||
RU +5312+05009 Europe/Samara Moscow+00 - Samara, Udmurtia
|
||||
RU +5312+05009 Europe/Samara Moscow+00 (Moscow+01 after 2014-10-26) - Samara, Udmurtia
|
||||
RU +5651+06036 Asia/Yekaterinburg Moscow+02 - Urals
|
||||
RU +5500+07324 Asia/Omsk Moscow+03 - west Siberia
|
||||
RU +5502+08255 Asia/Novosibirsk Moscow+03 - Novosibirsk
|
||||
RU +5345+08707 Asia/Novokuznetsk Moscow+03 - Novokuznetsk
|
||||
RU +5345+08707 Asia/Novokuznetsk Moscow+03 (Moscow+04 after 2014-10-26) - Kemerovo
|
||||
RU +5601+09250 Asia/Krasnoyarsk Moscow+04 - Yenisei River
|
||||
RU +5216+10420 Asia/Irkutsk Moscow+05 - Lake Baikal
|
||||
RU +5203+11328 Asia/Chita Moscow+06 (Moscow+05 after 2014-10-26) - Zabaykalsky
|
||||
RU +6200+12940 Asia/Yakutsk Moscow+06 - Lena River
|
||||
RU +623923+1353314 Asia/Khandyga Moscow+06 - Tomponsky, Ust-Maysky
|
||||
RU +4310+13156 Asia/Vladivostok Moscow+07 - Amur River
|
||||
RU +4658+14242 Asia/Sakhalin Moscow+07 - Sakhalin Island
|
||||
RU +5934+15048 Asia/Magadan Moscow+08 - Magadan
|
||||
RU +5301+15839 Asia/Kamchatka Moscow+08 - Kamchatka
|
||||
RU +6445+17729 Asia/Anadyr Moscow+08 - Bering Sea
|
||||
RU +643337+1431336 Asia/Ust-Nera Moscow+07 - Oymyakonsky
|
||||
RU +5934+15048 Asia/Magadan Moscow+08 (Moscow+07 after 2014-10-26) - Magadan
|
||||
RU +6728+15343 Asia/Srednekolymsk Moscow+08 - E Sakha, N Kuril Is
|
||||
RU +5301+15839 Asia/Kamchatka Moscow+08 (Moscow+09 after 2014-10-26) - Kamchatka
|
||||
RU +6445+17729 Asia/Anadyr Moscow+08 (Moscow+09 after 2014-10-26) - Bering Sea
|
||||
RW -0157+03004 Africa/Kigali
|
||||
SA +2438+04643 Asia/Riyadh
|
||||
SB -0932+16012 Pacific/Guadalcanal
|
||||
@@ -388,7 +387,6 @@ TZ -0648+03917 Africa/Dar_es_Salaam
|
||||
UA +5026+03031 Europe/Kiev most locations
|
||||
UA +4837+02218 Europe/Uzhgorod Ruthenia
|
||||
UA +4750+03510 Europe/Zaporozhye Zaporozh'ye, E Lugansk / Zaporizhia, E Luhansk
|
||||
UA +4457+03406 Europe/Simferopol central Crimea
|
||||
UG +0019+03225 Africa/Kampala
|
||||
UM +1645-16931 Pacific/Johnston Johnston Atoll
|
||||
UM +2813-17722 Pacific/Midway Midway Islands
|
||||
@@ -412,16 +410,15 @@ US +465042-1012439 America/North_Dakota/New_Salem Central Time - North Dakota -
|
||||
US +471551-1014640 America/North_Dakota/Beulah Central Time - North Dakota - Mercer County
|
||||
US +394421-1045903 America/Denver Mountain Time
|
||||
US +433649-1161209 America/Boise Mountain Time - south Idaho & east Oregon
|
||||
US +364708-1084111 America/Shiprock Mountain Time - Navajo
|
||||
US +332654-1120424 America/Phoenix Mountain Standard Time - Arizona
|
||||
US +332654-1120424 America/Phoenix Mountain Standard Time - Arizona (except Navajo)
|
||||
US +340308-1181434 America/Los_Angeles Pacific Time
|
||||
US +550737-1313435 America/Metlakatla Pacific Standard Time - Annette Island, Alaska
|
||||
US +611305-1495401 America/Anchorage Alaska Time
|
||||
US +581807-1342511 America/Juneau Alaska Time - Alaska panhandle
|
||||
US +571035-1351807 America/Sitka Alaska Time - southeast Alaska panhandle
|
||||
US +593249-1394338 America/Yakutat Alaska Time - Alaska panhandle neck
|
||||
US +643004-1652423 America/Nome Alaska Time - west Alaska
|
||||
US +515248-1763929 America/Adak Aleutian Islands
|
||||
US +550737-1313435 America/Metlakatla Metlakatla Time - Annette Island
|
||||
US +211825-1575130 Pacific/Honolulu Hawaii
|
||||
UY -3453-05611 America/Montevideo
|
||||
UZ +3940+06648 Asia/Samarkand west Uzbekistan
|
||||
|
||||
@@ -0,0 +1,370 @@
|
||||
# tz zone descriptions
|
||||
#
|
||||
# This file is in the public domain.
|
||||
#
|
||||
# From Paul Eggert (2014-07-31):
|
||||
# This file contains a table where each row stands for a zone where
|
||||
# civil time stamps have agreed since 1970. Columns are separated by
|
||||
# a single tab. Lines beginning with '#' are comments. All text uses
|
||||
# UTF-8 encoding. The columns of the table are as follows:
|
||||
#
|
||||
# 1. The countries that overlap the zone, as a comma-separated list
|
||||
# of ISO 3166 2-character country codes.
|
||||
# See the file '/usr/share/misc/iso3166'.
|
||||
# 2. Latitude and longitude of the zone's principal location
|
||||
# in ISO 6709 sign-degrees-minutes-seconds format,
|
||||
# either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
|
||||
# first latitude (+ is north), then longitude (+ is east).
|
||||
# 3. Zone name used in value of TZ environment variable.
|
||||
# Please see the 'Theory' file for how zone names are chosen.
|
||||
# If multiple zones overlap a country, each has a row in the
|
||||
# table, with each column 1 containing the country code.
|
||||
# 4. Comments; present if and only if a country has multiple zones.
|
||||
#
|
||||
# If a zone covers multiple countries, the most-populous city is used,
|
||||
# and that country is listed first in column 1; any other countries
|
||||
# are listed alphabetically by country code. The table is sorted
|
||||
# first by country code, then (if possible) by an order within the
|
||||
# country that (1) makes some geographical sense, and (2) puts the
|
||||
# most populous zones first, where that does not contradict (1).
|
||||
#
|
||||
# This table is intended as an aid for users, to help them select time
|
||||
# zone data appropriate for their practical needs. It is not intended
|
||||
# to take or endorse any position on legal or territorial claims.
|
||||
#
|
||||
#country-
|
||||
#codes coordinates TZ comments
|
||||
AD +4230+00131 Europe/Andorra
|
||||
AE,OM +2518+05518 Asia/Dubai
|
||||
AF +3431+06912 Asia/Kabul
|
||||
AL +4120+01950 Europe/Tirane
|
||||
AM +4011+04430 Asia/Yerevan
|
||||
AQ -6734-06808 Antarctica/Rothera Rothera Station, Adelaide Island
|
||||
AQ -6448-06406 Antarctica/Palmer Palmer Station, Anvers Island
|
||||
AQ -6736+06253 Antarctica/Mawson Mawson Station, Holme Bay
|
||||
AQ -6835+07758 Antarctica/Davis Davis Station, Vestfold Hills
|
||||
AQ -6617+11031 Antarctica/Casey Casey Station, Bailey Peninsula
|
||||
AQ -7824+10654 Antarctica/Vostok Vostok Station, Lake Vostok
|
||||
AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville Station, Terre Adelie
|
||||
AQ -690022+0393524 Antarctica/Syowa Syowa Station, E Ongul I
|
||||
AQ -720041+0023206 Antarctica/Troll Troll Station, Queen Maud Land
|
||||
AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF)
|
||||
AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, MN, SE, SF)
|
||||
AR -2447-06525 America/Argentina/Salta (SA, LP, NQ, RN)
|
||||
AR -2411-06518 America/Argentina/Jujuy Jujuy (JY)
|
||||
AR -2649-06513 America/Argentina/Tucuman Tucumán (TM)
|
||||
AR -2828-06547 America/Argentina/Catamarca Catamarca (CT), Chubut (CH)
|
||||
AR -2926-06651 America/Argentina/La_Rioja La Rioja (LR)
|
||||
AR -3132-06831 America/Argentina/San_Juan San Juan (SJ)
|
||||
AR -3253-06849 America/Argentina/Mendoza Mendoza (MZ)
|
||||
AR -3319-06621 America/Argentina/San_Luis San Luis (SL)
|
||||
AR -5138-06913 America/Argentina/Rio_Gallegos Santa Cruz (SC)
|
||||
AR -5448-06818 America/Argentina/Ushuaia Tierra del Fuego (TF)
|
||||
AS,UM -1416-17042 Pacific/Pago_Pago Samoa, Midway
|
||||
AT +4813+01620 Europe/Vienna
|
||||
AU -3133+15905 Australia/Lord_Howe Lord Howe Island
|
||||
AU -5430+15857 Antarctica/Macquarie Macquarie Island
|
||||
AU -4253+14719 Australia/Hobart Tasmania - most locations
|
||||
AU -3956+14352 Australia/Currie Tasmania - King Island
|
||||
AU -3749+14458 Australia/Melbourne Victoria
|
||||
AU -3352+15113 Australia/Sydney New South Wales - most locations
|
||||
AU -3157+14127 Australia/Broken_Hill New South Wales - Yancowinna
|
||||
AU -2728+15302 Australia/Brisbane Queensland - most locations
|
||||
AU -2016+14900 Australia/Lindeman Queensland - Holiday Islands
|
||||
AU -3455+13835 Australia/Adelaide South Australia
|
||||
AU -1228+13050 Australia/Darwin Northern Territory
|
||||
AU -3157+11551 Australia/Perth Western Australia - most locations
|
||||
AU -3143+12852 Australia/Eucla Western Australia - Eucla area
|
||||
AZ +4023+04951 Asia/Baku
|
||||
BB +1306-05937 America/Barbados
|
||||
BD +2343+09025 Asia/Dhaka
|
||||
BE +5050+00420 Europe/Brussels
|
||||
BG +4241+02319 Europe/Sofia
|
||||
BM +3217-06446 Atlantic/Bermuda
|
||||
BN +0456+11455 Asia/Brunei
|
||||
BO -1630-06809 America/La_Paz
|
||||
BR -0351-03225 America/Noronha Atlantic islands
|
||||
BR -0127-04829 America/Belem Amapá, E Pará
|
||||
BR -0343-03830 America/Fortaleza NE Brazil (MA, PI, CE, RN, PB)
|
||||
BR -0803-03454 America/Recife Pernambuco
|
||||
BR -0712-04812 America/Araguaina Tocantins
|
||||
BR -0940-03543 America/Maceio Alagoas, Sergipe
|
||||
BR -1259-03831 America/Bahia Bahia
|
||||
BR -2332-04637 America/Sao_Paulo S & SE Brazil (GO, DF, MG, ES, RJ, SP, PR, SC, RS)
|
||||
BR -2027-05437 America/Campo_Grande Mato Grosso do Sul
|
||||
BR -1535-05605 America/Cuiaba Mato Grosso
|
||||
BR -0226-05452 America/Santarem W Pará
|
||||
BR -0846-06354 America/Porto_Velho Rondônia
|
||||
BR +0249-06040 America/Boa_Vista Roraima
|
||||
BR -0308-06001 America/Manaus E Amazonas
|
||||
BR -0640-06952 America/Eirunepe W Amazonas
|
||||
BR -0958-06748 America/Rio_Branco Acre
|
||||
BS +2505-07721 America/Nassau
|
||||
BT +2728+08939 Asia/Thimphu
|
||||
BY +5354+02734 Europe/Minsk
|
||||
BZ +1730-08812 America/Belize
|
||||
CA +4734-05243 America/St_Johns Newfoundland Time, including SE Labrador
|
||||
CA +4439-06336 America/Halifax Atlantic Time - Nova Scotia (most places), PEI
|
||||
CA +4612-05957 America/Glace_Bay Atlantic Time - Nova Scotia - places that did not observe DST 1966-1971
|
||||
CA +4606-06447 America/Moncton Atlantic Time - New Brunswick
|
||||
CA +5320-06025 America/Goose_Bay Atlantic Time - Labrador - most locations
|
||||
CA +5125-05707 America/Blanc-Sablon Atlantic Standard Time - Quebec - Lower North Shore
|
||||
CA +4339-07923 America/Toronto Eastern Time - Ontario & Quebec - most locations
|
||||
CA +4901-08816 America/Nipigon Eastern Time - Ontario & Quebec - places that did not observe DST 1967-1973
|
||||
CA +4823-08915 America/Thunder_Bay Eastern Time - Thunder Bay, Ontario
|
||||
CA +6344-06828 America/Iqaluit Eastern Time - east Nunavut - most locations
|
||||
CA +6608-06544 America/Pangnirtung Eastern Time - Pangnirtung, Nunavut
|
||||
CA +744144-0944945 America/Resolute Central Time - Resolute, Nunavut
|
||||
CA +484531-0913718 America/Atikokan Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
|
||||
CA +624900-0920459 America/Rankin_Inlet Central Time - central Nunavut
|
||||
CA +4953-09709 America/Winnipeg Central Time - Manitoba & west Ontario
|
||||
CA +4843-09434 America/Rainy_River Central Time - Rainy River & Fort Frances, Ontario
|
||||
CA +5024-10439 America/Regina Central Standard Time - Saskatchewan - most locations
|
||||
CA +5017-10750 America/Swift_Current Central Standard Time - Saskatchewan - midwest
|
||||
CA +5333-11328 America/Edmonton Mountain Time - Alberta, east British Columbia & west Saskatchewan
|
||||
CA +690650-1050310 America/Cambridge_Bay Mountain Time - west Nunavut
|
||||
CA +6227-11421 America/Yellowknife Mountain Time - central Northwest Territories
|
||||
CA +682059-1334300 America/Inuvik Mountain Time - west Northwest Territories
|
||||
CA +4906-11631 America/Creston Mountain Standard Time - Creston, British Columbia
|
||||
CA +5946-12014 America/Dawson_Creek Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia
|
||||
CA +4916-12307 America/Vancouver Pacific Time - west British Columbia
|
||||
CA +6043-13503 America/Whitehorse Pacific Time - south Yukon
|
||||
CA +6404-13925 America/Dawson Pacific Time - north Yukon
|
||||
CC -1210+09655 Indian/Cocos
|
||||
CH,DE,LI +4723+00832 Europe/Zurich Swiss time
|
||||
CI,BF,GM,GN,ML,MR,SH,SL,SN,ST,TG +0519-00402 Africa/Abidjan
|
||||
CK -2114-15946 Pacific/Rarotonga
|
||||
CL -3327-07040 America/Santiago most locations
|
||||
CL -2709-10926 Pacific/Easter Easter Island
|
||||
CN +3114+12128 Asia/Shanghai Beijing Time
|
||||
CN +4348+08735 Asia/Urumqi Xinjiang Time
|
||||
CO +0436-07405 America/Bogota
|
||||
CR +0956-08405 America/Costa_Rica
|
||||
CU +2308-08222 America/Havana
|
||||
CV +1455-02331 Atlantic/Cape_Verde
|
||||
CW,AW,BQ,SX +1211-06900 America/Curacao
|
||||
CX -1025+10543 Indian/Christmas
|
||||
CY +3510+03322 Asia/Nicosia
|
||||
CZ,SK +5005+01426 Europe/Prague
|
||||
DE +5230+01322 Europe/Berlin Berlin time
|
||||
DK +5540+01235 Europe/Copenhagen
|
||||
DO +1828-06954 America/Santo_Domingo
|
||||
DZ +3647+00303 Africa/Algiers
|
||||
EC -0210-07950 America/Guayaquil mainland
|
||||
EC -0054-08936 Pacific/Galapagos Galápagos Islands
|
||||
EE +5925+02445 Europe/Tallinn
|
||||
EG +3003+03115 Africa/Cairo
|
||||
EH +2709-01312 Africa/El_Aaiun
|
||||
ES +4024-00341 Europe/Madrid mainland
|
||||
ES +3553-00519 Africa/Ceuta Ceuta & Melilla
|
||||
ES +2806-01524 Atlantic/Canary Canary Islands
|
||||
FI,AX +6010+02458 Europe/Helsinki
|
||||
FJ -1808+17825 Pacific/Fiji
|
||||
FK -5142-05751 Atlantic/Stanley
|
||||
FM +0725+15147 Pacific/Chuuk Chuuk (Truk) and Yap
|
||||
FM +0658+15813 Pacific/Pohnpei Pohnpei (Ponape)
|
||||
FM +0519+16259 Pacific/Kosrae Kosrae
|
||||
FO +6201-00646 Atlantic/Faroe
|
||||
FR +4852+00220 Europe/Paris
|
||||
GB,GG,IM,JE +513030-0000731 Europe/London
|
||||
GE +4143+04449 Asia/Tbilisi
|
||||
GF +0456-05220 America/Cayenne
|
||||
GH +0533-00013 Africa/Accra
|
||||
GI +3608-00521 Europe/Gibraltar
|
||||
GL +6411-05144 America/Godthab most locations
|
||||
GL +7646-01840 America/Danmarkshavn east coast, north of Scoresbysund
|
||||
GL +7029-02158 America/Scoresbysund Scoresbysund / Ittoqqortoormiit
|
||||
GL +7634-06847 America/Thule Thule / Pituffik
|
||||
GR +3758+02343 Europe/Athens
|
||||
GS -5416-03632 Atlantic/South_Georgia
|
||||
GT +1438-09031 America/Guatemala
|
||||
GU,MP +1328+14445 Pacific/Guam
|
||||
GW +1151-01535 Africa/Bissau
|
||||
GY +0648-05810 America/Guyana
|
||||
HK +2217+11409 Asia/Hong_Kong
|
||||
HN +1406-08713 America/Tegucigalpa
|
||||
HT +1832-07220 America/Port-au-Prince
|
||||
HU +4730+01905 Europe/Budapest
|
||||
ID -0610+10648 Asia/Jakarta Java & Sumatra
|
||||
ID -0002+10920 Asia/Pontianak west & central Borneo
|
||||
ID -0507+11924 Asia/Makassar east & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor
|
||||
ID -0232+14042 Asia/Jayapura west New Guinea (Irian Jaya) & Malukus (Moluccas)
|
||||
IE +5320-00615 Europe/Dublin
|
||||
IL +314650+0351326 Asia/Jerusalem
|
||||
IN +2232+08822 Asia/Kolkata
|
||||
IO -0720+07225 Indian/Chagos
|
||||
IQ +3321+04425 Asia/Baghdad
|
||||
IR +3540+05126 Asia/Tehran
|
||||
IS +6409-02151 Atlantic/Reykjavik
|
||||
IT,SM,VA +4154+01229 Europe/Rome
|
||||
JM +175805-0764736 America/Jamaica
|
||||
JO +3157+03556 Asia/Amman
|
||||
JP +353916+1394441 Asia/Tokyo
|
||||
KE,DJ,ER,ET,KM,MG,SO,TZ,UG,YT -0117+03649 Africa/Nairobi
|
||||
KG +4254+07436 Asia/Bishkek
|
||||
KI +0125+17300 Pacific/Tarawa Gilbert Islands
|
||||
KI -0308-17105 Pacific/Enderbury Phoenix Islands
|
||||
KI +0152-15720 Pacific/Kiritimati Line Islands
|
||||
KP +3901+12545 Asia/Pyongyang
|
||||
KR +3733+12658 Asia/Seoul
|
||||
KZ +4315+07657 Asia/Almaty most locations
|
||||
KZ +4448+06528 Asia/Qyzylorda Qyzylorda (Kyzylorda, Kzyl-Orda)
|
||||
KZ +5017+05710 Asia/Aqtobe Aqtobe (Aktobe)
|
||||
KZ +4431+05016 Asia/Aqtau Atyrau (Atirau, Gur'yev), Mangghystau (Mankistau)
|
||||
KZ +5113+05121 Asia/Oral West Kazakhstan
|
||||
LB +3353+03530 Asia/Beirut
|
||||
LK +0656+07951 Asia/Colombo
|
||||
LR +0618-01047 Africa/Monrovia
|
||||
LT +5441+02519 Europe/Vilnius
|
||||
LU +4936+00609 Europe/Luxembourg
|
||||
LV +5657+02406 Europe/Riga
|
||||
LY +3254+01311 Africa/Tripoli
|
||||
MA +3339-00735 Africa/Casablanca
|
||||
MC +4342+00723 Europe/Monaco
|
||||
MD +4700+02850 Europe/Chisinau
|
||||
MH +0709+17112 Pacific/Majuro most locations
|
||||
MH +0905+16720 Pacific/Kwajalein Kwajalein
|
||||
MM +1647+09610 Asia/Rangoon
|
||||
MN +4755+10653 Asia/Ulaanbaatar most locations
|
||||
MN +4801+09139 Asia/Hovd Bayan-Ölgii, Govi-Altai, Hovd, Uvs, Zavkhan
|
||||
MN +4804+11430 Asia/Choibalsan Dornod, Sükhbaatar
|
||||
MO +2214+11335 Asia/Macau
|
||||
MQ +1436-06105 America/Martinique
|
||||
MT +3554+01431 Europe/Malta
|
||||
MU -2010+05730 Indian/Mauritius
|
||||
MV +0410+07330 Indian/Maldives
|
||||
MX +1924-09909 America/Mexico_City Central Time - most locations
|
||||
MX +2105-08646 America/Cancun Central Time - Quintana Roo
|
||||
MX +2058-08937 America/Merida Central Time - Campeche, Yucatán
|
||||
MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo León, Tamaulipas away from US border
|
||||
MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo León, Tamaulipas near US border
|
||||
MX +2313-10625 America/Mazatlan Mountain Time - S Baja, Nayarit, Sinaloa
|
||||
MX +2838-10605 America/Chihuahua Mexican Mountain Time - Chihuahua away from US border
|
||||
MX +2934-10425 America/Ojinaga US Mountain Time - Chihuahua near US border
|
||||
MX +2904-11058 America/Hermosillo Mountain Standard Time - Sonora
|
||||
MX +3232-11701 America/Tijuana US Pacific Time - Baja California near US border
|
||||
MX +3018-11452 America/Santa_Isabel Mexican Pacific Time - Baja California away from US border
|
||||
MX +2048-10515 America/Bahia_Banderas Mexican Central Time - Bahía de Banderas
|
||||
MY +0310+10142 Asia/Kuala_Lumpur peninsular Malaysia
|
||||
MY +0133+11020 Asia/Kuching Sabah & Sarawak
|
||||
MZ,BI,BW,CD,MW,RW,ZM,ZW -2558+03235 Africa/Maputo Central Africa Time (UTC+2)
|
||||
NA -2234+01706 Africa/Windhoek
|
||||
NC -2216+16627 Pacific/Noumea
|
||||
NF -2903+16758 Pacific/Norfolk
|
||||
NG,AO,BJ,CD,CF,CG,CM,GA,GQ,NE +0627+00324 Africa/Lagos West Africa Time (UTC+1)
|
||||
NI +1209-08617 America/Managua
|
||||
NL +5222+00454 Europe/Amsterdam
|
||||
NO,SJ +5955+01045 Europe/Oslo
|
||||
NP +2743+08519 Asia/Kathmandu
|
||||
NR -0031+16655 Pacific/Nauru
|
||||
NU -1901-16955 Pacific/Niue
|
||||
NZ,AQ -3652+17446 Pacific/Auckland New Zealand time
|
||||
NZ -4357-17633 Pacific/Chatham Chatham Islands
|
||||
PA,KY +0858-07932 America/Panama
|
||||
PE -1203-07703 America/Lima
|
||||
PF -1732-14934 Pacific/Tahiti Society Islands
|
||||
PF -0900-13930 Pacific/Marquesas Marquesas Islands
|
||||
PF -2308-13457 Pacific/Gambier Gambier Islands
|
||||
PG -0930+14710 Pacific/Port_Moresby
|
||||
PH +1435+12100 Asia/Manila
|
||||
PK +2452+06703 Asia/Karachi
|
||||
PL +5215+02100 Europe/Warsaw
|
||||
PM +4703-05620 America/Miquelon
|
||||
PN -2504-13005 Pacific/Pitcairn
|
||||
PR +182806-0660622 America/Puerto_Rico
|
||||
PS +3130+03428 Asia/Gaza Gaza Strip
|
||||
PS +313200+0350542 Asia/Hebron West Bank
|
||||
PT +3843-00908 Europe/Lisbon mainland
|
||||
PT +3238-01654 Atlantic/Madeira Madeira Islands
|
||||
PT +3744-02540 Atlantic/Azores Azores
|
||||
PW +0720+13429 Pacific/Palau
|
||||
PY -2516-05740 America/Asuncion
|
||||
QA,BH +2517+05132 Asia/Qatar
|
||||
RE,TF -2052+05528 Indian/Reunion Réunion, Crozet Is, Scattered Is
|
||||
RO +4426+02606 Europe/Bucharest
|
||||
RS,BA,HR,ME,MK,SI +4450+02030 Europe/Belgrade
|
||||
RU +5443+02030 Europe/Kaliningrad Moscow-01 - Kaliningrad
|
||||
RU +554521+0373704 Europe/Moscow Moscow+00 - west Russia
|
||||
RU +4457+03406 Europe/Simferopol Moscow+00 - Crimea
|
||||
RU +4844+04425 Europe/Volgograd Moscow+00 - Caspian Sea
|
||||
RU +5312+05009 Europe/Samara Moscow+00 (Moscow+01 after 2014-10-26) - Samara, Udmurtia
|
||||
RU +5651+06036 Asia/Yekaterinburg Moscow+02 - Urals
|
||||
RU +5500+07324 Asia/Omsk Moscow+03 - west Siberia
|
||||
RU +5502+08255 Asia/Novosibirsk Moscow+03 - Novosibirsk
|
||||
RU +5345+08707 Asia/Novokuznetsk Moscow+03 (Moscow+04 after 2014-10-26) - Kemerovo
|
||||
RU +5601+09250 Asia/Krasnoyarsk Moscow+04 - Yenisei River
|
||||
RU +5216+10420 Asia/Irkutsk Moscow+05 - Lake Baikal
|
||||
RU +5203+11328 Asia/Chita Moscow+06 (Moscow+05 after 2014-10-26) - Zabaykalsky
|
||||
RU +6200+12940 Asia/Yakutsk Moscow+06 - Lena River
|
||||
RU +623923+1353314 Asia/Khandyga Moscow+06 - Tomponsky, Ust-Maysky
|
||||
RU +4310+13156 Asia/Vladivostok Moscow+07 - Amur River
|
||||
RU +4658+14242 Asia/Sakhalin Moscow+07 - Sakhalin Island
|
||||
RU +643337+1431336 Asia/Ust-Nera Moscow+07 - Oymyakonsky
|
||||
RU +5934+15048 Asia/Magadan Moscow+08 (Moscow+07 after 2014-10-26) - Magadan
|
||||
RU +6728+15343 Asia/Srednekolymsk Moscow+08 - E Sakha, N Kuril Is
|
||||
RU +5301+15839 Asia/Kamchatka Moscow+08 (Moscow+09 after 2014-10-26) - Kamchatka
|
||||
RU +6445+17729 Asia/Anadyr Moscow+08 (Moscow+09 after 2014-10-26) - Bering Sea
|
||||
SA,KW,YE +2438+04643 Asia/Riyadh
|
||||
SB -0932+16012 Pacific/Guadalcanal
|
||||
SC -0440+05528 Indian/Mahe
|
||||
SD,SS +1536+03232 Africa/Khartoum
|
||||
SE +5920+01803 Europe/Stockholm
|
||||
SG +0117+10351 Asia/Singapore
|
||||
SR +0550-05510 America/Paramaribo
|
||||
SV +1342-08912 America/El_Salvador
|
||||
SY +3330+03618 Asia/Damascus
|
||||
TC +2128-07108 America/Grand_Turk
|
||||
TD +1207+01503 Africa/Ndjamena
|
||||
TF -492110+0701303 Indian/Kerguelen Kerguelen, St Paul I, Amsterdam I
|
||||
TH,KH,LA,VN +1345+10031 Asia/Bangkok
|
||||
TJ +3835+06848 Asia/Dushanbe
|
||||
TK -0922-17114 Pacific/Fakaofo
|
||||
TL -0833+12535 Asia/Dili
|
||||
TM +3757+05823 Asia/Ashgabat
|
||||
TN +3648+01011 Africa/Tunis
|
||||
TO -2110-17510 Pacific/Tongatapu
|
||||
TR +4101+02858 Europe/Istanbul
|
||||
TT,AG,AI,BL,DM,GD,GP,MF,LC,KN,MS,VC,VG,VI +1039-06131 America/Port_of_Spain
|
||||
TV -0831+17913 Pacific/Funafuti
|
||||
TW +2503+12130 Asia/Taipei
|
||||
UA +5026+03031 Europe/Kiev most locations
|
||||
UA +4837+02218 Europe/Uzhgorod Ruthenia
|
||||
UA +4750+03510 Europe/Zaporozhye Zaporozh'ye, E Lugansk / Zaporizhia, E Luhansk
|
||||
UM +1917+16637 Pacific/Wake Wake Island
|
||||
US +404251-0740023 America/New_York Eastern Time
|
||||
US +421953-0830245 America/Detroit Eastern Time - Michigan - most locations
|
||||
US +381515-0854534 America/Kentucky/Louisville Eastern Time - Kentucky - Louisville area
|
||||
US +364947-0845057 America/Kentucky/Monticello Eastern Time - Kentucky - Wayne County
|
||||
US +394606-0860929 America/Indiana/Indianapolis Eastern Time - Indiana - most locations
|
||||
US +384038-0873143 America/Indiana/Vincennes Eastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties
|
||||
US +410305-0863611 America/Indiana/Winamac Eastern Time - Indiana - Pulaski County
|
||||
US +382232-0862041 America/Indiana/Marengo Eastern Time - Indiana - Crawford County
|
||||
US +382931-0871643 America/Indiana/Petersburg Eastern Time - Indiana - Pike County
|
||||
US +384452-0850402 America/Indiana/Vevay Eastern Time - Indiana - Switzerland County
|
||||
US +415100-0873900 America/Chicago Central Time
|
||||
US +375711-0864541 America/Indiana/Tell_City Central Time - Indiana - Perry County
|
||||
US +411745-0863730 America/Indiana/Knox Central Time - Indiana - Starke County
|
||||
US +450628-0873651 America/Menominee Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties
|
||||
US +470659-1011757 America/North_Dakota/Center Central Time - North Dakota - Oliver County
|
||||
US +465042-1012439 America/North_Dakota/New_Salem Central Time - North Dakota - Morton County (except Mandan area)
|
||||
US +471551-1014640 America/North_Dakota/Beulah Central Time - North Dakota - Mercer County
|
||||
US +394421-1045903 America/Denver Mountain Time
|
||||
US +433649-1161209 America/Boise Mountain Time - south Idaho & east Oregon
|
||||
US +332654-1120424 America/Phoenix Mountain Standard Time - Arizona (except Navajo)
|
||||
US +340308-1181434 America/Los_Angeles Pacific Time
|
||||
US +550737-1313435 America/Metlakatla Pacific Standard Time - Annette Island, Alaska
|
||||
US +611305-1495401 America/Anchorage Alaska Time
|
||||
US +581807-1342511 America/Juneau Alaska Time - Alaska panhandle
|
||||
US +571035-1351807 America/Sitka Alaska Time - southeast Alaska panhandle
|
||||
US +593249-1394338 America/Yakutat Alaska Time - Alaska panhandle neck
|
||||
US +643004-1652423 America/Nome Alaska Time - west Alaska
|
||||
US +515248-1763929 America/Adak Aleutian Islands
|
||||
US,UM +211825-1575130 Pacific/Honolulu Hawaii time
|
||||
UY -3453-05611 America/Montevideo
|
||||
UZ +3940+06648 Asia/Samarkand west Uzbekistan
|
||||
UZ +4120+06918 Asia/Tashkent east Uzbekistan
|
||||
VE +1030-06656 America/Caracas
|
||||
VU -1740+16825 Pacific/Efate
|
||||
WF -1318-17610 Pacific/Wallis
|
||||
WS -1350-17144 Pacific/Apia
|
||||
ZA,LS,SZ -2615+02800 Africa/Johannesburg
|
||||
@@ -225,6 +225,14 @@ static int eap_server_tls_process_fragment(struct eap_ssl_data *data,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (len > message_length) {
|
||||
wpa_printf(MSG_INFO, "SSL: Too much data (%d bytes) in "
|
||||
"first fragment of frame (TLS Message "
|
||||
"Length %d bytes)",
|
||||
(int) len, (int) message_length);
|
||||
return -1;
|
||||
}
|
||||
|
||||
data->tls_in = wpabuf_alloc(message_length);
|
||||
if (data->tls_in == NULL) {
|
||||
wpa_printf(MSG_DEBUG, "SSL: No memory for message");
|
||||
|
||||
@@ -117,7 +117,7 @@ _gsskrb5_pseudo_random(OM_uint32 *minor_status,
|
||||
num = 0;
|
||||
p = prf_out->value;
|
||||
while(desired_output_len > 0) {
|
||||
_gsskrb5_encode_om_uint32(num, input.data);
|
||||
_gsskrb5_encode_be_om_uint32(num, input.data);
|
||||
ret = krb5_crypto_prf(context, crypto, &input, &output);
|
||||
if (ret) {
|
||||
OM_uint32 junk;
|
||||
|
||||
@@ -2,6 +2,35 @@
|
||||
OpenSSL CHANGES
|
||||
_______________
|
||||
|
||||
Changes between 0.9.8x and 0.9.8y [5 Feb 2013]
|
||||
|
||||
*) Make the decoding of SSLv3, TLS and DTLS CBC records constant time.
|
||||
|
||||
This addresses the flaw in CBC record processing discovered by
|
||||
Nadhem Alfardan and Kenny Paterson. Details of this attack can be found
|
||||
at: http://www.isg.rhul.ac.uk/tls/
|
||||
|
||||
Thanks go to Nadhem Alfardan and Kenny Paterson of the Information
|
||||
Security Group at Royal Holloway, University of London
|
||||
(www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and
|
||||
Emilia Käsper for the initial patch.
|
||||
(CVE-2013-0169)
|
||||
[Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson]
|
||||
|
||||
*) Return an error when checking OCSP signatures when key is NULL.
|
||||
This fixes a DoS attack. (CVE-2013-0166)
|
||||
[Steve Henson]
|
||||
|
||||
*) Call OCSP Stapling callback after ciphersuite has been chosen, so
|
||||
the right response is stapled. Also change SSL_get_certificate()
|
||||
so it returns the certificate actually sent.
|
||||
See http://rt.openssl.org/Ticket/Display.html?id=2836.
|
||||
(This is a backport)
|
||||
[Rob Stradling <[email protected]>]
|
||||
|
||||
*) Fix possible deadlock when decoding public keys.
|
||||
[Steve Henson]
|
||||
|
||||
Changes between 0.9.8w and 0.9.8x [10 May 2012]
|
||||
|
||||
*) Sanity check record length before skipping explicit IV in DTLS
|
||||
|
||||
@@ -162,6 +162,7 @@ my %table=(
|
||||
"debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
|
||||
"debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
|
||||
"debug-ben-debug", "gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -ggdb3 -O2 -pipe::(unknown)::::::",
|
||||
"debug-ben-debug-64", "gcc:$gcc_devteam_warn -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -g3 -O3 -pipe::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-ben-debug-noopt", "gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -ggdb3 -pipe::(unknown)::::::",
|
||||
"debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::",
|
||||
"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||
@@ -172,10 +173,10 @@ my %table=(
|
||||
"debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -m32 -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared",
|
||||
"debug-steve-linux-pseudo64", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:SIXTY_FOUR_BIT:${no_asm}:dlfcn:linux-shared",
|
||||
"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -ggdb -g3 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -ggdb -g3 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-geoff","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
@@ -428,8 +429,8 @@ my %table=(
|
||||
"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-pthread:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-maix64 -shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64",
|
||||
# Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE
|
||||
# at build time. $OBJECT_MODE is respected at ./config stage!
|
||||
"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared::-q32 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
|
||||
"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-q64 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",
|
||||
"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded -D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared::-q32 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
|
||||
"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded -D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-q64 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",
|
||||
|
||||
#
|
||||
# Cray T90 and similar (SDSC)
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Which is the current version of OpenSSL?
|
||||
|
||||
The current version is available from <URL: http://www.openssl.org>.
|
||||
OpenSSL 1.0.1c was released on May 10th, 2012.
|
||||
OpenSSL 1.0.1d was released on Feb 5th, 2013.
|
||||
|
||||
In addition to the current stable release, you can also access daily
|
||||
snapshots of the OpenSSL development version at <URL:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
## Makefile for OpenSSL
|
||||
##
|
||||
|
||||
VERSION=0.9.8x
|
||||
VERSION=0.9.8y
|
||||
MAJOR=0
|
||||
MINOR=9.8
|
||||
SHLIB_VERSION_NUMBER=0.9.8
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
This file gives a brief overview of the major changes between each OpenSSL
|
||||
release. For more details please read the CHANGES file.
|
||||
|
||||
Major changes between OpenSSL 0.9.8x and OpenSSL 0.9.8y:
|
||||
|
||||
o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169
|
||||
o Fix OCSP bad key DoS attack CVE-2013-0166
|
||||
|
||||
Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x:
|
||||
|
||||
o Fix DTLS record length checking bug CVE-2012-2333
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
OpenSSL 0.9.8x 10 May 2012
|
||||
OpenSSL 0.9.8y 5 Feb 2013
|
||||
|
||||
Copyright (c) 1998-2011 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
|
||||
+631
-613
File diff suppressed because it is too large.
Load diff
@@ -2052,7 +2052,7 @@ X509_NAME *parse_name(char *subject, long chtype, int multirdn)
|
||||
X509_NAME *n = NULL;
|
||||
int nid;
|
||||
|
||||
if (!buf || !ne_types || !ne_values)
|
||||
if (!buf || !ne_types || !ne_values || !mval)
|
||||
{
|
||||
BIO_printf(bio_err, "malloc error\n");
|
||||
goto error;
|
||||
@@ -2156,6 +2156,7 @@ X509_NAME *parse_name(char *subject, long chtype, int multirdn)
|
||||
OPENSSL_free(ne_values);
|
||||
OPENSSL_free(ne_types);
|
||||
OPENSSL_free(buf);
|
||||
OPENSSL_free(mval);
|
||||
return n;
|
||||
|
||||
error:
|
||||
@@ -2164,6 +2165,8 @@ error:
|
||||
OPENSSL_free(ne_values);
|
||||
if (ne_types)
|
||||
OPENSSL_free(ne_types);
|
||||
if (mval)
|
||||
OPENSSL_free(mval);
|
||||
if (buf)
|
||||
OPENSSL_free(buf);
|
||||
return NULL;
|
||||
|
||||
@@ -332,7 +332,6 @@ bad:
|
||||
BIO_printf(bio_err,"This is going to take a long time\n");
|
||||
if(!dh || !DH_generate_parameters_ex(dh, num, g, &cb))
|
||||
{
|
||||
if(dh) DH_free(dh);
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -518,6 +518,24 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
|
||||
case 100:
|
||||
str_details2 = " no_renegotiation";
|
||||
break;
|
||||
case 110:
|
||||
str_details2 = " unsupported_extension";
|
||||
break;
|
||||
case 111:
|
||||
str_details2 = " certificate_unobtainable";
|
||||
break;
|
||||
case 112:
|
||||
str_details2 = " unrecognized_name";
|
||||
break;
|
||||
case 113:
|
||||
str_details2 = " bad_certificate_status_response";
|
||||
break;
|
||||
case 114:
|
||||
str_details2 = " bad_certificate_hash_value";
|
||||
break;
|
||||
case 115:
|
||||
str_details2 = " unknown_psk_identity";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,6 +226,7 @@ static void sc_usage(void)
|
||||
BIO_printf(bio_err," -ssl3 - just use SSLv3\n");
|
||||
BIO_printf(bio_err," -tls1 - just use TLSv1\n");
|
||||
BIO_printf(bio_err," -dtls1 - just use DTLSv1\n");
|
||||
BIO_printf(bio_err," -fallback_scsv - send TLS_FALLBACK_SCSV\n");
|
||||
BIO_printf(bio_err," -mtu - set the link layer MTU\n");
|
||||
BIO_printf(bio_err," -no_tls1/-no_ssl3/-no_ssl2 - turn off that protocol\n");
|
||||
BIO_printf(bio_err," -bugs - Switch on all SSL implementation bug workarounds\n");
|
||||
@@ -339,6 +340,7 @@ int MAIN(int argc, char **argv)
|
||||
char *sess_out = NULL;
|
||||
struct sockaddr peer;
|
||||
int peerlen = sizeof(peer);
|
||||
int fallback_scsv = 0;
|
||||
int enable_timeouts = 0 ;
|
||||
long socket_mtu = 0;
|
||||
#ifndef OPENSSL_NO_JPAKE
|
||||
@@ -488,6 +490,10 @@ int MAIN(int argc, char **argv)
|
||||
socket_mtu = atol(*(++argv));
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-fallback_scsv") == 0)
|
||||
{
|
||||
fallback_scsv = 1;
|
||||
}
|
||||
else if (strcmp(*argv,"-bugs") == 0)
|
||||
bugs=1;
|
||||
else if (strcmp(*argv,"-keyform") == 0)
|
||||
@@ -778,6 +784,10 @@ bad:
|
||||
SSL_set_session(con, sess);
|
||||
SSL_SESSION_free(sess);
|
||||
}
|
||||
|
||||
if (fallback_scsv)
|
||||
SSL_set_mode(con, SSL_MODE_SEND_FALLBACK_SCSV);
|
||||
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
if (servername != NULL)
|
||||
{
|
||||
|
||||
@@ -1550,6 +1550,12 @@ end:
|
||||
if (dpass)
|
||||
OPENSSL_free(dpass);
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
if (tlscstatp.host)
|
||||
OPENSSL_free(tlscstatp.host);
|
||||
if (tlscstatp.port)
|
||||
OPENSSL_free(tlscstatp.port);
|
||||
if (tlscstatp.path)
|
||||
OPENSSL_free(tlscstatp.path);
|
||||
if (ctx2 != NULL) SSL_CTX_free(ctx2);
|
||||
if (s_cert2)
|
||||
X509_free(s_cert2);
|
||||
|
||||
@@ -285,16 +285,28 @@ err:
|
||||
ASN1_OBJECT_free(ret);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
|
||||
long len)
|
||||
{
|
||||
ASN1_OBJECT *ret=NULL;
|
||||
const unsigned char *p;
|
||||
int i;
|
||||
/* Sanity check OID encoding: can't have leading 0x80 in
|
||||
* subidentifiers, see: X.690 8.19.2
|
||||
int i, length;
|
||||
|
||||
/* Sanity check OID encoding.
|
||||
* Need at least one content octet.
|
||||
* MSB must be clear in the last octet.
|
||||
* can't have leading 0x80 in subidentifiers, see: X.690 8.19.2
|
||||
*/
|
||||
for (i = 0, p = *pp; i < len; i++, p++)
|
||||
if (len <= 0 || len > INT_MAX || pp == NULL || (p = *pp) == NULL ||
|
||||
p[len - 1] & 0x80)
|
||||
{
|
||||
ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING);
|
||||
return NULL;
|
||||
}
|
||||
/* Now 0 < len <= INT_MAX, so the cast is safe. */
|
||||
length = (int)len;
|
||||
for (i = 0; i < length; i++, p++)
|
||||
{
|
||||
if (*p == 0x80 && (!i || !(p[-1] & 0x80)))
|
||||
{
|
||||
@@ -313,20 +325,20 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
|
||||
else ret=(*a);
|
||||
|
||||
p= *pp;
|
||||
if ((ret->data == NULL) || (ret->length < len))
|
||||
if ((ret->data == NULL) || (ret->length < length))
|
||||
{
|
||||
if (ret->data != NULL) OPENSSL_free(ret->data);
|
||||
ret->data=(unsigned char *)OPENSSL_malloc(len ? (int)len : 1);
|
||||
ret->data=(unsigned char *)OPENSSL_malloc(length);
|
||||
ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA;
|
||||
if (ret->data == NULL)
|
||||
{ i=ERR_R_MALLOC_FAILURE; goto err; }
|
||||
}
|
||||
memcpy(ret->data,p,(int)len);
|
||||
ret->length=(int)len;
|
||||
memcpy(ret->data,p,length);
|
||||
ret->length=length;
|
||||
ret->sn=NULL;
|
||||
ret->ln=NULL;
|
||||
/* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */
|
||||
p+=len;
|
||||
p+=length;
|
||||
|
||||
if (a != NULL) (*a)=ret;
|
||||
*pp=p;
|
||||
|
||||
@@ -567,6 +567,7 @@ int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in)
|
||||
if(mbflag == -1) return -1;
|
||||
mbflag |= MBSTRING_FLAG;
|
||||
stmp.data = NULL;
|
||||
stmp.length = 0;
|
||||
ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING);
|
||||
if(ret < 0) return ret;
|
||||
*out = stmp.data;
|
||||
|
||||
@@ -138,6 +138,12 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
|
||||
unsigned char *buf_in=NULL;
|
||||
int ret= -1,i,inl;
|
||||
|
||||
if (!pkey)
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_ITEM_VERIFY, ERR_R_PASSED_NULL_PARAMETER);
|
||||
return -1;
|
||||
}
|
||||
|
||||
EVP_MD_CTX_init(&ctx);
|
||||
i=OBJ_obj2nid(a->algorithm);
|
||||
type=EVP_get_digestbyname(OBJ_nid2sn(i));
|
||||
|
||||
@@ -371,12 +371,15 @@ EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_EVP_PKEY);
|
||||
if (key->pkey)
|
||||
{
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY);
|
||||
EVP_PKEY_free(ret);
|
||||
ret = key->pkey;
|
||||
}
|
||||
else
|
||||
{
|
||||
key->pkey = ret;
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY);
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY);
|
||||
}
|
||||
CRYPTO_add(&ret->references, 1, CRYPTO_LOCK_EVP_PKEY);
|
||||
return(ret);
|
||||
err:
|
||||
|
||||
@@ -511,6 +511,8 @@ BIGNUM *BN_mod_inverse(BIGNUM *ret,
|
||||
BIGNUM *BN_mod_sqrt(BIGNUM *ret,
|
||||
const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx);
|
||||
|
||||
void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);
|
||||
|
||||
/* Deprecated versions */
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe,
|
||||
@@ -740,11 +742,20 @@ int RAND_pseudo_bytes(unsigned char *buf,int num);
|
||||
|
||||
#define bn_fix_top(a) bn_check_top(a)
|
||||
|
||||
#define bn_check_size(bn, bits) bn_wcheck_size(bn, ((bits+BN_BITS2-1))/BN_BITS2)
|
||||
#define bn_wcheck_size(bn, words) \
|
||||
do { \
|
||||
const BIGNUM *_bnum2 = (bn); \
|
||||
assert(words <= (_bnum2)->dmax && words >= (_bnum2)->top); \
|
||||
} while(0)
|
||||
|
||||
#else /* !BN_DEBUG */
|
||||
|
||||
#define bn_pollute(a)
|
||||
#define bn_check_top(a)
|
||||
#define bn_fix_top(a) bn_correct_top(a)
|
||||
#define bn_check_size(bn, bits)
|
||||
#define bn_wcheck_size(bn, words)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -824,3 +824,55 @@ int bn_cmp_part_words(const BN_ULONG *a, const BN_ULONG *b,
|
||||
}
|
||||
return bn_cmp_words(a,b,cl);
|
||||
}
|
||||
|
||||
/*
|
||||
* Constant-time conditional swap of a and b.
|
||||
* a and b are swapped if condition is not 0. The code assumes that at most one bit of condition is set.
|
||||
* nwords is the number of words to swap. The code assumes that at least nwords are allocated in both a and b,
|
||||
* and that no more than nwords are used by either a or b.
|
||||
* a and b cannot be the same number
|
||||
*/
|
||||
void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords)
|
||||
{
|
||||
BN_ULONG t;
|
||||
int i;
|
||||
|
||||
bn_wcheck_size(a, nwords);
|
||||
bn_wcheck_size(b, nwords);
|
||||
|
||||
assert(a != b);
|
||||
assert((condition & (condition - 1)) == 0);
|
||||
assert(sizeof(BN_ULONG) >= sizeof(int));
|
||||
|
||||
condition = ((condition - 1) >> (BN_BITS2 - 1)) - 1;
|
||||
|
||||
t = (a->top^b->top) & condition;
|
||||
a->top ^= t;
|
||||
b->top ^= t;
|
||||
|
||||
#define BN_CONSTTIME_SWAP(ind) \
|
||||
do { \
|
||||
t = (a->d[ind] ^ b->d[ind]) & condition; \
|
||||
a->d[ind] ^= t; \
|
||||
b->d[ind] ^= t; \
|
||||
} while (0)
|
||||
|
||||
|
||||
switch (nwords) {
|
||||
default:
|
||||
for (i = 10; i < nwords; i++)
|
||||
BN_CONSTTIME_SWAP(i);
|
||||
/* Fallthrough */
|
||||
case 10: BN_CONSTTIME_SWAP(9); /* Fallthrough */
|
||||
case 9: BN_CONSTTIME_SWAP(8); /* Fallthrough */
|
||||
case 8: BN_CONSTTIME_SWAP(7); /* Fallthrough */
|
||||
case 7: BN_CONSTTIME_SWAP(6); /* Fallthrough */
|
||||
case 6: BN_CONSTTIME_SWAP(5); /* Fallthrough */
|
||||
case 5: BN_CONSTTIME_SWAP(4); /* Fallthrough */
|
||||
case 4: BN_CONSTTIME_SWAP(3); /* Fallthrough */
|
||||
case 3: BN_CONSTTIME_SWAP(2); /* Fallthrough */
|
||||
case 2: BN_CONSTTIME_SWAP(1); /* Fallthrough */
|
||||
case 1: BN_CONSTTIME_SWAP(0);
|
||||
}
|
||||
#undef BN_CONSTTIME_SWAP
|
||||
}
|
||||
@@ -144,26 +144,17 @@ int BN_add_word(BIGNUM *a, BN_ULONG w)
|
||||
a->neg=!(a->neg);
|
||||
return(i);
|
||||
}
|
||||
/* Only expand (and risk failing) if it's possibly necessary */
|
||||
if (((BN_ULONG)(a->d[a->top - 1] + 1) == 0) &&
|
||||
(bn_wexpand(a,a->top+1) == NULL))
|
||||
return(0);
|
||||
i=0;
|
||||
for (;;)
|
||||
for (i=0;w!=0 && i<a->top;i++)
|
||||
{
|
||||
if (i >= a->top)
|
||||
l=w;
|
||||
else
|
||||
l=(a->d[i]+w)&BN_MASK2;
|
||||
a->d[i]=l;
|
||||
if (w > l)
|
||||
w=1;
|
||||
else
|
||||
break;
|
||||
i++;
|
||||
a->d[i] = l = (a->d[i]+w)&BN_MASK2;
|
||||
w = (w>l)?1:0;
|
||||
}
|
||||
if (i >= a->top)
|
||||
if (w && i==a->top)
|
||||
{
|
||||
if (bn_wexpand(a,a->top+1) == NULL) return 0;
|
||||
a->top++;
|
||||
a->d[i]=w;
|
||||
}
|
||||
bn_check_top(a);
|
||||
return(1);
|
||||
}
|
||||
|
||||
@@ -542,3 +542,19 @@ void OpenSSLDie(const char *file,int line,const char *assertion)
|
||||
}
|
||||
|
||||
void *OPENSSL_stderr(void) { return stderr; }
|
||||
|
||||
#ifndef OPENSSL_FIPS
|
||||
|
||||
int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len)
|
||||
{
|
||||
size_t i;
|
||||
const unsigned char *a = in_a;
|
||||
const unsigned char *b = in_b;
|
||||
unsigned char x = 0;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
x |= a[i] ^ b[i];
|
||||
|
||||
return x;
|
||||
}
|
||||
#endif
|
||||
@@ -591,6 +591,13 @@ int OPENSSL_isservice(void);
|
||||
#define OPENSSL_HAVE_INIT 1
|
||||
void OPENSSL_init(void);
|
||||
|
||||
/* CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal. It
|
||||
* takes an amount of time dependent on |len|, but independent of the contents
|
||||
* of |a| and |b|. Unlike memcmp, it cannot be used to put elements into a
|
||||
* defined order as the return value when a != b is undefined, other than to be
|
||||
* non-zero. */
|
||||
int CRYPTO_memcmp(const void *a, const void *b, size_t len);
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
|
||||
@@ -208,9 +208,12 @@ static int gf2m_Mxy(const EC_GROUP *group, const BIGNUM *x, const BIGNUM *y, BIG
|
||||
|
||||
/* Computes scalar*point and stores the result in r.
|
||||
* point can not equal r.
|
||||
* Uses algorithm 2P of
|
||||
* Uses a modified algorithm 2P of
|
||||
* Lopex, J. and Dahab, R. "Fast multiplication on elliptic curves over
|
||||
* GF(2^m) without precomputation".
|
||||
*
|
||||
* To protect against side-channel attack the function uses constant time
|
||||
* swap avoiding conditional branches.
|
||||
*/
|
||||
static int ec_GF2m_montgomery_point_multiply(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
|
||||
const EC_POINT *point, BN_CTX *ctx)
|
||||
@@ -244,6 +247,11 @@ static int ec_GF2m_montgomery_point_multiply(const EC_GROUP *group, EC_POINT *r,
|
||||
x2 = &r->X;
|
||||
z2 = &r->Y;
|
||||
|
||||
bn_wexpand(x1, group->field.top);
|
||||
bn_wexpand(z1, group->field.top);
|
||||
bn_wexpand(x2, group->field.top);
|
||||
bn_wexpand(z2, group->field.top);
|
||||
|
||||
if (!BN_GF2m_mod_arr(x1, &point->X, group->poly)) goto err; /* x1 = x */
|
||||
if (!BN_one(z1)) goto err; /* z1 = 1 */
|
||||
if (!group->meth->field_sqr(group, z2, x1, ctx)) goto err; /* z2 = x1^2 = x^2 */
|
||||
@@ -266,16 +274,12 @@ static int ec_GF2m_montgomery_point_multiply(const EC_GROUP *group, EC_POINT *r,
|
||||
{
|
||||
for (; j >= 0; j--)
|
||||
{
|
||||
if (scalar->d[i] & mask)
|
||||
{
|
||||
if (!gf2m_Madd(group, &point->X, x1, z1, x2, z2, ctx)) goto err;
|
||||
if (!gf2m_Mdouble(group, x2, z2, ctx)) goto err;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!gf2m_Madd(group, &point->X, x2, z2, x1, z1, ctx)) goto err;
|
||||
if (!gf2m_Mdouble(group, x1, z1, ctx)) goto err;
|
||||
}
|
||||
BN_consttime_swap(scalar->d[i] & mask, x1, x2, group->field.top);
|
||||
BN_consttime_swap(scalar->d[i] & mask, z1, z2, group->field.top);
|
||||
if (!gf2m_Madd(group, &point->X, x2, z2, x1, z1, ctx)) goto err;
|
||||
if (!gf2m_Mdouble(group, x1, z1, ctx)) goto err;
|
||||
BN_consttime_swap(scalar->d[i] & mask, x1, x2, group->field.top);
|
||||
BN_consttime_swap(scalar->d[i] & mask, z1, z2, group->field.top);
|
||||
mask >>= 1;
|
||||
}
|
||||
j = BN_BITS2 - 1;
|
||||
|
||||
@@ -69,8 +69,14 @@ R SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION 1060
|
||||
R SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070
|
||||
R SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071
|
||||
R SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080
|
||||
R SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK 1086
|
||||
R SSL_R_TLSV1_ALERT_USER_CANCELLED 1090
|
||||
R SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100
|
||||
R SSL_R_TLSV1_UNSUPPORTED_EXTENSION 1110
|
||||
R SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE 1111
|
||||
R SSL_R_TLSV1_UNRECOGNIZED_NAME 1112
|
||||
R SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE 1113
|
||||
R SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE 1114
|
||||
|
||||
R RSAREF_R_CONTENT_ENCODING 0x0400
|
||||
R RSAREF_R_DATA 0x0401
|
||||
|
||||
@@ -93,4 +93,18 @@ void OPENSSL_init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
|
||||
int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len)
|
||||
{
|
||||
size_t i;
|
||||
const unsigned char *a = in_a;
|
||||
const unsigned char *b = in_b;
|
||||
unsigned char x = 0;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
x |= a[i] ^ b[i];
|
||||
|
||||
return x;
|
||||
}
|
||||
#endif
|
||||
@@ -444,11 +444,12 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name)
|
||||
unsigned char *p;
|
||||
char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2];
|
||||
|
||||
if ((a == NULL) || (a->data == NULL)) {
|
||||
buf[0]='\0';
|
||||
return(0);
|
||||
}
|
||||
/* Ensure that, at every state, |buf| is NUL-terminated. */
|
||||
if (buf && buf_len > 0)
|
||||
buf[0] = '\0';
|
||||
|
||||
if ((a == NULL) || (a->data == NULL))
|
||||
return(0);
|
||||
|
||||
if (!no_name && (nid=OBJ_obj2nid(a)) != NID_undef)
|
||||
{
|
||||
@@ -527,9 +528,10 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name)
|
||||
i=(int)(l/40);
|
||||
l-=(long)(i*40);
|
||||
}
|
||||
if (buf && (buf_len > 0))
|
||||
if (buf && (buf_len > 1))
|
||||
{
|
||||
*buf++ = i + '0';
|
||||
*buf = '\0';
|
||||
buf_len--;
|
||||
}
|
||||
n++;
|
||||
@@ -544,9 +546,10 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name)
|
||||
i = strlen(bndec);
|
||||
if (buf)
|
||||
{
|
||||
if (buf_len > 0)
|
||||
if (buf_len > 1)
|
||||
{
|
||||
*buf++ = '.';
|
||||
*buf = '\0';
|
||||
buf_len--;
|
||||
}
|
||||
BUF_strlcpy(buf,bndec,buf_len);
|
||||
@@ -786,4 +789,3 @@ err:
|
||||
OPENSSL_free(buf);
|
||||
return(ok);
|
||||
}
|
||||
|
||||
@@ -91,9 +91,12 @@ int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs,
|
||||
{
|
||||
EVP_PKEY *skey;
|
||||
skey = X509_get_pubkey(signer);
|
||||
ret = OCSP_BASICRESP_verify(bs, skey, 0);
|
||||
EVP_PKEY_free(skey);
|
||||
if(ret <= 0)
|
||||
if (skey)
|
||||
{
|
||||
ret = OCSP_BASICRESP_verify(bs, skey, 0);
|
||||
EVP_PKEY_free(skey);
|
||||
}
|
||||
if(!skey || ret <= 0)
|
||||
{
|
||||
OCSPerr(OCSP_F_OCSP_BASIC_VERIFY, OCSP_R_SIGNATURE_FAILURE);
|
||||
goto end;
|
||||
@@ -108,6 +111,7 @@ int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs,
|
||||
init_res = X509_STORE_CTX_init(&ctx, st, signer, bs->certs);
|
||||
if(!init_res)
|
||||
{
|
||||
ret = -1;
|
||||
OCSPerr(OCSP_F_OCSP_BASIC_VERIFY,ERR_R_X509_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
|
||||
* major minor fix final patch/beta)
|
||||
*/
|
||||
#define OPENSSL_VERSION_NUMBER 0x0090818fL
|
||||
#define OPENSSL_VERSION_NUMBER 0x0090819fL
|
||||
#ifdef OPENSSL_FIPS
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8x-fips 10 May 2012"
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8y-fips 5 Feb 2013"
|
||||
#else
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8x 10 May 2012"
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8y 5 Feb 2013"
|
||||
#endif
|
||||
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
|
||||
|
||||
EVP_Digest((void *)param, plen, phash, NULL, EVP_sha1(), NULL);
|
||||
|
||||
if (memcmp(db, phash, SHA_DIGEST_LENGTH) != 0 || bad)
|
||||
if (CRYPTO_memcmp(db, phash, SHA_DIGEST_LENGTH) != 0 || bad)
|
||||
goto decoding_err;
|
||||
else
|
||||
{
|
||||
|
||||
@@ -252,15 +252,15 @@
|
||||
#define EC_POINT_set_compressed_coordinates_GF2m \
|
||||
EC_POINT_set_compr_coords_GF2m
|
||||
#undef ec_GF2m_simple_group_clear_finish
|
||||
#define ec_GF2m_simple_group_clear_finish ec_GF2m_simple_grp_clr_finish
|
||||
#define ec_GF2m_simple_group_clear_finish ec_GF2m_simple_grp_clr_finish
|
||||
#undef ec_GF2m_simple_group_check_discriminant
|
||||
#define ec_GF2m_simple_group_check_discriminant ec_GF2m_simple_grp_chk_discrim
|
||||
#undef ec_GF2m_simple_point_clear_finish
|
||||
#define ec_GF2m_simple_point_clear_finish ec_GF2m_simple_pt_clr_finish
|
||||
#define ec_GF2m_simple_point_clear_finish ec_GF2m_simple_pt_clr_finish
|
||||
#undef ec_GF2m_simple_point_set_to_infinity
|
||||
#define ec_GF2m_simple_point_set_to_infinity ec_GF2m_simple_pt_set_to_inf
|
||||
#define ec_GF2m_simple_point_set_to_infinity ec_GF2m_simple_pt_set_to_inf
|
||||
#undef ec_GF2m_simple_points_make_affine
|
||||
#define ec_GF2m_simple_points_make_affine ec_GF2m_simple_pts_make_affine
|
||||
#define ec_GF2m_simple_points_make_affine ec_GF2m_simple_pts_make_affine
|
||||
#undef ec_GF2m_simple_point_set_affine_coordinates
|
||||
#define ec_GF2m_simple_point_set_affine_coordinates \
|
||||
ec_GF2m_smp_pt_set_af_coords
|
||||
@@ -288,8 +288,6 @@
|
||||
#define ec_GFp_simple_point_set_to_infinity ec_GFp_simple_pt_set_to_inf
|
||||
#undef ec_GFp_simple_points_make_affine
|
||||
#define ec_GFp_simple_points_make_affine ec_GFp_simple_pts_make_affine
|
||||
#undef ec_GFp_simple_group_get_curve_GFp
|
||||
#define ec_GFp_simple_group_get_curve_GFp ec_GFp_simple_grp_get_curve_GFp
|
||||
#undef ec_GFp_simple_set_Jprojective_coordinates_GFp
|
||||
#define ec_GFp_simple_set_Jprojective_coordinates_GFp \
|
||||
ec_GFp_smp_set_Jproj_coords_GFp
|
||||
|
||||
@@ -39,13 +39,13 @@ prints a usage message.
|
||||
|
||||
=item B<-newcert>
|
||||
|
||||
creates a new self signed certificate. The private key and certificate are
|
||||
written to the file "newreq.pem".
|
||||
creates a new self signed certificate. The private key is written to the file
|
||||
"newkey.pem" and the request written to the file "newreq.pem".
|
||||
|
||||
=item B<-newreq>
|
||||
|
||||
creates a new certificate request. The private key and request are
|
||||
written to the file "newreq.pem".
|
||||
creates a new certificate request. The private key is written to the file
|
||||
"newkey.pem" and the request written to the file "newreq.pem".
|
||||
|
||||
=item B<-newreq-nodes>
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ B<openssl> B<s_client>
|
||||
[B<-no_ssl2>]
|
||||
[B<-no_ssl3>]
|
||||
[B<-no_tls1>]
|
||||
[B<-fallback_scsv>]
|
||||
[B<-bugs>]
|
||||
[B<-cipher cipherlist>]
|
||||
[B<-starttls protocol>]
|
||||
@@ -167,10 +168,13 @@ these options disable the use of certain SSL or TLS protocols. By default
|
||||
the initial handshake uses a method which should be compatible with all
|
||||
servers and permit them to use SSL v3, SSL v2 or TLS as appropriate.
|
||||
|
||||
Unfortunately there are a lot of ancient and broken servers in use which
|
||||
Unfortunately there are still ancient and broken servers in use which
|
||||
cannot handle this technique and will fail to connect. Some servers only
|
||||
work if TLS is turned off with the B<-no_tls> option others will only
|
||||
support SSL v2 and may need the B<-ssl2> option.
|
||||
work if TLS is turned off.
|
||||
|
||||
=item B<-fallback_scsv>
|
||||
|
||||
Send TLS_FALLBACK_SCSV in the ClientHello.
|
||||
|
||||
=item B<-bugs>
|
||||
|
||||
|
||||
@@ -61,6 +61,12 @@ deal with read/write operations returning without success report. The
|
||||
flag SSL_MODE_AUTO_RETRY will cause read/write operations to only
|
||||
return after the handshake and successful completion.
|
||||
|
||||
=item SSL_MODE_FALLBACK_SCSV
|
||||
|
||||
Send TLS_FALLBACK_SCSV in the ClientHello.
|
||||
To be set by applications that reconnect with a downgraded protocol
|
||||
version; see draft-ietf-tls-downgrade-scsv-00 for details.
|
||||
|
||||
=back
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
@@ -1409,10 +1409,13 @@ static PCCERT_CONTEXT capi_find_cert(CAPI_CTX *ctx, const char *id, HCERTSTORE h
|
||||
static CAPI_KEY *capi_get_key(CAPI_CTX *ctx, const char *contname, char *provname, DWORD ptype, DWORD keyspec)
|
||||
{
|
||||
CAPI_KEY *key;
|
||||
DWORD dwFlags = 0;
|
||||
key = OPENSSL_malloc(sizeof(CAPI_KEY));
|
||||
CAPI_trace(ctx, "capi_get_key, contname=%s, provname=%s, type=%d\n",
|
||||
contname, provname, ptype);
|
||||
if (!CryptAcquireContextA(&key->hprov, contname, provname, ptype, 0))
|
||||
if(ctx->store_flags & CERT_SYSTEM_STORE_LOCAL_MACHINE)
|
||||
dwFlags = CRYPT_MACHINE_KEYSET;
|
||||
if (!CryptAcquireContextA(&key->hprov, contname, provname, ptype, dwFlags))
|
||||
{
|
||||
CAPIerr(CAPI_F_CAPI_GET_KEY, CAPI_R_CRYPTACQUIRECONTEXT_ERROR);
|
||||
capi_addlasterror();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
%define libmaj 0
|
||||
%define libmin 9
|
||||
%define librel 8
|
||||
%define librev x
|
||||
%define librev y
|
||||
Release: 1
|
||||
|
||||
%define openssldir /var/ssl
|
||||
|
||||
@@ -22,7 +22,7 @@ LIB=$(TOP)/libssl.a
|
||||
SHARED_LIB= libssl$(SHLIB_EXT)
|
||||
LIBSRC= \
|
||||
s2_meth.c s2_srvr.c s2_clnt.c s2_lib.c s2_enc.c s2_pkt.c \
|
||||
s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c s3_both.c \
|
||||
s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c s3_both.c s3_cbc.c \
|
||||
s23_meth.c s23_srvr.c s23_clnt.c s23_lib.c s23_pkt.c \
|
||||
t1_meth.c t1_srvr.c t1_clnt.c t1_lib.c t1_enc.c \
|
||||
d1_meth.c d1_srvr.c d1_clnt.c d1_lib.c d1_pkt.c \
|
||||
@@ -33,7 +33,7 @@ LIBSRC= \
|
||||
bio_ssl.c ssl_err.c kssl.c t1_reneg.c
|
||||
LIBOBJ= \
|
||||
s2_meth.o s2_srvr.o s2_clnt.o s2_lib.o s2_enc.o s2_pkt.o \
|
||||
s3_meth.o s3_srvr.o s3_clnt.o s3_lib.o s3_enc.o s3_pkt.o s3_both.o \
|
||||
s3_meth.o s3_srvr.o s3_clnt.o s3_lib.o s3_enc.o s3_pkt.o s3_both.o s3_cbc.o \
|
||||
s23_meth.o s23_srvr.o s23_clnt.o s23_lib.o s23_pkt.o \
|
||||
t1_meth.o t1_srvr.o t1_clnt.o t1_lib.o t1_enc.o \
|
||||
d1_meth.o d1_srvr.o d1_clnt.o d1_lib.o d1_pkt.o \
|
||||
@@ -545,6 +545,27 @@ s3_both.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s3_both.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s3_both.o: ../include/openssl/tls1.h ../include/openssl/x509.h
|
||||
s3_both.o: ../include/openssl/x509_vfy.h s3_both.c ssl_locl.h
|
||||
s3_cbc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s3_cbc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s3_cbc.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
s3_cbc.o: ../include/openssl/dsa.h ../include/openssl/dtls1.h
|
||||
s3_cbc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s3_cbc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s3_cbc.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
s3_cbc.o: ../include/openssl/fips.h ../include/openssl/hmac.h
|
||||
s3_cbc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s3_cbc.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
|
||||
s3_cbc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s3_cbc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s3_cbc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s3_cbc.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
|
||||
s3_cbc.o: ../include/openssl/pqueue.h ../include/openssl/rsa.h
|
||||
s3_cbc.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s3_cbc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s3_cbc.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s3_cbc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s3_cbc.o: ../include/openssl/tls1.h ../include/openssl/x509.h
|
||||
s3_cbc.o: ../include/openssl/x509_vfy.h s3_cbc.c ssl_locl.h
|
||||
s3_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s3_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s3_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
|
||||
@@ -580,29 +580,32 @@ dtls1_retrieve_buffered_fragment(SSL *s, long max, int *ok)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* dtls1_max_handshake_message_len returns the maximum number of bytes
|
||||
* permitted in a DTLS handshake message for |s|. The minimum is 16KB, but may
|
||||
* be greater if the maximum certificate list size requires it. */
|
||||
static unsigned long dtls1_max_handshake_message_len(const SSL *s)
|
||||
{
|
||||
unsigned long max_len = DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH;
|
||||
if (max_len < (unsigned long)s->max_cert_list)
|
||||
return s->max_cert_list;
|
||||
return max_len;
|
||||
}
|
||||
|
||||
static int
|
||||
dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
|
||||
dtls1_reassemble_fragment(SSL *s, const struct hm_header_st* msg_hdr, int *ok)
|
||||
{
|
||||
hm_fragment *frag = NULL;
|
||||
pitem *item = NULL;
|
||||
int i = -1, is_complete;
|
||||
PQ_64BIT seq64;
|
||||
unsigned long frag_len = msg_hdr->frag_len, max_len;
|
||||
unsigned long frag_len = msg_hdr->frag_len;
|
||||
|
||||
if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len)
|
||||
if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len ||
|
||||
msg_hdr->msg_len > dtls1_max_handshake_message_len(s))
|
||||
goto err;
|
||||
|
||||
/* Determine maximum allowed message size. Depends on (user set)
|
||||
* maximum certificate length, but 16k is minimum.
|
||||
*/
|
||||
if (DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH < s->max_cert_list)
|
||||
max_len = s->max_cert_list;
|
||||
else
|
||||
max_len = DTLS1_HM_HEADER_LENGTH + SSL3_RT_MAX_ENCRYPTED_LENGTH;
|
||||
|
||||
if ((msg_hdr->frag_off+frag_len) > max_len)
|
||||
goto err;
|
||||
if (frag_len == 0)
|
||||
return DTLS1_HM_FRAGMENT_RETRY;
|
||||
|
||||
/* Try to find item in queue */
|
||||
pq_64bit_init(&seq64);
|
||||
@@ -620,10 +623,20 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
|
||||
frag->msg_header.frag_off = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
frag = (hm_fragment*) item->data;
|
||||
if (frag->msg_header.msg_len != msg_hdr->msg_len)
|
||||
{
|
||||
item = NULL;
|
||||
frag = NULL;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* If message is already reassembled, this must be a
|
||||
* retransmit and can be dropped.
|
||||
* retransmit and can be dropped. In this case item != NULL and so frag
|
||||
* does not need to be freed.
|
||||
*/
|
||||
if (frag->reassembly == NULL)
|
||||
{
|
||||
@@ -643,7 +656,9 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
|
||||
/* read the body of the fragment (header has already been read */
|
||||
i = s->method->ssl_read_bytes(s,SSL3_RT_HANDSHAKE,
|
||||
frag->fragment + msg_hdr->frag_off,frag_len,0);
|
||||
if (i<=0 || (unsigned long)i!=frag_len)
|
||||
if ((unsigned long)i!=frag_len)
|
||||
i=-1;
|
||||
if (i<=0)
|
||||
goto err;
|
||||
|
||||
RSMBLY_BITMASK_MARK(frag->reassembly, (long)msg_hdr->frag_off,
|
||||
@@ -671,21 +686,25 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
|
||||
i = -1;
|
||||
}
|
||||
|
||||
pqueue_insert(s->d1->buffered_messages, item);
|
||||
item = pqueue_insert(s->d1->buffered_messages, item);
|
||||
/* pqueue_insert fails iff a duplicate item is inserted.
|
||||
* However, |item| cannot be a duplicate. If it were,
|
||||
* |pqueue_find|, above, would have returned it and control
|
||||
* would never have reached this branch. */
|
||||
OPENSSL_assert(item != NULL);
|
||||
}
|
||||
|
||||
return DTLS1_HM_FRAGMENT_RETRY;
|
||||
|
||||
err:
|
||||
if (frag != NULL) dtls1_hm_fragment_free(frag);
|
||||
if (item != NULL) OPENSSL_free(item);
|
||||
if (frag != NULL && item == NULL) dtls1_hm_fragment_free(frag);
|
||||
*ok = 0;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
dtls1_process_out_of_seq_message(SSL *s, struct hm_header_st* msg_hdr, int *ok)
|
||||
dtls1_process_out_of_seq_message(SSL *s, const struct hm_header_st* msg_hdr, int *ok)
|
||||
{
|
||||
int i=-1;
|
||||
hm_fragment *frag = NULL;
|
||||
@@ -705,7 +724,7 @@ dtls1_process_out_of_seq_message(SSL *s, struct hm_header_st* msg_hdr, int *ok)
|
||||
/* If we already have an entry and this one is a fragment,
|
||||
* don't discard it and rather try to reassemble it.
|
||||
*/
|
||||
if (item != NULL && frag_len < msg_hdr->msg_len)
|
||||
if (item != NULL && frag_len != msg_hdr->msg_len)
|
||||
item = NULL;
|
||||
|
||||
/* Discard the message if sequence number was already there, is
|
||||
@@ -730,9 +749,12 @@ dtls1_process_out_of_seq_message(SSL *s, struct hm_header_st* msg_hdr, int *ok)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (frag_len && frag_len < msg_hdr->msg_len)
|
||||
if (frag_len != msg_hdr->msg_len)
|
||||
return dtls1_reassemble_fragment(s, msg_hdr, ok);
|
||||
|
||||
if (frag_len > dtls1_max_handshake_message_len(s))
|
||||
goto err;
|
||||
|
||||
frag = dtls1_hm_fragment_new(frag_len, 0);
|
||||
if ( frag == NULL)
|
||||
goto err;
|
||||
@@ -744,7 +766,9 @@ dtls1_process_out_of_seq_message(SSL *s, struct hm_header_st* msg_hdr, int *ok)
|
||||
/* read the body of the fragment (header has already been read) */
|
||||
i = s->method->ssl_read_bytes(s,SSL3_RT_HANDSHAKE,
|
||||
frag->fragment,frag_len,0);
|
||||
if (i<=0 || (unsigned long)i!=frag_len)
|
||||
if ((unsigned long)i!=frag_len)
|
||||
i = -1;
|
||||
if (i<=0)
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -756,14 +780,21 @@ dtls1_process_out_of_seq_message(SSL *s, struct hm_header_st* msg_hdr, int *ok)
|
||||
if ( item == NULL)
|
||||
goto err;
|
||||
|
||||
pqueue_insert(s->d1->buffered_messages, item);
|
||||
item = pqueue_insert(s->d1->buffered_messages, item);
|
||||
/* pqueue_insert fails iff a duplicate item is inserted.
|
||||
* However, |item| cannot be a duplicate. If it were,
|
||||
* |pqueue_find|, above, would have returned it. Then, either
|
||||
* |frag_len| != |msg_hdr->msg_len| in which case |item| is set
|
||||
* to NULL and it will have been processed with
|
||||
* |dtls1_reassemble_fragment|, above, or the record will have
|
||||
* been discarded. */
|
||||
OPENSSL_assert(item != NULL);
|
||||
}
|
||||
|
||||
return DTLS1_HM_FRAGMENT_RETRY;
|
||||
|
||||
err:
|
||||
if ( frag != NULL) dtls1_hm_fragment_free(frag);
|
||||
if ( item != NULL) OPENSSL_free(item);
|
||||
if (frag != NULL && item == NULL) dtls1_hm_fragment_free(frag);
|
||||
*ok = 0;
|
||||
return i;
|
||||
}
|
||||
@@ -777,6 +808,7 @@ dtls1_get_message_fragment(SSL *s, int st1, int stn, long max, int *ok)
|
||||
int i,al;
|
||||
struct hm_header_st msg_hdr;
|
||||
|
||||
redo:
|
||||
/* see if we have the required fragment already */
|
||||
if ((frag_len = dtls1_retrieve_buffered_fragment(s,max,ok)) || *ok)
|
||||
{
|
||||
@@ -835,8 +867,7 @@ dtls1_get_message_fragment(SSL *s, int st1, int stn, long max, int *ok)
|
||||
s->msg_callback_arg);
|
||||
|
||||
s->init_num = 0;
|
||||
return dtls1_get_message_fragment(s, st1, stn,
|
||||
max, ok);
|
||||
goto redo;
|
||||
}
|
||||
else /* Incorrectly formated Hello request */
|
||||
{
|
||||
|
||||
@@ -796,6 +796,13 @@ int dtls1_send_client_key_exchange(SSL *s)
|
||||
RSA *rsa;
|
||||
unsigned char tmp_buf[SSL_MAX_MASTER_KEY_LENGTH];
|
||||
|
||||
if (s->session->sess_cert == NULL)
|
||||
{
|
||||
/* We should always have a server certificate with SSL_kRSA. */
|
||||
SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (s->session->sess_cert->peer_rsa_tmp != NULL)
|
||||
rsa=s->session->sess_cert->peer_rsa_tmp;
|
||||
else
|
||||
@@ -986,6 +993,13 @@ int dtls1_send_client_key_exchange(SSL *s)
|
||||
{
|
||||
DH *dh_srvr,*dh_clnt;
|
||||
|
||||
if (s->session->sess_cert == NULL)
|
||||
{
|
||||
ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE);
|
||||
SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE,SSL_R_UNEXPECTED_MESSAGE);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (s->session->sess_cert->peer_dh_tmp != NULL)
|
||||
dh_srvr=s->session->sess_cert->peer_dh_tmp;
|
||||
else
|
||||
@@ -1226,5 +1240,3 @@ int dtls1_send_client_certificate(SSL *s)
|
||||
/* SSL3_ST_CW_CERT_D */
|
||||
return(dtls1_do_write(s,SSL3_RT_HANDSHAKE));
|
||||
}
|
||||
|
||||
|
||||
+22
-39
@@ -126,16 +126,30 @@
|
||||
#include <openssl/des.h>
|
||||
#endif
|
||||
|
||||
/* dtls1_enc encrypts/decrypts the record in |s->wrec| / |s->rrec|, respectively.
|
||||
*
|
||||
* Returns:
|
||||
* 0: (in non-constant time) if the record is publically invalid (i.e. too
|
||||
* short etc).
|
||||
* 1: if the record's padding is valid / the encryption was successful.
|
||||
* -1: if the record's padding/AEAD-authenticator is invalid or, if sending,
|
||||
* an internal error occured. */
|
||||
int dtls1_enc(SSL *s, int send)
|
||||
{
|
||||
SSL3_RECORD *rec;
|
||||
EVP_CIPHER_CTX *ds;
|
||||
unsigned long l;
|
||||
int bs,i,ii,j,k;
|
||||
int bs,i,j,k,mac_size=0;
|
||||
const EVP_CIPHER *enc;
|
||||
|
||||
if (send)
|
||||
{
|
||||
if (s->write_hash)
|
||||
{
|
||||
mac_size=EVP_MD_size(s->write_hash);
|
||||
if (mac_size < 0)
|
||||
return -1;
|
||||
}
|
||||
ds=s->enc_write_ctx;
|
||||
rec= &(s->s3->wrec);
|
||||
if (s->enc_write_ctx == NULL)
|
||||
@@ -156,6 +170,11 @@ int dtls1_enc(SSL *s, int send)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (s->read_hash)
|
||||
{
|
||||
mac_size=EVP_MD_size(s->read_hash);
|
||||
OPENSSL_assert(mac_size >= 0);
|
||||
}
|
||||
ds=s->enc_read_ctx;
|
||||
rec= &(s->s3->rrec);
|
||||
if (s->enc_read_ctx == NULL)
|
||||
@@ -220,7 +239,7 @@ int dtls1_enc(SSL *s, int send)
|
||||
if (!send)
|
||||
{
|
||||
if (l == 0 || l%bs != 0)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
EVP_Cipher(ds,rec->data,rec->input,l);
|
||||
@@ -235,43 +254,7 @@ int dtls1_enc(SSL *s, int send)
|
||||
#endif /* KSSL_DEBUG */
|
||||
|
||||
if ((bs != 1) && !send)
|
||||
{
|
||||
ii=i=rec->data[l-1]; /* padding_length */
|
||||
i++;
|
||||
if (s->options&SSL_OP_TLS_BLOCK_PADDING_BUG)
|
||||
{
|
||||
/* First packet is even in size, so check */
|
||||
if ((memcmp(s->s3->read_sequence,
|
||||
"\0\0\0\0\0\0\0\0",8) == 0) && !(ii & 1))
|
||||
s->s3->flags|=TLS1_FLAGS_TLS_PADDING_BUG;
|
||||
if (s->s3->flags & TLS1_FLAGS_TLS_PADDING_BUG)
|
||||
i--;
|
||||
}
|
||||
/* TLS 1.0 does not bound the number of padding bytes by the block size.
|
||||
* All of them must have value 'padding_length'. */
|
||||
if (i + bs > (int)rec->length)
|
||||
{
|
||||
/* Incorrect padding. SSLerr() and ssl3_alert are done
|
||||
* by caller: we don't want to reveal whether this is
|
||||
* a decryption error or a MAC verification failure
|
||||
* (see http://www.openssl.org/~bodo/tls-cbc.txt)
|
||||
*/
|
||||
return -1;
|
||||
}
|
||||
for (j=(int)(l-i); j<(int)l; j++)
|
||||
{
|
||||
if (rec->data[j] != ii)
|
||||
{
|
||||
/* Incorrect padding */
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
rec->length-=i;
|
||||
|
||||
rec->data += bs; /* skip the implicit IV */
|
||||
rec->input += bs;
|
||||
rec->length -= bs;
|
||||
}
|
||||
return tls1_cbc_remove_padding(s, rec, bs, mac_size);
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
@@ -301,6 +301,16 @@ long dtls1_ctrl(SSL *s, int cmd, long larg, void *parg)
|
||||
case DTLS_CTRL_LISTEN:
|
||||
ret = dtls1_listen(s, parg);
|
||||
break;
|
||||
case SSL_CTRL_CHECK_PROTO_VERSION:
|
||||
/* For library-internal use; checks that the current protocol
|
||||
* is the highest enabled version (according to s->ctx->method,
|
||||
* as version negotiation may have changed s->method). */
|
||||
#if DTLS_MAX_VERSION != DTLS1_VERSION
|
||||
# error Code needs update for DTLS_method() support beyond DTLS1_VERSION.
|
||||
#endif
|
||||
/* Just one protocol version is supported so far;
|
||||
* fail closed if the version is not as expected. */
|
||||
return s->version == DTLS_MAX_VERSION;
|
||||
|
||||
default:
|
||||
ret = ssl3_ctrl(s, cmd, larg, parg);
|
||||
|
||||
Loaded 100 of 536 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user