mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-30 20:35:03 +01:00
Compare commits
52
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44eba34d9f | ||
|
|
a0ab40adc9 | ||
|
|
9b40b7f2d2 | ||
|
|
9501418289 | ||
|
|
e730271a76 | ||
|
|
a4b0aeeaca | ||
|
|
cd326b7ad6 | ||
|
|
441cb4c376 | ||
|
|
2f5371e7dd | ||
|
|
13b13bd51d | ||
|
|
0a88c805a7 | ||
|
|
d3a922570c | ||
|
|
6e3f86af3c | ||
|
|
21a09e47d3 | ||
|
|
80b97c646b | ||
|
|
4bdd28ca02 | ||
|
|
febb761cf6 | ||
|
|
fba38ede4f | ||
|
|
348d8c7ec5 | ||
|
|
1ef66c88ba | ||
|
|
117af7c676 | ||
|
|
2c7d236985 | ||
|
|
07293bd225 | ||
|
|
4557dc458d | ||
|
|
07bfbcd1cc | ||
|
|
ee099ec4d6 | ||
|
|
6d01de1c0e | ||
|
|
745db30017 | ||
|
|
deb4c713c6 | ||
|
|
ffb98d177e | ||
|
|
f9ed240692 | ||
|
|
f100518920 | ||
|
|
5680db7155 | ||
|
|
3eda35a774 | ||
|
|
bee2a5cc37 | ||
|
|
77bccc254d | ||
|
|
57f9b3e30a | ||
|
|
526df856a2 | ||
|
|
61f3556766 | ||
|
|
f0c33b01ea | ||
|
|
d9b4dbca1c | ||
|
|
86297d9de7 | ||
|
|
e7120cd6c3 | ||
|
|
4917e7796c | ||
|
|
3465b7d32c | ||
|
|
cda56246bd | ||
|
|
1fe04319e1 | ||
|
|
d7dad22b6d | ||
|
|
f71db2ee2a | ||
|
|
7084c689c8 | ||
|
|
e4af8b0e4f | ||
|
|
5579d8412c |
No files matched your search
+2
-1
@@ -609,7 +609,8 @@ _libroken4= kerberosIV/lib/libroken
|
||||
|
||||
.if exists(${.CURDIR}/kerberos5) && exists(${.CURDIR}/crypto) && \
|
||||
!defined(NOCRYPT) && defined(MAKE_KERBEROS5)
|
||||
_libkrb5= kerberos5/lib/libasn1 kerberos5/lib/libhdb kerberos5/lib/libsl
|
||||
_libkrb5= kerberos5/lib/libroken kerberos5/lib/libvers \
|
||||
kerberos5/lib/libasn1 kerberos5/lib/libhdb kerberos5/lib/libsl
|
||||
.endif
|
||||
|
||||
build-tools:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Updating Information for FreeBSD STABLE users
|
||||
Updating Information for FreeBSD 4.6 Security Branch (RELENG_4_6) users.
|
||||
|
||||
This file is maintained and copyrighted by M. Warner Losh
|
||||
<[email protected]>. See end of file for further details. For commonly
|
||||
@@ -17,7 +17,99 @@ minimal number of processes, if possible, for that patch. For those
|
||||
updates that don't have an advisory, or to be safe, you can do a full
|
||||
build and install as described in the COMMON ITEMS section.
|
||||
|
||||
20020813: p11
|
||||
20031126: p27 FreeBSD-SA-03:19.bind
|
||||
Corrected remote denial-of-service vulnerability in named(8).
|
||||
|
||||
20031003: p26 FreeBSD-SA-03:18.openssl
|
||||
Corrected vulnerabilities in OpenSSL ASN.1 parsing.
|
||||
|
||||
20031003: p25 FreeBSD-SA-03:17.procfs
|
||||
Correct integer underflows/overflows in procfs(5) and linprocfs(5).
|
||||
|
||||
20031002: p24 FreeBSD-SA-03:16.filedesc
|
||||
Correct a reference counting bug in readv(2).
|
||||
|
||||
20030924: p23 FreeBSD-SA-03:14.arp
|
||||
Updated fix for arplookup bug.
|
||||
|
||||
20030924: p22 FreeBSD-SA-03:15.openssh
|
||||
Fix PAM-related bugs in OpenSSH's challenge/response code.
|
||||
|
||||
20030923: p21 FreeBSD-SA-03:14.arp
|
||||
Fix a bug in arplookup(), whereby a hostile party on a locally
|
||||
attached network could exhaust kernel memory, and cause a system
|
||||
panic, by sending a flood of spoofed ARP requests.
|
||||
|
||||
20030917: p20 FreeBSD-SA-03:13.sendmail
|
||||
Fix another address parsing buffer overflow.
|
||||
|
||||
20030916: p19 FreeBSD-SA-03:12.openssh
|
||||
Follow-up fixes for OpenSSH oversized packet buffer handling.
|
||||
|
||||
20030916: p18 FreeBSD-SA-03:12.openssh
|
||||
OpenSSH oversized packet buffer handling corrected.
|
||||
|
||||
20030825: p17 FreeBSD-SA-03:11.sendmail
|
||||
Sendmail DNS map problem corrected.
|
||||
|
||||
20030810: p16 FreeBSD-SA-03:10.iBCS2
|
||||
iBCS2 system call translator for statfs leaked information.
|
||||
|
||||
20030810: p15 FreeBSD-SA-03:09.signal
|
||||
Repair range-checking errors in signal handling.
|
||||
|
||||
20030804: p14 FreeBSD-SA-03:08.realpath
|
||||
Correct a single byte buffer overflow in realpath(3).
|
||||
|
||||
20030329: p13 FreeBSD-SA-03:07.sendmail
|
||||
sendmail address parsing buffer overflow.
|
||||
|
||||
20030321: p12 FreeBSD-SA-03:06.openssl
|
||||
enable RSA blinding by default
|
||||
fix PKCS #1 v1.5 padding vulnerability
|
||||
|
||||
20030320: p11 FreeBSD-SA-03:05.xdr
|
||||
integer overflow errors in the Sun XDR library.
|
||||
|
||||
20030303: p10 FreeBSD-SA-03:04.sendmail
|
||||
sendmail header parsing buffer overflow, ident parsing bug.
|
||||
|
||||
20030223: p9 FreeBSD-SA-03:03.syncookies
|
||||
Make brute force attacks on syncookies much more difficult.
|
||||
|
||||
20030221: p8 FreeBSD-SA-03:02.openssl
|
||||
Update to OpenSSL 0.9.6i in order to correct `Timing-based
|
||||
attacks on SSL/TLS with CBC encryption' vulnerability.
|
||||
|
||||
20030204: p7 FreeBSD-SA-03:01.cvs
|
||||
Correct a double-free bug and disable a dangerous feature in
|
||||
cvs.
|
||||
|
||||
20030106: p6 FreeBSD-SA-02:44.filedesc
|
||||
Correct a reference counting bug in fpathconf(2).
|
||||
|
||||
20021113: p5 FreeBSD-SA-02:43.bind
|
||||
Correct name server vulnerabilities.
|
||||
|
||||
20021026: p4 FreeBSD-SA-02:41.smrsh
|
||||
smrsh bypass bug.
|
||||
|
||||
20021023: p3 FreeBSD-SA-02:40.kadmind
|
||||
Correct kadmind buffer overflow.
|
||||
|
||||
20020911: p2 FreeBSD-SA-02:39.libkvm
|
||||
The kvm_openfiles/kvm_open functions now mark the returned file
|
||||
descriptors close-on-exec in case set-user-ID/set-group-ID
|
||||
applications are careless.
|
||||
|
||||
20020909: p1
|
||||
Fix a bug in pkg_add(1) -r that made it look in the wrong place
|
||||
for 4.6-RELEASE and 4.6.2-RELEASE packages.
|
||||
|
||||
20020814:
|
||||
FreeBSD 4.6.2-RELEASE.
|
||||
|
||||
20020813: p11 FreeBSD-SA-02:38.signed-error
|
||||
Bounds checking errors in accept(), getsockname(),
|
||||
getpeername(), and a VESA ioctl() command were corrected.
|
||||
|
||||
@@ -1152,7 +1244,7 @@ that the style, formatting, etc of this file can be maintained.
|
||||
|
||||
Copyright information:
|
||||
|
||||
Copyright 1998-2002 M. Warner Losh. All Rights Reserved.
|
||||
Copyright 1998-2003 M. Warner Losh. All Rights Reserved.
|
||||
|
||||
Redistribution, translation and use, with or without modification, in
|
||||
full or in part, are permitted provided that the above copyright
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
1469. [bug] buffer length calculation for PX was wrong.
|
||||
|
||||
1468. [bug] ns_name_ntol() could overwite a zero length buffer.
|
||||
|
||||
1467. [bug] off by one bug in ns_makecannon().
|
||||
|
||||
1466. [bug] large ENDS UDP buffer size could trigger a assertion.
|
||||
|
||||
1465. [bug] possible NULL pointer dereference in db_sec.c
|
||||
|
||||
1464. [bug] the buffer used to construct the -ve record was not
|
||||
big enough for all possible SOA records. use pointer
|
||||
arithmetic to calculate the remaining size in this
|
||||
buffer.
|
||||
|
||||
1463. [bug] use serial space arithmetic to determine if a SIG is
|
||||
too old, in the future or has internally constistant
|
||||
times.
|
||||
|
||||
1462. [bug] write buffer overflow in make_rr().
|
||||
|
||||
--- 8.3.3-REL released --- (Wed Jun 26 21:15:43 PDT 2002)
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.3.3-REL
|
||||
8.3.3-REL-p1
|
||||
@@ -78,7 +78,7 @@
|
||||
*/
|
||||
|
||||
/* max length of data in RR data field */
|
||||
#define MAXDATA (2*MAXDNAME + 5*INT32SZ)
|
||||
#define MAXDATA (3*MAXDNAME + 5*INT32SZ)
|
||||
|
||||
/* max length of data in a TXT RR segment */
|
||||
#define MAXCHARSTRING 255
|
||||
|
||||
@@ -479,7 +479,9 @@ verify_set(struct db_rrset *rrset) {
|
||||
struct sig_record *sigdata;
|
||||
struct dnode *sigdn;
|
||||
struct databuf *sigdp;
|
||||
time_t now;
|
||||
u_int32_t now;
|
||||
u_int32_t exptime;
|
||||
u_int32_t signtime;
|
||||
char *signer;
|
||||
u_char name_n[MAXDNAME];
|
||||
u_char *sig, *eom;
|
||||
@@ -492,6 +494,7 @@ verify_set(struct db_rrset *rrset) {
|
||||
int dnssec_failed = 0, dnssec_succeeded = 0;
|
||||
int return_value;
|
||||
int i;
|
||||
int expired = 0;
|
||||
|
||||
if (rrset == NULL || rrset->rr_name == NULL) {
|
||||
ns_warning (ns_log_default, "verify_set: missing rrset/name");
|
||||
@@ -527,11 +530,14 @@ verify_set(struct db_rrset *rrset) {
|
||||
* Don't verify a set if the SIG inception time is in
|
||||
* the future. This should be fixed before 2038 (BEW)
|
||||
*/
|
||||
if ((time_t)ntohl(sigdata->sig_time_n) > now)
|
||||
signtime = ntohl(sigdata->sig_time_n);
|
||||
if (SEQ_GT(signtime, now))
|
||||
continue;
|
||||
|
||||
/* An expired set is dropped, but the data is not. */
|
||||
if ((time_t)ntohl(sigdata->sig_exp_n) < now) {
|
||||
exptime = ntohl(sigdata->sig_exp_n);
|
||||
if (SEQ_GT(now, exptime)) {
|
||||
expired++;
|
||||
db_detach(&sigdn->dp);
|
||||
sigdp = NULL;
|
||||
continue;
|
||||
@@ -723,7 +729,7 @@ verify_set(struct db_rrset *rrset) {
|
||||
}
|
||||
|
||||
end:
|
||||
if (dnssec_failed > 0)
|
||||
if (dnssec_failed > 0 || expired > 0)
|
||||
rrset_trim_sigs(rrset);
|
||||
if (trustedkey == 0 && key != NULL)
|
||||
dst_free_key(key);
|
||||
|
||||
@@ -469,7 +469,7 @@ struct qinfo {
|
||||
q_cmsglen, /* len of cname message */
|
||||
q_cmsgsize; /* allocated size of cname message */
|
||||
int16_t q_dfd; /* UDP file descriptor */
|
||||
int16_t q_udpsize; /* UDP message size */
|
||||
u_int16_t q_udpsize; /* UDP message size */
|
||||
int q_distance; /* distance this query is from the
|
||||
* original query that the server
|
||||
* received. */
|
||||
|
||||
@@ -66,7 +66,7 @@ cache_n_resp(u_char *msg, int msglen, struct sockaddr_in from,
|
||||
u_int16_t atype;
|
||||
u_char *sp, *cp1;
|
||||
u_char data[MAXDATA];
|
||||
size_t len = sizeof data;
|
||||
u_char *eod = data + sizeof(data);
|
||||
#endif
|
||||
|
||||
nameserIncr(from.sin_addr, nssRcvdNXD);
|
||||
@@ -186,7 +186,7 @@ cache_n_resp(u_char *msg, int msglen, struct sockaddr_in from,
|
||||
rdatap = cp;
|
||||
|
||||
/* origin */
|
||||
n = dn_expand(msg, msg + msglen, cp, (char*)data, len);
|
||||
n = dn_expand(msg, msg + msglen, cp, (char*)data, eod - data);
|
||||
if (n < 0) {
|
||||
ns_debug(ns_log_ncache, 3,
|
||||
"ncache: origin form error");
|
||||
@@ -195,9 +195,8 @@ cache_n_resp(u_char *msg, int msglen, struct sockaddr_in from,
|
||||
cp += n;
|
||||
n = strlen((char*)data) + 1;
|
||||
cp1 = data + n;
|
||||
len -= n;
|
||||
/* mail */
|
||||
n = dn_expand(msg, msg + msglen, cp, (char*)cp1, len);
|
||||
n = dn_expand(msg, msg + msglen, cp, (char*)cp1, eod - cp1);
|
||||
if (n < 0) {
|
||||
ns_debug(ns_log_ncache, 3, "ncache: mail form error");
|
||||
return;
|
||||
@@ -205,20 +204,20 @@ cache_n_resp(u_char *msg, int msglen, struct sockaddr_in from,
|
||||
cp += n;
|
||||
n = strlen((char*)cp1) + 1;
|
||||
cp1 += n;
|
||||
len -= n;
|
||||
n = 5 * INT32SZ;
|
||||
if (n > (eod - cp1)) /* Can't happen. See MAXDATA. */
|
||||
return;
|
||||
BOUNDS_CHECK(cp, n);
|
||||
memcpy(cp1, cp, n);
|
||||
/* serial, refresh, retry, expire, min */
|
||||
cp1 += n;
|
||||
len -= n;
|
||||
cp += n;
|
||||
if (cp != rdatap + dlen) {
|
||||
ns_debug(ns_log_ncache, 3, "ncache: form error");
|
||||
return;
|
||||
}
|
||||
/* store the zone of the soa record */
|
||||
n = dn_expand(msg, msg + msglen, sp, (char*)cp1, len);
|
||||
n = dn_expand(msg, msg + msglen, sp, (char*)cp1, eod - cp1);
|
||||
if (n < 0) {
|
||||
ns_debug(ns_log_ncache, 3, "ncache: form error 2");
|
||||
return;
|
||||
|
||||
@@ -2195,7 +2195,7 @@ make_rr(const char *name, struct databuf *dp, u_char *buf,
|
||||
|
||||
/* first just copy over the type_covered, algorithm, */
|
||||
/* labels, orig ttl, two timestamps, and the footprint */
|
||||
if ((dp->d_size - 18) > buflen)
|
||||
if (buflen < 18)
|
||||
goto cleanup; /* out of room! */
|
||||
memcpy(cp, cp1, 18);
|
||||
cp += 18;
|
||||
|
||||
@@ -272,7 +272,7 @@ ns_resp(u_char *msg, int msglen, struct sockaddr_in from, struct qstream *qsp)
|
||||
u_int qtype, qclass;
|
||||
int restart; /* flag for processing cname response */
|
||||
int validanswer, dbflags;
|
||||
int cname, lastwascname, externalcname;
|
||||
int cname, lastwascname, externalcname, cachenegative;
|
||||
int count, founddata, foundname;
|
||||
int buflen;
|
||||
int newmsglen;
|
||||
@@ -912,6 +912,7 @@ tcp_retry:
|
||||
cname = 0;
|
||||
lastwascname = 0;
|
||||
externalcname = 0;
|
||||
cachenegative = 1;
|
||||
strcpy(aname, qname);
|
||||
|
||||
if (count) {
|
||||
@@ -981,6 +982,7 @@ tcp_retry:
|
||||
name);
|
||||
db_detach(&dp);
|
||||
validanswer = 0;
|
||||
cachenegative = 0;
|
||||
continue;
|
||||
}
|
||||
if (type == T_CNAME &&
|
||||
@@ -1011,6 +1013,7 @@ tcp_retry:
|
||||
"last was cname, ignoring auth. and add.");
|
||||
db_detach(&dp);
|
||||
validanswer = 0;
|
||||
cachenegative = 0;
|
||||
break;
|
||||
}
|
||||
if (i < arfirst) {
|
||||
@@ -1026,6 +1029,7 @@ tcp_retry:
|
||||
sin_ntoa(from));
|
||||
db_detach(&dp);
|
||||
validanswer = 0;
|
||||
cachenegative = 0;
|
||||
continue;
|
||||
} else if (!ns_samedomain(name,
|
||||
qp->q_domain)) {
|
||||
@@ -1039,6 +1043,7 @@ tcp_retry:
|
||||
sin_ntoa(from));
|
||||
db_detach(&dp);
|
||||
validanswer = 0;
|
||||
cachenegative = 0;
|
||||
continue;
|
||||
}
|
||||
if (type == T_NS) {
|
||||
@@ -1231,8 +1236,9 @@ tcp_retry:
|
||||
)
|
||||
)
|
||||
{
|
||||
cache_n_resp(msg, msglen, from, qp->q_name,
|
||||
qp->q_class, qp->q_type);
|
||||
if (cachenegative)
|
||||
cache_n_resp(msg, msglen, from, qp->q_name,
|
||||
qp->q_class, qp->q_type);
|
||||
|
||||
if (!qp->q_cmsglen && validanswer) {
|
||||
ns_debug(ns_log_default, 3,
|
||||
@@ -2001,7 +2007,7 @@ rrextract(u_char *msg, int msglen, u_char *rrp, struct databuf **dpp,
|
||||
* to BOUNDS_CHECK() here.
|
||||
*/
|
||||
cp1 += (n = strlen((char *)cp1) + 1);
|
||||
n1 = sizeof(data) - n;
|
||||
n1 = sizeof(data) - n - INT16SZ;
|
||||
n = dn_expand(msg, eom, cp, (char *)cp1, n1);
|
||||
if (n < 0) {
|
||||
hp->rcode = FORMERR;
|
||||
@@ -2043,8 +2049,18 @@ rrextract(u_char *msg, int msglen, u_char *rrp, struct databuf **dpp,
|
||||
ttl = origTTL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check that expire and signature times are internally
|
||||
* consistant.
|
||||
*/
|
||||
if (!SEQ_GT(exptime, signtime) && exptime != signtime) {
|
||||
ns_debug(ns_log_default, 3,
|
||||
"ignoring SIG: signature expires before it was signed");
|
||||
return ((cp - rrp) + dlen);
|
||||
}
|
||||
|
||||
/* Don't let bogus signers "sign" in the future. */
|
||||
if (signtime > now) {
|
||||
if (SEQ_GT(signtime, now)) {
|
||||
ns_debug(ns_log_default, 3,
|
||||
"ignoring SIG: signature date %s is in the future",
|
||||
p_secstodate (signtime));
|
||||
@@ -2052,7 +2068,7 @@ rrextract(u_char *msg, int msglen, u_char *rrp, struct databuf **dpp,
|
||||
}
|
||||
|
||||
/* Ignore received SIG RR's that are already expired. */
|
||||
if (exptime <= now) {
|
||||
if (SEQ_GT(now, exptime)) {
|
||||
ns_debug(ns_log_default, 3,
|
||||
"ignoring SIG: expiration %s is in the past",
|
||||
p_secstodate (exptime));
|
||||
|
||||
@@ -341,6 +341,10 @@ ns_name_ntol(const u_char *src, u_char *dst, size_t dstsiz)
|
||||
dn = dst;
|
||||
eom = dst + dstsiz;
|
||||
|
||||
if (dn >= eom) {
|
||||
errno = EMSGSIZE;
|
||||
return (-1);
|
||||
}
|
||||
while ((n = *cp++) != 0) {
|
||||
if ((n & NS_CMPRSFLGS) == NS_CMPRSFLGS) {
|
||||
/* Some kind of compression pointer. */
|
||||
|
||||
@@ -166,7 +166,7 @@ int
|
||||
ns_makecanon(const char *src, char *dst, size_t dstsize) {
|
||||
size_t n = strlen(src);
|
||||
|
||||
if (n + sizeof "." > dstsize) {
|
||||
if (n + sizeof "." + 1 > dstsize) {
|
||||
errno = EMSGSIZE;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@@ -984,9 +984,6 @@ dirswitch (dir, repos)
|
||||
return;
|
||||
}
|
||||
|
||||
if (dir_name != NULL)
|
||||
free (dir_name);
|
||||
|
||||
dir_len = strlen (dir);
|
||||
|
||||
/* Check for a trailing '/'. This is not ISDIRSEP because \ in the
|
||||
@@ -1002,6 +999,9 @@ dirswitch (dir, repos)
|
||||
return;
|
||||
}
|
||||
|
||||
if (dir_name != NULL)
|
||||
free (dir_name);
|
||||
|
||||
dir_name = malloc (strlen (server_temp_dir) + dir_len + 40);
|
||||
if (dir_name == NULL)
|
||||
{
|
||||
@@ -4738,8 +4738,8 @@ struct request requests[] =
|
||||
REQ_LINE("Max-dotdot", serve_max_dotdot, 0),
|
||||
REQ_LINE("Static-directory", serve_static_directory, 0),
|
||||
REQ_LINE("Sticky", serve_sticky, 0),
|
||||
REQ_LINE("Checkin-prog", serve_checkin_prog, 0),
|
||||
REQ_LINE("Update-prog", serve_update_prog, 0),
|
||||
REQ_LINE("Checkin-prog", serve_noop, 0),
|
||||
REQ_LINE("Update-prog", serve_noop, 0),
|
||||
REQ_LINE("Entry", serve_entry, RQ_ESSENTIAL),
|
||||
REQ_LINE("Kopt", serve_kopt, 0),
|
||||
REQ_LINE("Checkin-time", serve_checkin_time, 0),
|
||||
|
||||
@@ -58,6 +58,8 @@ SM_IDSTR(id, "@(#)$Id: smrsh.c,v 8.55 2001/09/11 04:05:22 gshapiro Exp $")
|
||||
#include <sm/io.h>
|
||||
#include <sm/string.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
@@ -150,6 +152,7 @@ main(argc, argv)
|
||||
char cmdbuf[1000];
|
||||
char pathbuf[1000];
|
||||
char specialbuf[32];
|
||||
struct stat st;
|
||||
|
||||
#ifndef DEBUG
|
||||
# ifndef LOG_MAIL
|
||||
@@ -290,6 +293,38 @@ main(argc, argv)
|
||||
(void) sm_io_fprintf(smioout, SM_TIME_DEFAULT,
|
||||
"Trying %s\n", cmdbuf);
|
||||
#endif /* DEBUG */
|
||||
if (stat(cmdbuf, &st) < 0)
|
||||
{
|
||||
/* can't stat it */
|
||||
(void) sm_io_fprintf(smioerr, SM_TIME_DEFAULT,
|
||||
"%s: %s not available for sendmail programs (stat failed)\n",
|
||||
prg, cmd);
|
||||
if (p != NULL)
|
||||
*p = ' ';
|
||||
#ifndef DEBUG
|
||||
syslog(LOG_CRIT, "uid %d: attempt to use %s (stat failed)",
|
||||
(int) getuid(), cmd);
|
||||
#endif /* ! DEBUG */
|
||||
exit(EX_UNAVAILABLE);
|
||||
}
|
||||
if (!S_ISREG(st.st_mode)
|
||||
#ifdef S_ISLNK
|
||||
&& !S_ISLNK(st.st_mode)
|
||||
#endif /* S_ISLNK */
|
||||
)
|
||||
{
|
||||
/* can't stat it */
|
||||
(void) sm_io_fprintf(smioerr, SM_TIME_DEFAULT,
|
||||
"%s: %s not available for sendmail programs (not a file)\n",
|
||||
prg, cmd);
|
||||
if (p != NULL)
|
||||
*p = ' ';
|
||||
#ifndef DEBUG
|
||||
syslog(LOG_CRIT, "uid %d: attempt to use %s (not a file)",
|
||||
(int) getuid(), cmd);
|
||||
#endif /* ! DEBUG */
|
||||
exit(EX_UNAVAILABLE);
|
||||
}
|
||||
if (access(cmdbuf, X_OK) < 0)
|
||||
{
|
||||
/* oops.... crack attack possiblity */
|
||||
|
||||
@@ -332,6 +332,8 @@ setdefaults(e)
|
||||
DontProbeInterfaces = DPI_PROBEALL;
|
||||
DoubleBounceAddr = "postmaster";
|
||||
MaxHeadersLength = MAXHDRSLEN;
|
||||
MaxMimeHeaderLength = MAXLINE;
|
||||
MaxMimeFieldLength = MaxMimeHeaderLength / 2;
|
||||
MaxForwardEntries = 0;
|
||||
FastSplit = 1;
|
||||
#if SASL
|
||||
|
||||
@@ -3459,7 +3459,7 @@ getauthinfo(fd, may_be_forged)
|
||||
if (i < 0 || p == &ibuf[0])
|
||||
goto noident;
|
||||
|
||||
if (*--p == '\n' && *--p == '\r')
|
||||
if (p >= &ibuf[2] && *--p == '\n' && *--p == '\r')
|
||||
p--;
|
||||
*++p = '\0';
|
||||
|
||||
|
||||
+129
-84
@@ -674,8 +674,8 @@ eatheader(e, full, log)
|
||||
if (buf[0] != '\0')
|
||||
{
|
||||
if (bitset(H_FROM, h->h_flags))
|
||||
expand(crackaddr(buf), buf, sizeof buf,
|
||||
e);
|
||||
expand(crackaddr(buf, e),
|
||||
buf, sizeof buf, e);
|
||||
h->h_value = sm_rpool_strdup_x(e->e_rpool, buf);
|
||||
h->h_flags &= ~H_DEFAULT;
|
||||
}
|
||||
@@ -996,7 +996,11 @@ priencode(p)
|
||||
** it and replaces it with "$g". The parse is totally ad hoc
|
||||
** and isn't even guaranteed to leave something syntactically
|
||||
** identical to what it started with. However, it does leave
|
||||
** something semantically identical.
|
||||
** something semantically identical if possible, else at least
|
||||
** syntactically correct.
|
||||
**
|
||||
** For example, it changes "Real Name <[email protected]> (Comment)"
|
||||
** to "Real Name <$g> (Comment)".
|
||||
**
|
||||
** This algorithm has been cleaned up to handle a wider range
|
||||
** of cases -- notably quoted and backslash escaped strings.
|
||||
@@ -1005,6 +1009,7 @@ priencode(p)
|
||||
**
|
||||
** Parameters:
|
||||
** addr -- the address to be cracked.
|
||||
** e -- the current envelope.
|
||||
**
|
||||
** Returns:
|
||||
** a pointer to the new version.
|
||||
@@ -1017,28 +1022,50 @@ priencode(p)
|
||||
** be copied if it is to be reused.
|
||||
*/
|
||||
|
||||
#define SM_HAVE_ROOM ((bp < buflim) && (buflim <= bufend))
|
||||
|
||||
/*
|
||||
** Append a character to bp if we have room.
|
||||
** If not, punt and return $g.
|
||||
*/
|
||||
|
||||
#define SM_APPEND_CHAR(c) \
|
||||
do \
|
||||
{ \
|
||||
if (SM_HAVE_ROOM) \
|
||||
*bp++ = (c); \
|
||||
else \
|
||||
goto returng; \
|
||||
} while (0)
|
||||
|
||||
#if MAXNAME < 10
|
||||
ERROR MAXNAME must be at least 10
|
||||
#endif /* MAXNAME < 10 */
|
||||
|
||||
char *
|
||||
crackaddr(addr)
|
||||
crackaddr(addr, e)
|
||||
register char *addr;
|
||||
ENVELOPE *e;
|
||||
{
|
||||
register char *p;
|
||||
register char c;
|
||||
int cmtlev;
|
||||
int realcmtlev;
|
||||
int anglelev, realanglelev;
|
||||
int copylev;
|
||||
int bracklev;
|
||||
bool qmode;
|
||||
bool realqmode;
|
||||
bool skipping;
|
||||
bool putgmac = false;
|
||||
bool quoteit = false;
|
||||
bool gotangle = false;
|
||||
bool gotcolon = false;
|
||||
int cmtlev; /* comment level in input string */
|
||||
int realcmtlev; /* comment level in output string */
|
||||
int anglelev; /* angle level in input string */
|
||||
int copylev; /* 0 == in address, >0 copying */
|
||||
int bracklev; /* bracket level for IPv6 addr check */
|
||||
bool addangle; /* put closing angle in output */
|
||||
bool qmode; /* quoting in original string? */
|
||||
bool realqmode; /* quoting in output string? */
|
||||
bool putgmac = false; /* already wrote $g */
|
||||
bool quoteit = false; /* need to quote next character */
|
||||
bool gotangle = false; /* found first '<' */
|
||||
bool gotcolon = false; /* found a ':' */
|
||||
register char *bp;
|
||||
char *buflim;
|
||||
char *bufhead;
|
||||
char *addrhead;
|
||||
char *bufend;
|
||||
static char buf[MAXNAME + 1];
|
||||
|
||||
if (tTd(33, 1))
|
||||
@@ -1053,25 +1080,22 @@ crackaddr(addr)
|
||||
** adjusted later if we find them.
|
||||
*/
|
||||
|
||||
buflim = bufend = &buf[sizeof(buf) - 1];
|
||||
bp = bufhead = buf;
|
||||
buflim = &buf[sizeof buf - 7];
|
||||
p = addrhead = addr;
|
||||
copylev = anglelev = realanglelev = cmtlev = realcmtlev = 0;
|
||||
copylev = anglelev = cmtlev = realcmtlev = 0;
|
||||
bracklev = 0;
|
||||
qmode = realqmode = false;
|
||||
qmode = realqmode = addangle = false;
|
||||
|
||||
while ((c = *p++) != '\0')
|
||||
{
|
||||
/*
|
||||
** If the buffer is overful, go into a special "skipping"
|
||||
** mode that tries to keep legal syntax but doesn't actually
|
||||
** output things.
|
||||
** Try to keep legal syntax using spare buffer space
|
||||
** (maintained by buflim).
|
||||
*/
|
||||
|
||||
skipping = bp >= buflim;
|
||||
|
||||
if (copylev > 0 && !skipping)
|
||||
*bp++ = c;
|
||||
if (copylev > 0)
|
||||
SM_APPEND_CHAR(c);
|
||||
|
||||
/* check for backslash escapes */
|
||||
if (c == '\\')
|
||||
@@ -1086,8 +1110,8 @@ crackaddr(addr)
|
||||
p--;
|
||||
goto putg;
|
||||
}
|
||||
if (copylev > 0 && !skipping)
|
||||
*bp++ = c;
|
||||
if (copylev > 0)
|
||||
SM_APPEND_CHAR(c);
|
||||
goto putg;
|
||||
}
|
||||
|
||||
@@ -1095,8 +1119,14 @@ crackaddr(addr)
|
||||
if (c == '"' && cmtlev <= 0)
|
||||
{
|
||||
qmode = !qmode;
|
||||
if (copylev > 0 && !skipping)
|
||||
if (copylev > 0 && SM_HAVE_ROOM)
|
||||
{
|
||||
if (realqmode)
|
||||
buflim--;
|
||||
else
|
||||
buflim++;
|
||||
realqmode = !realqmode;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (qmode)
|
||||
@@ -1108,15 +1138,15 @@ crackaddr(addr)
|
||||
cmtlev++;
|
||||
|
||||
/* allow space for closing paren */
|
||||
if (!skipping)
|
||||
if (SM_HAVE_ROOM)
|
||||
{
|
||||
buflim--;
|
||||
realcmtlev++;
|
||||
if (copylev++ <= 0)
|
||||
{
|
||||
if (bp != bufhead)
|
||||
*bp++ = ' ';
|
||||
*bp++ = c;
|
||||
SM_APPEND_CHAR(' ');
|
||||
SM_APPEND_CHAR(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1126,7 +1156,7 @@ crackaddr(addr)
|
||||
{
|
||||
cmtlev--;
|
||||
copylev--;
|
||||
if (!skipping)
|
||||
if (SM_HAVE_ROOM)
|
||||
{
|
||||
realcmtlev--;
|
||||
buflim++;
|
||||
@@ -1137,7 +1167,7 @@ crackaddr(addr)
|
||||
else if (c == ')')
|
||||
{
|
||||
/* syntax error: unmatched ) */
|
||||
if (copylev > 0 && !skipping)
|
||||
if (copylev > 0 && SM_HAVE_ROOM)
|
||||
bp--;
|
||||
}
|
||||
|
||||
@@ -1155,7 +1185,7 @@ crackaddr(addr)
|
||||
|
||||
/*
|
||||
** Check for DECnet phase IV ``::'' (host::user)
|
||||
** or ** DECnet phase V ``:.'' syntaxes. The latter
|
||||
** or DECnet phase V ``:.'' syntaxes. The latter
|
||||
** covers ``user@DEC:.tay.myhost'' and
|
||||
** ``DEC:.tay.myhost::user'' syntaxes (bletch).
|
||||
*/
|
||||
@@ -1164,10 +1194,10 @@ crackaddr(addr)
|
||||
{
|
||||
if (cmtlev <= 0 && !qmode)
|
||||
quoteit = true;
|
||||
if (copylev > 0 && !skipping)
|
||||
if (copylev > 0)
|
||||
{
|
||||
*bp++ = c;
|
||||
*bp++ = *p;
|
||||
SM_APPEND_CHAR(c);
|
||||
SM_APPEND_CHAR(*p);
|
||||
}
|
||||
p++;
|
||||
goto putg;
|
||||
@@ -1178,41 +1208,43 @@ crackaddr(addr)
|
||||
bp = bufhead;
|
||||
if (quoteit)
|
||||
{
|
||||
*bp++ = '"';
|
||||
SM_APPEND_CHAR('"');
|
||||
|
||||
/* back up over the ':' and any spaces */
|
||||
--p;
|
||||
while (isascii(*--p) && isspace(*p))
|
||||
while (p > addr &&
|
||||
isascii(*--p) && isspace(*p))
|
||||
continue;
|
||||
p++;
|
||||
}
|
||||
for (q = addrhead; q < p; )
|
||||
{
|
||||
c = *q++;
|
||||
if (bp < buflim)
|
||||
if (quoteit && c == '"')
|
||||
{
|
||||
if (quoteit && c == '"')
|
||||
*bp++ = '\\';
|
||||
*bp++ = c;
|
||||
SM_APPEND_CHAR('\\');
|
||||
SM_APPEND_CHAR(c);
|
||||
}
|
||||
else
|
||||
SM_APPEND_CHAR(c);
|
||||
}
|
||||
if (quoteit)
|
||||
{
|
||||
if (bp == &bufhead[1])
|
||||
bp--;
|
||||
else
|
||||
*bp++ = '"';
|
||||
SM_APPEND_CHAR('"');
|
||||
while ((c = *p++) != ':')
|
||||
{
|
||||
if (bp < buflim)
|
||||
*bp++ = c;
|
||||
}
|
||||
*bp++ = c;
|
||||
SM_APPEND_CHAR(c);
|
||||
SM_APPEND_CHAR(c);
|
||||
}
|
||||
|
||||
/* any trailing white space is part of group: */
|
||||
while (isascii(*p) && isspace(*p) && bp < buflim)
|
||||
*bp++ = *p++;
|
||||
while (isascii(*p) && isspace(*p))
|
||||
{
|
||||
SM_APPEND_CHAR(*p);
|
||||
p++;
|
||||
}
|
||||
copylev = 0;
|
||||
putgmac = quoteit = false;
|
||||
bufhead = bp;
|
||||
@@ -1221,10 +1253,7 @@ crackaddr(addr)
|
||||
}
|
||||
|
||||
if (c == ';' && copylev <= 0 && !ColonOkInAddr)
|
||||
{
|
||||
if (bp < buflim)
|
||||
*bp++ = c;
|
||||
}
|
||||
SM_APPEND_CHAR(c);
|
||||
|
||||
/* check for characters that may have to be quoted */
|
||||
if (strchr(MustQuoteChars, c) != NULL)
|
||||
@@ -1252,42 +1281,45 @@ crackaddr(addr)
|
||||
|
||||
/* oops -- have to change our mind */
|
||||
anglelev = 1;
|
||||
if (!skipping)
|
||||
realanglelev = 1;
|
||||
if (SM_HAVE_ROOM)
|
||||
{
|
||||
if (!addangle)
|
||||
buflim--;
|
||||
addangle = true;
|
||||
}
|
||||
|
||||
bp = bufhead;
|
||||
if (quoteit)
|
||||
{
|
||||
*bp++ = '"';
|
||||
SM_APPEND_CHAR('"');
|
||||
|
||||
/* back up over the '<' and any spaces */
|
||||
--p;
|
||||
while (isascii(*--p) && isspace(*p))
|
||||
while (p > addr &&
|
||||
isascii(*--p) && isspace(*p))
|
||||
continue;
|
||||
p++;
|
||||
}
|
||||
for (q = addrhead; q < p; )
|
||||
{
|
||||
c = *q++;
|
||||
if (bp < buflim)
|
||||
if (quoteit && c == '"')
|
||||
{
|
||||
if (quoteit && c == '"')
|
||||
*bp++ = '\\';
|
||||
*bp++ = c;
|
||||
SM_APPEND_CHAR('\\');
|
||||
SM_APPEND_CHAR(c);
|
||||
}
|
||||
else
|
||||
SM_APPEND_CHAR(c);
|
||||
}
|
||||
if (quoteit)
|
||||
{
|
||||
if (bp == &buf[1])
|
||||
bp--;
|
||||
else
|
||||
*bp++ = '"';
|
||||
SM_APPEND_CHAR('"');
|
||||
while ((c = *p++) != '<')
|
||||
{
|
||||
if (bp < buflim)
|
||||
*bp++ = c;
|
||||
}
|
||||
*bp++ = c;
|
||||
SM_APPEND_CHAR(c);
|
||||
SM_APPEND_CHAR(c);
|
||||
}
|
||||
copylev = 0;
|
||||
putgmac = quoteit = false;
|
||||
@@ -1299,13 +1331,14 @@ crackaddr(addr)
|
||||
if (anglelev > 0)
|
||||
{
|
||||
anglelev--;
|
||||
if (!skipping)
|
||||
if (SM_HAVE_ROOM)
|
||||
{
|
||||
realanglelev--;
|
||||
buflim++;
|
||||
if (addangle)
|
||||
buflim++;
|
||||
addangle = false;
|
||||
}
|
||||
}
|
||||
else if (!skipping)
|
||||
else if (SM_HAVE_ROOM)
|
||||
{
|
||||
/* syntax error: unmatched > */
|
||||
if (copylev > 0)
|
||||
@@ -1314,7 +1347,7 @@ crackaddr(addr)
|
||||
continue;
|
||||
}
|
||||
if (copylev++ <= 0)
|
||||
*bp++ = c;
|
||||
SM_APPEND_CHAR(c);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1322,30 +1355,42 @@ crackaddr(addr)
|
||||
putg:
|
||||
if (copylev <= 0 && !putgmac)
|
||||
{
|
||||
if (bp > bufhead && bp[-1] == ')')
|
||||
*bp++ = ' ';
|
||||
*bp++ = MACROEXPAND;
|
||||
*bp++ = 'g';
|
||||
if (bp > buf && bp[-1] == ')')
|
||||
SM_APPEND_CHAR(' ');
|
||||
SM_APPEND_CHAR(MACROEXPAND);
|
||||
SM_APPEND_CHAR('g');
|
||||
putgmac = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* repair any syntactic damage */
|
||||
if (realqmode)
|
||||
if (realqmode && bp < bufend)
|
||||
*bp++ = '"';
|
||||
while (realcmtlev-- > 0)
|
||||
while (realcmtlev-- > 0 && bp < bufend)
|
||||
*bp++ = ')';
|
||||
while (realanglelev-- > 0)
|
||||
if (addangle && bp < bufend)
|
||||
*bp++ = '>';
|
||||
*bp++ = '\0';
|
||||
*bp = '\0';
|
||||
if (bp < bufend)
|
||||
goto success;
|
||||
|
||||
returng:
|
||||
/* String too long, punt */
|
||||
buf[0] = '<';
|
||||
buf[1] = MACROEXPAND;
|
||||
buf[2]= 'g';
|
||||
buf[3] = '>';
|
||||
buf[4]= '\0';
|
||||
sm_syslog(LOG_ALERT, e->e_id,
|
||||
"Dropped invalid comments from header address");
|
||||
|
||||
success:
|
||||
if (tTd(33, 1))
|
||||
{
|
||||
sm_dprintf("crackaddr=>`");
|
||||
xputs(buf);
|
||||
sm_dprintf("'\n");
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
/*
|
||||
|
||||
@@ -4209,7 +4209,7 @@ testmodeline(line, e)
|
||||
"Usage: /parse address\n");
|
||||
return;
|
||||
}
|
||||
q = crackaddr(p);
|
||||
q = crackaddr(p, e);
|
||||
(void) sm_io_fprintf(smioout, SM_TIME_DEFAULT,
|
||||
"Cracked address = ");
|
||||
xputs(q);
|
||||
|
||||
@@ -608,7 +608,7 @@ unsigned char TokTypeNoC[256] =
|
||||
};
|
||||
|
||||
|
||||
#define NOCHAR -1 /* signal nothing in lookahead token */
|
||||
#define NOCHAR (-1) /* signal nothing in lookahead token */
|
||||
|
||||
char **
|
||||
prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab)
|
||||
@@ -694,22 +694,31 @@ prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab)
|
||||
/* see if there is room */
|
||||
if (q >= &pvpbuf[pvpbsize - 5])
|
||||
{
|
||||
addrtoolong:
|
||||
usrerr("553 5.1.1 Address too long");
|
||||
if (strlen(addr) > MAXNAME)
|
||||
addr[MAXNAME] = '\0';
|
||||
returnnull:
|
||||
if (delimptr != NULL)
|
||||
{
|
||||
if (p > addr)
|
||||
p--;
|
||||
*delimptr = p;
|
||||
}
|
||||
CurEnv->e_to = saveto;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* squirrel it away */
|
||||
#if !ALLOW_255
|
||||
if ((char) c == (char) -1 && !tTd(82, 101))
|
||||
c &= 0x7f;
|
||||
#endif /* !ALLOW_255 */
|
||||
*q++ = c;
|
||||
}
|
||||
|
||||
/* read a new input character */
|
||||
c = *p++;
|
||||
c = (*p++) & 0x00ff;
|
||||
if (c == '\0')
|
||||
{
|
||||
/* diagnose and patch up bad syntax */
|
||||
@@ -764,6 +773,9 @@ prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab)
|
||||
}
|
||||
else if (c != '!' || state == QST)
|
||||
{
|
||||
/* see if there is room */
|
||||
if (q >= &pvpbuf[pvpbsize - 5])
|
||||
goto addrtoolong;
|
||||
*q++ = '\\';
|
||||
continue;
|
||||
}
|
||||
@@ -849,6 +861,9 @@ prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab)
|
||||
/* new token */
|
||||
if (tok != q)
|
||||
{
|
||||
/* see if there is room */
|
||||
if (q >= &pvpbuf[pvpbsize - 5])
|
||||
goto addrtoolong;
|
||||
*q++ = '\0';
|
||||
if (tTd(22, 36))
|
||||
{
|
||||
@@ -2508,7 +2523,7 @@ remotename(name, m, flags, pstat, e)
|
||||
if (bitset(RF_CANONICAL, flags) || bitnset(M_NOCOMMENT, m->m_flags))
|
||||
fancy = "\201g";
|
||||
else
|
||||
fancy = crackaddr(name);
|
||||
fancy = crackaddr(name, e);
|
||||
|
||||
/*
|
||||
** Turn the name into canonical form.
|
||||
|
||||
@@ -316,7 +316,7 @@ extern ADDRESS NullAddress; /* a null (template) address [main.c] */
|
||||
|
||||
/* functions */
|
||||
extern void cataddr __P((char **, char **, char *, int, int));
|
||||
extern char *crackaddr __P((char *));
|
||||
extern char *crackaddr __P((char *, ENVELOPE *));
|
||||
extern bool emptyaddr __P((ADDRESS *));
|
||||
extern ADDRESS *getctladdr __P((ADDRESS *));
|
||||
extern int include __P((char *, bool, ADDRESS *, ADDRESS **, int, ENVELOPE *));
|
||||
|
||||
@@ -233,6 +233,7 @@ parse_dns_reply(data, len)
|
||||
dns_free_data(r);
|
||||
return NULL;
|
||||
}
|
||||
memset(*rr, 0, sizeof(**rr));
|
||||
(*rr)->rr_domain = sm_strdup(host);
|
||||
if ((*rr)->rr_domain == NULL)
|
||||
{
|
||||
|
||||
@@ -15,4 +15,4 @@
|
||||
|
||||
SM_RCSID("@(#)$Id: version.c,v 8.99 2002/04/04 22:20:06 ca Exp $")
|
||||
|
||||
char Version[] = "8.12.3";
|
||||
char Version[] = "8.12.3p3";
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <krb_err.h>
|
||||
#include <kadm_err.h>
|
||||
|
||||
RCSID("$Id: version4.c,v 1.24 2001/01/29 08:40:45 assar Exp $");
|
||||
RCSID("$Id: version4.c,v 1.27 2002/10/21 12:35:07 joda Exp $");
|
||||
|
||||
#define KADM_NO_OPCODE -1
|
||||
#define KADM_NO_ENCRYPT -2
|
||||
@@ -822,6 +822,13 @@ decode_packet(krb5_context context,
|
||||
off += _krb5_get_int(msg + off, &rlen, 4);
|
||||
memset(&authent, 0, sizeof(authent));
|
||||
authent.length = message.length - rlen - KADM_VERSIZE - 4;
|
||||
|
||||
if(authent.length >= MAX_KTXT_LEN) {
|
||||
krb5_warnx(context, "received bad rlen (%lu)", (unsigned long)rlen);
|
||||
make_you_loose_packet (KADM_LENGTH_ERROR, reply);
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy(authent.dat, (char*)msg + off, authent.length);
|
||||
off += authent.length;
|
||||
|
||||
|
||||
@@ -117,16 +117,25 @@ kadm_ser_in(u_char **dat, int *dat_len, u_char *errdat)
|
||||
u_char *retdat, *tmpdat;
|
||||
int retval, retlen;
|
||||
|
||||
if (strncmp(KADM_VERSTR, (char *)*dat, KADM_VERSIZE)) {
|
||||
if (*dat_len < (KADM_VERSIZE + sizeof(u_int32_t))
|
||||
|| strncmp(KADM_VERSTR, (char *)*dat, KADM_VERSIZE) != 0) {
|
||||
errpkt(errdat, dat, dat_len, KADM_BAD_VER);
|
||||
return KADM_BAD_VER;
|
||||
}
|
||||
in_len = KADM_VERSIZE;
|
||||
/* get the length */
|
||||
if ((retc = stv_long(*dat, &r_len, in_len, *dat_len)) < 0)
|
||||
if ((retc = stv_long(*dat, &r_len, in_len, *dat_len)) < 0 ||
|
||||
(r_len > *dat_len - KADM_VERSIZE - sizeof(u_int32_t))) {
|
||||
errpkt(errdat, dat, dat_len, KADM_LENGTH_ERROR);
|
||||
return KADM_LENGTH_ERROR;
|
||||
}
|
||||
|
||||
in_len += retc;
|
||||
authent.length = *dat_len - r_len - KADM_VERSIZE - sizeof(u_int32_t);
|
||||
if (authent.length > MAX_KTXT_LEN) {
|
||||
errpkt(errdat, dat, dat_len, KADM_LENGTH_ERROR);
|
||||
return KADM_LENGTH_ERROR;
|
||||
}
|
||||
memcpy(authent.dat, (char *)(*dat) + in_len, authent.length);
|
||||
authent.mbz = 0;
|
||||
/* service key should be set before here */
|
||||
|
||||
@@ -80,3 +80,11 @@ verify_response(Authctxt *authctxt, const char *response)
|
||||
authctxt->kbdintctxt = NULL;
|
||||
return res ? 0 : 1;
|
||||
}
|
||||
void
|
||||
abandon_challenge_response(Authctxt *authctxt)
|
||||
{
|
||||
if (authctxt->kbdintctxt != NULL) {
|
||||
device->free_ctx(authctxt->kbdintctxt);
|
||||
authctxt->kbdintctxt = NULL;
|
||||
}
|
||||
}
|
||||
@@ -160,6 +160,7 @@ struct passwd * getpwnamallow(const char *user);
|
||||
|
||||
char *get_challenge(Authctxt *);
|
||||
int verify_response(Authctxt *, const char *);
|
||||
void abandon_challenge_response(Authctxt *);
|
||||
|
||||
struct passwd * auth_get_user(void);
|
||||
|
||||
|
||||
+13
-1
@@ -73,7 +73,7 @@ do_authloop(Authctxt *authctxt)
|
||||
char info[1024];
|
||||
u_int dlen;
|
||||
u_int ulen;
|
||||
int type = 0;
|
||||
int prev, type = 0;
|
||||
struct passwd *pw = authctxt->pw;
|
||||
|
||||
debug("Attempting authentication for %s%.100s.",
|
||||
@@ -103,8 +103,20 @@ do_authloop(Authctxt *authctxt)
|
||||
info[0] = '\0';
|
||||
|
||||
/* Get a packet from the client. */
|
||||
prev = type;
|
||||
type = packet_read();
|
||||
|
||||
/*
|
||||
* If we started challenge-response authentication but the
|
||||
* next packet is not a response to our challenge, release
|
||||
* the resources allocated by get_challenge() (which would
|
||||
* normally have been released by verify_response() had we
|
||||
* received such a response)
|
||||
*/
|
||||
if (prev == SSH_CMSG_AUTH_TIS &&
|
||||
type != SSH_CMSG_AUTH_TIS_RESPONSE)
|
||||
abandon_challenge_response(authctxt);
|
||||
|
||||
/* Process the packet. */
|
||||
switch (type) {
|
||||
|
||||
|
||||
@@ -76,8 +76,8 @@ pam_child_conv(int n,
|
||||
*resp = xmalloc(n * sizeof **resp);
|
||||
buffer_init(&buffer);
|
||||
for (i = 0; i < n; ++i) {
|
||||
resp[i]->resp_retcode = 0;
|
||||
resp[i]->resp = NULL;
|
||||
(*resp)[i].resp_retcode = 0;
|
||||
(*resp)[i].resp = NULL;
|
||||
switch (msg[i]->msg_style) {
|
||||
case PAM_PROMPT_ECHO_OFF:
|
||||
buffer_put_cstring(&buffer, msg[i]->msg);
|
||||
@@ -85,7 +85,7 @@ pam_child_conv(int n,
|
||||
msg_recv(ctxt->pam_sock, &buffer);
|
||||
if (buffer_get_char(&buffer) != PAM_AUTHTOK)
|
||||
goto fail;
|
||||
resp[i]->resp = buffer_get_string(&buffer, NULL);
|
||||
(*resp)[i].resp = buffer_get_string(&buffer, NULL);
|
||||
break;
|
||||
case PAM_PROMPT_ECHO_ON:
|
||||
buffer_put_cstring(&buffer, msg[i]->msg);
|
||||
@@ -93,7 +93,7 @@ pam_child_conv(int n,
|
||||
msg_recv(ctxt->pam_sock, &buffer);
|
||||
if (buffer_get_char(&buffer) != PAM_AUTHTOK)
|
||||
goto fail;
|
||||
resp[i]->resp = buffer_get_string(&buffer, NULL);
|
||||
(*resp)[i].resp = buffer_get_string(&buffer, NULL);
|
||||
break;
|
||||
case PAM_ERROR_MSG:
|
||||
buffer_put_cstring(&buffer, msg[i]->msg);
|
||||
@@ -111,8 +111,6 @@ pam_child_conv(int n,
|
||||
buffer_free(&buffer);
|
||||
return (PAM_SUCCESS);
|
||||
fail:
|
||||
while (i)
|
||||
xfree(resp[--i]);
|
||||
xfree(*resp);
|
||||
*resp = NULL;
|
||||
buffer_free(&buffer);
|
||||
|
||||
+16
-8
@@ -23,8 +23,11 @@ RCSID("$OpenBSD: buffer.c,v 1.16 2002/06/26 08:54:18 markus Exp $");
|
||||
void
|
||||
buffer_init(Buffer *buffer)
|
||||
{
|
||||
buffer->alloc = 4096;
|
||||
buffer->buf = xmalloc(buffer->alloc);
|
||||
const u_int len = 4096;
|
||||
|
||||
buffer->alloc = 0;
|
||||
buffer->buf = xmalloc(len);
|
||||
buffer->alloc = len;
|
||||
buffer->offset = 0;
|
||||
buffer->end = 0;
|
||||
}
|
||||
@@ -34,8 +37,10 @@ buffer_init(Buffer *buffer)
|
||||
void
|
||||
buffer_free(Buffer *buffer)
|
||||
{
|
||||
memset(buffer->buf, 0, buffer->alloc);
|
||||
xfree(buffer->buf);
|
||||
if (buffer->alloc > 0) {
|
||||
memset(buffer->buf, 0, buffer->alloc);
|
||||
xfree(buffer->buf);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -69,6 +74,7 @@ buffer_append(Buffer *buffer, const void *data, u_int len)
|
||||
void *
|
||||
buffer_append_space(Buffer *buffer, u_int len)
|
||||
{
|
||||
u_int newlen;
|
||||
void *p;
|
||||
|
||||
if (len > 0x100000)
|
||||
@@ -98,11 +104,13 @@ restart:
|
||||
goto restart;
|
||||
}
|
||||
/* Increase the size of the buffer and retry. */
|
||||
buffer->alloc += len + 32768;
|
||||
if (buffer->alloc > 0xa00000)
|
||||
|
||||
newlen = buffer->alloc + len + 32768;
|
||||
if (newlen > 0xa00000)
|
||||
fatal("buffer_append_space: alloc %u not supported",
|
||||
buffer->alloc);
|
||||
buffer->buf = xrealloc(buffer->buf, buffer->alloc);
|
||||
newlen);
|
||||
buffer->buf = xrealloc(buffer->buf, newlen);
|
||||
buffer->alloc = newlen;
|
||||
goto restart;
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
@@ -229,12 +229,13 @@ channel_new(char *ctype, int type, int rfd, int wfd, int efd,
|
||||
if (found == -1) {
|
||||
/* There are no free slots. Take last+1 slot and expand the array. */
|
||||
found = channels_alloc;
|
||||
channels_alloc += 10;
|
||||
if (channels_alloc > 10000)
|
||||
fatal("channel_new: internal error: channels_alloc %d "
|
||||
"too big.", channels_alloc);
|
||||
channels = xrealloc(channels,
|
||||
(channels_alloc + 10) * sizeof(Channel *));
|
||||
channels_alloc += 10;
|
||||
debug2("channel: expanding %d", channels_alloc);
|
||||
channels = xrealloc(channels, channels_alloc * sizeof(Channel *));
|
||||
for (i = found; i < channels_alloc; i++)
|
||||
channels[i] = NULL;
|
||||
}
|
||||
|
||||
@@ -100,12 +100,12 @@ detect_attack(u_char *buf, u_int32_t len, u_char *IV)
|
||||
|
||||
if (h == NULL) {
|
||||
debug("Installing crc compensation attack detector.");
|
||||
h = (u_int16_t *) xmalloc(l * HASH_ENTRYSIZE);
|
||||
n = l;
|
||||
h = (u_int16_t *) xmalloc(n * HASH_ENTRYSIZE);
|
||||
} else {
|
||||
if (l > n) {
|
||||
h = (u_int16_t *) xrealloc(h, l * HASH_ENTRYSIZE);
|
||||
n = l;
|
||||
h = (u_int16_t *) xrealloc(h, n * HASH_ENTRYSIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -308,18 +308,21 @@ addargs(arglist *args, char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char buf[1024];
|
||||
int nalloc;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
nalloc = args->nalloc;
|
||||
if (args->list == NULL) {
|
||||
args->nalloc = 32;
|
||||
nalloc = 32;
|
||||
args->num = 0;
|
||||
} else if (args->num+2 >= args->nalloc)
|
||||
args->nalloc *= 2;
|
||||
} else if (args->num+2 >= nalloc)
|
||||
nalloc *= 2;
|
||||
|
||||
args->list = xrealloc(args->list, args->nalloc * sizeof(char *));
|
||||
args->list = xrealloc(args->list, nalloc * sizeof(char *));
|
||||
args->nalloc = nalloc;
|
||||
args->list[args->num++] = xstrdup(buf);
|
||||
args->list[args->num] = NULL;
|
||||
}
|
||||
|
||||
@@ -831,8 +831,9 @@ static void
|
||||
child_set_env(char ***envp, u_int *envsizep, const char *name,
|
||||
const char *value)
|
||||
{
|
||||
u_int i, namelen;
|
||||
char **env;
|
||||
u_int envsize;
|
||||
u_int i, namelen;
|
||||
|
||||
/*
|
||||
* Find the slot where the value should be stored. If the variable
|
||||
@@ -849,12 +850,13 @@ child_set_env(char ***envp, u_int *envsizep, const char *name,
|
||||
xfree(env[i]);
|
||||
} else {
|
||||
/* New variable. Expand if necessary. */
|
||||
if (i >= (*envsizep) - 1) {
|
||||
if (*envsizep >= 1000)
|
||||
fatal("child_set_env: too many env vars,"
|
||||
" skipping: %.100s", name);
|
||||
(*envsizep) += 50;
|
||||
env = (*envp) = xrealloc(env, (*envsizep) * sizeof(char *));
|
||||
envsize = *envsizep;
|
||||
if (i >= envsize - 1) {
|
||||
if (envsize >= 1000)
|
||||
fatal("child_set_env: too many env vars");
|
||||
envsize += 50;
|
||||
env = (*envp) = xrealloc(env, envsize * sizeof(char *));
|
||||
*envsizep = envsize;
|
||||
}
|
||||
/* Need to set the NULL pointer at end of array beyond the new slot. */
|
||||
env[i + 1] = NULL;
|
||||
|
||||
@@ -715,7 +715,7 @@ process_message(SocketEntry *e)
|
||||
static void
|
||||
new_socket(sock_type type, int fd)
|
||||
{
|
||||
u_int i, old_alloc;
|
||||
u_int i, old_alloc, new_alloc;
|
||||
|
||||
if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0)
|
||||
error("fcntl O_NONBLOCK: %s", strerror(errno));
|
||||
@@ -726,25 +726,26 @@ new_socket(sock_type type, int fd)
|
||||
for (i = 0; i < sockets_alloc; i++)
|
||||
if (sockets[i].type == AUTH_UNUSED) {
|
||||
sockets[i].fd = fd;
|
||||
sockets[i].type = type;
|
||||
buffer_init(&sockets[i].input);
|
||||
buffer_init(&sockets[i].output);
|
||||
buffer_init(&sockets[i].request);
|
||||
sockets[i].type = type;
|
||||
return;
|
||||
}
|
||||
old_alloc = sockets_alloc;
|
||||
sockets_alloc += 10;
|
||||
new_alloc = sockets_alloc + 10;
|
||||
if (sockets)
|
||||
sockets = xrealloc(sockets, sockets_alloc * sizeof(sockets[0]));
|
||||
sockets = xrealloc(sockets, new_alloc * sizeof(sockets[0]));
|
||||
else
|
||||
sockets = xmalloc(sockets_alloc * sizeof(sockets[0]));
|
||||
for (i = old_alloc; i < sockets_alloc; i++)
|
||||
sockets = xmalloc(new_alloc * sizeof(sockets[0]));
|
||||
for (i = old_alloc; i < new_alloc; i++)
|
||||
sockets[i].type = AUTH_UNUSED;
|
||||
sockets[old_alloc].type = type;
|
||||
sockets_alloc = new_alloc;
|
||||
sockets[old_alloc].fd = fd;
|
||||
buffer_init(&sockets[old_alloc].input);
|
||||
buffer_init(&sockets[old_alloc].output);
|
||||
buffer_init(&sockets[old_alloc].request);
|
||||
sockets[old_alloc].type = type;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
@@ -34,4 +34,4 @@ Host *
|
||||
# Cipher 3des
|
||||
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
|
||||
# EscapeChar ~
|
||||
# VersionAddendum FreeBSD-20020629
|
||||
# VersionAddendum FreeBSD-20030924
|
||||
@@ -14,7 +14,7 @@
|
||||
# Note that some of FreeBSD's defaults differ from OpenBSD's, and
|
||||
# FreeBSD has a few additional options.
|
||||
|
||||
#VersionAddendum FreeBSD-20020629
|
||||
#VersionAddendum FreeBSD-20030924
|
||||
|
||||
#Port 22
|
||||
#Protocol 2,1
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#define SSH_VERSION (ssh_version_get())
|
||||
#define SSH_VERSION_BASE "OpenSSH_3.4p1"
|
||||
#define SSH_VERSION_ADDENDUM "FreeBSD-20020702"
|
||||
#define SSH_VERSION_ADDENDUM "FreeBSD-20030924"
|
||||
|
||||
const char *ssh_version_get(void);
|
||||
void ssh_version_set_addendum(const char *add);
|
||||
|
||||
+109
-3
@@ -2,8 +2,114 @@
|
||||
OpenSSL CHANGES
|
||||
_______________
|
||||
|
||||
Changes between 0.9.6h and 0.9.6i [19 Feb 2003]
|
||||
|
||||
*) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked
|
||||
via timing by performing a MAC computation even if incorrrect
|
||||
block cipher padding has been found. This is a countermeasure
|
||||
against active attacks where the attacker has to distinguish
|
||||
between bad padding and a MAC verification error. (CAN-2003-0078)
|
||||
|
||||
[Bodo Moeller; problem pointed out by Brice Canvel (EPFL),
|
||||
Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and
|
||||
Martin Vuagnoux (EPFL, Ilion)]
|
||||
|
||||
Changes between 0.9.6g and 0.9.6h [5 Dec 2002]
|
||||
|
||||
*) New function OPENSSL_cleanse(), which is used to cleanse a section of
|
||||
memory from it's contents. This is done with a counter that will
|
||||
place alternating values in each byte. This can be used to solve
|
||||
two issues: 1) the removal of calls to memset() by highly optimizing
|
||||
compilers, and 2) cleansing with other values than 0, since those can
|
||||
be read through on certain media, for example a swap space on disk.
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) Bugfix: client side session caching did not work with external caching,
|
||||
because the session->cipher setting was not restored when reloading
|
||||
from the external cache. This problem was masked, when
|
||||
SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG (part of SSL_OP_ALL) was set.
|
||||
(Found by Steve Haslam <[email protected]>.)
|
||||
[Lutz Jaenicke]
|
||||
|
||||
*) Fix client_certificate (ssl/s2_clnt.c): The permissible total
|
||||
length of the REQUEST-CERTIFICATE message is 18 .. 34, not 17 .. 33.
|
||||
[Zeev Lieber <[email protected]>]
|
||||
|
||||
*) Undo an undocumented change introduced in 0.9.6e which caused
|
||||
repeated calls to OpenSSL_add_all_ciphers() and
|
||||
OpenSSL_add_all_digests() to be ignored, even after calling
|
||||
EVP_cleanup().
|
||||
[Richard Levitte]
|
||||
|
||||
*) Change the default configuration reader to deal with last line not
|
||||
being properly terminated.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Change X509_NAME_cmp() so it applies the special rules on handling
|
||||
DN values that are of type PrintableString, as well as RDNs of type
|
||||
emailAddress where the value has the type ia5String.
|
||||
[[email protected] via Richard Levitte]
|
||||
|
||||
*) Add a SSL_SESS_CACHE_NO_INTERNAL_STORE flag to take over half
|
||||
the job SSL_SESS_CACHE_NO_INTERNAL_LOOKUP was inconsistently
|
||||
doing, define a new flag (SSL_SESS_CACHE_NO_INTERNAL) to be
|
||||
the bitwise-OR of the two for use by the majority of applications
|
||||
wanting this behaviour, and update the docs. The documented
|
||||
behaviour and actual behaviour were inconsistent and had been
|
||||
changing anyway, so this is more a bug-fix than a behavioural
|
||||
change.
|
||||
[Geoff Thorpe, diagnosed by Nadav Har'El]
|
||||
|
||||
*) Don't impose a 16-byte length minimum on session IDs in ssl/s3_clnt.c
|
||||
(the SSL 3.0 and TLS 1.0 specifications allow any length up to 32 bytes).
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Fix initialization code race conditions in
|
||||
SSLv23_method(), SSLv23_client_method(), SSLv23_server_method(),
|
||||
SSLv2_method(), SSLv2_client_method(), SSLv2_server_method(),
|
||||
SSLv3_method(), SSLv3_client_method(), SSLv3_server_method(),
|
||||
TLSv1_method(), TLSv1_client_method(), TLSv1_server_method(),
|
||||
ssl2_get_cipher_by_char(),
|
||||
ssl3_get_cipher_by_char().
|
||||
[Patrick McCormick <[email protected]>, Bodo Moeller]
|
||||
|
||||
*) Reorder cleanup sequence in SSL_CTX_free(): only remove the ex_data after
|
||||
the cached sessions are flushed, as the remove_cb() might use ex_data
|
||||
contents. Bug found by Sam Varshavchik <[email protected]>
|
||||
(see [openssl.org #212]).
|
||||
[Geoff Thorpe, Lutz Jaenicke]
|
||||
|
||||
*) Fix typo in OBJ_txt2obj which incorrectly passed the content
|
||||
length, instead of the encoding length to d2i_ASN1_OBJECT.
|
||||
[Steve Henson]
|
||||
|
||||
Changes between 0.9.6f and 0.9.6g [9 Aug 2002]
|
||||
|
||||
*) [In 0.9.6g-engine release:]
|
||||
Fix crypto/engine/vendor_defns/cswift.h for WIN32 (use '_stdcall').
|
||||
[Lynn Gazis <[email protected]>]
|
||||
|
||||
Changes between 0.9.6e and 0.9.6f [8 Aug 2002]
|
||||
|
||||
*) Fix ASN1 checks. Check for overflow by comparing with LONG_MAX
|
||||
and get fix the header length calculation.
|
||||
[Florian Weimer <[email protected]>,
|
||||
Alon Kantor <[email protected]> (and others),
|
||||
Steve Henson]
|
||||
|
||||
*) Use proper error handling instead of 'assertions' in buffer
|
||||
overflow checks added in 0.9.6e. This prevents DoS (the
|
||||
assertions could call abort()).
|
||||
[Arne Ansper <[email protected]>, Bodo Moeller]
|
||||
|
||||
Changes between 0.9.6d and 0.9.6e [30 Jul 2002]
|
||||
|
||||
*) Add various sanity checks to asn1_get_length() to reject
|
||||
the ASN1 length bytes if they exceed sizeof(long), will appear
|
||||
negative or the content length exceeds the length of the
|
||||
supplied buffer.
|
||||
[Steve Henson, Adi Stav <[email protected]>, James Yonan <[email protected]>]
|
||||
|
||||
*) Fix cipher selection routines: ciphers without encryption had no flags
|
||||
for the cipher strength set and where therefore not handled correctly
|
||||
by the selection routines (PR #130).
|
||||
@@ -35,7 +141,7 @@
|
||||
*) Add various sanity checks to asn1_get_length() to reject
|
||||
the ASN1 length bytes if they exceed sizeof(long), will appear
|
||||
negative or the content length exceeds the length of the
|
||||
supplied buffer.
|
||||
supplied buffer. (CAN-2002-0659)
|
||||
[Steve Henson, Adi Stav <[email protected]>, James Yonan <[email protected]>]
|
||||
|
||||
*) Assertions for various potential buffer overflows, not known to
|
||||
@@ -140,8 +246,8 @@
|
||||
value is 0.
|
||||
[Richard Levitte]
|
||||
|
||||
*) [In 0.9.6c-engine release:]
|
||||
Fix a crashbug and a logic bug in hwcrhk_load_pubkey()
|
||||
*) [In 0.9.6d-engine release:]
|
||||
Fix a crashbug and a logic bug in hwcrhk_load_pubkey().
|
||||
[Toomas Kiisk <[email protected]> via Richard Levitte]
|
||||
|
||||
*) Add the configuration target linux-s390x.
|
||||
|
||||
+29
-11
@@ -122,7 +122,7 @@ my %table=(
|
||||
"debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -DBIO_PAIR_DEBUG -g -m486 -pedantic -Wshadow -Wall::-D_REENTRANT::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||
"debug-ulf", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -m486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||
"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -m486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||
"debug-levitte-linux-elf","gcc:-DUSE_ALLOCATING_PRINT -DRL_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DNO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -pipe::-D_REENTRANT:-ldl:::::::::::dlfcn",
|
||||
"debug-levitte-linux-elf","gcc:-DUSE_ALLOCATING_PRINT -DRL_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DNO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wstrict-prototypes -Wmissing-prototypes -pipe::-D_REENTRANT:-ldl:::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"dist", "cc:-O::(unknown):::::",
|
||||
|
||||
# Basic configs that should work on any (32 and less bit) box
|
||||
@@ -344,8 +344,8 @@ my %table=(
|
||||
"linux-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::",
|
||||
"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-m68k", "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
|
||||
"linux-s390", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
|
||||
"linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::SIXTY_FOUR_BIT_LONG:::::::::::linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-s390", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR),\$(SHLIB_MINOR)",
|
||||
"linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -395,7 +395,7 @@ my %table=(
|
||||
"aix-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown)::BN_LLONG RC4_CHAR:::",
|
||||
"aix-gcc", "gcc:-O3 -DAIX -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR:::",
|
||||
"aix43-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown)::BN_LLONG RC4_CHAR::::::::::dlfcn:",
|
||||
"aix43-gcc", "gcc:-O3 -DAIX -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR::::::::::dlfcn:",
|
||||
"aix43-gcc", "gcc:-O1 -DAIX -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR::::::::::dlfcn:",
|
||||
|
||||
#
|
||||
# Cray T90 and similar (SDSC)
|
||||
@@ -477,7 +477,7 @@ my %table=(
|
||||
|
||||
# Cygwin
|
||||
"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32:cygwin-shared:::.dll",
|
||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -march=i486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32:cygwin-shared:::.dll",
|
||||
|
||||
# Ultrix from Bernhard Simon <[email protected]>
|
||||
"ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown)::::::",
|
||||
@@ -495,12 +495,18 @@ my %table=(
|
||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
|
||||
"darwin-ppc-cc","cc:-O3 -D_DARWIN -DB_ENDIAN -fno-common::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
|
||||
##### A/UX
|
||||
"aux3-gcc","gcc:-O2 -DTERMIO::(unknown):-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
|
||||
|
||||
##### Sony NEWS-OS 4.x
|
||||
"newsos4-gcc","gcc:-O -DB_ENDIAN -DNEWS4::(unknown):-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",
|
||||
|
||||
##### VxWorks for various targets
|
||||
"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DVXWORKS -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::-r:::::",
|
||||
|
||||
##### Compaq Non-Stop Kernel (Tandem)
|
||||
"tandem-c89","c89:-Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN::(unknown)::THIRTY_TWO_BIT:::",
|
||||
|
||||
);
|
||||
|
||||
my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32
|
||||
@@ -577,6 +583,7 @@ my $libs;
|
||||
my $target;
|
||||
my $options;
|
||||
my $symlink;
|
||||
my $make_depend=0;
|
||||
|
||||
my @argvcopy=@ARGV;
|
||||
my $argvstring="";
|
||||
@@ -619,7 +626,7 @@ PROCESS_ARGS:
|
||||
{ $threads=1; }
|
||||
elsif (/^no-shared$/)
|
||||
{ $no_shared=1; }
|
||||
elsif (/^shared$/)
|
||||
elsif (/^shared$/ || /^-shared$/ || /^--shared$/)
|
||||
{ $no_shared=0; }
|
||||
elsif (/^no-symlinks$/)
|
||||
{ $symlink=0; }
|
||||
@@ -1188,11 +1195,13 @@ if($IsWindows) {
|
||||
EOF
|
||||
close(OUT);
|
||||
} else {
|
||||
(system "make -f Makefile.ssl PERL=\'$perl\' links") == 0 or exit $?
|
||||
if $symlink;
|
||||
### (system 'make depend') == 0 or exit $? if $depflags ne "";
|
||||
# Run "make depend" manually if you want to be able to delete
|
||||
# the source code files of ciphers you left out.
|
||||
my $make_command = "make -f Makefile.ssl PERL=\'$perl\'";
|
||||
my $make_targets = "";
|
||||
$make_targets .= " links" if $symlink;
|
||||
$make_targets .= " depend" if $depflags ne "" && $make_depend;
|
||||
$make_targets .= " gentests" if $symlink;
|
||||
(system $make_command.$make_targets) == 0 or exit $?
|
||||
if $make_targets ne "";
|
||||
if ( $perl =~ m@^/@) {
|
||||
&dofile("tools/c_rehash",$perl,'^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";');
|
||||
&dofile("apps/der_chop",$perl,'^#!/', '#!%s');
|
||||
@@ -1202,6 +1211,15 @@ EOF
|
||||
&dofile("tools/c_rehash",'/usr/local/bin/perl','^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";');
|
||||
&dofile("apps/der_chop",'/usr/local/bin/perl','^#!/', '#!%s');
|
||||
&dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s');
|
||||
}
|
||||
if ($depflags ne "" && !$make_depend) {
|
||||
print <<EOF;
|
||||
|
||||
Since you've disabled at least one algorithm, you need to do the following
|
||||
before building:
|
||||
|
||||
make depend
|
||||
EOF
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+50
-22
@@ -9,6 +9,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Where can I get a compiled version of OpenSSL?
|
||||
* Why aren't tools like 'autoconf' and 'libtool' used?
|
||||
* What is an 'engine' version?
|
||||
* How do I check the authenticity of the OpenSSL distribution?
|
||||
|
||||
[LEGAL] Legal questions
|
||||
|
||||
@@ -35,6 +36,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Why does the linker complain about undefined symbols?
|
||||
* Why does the OpenSSL test fail with "bc: command not found"?
|
||||
* Why does the OpenSSL test fail with "bc: 1 no implemented"?
|
||||
* Why does the OpenSSL test fail with "bc: stack empty"?
|
||||
* Why does the OpenSSL compilation fail on Alpha Tru64 Unix?
|
||||
* Why does the OpenSSL compilation fail with "ar: command not found"?
|
||||
* Why does the OpenSSL compilation fail on Win32 with VC++?
|
||||
@@ -61,7 +63,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Which is the current version of OpenSSL?
|
||||
|
||||
The current version is available from <URL: http://www.openssl.org>.
|
||||
OpenSSL 0.9.6e was released on 30 May, 2002.
|
||||
OpenSSL 0.9.7a was released on February 19, 2003.
|
||||
|
||||
In addition to the current stable release, you can also access daily
|
||||
snapshots of the OpenSSL development version at <URL:
|
||||
@@ -132,6 +134,19 @@ hardware. This was realized in a special release '0.9.6-engine'. With
|
||||
version 0.9.7 (not yet released) the changes were merged into the main
|
||||
development line, so that the special release is no longer necessary.
|
||||
|
||||
* How do I check the authenticity of the OpenSSL distribution?
|
||||
|
||||
We provide MD5 digests and ASC signatures of each tarball.
|
||||
Use MD5 to check that a tarball from a mirror site is identical:
|
||||
|
||||
md5sum TARBALL | awk '{print $1;}' | cmp - TARBALL.md5
|
||||
|
||||
You can check authenticity using pgp or gpg. You need the OpenSSL team
|
||||
member public key used to sign it (download it from a key server). Then
|
||||
just do:
|
||||
|
||||
pgp TARBALL.asc
|
||||
|
||||
[LEGAL] =======================================================================
|
||||
|
||||
* Do I need patent licenses to use OpenSSL?
|
||||
@@ -169,18 +184,30 @@ for permission to use their software with OpenSSL.
|
||||
|
||||
Cryptographic software needs a source of unpredictable data to work
|
||||
correctly. Many open source operating systems provide a "randomness
|
||||
device" that serves this purpose. On other systems, applications have
|
||||
to call the RAND_add() or RAND_seed() function with appropriate data
|
||||
before generating keys or performing public key encryption.
|
||||
(These functions initialize the pseudo-random number generator, PRNG.)
|
||||
device" (/dev/urandom or /dev/random) that serves this purpose.
|
||||
All OpenSSL versions try to use /dev/urandom by default; starting with
|
||||
version 0.9.7, OpenSSL also tries /dev/random if /dev/urandom is not
|
||||
available.
|
||||
|
||||
Some broken applications do not do this. As of version 0.9.5, the
|
||||
OpenSSL functions that need randomness report an error if the random
|
||||
number generator has not been seeded with at least 128 bits of
|
||||
randomness. If this error occurs, please contact the author of the
|
||||
application you are using. It is likely that it never worked
|
||||
correctly. OpenSSL 0.9.5 and later make the error visible by refusing
|
||||
to perform potentially insecure encryption.
|
||||
On other systems, applications have to call the RAND_add() or
|
||||
RAND_seed() function with appropriate data before generating keys or
|
||||
performing public key encryption. (These functions initialize the
|
||||
pseudo-random number generator, PRNG.) Some broken applications do
|
||||
not do this. As of version 0.9.5, the OpenSSL functions that need
|
||||
randomness report an error if the random number generator has not been
|
||||
seeded with at least 128 bits of randomness. If this error occurs and
|
||||
is not discussed in the documentation of the application you are
|
||||
using, please contact the author of that application; it is likely
|
||||
that it never worked correctly. OpenSSL 0.9.5 and later make the
|
||||
error visible by refusing to perform potentially insecure encryption.
|
||||
|
||||
If you are using Solaris 8, you can add /dev/urandom and /dev/random
|
||||
devices by installing patch 112438 (Sparc) or 112439 (x86), which are
|
||||
available via the Patchfinder at <URL: http://sunsolve.sun.com>
|
||||
(Solaris 9 includes these devices by default). For /dev/random support
|
||||
for earlier Solaris versions, see Sun's statement at
|
||||
<URL: http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsrdb/27606&zone_32=SUNWski>
|
||||
(the SUNWski package is available in patch 105710).
|
||||
|
||||
On systems without /dev/urandom and /dev/random, it is a good idea to
|
||||
use the Entropy Gathering Demon (EGD); see the RAND_egd() manpage for
|
||||
@@ -213,16 +240,6 @@ OpenSSL command line tools. Applications using the OpenSSL library
|
||||
provide their own configuration options to specify the entropy source,
|
||||
please check out the documentation coming the with application.
|
||||
|
||||
For Solaris 2.6, Tim Nibbe <[email protected]> and others have suggested
|
||||
installing the SUNski package from Sun patch 105710-01 (Sparc) which
|
||||
adds a /dev/random device and make sure it gets used, usually through
|
||||
$RANDFILE. There are probably similar patches for the other Solaris
|
||||
versions. An official statement from Sun with respect to /dev/random
|
||||
support can be found at
|
||||
http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsrdb/27606&zone_32=SUNWski
|
||||
However, be warned that /dev/random is usually a blocking device, which
|
||||
may have some effects on OpenSSL.
|
||||
|
||||
|
||||
* Why do I get an "unable to write 'random state'" error message?
|
||||
|
||||
@@ -392,6 +409,17 @@ and compile/install it. GNU bc (see http://www.gnu.org/software/software.html
|
||||
for download instructions) can be safely used, for example.
|
||||
|
||||
|
||||
* Why does the OpenSSL test fail with "bc: stack empty"?
|
||||
|
||||
On some DG/ux versions, bc seems to have a too small stack for calculations
|
||||
that the OpenSSL bntest throws at it. This gets triggered when you run the
|
||||
test suite (using "make test"). The message returned is "bc: stack empty".
|
||||
|
||||
The best way to deal with this is to find another implementation of bc
|
||||
and compile/install it. GNU bc (see http://www.gnu.org/software/software.html
|
||||
for download instructions) can be safely used, for example.
|
||||
|
||||
|
||||
* Why does the OpenSSL compilation fail on Alpha Tru64 Unix?
|
||||
|
||||
On some Alpha installations running Tru64 Unix and Compaq C, the compilation
|
||||
|
||||
+15
-3
@@ -129,8 +129,8 @@
|
||||
standard headers). If it is a problem with OpenSSL itself, please
|
||||
report the problem to <[email protected]> (note that your
|
||||
message will be recorded in the request tracker publicly readable
|
||||
via http://www.openssl.org/rt2.html and will be forwarded to a public
|
||||
mailing list). Include the output of "make report" in your message.
|
||||
via http://www.openssl.org/support/rt2.html and will be forwarded to a
|
||||
public mailing list). Include the output of "make report" in your message.
|
||||
Please check out the request tracker. Maybe the bug was already
|
||||
reported or has already been fixed.
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
in Makefile.ssl and run "make clean; make". Please send a bug
|
||||
report to <[email protected]>, including the output of
|
||||
"make report" in order to be added to the request tracker at
|
||||
http://www.openssl.org/rt2.html.
|
||||
http://www.openssl.org/support/rt2.html.
|
||||
|
||||
4. If everything tests ok, install OpenSSL with
|
||||
|
||||
@@ -285,3 +285,15 @@
|
||||
targets for shared library creation, like linux-shared. Those targets
|
||||
can currently be used on their own just as well, but this is expected
|
||||
to change in future versions of OpenSSL.
|
||||
|
||||
Note on random number generation
|
||||
--------------------------------
|
||||
|
||||
Availability of cryptographically secure random numbers is required for
|
||||
secret key generation. OpenSSL provides several options to seed the
|
||||
internal PRNG. If not properly seeded, the internal PRNG will refuse
|
||||
to deliver random bytes and a "PRNG not seeded error" will occur.
|
||||
On systems without /dev/urandom (or similar) device, it may be necessary
|
||||
to install additional support software to obtain random seed.
|
||||
Please check out the manual pages for RAND_add(), RAND_bytes(), RAND_egd(),
|
||||
and the FAQ for more information.
|
||||
+31
-19
@@ -247,7 +247,8 @@ link-shared:
|
||||
for i in $(SHLIBDIRS); do \
|
||||
prev=lib$$i$(SHLIB_EXT); \
|
||||
for j in $${tmp:-x}; do \
|
||||
( set -x; ln -f -s $$prev lib$$i$$j ); \
|
||||
( set -x; \
|
||||
rm -f lib$$i$$j; ln -s $$prev lib$$i$$j ); \
|
||||
prev=lib$$i$$j; \
|
||||
done; \
|
||||
done; \
|
||||
@@ -269,9 +270,7 @@ do_gnu-shared:
|
||||
done
|
||||
|
||||
DETECT_GNU_LD=${CC} -v 2>&1 | grep '^gcc' >/dev/null 2>&1 && \
|
||||
collect2=`gcc -print-prog-name=collect2 2>&1` && \
|
||||
[ -n "$$collect2" ] && \
|
||||
my_ld=`$$collect2 --help 2>&1 | grep Usage: | sed 's/^Usage: *\([^ ][^ ]*\).*/\1/'` && \
|
||||
my_ld=`${CC} -print-prog-name=ld 2>&1` && \
|
||||
[ -n "$$my_ld" ] && \
|
||||
$$my_ld -v 2>&1 | grep 'GNU ld' >/dev/null 2>&1
|
||||
|
||||
@@ -528,6 +527,10 @@ links:
|
||||
fi; \
|
||||
done;
|
||||
|
||||
gentests:
|
||||
@(cd test && echo "generating dummy tests (if needed)..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
|
||||
|
||||
dclean:
|
||||
rm -f *.bak
|
||||
@for i in $(DIRS) ;\
|
||||
@@ -609,6 +612,9 @@ update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_
|
||||
# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
|
||||
# tar does not support the --files-from option.
|
||||
tar:
|
||||
find . -type d -print | xargs chmod 755
|
||||
find . -type f -print | xargs chmod a+r
|
||||
find . -type f -perm -0100 -print | xargs chmod a+x
|
||||
find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
|
||||
$(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
|
||||
tardy --user_number=0 --user_name=openssl \
|
||||
@@ -651,9 +657,10 @@ install: all install_docs
|
||||
do \
|
||||
if [ -f "$$i" ]; then \
|
||||
( echo installing $$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||
fi; \
|
||||
done
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
@@ -663,20 +670,24 @@ install: all install_docs
|
||||
if [ -f "$$i" -o -f "$$i.a" ]; then \
|
||||
( echo installing $$i; \
|
||||
if [ "$(PLATFORM)" != "Cygwin" ]; then \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
else \
|
||||
c=`echo $$i | sed 's/^lib/cyg/'`; \
|
||||
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
||||
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
mv $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
|
||||
mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
||||
fi ); \
|
||||
fi; \
|
||||
done; \
|
||||
( here="`pwd`"; \
|
||||
cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
make -f $$here/Makefile link-shared ); \
|
||||
set $(MAKE); \
|
||||
$$1 -f $$here/Makefile link-shared ); \
|
||||
fi
|
||||
|
||||
install_docs:
|
||||
@@ -685,22 +696,23 @@ install_docs:
|
||||
$(INSTALL_PREFIX)$(MANDIR)/man3 \
|
||||
$(INSTALL_PREFIX)$(MANDIR)/man5 \
|
||||
$(INSTALL_PREFIX)$(MANDIR)/man7
|
||||
@for i in doc/apps/*.pod; do \
|
||||
@pod2man="`cd util; ./pod2mantest $(PERL)`"; \
|
||||
for i in doc/apps/*.pod; do \
|
||||
fn=`basename $$i .pod`; \
|
||||
if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
|
||||
echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$(PERL) `cd ../../util; ./pod2mantest ignore` \
|
||||
sh -c "$$pod2man \
|
||||
--section=$$sec --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
|
||||
done
|
||||
@for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
||||
done; \
|
||||
for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
||||
fn=`basename $$i .pod`; \
|
||||
if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
|
||||
echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$(PERL) `cd ../../util; ./pod2mantest ignore` \
|
||||
sh -c "$$pod2man \
|
||||
--section=$$sec --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
|
||||
|
||||
+51
-39
@@ -4,23 +4,23 @@
|
||||
## Makefile for OpenSSL
|
||||
##
|
||||
|
||||
VERSION=0.9.6e
|
||||
VERSION=0.9.6i
|
||||
MAJOR=0
|
||||
MINOR=9.6
|
||||
SHLIB_VERSION_NUMBER=0.9.6
|
||||
SHLIB_VERSION_HISTORY=
|
||||
SHLIB_MAJOR=0
|
||||
SHLIB_MINOR=9.6
|
||||
SHLIB_EXT=
|
||||
PLATFORM=dist
|
||||
OPTIONS=
|
||||
CONFIGURE_ARGS=dist
|
||||
SHLIB_TARGET=
|
||||
SHLIB_EXT=.so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
PLATFORM=FreeBSD-elf
|
||||
OPTIONS=386
|
||||
CONFIGURE_ARGS=FreeBSD-elf 386
|
||||
SHLIB_TARGET=bsd-gcc-shared
|
||||
|
||||
# INSTALL_PREFIX is for package builders so that they can configure
|
||||
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
|
||||
# Normally it is left empty.
|
||||
INSTALL_PREFIX=/home/nectar/SSL
|
||||
INSTALL_PREFIX=/var/tmp/ssl
|
||||
INSTALLTOP=/usr/local/ssl
|
||||
|
||||
# Do not edit this manually. Use Configure --openssldir=DIR do change this!
|
||||
@@ -55,9 +55,9 @@ OPENSSLDIR=/usr/local/ssl
|
||||
# equal 4.
|
||||
# PKCS1_CHECK - pkcs1 tests.
|
||||
|
||||
CC= cc
|
||||
CC= gcc
|
||||
#CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
|
||||
CFLAG= -O
|
||||
CFLAG= -fPIC -DTHREADS -pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE -DDSO_DLFCN -DHAVE_DLFCN_H -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
|
||||
DEPFLAG=
|
||||
PEX_LIBS=
|
||||
EX_LIBS=
|
||||
@@ -69,7 +69,7 @@ TAR= tar
|
||||
TARFLAGS= --no-recursion
|
||||
|
||||
# Set BN_ASM to bn_asm.o if you want to use the C version
|
||||
BN_ASM= bn_asm.o
|
||||
BN_ASM= asm/bn86-elf.o asm/co86-elf.o
|
||||
#BN_ASM= bn_asm.o
|
||||
#BN_ASM= asm/bn86-elf.o # elf, linux-elf
|
||||
#BN_ASM= asm/bn86-sol.o # solaris
|
||||
@@ -85,11 +85,11 @@ BN_ASM= bn_asm.o
|
||||
|
||||
# For x86 assembler: Set PROCESSOR to 386 if you want to support
|
||||
# the 80386.
|
||||
PROCESSOR=
|
||||
PROCESSOR= 386
|
||||
|
||||
# Set DES_ENC to des_enc.o if you want to use the C version
|
||||
#There are 4 x86 assember options.
|
||||
DES_ENC= des_enc.o fcrypt_b.o
|
||||
DES_ENC= asm/dx86-elf.o asm/yx86-elf.o
|
||||
#DES_ENC= des_enc.o fcrypt_b.o # C
|
||||
#DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf
|
||||
#DES_ENC= asm/dx86-sol.o asm/yx86-sol.o # solaris
|
||||
@@ -98,7 +98,7 @@ DES_ENC= des_enc.o fcrypt_b.o
|
||||
|
||||
# Set BF_ENC to bf_enc.o if you want to use the C version
|
||||
#There are 4 x86 assember options.
|
||||
BF_ENC= bf_enc.o
|
||||
BF_ENC= asm/bx86-elf.o
|
||||
#BF_ENC= bf_enc.o
|
||||
#BF_ENC= asm/bx86-elf.o # elf
|
||||
#BF_ENC= asm/bx86-sol.o # solaris
|
||||
@@ -107,7 +107,7 @@ BF_ENC= bf_enc.o
|
||||
|
||||
# Set CAST_ENC to c_enc.o if you want to use the C version
|
||||
#There are 4 x86 assember options.
|
||||
CAST_ENC= c_enc.o
|
||||
CAST_ENC= asm/cx86-elf.o
|
||||
#CAST_ENC= c_enc.o
|
||||
#CAST_ENC= asm/cx86-elf.o # elf
|
||||
#CAST_ENC= asm/cx86-sol.o # solaris
|
||||
@@ -116,7 +116,7 @@ CAST_ENC= c_enc.o
|
||||
|
||||
# Set RC4_ENC to rc4_enc.o if you want to use the C version
|
||||
#There are 4 x86 assember options.
|
||||
RC4_ENC= rc4_enc.o
|
||||
RC4_ENC= asm/rx86-elf.o
|
||||
#RC4_ENC= rc4_enc.o
|
||||
#RC4_ENC= asm/rx86-elf.o # elf
|
||||
#RC4_ENC= asm/rx86-sol.o # solaris
|
||||
@@ -125,7 +125,7 @@ RC4_ENC= rc4_enc.o
|
||||
|
||||
# Set RC5_ENC to rc5_enc.o if you want to use the C version
|
||||
#There are 4 x86 assember options.
|
||||
RC5_ENC= rc5_enc.o
|
||||
RC5_ENC= asm/r586-elf.o
|
||||
#RC5_ENC= rc5_enc.o
|
||||
#RC5_ENC= asm/r586-elf.o # elf
|
||||
#RC5_ENC= asm/r586-sol.o # solaris
|
||||
@@ -133,21 +133,21 @@ RC5_ENC= rc5_enc.o
|
||||
#RC5_ENC= asm/r586bsdi.o # bsdi
|
||||
|
||||
# Also need MD5_ASM defined
|
||||
MD5_ASM_OBJ=
|
||||
MD5_ASM_OBJ= asm/mx86-elf.o
|
||||
#MD5_ASM_OBJ= asm/mx86-elf.o # elf
|
||||
#MD5_ASM_OBJ= asm/mx86-sol.o # solaris
|
||||
#MD5_ASM_OBJ= asm/mx86-out.o # a.out, FreeBSD
|
||||
#MD5_ASM_OBJ= asm/mx86bsdi.o # bsdi
|
||||
|
||||
# Also need SHA1_ASM defined
|
||||
SHA1_ASM_OBJ=
|
||||
SHA1_ASM_OBJ= asm/sx86-elf.o
|
||||
#SHA1_ASM_OBJ= asm/sx86-elf.o # elf
|
||||
#SHA1_ASM_OBJ= asm/sx86-sol.o # solaris
|
||||
#SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD
|
||||
#SHA1_ASM_OBJ= asm/sx86bsdi.o # bsdi
|
||||
|
||||
# Also need RMD160_ASM defined
|
||||
RMD160_ASM_OBJ=
|
||||
RMD160_ASM_OBJ= asm/rm86-elf.o
|
||||
#RMD160_ASM_OBJ= asm/rm86-elf.o # elf
|
||||
#RMD160_ASM_OBJ= asm/rm86-sol.o # solaris
|
||||
#RMD160_ASM_OBJ= asm/rm86-out.o # a.out, FreeBSD
|
||||
@@ -184,7 +184,7 @@ LIBS= libcrypto.a libssl.a
|
||||
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
||||
SHARED_SSL=libssl$(SHLIB_EXT)
|
||||
SHARED_LIBS=
|
||||
SHARED_LIBS_LINK_EXTS=
|
||||
SHARED_LIBS_LINK_EXTS=.so.$(SHLIB_MAJOR) .so
|
||||
SHARED_LDFLAGS=
|
||||
|
||||
GENERAL= Makefile
|
||||
@@ -249,7 +249,8 @@ link-shared:
|
||||
for i in $(SHLIBDIRS); do \
|
||||
prev=lib$$i$(SHLIB_EXT); \
|
||||
for j in $${tmp:-x}; do \
|
||||
( set -x; ln -f -s $$prev lib$$i$$j ); \
|
||||
( set -x; \
|
||||
rm -f lib$$i$$j; ln -s $$prev lib$$i$$j ); \
|
||||
prev=lib$$i$$j; \
|
||||
done; \
|
||||
done; \
|
||||
@@ -271,9 +272,7 @@ do_gnu-shared:
|
||||
done
|
||||
|
||||
DETECT_GNU_LD=${CC} -v 2>&1 | grep '^gcc' >/dev/null 2>&1 && \
|
||||
collect2=`gcc -print-prog-name=collect2 2>&1` && \
|
||||
[ -n "$$collect2" ] && \
|
||||
my_ld=`$$collect2 --help 2>&1 | grep Usage: | sed 's/^Usage: *\([^ ][^ ]*\).*/\1/'` && \
|
||||
my_ld=`${CC} -print-prog-name=ld 2>&1` && \
|
||||
[ -n "$$my_ld" ] && \
|
||||
$$my_ld -v 2>&1 | grep 'GNU ld' >/dev/null 2>&1
|
||||
|
||||
@@ -530,6 +529,10 @@ links:
|
||||
fi; \
|
||||
done;
|
||||
|
||||
gentests:
|
||||
@(cd test && echo "generating dummy tests (if needed)..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
|
||||
|
||||
dclean:
|
||||
rm -f *.bak
|
||||
@for i in $(DIRS) ;\
|
||||
@@ -611,6 +614,9 @@ update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_
|
||||
# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
|
||||
# tar does not support the --files-from option.
|
||||
tar:
|
||||
find . -type d -print | xargs chmod 755
|
||||
find . -type f -print | xargs chmod a+r
|
||||
find . -type f -perm -0100 -print | xargs chmod a+x
|
||||
find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
|
||||
$(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
|
||||
tardy --user_number=0 --user_name=openssl \
|
||||
@@ -653,9 +659,10 @@ install: all install_docs
|
||||
do \
|
||||
if [ -f "$$i" ]; then \
|
||||
( echo installing $$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||
fi; \
|
||||
done
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
@@ -665,20 +672,24 @@ install: all install_docs
|
||||
if [ -f "$$i" -o -f "$$i.a" ]; then \
|
||||
( echo installing $$i; \
|
||||
if [ "$(PLATFORM)" != "Cygwin" ]; then \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
else \
|
||||
c=`echo $$i | sed 's/^lib/cyg/'`; \
|
||||
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
||||
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
mv $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
|
||||
mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
||||
fi ); \
|
||||
fi; \
|
||||
done; \
|
||||
( here="`pwd`"; \
|
||||
cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
make -f $$here/Makefile link-shared ); \
|
||||
set $(MAKE); \
|
||||
$$1 -f $$here/Makefile link-shared ); \
|
||||
fi
|
||||
|
||||
install_docs:
|
||||
@@ -687,22 +698,23 @@ install_docs:
|
||||
$(INSTALL_PREFIX)$(MANDIR)/man3 \
|
||||
$(INSTALL_PREFIX)$(MANDIR)/man5 \
|
||||
$(INSTALL_PREFIX)$(MANDIR)/man7
|
||||
@for i in doc/apps/*.pod; do \
|
||||
@pod2man="`cd util; ./pod2mantest $(PERL)`"; \
|
||||
for i in doc/apps/*.pod; do \
|
||||
fn=`basename $$i .pod`; \
|
||||
if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
|
||||
echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$(PERL) `cd ../../util; ./pod2mantest ignore` \
|
||||
sh -c "$$pod2man \
|
||||
--section=$$sec --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
|
||||
done
|
||||
@for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
||||
done; \
|
||||
for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
||||
fn=`basename $$i .pod`; \
|
||||
if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
|
||||
echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$(PERL) `cd ../../util; ./pod2mantest ignore` \
|
||||
sh -c "$$pod2man \
|
||||
--section=$$sec --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
|
||||
|
||||
@@ -5,6 +5,37 @@
|
||||
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.6h and OpenSSL 0.9.6i:
|
||||
|
||||
o Important security related bugfixes.
|
||||
|
||||
Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h:
|
||||
|
||||
o New configuration targets for Tandem OSS and A/UX.
|
||||
o New OIDs for Microsoft attributes.
|
||||
o Better handling of SSL session caching.
|
||||
o Better comparison of distinguished names.
|
||||
o Better handling of shared libraries in a mixed GNU/non-GNU environment.
|
||||
o Support assembler code with Borland C.
|
||||
o Fixes for length problems.
|
||||
o Fixes for uninitialised variables.
|
||||
o Fixes for memory leaks, some unusual crashes and some race conditions.
|
||||
o Fixes for smaller building problems.
|
||||
o Updates of manuals, FAQ and other instructive documents.
|
||||
|
||||
Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g:
|
||||
|
||||
o Important building fixes on Unix.
|
||||
|
||||
Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f:
|
||||
|
||||
o Various important bugfixes.
|
||||
|
||||
Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e:
|
||||
|
||||
o Important security related bugfixes.
|
||||
o Various SSL/TLS library bugfixes.
|
||||
|
||||
Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d:
|
||||
|
||||
o Various SSL/TLS library bugfixes.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
OpenSSL 0.9.6e 30 July 2002
|
||||
OpenSSL 0.9.6i Feb 19 2003
|
||||
|
||||
Copyright (c) 1998-2002 The OpenSSL Project
|
||||
Copyright (c) 1998-2003 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
All rights reserved.
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(SRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(SRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
@@ -128,10 +128,10 @@ clean:
|
||||
rm -f req
|
||||
|
||||
$(DLIBSSL):
|
||||
(cd ../ssl; $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}')
|
||||
(cd ..; $(MAKE) DIRS=ssl all)
|
||||
|
||||
$(DLIBCRYPTO):
|
||||
(cd ../crypto; $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}')
|
||||
(cd ..; $(MAKE) DIRS=crypto all)
|
||||
|
||||
$(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
|
||||
$(RM) $(PROGRAM)
|
||||
|
||||
@@ -92,8 +92,10 @@ int WIN32_rename(char *oldname,char *newname);
|
||||
#define MAIN(a,v) main(a,v)
|
||||
|
||||
#ifndef NON_MAIN
|
||||
LHASH *config=NULL;
|
||||
BIO *bio_err=NULL;
|
||||
#else
|
||||
extern LHASH *config;
|
||||
extern BIO *bio_err;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -328,6 +328,6 @@ end:
|
||||
if (at != NULL) ASN1_TYPE_free(at);
|
||||
if (osk != NULL) sk_free(osk);
|
||||
OBJ_cleanup();
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
@@ -543,7 +543,7 @@ bad:
|
||||
goto err;
|
||||
}
|
||||
pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,key);
|
||||
if(key) memset(key,0,strlen(key));
|
||||
if(key) OPENSSL_cleanse(key,strlen(key));
|
||||
if (pkey == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"unable to load CA private key\n");
|
||||
@@ -606,12 +606,14 @@ bad:
|
||||
that to access(). However, time's too short to do that just
|
||||
now.
|
||||
*/
|
||||
#ifndef VXWORKS
|
||||
if (access(outdir,R_OK|W_OK|X_OK) != 0)
|
||||
{
|
||||
BIO_printf(bio_err,"I am unable to access the %s directory\n",outdir);
|
||||
perror(outdir);
|
||||
goto err;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (stat(outdir,&sb) != 0)
|
||||
{
|
||||
@@ -829,9 +831,14 @@ bad:
|
||||
}
|
||||
if (verbose)
|
||||
{
|
||||
if ((f=BN_bn2hex(serial)) == NULL) goto err;
|
||||
BIO_printf(bio_err,"next serial number is %s\n",f);
|
||||
OPENSSL_free(f);
|
||||
if (BN_is_zero(serial))
|
||||
BIO_printf(bio_err,"next serial number is 00\n");
|
||||
else
|
||||
{
|
||||
if ((f=BN_bn2hex(serial)) == NULL) goto err;
|
||||
BIO_printf(bio_err,"next serial number is %s\n",f);
|
||||
OPENSSL_free(f);
|
||||
}
|
||||
}
|
||||
|
||||
if ((attribs=CONF_get_section(conf,policy)) == NULL)
|
||||
@@ -1275,7 +1282,7 @@ err:
|
||||
X509_CRL_free(crl);
|
||||
CONF_free(conf);
|
||||
OBJ_cleanup();
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static void lookup_fail(char *name, char *tag)
|
||||
@@ -1340,7 +1347,7 @@ static BIGNUM *load_serial(char *serialfile)
|
||||
ret=ASN1_INTEGER_to_BN(ai,NULL);
|
||||
if (ret == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"error converting number from bin to BIGNUM");
|
||||
BIO_printf(bio_err,"error converting number from bin to BIGNUM\n");
|
||||
goto err;
|
||||
}
|
||||
err:
|
||||
@@ -1728,7 +1735,10 @@ again2:
|
||||
BIO_printf(bio_err,"The subject name appears to be ok, checking data base for clashes\n");
|
||||
|
||||
row[DB_name]=X509_NAME_oneline(subject,NULL,0);
|
||||
row[DB_serial]=BN_bn2hex(serial);
|
||||
if (BN_is_zero(serial))
|
||||
row[DB_serial]=BUF_strdup("00");
|
||||
else
|
||||
row[DB_serial]=BN_bn2hex(serial);
|
||||
if ((row[DB_name] == NULL) || (row[DB_serial] == NULL))
|
||||
{
|
||||
BIO_printf(bio_err,"Memory allocation failure\n");
|
||||
@@ -2142,7 +2152,10 @@ static int do_revoke(X509 *x509, TXT_DB *db)
|
||||
row[i]=NULL;
|
||||
row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);
|
||||
bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL);
|
||||
row[DB_serial]=BN_bn2hex(bn);
|
||||
if (BN_is_zero(bn))
|
||||
row[DB_serial]=BUF_strdup("00");
|
||||
else
|
||||
row[DB_serial]=BN_bn2hex(bn);
|
||||
BN_free(bn);
|
||||
if ((row[DB_name] == NULL) || (row[DB_serial] == NULL))
|
||||
{
|
||||
|
||||
@@ -202,6 +202,6 @@ end:
|
||||
if (ctx != NULL) SSL_CTX_free(ctx);
|
||||
if (ssl != NULL) SSL_free(ssl);
|
||||
if (STDout != NULL) BIO_free_all(STDout);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
@@ -364,7 +364,7 @@ end:
|
||||
X509_STORE_CTX_cleanup(&ctx);
|
||||
X509_STORE_free(store);
|
||||
}
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static X509_CRL *load_crl(char *infile, int format)
|
||||
|
||||
@@ -166,7 +166,7 @@ bad:
|
||||
BIO_printf(bio_err," -certfile arg certificates file of chain to a trusted CA\n");
|
||||
BIO_printf(bio_err," (can be used more than once)\n");
|
||||
BIO_printf(bio_err," -nocrl no crl to load, just certs from '-certfile'\n");
|
||||
EXIT(1);
|
||||
OPENSSL_EXIT(1);
|
||||
}
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
@@ -278,7 +278,7 @@ end:
|
||||
if (p7 != NULL) PKCS7_free(p7);
|
||||
if (crl != NULL) X509_CRL_free(crl);
|
||||
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -327,7 +327,7 @@ int MAIN(int argc, char **argv)
|
||||
end:
|
||||
if (buf != NULL)
|
||||
{
|
||||
memset(buf,0,BUFSIZE);
|
||||
OPENSSL_cleanse(buf,BUFSIZE);
|
||||
OPENSSL_free(buf);
|
||||
}
|
||||
if (in != NULL) BIO_free(in);
|
||||
@@ -335,7 +335,7 @@ end:
|
||||
EVP_PKEY_free(sigkey);
|
||||
if(sigbuf) OPENSSL_free(sigbuf);
|
||||
if (bmd != NULL) BIO_free(bmd);
|
||||
EXIT(err);
|
||||
OPENSSL_EXIT(err);
|
||||
}
|
||||
|
||||
void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||
|
||||
@@ -319,6 +319,6 @@ end:
|
||||
if (in != NULL) BIO_free(in);
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
if (dh != NULL) DH_free(dh);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
#endif
|
||||
@@ -506,7 +506,7 @@ end:
|
||||
if (in != NULL) BIO_free(in);
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
if (dh != NULL) DH_free(dh);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
/* dh_cb is identical to dsa_cb in apps/dsaparam.c */
|
||||
|
||||
@@ -293,6 +293,6 @@ end:
|
||||
if(dsa != NULL) DSA_free(dsa);
|
||||
if(passin) OPENSSL_free(passin);
|
||||
if(passout) OPENSSL_free(passout);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
#endif
|
||||
@@ -357,7 +357,7 @@ end:
|
||||
if (in != NULL) BIO_free(in);
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
if (dsa != NULL) DSA_free(dsa);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
|
||||
|
||||
@@ -506,9 +506,9 @@ bad:
|
||||
* bug picked up by
|
||||
* Larry J. Hughes Jr. <hughes@indiana.edu> */
|
||||
if (str == strbuf)
|
||||
memset(str,0,SIZE);
|
||||
OPENSSL_cleanse(str,SIZE);
|
||||
else
|
||||
memset(str,0,strlen(str));
|
||||
OPENSSL_cleanse(str,strlen(str));
|
||||
}
|
||||
if ((hiv != NULL) && !set_hex(hiv,iv,8))
|
||||
{
|
||||
@@ -604,7 +604,7 @@ end:
|
||||
if (benc != NULL) BIO_free(benc);
|
||||
if (b64 != NULL) BIO_free(b64);
|
||||
if(pass) OPENSSL_free(pass);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
int set_hex(char *in, unsigned char *out, int size)
|
||||
|
||||
@@ -121,5 +121,5 @@ int MAIN(int argc, char **argv)
|
||||
ret++;
|
||||
}
|
||||
}
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
@@ -184,7 +184,7 @@ end:
|
||||
ERR_print_errors(bio_err);
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
if (dh != NULL) DH_free(dh);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static void MS_CALLBACK dh_cb(int p, int n, void *arg)
|
||||
|
||||
@@ -220,6 +220,6 @@ end:
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
if (dsa != NULL) DSA_free(dsa);
|
||||
if(passout) OPENSSL_free(passout);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
#endif
|
||||
@@ -224,7 +224,7 @@ err:
|
||||
if(passout) OPENSSL_free(passout);
|
||||
if (ret != 0)
|
||||
ERR_print_errors(bio_err);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static void MS_CALLBACK genrsa_cb(int p, int n, void *arg)
|
||||
|
||||
@@ -102,7 +102,7 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf (bio_err, "-in file input file\n");
|
||||
BIO_printf (bio_err, "-out file output file\n");
|
||||
BIO_printf (bio_err, "-toseq output NS Sequence file\n");
|
||||
EXIT(1);
|
||||
OPENSSL_EXIT(1);
|
||||
}
|
||||
|
||||
if (infile) {
|
||||
@@ -162,6 +162,6 @@ end:
|
||||
BIO_free_all(out);
|
||||
NETSCAPE_CERT_SEQUENCE_free(seq);
|
||||
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
@@ -77,11 +77,11 @@ static unsigned long MS_CALLBACK hash(FUNCTION *a);
|
||||
static int MS_CALLBACK cmp(FUNCTION *a,FUNCTION *b);
|
||||
static LHASH *prog_init(void );
|
||||
static int do_cmd(LHASH *prog,int argc,char *argv[]);
|
||||
LHASH *config=NULL;
|
||||
char *default_config_file=NULL;
|
||||
|
||||
/* Make sure there is only one when MONOLITH is defined */
|
||||
#ifdef MONOLITH
|
||||
LHASH *config=NULL;
|
||||
BIO *bio_err=NULL;
|
||||
#endif
|
||||
|
||||
@@ -215,7 +215,7 @@ end:
|
||||
BIO_free(bio_err);
|
||||
bio_err=NULL;
|
||||
}
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
#define LIST_STANDARD_COMMANDS "list-standard-commands"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# OpenSSL example configuration file.
|
||||
# This is mostly being used for generation of certificate requests.
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
# This definition stops the following lines choking if HOME isn't
|
||||
# defined.
|
||||
|
||||
@@ -284,7 +284,7 @@ err:
|
||||
BIO_free(in);
|
||||
if (out)
|
||||
BIO_free_all(out);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -498,6 +498,6 @@ err:
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
fputs("Program not available.\n", stderr)
|
||||
EXIT(1);
|
||||
OPENSSL_EXIT(1);
|
||||
}
|
||||
#endif
|
||||
@@ -480,9 +480,10 @@ int MAIN(int argc, char **argv)
|
||||
/* Exclude verified certificate */
|
||||
for (i = 1; i < sk_X509_num (chain2) ; i++)
|
||||
sk_X509_push(certs, sk_X509_value (chain2, i));
|
||||
}
|
||||
sk_X509_free(chain2);
|
||||
if (vret) {
|
||||
/* Free first certificate */
|
||||
X509_free(sk_X509_value(chain2, 0));
|
||||
sk_X509_free(chain2);
|
||||
} else {
|
||||
BIO_printf (bio_err, "Error %s getting chain.\n",
|
||||
X509_verify_cert_error_string(vret));
|
||||
goto export_end;
|
||||
@@ -509,8 +510,6 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
sk_X509_pop_free(certs, X509_free);
|
||||
certs = NULL;
|
||||
/* ucert is part of certs so it is already freed */
|
||||
ucert = NULL;
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
@@ -598,7 +597,6 @@ int MAIN(int argc, char **argv)
|
||||
if (certs) sk_X509_pop_free(certs, X509_free);
|
||||
if (safes) sk_PKCS7_pop_free(safes, PKCS7_free);
|
||||
if (bags) sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
|
||||
if (ucert) X509_free(ucert);
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
@@ -668,7 +666,7 @@ int MAIN(int argc, char **argv)
|
||||
if (canames) sk_free(canames);
|
||||
if(passin) OPENSSL_free(passin);
|
||||
if(passout) OPENSSL_free(passout);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass,
|
||||
|
||||
@@ -154,7 +154,7 @@ bad:
|
||||
BIO_printf(bio_err," -print_certs print any certs or crl in the input\n");
|
||||
BIO_printf(bio_err," -text print full details of certificates\n");
|
||||
BIO_printf(bio_err," -noout don't output encoded data\n");
|
||||
EXIT(1);
|
||||
OPENSSL_EXIT(1);
|
||||
}
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
@@ -289,5 +289,5 @@ end:
|
||||
if (p7 != NULL) PKCS7_free(p7);
|
||||
if (in != NULL) BIO_free(in);
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
@@ -236,7 +236,8 @@ int MAIN(int argc, char **argv)
|
||||
if(passout) p8pass = passout;
|
||||
else {
|
||||
p8pass = pass;
|
||||
EVP_read_pw_string(pass, 50, "Enter Encryption Password:", 1);
|
||||
if (EVP_read_pw_string(pass, 50, "Enter Encryption Password:", 1))
|
||||
return (1);
|
||||
}
|
||||
app_RAND_load_file(NULL, bio_err, 0);
|
||||
if (!(p8 = PKCS8_encrypt(pbe_nid, cipher,
|
||||
|
||||
@@ -144,5 +144,5 @@ err:
|
||||
ERR_print_errors(bio_err);
|
||||
if (out)
|
||||
BIO_free_all(out);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
@@ -422,7 +422,7 @@ bad:
|
||||
|
||||
if (template != NULL)
|
||||
{
|
||||
long errline;
|
||||
long errline = -1;
|
||||
|
||||
BIO_printf(bio_err,"Using configuration from %s\n",template);
|
||||
req_conf=CONF_load(NULL,template,&errline);
|
||||
@@ -909,7 +909,7 @@ end:
|
||||
#ifndef NO_DSA
|
||||
if (dsa_params != NULL) DSA_free(dsa_params);
|
||||
#endif
|
||||
EXIT(ex);
|
||||
OPENSSL_EXIT(ex);
|
||||
}
|
||||
|
||||
static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, int attribs)
|
||||
|
||||
@@ -389,7 +389,7 @@ end:
|
||||
if(rsa != NULL) RSA_free(rsa);
|
||||
if(passin) OPENSSL_free(passin);
|
||||
if(passout) OPENSSL_free(passout);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
#else /* !NO_RSA */
|
||||
|
||||
|
||||
@@ -768,14 +768,14 @@ end:
|
||||
if (con != NULL) SSL_free(con);
|
||||
if (con2 != NULL) SSL_free(con2);
|
||||
if (ctx != NULL) SSL_CTX_free(ctx);
|
||||
if (cbuf != NULL) { memset(cbuf,0,BUFSIZZ); OPENSSL_free(cbuf); }
|
||||
if (sbuf != NULL) { memset(sbuf,0,BUFSIZZ); OPENSSL_free(sbuf); }
|
||||
if (cbuf != NULL) { OPENSSL_cleanse(cbuf,BUFSIZZ); OPENSSL_free(cbuf); }
|
||||
if (sbuf != NULL) { OPENSSL_cleanse(sbuf,BUFSIZZ); OPENSSL_free(sbuf); }
|
||||
if (bio_c_out != NULL)
|
||||
{
|
||||
BIO_free(bio_c_out);
|
||||
bio_c_out=NULL;
|
||||
}
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -253,10 +253,10 @@ static char **local_argv;
|
||||
static int ebcdic_new(BIO *bi);
|
||||
static int ebcdic_free(BIO *a);
|
||||
static int ebcdic_read(BIO *b, char *out, int outl);
|
||||
static int ebcdic_write(BIO *b, char *in, int inl);
|
||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr);
|
||||
static int ebcdic_write(BIO *b, const char *in, int inl);
|
||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, void *ptr);
|
||||
static int ebcdic_gets(BIO *bp, char *buf, int size);
|
||||
static int ebcdic_puts(BIO *bp, char *str);
|
||||
static int ebcdic_puts(BIO *bp, const char *str);
|
||||
|
||||
#define BIO_TYPE_EBCDIC_FILTER (18|0x0200)
|
||||
static BIO_METHOD methods_ebcdic=
|
||||
@@ -321,7 +321,7 @@ static int ebcdic_read(BIO *b, char *out, int outl)
|
||||
return(ret);
|
||||
}
|
||||
|
||||
static int ebcdic_write(BIO *b, char *in, int inl)
|
||||
static int ebcdic_write(BIO *b, const char *in, int inl)
|
||||
{
|
||||
EBCDIC_OUTBUFF *wbuf;
|
||||
int ret=0;
|
||||
@@ -354,7 +354,7 @@ static int ebcdic_write(BIO *b, char *in, int inl)
|
||||
return(ret);
|
||||
}
|
||||
|
||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr)
|
||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
{
|
||||
long ret;
|
||||
|
||||
@@ -373,7 +373,7 @@ static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr)
|
||||
|
||||
static int ebcdic_gets(BIO *bp, char *buf, int size)
|
||||
{
|
||||
int i, ret;
|
||||
int i, ret=0;
|
||||
if (bp->next_bio == NULL) return(0);
|
||||
/* return(BIO_gets(bp->next_bio,buf,size));*/
|
||||
for (i=0; i<size-1; ++i)
|
||||
@@ -392,7 +392,7 @@ static int ebcdic_gets(BIO *bp, char *buf, int size)
|
||||
return (ret < 0 && i == 0) ? ret : i;
|
||||
}
|
||||
|
||||
static int ebcdic_puts(BIO *bp, char *str)
|
||||
static int ebcdic_puts(BIO *bp, const char *str)
|
||||
{
|
||||
if (bp->next_bio == NULL) return(0);
|
||||
return ebcdic_write(bp, str, strlen(str));
|
||||
@@ -741,7 +741,7 @@ end:
|
||||
BIO_free(bio_s_out);
|
||||
bio_s_out=NULL;
|
||||
}
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
|
||||
@@ -1043,7 +1043,7 @@ err:
|
||||
BIO_printf(bio_s_out,"CONNECTION CLOSED\n");
|
||||
if (buf != NULL)
|
||||
{
|
||||
memset(buf,0,bufsize);
|
||||
OPENSSL_cleanse(buf,bufsize);
|
||||
OPENSSL_free(buf);
|
||||
}
|
||||
if (ret >= 0)
|
||||
@@ -1250,7 +1250,7 @@ static int www_body(char *hostname, int s, unsigned char *context)
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_s_out,"read R BLOCK\n");
|
||||
#ifndef MSDOS
|
||||
#if !defined(MSDOS) && !defined(VXWORKS)
|
||||
sleep(1);
|
||||
#endif
|
||||
continue;
|
||||
|
||||
@@ -116,6 +116,11 @@
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifdef VXWORKS
|
||||
#include <tickLib.h>
|
||||
#undef SIGALRM
|
||||
#endif
|
||||
|
||||
/* The following if from times(3) man page. It may need to be changed
|
||||
*/
|
||||
#ifndef HZ
|
||||
@@ -461,7 +466,7 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
if (tm_cipher == NULL ) {
|
||||
fprintf( stderr, "No CIPHER specified\n" );
|
||||
/* EXIT(1); */
|
||||
/* OPENSSL_EXIT(1); */
|
||||
}
|
||||
|
||||
if (!(perform & 1)) goto next;
|
||||
@@ -628,7 +633,7 @@ end:
|
||||
SSL_CTX_free(tm_ctx);
|
||||
tm_ctx=NULL;
|
||||
}
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
||||
@@ -272,7 +272,7 @@ bad:
|
||||
end:
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
if (x != NULL) SSL_SESSION_free(x);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static SSL_SESSION *load_sess_id(char *infile, int format)
|
||||
|
||||
@@ -54,8 +54,6 @@
|
||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.]
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* most of this code has been pilfered from my libdes speed.c program */
|
||||
@@ -691,7 +689,7 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf(bio_err,"\n");
|
||||
#endif
|
||||
|
||||
#ifdef TIMES
|
||||
#if defined(TIMES) || defined(USE_TOD)
|
||||
BIO_printf(bio_err,"\n");
|
||||
BIO_printf(bio_err,"Available options:\n");
|
||||
BIO_printf(bio_err,"-elapsed measure time in real time instead of CPU user time.\n");
|
||||
@@ -1414,7 +1412,7 @@ end:
|
||||
if (dsa_key[i] != NULL)
|
||||
DSA_free(dsa_key[i]);
|
||||
#endif
|
||||
EXIT(mret);
|
||||
OPENSSL_EXIT(mret);
|
||||
}
|
||||
|
||||
static void print_message(char *s, long num, int length)
|
||||
|
||||
@@ -288,5 +288,5 @@ end:
|
||||
BIO_free(key);
|
||||
EVP_PKEY_free(pkey);
|
||||
if(passin) OPENSSL_free(passin);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
@@ -213,7 +213,7 @@ end:
|
||||
if (cert_ctx != NULL) X509_STORE_free(cert_ctx);
|
||||
sk_X509_pop_free(untrusted, X509_free);
|
||||
sk_X509_pop_free(trusted, X509_free);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, int purpose)
|
||||
|
||||
@@ -128,5 +128,5 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
if (cflags) printf("%s\n",SSLeay_version(SSLEAY_CFLAGS));
|
||||
end:
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
@@ -121,7 +121,7 @@ static char *x509_usage[]={
|
||||
" -CAkey arg - set the CA key, must be PEM format\n",
|
||||
" missing, it is assumed to be in the CA file.\n",
|
||||
" -CAcreateserial - create serial number file if it does not exist\n",
|
||||
" -CAserial - serial file\n",
|
||||
" -CAserial arg - serial file\n",
|
||||
" -text - print the certificate in text form\n",
|
||||
" -C - print out C code forms\n",
|
||||
" -md2/-md5/-sha1/-mdc2 - digest to use\n",
|
||||
@@ -447,7 +447,7 @@ bad:
|
||||
|
||||
if (extfile)
|
||||
{
|
||||
long errorline;
|
||||
long errorline = -1;
|
||||
X509V3_CTX ctx2;
|
||||
if (!(extconf=CONF_load(NULL,extfile,&errorline)))
|
||||
{
|
||||
@@ -961,7 +961,7 @@ end:
|
||||
sk_ASN1_OBJECT_pop_free(trust, ASN1_OBJECT_free);
|
||||
sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free);
|
||||
if (passin) OPENSSL_free(passin);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
|
||||
|
||||
+15
-3
@@ -317,6 +317,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
||||
*CRAY*)
|
||||
echo "j90-cray-unicos"; exit 0;
|
||||
;;
|
||||
|
||||
NONSTOP_KERNEL*)
|
||||
echo "nsr-tandem-nsk"; exit 0;
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
@@ -384,6 +388,9 @@ done
|
||||
GCCVER=`(gcc -dumpversion) 2>/dev/null`
|
||||
if [ "$GCCVER" != "" ]; then
|
||||
CC=gcc
|
||||
# then strip off whatever prefix egcs prepends the number with...
|
||||
# Hopefully, this will work for any future prefixes as well.
|
||||
GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z]*\-//'`
|
||||
# Since gcc 3.1 gcc --version behaviour has changed. gcc -dumpversion
|
||||
# does give us what we want though, so we use that. We just just the
|
||||
# major and minor version numbers.
|
||||
@@ -392,6 +399,7 @@ if [ "$GCCVER" != "" ]; then
|
||||
else
|
||||
CC=cc
|
||||
fi
|
||||
GCCVER=${GCCVER:-0}
|
||||
if [ "$SYSTEM" = "HP-UX" ];then
|
||||
# By default gcc is a ILP32 compiler (with long long == 64).
|
||||
GCC_BITS="32"
|
||||
@@ -469,7 +477,8 @@ case "$GUESSOS" in
|
||||
echo "WARNING! If you wish to build 64-bit library, then you have to"
|
||||
echo " invoke './Configure irix64-mips4-$CC' *manually*."
|
||||
echo " Type return if you want to continue, Ctrl-C to abort."
|
||||
read waste < /dev/tty
|
||||
# Do not stop if /dev/tty is unavailable
|
||||
(read waste < /dev/tty) || true
|
||||
CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||
CPU=${CPU:-0}
|
||||
if [ $CPU -ge 5000 ]; then
|
||||
@@ -524,7 +533,8 @@ EOF
|
||||
#echo "WARNING! If you wish to build 64-bit library, then you have to"
|
||||
#echo " invoke './Configure linux64-sparcv9' *manually*."
|
||||
#echo " Type return if you want to continue, Ctrl-C to abort."
|
||||
#read waste < /dev/tty
|
||||
# Do not stop if /dev/tty is unavailable
|
||||
#(read waste < /dev/tty) || true
|
||||
OUT="linux-sparcv9" ;;
|
||||
sparc-*-linux2)
|
||||
KARCH=`awk '/^type/{print$3}' /proc/cpuinfo`
|
||||
@@ -565,7 +575,8 @@ EOF
|
||||
echo "WARNING! If you wish to build 64-bit library, then you have to"
|
||||
echo " invoke './Configure solaris64-sparcv9-cc' *manually*."
|
||||
echo " Type return if you want to continue, Ctrl-C to abort."
|
||||
read waste < /dev/tty
|
||||
# Do not stop if /dev/tty is unavailable
|
||||
(read waste < /dev/tty) || true
|
||||
fi
|
||||
OUT="solaris-sparcv9-$CC" ;;
|
||||
sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
|
||||
@@ -626,6 +637,7 @@ EOF
|
||||
*-*-cygwin) OUT="Cygwin" ;;
|
||||
t3e-cray-unicosmk) OUT="cray-t3e" ;;
|
||||
j90-cray-unicos) OUT="cray-j90" ;;
|
||||
nsr-tandem-nsk) OUT="tandem-c89" ;;
|
||||
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ SDIRS= md2 md5 sha mdc2 hmac ripemd \
|
||||
GENERAL=Makefile README crypto-lib.com install.com
|
||||
|
||||
LIB= $(TOP)/libcrypto.a
|
||||
LIBSRC= cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c
|
||||
LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o
|
||||
LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c
|
||||
LIBOBJ= cryptlib.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
@@ -129,7 +129,7 @@ lint:
|
||||
|
||||
depend:
|
||||
if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
|
||||
$(MAKEDEPEND) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
if [ ! -s buildinf.h ]; then rm buildinf.h; fi
|
||||
@for i in $(SDIRS) ;\
|
||||
do \
|
||||
@@ -185,6 +185,9 @@ mem.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||
mem.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
|
||||
mem.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
|
||||
mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
|
||||
mem_clr.o: ../include/openssl/crypto.h ../include/openssl/opensslv.h
|
||||
mem_clr.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
mem_clr.o: ../include/openssl/symhacks.h
|
||||
mem_dbg.o: ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
|
||||
mem_dbg.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||
|
||||
@@ -104,7 +104,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
||||
@@ -199,10 +199,10 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
|
||||
signature->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07);
|
||||
signature->flags|=ASN1_STRING_FLAG_BITS_LEFT;
|
||||
err:
|
||||
memset(&ctx,0,sizeof(ctx));
|
||||
OPENSSL_cleanse(&ctx,sizeof(ctx));
|
||||
if (buf_in != NULL)
|
||||
{ memset((char *)buf_in,0,(unsigned int)inl); OPENSSL_free(buf_in); }
|
||||
{ OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); OPENSSL_free(buf_in); }
|
||||
if (buf_out != NULL)
|
||||
{ memset((char *)buf_out,0,outll); OPENSSL_free(buf_out); }
|
||||
{ OPENSSL_cleanse((char *)buf_out,outll); OPENSSL_free(buf_out); }
|
||||
return(outl);
|
||||
}
|
||||
@@ -519,7 +519,7 @@ int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in)
|
||||
{
|
||||
ASN1_STRING stmp, *str = &stmp;
|
||||
int mbflag, type, ret;
|
||||
if(!*out || !in) return -1;
|
||||
if(!in) return -1;
|
||||
type = in->type;
|
||||
if((type < 0) || (type > 30)) return -1;
|
||||
mbflag = tag2nbyte[type];
|
||||
@@ -528,6 +528,6 @@ int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in)
|
||||
stmp.data = NULL;
|
||||
ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING);
|
||||
if(ret < 0) return ret;
|
||||
if(out) *out = stmp.data;
|
||||
*out = stmp.data;
|
||||
return stmp.length;
|
||||
}
|
||||
@@ -246,6 +246,8 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
|
||||
ts=(struct tm *)localtime(&t);
|
||||
}
|
||||
#endif
|
||||
if (ts == NULL)
|
||||
return(NULL);
|
||||
p=(char *)s->data;
|
||||
if ((p == NULL) || (s->length < 14))
|
||||
{
|
||||
|
||||
@@ -100,7 +100,7 @@ int ASN1_verify(int (*i2d)(), X509_ALGOR *a, ASN1_BIT_STRING *signature,
|
||||
EVP_VerifyInit(&ctx,type);
|
||||
EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
|
||||
|
||||
memset(buf_in,0,(unsigned int)inl);
|
||||
OPENSSL_cleanse(buf_in,(unsigned int)inl);
|
||||
OPENSSL_free(buf_in);
|
||||
|
||||
if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
@@ -103,10 +104,12 @@ int ASN1_get_object(unsigned char **pp, long *plength, int *ptag, int *pclass,
|
||||
l<<=7L;
|
||||
l|= *(p++)&0x7f;
|
||||
if (--max == 0) goto err;
|
||||
if (l > (INT_MAX >> 7L)) goto err;
|
||||
}
|
||||
l<<=7L;
|
||||
l|= *(p++)&0x7f;
|
||||
tag=(int)l;
|
||||
if (--max == 0) goto err;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -141,7 +144,7 @@ err:
|
||||
static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max)
|
||||
{
|
||||
unsigned char *p= *pp;
|
||||
long ret=0;
|
||||
unsigned long ret=0;
|
||||
int i;
|
||||
|
||||
if (max-- < 1) return(0);
|
||||
@@ -170,10 +173,10 @@ static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max)
|
||||
else
|
||||
ret=i;
|
||||
}
|
||||
if (ret < 0)
|
||||
if (ret > LONG_MAX)
|
||||
return 0;
|
||||
*pp=p;
|
||||
*rl=ret;
|
||||
*rl=(long)ret;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ int i2d_RSA_NET(RSA *a, unsigned char **pp, int (*cb)(), int sgckey)
|
||||
}
|
||||
|
||||
EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL);
|
||||
memset(buf,0,256);
|
||||
OPENSSL_cleanse(buf,256);
|
||||
|
||||
EVP_CIPHER_CTX_init(&ctx);
|
||||
EVP_EncryptInit(&ctx,EVP_rc4(),key,NULL);
|
||||
@@ -292,7 +292,7 @@ RSA *d2i_RSA_NET_2(RSA **a, unsigned char **pp, long length,
|
||||
}
|
||||
|
||||
EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL);
|
||||
memset(buf,0,256);
|
||||
OPENSSL_cleanse(buf,256);
|
||||
|
||||
EVP_CIPHER_CTX_init(&ctx);
|
||||
EVP_DecryptInit(&ctx,EVP_rc4(),key,NULL);
|
||||
|
||||
@@ -119,8 +119,8 @@ void PKCS8_PRIV_KEY_INFO_free (PKCS8_PRIV_KEY_INFO *a)
|
||||
X509_ALGOR_free(a->pkeyalg);
|
||||
/* Clear sensitive data */
|
||||
if (a->pkey->value.octet_string)
|
||||
memset (a->pkey->value.octet_string->data,
|
||||
0, a->pkey->value.octet_string->length);
|
||||
OPENSSL_cleanse(a->pkey->value.octet_string->data,
|
||||
a->pkey->value.octet_string->length);
|
||||
ASN1_TYPE_free (a->pkey);
|
||||
sk_X509_ATTRIBUTE_pop_free (a->attributes, X509_ATTRIBUTE_free);
|
||||
OPENSSL_free (a);
|
||||
|
||||
@@ -96,7 +96,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
||||
@@ -63,6 +63,8 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../e_os.h"
|
||||
|
||||
#ifdef NO_BF
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -275,7 +277,7 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
ret=test();
|
||||
|
||||
exit(ret);
|
||||
EXIT(ret);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
* o ... (for OpenSSL)
|
||||
*/
|
||||
|
||||
#if HAVE_LONG_DOUBLE
|
||||
#ifdef HAVE_LONG_DOUBLE
|
||||
#define LDOUBLE long double
|
||||
#else
|
||||
#define LDOUBLE double
|
||||
|
||||
@@ -241,7 +241,7 @@ typedef struct bio_method_st
|
||||
long (_far *ctrl)();
|
||||
int (_far *create)();
|
||||
int (_far *destroy)();
|
||||
long (_fat *callback_ctrl)();
|
||||
long (_far *callback_ctrl)();
|
||||
} BIO_METHOD;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
||||
@@ -155,7 +155,7 @@ extern "C" {
|
||||
#define BN_BYTES 4
|
||||
#define BN_BITS2 32
|
||||
#define BN_BITS4 16
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
/* VC++ doesn't like the LL suffix */
|
||||
#define BN_MASK (0xffffffffffffffffL)
|
||||
#else
|
||||
@@ -413,7 +413,7 @@ int BN_mod_mul_montgomery(BIGNUM *r,BIGNUM *a,BIGNUM *b,BN_MONT_CTX *mont,
|
||||
BN_CTX *ctx);
|
||||
int BN_from_montgomery(BIGNUM *r,BIGNUM *a,BN_MONT_CTX *mont,BN_CTX *ctx);
|
||||
void BN_MONT_CTX_free(BN_MONT_CTX *mont);
|
||||
int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *modulus,BN_CTX *ctx);
|
||||
int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *mod,BN_CTX *ctx);
|
||||
BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to,BN_MONT_CTX *from);
|
||||
|
||||
BN_BLINDING *BN_BLINDING_new(BIGNUM *A,BIGNUM *Ai,BIGNUM *mod);
|
||||
|
||||
@@ -263,12 +263,12 @@ void BN_clear_free(BIGNUM *a)
|
||||
if (a == NULL) return;
|
||||
if (a->d != NULL)
|
||||
{
|
||||
memset(a->d,0,a->dmax*sizeof(a->d[0]));
|
||||
OPENSSL_cleanse(a->d,a->dmax*sizeof(a->d[0]));
|
||||
if (!(BN_get_flags(a,BN_FLG_STATIC_DATA)))
|
||||
OPENSSL_free(a->d);
|
||||
}
|
||||
i=BN_get_flags(a,BN_FLG_MALLOCED);
|
||||
memset(a,0,sizeof(BIGNUM));
|
||||
OPENSSL_cleanse(a,sizeof(BIGNUM));
|
||||
if (i)
|
||||
OPENSSL_free(a);
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom)
|
||||
err:
|
||||
if (buf != NULL)
|
||||
{
|
||||
memset(buf,0,bytes);
|
||||
OPENSSL_cleanse(buf,bytes);
|
||||
OPENSSL_free(buf);
|
||||
}
|
||||
return(ret);
|
||||
|
||||
Loaded 100 of 357 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user