diff options
author | Renato Botelho <renato@netgate.com> | 2016-05-09 17:39:11 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-05-09 17:39:11 -0300 |
commit | eb1aa95459d780e1328d821fd6af261c2221a62b (patch) | |
tree | d0c75db0de1902022252ffee3acbfe775366214c | |
parent | 4a578420216361b8acfb7296dd0b68c805e5121b (diff) | |
parent | 1708fafa25d9413ab466d3670d803e2ebf885d45 (diff) | |
download | FreeBSD-src-eb1aa95459d780e1328d821fd6af261c2221a62b.zip FreeBSD-src-eb1aa95459d780e1328d821fd6af261c2221a62b.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into devel
543 files changed, 2922 insertions, 5332 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index 21ffec4..d4c7e48 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1110,7 +1110,7 @@ reinstallkernel reinstallkernel.debug: _installcheck_kernel ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} .endif -.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS) +.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} @echo "--------------------------------------------------------------" @echo ">>> Installing kernel ${_kernel}" @@ -1141,7 +1141,7 @@ distributekernel distributekernel.debug: ${DESTDIR}/${DISTDIR}/kernel.meta .endif .endif -.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS) +.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} .if defined(NO_ROOT) echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta @@ -1167,7 +1167,7 @@ packagekernel: tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz .endif -.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS) +.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \ @@ -1180,7 +1180,7 @@ packagekernel: tar cvf - . | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz .endif -.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS) +.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - . | \ diff --git a/contrib/bsnmp/gensnmptree/gensnmptree.c b/contrib/bsnmp/gensnmptree/gensnmptree.c index b69d739..0eca777 100644 --- a/contrib/bsnmp/gensnmptree/gensnmptree.c +++ b/contrib/bsnmp/gensnmptree/gensnmptree.c @@ -743,10 +743,8 @@ parse_type(enum tok *tok, struct type *t, const char *vname) report("need value for ENUM/BITS"); if (gettoken() != TOK_STR) report("need string in ENUM/BITS"); - if (e != NULL) { - e->name = savetok(); - TAILQ_INSERT_TAIL(&t->enums, e, link); - } + e->name = savetok(); + TAILQ_INSERT_TAIL(&t->enums, e, link); if ((*tok = gettoken()) == TOK_EOF) report("unexpected EOF in ENUM/BITS"); } while (*tok != ')'); diff --git a/contrib/bsnmp/snmpd/config.c b/contrib/bsnmp/snmpd/config.c index c4f1188..ff82e82 100644 --- a/contrib/bsnmp/snmpd/config.c +++ b/contrib/bsnmp/snmpd/config.c @@ -1150,7 +1150,8 @@ parse_define(const char *varname) free(m->value); m->value = string; m->length = length; - } + } else + free(string); } token = TOK_EOL; diff --git a/contrib/bsnmp/snmpd/main.c b/contrib/bsnmp/snmpd/main.c index cbd1893..2d60926 100644 --- a/contrib/bsnmp/snmpd/main.c +++ b/contrib/bsnmp/snmpd/main.c @@ -2813,7 +2813,7 @@ usm_new_user(uint8_t *eid, uint32_t elen, char *uname) if ((uuser = (struct usm_user *)malloc(sizeof(*uuser))) == NULL) return (NULL); - memset(uuser, 0, sizeof(struct usm_user)); + memset(uuser, 0, sizeof(*uuser)); strlcpy(uuser->suser.sec_name, uname, SNMP_ADM_STR32_SIZ); memcpy(uuser->user_engine_id, eid, elen); uuser->user_engine_len = elen; diff --git a/contrib/file/ChangeLog b/contrib/file/ChangeLog index 9a28e5c..8e67ef6 100644 --- a/contrib/file/ChangeLog +++ b/contrib/file/ChangeLog @@ -1,49 +1,3 @@ -2016-04-16 18:34 Christos Zoulas <christos@zoulas.com> - - * release 5.25 - -2016-03-31 13:50 Christos Zoulas <christos@zoulas.com> - - * make the number of bytes read from files configurable. - -2016-03-21 13:40 Christos Zoulas <christos@zoulas.com> - - * Add bounds checks for DER code (discovered by Thomas Jarosch) - * Change indirect recursion limit to indirect use count and - bump from 15 to 50 to prevent abuse. - -2016-03-13 20:39 Christos Zoulas <christos@zoulas.com> - - * Add -00 which prints filename\0description\0 - -2016-03-01 13:28 Christos Zoulas <christos@zoulas.com> - - * Fix ID3 indirect parsing - -2016-01-19 10:18 Christos Zoulas <christos@zoulas.com> - - * add DER parsing capability - -2015-11-13 10:35 Christos Zoulas <christos@zoulas.com> - - * provide dprintf(3) for the OS's that don't have it. - -2015-11-11 16:25 Christos Zoulas <christos@zoulas.com> - - * redo the compression code report decompression errors - -2015-11-10 23:25 Christos Zoulas <christos@zoulas.com> - - * REG_STARTEND code is not working as expected, delete it. - -2015-11-09 16:05 Christos Zoulas <christos@zoulas.com> - - * Add zlib support if we have it. - -2015-11-05 11:22 Christos Zoulas <christos@zoulas.com> - - * PR/492: compression forking was broken with magic_buffer. - 2015-09-16 9:50 Christos Zoulas <christos@zoulas.com> * release 5.25 diff --git a/contrib/file/README b/contrib/file/README index bb8186f..81a5221 100644 --- a/contrib/file/README +++ b/contrib/file/README @@ -1,6 +1,6 @@ ## README for file(1) Command ## - @(#) $File: README,v 1.50 2016/04/16 22:40:54 christos Exp $ + @(#) $File: README,v 1.49 2015/01/02 20:23:04 christos Exp $ Mailing List: file@mx.gw.com Mailing List archives: http://mx.gw.com/pipermail/file/ @@ -67,41 +67,17 @@ in magic(5) format please, to the maintainer, Christos Zoulas. COPYING - read this first. README - read this second (you are currently reading this file). INSTALL - read on how to install -src/localtime_r.c -src/magic.c -src/magic.h -src/mygetopt.h -src/newtest2.c -src/newtest3.c -src/pread.c -src/print.c -src/readcdf.c -src/readelf.c -src/readelf.h -src/regex.c -src/regex2.c -src/softmagic.c -src/strcasestr.c -src/strlcat.c -src/strlcpy.c -src/strndup.c -src/tar.h -src/teststrchr.c -src/vasprintf.c -src/x.c src/apprentice.c - parses /etc/magic to learn magic -src/apptype.c - used for OS/2 specific application type magic -src/ascmagic.c - third & last set of tests, based on hardwired assumptions. src/asctime_r.c - replacement for OS's that don't have it. +src/apptype.c - used for OS/2 specific application type magic src/asprintf.c - replacement for OS's that don't have it. +src/ascmagic.c - third & last set of tests, based on hardwired assumptions. src/asctime_r.c - replacement for OS's that don't have it. src/asprintf.c - replacement for OS's that don't have it. src/cdf.[ch] - parser for Microsoft Compound Document Files src/cdf_time.c - time converter for CDF. src/compress.c - handles decompressing files to look inside. src/ctime_r.c - replacement for OS's that don't have it. -src/der.[ch] - parser for Distinguished Encoding Rules -src/dprintf.c - replacement for OS's that don't have it. src/elfclass.h - common code for elf 32/64. src/encoding.c - handles unicode encodings src/file.c - the main program @@ -112,13 +88,10 @@ src/fsmagic.c - first set of tests the program runs, based on filesystem info src/funcs.c - utilility functions src/getline.c - replacement for OS's that don't have it. src/getopt_long.c - replacement for OS's that don't have it. -src/gmtime_r.c - replacement for OS's that don't have it. -src/is_tar.c, tar.h - knows about Tape ARchive format (courtesy John Gilmore). -src/localtime_r.c - replacement for OS's that don't have it. +src/is_tar.c, tar.h - knows about tarchives (courtesy John Gilmore). +src/names.h - header file for ascmagic.c src/magic.h.in - source file for magic.h -src/mygetopt.h - replacement for OS's that don't have it. src/magic.c - the libmagic api -src/names.h - header file for ascmagic.c src/pread.c - replacement for OS's that don't have it. src/print.c - print results, errors, warnings. src/readcdf.c - CDF wrapper. diff --git a/contrib/file/config.h.in b/contrib/file/config.h.in index 86efb6f..0397fe4 100644 --- a/contrib/file/config.h.in +++ b/contrib/file/config.h.in @@ -32,9 +32,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the `dprintf' function. */ -#undef HAVE_DPRINTF - /* Define to 1 if you have the <err.h> header file. */ #undef HAVE_ERR_H diff --git a/contrib/file/configure b/contrib/file/configure index c14c6cc..7f62b63 100755 --- a/contrib/file/configure +++ b/contrib/file/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.26. +# Generated by GNU Autoconf 2.69 for file 5.25. # # Report bugs to <christos@astron.com>. # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.26' -PACKAGE_STRING='file 5.26' +PACKAGE_VERSION='5.25' +PACKAGE_STRING='file 5.25' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -1327,7 +1327,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.26 to adapt to many kinds of systems. +\`configure' configures file 5.25 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1397,7 +1397,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.26:";; + short | recursive ) echo "Configuration of file 5.25:";; esac cat <<\_ACEOF @@ -1507,7 +1507,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.26 +file configure 5.25 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2163,7 +2163,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.26, which was +It was created by file $as_me 5.25, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3029,7 +3029,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.26' + VERSION='5.25' cat >>confdefs.h <<_ACEOF @@ -14385,19 +14385,6 @@ esac fi -ac_fn_c_check_func "$LINENO" "dprintf" "ac_cv_func_dprintf" -if test "x$ac_cv_func_dprintf" = xyes; then : - $as_echo "#define HAVE_DPRINTF 1" >>confdefs.h - -else - case " $LIBOBJS " in - *" dprintf.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS dprintf.$ac_objext" - ;; -esac - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzopen in -lz" >&5 @@ -15049,7 +15036,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.26, which was +This file was extended by file $as_me 5.25, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15115,7 +15102,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.26 +file config.status 5.25 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/contrib/file/configure.ac b/contrib/file/configure.ac index 676c0fb..50c3188 100644 --- a/contrib/file/configure.ac +++ b/contrib/file/configure.ac @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.26],[christos@astron.com]) +AC_INIT([file],[5.25],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -145,7 +145,7 @@ dnl Checks for functions AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale) dnl Provide implementation of some required functions if necessary -AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r localtime_r gmtime_r pread strcasestr fmtcheck dprintf) +AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r localtime_r gmtime_r pread strcasestr fmtcheck) dnl Checks for libraries AC_CHECK_LIB(z,gzopen) diff --git a/contrib/file/doc/file.man b/contrib/file/doc/file.man index f1a86ae..2a048a2 100644 --- a/contrib/file/doc/file.man +++ b/contrib/file/doc/file.man @@ -1,5 +1,5 @@ -.\" $File: file.man,v 1.120 2016/03/31 17:51:12 christos Exp $ -.Dd March 13, 2016 +.\" $File: file.man,v 1.118 2015/09/11 17:24:09 christos Exp $ +.Dd September 11, 2015 .Dt FILE __CSECTION__ .Os .Sh NAME @@ -317,7 +317,6 @@ Set various parameter limits. .It Li elf_phnum Ta 128 Ta max ELF program sections processed .It Li elf_shnum Ta 32768 Ta max ELF sections processed .It Li regex Ta 8192 Ta length limit for regex searches -.It Li bytes Ta 1048576 Ta max number of bytes to read from file .El .It Fl r , Fl Fl raw Don't translate unprintable characters to \eooo. @@ -359,11 +358,6 @@ Nice to .Xr cut 1 the output. This does not affect the separator, which is still printed. -.Pp -If this option is repeated more than once, then -.Nm -prints just the filename followed by a NUL followed by the description -(or ERROR: text) followed by a second NUL for each entry. .It Fl -help Print a help message and exit. .El diff --git a/contrib/file/doc/libmagic.man b/contrib/file/doc/libmagic.man index a3de981..8f5c032 100644 --- a/contrib/file/doc/libmagic.man +++ b/contrib/file/doc/libmagic.man @@ -1,4 +1,4 @@ -.\" $File: libmagic.man,v 1.40 2016/03/31 17:51:12 christos Exp $ +.\" $File: libmagic.man,v 1.38 2015/09/11 17:24:09 christos Exp $ .\" .\" Copyright (c) Christos Zoulas 2003. .\" All Rights Reserved. @@ -225,7 +225,7 @@ It returns 0 on success and \-1 on failure. .Pp The .Fn magic_compile -function can be used to compile the colon +function can be used to compile the the colon separated list of database files passed in as .Ar filename , or @@ -251,7 +251,7 @@ for the default database. .Pp The .Fn magic_load -function must be used to load the colon +function must be used to load the the colon separated list of database files passed in as .Ar filename , or @@ -282,7 +282,7 @@ The .Fn magic_getparam and .Fn magic_setparam -allow getting and setting various limits related to the magic +allow getting and setting various limits related to the the magic library. .Bl -column "MAGIC_PARAM_ELF_PHNUM_MAX" "size_t" "Default" -offset indent .It Sy "Parameter" Ta Sy "Type" Ta Sy "Default" @@ -292,7 +292,6 @@ library. .It Li MAGIC_PARAM_ELF_PHNUM_MAX Ta size_t Ta 128 .It Li MAGIC_PARAM_ELF_SHNUM_MAX Ta size_t Ta 32768 .It Li MAGIC_PARAM_REGEX_MAX Ta size_t Ta 8192 -.It Li MAGIC_PARAM_BYTES_MAX Ta size_t Ta 1048576 .El .Pp The diff --git a/contrib/file/magic/Magdir/android b/contrib/file/magic/Magdir/android index f1340d5..7675c1c 100644 --- a/contrib/file/magic/Magdir/android +++ b/contrib/file/magic/Magdir/android @@ -1,6 +1,6 @@ #------------------------------------------------------------ -# $File: android,v 1.9 2016/01/11 21:19:18 christos Exp $ +# $File: android,v 1.8 2015/03/19 18:04:37 christos Exp $ # Various android related magic entries #------------------------------------------------------------ @@ -128,7 +128,7 @@ # partition size in blocks ? #>>>>0x22 ulelong x \b*%d -# Android sparse img format +# Android bootimg format # From https://android.googlesource.com/\ # platform/system/core/+/master/libsparse/sparse_format.h 0 lelong 0xed26ff3a Android sparse image diff --git a/contrib/file/magic/Magdir/animation b/contrib/file/magic/Magdir/animation index 51eeea2..0445adc 100644 --- a/contrib/file/magic/Magdir/animation +++ b/contrib/file/magic/Magdir/animation @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: animation,v 1.57 2015/11/29 22:11:07 christos Exp $ +# $File: animation,v 1.56 2014/10/23 23:12:51 christos Exp $ # animation: file(1) magic for animation/movie formats # # animation formats @@ -76,8 +76,6 @@ >8 string da2b \b, DMB MAF, ext da2a, with 3GPP timed text, DID, TVA, REL, IPMP >8 string da3a \b, DMB MAF aud with HE-AAC aud, JPG/PNG/MNG images >8 string da3b \b, DMB MAF, ext da3a w/ BIFS, 3GPP, DID, TVA, REL, IPMP ->8 string dash \b, MPEG v4 system, Dynamic Adaptive Streaming over HTTP -!:mime video/mp4 >8 string dmb1 \b, DMB MAF supporting all the components defined in the spec >8 string dmpf \b, Digital Media Project >8 string drc1 \b, Dirac (wavelet compression), encap in ISO base media (MP4) diff --git a/contrib/file/magic/Magdir/apple b/contrib/file/magic/Magdir/apple index 5db4fee..1418688 100644 --- a/contrib/file/magic/Magdir/apple +++ b/contrib/file/magic/Magdir/apple @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: apple,v 1.32 2015/12/04 20:40:10 christos Exp $ +# $File: apple,v 1.31 2015/08/29 07:10:35 christos Exp $ # apple: file(1) magic for Apple file formats # 0 search/1/t FiLeStArTfIlEsTaRt binscii (apple ][) text @@ -65,48 +65,18 @@ # Eric Fischer <enf@pobox.com> # AppleWorks word processor: -# URL: https://en.wikipedia.org/wiki/AppleWorks -# Reference: http://www.gno.org/pub/apple2/doc/apple/filetypes/ftn.1a.xxxx -# Update: Joerg Jenderek -# NOTE: +# +# This matches the standard tab stops for an AppleWorks file, but if +# a file has a tab stop set in the first four columns this will fail. +# # The "O" is really the magic number, but that's so common that it's # necessary to check the tab stops that follow it to avoid false positives. -# and/or look for unused bits of booleans bytes like zoom, paginated, mail merge -# the newer AppleWorks is from claris with extension CWK -4 string O -# test for unused bits of zoom- , paginated-boolean bytes ->84 ubequad ^0x00Fe00000000Fe00 -# look for tabstop definitions "=" no tab, "|" no tab -# "<" left tab,"^" center tab,">" right tab, "." decimal tab, -# unofficial "!" other , "\x8a" other -# official only if SFMinVers is nonzero ->>5 regex/s [=.<>|!^\x8a]{79} AppleWorks Word Processor -# AppleWorks Word Processor File (Apple II) -# ./apple (version 5.25) labeled the entry as "AppleWorks word processor data" -# application/x-appleworks is mime type for claris version with cwk extension -!:mime application/x-appleworks3 -# http://home.earthlink.net/~hughhood/appleiiworksenvoy/ -# ('p' + 1-byte ProDOS File Type + 2-byte ProDOS Aux Type') -# $70 $1A $F8 $FF is this the apple type ? -#:apple pdospøÿ -!:ext awp -# minimum version needed to read this files. SFMinVers (0 , 30~3.0 ) ->>>183 ubyte 30 3.0 ->>>183 ubyte !30 ->>>>183 ubyte !0 0x%x -# usual tabstop start sequence "=====<" ->>>5 string x \b, tabstop ruler "%6.6s" -# tabstop ruler -#>>>5 string >\0 \b, tabstops "%-79s" -# zoom switch ->>>85 byte&0x01 >0 \b, zoomed -# whether paginated ->>>90 byte&0x01 >0 \b, paginated -# contains any mail-merge commands ->>>92 byte&0x01 >0 \b, with mail merge -# left margin in 1/10 inches ( normally 0 or 10 ) ->>>91 ubyte >0 ->>>>91 ubyte x \b, %d/10 inch left margin + +4 string O==== AppleWorks word processor data +>85 byte&0x01 >0 \b, zoomed +>90 byte&0x01 >0 \b, paginated +>92 byte&0x01 >0 \b, with mail merge +#>91 byte x \b, left margin %d # AppleWorks database: # diff --git a/contrib/file/magic/Magdir/archive b/contrib/file/magic/Magdir/archive index db17ae1..f115e95 100644 --- a/contrib/file/magic/Magdir/archive +++ b/contrib/file/magic/Magdir/archive @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: archive,v 1.102 2016/01/11 20:59:24 christos Exp $ +# $File: archive,v 1.91 2015/09/16 13:49:33 christos Exp $ # archive: file(1) magic for archive formats (see also "msdos" for self- # extracting compressed archives) # @@ -246,15 +246,7 @@ # BA # TODO: idarc says "bytes 0-2 == bytes 3-5" # TTComp -# URL: http://fileformats.archiveteam.org/wiki/TTComp_archive -# Update: Joerg Jenderek -# GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others -0 string \0\6 -# look for first keyword of Panorama database *.pan ->12 search/261 DESIGN -# skip keyword with low entropy ->12 default x TTComp archive, binary, 4K dictionary -# (version 5.25) labeled the above entry as "TTComp archive data" +0 string \0\6 TTComp archive data # ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? 0 string ESP ESP archive data # ZPack @@ -552,212 +544,55 @@ >>0x36 string >\0 fstype %.8s # LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu) -# Update: Joerg Jenderek -# URL: https://en.wikipedia.org/wiki/LHA_(file_format) -# Reference: http://web.archive.org/web/20021005080911/http://www.osirusoft.com/joejared/lzhformat.html -# -# check and display information of lharc (LHa,PMarc) file -0 name lharc-file -# check 1st character of method id like -lz4- -lh5- or -pm2- ->2 string - -# check 5th character of method id ->>6 string - -# check header level 0 1 2 3 ->>>20 ubyte <4 -# check 2nd, 3th and 4th character of method id ->>>>3 regex \^(lh[0-9a-ex]|lz[s2-8]|pm[012]|pc1) \b -!:mime application/x-lzh-compressed -# creator type "LHA " -!:apple ????LHA -# display archive type name like "LHa/LZS archive data" or "LArc archive" ->>>>>2 string -lz \b -!:ext lzs -# already known -lzs- -lz4- -lz5- with old names ->>>>>>2 string -lzs LHa/LZS archive data ->>>>>>3 regex \^lz[45] LHarc 1.x archive data -# missing -lz?- with wikipedia names ->>>>>>3 regex \^lz[2378] LArc archive -# display archive type name like "LHa (2.x) archive data" ->>>>>2 string -lh \b -# already known -lh0- -lh1- -lh2- -lh3- -lh4- -lh5- -lh6- -lh7- -lhd- variants with old names ->>>>>>3 regex \^lh[01] LHarc 1.x/ARX archive data -# LHice archiver use ".ICE" as name extension instead usual one ".lzh" -# FOOBAR archiver use ".foo" as name extension instead usual one -# "Florain Orjanov's and Olga Bachetska's ARchiver" not found at the moment ->>>>>>>2 string -lh1 \b -!:ext lha/lzh/ice ->>>>>>3 regex \^lh[23d] LHa 2.x? archive data ->>>>>>3 regex \^lh[7] LHa (2.x)/LHark archive data ->>>>>>3 regex \^lh[456] LHa (2.x) archive data ->>>>>>>2 string -lh5 \b -# https://en.wikipedia.org/wiki/BIOS -# Some mainboard BIOS like Award use LHa compression. So archives with unusal extension are found like -# bios.rom , kd7_v14.bin, 1010.004, ... -!:ext lha/lzh/rom/bin -# missing -lh?- variants (Joe Jared) ->>>>>>3 regex \^lh[89a-ce] LHa (Joe Jared) archive -# UNLHA32 2.67a ->>>>>>2 string -lhx LHa (UNLHA32) archive -# lha archives with standard file name extensions ".lha" ".lzh" ->>>>>>3 regex !\^(lh1|lh5) \b -!:ext lha/lzh -# this should not happen if all -lh variants are described ->>>>>>2 default x LHa (unknown) archive -#!:ext lha -# PMarc ->>>>>3 regex \^pm[012] PMarc archive data -!:ext pma -# append method id without leading and trailing minus character ->>>>>3 string x [%3.3s] ->>>>>>0 use lharc-header -# -# check and display information of lharc header -0 name lharc-header -# header size 0x4 , 0x1b-0x61 ->0 ubyte x -# compressed data size != compressed file size -#>7 ulelong x \b, data size %d -# attribute: 0x2~?? 0x10~symlink|target 0x20~normal -#>19 ubyte x \b, 19_0x%x -# level identifier 0 1 2 3 -#>20 ubyte x \b, level %d -# time stamp -#>15 ubelong x DATE 0x%8.8x -# OS ID for level 1 ->20 ubyte 1 -# 0x20 types find for *.rom files ->>(21.b+24) ubyte <0x21 \b, 0x%x OS -# ascii type like M for MSDOS ->>(21.b+24) ubyte >0x20 \b, '%c' OS -# OS ID for level 2 ->20 ubyte 2 -#>>23 ubyte x \b, OS ID 0x%x ->>23 ubyte <0x21 \b, 0x%x OS ->>23 ubyte >0x20 \b, '%c' OS -# filename only for level 0 and 1 ->20 ubyte <2 -# length of filename ->>21 ubyte >0 \b, with -# filename ->>>21 pstring x "%s" -# -#2 string -lh0- LHarc 1.x/ARX archive data [lh0] -#!:mime application/x-lharc -2 string -lh0- ->0 use lharc-file -#2 string -lh1- LHarc 1.x/ARX archive data [lh1] -#!:mime application/x-lharc -2 string -lh1- ->0 use lharc-file -# NEW -lz2- ... -lz8- -2 string -lz2- ->0 use lharc-file -2 string -lz3- ->0 use lharc-file -2 string -lz4- ->0 use lharc-file -2 string -lz5- ->0 use lharc-file -2 string -lz7- ->0 use lharc-file -2 string -lz8- ->0 use lharc-file +2 string -lh0- LHarc 1.x/ARX archive data [lh0] +!:mime application/x-lharc +2 string -lh1- LHarc 1.x/ARX archive data [lh1] +!:mime application/x-lharc +2 string -lz4- LHarc 1.x archive data [lz4] +!:mime application/x-lharc +2 string -lz5- LHarc 1.x archive data [lz5] +!:mime application/x-lharc # [never seen any but the last; -lh4- reported in comp.compression:] -#2 string -lzs- LHa/LZS archive data [lzs] -2 string -lzs- ->0 use lharc-file -# According to wikipedia and others such a version does not exist -#2 string -lh\40- LHa 2.x? archive data [lh ] -#2 string -lhd- LHa 2.x? archive data [lhd] -2 string -lhd- ->0 use lharc-file -#2 string -lh2- LHa 2.x? archive data [lh2] -2 string -lh2- ->0 use lharc-file -#2 string -lh3- LHa 2.x? archive data [lh3] -2 string -lh3- ->0 use lharc-file -#2 string -lh4- LHa (2.x) archive data [lh4] -2 string -lh4- ->0 use lharc-file -#2 string -lh5- LHa (2.x) archive data [lh5] -2 string -lh5- ->0 use lharc-file -#2 string -lh6- LHa (2.x) archive data [lh6] -2 string -lh6- ->0 use lharc-file -#2 string -lh7- LHa (2.x)/LHark archive data [lh7] -2 string -lh7- -# !:mime application/x-lha -# >20 byte x - header level %d ->0 use lharc-file -# NEW -lh8- ... -lhe- , -lhx- -2 string -lh8- ->0 use lharc-file -2 string -lh9- ->0 use lharc-file -2 string -lha- ->0 use lharc-file -2 string -lhb- ->0 use lharc-file -2 string -lhc- ->0 use lharc-file -2 string -lhe- ->0 use lharc-file -2 string -lhx- ->0 use lharc-file +2 string -lzs- LHa/LZS archive data [lzs] +!:mime application/x-lha +2 string -lh\40- LHa 2.x? archive data [lh ] +!:mime application/x-lha +2 string -lhd- LHa 2.x? archive data [lhd] +!:mime application/x-lha +2 string -lh2- LHa 2.x? archive data [lh2] +!:mime application/x-lha +2 string -lh3- LHa 2.x? archive data [lh3] +!:mime application/x-lha +2 string -lh4- LHa (2.x) archive data [lh4] +!:mime application/x-lha +2 string -lh5- LHa (2.x) archive data [lh5] +!:mime application/x-lha +2 string -lh6- LHa (2.x) archive data [lh6] +!:mime application/x-lha +2 string -lh7- LHa (2.x)/LHark archive data [lh7] +!:mime application/x-lha +>20 byte x - header level %d # taken from idarc [JW] 2 string -lZ PUT archive data -# already done by LHarc magics -# this should never happen if all sub types of LZS archive are identified -#2 string -lz LZS archive data +2 string -lz LZS archive data 2 string -sw1- Swag archive data -0 name rar-file-header ->24 byte 15 \b, v1.5 ->24 byte 20 \b, v2.0 ->24 byte 29 \b, v4 ->15 byte 0 \b, os: MS-DOS ->15 byte 1 \b, os: OS/2 ->15 byte 2 \b, os: Win32 ->15 byte 3 \b, os: Unix ->15 byte 4 \b, os: Mac OS ->15 byte 5 \b, os: BeOS - -0 name rar-archive-header ->3 leshort&0x1ff >0 \b, flags: ->>3 leshort &0x01 ArchiveVolume ->>3 leshort &0x02 Commented ->>3 leshort &0x04 Locked ->>3 leshort &0x10 NewVolumeNaming ->>3 leshort &0x08 Solid ->>3 leshort &0x20 Authenticated ->>3 leshort &0x40 RecoveryRecordPresent ->>3 leshort &0x80 EncryptedBlockHeader ->>3 leshort &0x100 FirstVolume - -# RAR (Roshal Archive) archive -0 string Rar!\x1a\7\0 RAR archive data -!:mime application/x-rar -!:ext rar/cbr -# file header ->(0xc.l+9) byte 0x74 ->>(0xc.l+7) use rar-file-header -# subblock seems to share information with file header ->(0xc.l+9) byte 0x7a ->>(0xc.l+7) use rar-file-header ->9 byte 0x73 ->>7 use rar-archive-header - -0 string Rar!\x1a\7\1\0 RAR archive data, v5 -!:mime application/x-rar -!:ext rar - -# Very old RAR archive -# http://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf -0 string RE\x7e\x5e RAR archive data (<v1.5) +# RAR archiver (Greg Roelofs, newt@uchicago.edu) +0 string Rar! RAR archive data, !:mime application/x-rar -!:ext rar/cbr +>44 byte x v%0x, +>10 byte >0 flags: +>>10 byte &0x01 Archive volume, +>>10 byte &0x02 Commented, +>>10 byte &0x04 Locked, +>>10 byte &0x08 Solid, +>>10 byte &0x20 Authenticated, +>35 byte 0 os: MS-DOS +>35 byte 1 os: OS/2 +>35 byte 2 os: Win32 +>35 byte 3 os: Unix +# some old version? idarc says: +0 string RE\x7e\x5e RAR archive data # SQUISH archiver (Greg Roelofs, newt@uchicago.edu) 0 string SQSH squished archive data (Acorn RISCOS) @@ -769,12 +604,9 @@ # PKZIP multi-volume archive 0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract !:mime application/zip -!:ext zip/cbz # Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) 0 string PK\005\006 Zip archive data (empty) -!:mime application/zip -!:ext zip/cbz 0 string PK\003\004 # Specialised zip formats which start with a member named 'mimetype' @@ -932,24 +764,12 @@ 0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data # # PMA (CP/M derivative of LHA) -# Update: Joerg Jenderek -# URL: https://en.wikipedia.org/wiki/LHA_(file_format) # -#2 string -pm0- PMarc archive data [pm0] -2 string -pm0- ->0 use lharc-file -#2 string -pm1- PMarc archive data [pm1] -2 string -pm1- ->0 use lharc-file -#2 string -pm2- PMarc archive data [pm2] -2 string -pm2- ->0 use lharc-file +2 string -pm0- PMarc archive data [pm0] +2 string -pm1- PMarc archive data [pm1] +2 string -pm2- PMarc archive data [pm2] 2 string -pms- PMarc SFX archive (CP/M, DOS) -#!:mime application/x-foobar-exec -!:ext com 5 string -pc1- PopCom compressed executable (CP/M) -#!:mime application/x- -#!:ext com # From Rafael Laboissiere <rafael@laboissiere.net> # The Project Revision Control System (see @@ -982,9 +802,6 @@ # Felix von Leitner <felix-file@fefe.de> 0 string d8:announce BitTorrent file !:mime application/x-bittorrent -# Durval Menezes, <jmgthbfile at durval dot com> -0 string d13:announce-list BitTorrent file -!:mime application/x-bittorrent # Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi> 0 beshort 0x0e0f Atari MSA archive data @@ -1072,16 +889,19 @@ # From "Nelson A. de Oliveira" <naoliv@gmail.com> 0 string MPQ\032 MoPaQ (MPQ) archive +# From: Dirk Jagdmann <doj@cubic.org> +# xar archive format: http://code.google.com/p/xar/ +0 string xar! xar archive +>6 beshort x - version %d + # From: "Nelson A. de Oliveira" <naoliv@gmail.com> # .kgb 0 string KGB_arch KGB Archiver file >10 string x with compression level %.1s # xar (eXtensible ARchiver) archive -# xar archive format: http://code.google.com/p/xar/ # From: "David Remahl" <dremahl@apple.com> 0 string xar! xar archive -!:mime application/x-xar #>4 beshort x header size %d >6 beshort x version %d, #>8 quad x compressed TOC: %d, @@ -1155,9 +975,3 @@ >0xE08 search/7776 \x55\xAA >>&-512 indirect x \b; contains -# Google Chrome extensions -# https://developer.chrome.com/extensions/crx -# https://developer.chrome.com/extensions/hosting -0 string Cr24 Google Chrome extension -!:mime application/x-chrome-extension ->4 ulong x \b, version %u diff --git a/contrib/file/magic/Magdir/audio b/contrib/file/magic/Magdir/audio index 29442a5..e1d52c2 100644 --- a/contrib/file/magic/Magdir/audio +++ b/contrib/file/magic/Magdir/audio @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: audio,v 1.75 2016/02/08 17:30:11 christos Exp $ +# $File: audio,v 1.73 2015/03/15 23:21:42 christos Exp $ # audio: file(1) magic for sound formats (see also "iff") # # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com), @@ -585,7 +585,7 @@ 0 string SC68\ Music-file\ /\ (c)\ (BeN)jami sc68 Atari ST music # musepak support From: "Jiri Pejchal" <jiri.pejchal@gmail.com> -0 string MP+ Musepack audio (MP+) +0 string MP+ Musepack audio !:mime audio/x-musepack >3 byte 255 \b, SV pre8 >3 byte&0xF 0x6 \b, SV 6 @@ -619,9 +619,6 @@ >>27 byte 114 \b, Beta 1.14 >>27 byte 115 \b, Alpha 1.15 -0 string MPCK Musepack audio (MPCK) -!:mime audio/x-musepack - # IMY # from http://filext.com/detaillist.php?extdetail=IMY # http://cellphones.about.com/od/cellularfaqs/f/rf_imelody.htm @@ -718,41 +715,3 @@ 0 string ZBOT >4 byte 0xc5 GVOX Encore music, version < 5.0 -# Summary: Garmin Voice Processing Module (WAVE audios) -# From: Joerg Jenderek -# URL: http://www.garmin.com/ -# Reference: http://turboccc.wikispaces.com/share/view/28622555 -# NOTE: there exist 2 other Garmin VPM formats -0 string AUDIMG -# skip text files starting with string "AUDIMG" ->13 ubyte <13 Garmin Voice Processing Module -!:mime audio/x-vpm-wav-garmin -!:ext vpm -# 3 bytes indicating the voice version (200,220) ->>6 string x \b, version %3.3s -# day of release (01-31) ->>12 ubyte x \b, %.2d -# month of release (01-12) ->>13 ubyte x \b.%.2d -# year of release (like 2006, 2007, 2008) ->>14 uleshort x \b.%.4d -# hour of release (0-23) ->>11 ubyte x %.2d -# minute of release (0-59) ->>10 ubyte x \b:%.2d -# second of release (0-59) ->>9 ubyte x \b:%.2d -# if you select a language like german on your garmin device -# you can only select voice modules with correponding language byte ID like 1 ->>18 ubyte x \b, language ID %d -# pointer to 1st audio WAV sample ->>16 uleshort >0 ->>>(16.s) ulelong >0 \b, at offset 0x%x -# WAV length ->>>>(16.s+4) ulelong >0 %d Bytes -# look for magic ->>>>>(&-8.l) string RIFF -# determine type by ./riff ->>>>>>&-4 indirect x \b -# 2 - ~ 131 WAV samples following same way - diff --git a/contrib/file/magic/Magdir/bioinformatics b/contrib/file/magic/Magdir/bioinformatics deleted file mode 100644 index 7de08a1..0000000 --- a/contrib/file/magic/Magdir/bioinformatics +++ /dev/null @@ -1,178 +0,0 @@ - -#------------------------------------------------------------------------------ -# $File: bioinformatics,v 1.2 2016/02/14 15:53:53 christos Exp $ -# bioinfomatics: file(1) magic for Bioinfomatics file formats - -############################################################################### -# BGZF (Blocked GNU Zip Format) - gzip compatible, but also indexable -# used by SAMtools bgzip/tabix (http://samtools.sourceforge.net/tabix.shtml) -############################################################################### -0 string \037\213 ->3 byte &0x04 ->>12 string BC ->>>14 leshort &0x02 Blocked GNU Zip Format (BGZF; gzip compatible) ->>>>16 leshort x \b, block length %d -!:mime application/x-gzip - - -############################################################################### -# Tabix index file -# used by SAMtools bgzip/tabix (http://samtools.sourceforge.net/tabix.shtml) -############################################################################### -0 string TBI\1 SAMtools TBI (Tabix index format) ->0x04 lelong =1 \b, with %d reference sequence ->0x04 lelong >1 \b, with %d reference sequences ->0x08 lelong &0x10000 \b, using half-closed-half-open coordinates (BED style) ->0x08 lelong ^0x10000 ->>0x08 lelong =0 \b, using closed and one based coordinates (GFF style) ->>0x08 lelong =1 \b, using SAM format ->>0x08 lelong =2 \b, using VCF format ->0x0c lelong x \b, sequence name column: %d ->0x10 lelong x \b, region start column: %d ->0x08 lelong =0 ->>0x14 lelong x \b, region end column: %d ->0x18 byte x \b, comment character: %c ->0x1c lelong x \b, skip line count: %d - - -############################################################################### -# BAM (Binary Sequence Alignment/Map format) -# used by SAMtools (http://samtools.sourceforge.net/SAM1.pdf) -# data is normally present only within compressed BGZF blocks (CDATA), so use file -z to examine it -############################################################################### -0 string BAM\1 SAMtools BAM (Binary Sequence Alignment/Map) ->0x04 lelong >0 ->>&0x00 regex =^[@]HD\t.*VN: \b, with SAM header ->>>&0 regex =[0-9.]+ \b version %s ->>&(0x04) lelong >0 \b, with %d reference sequences - - -############################################################################### -# BAI (BAM indexing format) -# used by SAMtools (http://samtools.sourceforge.net/SAM1.pdf) -############################################################################### -0 string BAI\1 SAMtools BAI (BAM indexing format) ->0x04 lelong >0 \b, with %d reference sequences - - -############################################################################### -# CRAM (Binary Sequence Alignment/Map format) -############################################################################### -0 string CRAM CRAM ->0x04 byte >-1 version %d. ->0x05 byte >-1 \b%d ->0x06 string >\0 (identified as %s) - - -############################################################################### -# BCF (Binary Call Format), version 1 -# used by SAMtools & VCFtools (http://vcftools.sourceforge.net/bcf.pdf) -# data is normally present only within compressed BGZF blocks (CDATA), so use file -z to examine it -############################################################################### -0 string BCF\4 -# length of seqnm data in bytes is positive ->&0x00 lelong >0 -# length of smpl data in bytes is positive ->>&(&-0x04) lelong >0 SAMtools BCF (Binary Call Format) -# length of meta in bytes ->>>&(&-0x04) lelong >0 -# have meta text string ->>>>&0x00 search ##samtoolsVersion= ->>>>>&0x00 string x \b, generated by SAMtools version %s - - -############################################################################### -# BCF (Binary Call Format), version 2.1 -# used by SAMtools (http://samtools.github.io/hts-specs/BCFv2_qref.pdf) -# data is normally present only within compressed BGZF blocks (CDATA), so use file -z to examine it -############################################################################### -0 string BCF\2\1 Binary Call Format (BCF) version 2.1 -# length of header text ->&0x00 lelong >0 -# have header string ->>&0x00 search ##samtoolsVersion= ->>>&0x00 string x \b, generated by SAMtools version %s - - -############################################################################### -# BCF (Binary Call Format), version 2.2 -# used by SAMtools (http://samtools.github.io/hts-specs/BCFv2_qref.pdf) -# data is normally present only within compressed BGZF blocks (CDATA), so use file -z to examine it -############################################################################### -0 string BCF\2\2 Binary Call Format (BCF) version 2.2 -# length of header text ->&0x00 lelong >0 -# have header string ->>&0x00 search ##samtoolsVersion= ->>>&0x00 string x \b, generated by SAMtools version %s - -############################################################################### -# VCF (Variant Call Format) -# used by VCFtools (http://vcftools.sourceforge.net/) -############################################################################### -0 search ##fileformat=VCFv Variant Call Format (VCF) ->&0 string x \b version %s - -############################################################################### -# FASTQ -# used by MAQ (http://maq.sourceforge.net/fastq.shtml) -############################################################################### -# XXX Broken? -# @<seqname> -#0 regex =^@[A-Za-z0-9_.:-]+\?\n -# <seq> -#>&1 regex =^[A-Za-z\n.~]++ -# +[<seqname>] -#>>&1 regex =^[A-Za-z0-9_.:-]*\?\n -# <qual> -#>>>&1 regex =^[!-~\n]+\n FASTQ - -############################################################################### -# FASTA -# used by FASTA (http://fasta.bioch.virginia.edu/fasta_www2/fasta_guide.pdf) -############################################################################### -#0 byte 0x3e -# q>0 regex =^[>][!-~\t\ ]+$ -# Amino Acid codes: [A-IK-Z*-]+ -#>>1 regex !=[!-'Jj;:=?@^`|~\\] FASTA -# IUPAC codes/gaps: [ACGTURYKMSWBDHVNX-]+ -# not in IUPAC codes/gaps: [EFIJLOPQZ] -#>>>1 regex !=[EFIJLOPQZefijlopqz] \b, with IUPAC nucleotide codes -#>>>1 regex =^[EFIJLOPQZefijlopqz]+$ \b, with Amino Acid codes - -############################################################################### -# SAM (Sequence Alignment/Map format) -# used by SAMtools (http://samtools.sourceforge.net/SAM1.pdf) -############################################################################### -# Short-cut version to recognise SAM files with (optional) header at beginning -############################################################################### -0 string @HD\t ->4 search VN: Sequence Alignment/Map (SAM), with header ->>&0 regex [0-9.]+ \b version %s -############################################################################### -# Longer version to recognise SAM alignment lines using (many) regexes -############################################################################### -# SAM Alignment QNAME -0 regex =^[!-?A-~]{1,255}(\t[^\t]+){11} -# SAM Alignment FLAG ->0 regex =^([^\t]+\t){1}[0-9]{1,5}\t -# SAM Alignment RNAME ->>0 regex =^([^\t]+\t){2}\\*|[^*=]*\t -# SAM Alignment POS ->>>0 regex =^([^\t]+\t){3}[0-9]{1,9}\t -# SAM Alignment MAPQ ->>>>0 regex =^([^\t]+\t){4}[0-9]{1,3}\t -# SAM Alignment CIGAR ->>>>>0 regex =\t\\*|([0-9]+[MIDNSHPX=])+)\t -# SAM Alignment RNEXT ->>>>>>0 regex =\t(\\*|=|[!-()+->?-~][!-~]*)\t -# SAM Alignment PNEXT ->>>>>>>0 regex =^([^\t]+\t){7}[0-9]{1,9}\t -# SAM Alignment TLEN ->>>>>>>>0 regex =\t[+-]{0,1}[0-9]{1,9}\t.*\t -# SAM Alignment SEQ ->>>>>>>>>0 regex =^([^\t]+\t){9}(\\*|[A-Za-z=.]+)\t -# SAM Alignment QUAL ->>>>>>>>>>0 regex =^([^\t]+\t){10}[!-~]+ Sequence Alignment/Map (SAM) ->>>>>>>>>>>0 regex =^[@]HD\t.*VN: \b, with header ->>>>>>>>>>>>&0 regex =[0-9.]+ \b version %s diff --git a/contrib/file/magic/Magdir/c-lang b/contrib/file/magic/Magdir/c-lang index 69ae516..0b17611 100644 --- a/contrib/file/magic/Magdir/c-lang +++ b/contrib/file/magic/Magdir/c-lang @@ -1,8 +1,7 @@ #------------------------------------------------------------------------------ -# $File: c-lang,v 1.22 2015/10/29 18:49:11 christos Exp $ +# $File: c-lang,v 1.20 2015/07/27 14:33:10 christos Exp $ # c-lang: file(1) magic for C and related languages programs # -# The strength is to beat standard HTML # BCPL 0 search/8192 "libhdr" BCPL source text @@ -12,7 +11,6 @@ # C 0 regex \^#include C source text -!:strength +25 !:mime text/x-c 0 regex \^char[\ \t\n]+ C source text !:mime text/x-c @@ -32,19 +30,19 @@ # C++ # The strength of these rules is increased so they beat the C rules above 0 regex \^template[\ \t]+<.*>[\ \t\n]+ C++ source text -!:strength + 30 +!:strength + 5 !:mime text/x-c++ 0 regex \^virtual[\ \t\n]+ C++ source text -!:strength + 30 +!:strength + 5 !:mime text/x-c++ 0 regex \^class[\ \t\n]+ C++ source text -!:strength + 30 +!:strength + 5 !:mime text/x-c++ 0 regex \^public: C++ source text -!:strength + 30 +!:strength + 5 !:mime text/x-c++ 0 regex \^private: C++ source text -!:strength + 30 +!:strength + 5 !:mime text/x-c++ # From: Mikhail Teterin <mi@aldan.algebra.com> diff --git a/contrib/file/magic/Magdir/cafebabe b/contrib/file/magic/Magdir/cafebabe index 6d97ceb..51e97c4 100644 --- a/contrib/file/magic/Magdir/cafebabe +++ b/contrib/file/magic/Magdir/cafebabe @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: cafebabe,v 1.21 2015/10/15 20:56:51 christos Exp $ +# $File: cafebabe,v 1.20 2015/05/29 14:21:58 christos Exp $ # Cafe Babes unite! # # Since Java bytecode and Mach-O universal binaries have the same magic number, @@ -58,15 +58,12 @@ >>4 belong <20 Mach-O universal binary with %d architectures: !:mime application/x-mach-binary >>>8 use mach-o \b ->>4 belong 2 >>>28 use mach-o \b ->>4 belong 3 +>>4 belong 2 >>>48 use mach-o \b ->>4 belong 4 +>>4 belong 3 >>>68 use mach-o \b ->>4 belong 5 +>>4 belong 4 >>>88 use mach-o \b ->>4 belong 6 ->>>108 use mach-o \b ### MACH-O END ### diff --git a/contrib/file/magic/Magdir/coff b/contrib/file/magic/Magdir/coff deleted file mode 100644 index 02cbf9c..0000000 --- a/contrib/file/magic/Magdir/coff +++ /dev/null @@ -1,77 +0,0 @@ - -#------------------------------------------------------------------------------ -# $File: coff,v 1.1 2015/09/30 20:32:35 christos Exp $ -# coff: file(1) magic for Common Object Files not specific to known cpu types or manufactures -# -# COFF -# -# by Joerg Jenderek at Oct 2015 -# https://en.wikipedia.org/wiki/COFF -# https://de.wikipedia.org/wiki/Common_Object_File_Format -# http://www.delorie.com/djgpp/doc/coff/filhdr.html - -# display name+variables+flags of Common Object Files Format (32bit) -# Maybe used also in adi,att3b,clipper,hitachi-sh,hp,ibm6000,intel, -# mips,motorola,msdos,osf1,sharc,varied.out,vax -0 name display-coff -# test for unused flag bits (0x8000,0x0800,0x0400,0x0200,x0080) in f_flags ->18 uleshort&0x8E80 0 ->>0 clear x -# f_magic - magic number -# DJGPP, 80386 COFF executable, MS Windows COFF Intel 80386 object file (./intel) ->>0 uleshort 0x014C Intel 80386 -# Hitachi SH big-endian COFF (./hitachi-sh) ->>0 uleshort 0x0500 Hitachi SH big-endian -# Hitachi SH little-endian COFF (./hitachi-sh) ->>0 uleshort 0x0550 Hitachi SH little-endian -# executable (RISC System/6000 V3.1) or obj module (./ibm6000) -#>>0 uleshort 0x01DF -# TODO for other COFFs -#>>0 uleshort 0xABCD COFF_TEMPLATE ->>0 default x ->>>0 uleshort x type 0x%04x ->>0 uleshort x COFF -# F_EXEC flag bit ->>18 leshort ^0x0002 object file -#!:mime application/x-coff -#!:ext cof/o/obj/lib ->>18 leshort &0x0002 executable -#!:mime application/x-coffexec -# F_RELFLG flag bit,static object ->>18 leshort &0x0001 \b, no relocation info -# F_LNNO flag bit ->>18 leshort &0x0004 \b, no line number info -# F_LSYMS flag bit ->>18 leshort &0x0008 \b, stripped ->>18 leshort ^0x0008 \b, not stripped -# flags in other COFF versions -#0x0010 F_FDPR_PROF -#0x0020 F_FDPR_OPTI -#0x0040 F_DSA -# F_AR32WR flag bit -#>>>18 leshort &0x0100 \b, 32 bit little endian -#0x1000 F_DYNLOAD -#0x2000 F_SHROBJ -#0x4000 F_LOADONLY -# f_nscns - number of sections ->>2 uleshort <2 \b, %d section ->>2 uleshort >1 \b, %d sections -# f_timdat - file time & date stamp only for little endian -#>>4 date x \b, %s -# f_symptr - symbol table pointer, only for not stripped ->>8 ulelong >0 \b, symbol offset=0x%x -# f_nsyms - number of symbols, only for not stripped ->>12 ulelong >0 \b, %d symbols -# f_opthdr - optional header size ->>16 uleshort >0 \b, optional header size %d -# at offset 20 can be optional header, extra bytes FILHSZ-20 because -# do not rely on sizeof(FILHDR) to give the correct size for header. -# or first section header -# additional variables for other COFF files -# >20 beshort 0407 (impure) -# >20 beshort 0410 (pure) -# >20 beshort 0413 (demand paged) -# >20 beshort 0421 (standalone) -# >22 leshort >0 - version %d -# >168 string .lowmem Apple toolbox - diff --git a/contrib/file/magic/Magdir/commands b/contrib/file/magic/Magdir/commands index 51067aa..153af5e 100644 --- a/contrib/file/magic/Magdir/commands +++ b/contrib/file/magic/Magdir/commands @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: commands,v 1.53 2016/02/23 12:35:20 christos Exp $ +# $File: commands,v 1.52 2015/06/04 19:16:55 christos Exp $ # commands: file(1) magic for various shells and interpreters # #0 string/w : shell archive or script for antique kernel text @@ -98,9 +98,7 @@ !:mime text/x-php # Smarty compiled template, http://www.smarty.net/ # Elan Ruusamae <glen@delfi.ee> -0 string =<?php ->5 regex [\ \n] ->>6 string /*\ Smarty\ version Smarty compiled template +0 string =<?php\ /*\ Smarty\ version Smarty compiled template >24 regex [0-9.]+ \b, version %s !:mime text/x-php diff --git a/contrib/file/magic/Magdir/compress b/contrib/file/magic/Magdir/compress index 910545a..8452f52 100644 --- a/contrib/file/magic/Magdir/compress +++ b/contrib/file/magic/Magdir/compress @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: compress,v 1.65 2015/12/04 20:48:03 christos Exp $ +# $File: compress,v 1.64 2015/07/27 15:41:09 christos Exp $ # compress: file(1) magic for pure-compression formats (no archives) # # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. @@ -188,7 +188,6 @@ >6 byte x version %d >7 byte x \b.%d !:mime application/x-7z-compressed -!:ext 7z/cb7 # Type: LZMA 0 lelong&0xffffff =0x5d diff --git a/contrib/file/magic/Magdir/console b/contrib/file/magic/Magdir/console index db6916a..9dee3ff 100644 --- a/contrib/file/magic/Magdir/console +++ b/contrib/file/magic/Magdir/console @@ -1,109 +1,53 @@ #------------------------------------------------------------------------------ -# $File: console,v 1.24 2016/03/23 15:29:20 christos Exp $ +# $File: console,v 1.20 2015/03/15 23:21:42 christos Exp $ # Console game magic # Toby Deshane <hac@shoelace.digivill.net> - -# ines: file(1) magic for Marat's iNES Nintendo Entertainment System ROM dump format -# Updated by David Korth <gerbilsoft@gerbilsoft.com> -# References: -# - http://wiki.nesdev.com/w/index.php/INES -# - http://wiki.nesdev.com/w/index.php/NES_2.0 -0 string NES\x1A iNES ROM image ->7 byte&0x0C =0x8 (NES 2.0) ->4 byte x \b: %ux16k PRG ->5 byte x \b, %ux16k CHR ->6 byte&0x08 =0x8 [4-Scr] ->6 byte&0x09 =0x0 [H-mirror] ->6 byte&0x09 =0x1 [V-mirror] ->6 byte&0x02 =0x2 [SRAM] ->6 byte&0x04 =0x4 [Trainer] ->7 byte&0x03 =0x2 [PC10] ->7 byte&0x03 =0x1 [VS ->>7 byte&0x0C =0x8 -# NES 2.0: VS PPU ->>>13 byte&0x0F =0x0 \b, RP2C03B ->>>13 byte&0x0F =0x1 \b, RP2C03G ->>>13 byte&0x0F =0x2 \b, RP2C04-0001 ->>>13 byte&0x0F =0x3 \b, RP2C04-0002 ->>>13 byte&0x0F =0x4 \b, RP2C04-0003 ->>>13 byte&0x0F =0x5 \b, RP2C04-0004 ->>>13 byte&0x0F =0x6 \b, RP2C03B ->>>13 byte&0x0F =0x7 \b, RP2C03C ->>>13 byte&0x0F =0x8 \b, RP2C05-01 ->>>13 byte&0x0F =0x9 \b, RP2C05-02 ->>>13 byte&0x0F =0xA \b, RP2C05-03 ->>>13 byte&0x0F =0xB \b, RP2C05-04 ->>>13 byte&0x0F =0xC \b, RP2C05-05 -# TODO: VS protection hardware? ->>7 byte x \b] -# NES 2.0-specific flags. ->7 byte&0x0C =0x8 ->>12 byte&0x03 =0x0 [NTSC] ->>12 byte&0x03 =0x1 [PAL] ->>12 byte&0x02 =0x2 [NTSC+PAL] - -#------------------------------------------------------------------------------ -# unif: file(1) magic for UNIF-format Nintendo Entertainment System ROM images -# Reference: http://wiki.nesdev.com/w/index.php/UNIF -# From: David Korth <gerbilsoft@gerbilsoft.com> -# TODO commit on 2016/03/21 -# -# NOTE: The UNIF format uses chunks instead of a fixed header, -# so most of the data isn't easily parseable. -# -0 string UNIF -4 lelong <16 UNIF v%d format NES ROM image +# ines: file(1) magic for Marat's iNES Nintendo Entertainment System +# ROM dump format + +0 string NES\032 iNES ROM dump, +>4 byte x %dx16k PRG +>5 byte x \b, %dx8k CHR +>6 byte&0x01 =0x1 \b, [Vert.] +>6 byte&0x01 =0x0 \b, [Horiz.] +>6 byte&0x02 =0x2 \b, [SRAM] +>6 byte&0x04 =0x4 \b, [Trainer] +>6 byte&0x04 =0x8 \b, [4-Scr] #------------------------------------------------------------------------------ -# gameboy: file(1) magic for the Nintendo (Color) Gameboy raw ROM format -# Reference: http://gbdev.gg8.se/wiki/articles/The_Cartridge_Header +# gameboy: file(1) magic for the Nintendo (Color) Gameboy raw ROM format # -0x104 bequad 0xCEED6666CC0D000B Game Boy ROM image ->0x143 byte&0x80 0x80 ->>0x134 string >\0 \b: "%.15s" ->0x143 byte&0x80 !0x80 ->>0x134 string >\0 \b: "%.16s" ->0x14c byte x (Rev.%02u) +0x104 belong 0xCEED6666 Gameboy ROM: +>0x134 string >\0 "%.16s" +>0x146 byte 0x03 \b,[SGB] +>0x147 byte 0x00 \b, [ROM ONLY] +>0x147 byte 0x01 \b, [ROM+MBC1] +>0x147 byte 0x02 \b, [ROM+MBC1+RAM] +>0x147 byte 0x03 \b, [ROM+MBC1+RAM+BATT] +>0x147 byte 0x05 \b, [ROM+MBC2] +>0x147 byte 0x06 \b, [ROM+MBC2+BATTERY] +>0x147 byte 0x08 \b, [ROM+RAM] +>0x147 byte 0x09 \b, [ROM+RAM+BATTERY] +>0x147 byte 0x0B \b, [ROM+MMM01] +>0x147 byte 0x0C \b, [ROM+MMM01+SRAM] +>0x147 byte 0x0D \b, [ROM+MMM01+SRAM+BATT] +>0x147 byte 0x0F \b, [ROM+MBC3+TIMER+BATT] +>0x147 byte 0x10 \b, [ROM+MBC3+TIMER+RAM+BATT] +>0x147 byte 0x11 \b, [ROM+MBC3] +>0x147 byte 0x12 \b, [ROM+MBC3+RAM] +>0x147 byte 0x13 \b, [ROM+MBC3+RAM+BATT] +>0x147 byte 0x19 \b, [ROM+MBC5] +>0x147 byte 0x1A \b, [ROM+MBC5+RAM] +>0x147 byte 0x1B \b, [ROM+MBC5+RAM+BATT] +>0x147 byte 0x1C \b, [ROM+MBC5+RUMBLE] +>0x147 byte 0x1D \b, [ROM+MBC5+RUMBLE+SRAM] +>0x147 byte 0x1E \b, [ROM+MBC5+RUMBLE+SRAM+BATT] +>0x147 byte 0x1F \b, [Pocket Camera] +>0x147 byte 0xFD \b, [Bandai TAMA5] +>0x147 byte 0xFE \b, [Hudson HuC-3] +>0x147 byte 0xFF \b, [Hudson HuC-1] -# Machine type. (SGB, CGB, SGB+CGB) ->0x14b byte 0x33 ->>0x146 byte 0x03 ->>>0x143 byte&0x80 0x80 [SGB+CGB] ->>>0x143 byte&0x80 !0x80 [SGB] ->>0x146 byte !0x03 ->>>0x143 byte&0xC0 0x80 [CGB] ->>>0x143 byte&0xC0 0xC0 [CGB ONLY] - -# Mapper. ->0x147 byte 0x00 [ROM ONLY] ->0x147 byte 0x01 [MBC1] ->0x147 byte 0x02 [MBC1+RAM] ->0x147 byte 0x03 [MBC1+RAM+BATT] ->0x147 byte 0x05 [MBC2] ->0x147 byte 0x06 [MBC2+BATTERY] ->0x147 byte 0x08 [ROM+RAM] ->0x147 byte 0x09 [ROM+RAM+BATTERY] ->0x147 byte 0x0B [MMM01] ->0x147 byte 0x0C [MMM01+SRAM] ->0x147 byte 0x0D [MMM01+SRAM+BATT] ->0x147 byte 0x0F [MBC3+TIMER+BATT] ->0x147 byte 0x10 [MBC3+TIMER+RAM+BATT] ->0x147 byte 0x11 [MBC3] ->0x147 byte 0x12 [MBC3+RAM] ->0x147 byte 0x13 [MBC3+RAM+BATT] ->0x147 byte 0x19 [MBC5] ->0x147 byte 0x1A [MBC5+RAM] ->0x147 byte 0x1B [MBC5+RAM+BATT] ->0x147 byte 0x1C [MBC5+RUMBLE] ->0x147 byte 0x1D [MBC5+RUMBLE+SRAM] ->0x147 byte 0x1E [MBC5+RUMBLE+SRAM+BATT] ->0x147 byte 0xFC [Pocket Camera] ->0x147 byte 0xFD [Bandai TAMA5] ->0x147 byte 0xFE [Hudson HuC-3] ->0x147 byte 0xFF [Hudson HuC-1] - -# ROM size. >0x148 byte 0 \b, ROM: 256Kbit >0x148 byte 1 \b, ROM: 512Kbit >0x148 byte 2 \b, ROM: 1Mbit @@ -111,198 +55,58 @@ >0x148 byte 4 \b, ROM: 4Mbit >0x148 byte 5 \b, ROM: 8Mbit >0x148 byte 6 \b, ROM: 16Mbit ->0x148 byte 7 \b, ROM: 32Mbit >0x148 byte 0x52 \b, ROM: 9Mbit >0x148 byte 0x53 \b, ROM: 10Mbit >0x148 byte 0x54 \b, ROM: 12Mbit -# RAM size. >0x149 byte 1 \b, RAM: 16Kbit >0x149 byte 2 \b, RAM: 64Kbit >0x149 byte 3 \b, RAM: 128Kbit >0x149 byte 4 \b, RAM: 1Mbit ->0x149 byte 5 \b, RAM: 512Kbit -#------------------------------------------------------------------------------ -# genesis: file(1) magic for various Sega Mega Drive / Genesis ROM image and disc formats -# Updated by David Korth <gerbilsoft@gerbilsoft.com> -# References: -# - http://www.retrodev.com/segacd.html -# - http://devster.monkeeh.com/sega/32xguide1.txt -# - -# Common Sega Mega Drive header format. -# FIXME: Name fields are 48 bytes, but have spaces for padding instead of 00s. -0 name sega-mega-drive-header -# ROM title. (Use domestic if present; if not, use international.) ->0x120 byte >0x20 ->>0x120 string >\0 \b: "%.16s" ->0x120 byte <0x21 ->>0x150 string >\0 \b: "%.16s" -# Other information. ->0x180 string >\0 (%.14s ->>0x110 string >\0 \b, %.16s ->0x180 byte 0 ->>0x110 string >\0 (%.16s ->0 byte x \b) - -# TODO: Check for 32X CD? -# Sega Mega CD disc images: 2048-byte sectors. -0 string SEGADISCSYSTEM\ \ Sega Mega CD disc image ->0 use sega-mega-drive-header ->0 byte x \b, 2048-byte sectors -0 string SEGABOOTDISC\ \ \ \ Sega Mega CD disc image ->0 use sega-mega-drive-header ->0 byte x \b, 2048-byte sectors -# Sega Mega CD disc images: 2352-byte sectors. -0x10 string SEGADISCSYSTEM\ \ Sega Mega CD disc image ->0x10 use sega-mega-drive-header ->0 byte x \b, 2352-byte sectors -0x10 string SEGABOOTDISC\ \ \ \ Sega Mega CD disc image ->0x10 use sega-mega-drive-header ->0 byte x \b, 2352-byte sectors - -# Sega Mega Drive, 32X, Pico, and Mega CD Boot ROM images. -0x100 string SEGA ->0x3C0 bequad 0x4D41525320434845 Sega 32X ROM image ->>0 use sega-mega-drive-header ->0x3C0 bequad !0x4D41525320434845 ->>0x105 belong 0x5049434F Sega Pico ROM image ->>>0 use sega-mega-drive-header ->>0x105 belong !0x5049434F ->>>0x180 beshort 0x4252 Sega Mega CD Boot ROM image ->>>0x180 beshort !0x4252 Sega Mega Drive / Genesis ROM image ->>>0 use sega-mega-drive-header +#>0x14e long x \b, CRC: %x #------------------------------------------------------------------------------ -# genesis: file(1) magic for the Super MegaDrive ROM dump format +# genesis: file(1) magic for the Sega MegaDrive/Genesis raw ROM format # - -# NOTE: Due to interleaving, we can't display anything -# other than the copier header information. -0 name sega-genesis-smd-header ->0 byte x %dx16k blocks ->2 byte 0 \b, last in series or standalone ->2 byte >0 \b, split ROM - -# "Sega Genesis" header. -0x280 string EAGN ->8 beshort 0xAABB Sega Mega Drive / Genesis ROM image (SMD format): ->>0 use sega-genesis-smd-header - -# "Sega Mega Drive" header. -0x280 string EAMG ->8 beshort 0xAABB Sega Mega Drive / Genesis ROM image (SMD format): ->>0 use sega-genesis-smd-header +0x100 string SEGA Sega MegaDrive/Genesis raw ROM dump +>0x120 string >\0 Name: "%.16s" +>0x110 string >\0 %.16s +>0x1B0 string RA with SRAM #------------------------------------------------------------------------------ -# smsgg: file(1) magic for Sega Master System and Game Gear ROM images -# Detects all Game Gear and export Sega Master System ROM images, -# and some Japanese Sega Master System ROM images. -# From: David Korth <gerbilsoft@gerbilsoft.com> -# Reference: http://www.smspower.org/Development/ROMHeader +# genesis: file(1) magic for the Super MegaDrive ROM dump format # - -# General SMS header rule. -# The SMS boot ROM checks the header at three locations. -0 name sega-master-system-rom-header -# Machine type. ->0x0F byte&0xF0 0x30 Sega Master System ->0x0F byte&0xF0 0x40 Sega Master System ->0x0F byte&0xF0 0x50 Sega Game Gear ->0x0F byte&0xF0 0x60 Sega Game Gear ->0x0F byte&0xF0 0x70 Sega Game Gear ->0x0F byte&0xF0 <0x30 Sega Master System / Game Gear ->0x0F byte&0xF0 >0x70 Sega Master System / Game Gear ->0 byte x ROM image: -# Product code. ->0x0E byte&0xF0 0x10 1 ->0x0E byte&0xF0 0x20 2 ->0x0E byte&0xF0 0x30 3 ->0x0E byte&0xF0 0x40 4 ->0x0E byte&0xF0 0x50 5 ->0x0E byte&0xF0 0x60 6 ->0x0E byte&0xF0 0x70 7 ->0x0E byte&0xF0 0x80 8 ->0x0E byte&0xF0 0x90 9 ->0x0E byte&0xF0 0xA0 10 ->0x0E byte&0xF0 0xB0 11 ->0x0E byte&0xF0 0xC0 12 ->0x0E byte&0xF0 0xD0 13 ->0x0E byte&0xF0 0xE0 14 ->0x0E byte&0xF0 0xF0 15 -# If the product code is 5 digits, we'll need to backspace here. ->0x0E byte&0xF0 !0 ->>0x0C leshort x \b%04x ->0x0E byte&0xF0 0 ->>0x0C leshort x %04x -# Revision. ->0x0E byte&0x0F x (Rev.%02d) -# ROM size. (Used for the boot ROM checksum routine.) ->0x0F byte&0x0F 0x0A (8 KB) ->0x0F byte&0x0F 0x0B (16 KB) ->0x0F byte&0x0F 0x0C (32 KB) ->0x0F byte&0x0F 0x0D (48 KB) ->0x0F byte&0x0F 0x0E (64 KB) ->0x0F byte&0x0F 0x0F (128 KB) ->0x0F byte&0x0F 0x00 (256 KB) ->0x0F byte&0x0F 0x01 (512 KB) ->0x0F byte&0x0F 0x02 (1 MB) - -# SMS/GG header locations. -0x7FF0 string TMR\ SEGA ->0x7FF0 use sega-master-system-rom-header -0x3FF0 string TMR\ SEGA ->0x3FF0 use sega-master-system-rom-header -0x1FF0 string TMR\ SEGA ->0x1FF0 use sega-master-system-rom-header +0x280 string EAGN Super MagicDrive ROM dump +>0 byte x %dx16k blocks +>2 byte 0 \b, last in series or standalone +>2 byte >0 \b, split ROM +>8 byte 0xAA +>9 byte 0xBB #------------------------------------------------------------------------------ -# saturn: file(1) magic for the Sega Saturn disc image format. -# From: David Korth <gerbilsoft@gerbilsoft.com> +# genesis: file(1) alternate magic for the Super MegaDrive ROM dump format # - -# Common Sega Saturn disc header format. -# NOTE: Title is 112 bytes, but we're only showing 32 due to space padding. -# TODO: Release date, device information, region code, others? -0 name sega-saturn-disc-header ->0x60 string >\0 \b: "%.32s" ->0x20 string >\0 (%.10s ->>0x2A string >\0 \b, %.6s) ->>0x2A byte 0 \b) - -# 2048-byte sector version. -0 string SEGA\ SEGASATURN\ Sega Saturn disc image ->0 use sega-saturn-disc-header ->0 byte x (2048-byte sectors) -# 2352-byte sector version. -0x10 string SEGA\ SEGASATURN\ Sega Saturn disc image ->0x10 use sega-saturn-disc-header ->0 byte x (2352-byte sectors) +0x280 string EAMG Super MagicDrive ROM dump +>0 byte x %dx16k blocks +>2 byte x \b, last in series or standalone +>8 byte 0xAA +>9 byte 0xBB #------------------------------------------------------------------------------ -# dreamcast: file(1) magic for the Sega Dreamcast disc image format. -# From: David Korth <gerbilsoft@gerbilsoft.com> -# Reference: http://mc.pp.se/dc/ip0000.bin.html +# smsgg: file(1) magic for Sega Master System and Game Gear ROM dumps # - -# Common Sega Dreamcast disc header format. -# NOTE: Title is 128 bytes, but we're only showing 32 due to space padding. -# TODO: Release date, device information, region code, others? -0 name sega-dreamcast-disc-header ->0x80 string >\0 \b: "%.32s" ->0x40 string >\0 (%.10s ->>0x4A string >\0 \b, %.6s) ->>0x4A byte 0 \b) - -# 2048-byte sector version. -0 string SEGA\ SEGAKATANA\ Sega Dreamcast disc image ->0 use sega-dreamcast-disc-header ->0 byte x (2048-byte sectors) -# 2352-byte sector version. -0x10 string SEGA\ SEGAKATANA\ Sega Dreamcast disc image ->0x10 use sega-dreamcast-disc-header ->0 byte x (2352-byte sectors) +# Does not detect all images. Very preliminary guesswork. Need more data +# on format. +# +# FIXME: need a little more info...;P +# +#0 byte 0xF3 +#>1 byte 0xED Sega Master System/Game Gear ROM dump +#>1 byte 0x31 Sega Master System/Game Gear ROM dump +#>1 byte 0xDB Sega Master System/Game Gear ROM dump +#>1 byte 0xAF Sega Master System/Game Gear ROM dump +#>1 byte 0xC3 Sega Master System/Game Gear ROM dump #------------------------------------------------------------------------------ # dreamcast: file(1) uncertain magic for the Sega Dreamcast VMU image format @@ -311,77 +115,15 @@ 0 string LCDi Dream Animator file #------------------------------------------------------------------------------ -# z64: file(1) magic for the Z64 format N64 ROM dumps -# Reference: http://forum.pj64-emu.com/showthread.php?t=2239 -# From: David Korth <gerbilsoft@gerbilsoft.com> +# v64: file(1) uncertain magic for the V64 format N64 ROM dumps # -0 bequad 0x803712400000000F Nintendo 64 ROM image ->0x20 string >\0 \b: "%.20s" ->0x3B string x (%.4s ->0x3F byte x \b, Rev.%02u) +0 belong 0x37804012 V64 Nintendo 64 ROM dump -#------------------------------------------------------------------------------ -# v64: file(1) magic for the V64 format N64 ROM dumps -# Same as z64 format, but with 16-bit byteswapping. -# -0 bequad 0x3780401200000F00 Nintendo 64 ROM image (V64) - -#------------------------------------------------------------------------------ -# n64-swap2: file(1) magic for the swap2 format N64 ROM dumps -# Same as z64 format, but with swapped 16-bit words. -# -0 bequad 0x12408037000F0000 Nintendo 64 ROM image (wordswapped) - -#------------------------------------------------------------------------------ -# n64-le32: file(1) magic for the 32-bit byteswapped format N64 ROM dumps -# Same as z64 format, but with 32-bit byteswapping. -# -0 bequad 0x401237800F000000 Nintendo 64 ROM image (32-bit byteswapped) - -#------------------------------------------------------------------------------ -# gba: file(1) magic for the Nintendo Game Boy Advance raw ROM format -# Reference: http://problemkaputt.de/gbatek.htm#gbacartridgeheader -# -# Original version from: "Nelson A. de Oliveira" <naoliv@gmail.com> -# Updated version from: David Korth <gerbilsoft@gerbilsoft.com> -# -4 bequad 0x24FFAE51699AA221 Game Boy Advance ROM image ->0xA0 string >\0 \b: "%.12s" ->0xAC string x (%.6s ->0xBC byte x \b, Rev.%02u) - -#------------------------------------------------------------------------------ -# nds: file(1) magic for the Nintendo DS(i) raw ROM format -# Reference: http://problemkaputt.de/gbatek.htm#dscartridgeheader -# -# Original version from: "Nelson A. de Oliveira" <naoliv@gmail.com> -# Updated version from: David Korth <gerbilsoft@gerbilsoft.com> -# -0xC0 bequad 0x24FFAE51699AA221 Nintendo DS ROM image ->0x00 string >\0 \b: "%.12s" ->0x0C string x (%.6s ->0x1E byte x \b, Rev.%02u) ->0x12 byte 2 (DSi enhanced) ->0x12 byte 3 (DSi only) - -#------------------------------------------------------------------------------ -# nds_passme: file(1) magic for Nintendo DS ROM images for GBA cartridge boot. -# This is also used for loading .nds files using the MSET exploit on 3DS. -# Reference: https://github.com/devkitPro/ndstool/blob/master/source/ndscreate.cpp -0xC0 bequad 0xC8604FE201708FE2 Nintendo DS Slot-2 ROM image (PassMe) - -#------------------------------------------------------------------------------ -# ngp: file(1) magic for the Neo Geo Pocket (Color) raw ROM format. -# From: David Korth <gerbilsoft@gerbilsoft.com> -# References: -# - https://neogpc.googlecode.com/svn-history/r10/trunk/src/core/neogpc.cpp -# - http://www.devrs.com/ngp/files/ngpctech.txt -# -0x0A string BY\ SNK\ CORPORATION Neo Geo Pocket ->0x23 byte 0x10 Color ->0 byte x ROM image ->0x24 string >\0 \b: "%.12s" ->0x1F byte 0xFF (debug mode enabled) +# From: "Nelson A. de Oliveira" <naoliv@gmail.com> +# Nintendo .nds +192 string \044\377\256Qi\232 Nintendo DS Game ROM Image +# Nintendo .gba +0 string \056\000\000\352$\377\256Qi Nintendo Game Boy Advance ROM Image #------------------------------------------------------------------------------ # msx: file(1) magic for MSX game cartridge dumps @@ -391,25 +133,9 @@ #------------------------------------------------------------------------------ # Sony Playstation executables (Adam Sjoegren <asjo@diku.dk>) : 0 string PS-X\ EXE Sony Playstation executable ->16 lelong x PC=0x%08x, ->20 lelong !0 GP=0x%08x, ->24 lelong !0 .text=[0x%08x, ->>28 lelong x \b0x%x], ->32 lelong !0 .data=[0x%08x, ->>36 lelong x \b0x%x], ->40 lelong !0 .bss=[0x%08x, ->>44 lelong x \b0x%x], ->48 lelong !0 Stack=0x%08x, ->48 lelong =0 No Stack!, ->52 lelong !0 StackSize=0x%x, -#>76 string >\0 (%s) # Area: >113 string x (%s) -# CPE executables -0 string CPE CPE executable ->3 byte x (version %d) - #------------------------------------------------------------------------------ # Microsoft Xbox executables .xbe (Esa Hyytia <ehyytia@cc.hut.fi>) 0 string XBEH XBE, Microsoft Xbox executable @@ -546,117 +272,3 @@ # From: Sven Hartge <debian@ds9.argh.org> 0 string SCVM ScummVM savegame >12 string >\0 "%s" - -#------------------------------------------------------------------------------ -# Nintendo GameCube / Wii file formats. -# - -# Type: Nintendo GameCube/Wii common disc header data. -# From: David Korth <gerbilsoft@gerbilsoft.com> -# Reference: http://wiibrew.org/wiki/Wii_Disc -0 name nintendo-gcn-disc-common ->0x20 string x "%.64s" ->0x00 string x (%.6s ->0x06 byte >0 ->>0x06 byte 1 \b, Disc 2 ->>0x06 byte 2 \b, Disc 3 ->>0x06 byte 3 \b, Disc 4 ->0x07 byte x \b, Rev.%02u) - -# Type: Nintendo GameCube disc image -# From: David Korth <gerbilsoft@gerbilsoft.com> -# Reference: http://wiibrew.org/wiki/Wii_Disc -0x1C belong 0xC2339F3D Nintendo GameCube disc image: ->0 use nintendo-gcn-disc-common - -# Type: Nintendo Wii disc image -# From: David Korth <gerbilsoft@gerbilsoft.com> -# Reference: http://wiibrew.org/wiki/Wii_Disc -0x18 belong 0x5D1C9EA3 Nintendo Wii disc image: ->0 use nintendo-gcn-disc-common - -# Type: Nintendo Wii disc image (WBFS format) -# From: David Korth <gerbilsoft@gerbilsoft.com> -# Reference: http://wiibrew.org/wiki/Wii_Disc -0 string WBFS ->0x218 belong 0x5D1C9EA3 Nintendo Wii disc image (WBFS format): ->>0x200 use nintendo-gcn-disc-common - -#------------------------------------------------------------------------------ -# Nintendo 3DS file formats. -# - -# Type: Nintendo 3DS "NCCH" header. -# Contained within either a CXI executable or an NCSD image. -# From: David Korth <gerbilsoft@gerbilsoft.com> -# Reference: https://www.3dbrew.org/wiki/NCCH -0 name nintendo-3ds-NCCH ->0x100 string NCCH ->>0x150 string >\0 \b: "%.16s" ->>0x112 leshort x (v%u) ->>0x18C byte 2 (New3DS only) - -# Type: Nintendo 3DS "NCSD" image. (game cards and eMMC) -# From: David Korth <gerbilsoft@gerbilsoft.com> -# Reference: https://www.3dbrew.org/wiki/NCSD -0x100 string NCSD ->0x118 lequad 0 Nintendo 3DS Game Card image ->>0x1000 use nintendo-3ds-NCCH ->>0x18D byte 0 (inner device) ->>0x18D byte 1 (Card1) ->>0x18D byte 2 (Card2) ->>0x18D byte 3 (extended device) ->0x118 bequad 0x0102020202000000 Nintendo 3DS eMMC dump (Old3DS) ->0x118 bequad 0x0102020203000000 Nintendo 3DS eMMC dump (New3DS) - -# Type: Nintendo 3DS "NCCH" container. -# https://www.3dbrew.org/wiki/NCCH -0x100 string NCCH Nintendo 3DS ->0x18D byte&2 0 File Archive (CFA) ->0x18D byte&2 2 Executable Image (CXI) ->0 use nintendo-3ds-NCCH - -# Type: Nintendo 3DS "SMDH" file. (application description) -# From: David Korth <gerbilsoft@gerbilsoft.com> -# Reference: https://3dbrew.org/wiki/SMDH -0 string SMDH Nintendo 3DS SMDH file ->0x208 leshort !0 ->>0x208 lestring16 x \b: "%.128s" ->>0x388 leshort !0 ->>>0x388 lestring16 x by %.128s ->0x208 leshort 0 ->>0x008 leshort !0 ->>>0x008 lestring16 x \b: "%.128s" ->>>0x188 leshort !0 ->>>>0x188 lestring16 x by %.128s - -# Type: Nintendo 3DS Homebrew Application. -# From: David Korth <gerbilsoft@gerbilsoft.com> -# Refernece: https://3dbrew.org/wiki/3DSX_Format -0 string 3DSX Nintendo 3DS Homebrew Application (3DSX) - -#------------------------------------------------------------------------------ -# a7800: file(1) magic for the Atari 7800 raw ROM format. -# From: David Korth <gerbilsoft@gerbilsoft.com> -# Reference: https://sites.google.com/site/atari7800wiki/a78-header - -0 byte >0 ->0 byte <3 ->>1 string ATARI7800 Atari 7800 ROM image ->>>0x11 string >\0 \b: "%.32s" -# Display type. ->>>0x39 byte 0 (NTSC) ->>>0x39 byte 1 (PAL) ->>>0x36 byte&1 1 (POKEY) - -#------------------------------------------------------------------------------ -# vectrex: file(1) magic for the GCE Vectrex raw ROM format. -# From: David Korth <gerbilsoft@gerbilsoft.com> -# Reference: http://www.playvectrex.com/designit/chrissalo/hello1.htm -# -# NOTE: Title is terminated with 0x80, not 0. -# The header is terminated with a 0, so that will -# terminate the title as well. -# -0 string g\ GCE Vectrex ROM image ->0x11 string >\0 \b: "%.16s" diff --git a/contrib/file/magic/Magdir/database b/contrib/file/magic/Magdir/database index e5cde8a..f39acfda 100644 --- a/contrib/file/magic/Magdir/database +++ b/contrib/file/magic/Magdir/database @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: database,v 1.48 2016/04/14 20:34:28 christos Exp $ +# $File: database,v 1.45 2015/09/09 16:25:29 christos Exp $ # database: file(1) magic for various databases # # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk) @@ -377,10 +377,7 @@ >>>>>>>>>>>>0 use dbase3-memo-print # dBASE IV DBT with positive block size >>>>>>>20 uleshort >0 -# dBASE IV DBT with valid block length like 512, 1024 -# multiple of 2 in between 16 and 16 K ,implies upper and lower bits are zero ->>>>>>>>20 uleshort&0x800f 0 ->>>>>>>>>0 use dbase4-memo-print +>>>>>>>>0 use dbase4-memo-print # Print the information of dBase III DBT memo file 0 name dbase3-memo-print @@ -398,8 +395,6 @@ # Print the information of dBase IV DBT memo file 0 name dbase4-memo-print >0 lelong x dBase IV DBT -!:mime application/x-dbt -!:ext dbt # 8 character shorted main name of coresponding dBASE IV DBF file >8 ubelong >0x20000000 # skip unusual like for angest.dbt @@ -460,52 +455,6 @@ 4 string Standard\ ACE\ DB Microsoft Access Database !:mime application/x-msaccess -# From: Joerg Jenderek -# URL: http://fileformats.archiveteam.org/wiki/Extensible_Storage_Engine -# Reference: https://github.com/libyal/libesedb/archive/master.zip -# libesedb-master/documentation/ -# Extensible Storage Engine (ESE) Database File (EDB) format.asciidoc -# Note: also known as "JET Blue". Used by numerous Windows components such as -# Windows Search, Mail, Exchange and Active Directory. -4 ubelong 0xefcdab89 -# unknown1 ->132 ubelong 0 Extensible storage engine -!:mime application/x-ms-ese -# file_type 0~database 1~stream ->>12 ulelong 0 DataBase -# Security DataBase (sdb) -!:ext edb/sdb ->>12 ulelong 1 STreaMing -!:ext stm -# format_version 620h ->>8 uleshort x \b, version 0x%x ->>10 uleshort >0 revision 0x%4.4x ->>0 ubelong x \b, checksum 0x%8.8x -# Page size 4096 8192 32768 ->>236 ulequad x \b, page size %lld -# database_state ->>52 ulelong 1 \b, JustCreated ->>52 ulelong 2 \b, DirtyShutdown -#>>52 ulelong 3 \b, CleanShutdown ->>52 ulelong 4 \b, BeingConverted ->>52 ulelong 5 \b, ForceDetach -# Windows NT major version when the databases indexes were updated. ->>216 ulelong x \b, Windows version %d -# Windows NT minor version ->>220 ulelong x \b.%d - -# From: Joerg Jenderek -# URL: http://forensicswiki.org/wiki/Windows_Application_Compatibility -# Note: files contain application compatibility fixes, application compatibility modes and application help messages. -8 string sdbf ->7 ubyte 0 -# TAG_TYPE_LIST+TAG_INDEXES ->>12 uleshort 0x7802 Windows application compatibility Shim DataBase -# version? 2 3 -#>>>0 ulelong x \b, version %d -!:mime application/x-ms-sdb -!:ext sdb - # TDB database from Samba et al - Martin Pool <mbp@samba.org> 0 string TDB\ file TDB database >32 lelong 0x2601196D version 6, little-endian @@ -596,18 +545,3 @@ # Hopper (reverse engineering tool) http://www.hopperapp.com/ 0 string hopperdb Hopper database -# URL: https://en.wikipedia.org/wiki/Panorama_(database_engine) -# Reference: http://www.provue.com/Panorama/ -# From: Joerg Jenderek -# NOTE: test only versions 4 and 6.0 with Windows -# length of Panorama database name -5 ubyte >0 -# look after database name for "some" null bits ->(5.B+7) ubelong&0xF3ffF000 0 -# look for first keyword ->>&1 search/2 DESIGN Panorama database -#!:mime application/x-panorama-database -!:apple KASXZEPD -!:ext pan -# database name ->>>5 pstring x \b, "%s" diff --git a/contrib/file/magic/Magdir/der b/contrib/file/magic/Magdir/der deleted file mode 100644 index abfbf9b..0000000 --- a/contrib/file/magic/Magdir/der +++ /dev/null @@ -1,116 +0,0 @@ -#------------------------------------------------------------------------------ -# $File: der,v 1.1 2016/01/19 15:07:45 christos Exp $ -# der: file(1) magic for DER encoded files -# - -# Certificate information piece -0 name certinfo ->0 der seq ->>&0 der set ->>>&0 der seq ->>>>&0 der obj_id3=550406 ->>>>&0 der prt_str=x \b, countryName=%s ->>&0 der set ->>>&0 der seq ->>>>&0 der obj_id3=550408 ->>>>&0 der utf8_str=x \b, stateOrProvinceName=%s ->>&0 der set ->>>&0 der seq ->>>>&0 der obj_id3=55040a ->>>>&0 der utf8_str=x \b, organizationName=%s ->>&0 der set ->>>&0 der seq ->>>>&0 der obj_id3=550403 ->>>>&0 der utf8_str=x \b, commonName=%s ->>&0 der seq - -# Certificate requests -0 der seq ->&0 der seq ->>&0 der int1=00 DER Encoded Certificate request ->>&0 use certinfo - -# Key Pairs -0 der seq ->&0 der int1=00 ->&0 der int65=x ->&0 der int3=010001 DER Encoded Key Pair, 512 bits - -0 der seq ->&0 der int1=00 ->&0 der int129=x ->&0 der int3=010001 DER Encoded Key Pair, 1024 bits - -0 der seq ->&0 der int1=00 ->&0 der int257=x ->&0 der int3=010001 DER Encoded Key Pair, 2048 bits - -0 der seq ->&0 der int1=00 ->&0 der int513=x ->&0 der int3=010001 DER Encoded Key Pair, 4096 bits - -0 der seq ->&0 der int1=00 ->&0 der int1025=x ->&0 der int3=010001 DER Encoded Key Pair, 8192 bits - -0 der seq ->&0 der int1=00 ->&0 der int2049=x ->&0 der int3=010001 DER Encoded Key Pair, 16k bits - -0 der seq ->&0 der int1=00 ->&0 der int4097=x ->&0 der int3=010001 DER Encoded Key Pair, 32k bits - -# Certificates -0 der seq ->&0 der seq ->>&0 der int2=0dfa DER Encoded Certificate, 512 bits ->>&0 der int2=0dfb DER Encoded Certificate, 1024 bits ->>&0 der int2=0dfc DER Encoded Certificate, 2048 bits ->>&0 der int2=0dfd DER Encoded Certificate, 4096 bits ->>&0 der int2=0dfe DER Encoded Certificate, 8192 bits ->>&0 der int2=0dff DER Encoded Certificate, 16k bits ->>&0 der int2=0e04 DER Encoded Certificate, 32k bits ->>&0 der int2=x DER Encoded Certificate, ? bits (%s) ->>&0 der seq ->>>&0 der obj_id9=2a864886f70d010105 \b, sha1WithRSAEncryption ->>>&0 der obj_id9=x \b, ? Encryption (%s) ->>>&0 der null ->>&0 der seq ->>>&0 der set ->>>>&0 der seq ->>>>>&0 der obj_id3=550406 ->>>>>&0 der prt_str=x \b, countryName=%s ->>>&0 der set ->>>>&0 der seq ->>>>>&0 der obj_id3=550408 ->>>>>&0 der prt_str=x \b, stateOrProvinceName=%s ->>>&0 der set ->>>>&0 der seq ->>>>>&0 der obj_id3=550407 ->>>>>&0 der prt_str=x \b, localityName=%s ->>>&0 der set ->>>>&0 der seq ->>>>>&0 der obj_id3=55040a ->>>>>&0 der prt_str=x \b, organizationName=%s ->>>&0 der set ->>>>&0 der seq ->>>>>&0 der obj_id3=55040b ->>>>>&0 der prt_str=x \b, organizationUnitName=%s ->>>&0 der set ->>>>&0 der seq ->>>>>&0 der obj_id3=550403 ->>>>>&0 der prt_str=x \b, commonName=%s ->>>&0 der set ->>>>&0 der seq ->>>>>&0 der obj_id9=2a864886f70d010901 ->>>>>&0 der ia5_str=x \b, emailAddress=%s ->>&0 der seq ->>>&0 der utc_time=x \b, utcTime=%s ->>>&0 der utc_time=x \b, utcTime=%s ->>&0 use certinfo diff --git a/contrib/file/magic/Magdir/filesystems b/contrib/file/magic/Magdir/filesystems index e950873..87c067e 100644 --- a/contrib/file/magic/Magdir/filesystems +++ b/contrib/file/magic/Magdir/filesystems @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: filesystems,v 1.113 2016/02/14 14:38:24 christos Exp $ +# $File: filesystems,v 1.111 2015/09/09 16:26:54 christos Exp $ # filesystems: file(1) magic for different filesystems # 0 name partid @@ -1738,30 +1738,28 @@ >0x402 beshort < 100 >0x402 beshort > -1 Minix filesystem, V1, 30 char names (big endian), %d zones >0x1e string minix \b, bootable -# Weak Magic: this is $x -#0x410 leshort 0x2468 -#>0x402 beshort < 100 -#>>0x402 beshort > -1 Minix filesystem, V2, 14 char names -#>0x1e string minix \b, bootable -#0x410 beshort 0x2468 -#>0x402 beshort < 100 -#>0x402 beshort > -1 Minix filesystem, V2 (big endian) -#>0x1e string minix \b, bootable -#0x410 leshort 0x2478 -#>0x402 beshort < 100 -#>0x402 beshort > -1 Minix filesystem, V2, 30 char names -#>0x1e string minix \b, bootable -#0x410 leshort 0x2478 -#>0x402 beshort < 100 -#>0x402 beshort > -1 Minix filesystem, V2, 30 char names -#>0x1e string minix \b, bootable -#0x410 beshort 0x2478 -#>0x402 beshort !0 Minix filesystem, V2, 30 char names (big endian) -#>0x1e string minix \b, bootable -# Weak Magic! this is MD -#0x418 leshort 0x4d5a -#>0x402 beshort <100 -#>>0x402 beshort > -1 Minix filesystem, V3, 60 char names +0x410 leshort 0x2468 +>0x402 beshort < 100 +>>0x402 beshort > -1 Minix filesystem, V2, 14 char names +>0x1e string minix \b, bootable +0x410 beshort 0x2468 +>0x402 beshort < 100 +>0x402 beshort > -1 Minix filesystem, V2 (big endian) +>0x1e string minix \b, bootable +0x410 leshort 0x2478 +>0x402 beshort < 100 +>0x402 beshort > -1 Minix filesystem, V2, 30 char names +>0x1e string minix \b, bootable +0x410 leshort 0x2478 +>0x402 beshort < 100 +>0x402 beshort > -1 Minix filesystem, V2, 30 char names +>0x1e string minix \b, bootable +0x410 beshort 0x2478 +>0x402 beshort !0 Minix filesystem, V2, 30 char names (big endian) +>0x1e string minix \b, bootable +0x418 leshort 0x4d5a +>0x402 beshort <100 +>>0x402 beshort > -1 Minix filesystem, V3, 60 char names # SGI disk labels - Nathan Scott <nathans@debian.org> 0 belong 0x0BE5A941 SGI disk label (volume header) @@ -2216,12 +2214,12 @@ >0x10090 lelong x sectorsize %d, >0x10094 lelong x nodesize %d, >0x10098 lelong x leafsize %d, ->0x10020 belong x UUID=%08x- ->0x10024 beshort x \b%04x- ->0x10026 beshort x \b%04x- ->0x10028 beshort x \b%04x- ->0x1002a beshort x \b%04x ->0x1002c belong x \b%08x, +>0x10020 belong x UUID=%8x- +>0x10024 beshort x \b%4x- +>0x10026 beshort x \b%4x- +>0x10028 beshort x \b%4x- +>0x1002a beshort x \b%4x +>0x1002c belong x \b%8x, >0x10078 lequad x %lld/ >0x10070 lequad x \b%lld bytes used, >0x10088 lequad x %lld devices diff --git a/contrib/file/magic/Magdir/finger b/contrib/file/magic/Magdir/finger deleted file mode 100644 index d8611f6..0000000 --- a/contrib/file/magic/Magdir/finger +++ /dev/null @@ -1,16 +0,0 @@ - -#------------------------------------------------------------------------------ -# $File: finger,v 1.2 2015/10/07 02:37:57 christos Exp $ -# fingerprint: file(1) magic for fingerprint data -# XPM bitmaps) -# - -# http://cgit.freedesktop.org/libfprint/libfprint/tree/libfprint/data.c - -0 string FP1 libfprint fingerprint data V1 ->3 beshort x \b, driver_id %x ->5 belong x \b, devtype %x - -0 string FP2 libfprint fingerprint data V2 ->3 beshort x \b, driver_id %x ->5 belong x \b, devtype %x diff --git a/contrib/file/magic/Magdir/flif b/contrib/file/magic/Magdir/flif deleted file mode 100644 index 9406208..0000000 --- a/contrib/file/magic/Magdir/flif +++ /dev/null @@ -1,36 +0,0 @@ - -#------------------------------------------------------------------------------ -# $File: flif,v 1.1 2015/11/23 22:04:36 christos Exp $ -# flif: Magic data for file(1) command. -# FLIF (Free Lossless Image Format) - -0 string FLIF FLIF ->4 string <H image data ->>6 beshort x \b, %u ->>8 beshort x \bx%u ->>5 string 1 \b, 8-bit/color, ->>5 string 2 \b, 16-bit/color, ->>4 string 1 \b, grayscale, non-interlaced ->>4 string 3 \b, RGB, non-interlaced ->>4 string 4 \b, RGBA, non-interlaced ->>4 string A \b, grayscale ->>4 string C \b, RGB, interlaced ->>4 string D \b, RGBA, interlaced ->4 string >H \b, animation data ->>5 ubyte <255 \b, %i frames ->>>7 beshort x \b, %u ->>>9 beshort x \bx%u ->>>6 string =1 \b, 8-bit/color ->>>6 string =2 \b, 16-bit/color ->>5 ubyte 0xFF ->>>6 beshort x \b, %i frames, ->>>9 beshort x \b, %u ->>>11 beshort x \bx%u ->>>8 string =1 \b, 8-bit/color ->>>8 string =2 \b, 16-bit/color ->>4 string =Q \b, grayscale, non-interlaced ->>4 string =S \b, RGB, non-interlaced ->>4 string =T \b, RGBA, non-interlaced ->>4 string =a \b, grayscale ->>4 string =c \b, RGB, interlaced ->>4 string =d \b, RGBA, interlaced diff --git a/contrib/file/magic/Magdir/fonts b/contrib/file/magic/Magdir/fonts index 41899fb..4b3173c 100644 --- a/contrib/file/magic/Magdir/fonts +++ b/contrib/file/magic/Magdir/fonts @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: fonts,v 1.30 2016/03/22 22:27:47 christos Exp $ +# $File: fonts,v 1.27 2014/04/30 21:41:02 christos Exp $ # fonts: file(1) magic for font data # 0 search/1 FONT ASCII vfont text @@ -29,25 +29,6 @@ # X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan@yggdrasil.com) 0 search/1 STARTFONT\ X11 BDF font text -# From: Joerg Jenderek -# URL: http://grub.gibibit.com/New_font_format -# Reference: util/grub-mkfont.c -# include/grub/fontformat.h -# FONT_FORMAT_SECTION_NAMES_FILE -0 string FILE -# FONT_FORMAT_PFF2_MAGIC ->8 string PFF2 -# leng 4 only at the moment ->>4 ubelong 4 -# FONT_FORMAT_SECTION_NAMES_FONT_NAME ->>>12 string NAME GRUB2 font -!:mime application/x-font-pf2 -!:ext pf2 -# length of font_name ->>>>16 ubelong >0 -# font_name ->>>>>20 string >\0 "%-s" - # X11 fonts, from Daniel Quinlan (quinlan@yggdrasil.com) # PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides) 0 string \001fcp X11 Portable Compiled Font data @@ -77,11 +58,8 @@ 4098 string DOSFONT DOSFONT2 encrypted font data # downloadable fonts for browser (prints type) anthon@mnt.org -# https://tools.ietf.org/html/rfc3073 -0 string PFR1 Portable Font Resource font data (new) +0 string PFR1 PFR1 font >102 string >0 \b: %s -0 string PFR0 Portable Font Resource font data (old) ->4 beshort >0 version %d # True Type fonts 0 string \000\001\000\000\000 TrueType font data @@ -114,25 +92,9 @@ !:mime application/vnd.ms-fontobject # Web Open Font Format (.woff) -0 name woff ->4 belong 0x00010000 \b, TrueType ->4 belong 0x4F54544F \b, CFF ->4 belong 0x74727565 \b, TrueType ->4 default x ->>4 belong x \b, flavor %d ->8 belong x \b, length %d -#>12 beshort x \b, numTables %d -#>14 beshort x \b, reserved %d -#>16 belong x \b, totalSfntSize %d - # http://www.w3.org/TR/WOFF/ 0 string wOFF Web Open Font Format ->0 use woff +>4 belong x \b, flavor %d +>8 belong x \b, length %d >20 beshort x \b, version %d >22 beshort x \b.%d -# http://www.w3.org/TR/WOFF2/ -0 string wOF2 Web Open Font Format (Version 2) ->0 use woff -#>20 belong x \b, totalCompressedSize %d ->24 beshort x \b, version %d ->26 beshort x \b.%d diff --git a/contrib/file/magic/Magdir/fortran b/contrib/file/magic/Magdir/fortran index 6abc2f7..826e912 100644 --- a/contrib/file/magic/Magdir/fortran +++ b/contrib/file/magic/Magdir/fortran @@ -1,9 +1,7 @@ #------------------------------------------------------------------------------ -# $File: fortran,v 1.10 2015/11/05 18:47:16 christos Exp $ +# $File: fortran,v 1.9 2015/06/17 19:55:27 christos Exp $ # FORTRAN source -# Check that the first 100 lines start with C or whitespace first. -0 regex/100l !\^[^Cc\ \t].*$ ->0 regex/100l \^[Cc][\ \t] FORTRAN program text +0 regex/100l \^[Cc][\ \t] FORTRAN program text !:mime text/x-fortran !:strength - 5 diff --git a/contrib/file/magic/Magdir/hitachi-sh b/contrib/file/magic/Magdir/hitachi-sh index 1b615ae..213d2d6 100644 --- a/contrib/file/magic/Magdir/hitachi-sh +++ b/contrib/file/magic/Magdir/hitachi-sh @@ -1,28 +1,22 @@ #------------------------------------------------------------------------------ -# $File: hitachi-sh,v 1.7 2015/09/30 20:32:35 christos Exp $ +# $File: hitachi-sh,v 1.6 2013/01/29 19:31:33 christos Exp $ # hitach-sh: file(1) magic for Hitachi Super-H # # Super-H COFF # -# updated by Joerg Jenderek at Oct 2015 -# https://en.wikipedia.org/wiki/COFF -# https://de.wikipedia.org/wiki/Common_Object_File_Format -# http://www.delorie.com/djgpp/doc/coff/filhdr.html # below test line conflicts with 2nd NTFS filesystem sector +0 beshort 0x0500 Hitachi SH big-endian COFF # 2nd NTFS filesystem sector often starts with 0x05004e00 for unicode string 5 NTLDR -# and Portable Gaming Notation Compressed format (*.WID http://pgn.freeservers.com/) -0 beshort 0x0500 -# test for unused flag bits (0x8000,0x0800,0x0400,0x0200,x0080) in f_flags ->18 ubeshort&0x8E80 0 -# use big endian variant of subroutine to display name+variables+flags -# for common object formated files ->>0 use \^display-coff - -0 leshort 0x0550 -# test for unused flag bits in f_flags ->18 uleshort&0x8E80 0 -# use little endian variant of subroutine to -# display name+variables+flags for common object formated files ->>0 use display-coff +#0 ubelong&0xFFFFNMPQ 0x0500NMPQ Hitachi SH big-endian COFF +>18 beshort&0x0002 =0x0000 object +>18 beshort&0x0002 =0x0002 executable +>18 beshort&0x0008 =0x0008 \b, stripped +>18 beshort&0x0008 =0x0000 \b, not stripped +# +0 leshort 0x0550 Hitachi SH little-endian COFF +>18 leshort&0x0002 =0x0000 object +>18 leshort&0x0002 =0x0002 executable +>18 leshort&0x0008 =0x0008 \b, stripped +>18 leshort&0x0008 =0x0000 \b, not stripped diff --git a/contrib/file/magic/Magdir/images b/contrib/file/magic/Magdir/images index d084da7..a3ac70b 100644 --- a/contrib/file/magic/Magdir/images +++ b/contrib/file/magic/Magdir/images @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: images,v 1.116 2016/03/23 15:29:20 christos Exp $ +# $File: images,v 1.107 2015/07/11 14:40:10 christos Exp $ # images: file(1) magic for image formats (see also "iff", and "c-lang" for # XPM bitmaps) # @@ -12,155 +12,26 @@ # Targa - matches `povray', `ppmtotga' and `xv' outputs # by Philippe De Muyter <phdm@macqel.be> -# URL: http://justsolve.archiveteam.org/wiki/TGA -# Reference: http://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf -# Update: Joerg Jenderek # at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11 -# ,32 or 33 (both not observed) # at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise -# or theoretically 2-128 reserved for use by Truevision or 128-255 may be used for developer applications # at 3, leshort Index is 0 for povray, ppmtotga and xv outputs # `xv' recognizes only a subset of the following (RGB with pixelsize = 24) # `tgatoppm' recognizes a superset (Index may be anything) -# -# test of Color Map Type 0~no 1~color map -# and Image Type 1 2 3 9 10 11 32 33 -# and Color Map Entry Size 0 15 16 24 32 -0 ubequad&0x00FeC400000000C0 0 -# skip more garbage by looking for positive image type ->2 ubyte >0 -# skip some compiled terminfo by looking for image type less equal 33 ->>2 ubyte <34 -# skip arches.3200 , Finder.Root , Slp.1 by looking for low pixel sizes 15 16 24 32 ->>>16 ubyte <33 -# skip more by looking for pixel size 0Fh 10h 18h 20h ->>>>16 ubyte&0xC0 0x00 -# skip 260-16.ico by looking for no color map ->>>>>1 ubyte 0 -# implies no first map entry ->>>>>>3 uleshort 0 ->>>>>>>0 use tga-image -# Color Map ->>>>>1 ubyte >0 ->>>>>>0 use tga-image -# display tga bitmap image information -0 name tga-image ->2 ubyte <34 Targa image data -!:mime image/x-tga -!:apple ????TPIC -# normal extension .tga but some Truevision products used others: -# tpic (Apple),icb (Image Capture Board),vda (Video Display Adapter),vst (NuVista),win (UNSURE about that) -!:ext tga/tpic/icb/vda/vst -# image type 1 2 3 9 10 11 32 33 ->2 ubyte&0xF7 1 - Map ->2 ubyte&0xF7 2 - RGB -# alpha channel ->>17 ubyte&0x0F >0 \bA ->2 ubyte&0xF7 3 - Mono -# type not found, but by http://www.fileformat.info/format/tga/corion.htm -# Compressed color-mapped data, using Huffman, Delta, and runlength encoding ->2 ubyte 32 - Color -# Compressed color-mapped data, using Huffman, Delta, and RLE. 4-pass quadtree- type process ->2 ubyte 33 - Color -# Color Map Type 0~no 1~color map ->1 ubyte 1 ( -# first color map entry, 0 normal ->>3 uleshort >0 \b%d- -# color map length 0 2 1dh 3bh d9h 100h ->>5 uleshort x \b%d) -# 8~run length encoding bit ->2 ubyte&0x08 8 - RLE -# gimp can create big pictures! ->12 uleshort >0 %d x ->12 uleshort =0 65536 x -# image height. 0 interpreted as 65536 ->14 uleshort >0 %d ->14 uleshort =0 65536 -# Image Pixel Size 15 16 24 32 ->16 ubyte x x %d -# X origin of image. 0 normal ->8 uleshort >0 +%d -# Y origin of image. 0 normal; positive for top ->10 uleshort >0 +%d -# Image descriptor: bits 3-0 give the alpha channel depth, bits 5-4 give direction ->17 ubyte&0x0F >0 - %d-bit alpha -# bits 5-4 give direction. normal bottom left ->17 ubyte &0x20 - top -#>17 ubyte ^0x20 - bottom ->17 ubyte &0x10 - right -#>17 ubyte ^0x10 - left -# some info say other bits 6-7 should be zero -# but data storage interleave by http://www.fileformat.info/format/tga/corion.htm -# 00 - no interleave;01 - even/odd interleave; 10 - four way interleave; 11 - reserved -#>17 ubyte&0xC0 0x00 - no interleave ->17 ubyte&0xC0 0x40 - interleave ->17 ubyte&0xC0 0x80 - four way interleave ->17 ubyte&0xC0 0xC0 - reserved -# positive length implies identification field ->0 ubyte >0 ->>18 string x "%s" -# last 18 bytes of newer tga file footer signature ->18 search/4261301/s TRUEVISION-XFILE.\0 -# extension area offset if not 0 ->>&-8 ulelong >0 -# length of the extension area. normal 495 for version 2.0 ->>>(&-4.l) uleshort 0x01EF -# AuthorName[41] ->>>>&0 string >\0 - author "%-.40s" -# Comment[324]=4 * 80 null terminated ->>>>&41 string >\0 - comment "%-.80s" -# date ->>>>&365 ubequad&0xffffFFFFffff0000 !0 -# Day ->>>>>&-6 uleshort x %d -# Month ->>>>>&-8 uleshort x \b-%d -# Year ->>>>>&-4 uleshort x \b-%d -# time ->>>>&371 ubequad&0xffffFFFFffff0000 !0 -# hour ->>>>>&-8 uleshort x %d -# minutes ->>>>>&-6 uleshort x \b:%.2d -# second ->>>>>&-4 uleshort x \b:%.2d -# JobName[41] ->>>>&377 string >\0 - job "%-.40s" -# JobHour Jobminute Jobsecond ->>>>&418 ubequad&0xffffFFFFffff0000 !0 ->>>>>&-8 uleshort x %d ->>>>>&-6 uleshort x \b:%.2d ->>>>>&-4 uleshort x \b:%.2d -# SoftwareId[41] ->>>>&424 string >\0 - %-.40s -# SoftwareVersionNumber ->>>>&424 ubyte >0 ->>>>>&40 uleshort/100 x %d ->>>>>&40 uleshort%100 x \b.%d -# VersionLetter ->>>>>&42 ubyte >0x20 \b%c -# KeyColor ->>>>&468 ulelong >0 - keycolor 0x%8.8x -# Denominator of Pixel ratio. 0~no pixel aspect ->>>>&474 uleshort >0 -# Numerator ->>>>>&-4 uleshort >0 - aspect %d ->>>>>&-2 uleshort x \b/%d -# Denominator of Gamma ratio. 0~no Gamma value ->>>>&478 uleshort >0 -# Numerator ->>>>>&-4 uleshort >0 - gamma %d ->>>>>&-2 uleshort x \b/%d -# ColorOffset -#>>>>&480 ulelong x - col offset 0x%8.8x -# StampOffset -#>>>>&484 ulelong x - stamp offset 0x%8.8x -# ScanOffset -#>>>>&488 ulelong x - scan offset 0x%8.8x -# AttributesType -#>>>>&492 ubyte x - Attributes 0x%x -## EndOfTGA +1 belong&0xfff7ffff 0x01010000 Targa image data - Map +!:strength + 2 +>2 byte&8 8 - RLE +>12 leshort >0 %d x +>14 leshort >0 %d +1 belong&0xfff7ffff 0x00020000 Targa image data - RGB +!:strength + 2 +>2 byte&8 8 - RLE +>12 leshort >0 %d x +>14 leshort >0 %d +1 belong&0xfff7ffff 0x00030000 Targa image data - Mono +!:strength + 2 +>2 byte&8 8 - RLE +>12 leshort >0 %d x +>14 leshort >0 %d # PBMPLUS images # The next byte following the magic is always whitespace. @@ -674,12 +545,8 @@ 0 beshort 0x1010 PEX Binary Archive # DICOM medical imaging data -# URL: https://en.wikipedia.org/wiki/DICOM#Data_format -# Note: "dcm" is the official file name extension -# XnView mention also "dc3" and "acr" as file name extension 128 string DICM DICOM medical imaging data !:mime application/dicom -!:ext dcm/dicom/dic # XWD - X Window Dump file. # As described in /usr/X11R6/include/X11/XWDFile.h @@ -819,7 +686,6 @@ # GEM Image: Version 1, Headerlen 8 (Wolfram Kleff) # Format variations from: Bernd Nuernberger <bernd.nuernberger@web.de> -# Update: Joerg Jenderek # See http://fileformats.archiveteam.org/wiki/GEM_Raster # For variations, also see: # http://www.seasip.info/Gem/ff_img.html (Ventura) @@ -827,59 +693,23 @@ # http://www.fileformat.info/format/gemraster/spec/index.htm (XIMG, STTT) # http://sylvana.net/1stguide/1STGUIDE.ENG (TIMG) 0 beshort 0x0001 -# header_size ->2 beshort 0x0008 ->>0 use gem_info ->2 beshort 0x0009 ->>0 use gem_info -# no example for NOSIG ->2 beshort 24 +>2 beshort 0x0008 GEM Image data >>0 use gem_info -# no example for HYPERPAINT ->2 beshort 25 +>2 beshort 0x0009 GEM Image data (Ventura) >>0 use gem_info -16 string XIMG\0 +16 string XIMG\0 GEM XIMG Image data >0 use gem_info -# no example -16 string STTT\0\x10 +16 string STTT\0\x10 GEM STTT Image data >0 use gem_info -# no example or description -16 string TIMG\0 +16 string TIMG\0 GEM TIMG Image data >0 use gem_info 0 name gem_info -# version is 2 for some XIMG and 1 for all others ->0 beshort <0x0003 GEM -# http://www.snowstone.org.uk/riscos/mimeman/mimemap.txt -!:mime image/x-gem -# header_size 24 25 27 59 779 words for colored bitmaps ->>2 beshort >9 ->>>16 string STTT\0\x10 STTT ->>>16 string TIMG\0 TIMG -# HYPERPAINT or NOSIG variant ->>>16 string \0\x80 ->>>>2 beshort =24 NOSIG ->>>>2 beshort !24 HYPERPAINT -# NOSIG or XIMG variant ->>>16 default x ->>>>16 string !XIMG\0 NOSIG ->>16 string =XIMG\0 XIMG Image data -!:ext img/ximg -# to avoid Warning: Current entry does not yet have a description for adding a EXTENSION type ->>16 string !XIMG\0 Image data -!:ext img -# header_size is 9 for Ventura files and 8 for other GEM Paint files ->>2 beshort 9 (Ventura) -#>>2 beshort 8 (Paint) ->>12 beshort x %d x ->>14 beshort x %d, -# 1 4 8 ->>4 beshort x %d planes, -# in tenths of a millimetre ->>8 beshort x %d x ->>10 beshort x %d pixelsize -# pattern_size 1-8. 2 for GEM Paint ->>6 beshort !2 \b, pattern size %d +>12 beshort x %d x +>14 beshort x %d, +>4 beshort x %d planes, +>8 beshort x %d x +>10 beshort x %d pixelsize # GEM Metafile (Wolfram Kleff) 0 lelong 0x0018FFFF GEM Metafile data @@ -1168,22 +998,7 @@ !:mime image/x-polar-monitor-bitmap # From: Rick Richardson <rickrich@gmail.com> -# updated by: Joerg Jenderek -# URL: http://techmods.net/nuvi/ 0 string GARMIN\ BITMAP\ 01 Garmin Bitmap file -# extension is also used for -# Sony SRF raw image (image/x-sony-srf) -# SRF map -# Terragen Surface Map (http://www.planetside.co.uk/terragen) -# FileLocator Pro search criteria file (http://www.mythicsoft.com/filelocatorpro) -!:ext srf -#!:mime image/x-garmin-srf -# version 1.00,2.00,2.10,2.40,2.50 ->0x2f string >0 \b, version %4.4s -# width (2880,2881,3240) ->0x55 uleshort >0 \b, %dx -# height (80,90) ->>0x53 uleshort x \b%d # Type: Ulead Photo Explorer5 (.pe5) # URL: http://www.jisyo.com/cgibin/view.cgi?EXT=pe5 (Japanese) @@ -1305,143 +1120,3 @@ # 0 string \x42\x50\x47\xFB BPG (Better Portable Graphics) !:mime image/bpg - -# From: Joerg Jenderek -# URL: https://en.wikipedia.org/wiki/Apple_Icon_Image_format -0 string icns Mac OS X icon -!:mime image/x-icns -!:apple ????icns -!:ext icns ->4 ubelong >0 -# file size ->>4 ubelong x \b, %d bytes -# icon type ->>8 string x \b, "%4.4s" type - -# TIM images -0 lelong 0x00000010 TIM image, ->4 lelong 0x8 4-Bit, ->4 lelong 0x9 8-Bit, ->4 lelong 0x2 15-Bit, ->4 lelong 0x3 24-Bit, ->4 lelong &8 ->>(8.l+12) leshort x Pixel at (%d, ->>(8.l+14) leshort x \b%d) ->>(8.l+16) leshort x Size=%dx ->>(8.l+18) leshort x \b%d, ->>4 lelong 0x8 16 CLUT Entries at ->>4 lelong 0x9 256 CLUT Entries at ->>12 leshort x (%d, ->>14 leshort x \b%d) ->4 lelong ^8 ->>12 leshort x Pixel at (%d, ->>14 leshort x \b%d) ->>16 leshort x Size=%dx ->>18 leshort x \b%d - -# MDEC streams -0 lelong 0x80010160 MDEC video stream, ->16 leshort x %dx ->18 leshort x \b%d -#>8 lelong x %d frames -#>4 leshort x secCount=%d; -#>6 leshort x nSectors=%d; -#>12 lelong x frameSize=%d; - -# BS encoded bitstreams -2 leshort 0x3800 BS image, ->6 leshort x Version %d, ->4 leshort x Quantization %d, ->0 leshort x (Decompresses to %d words) - -# Type: farbfeld image. -# Url: http://tools.suckless.org/farbfeld/ -# From: Ian D. Scott <ian@iandouglasscott.com> -# -0 string farbfeld farbfeld image data, ->8 ubelong x %dx ->12 ubelong x \b%d - -# Type: Sega PVR image. -# From: David Korth <gerbilsoft@gerbilsoft.com> -# References: -# - http://fabiensanglard.net/Mykaruga/tools/segaPVRFormat.txt -# - https://github.com/yazgoo/pvrx2png -# - https://github.com/nickworonekin/puyotools - -# Sega PVR header. -0 name sega-pvr-image-header ->0x0C leshort x %d x ->0x0E leshort x %d -# Image format. ->0x08 byte 0 \b, ARGB1555 ->0x08 byte 1 \b, RGB565 ->0x08 byte 2 \b, ARGB4444 ->0x08 byte 3 \b, YUV442 ->0x08 byte 4 \b, Bump ->0x08 byte 5 \b, 4bpp ->0x08 byte 6 \b, 8bpp -# Image data type. ->0x09 byte 0x01 \b, square twiddled ->0x09 byte 0x02 \b, square twiddled & mipmap ->0x09 byte 0x03 \b, VQ ->0x09 byte 0x04 \b, VQ & mipmap ->0x09 byte 0x05 \b, 8-bit CLUT twiddled ->0x09 byte 0x06 \b, 4-bit CLUT twiddled ->0x09 byte 0x07 \b, 8-bit direct twiddled ->0x09 byte 0x08 \b, 4-bit direct twiddled ->0x09 byte 0x09 \b, rectangle ->0x09 byte 0x0B \b, rectangular stride ->0x09 byte 0x0D \b, rectangular twiddled ->0x09 byte 0x10 \b, small VQ ->0x09 byte 0x11 \b, small VQ & mipmap ->0x09 byte 0x12 \b, square twiddled & mipmap - -# Sega PVR (Xbox) image header. -# Contains an embedded DirectDraw surface instead of PVR data. -0 name sega-pvr-xbox-dds-header ->16 lelong x %d x ->12 lelong x %d, ->84 string x %.4s - -# Sega PVR image. -0 string PVRT ->0x10 string DDS\040\174\000\000\000 Sega PVR (Xbox) image: ->>0x20 use sega-pvr-xbox-dds-header ->0x10 belong !0x44445320 Sega PVR image: ->>0 use sega-pvr-image-header - -# Sega PVR image with GBIX. -0 string GBIX ->0x10 string PVRT ->>0x10 string DDS\040\174\000\000\000 Sega PVR (Xbox) image: ->>>0x20 use sega-pvr-xbox-dds-header ->>0x10 belong !0x44445320 Sega PVR image: ->>>0x10 use sega-pvr-image-header ->>0x08 lelong x \b, global index = %u - -# Sega GVR header. -0 name sega-gvr-image-header ->0x0C beshort x %d x ->0x0E beshort x %d -# Image data format. ->0x0B byte 0 \b, I4 ->0x0B byte 1 \b, I8 ->0x0B byte 2 \b, IA4 ->0x0B byte 3 \b, IA8 ->0x0B byte 4 \b, RGB565 ->0x0B byte 5 \b, RGB5A3 ->0x0B byte 6 \b, ARGB8888 ->0x0B byte 8 \b, CI4 ->0x0B byte 9 \b, CI8 ->0x0B byte 14 \b, DXT1 - -# Sega GVR image. -0 string GVRT Sega GVR image: ->0x10 use sega-gvr-image-header - -# Sega GVR image with GBIX. -0 string GBIX ->0x10 string GVRT Sega GVR image: ->>0x10 use sega-gvr-image-header ->>0x08 belong x \b, global index = %u diff --git a/contrib/file/magic/Magdir/intel b/contrib/file/magic/Magdir/intel index 3f96b75..9fa90f4 100644 --- a/contrib/file/magic/Magdir/intel +++ b/contrib/file/magic/Magdir/intel @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: intel,v 1.14 2015/11/10 00:13:27 christos Exp $ +# $File: intel,v 1.12 2014/04/30 21:41:02 christos Exp $ # intel: file(1) magic for x86 Unix # # Various flavors of x86 UNIX executable/object (other than Xenix, which @@ -30,27 +30,15 @@ 0 leshort =0522 iAPX 286 executable large model (COFF) >12 lelong >0 not stripped #>22 leshort >0 - version %d -# updated by Joerg Jenderek at Oct 2015 -# https://de.wikipedia.org/wiki/Common_Object_File_Format -# http://www.delorie.com/djgpp/doc/coff/filhdr.html -# ./msdos (version 5.25) labeled the next entry as "MS Windows COFF Intel 80386 object file" -# ./intel (version 5.25) label labeled the next entry as "80386 COFF executable" # SGI labeled the next entry as "iAPX 386 executable" --Dan Quinlan -0 leshort =0514 -# use subroutine to display name+flags+variables for common object formated files ->0 use display-coff -#>12 lelong >0 not stripped -# no hint found, that at offset 22 is version -#>22 leshort >0 - version %d +0 leshort =0514 80386 COFF executable +>12 lelong >0 not stripped +>22 leshort >0 - version %d # rom: file(1) magic for BIOS ROM Extensions found in intel machines # mapped into memory between 0xC0000 and 0xFFFFF # From Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu -# updated by Joerg Jenderek -# https://en.wikipedia.org/wiki/Option_ROM 0 beshort 0x55AA BIOS (ia32) ROM Ext. -!:mime application/octet-stream -!:ext rom/bin >5 string USB USB >7 string LDR UNDI image >30 string IBM IBM comp. Video diff --git a/contrib/file/magic/Magdir/java b/contrib/file/magic/Magdir/java index 21acf29..b09302e 100644 --- a/contrib/file/magic/Magdir/java +++ b/contrib/file/magic/Magdir/java @@ -1,6 +1,6 @@ #------------------------------------------------------------ -# $File: java,v 1.18 2015/11/29 22:08:14 christos Exp $ +# $File: java,v 1.16 2013/09/24 20:22:03 christos Exp $ # Java ByteCode and Mach-O binaries (e.g., Mac OS X) use the # same magic number, 0xcafebabe, so they are both handled # in the entry called "cafebabe". @@ -16,12 +16,5 @@ !:mime application/x-java-jce-keystore # Java source -0 regex \^import.*;$ Java source +0 regex ^import.*;$ Java source !:mime text/x-java - -# Java HPROF dumps -# https://java.net/downloads/heap-snapshot/hprof-binary-format.html -0 string JAVA\x20PROFILE\x201.0. ->0x12 short 0 ->>0x11 ushort-0x31 <2 Java HPROF dump, ->>0x17 beqdate/1000 x created %s diff --git a/contrib/file/magic/Magdir/lisp b/contrib/file/magic/Magdir/lisp index db0592e..1109880 100644 --- a/contrib/file/magic/Magdir/lisp +++ b/contrib/file/magic/Magdir/lisp @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: lisp,v 1.24 2015/11/30 20:54:26 christos Exp $ +# $File: lisp,v 1.23 2009/09/19 16:28:10 christos Exp $ # lisp: file(1) magic for lisp programs # # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com) @@ -26,39 +26,16 @@ 0 search/4096 (custom-set-variables\ Lisp/Scheme program text !:mime text/x-lisp -# URL: https://en.wikipedia.org/wiki/Emacs_Lisp -# Reference: http://ftp.gnu.org/old-gnu/emacs/elisp-manual-18-1.03.tar.gz -# Update: Joerg Jenderek # Emacs 18 - this is always correct, but not very magical. -0 string \012( -# look for emacs lisp keywords -# GRR: split regex because it is too long or get error like -# lisp, 36: Warning: cannot get string from `^(defun|defvar|defconst|defmacro|setq|fset|put|provide|require|' ->&0 regex \^(defun|defvar|defconst|defmacro|setq|fset) Emacs v18 byte-compiled Lisp data +0 string \012( Emacs v18 byte-compiled Lisp data !:mime application/x-elc -# https://searchcode.com/codesearch/view/2173420/ -# not really pure text -!:apple EMAxTEXT -!:ext elc -# remaining regex ->&0 regex \^(put|provide|require|random) Emacs v18 byte-compiled Lisp data -!:mime application/x-elc -!:apple EMAxTEXT -!:ext elc -# missed cl.elc dbx.elc simple.elc look like normal lisp starting with ;;; - # Emacs 19+ - ver. recognition added by Ian Springer # Also applies to XEmacs 19+ .elc files; could tell them apart with regexs # - Chris Chittleborough <cchittleborough@yahoo.com.au> -# Update: Joerg Jenderek 0 string ;ELC -# version\0\0\0 ->4 byte >18 Emacs/XEmacs v%d byte-compiled Lisp data -# why less than 32 ? does not make sense to me. GNU Emacs version is 24.5 at April 2015 -#>4 byte <32 Emacs/XEmacs v%d byte-compiled Lisp data +>4 byte >18 +>4 byte <32 Emacs/XEmacs v%d byte-compiled Lisp data !:mime application/x-elc -!:apple EMAxTEXT -!:ext elc # Files produced by CLISP Common Lisp From: Bruno Haible <haible@ilog.fr> 0 string (SYSTEM::VERSION\040' CLISP byte-compiled Lisp program (pre 2004-03-27) diff --git a/contrib/file/magic/Magdir/mach b/contrib/file/magic/Magdir/mach index c1bec07..7782e5b 100644 --- a/contrib/file/magic/Magdir/mach +++ b/contrib/file/magic/Magdir/mach @@ -1,6 +1,6 @@ #------------------------------------------------------------ -# $File: mach,v 1.23 2015/10/15 21:51:22 christos Exp $ +# $File: mach,v 1.20 2015/05/21 18:28:41 christos Exp $ # Mach has two magic numbers, 0xcafebabe and 0xfeedface. # Unfortunately the first, cafebabe, is shared with # Java ByteCode, so they are both handled in the file "cafebabe". @@ -106,19 +106,15 @@ >>>4 belong&0x00ffffff 2 subarchitecture=%d >>>4 belong&0x00ffffff 3 subarchitecture=%d >>>4 belong&0x00ffffff 4 subarchitecture=%d ->>>4 belong&0x00ffffff 5 \bv4t ->>>4 belong&0x00ffffff 6 \bv6 ->>>4 belong&0x00ffffff 7 \bv5tej ->>>4 belong&0x00ffffff 8 \bxscale ->>>4 belong&0x00ffffff 9 \bv7 ->>>4 belong&0x00ffffff 10 \bv7f ->>>4 belong&0x00ffffff 11 \bv7s ->>>4 belong&0x00ffffff 12 \bv7k ->>>4 belong&0x00ffffff 13 \bv8 ->>>4 belong&0x00ffffff 14 \bv6m ->>>4 belong&0x00ffffff 15 \bv7m ->>>4 belong&0x00ffffff 16 \bv7em ->>>4 belong&0x00ffffff >16 subarchitecture=%d +>>>4 belong&0x00ffffff 5 \b_v4t +>>>4 belong&0x00ffffff 6 \b_v6 +>>>4 belong&0x00ffffff 7 \b_v5tej +>>>4 belong&0x00ffffff 8 \b_xscale +>>>4 belong&0x00ffffff 9 \b_v7 +>>>4 belong&0x00ffffff 10 \b_v7f +>>>4 belong&0x00ffffff 11 subarchitecture=%d +>>>4 belong&0x00ffffff 12 \b_v7k +>>>4 belong&0x00ffffff >12 subarchitecture=%d # 13 m88k >>0 belong&0x00ffffff 13 >>>4 belong&0x00ffffff 0 mc88000 @@ -162,15 +158,12 @@ >>>4 belong&0x00ffffff 2 subarchitecture=%d >>>4 belong&0x00ffffff 3 >>>4 belong&0x00ffffff 4 \b_arch1 ->>>4 belong&0x00ffffff 8 \b_haswell >>>4 belong&0x00ffffff >4 subarchitecture=%d >>0 belong&0x00ffffff 8 64-bit architecture=%d >>0 belong&0x00ffffff 9 64-bit architecture=%d >>0 belong&0x00ffffff 10 64-bit architecture=%d >>0 belong&0x00ffffff 11 64-bit architecture=%d ->>0 belong&0x00ffffff 12 arm64 ->>>4 belong&0x00ffffff 0 ->>>4 belong&0x00ffffff 1 \bv8 +>>0 belong&0x00ffffff 12 64-bit architecture=%d >>0 belong&0x00ffffff 13 64-bit architecture=%d >>0 belong&0x00ffffff 14 64-bit architecture=%d >>0 belong&0x00ffffff 15 64-bit architecture=%d @@ -210,34 +203,6 @@ >12 belong 11 kext bundle >12 belong >11 >>12 belong x filetype=%d ->24 belong >0 \b, flags:< ->>24 belong &0x0000001 \bNOUNDEFS ->>24 belong &0x0000002 \b|INCRLINK ->>24 belong &0x0000004 \b|DYLDLINK ->>24 belong &0x0000008 \b|BINDATLOAD ->>24 belong &0x0000010 \b|PREBOUND ->>24 belong &0x0000020 \b|SPLIT_SEGS ->>24 belong &0x0000040 \b|LAZY_INIT ->>24 belong &0x0000080 \b|TWOLEVEL ->>24 belong &0x0000100 \b|FORCE_FLAT ->>24 belong &0x0000200 \b|NOMULTIDEFS ->>24 belong &0x0000400 \b|NOFIXPREBINDING ->>24 belong &0x0000800 \b|PREBINDABLE ->>24 belong &0x0001000 \b|ALLMODSBOUND ->>24 belong &0x0002000 \b|SUBSECTIONS_VIA_SYMBOLS ->>24 belong &0x0004000 \b|CANONICAL ->>24 belong &0x0008000 \b|WEAK_DEFINES ->>24 belong &0x0010000 \b|BINDS_TO_WEAK ->>24 belong &0x0020000 \b|ALLOW_STACK_EXECUTION ->>24 belong &0x0040000 \b|ROOT_SAFE ->>24 belong &0x0080000 \b|SETUID_SAFE ->>24 belong &0x0100000 \b|NO_REEXPORTED_DYLIBS ->>24 belong &0x0200000 \b|PIE ->>24 belong &0x0400000 \b|DEAD_STRIPPABLE_DYLIB ->>24 belong &0x0800000 \b|HAS_TLV_DESCRIPTORS ->>24 belong &0x1000000 \b|NO_HEAP_EXECUTION ->>24 belong &0x2000000 \b|APP_EXTENSION_SAFE ->>24 belong x \b> # 0 lelong&0xfffffffe 0xfeedface Mach-O diff --git a/contrib/file/magic/Magdir/macintosh b/contrib/file/magic/Magdir/macintosh index d7f20f2..3ca2cab 100644 --- a/contrib/file/magic/Magdir/macintosh +++ b/contrib/file/magic/Magdir/macintosh @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: macintosh,v 1.26 2015/11/25 00:36:02 christos Exp $ +# $File: macintosh,v 1.25 2014/09/03 13:34:16 christos Exp $ # macintosh description # # BinHex is the Macintosh ASCII-encoded file format (see also "apple") @@ -297,14 +297,11 @@ >0x40e ubeshort 0x0003 # maximal length of volume name is 27 >>0x424 ubyte <28 Macintosh HFS data +#!:mime application/octet-stream +# these mime and apple types are not sure !:mime application/x-apple-diskimage #!:apple hfsdINIT #!:apple MACSdisk -# http://www.macdisk.com/macsigen.php -#!:apple ddskdevi -!:apple ????devi -# https://en.wikipedia.org/wiki/Apple_Disk_Image -!:ext hfs/dmg >>>0 beshort 0x4C4B (bootable) #>>>0 beshort 0x0000 (not bootable) >>>0x40a beshort &0x8000 (locked) diff --git a/contrib/file/magic/Magdir/microfocus b/contrib/file/magic/Magdir/microfocus deleted file mode 100644 index b2d204b..0000000 --- a/contrib/file/magic/Magdir/microfocus +++ /dev/null @@ -1,21 +0,0 @@ - -#------------------------------------------------------------------------------ -# $File: microfocus,v 1.1 2016/02/09 01:22:49 christos Exp $ -# Micro Focus COBOL data files. - -# http://documentation.microfocus.com/help/index.jsp?topic=\ -# %2FGUID-0E0191D8-C39A-44D1-BA4C-D67107BAF784%2FHRFLRHFILE05.html -# http://www.cobolproducts.com/datafile/data-viewer.html -# https://github.com/miracle2k/mfcobol-export - -0 string \x30\x00\x00\x7C ->36 string \x00\x3E Micro Focus File with Header (DAT) -!:mime application/octet-stream - -0 string \x30\x7E\x00\x00 ->36 string \x00\x3E Micro Focus File with Header (DAT) -!:mime application/octet-stream - -39 string \x02 ->136 string \x02\x02\x04\x04 Micro Focus Index File (IDX) -!:mime application/octet-stream diff --git a/contrib/file/magic/Magdir/misctools b/contrib/file/magic/Magdir/misctools index eeb518d..d09a543 100644 --- a/contrib/file/magic/Magdir/misctools +++ b/contrib/file/magic/Magdir/misctools @@ -1,6 +1,6 @@ #----------------------------------------------------------------------------- -# $File: misctools,v 1.16 2016/02/14 15:46:52 christos Exp $ +# $File: misctools,v 1.15 2015/04/15 18:29:30 christos Exp $ # misctools: file(1) magic for miscellaneous UNIX tools. # 0 search/1 %%!! X-Post-It-Note text @@ -29,35 +29,7 @@ 0 search/80 .lo\ -\ a\ libtool\ object\ file libtool object file # From: Daniel Novotny <dnovotny@redhat.com> -# Update: Joerg Jenderek -# URL: https://en.wikipedia.org/wiki/Core_dump#User-mode_memory_dumps -# Reference: https://msdn.microsoft.com/en-us/library/ms680378%28VS.85%29.aspx -# -# "Windows Minidump" by TrID -# ./misctools (version 5.25) labeled the entry as "MDMP crash report data" -0 string MDMP Mini DuMP crash report -# http://filext.com/file-extension/DMP -!:mime application/x-dmp -!:ext dmp/mdmp -# The high-order word is an internal value that is implementation specific. -# The low-order word is MINIDUMP_VERSION 0xA793 ->4 ulelong&0x0000FFFF !0xA793 \b, version 0x%4.4x -# NumberOfStreams 8,9,10,13 ->8 ulelong x \b, %d streams -# StreamDirectoryRva 0x20 ->12 ulelong !0x20 \b, 0x%8.8x RVA -# CheckSum 0 ->16 ulelong !0 \b, CheckSum 0x%8.8x -# Reserved or TimeDateStamp ->20 ledate x \b, %s -# https://msdn.microsoft.com/en-us/library/windows/desktop/ms680519%28v=vs.85%29.aspx -# Flags MINIDUMP_TYPE enumeration type 0 0x121 0x800 ->24 ulelong x \b, 0x%x type -# >24 ulelong >0 \b; include -# >>24 ulelong &0x00000001 \b data sections, -# >>24 ulelong &0x00000020 \b list of unloaded modules, -# >>24 ulelong &0x00000100 \b process and thread information, -# >>24 ulelong &0x00000800 \b memory information, +0 string MDMP\x93\xA7 MDMP crash report data # Summary: abook addressbook file # Submitted by: Mark Schreiber <mark7@alumni.cmu.edu> diff --git a/contrib/file/magic/Magdir/modem b/contrib/file/magic/Magdir/modem index e4decfd..d3bf7fa 100644 --- a/contrib/file/magic/Magdir/modem +++ b/contrib/file/magic/Magdir/modem @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: modem,v 1.7 2016/01/08 00:56:42 christos Exp $ +# $File: modem,v 1.6 2015/02/14 17:35:47 christos Exp $ # modem: file(1) magic for modem programs # # From: Florian La Roche <florian@knorke.saar.de> @@ -8,48 +8,8 @@ >29 byte 1 \b, fine resolution >29 byte 0 \b, normal resolution -# Summary: CCITT Group 3 Facsimile in "raw" form (i.e. no header). -# Modified by: Joerg Jenderek -# URL: https://de.wikipedia.org/wiki/Fax -# Reference: http://web.archive.org/web/20020628195336/http://www.netnam.vn/unescocourse/computervision/104.htm -# GRR: EOL of G3 is too general as it catches also TrueType fonts, Postscript PrinterFontMetric, others -0 short 0x0100 -# 16 0-bits near beginning like True Type fonts *.ttf, Postscript PrinterFontMetric *.pfm, FTYPE.HYPERCARD, XFER ->2 search/9 \0\0 -# maximal 7 0-bits for pixel sequences or 11 0-bits for EOL in G3 ->2 default x -# skip IRCAM file (VAX big-endian) ./audio ->>0 belong !0x0001a364 -# skip GEM Image data ./images ->>>2 beshort !0x0008 -# look for first keyword of Panorama database *.pan ->>>>11 search/262 \x06DESIGN -# skip Panorama database ->>>>11 default x -# old Apple DreamWorld DreamGrafix *.3200 with keyword at end of g3 looking files ->>>>>27118 search/1864 DreamWorld ->>>>>27118 default x -# skip MouseTrap/Mt.Defaults with file size 16 found on Golden Orchard Apple II CD Rom ->>>>>>8 ubequad !0x2e01010454010203 -# skip PICTUREH.SML found on Golden Orchard Apple II CD Rom ->>>>>>>8 ubequad !0x5dee74ad1aa56394 raw G3 (Group 3) FAX, byte-padded -# version 5.25 labeled the entry above "raw G3 data, byte-padded" -!:mime image/g3fax -#!:apple ????TIFF -!:ext g3 -# unusual image starting with black pixel -#0 short 0x1300 raw G3 (Group 3) FAX -0 short 0x1400 -# 16 0-bits near beginning like PicturePuzzler found on Golden Orchard Apple CD Rom ->2 search/9 \0\0 -# maximal 7 0-bits for pixel sequences or 11 0-bits for EOL in G3 ->2 default x raw G3 (Group 3) FAX -# version 5.25 labeled the above entry as "raw G3 data" -!:mime image/g3fax -!:ext g3 -# unusual image with black pixel near beginning -#0 short 0x1900 raw G3 (Group 3) FAX - +0 short 0x0100 raw G3 data, byte-padded +0 short 0x1400 raw G3 data # # Magic data for vgetty voice formats # (Martin Seine & Marc Eberhard) diff --git a/contrib/file/magic/Magdir/msdos b/contrib/file/magic/Magdir/msdos index 7755274..89c141e 100644 --- a/contrib/file/magic/Magdir/msdos +++ b/contrib/file/magic/Magdir/msdos @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: msdos,v 1.105 2016/03/03 18:58:14 christos Exp $ +# $File: msdos,v 1.101 2015/08/24 05:08:48 christos Exp $ # msdos: file(1) magic for MS-DOS files # @@ -24,11 +24,7 @@ 100 search/0xffff say >100 regex/c =^[\ \t]{0,10}say\ ['"] OS/2 REXX batch file text -# updated by Joerg Jenderek at Oct 2015 -# https://de.wikipedia.org/wiki/Common_Object_File_Format -# http://www.delorie.com/djgpp/doc/coff/filhdr.html -# ./intel already labeled COFF type 0x14c=0514 as "80386 COFF executable" -#0 leshort 0x14c MS Windows COFF Intel 80386 object file +0 leshort 0x14c MS Windows COFF Intel 80386 object file #>4 ledate x stamp %s 0 leshort 0x166 MS Windows COFF MIPS R4000 object file #>4 ledate x stamp %s @@ -409,31 +405,8 @@ #>>10 string x %-.8s #>4 uleshort&0x4000 0x4000 \b,control strings-support) -# updated by Joerg Jenderek -# GRR: line below too general as it catches also -# rt.lib DYADISKS.PIC and many more -# start with assembler instruction MOV -0 ubyte 0x8c -# skip "AppleWorks word processor data" like ARTICLE.1 ./apple ->4 string !O==== -# skip some unknown basic binaries like RocketRnger.SHR ->>5 string !MAIN -# skip "GPG symmetrically encrypted data" ./gnu -# skip "PGP symmetric key encrypted data" ./pgp -# openpgpdefs.h: fourth byte < 14 indicate cipher algorithm type ->>>4 ubyte >13 DOS executable (COM, 0x8C-variant) -# the remaining files should be DOS *.COM executables -# dosshell.COM 8cc0 2ea35f07 e85211 e88a11 b80058 cd -# hmload.COM 8cc8 8ec0 bbc02b 89dc 83c30f c1eb04 b4 -# UNDELETE.COM 8cca 2e8916 6503 b430 cd21 8b 2e0200 8b -# BOOTFIX.COM 8cca 2e8916 9603 b430 cd21 8b 2e0200 8b -# RAWRITE3.COM 8cca 2e8916 d602 b430 cd21 8b 2e0200 8b -# SHARE.COM 8cca 2e8916 d602 b430 cd21 8b 2e0200 8b -# validchr.COM 8cca 2e8916 9603 b430 cd21 8b 2e028b1e -# devload.COM 8cca 8916ad01 b430 cd21 8b2e0200 892e -!:mime application/x-dosexec -!:ext com - +# test too generic ? +0 byte 0x8c DOS executable (COM) # updated by Joerg Jenderek at Oct 2008 0 ulelong 0xffff10eb DR-DOS executable (COM) # byte 0xeb conflicts with "sequent" magic leshort 0xn2eb @@ -445,41 +418,23 @@ >>4 string \ $ARX DOS executable (COM), ARX self-extracting archive >>4 string \ $LHarc DOS executable (COM), LHarc self-extracting archive >>0x20e string SFX\ by\ LARC DOS executable (COM), LARC self-extracting archive -# updated by Joerg Jenderek at Oct 2008,2015 -# following line is too general -0 ubyte 0xb8 -# skip 2 linux kernels like memtest.bin with "\xb8\xc0\x07\x8e" in ./linux ->0 string !\xb8\xc0\x07\x8e +# updated by Joerg Jenderek at Oct 2008 +#0 byte 0xb8 COM executable +0 uleshort&0x80ff 0x00b8 # modified by Joerg Jenderek -# syslinux COM32 or COM32R executable ->>1 lelong&0xFFFFFFFe 0x21CD4CFe COM executable (32-bit COMBOOT -# http://www.syslinux.org/wiki/index.php/Comboot_API -# Since version 5.00 c32 modules switched from the COM32 object format to ELF -!:mime application/x-c32-comboot-syslinux-exec -!:ext c32 +>1 lelong !0x21cd4cff COM executable for DOS # http://syslinux.zytor.com/comboot.php -# older syslinux version ( <4 ) # (32-bit COMBOOT) programs *.C32 contain 32-bit code and run in flat-memory 32-bit protected mode # start with assembler instructions mov eax,21cd4cffh ->>>1 lelong 0x21CD4CFf \b) +0 uleshort&0xc0ff 0xc0b8 +>1 lelong 0x21cd4cff COM executable (32-bit COMBOOT) # syslinux:doc/comboot.txt # A COM32R program must start with the byte sequence B8 FE 4C CD 21 (mov # eax,21cd4cfeh) as a magic number. -# syslinux version (4.x) -# "COM executable (COM32R)" or "Syslinux COM32 module" by TrID ->>>1 lelong 0x21CD4CFe \b, relocatable) -# remaining are DOS COM executables starting with assembler instruction MOV -# like FreeDOS BANNER*.COM FINDDISK.COM GIF2RAW.COM WINCHK.COM -# MS-DOS SYS.COM RESTART.COM -# SYSLINUX.COM (version 1.40 - 2.13) -# GFXBOOT.COM (version 3.75) -# COPYBS.COM POWEROFF.COM INT18.COM ->>1 default x COM executable for DOS -!:mime application/x-dosexec -#!:mime application/x-ms-dos-executable -#!:mime application/x-msdos-program -!:ext com - +0 string/b \xb8\xfe\x4c\xcd\x21 COM executable (COM32R) +# start with assembler instructions mov eax,21cd4cfeh +0 uleshort&0xc0ff 0xc0b8 +>1 lelong 0x21cd4cfe COM executable (32-bit COMBOOT, relocatable) 0 string/b \x81\xfc >4 string \x77\x02\xcd\x20\xb9 >>36 string UPX! FREE-DOS executable (COM), UPX compressed @@ -914,7 +869,6 @@ # Windows Imaging (WIM) Image 0 string/b MSWIM\000\000\000 Windows imaging (WIM) image -0 string/b WLPWM\000\000\000 Windows imaging (WIM) image, wimlib pipable format # The second byte of these signatures is a file version; I don't know what, # if anything, produced files with version numbers 0-2. diff --git a/contrib/file/magic/Magdir/msvc b/contrib/file/magic/Magdir/msvc index bf4ab0c..1095d05 100644 --- a/contrib/file/magic/Magdir/msvc +++ b/contrib/file/magic/Magdir/msvc @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: msvc,v 1.6 2016/01/26 00:03:19 christos Exp $ +# $File: msvc,v 1.5 2009/09/19 16:28:11 christos Exp $ # msvc: file(1) magic for msvc # "H. Nanosecond" <aldomel@ix.netcom.com> # Microsoft visual C @@ -27,32 +27,11 @@ #.pch 0 string DTJPCH0\000\022\103\006\200 Microsoft Visual C .pch -# Summary: Symbol Table / Debug info used by Microsoft compilers -# URL: https://en.wikipedia.org/wiki/Program_database -# Reference: https://code.google.com/p/pdbparser/wiki/MSF_Format -# Update: Joerg Jenderek -# Note: test only for Windows XP+SP3 x86 , 8.1 x64 arm and 10.1 x86 -# info does only applies partly for older files like msvbvm50.pdb about year 2001 -0 string Microsoft\ C/C++\ -# "Microsoft Program DataBase" by TrID ->24 search/14 \r\n\x1A MSVC program database -!:mime application/x-ms-pdb -!:ext pdb -# "MSF 7.00" "program database 2.00" for msvbvm50.pdb ->>16 regex \([0-9.]+\) ver %s -#>>>0x38 search/128123456 /LinkInfo \b with linkinfo -# "MSF 7.00" variant ->>0x1e leshort 0 -# PageSize 400h 1000h ->>>0x20 lelong x \b, %d -# Page Count ->>>0x28 lelong x \b*%d bytes -# "program database 2.00" variant ->>0x1e leshort !0 -# PageSize 400h ->>>0x2c lelong x \b, %d -# Page Count for msoo-dll.pdb 4379h ->>>0x32 leshort x \b*%d bytes +# .pdb +# too long 0 string Microsoft\ C/C++\ program\ database\ +0 string Microsoft\ C/C++\ MSVC program database +>18 string program\ database\ +>33 string >\0 ver %s #.sbr 0 string \000\002\000\007\000 MSVC .sbr diff --git a/contrib/file/magic/Magdir/msx b/contrib/file/magic/Magdir/msx index ba5607c..0eacbe5 100644 --- a/contrib/file/magic/Magdir/msx +++ b/contrib/file/magic/Magdir/msx @@ -7,20 +7,20 @@ ############## MSX Music file formats ############## # Gigamix MGSDRV music file -0 string/b MGS MSX Gigamix MGSDRV3 music file, +0 string MGS MSX Gigamix MGSDRV3 music file, >6 ubeshort 0x0D0A >>3 byte x \bv%c >>4 byte x \b.%c >>5 byte x \b%c >>8 string >\0 \b, title: %s -1 string/b mgs2\ MSX Gigamix MGSDRV2 music file +1 string mgs2\ MSX Gigamix MGSDRV2 music file >6 uleshort 0x80 >>0x2E uleshort 0 >>>0x30 string >\0 \b, title: %s # KSS music file -0 string/b KSCC KSS music file v1.03 +0 string KSCC KSS music file v1.03 >0xE byte 0 >>0xF byte&0x02 0 \b, soundchips: AY-3-8910, SCC(+) >>0xF byte&0x02 2 \b, soundchip(s): SN76489 @@ -28,7 +28,7 @@ >>0xF byte&0x01 1 \b, YM2413 >>0xF byte&0x08 8 \b, Y8950 -0 string/b KSSX KSS music file v1.20 +0 string KSSX KSS music file v1.20 >0xE byte&0xEF 0 >>0xF byte&0x40 0x00 \b, 60Hz >>0xF byte&0x40 0x40 \b, 50Hz @@ -42,11 +42,11 @@ >>0xF byte&0x18 0x10 \b, Majyutsushi DAC # Moonblaster for Moonsound -0 string/b MBMS +0 string MBMS >4 byte 0x10 MSX Moonblaster for MoonSound music # Music Player K-kaz -0 string/b MPK MSX Music Player K-kaz song +0 string MPK MSX Music Player K-kaz song >6 ubeshort 0x0D0A >>3 byte x v%c >>4 byte x \b.%c @@ -70,7 +70,7 @@ >>>>>0 string >\32 \b, title: %s # SCMD music file -0x8B string/b SCMD +0x8B string SCMD >0xCE uleshort 0 MSX SCMD Music file #>>-2 uleshort 0x6a71 ; The file must end with this value. How to code this here? >>0x8F string >\0 \b, title: %s @@ -100,7 +100,7 @@ >>>3 uleshort >0x013D MSX Graph Saurus compressed image # Maki-chan Graphic format -0 string/b MAKI02\ \ Maki-chan image, +0 string MAKI02\ \ Maki-chan image, >8 byte x system ID: %c >9 byte x \b%c >10 byte x \b%c @@ -124,11 +124,11 @@ >>&3 ubyte&0x01 1 \b, 2:1 dot aspect ratio # Japanese PIC file -0 string/b PIC\x1A +0 string PIC\x1A >4 lelong 0 Japanese PIC image file # MSX G9B image file -0 string/b G9B +0 string G9B >1 uleshort 11 >>3 uleshort >10 >>>5 ubyte >0 MSX G9B image, depth=%d @@ -147,7 +147,7 @@ ############## Other MSX file formats ############## # MSX ROMs -0 string/b AB +0 string AB >2 uleshort 0x0010 MSX ROM >>2 uleshort x \b, init=0x%4x >>4 uleshort >0 \b, stat=0x%4x @@ -164,7 +164,7 @@ >>6 uleshort >0 \b, dev=0x%04x >>8 uleshort >0 \b, bas=0x%04x -0 string/b AB +0 string AB #>2 string 5JSuperLAYDOCK MSX Super Laydock ROM #>3 string @HYDLIDE3MSX MSX Hydlide-3 ROM #>3 string @3\x80IA862 Golvellius MSX1 ROM @@ -188,7 +188,7 @@ >>>6 uleshort 0 >>>>8 uleshort >0 MSX BASIC program in ROM, bas=0x%04x -0x4000 string/b AB +0x4000 string AB >0x4002 uleshort >0x4010 >>0x400A string \0\0\0\0\0\0 MSX MegaROM with nonstandard page order >>0x4002 uleshort x \b, init=0x%04x @@ -196,7 +196,7 @@ >>0x4006 uleshort >0 \b, dev=0x%04x >>0x4008 uleshort >0 \b, bas=0x%04x -0x8000 string/b AB +0x8000 string AB >0x8002 uleshort >0x4010 >>0x800A string \0\0\0\0\0\0 MSX MegaROM with nonstandard page order >>0x8002 uleshort x \b, init=0x%04x @@ -206,7 +206,7 @@ 0x3C000 string AB ->0x3C008 string/b \0\0\0\0\0\0\0\0 MSX MegaROM with nonstandard page order +>0x3C008 string \0\0\0\0\0\0\0\0 MSX MegaROM with nonstandard page order >>0x3C002 uleshort x \b, init=0x%04x >>0x3C004 uleshort >0 \b, stat=0x%04x >>0x3C006 uleshort >0 \b, dev=0x%04x diff --git a/contrib/file/magic/Magdir/netbsd b/contrib/file/magic/Magdir/netbsd index eb0847b..aa933ff 100644 --- a/contrib/file/magic/Magdir/netbsd +++ b/contrib/file/magic/Magdir/netbsd @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: netbsd,v 1.23 2015/11/29 01:55:14 christos Exp $ +# $File: netbsd,v 1.22 2014/12/08 20:53:52 christos Exp $ # netbsd: file(1) magic for NetBSD objects # # All new-style magic numbers are in network byte order. @@ -286,20 +286,3 @@ >4 leshort x \b, (headersize = %d >6 leshort x \b, segmentsize = %d >6 lelong x \b, segments = %d) - -# little endian only for now. -0 name ktrace ->4 leshort 7 ->>6 leshort <3 NetBSD ktrace file version %d ->>>12 string x from %s ->>>56 string x \b, emulation %s ->>>8 lelong <65536 \b, pid=%d - -56 string netbsd ->0 use ktrace -56 string linux ->0 use ktrace -56 string sunos ->0 use ktrace -56 string hpux ->0 use ktrace diff --git a/contrib/file/magic/Magdir/polyml b/contrib/file/magic/Magdir/polyml deleted file mode 100644 index 0af9baf..0000000 --- a/contrib/file/magic/Magdir/polyml +++ /dev/null @@ -1,23 +0,0 @@ - -#------------------------------------------------------------------------------ -# $File: polyml,v 1.1 2016/02/26 15:52:45 christos Exp $ -# polyml: file(1) magic for PolyML -# -# PolyML -# MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8) -# FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com) - -# [0]: http://www.polyml.org/ -# [1]: https://github.com/polyml/polyml/blob/master/\ -# libpolyml/savestate.cpp#L146-L147 -# [2]: https://github.com/polyml/polyml/blob/master/\ -# libpolyml/savestate.cpp#L1262-L1263 - -# Type: Poly/ML saved data -# From: Matthew Fernandez <matthew.fernandez@gmail.com> - -0 string POLYSAVE Poly/ML saved state ->8 long x version %u - -0 string POLYMODU Poly/ML saved module ->8 long x version %u diff --git a/contrib/file/magic/Magdir/psdbms b/contrib/file/magic/Magdir/psdbms index 1d218c0..09c733f 100644 --- a/contrib/file/magic/Magdir/psdbms +++ b/contrib/file/magic/Magdir/psdbms @@ -1,14 +1,8 @@ #------------------------------------------------------------------------------ -# $File: psdbms,v 1.7 2016/01/08 00:41:02 christos Exp $ +# $File: psdbms,v 1.6 2009/09/19 16:28:11 christos Exp $ # psdbms: file(1) magic for psdatabase # -# Update: Joerg Jenderek -# GRR: line below too general as it catches also some Panorama database *.pan , -# AppleWorks word processor -0 belong&0xff00ffff 0x56000000 -# assume version starts with digit ->1 regex/s =^[0-9] ps database ->>1 string >\0 version %s -# kernel name ->>4 string >\0 from kernel %s +0 belong&0xff00ffff 0x56000000 ps database +>1 string >\0 version %s +>4 string >\0 from kernel %s diff --git a/contrib/file/magic/Magdir/python b/contrib/file/magic/Magdir/python index 06da176..0668a93 100644 --- a/contrib/file/magic/Magdir/python +++ b/contrib/file/magic/Magdir/python @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: python,v 1.28 2015/09/16 22:19:54 christos Exp $ +# $File: python,v 1.27 2015/09/08 13:59:44 christos Exp $ # python: file(1) magic for python # # Outlook puts """ too for urgent messages @@ -26,16 +26,16 @@ 0 belong 0xee0c0d0a python 3.4 byte-compiled 0 search/1/w #!\ /usr/bin/python Python script text executable -!:strength + 15 +!:strength + 10 !:mime text/x-python 0 search/1/w #!\ /usr/local/bin/python Python script text executable -!:strength + 15 +!:strength + 10 !:mime text/x-python 0 search/1 #!/usr/bin/env\ python Python script text executable -!:strength + 15 +!:strength + 10 !:mime text/x-python 0 search/10 #!\ /usr/bin/env\ python Python script text executable -!:strength + 15 +!:strength + 10 !:mime text/x-python diff --git a/contrib/file/magic/Magdir/sendmail b/contrib/file/magic/Magdir/sendmail index 2900410..aeb6203 100644 --- a/contrib/file/magic/Magdir/sendmail +++ b/contrib/file/magic/Magdir/sendmail @@ -1,31 +1,14 @@ #------------------------------------------------------------------------------ -# $File: sendmail,v 1.8 2015/11/11 15:27:03 christos Exp $ +# $File: sendmail,v 1.7 2009/09/19 16:28:12 christos Exp $ # sendmail: file(1) magic for sendmail config files # # XXX - byte order? # -# Update: Joerg Jenderek -# GRR: this test is too general as it catches also -# READ.ME.FIRST.AWP Sendmail frozen configuration -# - version ====|====|====|====|====|====|====|====|====|====|====|====|=== -# Email_23_f217153422.ts Sendmail frozen configuration -# - version \330jK\354 -0 byte 046 -# http://www.sendmail.com/sm/open_source/docs/older_release_notes/ -# freezed configuration file (dbm format?) created from sendmal.cf with -bz -# by older sendmail. til version 8.6 support for frozen configuration files is removed -# valid version numbers look like "7.14.4" and should be simliar to output of commands -# "sendmail -d0 -bt < /dev/null |grep -i Version" or "egrep '^DZ' /etc/sendmail.cf" ->16 regex/s =^[0-78][0-9.]{4} Sendmail frozen configuration -# normally only /etc/sendmail.fc or /var/adm/sendmail/sendmail.fc -!:ext fc ->>16 string >\0 - version %s -0 short 0x271c -# look for valid version number ->16 regex/s =^[0-78][0-9.]{4} Sendmail frozen configuration -!:ext fc ->>16 string >\0 - version %s +0 byte 046 Sendmail frozen configuration +>16 string >\0 - version %s +0 short 0x271c Sendmail frozen configuration +>16 string >\0 - version %s #------------------------------------------------------------------------------ # sendmail: file(1) magic for sendmail m4(1) files diff --git a/contrib/file/magic/Magdir/sgml b/contrib/file/magic/Magdir/sgml index 28cbf87..0d48255 100644 --- a/contrib/file/magic/Magdir/sgml +++ b/contrib/file/magic/Magdir/sgml @@ -1,4 +1,4 @@ -#------------------------------------------------------------------------------ # $File: sgml,v 1.33 2015/11/29 22:14:49 christos Exp $ +#------------------------------------------------------------------------------ # $File: sgml,v 1.32 2015/07/11 15:08:53 christos Exp $ # Type: SVG Vectorial Graphics # From: Noel Torres <tecnico@ejerciciosresueltos.com> 0 string \<?xml\ version=" @@ -88,25 +88,25 @@ # Extensible markup language (XML), a subset of SGML # from Marc Prud'hommeaux (marc@apocalypse.org) 0 search/1/cwt \<?xml XML document text -!:mime text/xml +!:mime application/xml !:strength + 5 0 string/t \<?xml\ version\ " XML -!:mime text/xml +!:mime application/xml !:strength + 5 0 string/t \<?xml\ version=" XML -!:mime text/xml +!:mime application/xml !:strength + 5 >15 string/t >\0 %.3s document text >>23 search/1 \<xsl:stylesheet (XSL stylesheet) >>24 search/1 \<xsl:stylesheet (XSL stylesheet) 0 string \<?xml\ version=' XML -!:mime text/xml +!:mime application/xml !:strength + 5 >15 string/t >\0 %.3s document text >>23 search/1 \<xsl:stylesheet (XSL stylesheet) >>24 search/1 \<xsl:stylesheet (XSL stylesheet) 0 search/1/wt \<?XML broken XML document text -!:mime text/xml +!:mime application/xml !:strength - 10 diff --git a/contrib/file/magic/Magdir/sinclair b/contrib/file/magic/Magdir/sinclair index 6008892..5882a64 100644 --- a/contrib/file/magic/Magdir/sinclair +++ b/contrib/file/magic/Magdir/sinclair @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: sinclair,v 1.6 2015/11/14 13:38:35 christos Exp $ +# $File: sinclair,v 1.5 2009/09/19 16:28:12 christos Exp $ # sinclair: file(1) sinclair QL # additions to /etc/magic by Thomas M. Ott (ThMO) @@ -13,13 +13,20 @@ >4 string >\0 label:%.10s # Sinclair QL OS dump (ThMO) -0 belong =0x30000 ->49124 belong <47104 ->>49128 belong <47104 ->>>49132 belong <47104 ->>>>49136 belong <47104 QL OS dump data, ->>>>>49148 string >\0 type %.3s, ->>>>>49142 string >\0 version %.4s +# (NOTE: if `file' would be able to use indirect references in a endian format +# differing from the natural host format, this could be written more +# reliably and faster...) +# +# we *can't* lookup QL OS code dumps, because `file' is UNABLE to read more +# than the first 8K of a file... #-( +# +#0 belong =0x30000 +#>49124 belong <47104 +#>>49128 belong <47104 +#>>>49132 belong <47104 +#>>>>49136 belong <47104 QL OS dump data, +#>>>>>49148 string >\0 type %.3s, +#>>>>>49142 string >\0 version %.4s # Sinclair QL firmware executables (ThMO) 0 string NqNqNq`\004 QL firmware executable (BCPL) diff --git a/contrib/file/magic/Magdir/sql b/contrib/file/magic/Magdir/sql index 86f6869..c69f44f 100644 --- a/contrib/file/magic/Magdir/sql +++ b/contrib/file/magic/Magdir/sql @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: sql,v 1.18 2015/12/04 20:38:43 christos Exp $ +# $File: sql,v 1.15 2014/04/30 21:41:02 christos Exp $ # sql: file(1) magic for SQL files # # From: "Marty Leisner" <mleisner@eng.mc.xerox.com> @@ -54,32 +54,21 @@ # at offset 68 that is preferred over "user version" for indicating the # associated application. # -0 string SQLite\ format\ 3 SQLite 3.x database -!:mime application/x-sqlite3 -# seldom found extension sqlite3 like in SyncData.sqlite3 -# db -# Avira Antivir use extension "dbe" like in avevtdb.dbe, avguard_tchk.dbe -# Unfortunately extension sqlite also used for other databases starting with string -# "TTCONTAINER" like in tracks.sqlite contentconsumer.sqlite contentproducerrepository.sqlite -# and with string "ZV-zlib" in like extra.sqlite -!:ext sqlite/sqlite3/db/dbe ->60 belong =0x5f4d544e (Monotone source repository) ->68 belong =0x0f055112 (Fossil checkout) ->68 belong =0x0f055113 (Fossil global configuration) ->68 belong =0x0f055111 (Fossil repository) ->68 belong =0x42654462 (Bentley Systems BeSQLite Database) ->68 belong =0x42654c6e (Bentley Systems Localization File) ->68 belong =0x47504b47 (OGC GeoPackage file) ->68 default x +0 string SQLite\ format\ 3 +>60 belong =0x5f4d544e Monotone source repository - SQLite3 database +>68 belong =0x0f055112 Fossil checkout - SQLite3 database +>68 belong =0x0f055113 Fossil global configuration - SQLite3 database +>68 belong =0x0f055111 Fossil repository - SQLite3 database +>68 belong =0x42654462 Bentley Systems BeSQLite Database - SQLite3 database +>68 belong =0x42654c6e Bentley Systems Localization File - SQLite3 database +>68 belong =0x47504b47 OGC GeoPackage file - SQLite3 database +>68 default x SQLite 3.x database >>68 belong !0 \b, application id %u >>60 belong !0 \b, user version %d ->96 belong x \b, last written using SQLite version %d - # SQLite Write-Ahead Log from SQLite version >= 3.7.0 # http://www.sqlite.org/fileformat.html#walformat 0 belong&0xfffffffe 0x377f0682 SQLite Write-Ahead Log, -!:ext sqlite-wal/db-wal >4 belong x version %d # SQLite Rollback Journal @@ -87,10 +76,8 @@ 0 string \xd9\xd5\x05\xf9\x20\xa1\x63\xd7 SQLite Rollback Journal # Panasonic channel list database svl.bin or svl.db added by Joerg Jenderek -# https://github.com/PredatH0r/ChanSort -0 string PSDB\0 Panasonic channel list DataBase -!:ext db/bin -#!:mime application/x-db-svl-panasonic +# http://www.ullrich.es/job/service-menue/panasonic/panasonic-sendersortierung-sat-am-pc/ +# pceditor_V2003.jar +0 string PSDB\0 Panasonic channel list database >126 string SQLite\ format\ 3 -#!:mime application/x-panasonic-sqlite3 >>&-15 indirect x \b; contains diff --git a/contrib/file/magic/Magdir/terminfo b/contrib/file/magic/Magdir/terminfo index b201bca..97ea429 100644 --- a/contrib/file/magic/Magdir/terminfo +++ b/contrib/file/magic/Magdir/terminfo @@ -1,24 +1,10 @@ #------------------------------------------------------------------------------ -# $File: terminfo,v 1.7 2016/03/17 21:02:29 christos Exp $ +# $File: terminfo,v 1.6 2009/09/19 16:28:12 christos Exp $ # terminfo: file(1) magic for terminfo # # XXX - byte order for screen images? # -# URL: https://en.wikipedia.org/wiki/Terminfo -# Reference: ncurses-5.9/ncurses/tinfo/write_entry.c -# Update: Joerg Jenderek -# -# GRR: line below too general as it catches also -# Targa image type 1 with 26 long identification field -# and HELP.DSK -0 string \032\001 -# 5th character of terminal name list, but not Targa image pixel size (15 16 24 32) ->16 ubyte >32 -# namelist, if more than 1 separated by "|" like "st|stterm| simpleterm 0.4.1" ->>12 regex \^[a-zA-Z0-9][a-zA-Z0-9.][^|]* Compiled terminfo entry "%-s" -!:mime application/x-terminfo -# no extension -#!:ext +0 string \032\001 Compiled terminfo entry 0 short 0433 Curses screen image 0 short 0434 Curses screen image diff --git a/contrib/file/magic/Magdir/vacuum-cleaner b/contrib/file/magic/Magdir/vacuum-cleaner deleted file mode 100644 index eef78f2..0000000 --- a/contrib/file/magic/Magdir/vacuum-cleaner +++ /dev/null @@ -1,54 +0,0 @@ - -#------------------------------------------------------------------------------ -# $File: vacuum-cleaner,v 1.1 2015/11/14 13:38:35 christos Exp $ -# vacuum cleaner magic by Thomas M. Ott (ThMO) -# -# navigation map for LG robot vacuum cleaner models VR62xx, VR64xx, VR63xx -# file: MAPDATAyyyymmddhhmmss_xxxxxx_cc.blk -# -> yyyymmdd: year, month, day of cleaning -# -> hhmmss: hour, minute, second of cleaning -# -> xxxxxx: 6 digits -# -> cc: cleaning runs counter -# size: 136044 bytes -# -# struct maphdr { -# int32_t map_cnt; /* 0: single map */ -# int32_t min_ceil; /* 4: 100 mm == 10 cm == min. ceil */ -# int32_t max_ceil; /* 8: 10000 mm == 100 m == max. ceil */ -# int32_t max_climb; /* 12: 50 mm = 5 cm == max. height to climb */ -# int32_t unknown; /* 16: 50000 ??? */ -# int32_t cell_bytes; /* 20: # of bytes for cells per block */ -# int32_t block_max; /* 24: 1000 == max. # of blocks */ -# int32_t route_max; /* 28: 1000 == max. # of routes */ -# int32_t used_blocks; /* 32: 5/45/33/... == # of block entries used! */ -# int32_t cell_dim; /* 36: 10 == cell dimension */ -# int32_t clock_tick; /* 40: 100 == clock ticks */ -# #if 0 -# struct { /* 44: 1000 blocks for 10x10 cells */ -# int32_t yoffset; -# int32_t xoffset; -# int32_t posxy; -# int32_t timecode; -# } blocks[ 1000]; -# char cells[ 1000* 100]; /* 16044: 1000 10x10 cells */ -# int16_t routes[ 1000* 10]; /* 116044: 1000 10-routes */ -# #endif -# }; - -0 lelong =1 ->4 lelong =100 ->>8 lelong =10000 ->>>12 lelong =50 ->>>>16 lelong =50000 ->>>>>20 lelong =100 ->>>>>>24 lelong =1000 ->>>>>>>28 lelong =1000 ->>>>>>>>36 lelong =10 ->>>>>>>>>40 lelong =100 ->>>>>>>>>>32 lelong x LG robot VR6[234]xx %dm^2 navigation ->>>>>>>>>>136040 lelong =-1 reuse map data ->>>>>>>>>>136040 lelong =0 map data ->>>>>>>>>>136040 lelong >0 spurious map data ->>>>>>>>>>136040 lelong <-1 spurious map data - - diff --git a/contrib/file/magic/Magdir/windows b/contrib/file/magic/Magdir/windows index faaa7e2..7e0d4d1 100644 --- a/contrib/file/magic/Magdir/windows +++ b/contrib/file/magic/Magdir/windows @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: windows,v 1.14 2015/12/15 01:06:17 christos Exp $ +# $File: windows,v 1.12 2015/08/29 07:10:35 christos Exp $ # windows: file(1) magic for Microsoft Windows # # This file is mainly reserved for files where programs @@ -64,148 +64,10 @@ # Summary: Old format help files -# URL: https://en.wikipedia.org/wiki/WinHelp -# Reference: http://www.oocities.org/mwinterhoff/helpfile.htm -# Update: Joerg Jenderek +# Extension: .hlp # Created by: Dirk Jagdmann <doj@cubic.org> -# -# check and then display version and date inside MS Windows HeLP file fragment -0 name help-ver-date -# look for Magic of SYSTEMHEADER ->0 leshort 0x036C -# version Major 1 for right file fragment ->>4 leshort 1 Windows -# print non empty string above to avoid error message -# Warning: Current entry does not yet have a description for adding a MIME type -!:mime application/winhelp -!:ext hlp -# version Minor of help file format is hint for windows version ->>>2 leshort 0x0F 3.x ->>>2 leshort 0x15 3.0 ->>>2 leshort 0x21 3.1 ->>>2 leshort 0x27 x.y ->>>2 leshort 0x33 95 ->>>2 default x y.z ->>>>2 leshort x 0x%x -# to complete message string like "MS Windows 3.x help file" ->>>2 leshort x help -# GenDate often older than file creation date ->>>6 ldate x \b, %s -# -# Magic for HeLP files -0 lelong 0x00035f3f -# ./windows (version 5.25) labeled the entry as "MS Windows 3.x help file" -# file header magic 0x293B at DirectoryStart+9 ->(4.l+9) uleshort 0x293B MS -# look for @VERSION bmf.. like IBMAVW.ANN ->>0xD4 string =\x62\x6D\x66\x01\x00 Windows help annotation -!:mime application/x-winhelp -!:ext ann ->>0xD4 string !\x62\x6D\x66\x01\x00 -# "GID Help index" by TrID ->>>(4.l+0x65) string =|Pete Windows help Global Index -!:mime application/x-winhelp -!:ext gid -# HeLP Bookmark or -# "Windows HELP File" by TrID ->>>(4.l+0x65) string !|Pete -# maybe there exist a cleaner way to detect HeLP fragments -# brute search for Magic 0x036C with matching Major maximal 7 iterations -# discapp.hlp ->>>>16 search/0x49AF/s \x6c\x03 ->>>>>&0 use help-ver-date ->>>>>&4 leshort !1 -# putty.hlp ->>>>>>&0 search/0x69AF/s \x6c\x03 ->>>>>>>&0 use help-ver-date ->>>>>>>&4 leshort !1 ->>>>>>>>&0 search/0x49AF/s \x6c\x03 ->>>>>>>>>&0 use help-ver-date ->>>>>>>>>&4 leshort !1 ->>>>>>>>>>&0 search/0x49AF/s \x6c\x03 ->>>>>>>>>>>&0 use help-ver-date ->>>>>>>>>>>&4 leshort !1 ->>>>>>>>>>>>&0 search/0x49AF/s \x6c\x03 ->>>>>>>>>>>>>&0 use help-ver-date ->>>>>>>>>>>>>&4 leshort !1 ->>>>>>>>>>>>>>&0 search/0x49AF/s \x6c\x03 ->>>>>>>>>>>>>>>&0 use help-ver-date ->>>>>>>>>>>>>>>&4 leshort !1 ->>>>>>>>>>>>>>>>&0 search/0x49AF/s \x6c\x03 -# GCC.HLP is detected after 7 iterations ->>>>>>>>>>>>>>>>>&0 use help-ver-date -# this only happens if bigger hlp file is detected after used search iterations ->>>>>>>>>>>>>>>>>&4 leshort !1 Windows y.z help -!:mime application/winhelp -!:ext hlp -# repeat search again or following default line does not work ->>>>16 search/0x49AF/s \x6c\x03 -# remaining files should be HeLP Bookmark WinHlp32.BMK (XP 32-bit) or WinHlp32 (Windows 8.1 64-bit) ->>>>16 default x Windows help Bookmark -!:mime application/x-winhelp -!:ext /bmk -## FirstFreeBlock normally FFFFFFFFh 10h for *ANN -##>>8 lelong x \b, FirstFreeBlock 0x%8.8x -# EntireFileSize ->>12 lelong x \b, %d bytes -## ReservedSpace normally 042Fh AFh for *.ANN -#>>(4.l) lelong x \b, ReservedSpace 0x%8.8x -## UsedSpace normally 0426h A6h for *.ANN -#>>(4.l+4) lelong x \b, UsedSpace 0x%8.8x -## FileFlags normally 04... -#>>(4.l+5) lelong x \b, FileFlags 0x%8.8x -## file header magic 0x293B -#>>(4.l+9) uleshort x \b, file header magic 0x%4.4x -## file header Flags 0x0402 -#>>(4.l+11) uleshort x \b, file header Flags 0x%4.4x -## file header PageSize 0400h 80h for *.ANN -#>>(4.l+13) uleshort x \b, PageSize 0x%4.4x -## Structure[16] z4 -#>>(4.l+15) string >\0 \b, Structure_"%-.16s" -## MustBeZero 0 -#>>(4.l+31) uleshort x \b, MustBeZero 0x%4.4x -## PageSplits -#>>(4.l+33) uleshort x \b, PageSplits 0x%4.4x -## RootPage -#>>(4.l+35) uleshort x \b, RootPage 0x%4.4x -## MustBeNegOne 0xffff -#>>(4.l+37) uleshort x \b, MustBeNegOne 0x%4.4x -## TotalPages 1 -#>>(4.l+39) uleshort x \b, TotalPages 0x%4.4x -## NLevels 0x0001 -#>>(4.l+41) uleshort x \b, NLevels 0x%4.4x -## TotalBtreeEntries -#>>(4.l+43) ulelong x \b, TotalBtreeEntries 0x%8.8x -## pages of the B+ tree -#>>(4.l+47) ubequad x \b, PageStart 0x%16.16llx +0 lelong 0x00035f3f MS Windows 3.x help file -# start with colon or semicolon for comment line like Back2Life.cnt -0 regex \^(:|;) -# look for first keyword Base ->0 search/45 :Base ->>&0 use cnt-name -# only solution to search again from beginning , because relative offsets changes when use is called ->0 search/45 :Base ->0 default x -# look for other keyword Title like in putty.cnt ->>0 search/45 :Title ->>>&0 use cnt-name -# -# display mime type and name of Windows help Content source -0 name cnt-name -# skip space at beginning ->0 string \ -# name without extension and greater character or name with hlp extension ->>1 regex/c \^([^\xd>]*|.*\.hlp) MS Windows help file Content, based "%s" -!:mime text/plain -!:apple ????TEXT -!:ext cnt -# -# Windows creates an full text search from hlp file, if the user clicks the "Find" tab and enables keyword indexing -0 string tfMR MS Windows help Full Text Search index -!:mime application/x-winhelp-fts -!:ext fts ->16 string >\0 for "%s" # Summary: Hyper terminal # Extension: .ht @@ -474,102 +336,3 @@ >>>>>4 ulelong&0x00000001 !0x00000001 >>>>>>(84.l) string >\0 InfName "%s" -# Summary: backup file created with utility like NTBACKUP.EXE shipped with Windows NT/2K/XP/2003 -# Extension: .bkf -# Created by: Joerg Jenderek -# URL: http://en.wikipedia.org/wiki/NTBackup -# Reference: http://laytongraphics.com/mtf/MTF_100a.PDF -# Descriptor BloCK name of Microsoft Tape Format -0 string TAPE -# Format Logical Address is zero ->20 ulequad 0 -# Reserved for MBC is zero ->>28 uleshort 0 -# Control Block ID is zero ->>>36 ulelong 0 -# BIT4-BIT15, BIT18-BIT31 of block attributes are unused ->>>>4 ulelong&0xFFfcFFe0 0 Windows NTbackup archive -#!:mime application/x-ntbackup -!:ext bkf -# OS ID ->>>>>10 ubyte 1 \b NetWare ->>>>>10 ubyte 13 \b NetWare SMS ->>>>>10 ubyte 14 \b NT ->>>>>10 ubyte 24 \b 3 ->>>>>10 ubyte 25 \b OS/2 ->>>>>10 ubyte 26 \b 95 ->>>>>10 ubyte 27 \b Macintosh ->>>>>10 ubyte 28 \b UNIX -# OS Version (2) -#>>>>>11 ubyte x OS V=%x -# MTF_CONTINUATION Media Sequence Number > 1 -#>>>>>4 ulelong&0x00000001 !0 \b, continued -# MTF_COMPRESSION ->>>>>4 ulelong&0x00000004 !0 \b, compressed -# MTF_EOS_AT_EOM End Of Medium was hit during end of set processing ->>>>>4 ulelong&0x00000008 !0 \b, End Of Medium hit ->>>>>4 ulelong&0x00020000 0 -# MTF_SET_MAP_EXISTS A Media Based Catalog Set Map may exist on tape ->>>>>>4 ulelong&0x00010000 !0 \b, with catalog -# MTF_FDD_ALLOWED However File/Directory Detail can only exist if a Set Map is also present ->>>>>4 ulelong&0x00020000 !0 \b, with file catalog -# Offset To First Event 238h,240h,28Ch -#>>>>>8 uleshort x \b, event offset %4.4x -# Displayable Size (20e0230h 20e024ch 20e0224h) -#>>>>>8 ulequad x dis. size %16.16llx -# Media Family ID (455288C4h 4570BD1Ah 45708F2Fh 4570BBF5h) -#>>>>>52 ulelong x family ID %8.8x -# TAPE Attributes (3) -#>>>>>56 ulelong x TAPE %8.8x -# Media Sequence Number ->>>>>60 uleshort >1 \b, sequence %u -# Password Encryption Algorithm (3) ->>>>>62 uleshort >0 \b, 0x%x encrypted -# Soft Filemark Block Size * 512 (2) -#>>>>>64 uleshort =2 \b, soft size %u*512 ->>>>>64 uleshort !2 \b, soft size %u*512 -# Media Based Catalog Type (1,2) -#>>>>>66 uleshort x \b, catalog type %4.4x -# size of Media Name (66,68,6Eh) ->>>>>68 uleshort >0 -# offset of Media Name (5Eh) ->>>>>>70 uleshort >0 -# 0~, 1~ANSI, 2~UNICODE ->>>>>>>48 ubyte 1 -# size terminated ansi coded string normally followed by "MTF Media Label" ->>>>>>>>(70.s) string >\0 \b, name: %s ->>>>>>>48 ubyte 2 -# Not null, but size terminated unicoded string ->>>>>>>>(70.s) lestring16 x \b, name: %s -# size of Media Label (104h) ->>>>>72 uleshort >0 -# offset of Media Label (C4h,C6h,CCh) ->>>>>74 uleshort >0 ->>>>>>48 ubyte 1 -#Tag|Version|Vendor|Vendor ID|Creation Time Stamp|Cartridge Label|Side|Media ID|Media Domain ID|Vendor Specific fields ->>>>>>>(74.s) string >\0 \b, label: %s ->>>>>>48 ubyte 2 ->>>>>>>(74.s) lestring16 x \b, label: %s -# size of password name (0,1Ch) -#>>>>>76 uleshort >0 \b, password size %4.4x -# Software Vendor ID (CBEh) ->>>>>86 uleshort x \b, software (0x%x) -# size of Software Name (6Eh) ->>>>>80 uleshort >0 -# offset of Software Name (1C8h,1CAh,1D0h) ->>>>>>82 uleshort >0 -# 1~ANSI, 2~UNICODE ->>>>>>>48 ubyte 1 ->>>>>>>>(82.s) string >\0 \b: %s ->>>>>>>48 ubyte 2 -# size terminated unicoded coded string normally followed by "SPAD" ->>>>>>>>(82.s) lestring16 x \b: %s -# Format Logical Block Size (512,1024) -#>>>>>84 uleshort =1024 \b, block size %u ->>>>>84 uleshort !1024 \b, block size %u -# Media Date of MTF_DATE_TIME type with 5 bytes -#>>>>>>88 ubequad x DATE %16.16llx -# MTF Major Version (1) -#>>>>>>93 ubyte x \b, MFT version %x -# - diff --git a/contrib/file/magic/Magdir/wordprocessors b/contrib/file/magic/Magdir/wordprocessors index a7cfab7..951f603 100644 --- a/contrib/file/magic/Magdir/wordprocessors +++ b/contrib/file/magic/Magdir/wordprocessors @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: wordprocessors,v 1.19 2015/10/16 15:11:07 christos Exp $ +# $File: wordprocessors,v 1.18 2013/06/03 19:07:29 christos Exp $ # wordprocessors: file(1) magic fo word processors. # ####### PWP file format used on Smith Corona Personal Word Processors: @@ -12,187 +12,97 @@ >25 byte 0x54 \b, legal >26 byte 0x46 \b, A4 -# Corel/WordPerfect -0 string \xffWPC -# WordPerfect ->8 byte 1 ->>9 byte 1 WordPerfect macro ->>9 byte 2 WordPerfect help file ->>9 byte 3 WordPerfect keyboard file ->>9 byte 10 WordPerfect document ->>9 byte 11 WordPerfect dictionary ->>9 byte 12 WordPerfect thesaurus ->>9 byte 13 WordPerfect block ->>9 byte 14 WordPerfect rectangular block ->>9 byte 15 WordPerfect column block ->>9 byte 16 WordPerfect printer data ->>9 byte 19 WordPerfect printer data ->>9 byte 20 WordPerfect driver resource data ->>9 byte 22 WordPerfect graphic image ->>9 byte 23 WordPerfect hyphenation code ->>9 byte 24 WordPerfect hyphenation data ->>9 byte 25 WordPerfect macro resource data ->>9 byte 27 WordPerfect hyphenation lex ->>9 byte 29 WordPerfect wordlist ->>9 byte 30 WordPerfect equation resource data ->>9 byte 33 WordPerfect spell rules ->>9 byte 34 WordPerfect dictionary rules ->>9 byte 39 WordPerfect spell rules (Microlytics) ->>9 byte 43 WordPerfect settings file ->>9 byte 44 WordPerfect 3.5 document ->>9 byte 45 WordPerfect 4.2 document ->>9 byte 69 WordPerfect dialog file ->>9 byte 76 WordPerfect button bar ->>9 default x ->>>9 byte x Corel WordPerfect: Unknown filetype %d -# Corel Shell ->8 byte 2 ->>9 byte 1 Corel shell macro ->>9 byte 10 Corel shell definition ->>9 default x ->>>9 byte x Corel Shell: Unknown filetype %d -# Corel Notebook ->8 byte 3 ->>9 byte 1 Corel Notebook macro ->>9 byte 2 Corel Notebook help file ->>9 byte 3 Corel Notebook keyboard file ->>9 byte 10 Corel Notebook definition ->>9 default x ->>>9 byte x Corel Notebook: Unknown filetype %d -# Corel Calculator ->8 byte 4 ->>9 byte 2 Corel Calculator help file ->>9 default x ->>>9 byte x Corel Calculator: Unknown filetype %d -# Corel File Manager ->8 byte 5 ->>9 default x ->>>9 byte x Corel File Manager: Unknown filetype %d -# Corel Calendar ->8 byte 6 ->>9 byte 2 Corel Calendar help file ->>9 byte 10 Corel Calendar data file ->>9 default x ->>>9 byte x Corel Calendar: Unknown filetype %d -# Corel Program Editor/Ed Editor ->8 byte 7 ->>9 byte 1 Corel Editor macro ->>9 byte 2 Corel Editor help file ->>9 byte 3 Corel Editor keyboard file ->>9 byte 25 Corel Editor macro resource file ->>9 default x ->>>9 byte x Corel Program Editor/Ed Editor: Unknown filetype %d -# Corel Macro Editor ->8 byte 8 ->>9 byte 1 Corel Macro editor macro ->>9 byte 2 Corel Macro editor help file ->>9 byte 3 Corel Macro editor keyboard file ->>9 default x ->>>9 byte x Corel Macro Editor: Unknown filetype %d -# Corel Plan Perfect ->8 byte 9 ->>9 default x ->>>9 byte x Corel Plan Perfect: Unknown filetype %d -# Corel DataPerfect ->8 byte 10 -# CHECK: Don't these belong into product 9? ->>9 byte 1 Corel PlanPerfect macro ->>9 byte 2 Corel PlanPerfect help file ->>9 byte 3 Corel PlanPerfect keyboard file ->>9 byte 10 Corel PlanPerfect worksheet ->>9 byte 15 Corel PlanPerfect printer definition ->>9 byte 18 Corel PlanPerfect graphic definition ->>9 byte 19 Corel PlanPerfect data ->>9 byte 20 Corel PlanPerfect temporary printer ->>9 byte 25 Corel PlanPerfect macro resource data ->>9 default x ->>>9 byte x Corel DataPerfect: Unknown filetype %d -# Corel Mail ->8 byte 11 ->>9 byte 2 Corel Mail help file ->>9 byte 5 Corel Mail distribution list ->>9 byte 10 Corel Mail out box ->>9 byte 11 Corel Mail in box ->>9 byte 20 Corel Mail users archived mailbox ->>9 byte 21 Corel Mail archived message database ->>9 byte 22 Corel Mail archived attachments ->>9 default x ->>>9 byte x Corel Mail: Unknown filetype %d -# Corel Printer ->8 byte 12 ->>9 byte 11 Corel Printer temporary file ->>9 default x ->>>9 byte x Corel Printer: Unknown filetype %d -# Corel Scheduler ->8 byte 13 ->>9 byte 2 Corel Scheduler help file ->>9 byte 10 Corel Scheduler in file ->>9 byte 11 Corel Scheduler out file ->>9 default x ->>>9 byte x Corel Scheduler: Unknown filetype %d -# Corel WordPerfect Office ->8 byte 14 ->>9 byte 10 Corel GroupWise settings file ->>9 byte 17 Corel GroupWise directory services ->>9 byte 43 Corel GroupWise settings file ->>9 default x ->>>9 byte x Corel WordPerfect Office: Unknown filetype %d -# Corel DrawPerfect ->8 byte 15 ->>9 default x ->>>9 byte x Corel DrawPerfect: Unknown filetype %d -# Corel LetterPerfect ->8 byte 16 ->>9 default x ->>>9 byte x Corel LetterPerfect: Unknown filetype %d -# Corel Terminal ->8 byte 17 ->>9 byte 10 Corel Terminal resource data ->>9 byte 11 Corel Terminal resource data ->>9 byte 43 Corel Terminal resource data ->>9 default x ->>>9 byte x Corel Terminal: Unknown filetype %d -# Corel loadable file ->8 byte 18 ->>9 byte 10 Corel loadable file ->>9 byte 11 Corel GUI loadable text ->>9 byte 12 Corel graphics resource data ->>9 byte 13 Corel printer settings file ->>9 byte 14 Corel port definition file ->>9 byte 15 Corel print queue parameters ->>9 byte 16 Corel compressed file ->>9 default x ->>>9 byte x Corel loadable file: Unknown filetype %d ->>15 byte 0 \b, optimized for Intel ->>15 byte 1 \b, optimized for Non-Intel -# Network service ->8 byte 20 ->>9 byte 10 Corel Network service msg file ->>9 byte 11 Corel Network service msg file ->>9 byte 12 Corel Async gateway login msg ->>9 byte 14 Corel GroupWise message file ->>9 default x ->>>9 byte x Corel Network service: Unknown filetype %d -# GroupWise ->8 byte 31 ->>9 byte 20 GroupWise admin domain database ->>9 byte 21 GroupWise admin host database ->>9 byte 23 GroupWise admin remote host database ->>9 byte 24 GroupWise admin ADS deferment data file ->>9 default x ->>>9 byte x GroupWise: Unknown filetype %d -# IntelliTAG ->8 byte 33 ->>9 byte 10 IntelliTAG (SGML) compiled DTD ->>9 default x ->>>9 byte x IntelliTAG: Unknown filetype %d -# everything else ->8 default x ->>8 byte x Unknown Corel/Wordperfect product %d, ->>>9 byte x file type %d ->10 byte 0 \b, v5. ->10 byte !0 \b, v%d. ->11 byte x \b%d +#WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE +0 string \377WPC\020\000\000\000\022\012\001\001\000\000\000\000 (WP) loadable file +>15 byte 0 Optimized for Intel +>15 byte 1 Optimized for Non-Intel +1 string WPC (Corel/WP) +>8 short 257 WordPerfect macro +>8 short 258 WordPerfect help file +>8 short 259 WordPerfect keyboard file +>8 short 266 WordPerfect document +>8 short 267 WordPerfect dictionary +>8 short 268 WordPerfect thesaurus +>8 short 269 WordPerfect block +>8 short 270 WordPerfect rectangular block +>8 short 271 WordPerfect column block +>8 short 272 WordPerfect printer data +>8 short 275 WordPerfect printer data +>8 short 276 WordPerfect driver resource data +>8 short 279 WordPerfect hyphenation code +>8 short 280 WordPerfect hyphenation data +>8 short 281 WordPerfect macro resource data +>8 short 283 WordPerfect hyphenation lex +>8 short 285 WordPerfect wordlist +>8 short 286 WordPerfect equation resource data +>8 short 289 WordPerfect spell rules +>8 short 290 WordPerfect dictionary rules +>8 short 295 WordPerfect spell rules (Microlytics) +>8 short 299 WordPerfect settings file +>8 short 301 WordPerfect 4.2 document +>8 short 325 WordPerfect dialog file +>8 short 332 WordPerfect button bar +>8 short 513 Shell macro +>8 short 522 Shell definition +>8 short 769 Notebook macro +>8 short 770 Notebook help file +>8 short 771 Notebook keyboard file +>8 short 778 Notebook definition +>8 short 1026 Calculator help file +>8 short 1538 Calendar help file +>8 short 1546 Calendar data file +>8 short 1793 Editor macro +>8 short 1794 Editor help file +>8 short 1795 Editor keyboard file +>8 short 1817 Editor macro resource file +>8 short 2049 Macro editor macro +>8 short 2050 Macro editor help file +>8 short 2051 Macro editor keyboard file +>8 short 2305 PlanPerfect macro +>8 short 2306 PlanPerfect help file +>8 short 2307 PlanPerfect keyboard file +>8 short 2314 PlanPerfect worksheet +>8 short 2319 PlanPerfect printer definition +>8 short 2322 PlanPerfect graphic definition +>8 short 2323 PlanPerfect data +>8 short 2324 PlanPerfect temporary printer +>8 short 2329 PlanPerfect macro resource data +>8 byte 11 Mail +>8 short 2818 help file +>8 short 2821 distribution list +>8 short 2826 out box +>8 short 2827 in box +>8 short 2836 users archived mailbox +>8 short 2837 archived message database +>8 short 2838 archived attachments +>8 short 3083 Printer temporary file +>8 short 3330 Scheduler help file +>8 short 3338 Scheduler in file +>8 short 3339 Scheduler out file +>8 short 3594 GroupWise settings file +>8 short 3601 GroupWise directory services +>8 short 3627 GroupWise settings file +>8 short 4362 Terminal resource data +>8 short 4363 Terminal resource data +>8 short 4395 Terminal resource data +>8 short 4619 GUI loadable text +>8 short 4620 graphics resource data +>8 short 4621 printer settings file +>8 short 4622 port definition file +>8 short 4623 print queue parameters +>8 short 4624 compressed file +>8 short 5130 Network service msg file +>8 short 5131 Network service msg file +>8 short 5132 Async gateway login msg +>8 short 5134 GroupWise message file +>8 short 7956 GroupWise admin domain database +>8 short 7957 GroupWise admin host database +>8 short 7959 GroupWise admin remote host database +>8 short 7960 GroupWise admin ADS deferment data file +>8 short 8458 IntelliTAG (SGML) compiled DTD +>8 long 18219264 WordPerfect graphic image (1.0) +>8 long 18219520 WordPerfect graphic image (2.0) +#end of WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE # Hangul (Korean) Word Processor File 0 string HWP\ Document\ File Hangul (Korean) Word Processor File 3.0 diff --git a/contrib/file/magic/Makefile.am b/contrib/file/magic/Makefile.am index a5ed8ab..cb62f95 100644 --- a/contrib/file/magic/Makefile.am +++ b/contrib/file/magic/Makefile.am @@ -1,5 +1,5 @@ # -# $File: Makefile.am,v 1.113 2016/02/26 15:52:45 christos Exp $ +# $File: Makefile.am,v 1.103 2015/03/17 15:15:12 christos Exp $ # MAGIC_FRAGMENT_BASE = Magdir MAGIC_DIR = $(top_srcdir)/magic @@ -30,7 +30,6 @@ $(MAGIC_FRAGMENT_DIR)/att3b \ $(MAGIC_FRAGMENT_DIR)/audio \ $(MAGIC_FRAGMENT_DIR)/basis \ $(MAGIC_FRAGMENT_DIR)/bflt \ -$(MAGIC_FRAGMENT_DIR)/bioinformatics \ $(MAGIC_FRAGMENT_DIR)/blackberry \ $(MAGIC_FRAGMENT_DIR)/blcr \ $(MAGIC_FRAGMENT_DIR)/blender \ @@ -51,7 +50,6 @@ $(MAGIC_FRAGMENT_DIR)/citrus \ $(MAGIC_FRAGMENT_DIR)/clarion \ $(MAGIC_FRAGMENT_DIR)/claris \ $(MAGIC_FRAGMENT_DIR)/clipper \ -$(MAGIC_FRAGMENT_DIR)/coff \ $(MAGIC_FRAGMENT_DIR)/commands \ $(MAGIC_FRAGMENT_DIR)/communications \ $(MAGIC_FRAGMENT_DIR)/compress \ @@ -64,7 +62,6 @@ $(MAGIC_FRAGMENT_DIR)/cubemap \ $(MAGIC_FRAGMENT_DIR)/cups \ $(MAGIC_FRAGMENT_DIR)/dact \ $(MAGIC_FRAGMENT_DIR)/database \ -$(MAGIC_FRAGMENT_DIR)/der \ $(MAGIC_FRAGMENT_DIR)/diamond \ $(MAGIC_FRAGMENT_DIR)/diff \ $(MAGIC_FRAGMENT_DIR)/digital \ @@ -81,9 +78,7 @@ $(MAGIC_FRAGMENT_DIR)/erlang \ $(MAGIC_FRAGMENT_DIR)/esri \ $(MAGIC_FRAGMENT_DIR)/fcs \ $(MAGIC_FRAGMENT_DIR)/filesystems \ -$(MAGIC_FRAGMENT_DIR)/finger \ $(MAGIC_FRAGMENT_DIR)/flash \ -$(MAGIC_FRAGMENT_DIR)/flif \ $(MAGIC_FRAGMENT_DIR)/fonts \ $(MAGIC_FRAGMENT_DIR)/fortran \ $(MAGIC_FRAGMENT_DIR)/frame \ @@ -150,7 +145,6 @@ $(MAGIC_FRAGMENT_DIR)/mcrypt \ $(MAGIC_FRAGMENT_DIR)/mercurial \ $(MAGIC_FRAGMENT_DIR)/metastore \ $(MAGIC_FRAGMENT_DIR)/meteorological \ -$(MAGIC_FRAGMENT_DIR)/microfocus \ $(MAGIC_FRAGMENT_DIR)/mime \ $(MAGIC_FRAGMENT_DIR)/mips \ $(MAGIC_FRAGMENT_DIR)/mirage \ @@ -199,7 +193,6 @@ $(MAGIC_FRAGMENT_DIR)/pgp \ $(MAGIC_FRAGMENT_DIR)/pkgadd \ $(MAGIC_FRAGMENT_DIR)/plan9 \ $(MAGIC_FRAGMENT_DIR)/plus5 \ -$(MAGIC_FRAGMENT_DIR)/polyml \ $(MAGIC_FRAGMENT_DIR)/printer \ $(MAGIC_FRAGMENT_DIR)/project \ $(MAGIC_FRAGMENT_DIR)/psdbms \ @@ -254,7 +247,6 @@ $(MAGIC_FRAGMENT_DIR)/unknown \ $(MAGIC_FRAGMENT_DIR)/uterus \ $(MAGIC_FRAGMENT_DIR)/uuencode \ $(MAGIC_FRAGMENT_DIR)/varied.out \ -$(MAGIC_FRAGMENT_DIR)/vacuum-cleaner \ $(MAGIC_FRAGMENT_DIR)/varied.script \ $(MAGIC_FRAGMENT_DIR)/vax \ $(MAGIC_FRAGMENT_DIR)/vicar \ @@ -299,7 +291,7 @@ ${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) @(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \ echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \ else \ - v=$$(${FILE_COMPILE} --version | sed -e s/file-// -e q); \ + v=$$(file --version | sed -e s/file-// -e q); \ if [ "$$v" != "${PACKAGE_VERSION}" ]; then \ echo "Cannot use the installed version of file ($$v) to"; \ echo "cross-compile file ${PACKAGE_VERSION}"; \ diff --git a/contrib/file/magic/Makefile.in b/contrib/file/magic/Makefile.in index 502e7df..f214a56 100644 --- a/contrib/file/magic/Makefile.in +++ b/contrib/file/magic/Makefile.in @@ -273,7 +273,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # -# $File: Makefile.am,v 1.113 2016/02/26 15:52:45 christos Exp $ +# $File: Makefile.am,v 1.103 2015/03/17 15:15:12 christos Exp $ # MAGIC_FRAGMENT_BASE = Magdir MAGIC_DIR = $(top_srcdir)/magic @@ -302,7 +302,6 @@ $(MAGIC_FRAGMENT_DIR)/att3b \ $(MAGIC_FRAGMENT_DIR)/audio \ $(MAGIC_FRAGMENT_DIR)/basis \ $(MAGIC_FRAGMENT_DIR)/bflt \ -$(MAGIC_FRAGMENT_DIR)/bioinformatics \ $(MAGIC_FRAGMENT_DIR)/blackberry \ $(MAGIC_FRAGMENT_DIR)/blcr \ $(MAGIC_FRAGMENT_DIR)/blender \ @@ -323,7 +322,6 @@ $(MAGIC_FRAGMENT_DIR)/citrus \ $(MAGIC_FRAGMENT_DIR)/clarion \ $(MAGIC_FRAGMENT_DIR)/claris \ $(MAGIC_FRAGMENT_DIR)/clipper \ -$(MAGIC_FRAGMENT_DIR)/coff \ $(MAGIC_FRAGMENT_DIR)/commands \ $(MAGIC_FRAGMENT_DIR)/communications \ $(MAGIC_FRAGMENT_DIR)/compress \ @@ -336,7 +334,6 @@ $(MAGIC_FRAGMENT_DIR)/cubemap \ $(MAGIC_FRAGMENT_DIR)/cups \ $(MAGIC_FRAGMENT_DIR)/dact \ $(MAGIC_FRAGMENT_DIR)/database \ -$(MAGIC_FRAGMENT_DIR)/der \ $(MAGIC_FRAGMENT_DIR)/diamond \ $(MAGIC_FRAGMENT_DIR)/diff \ $(MAGIC_FRAGMENT_DIR)/digital \ @@ -353,9 +350,7 @@ $(MAGIC_FRAGMENT_DIR)/erlang \ $(MAGIC_FRAGMENT_DIR)/esri \ $(MAGIC_FRAGMENT_DIR)/fcs \ $(MAGIC_FRAGMENT_DIR)/filesystems \ -$(MAGIC_FRAGMENT_DIR)/finger \ $(MAGIC_FRAGMENT_DIR)/flash \ -$(MAGIC_FRAGMENT_DIR)/flif \ $(MAGIC_FRAGMENT_DIR)/fonts \ $(MAGIC_FRAGMENT_DIR)/fortran \ $(MAGIC_FRAGMENT_DIR)/frame \ @@ -422,7 +417,6 @@ $(MAGIC_FRAGMENT_DIR)/mcrypt \ $(MAGIC_FRAGMENT_DIR)/mercurial \ $(MAGIC_FRAGMENT_DIR)/metastore \ $(MAGIC_FRAGMENT_DIR)/meteorological \ -$(MAGIC_FRAGMENT_DIR)/microfocus \ $(MAGIC_FRAGMENT_DIR)/mime \ $(MAGIC_FRAGMENT_DIR)/mips \ $(MAGIC_FRAGMENT_DIR)/mirage \ @@ -471,7 +465,6 @@ $(MAGIC_FRAGMENT_DIR)/pgp \ $(MAGIC_FRAGMENT_DIR)/pkgadd \ $(MAGIC_FRAGMENT_DIR)/plan9 \ $(MAGIC_FRAGMENT_DIR)/plus5 \ -$(MAGIC_FRAGMENT_DIR)/polyml \ $(MAGIC_FRAGMENT_DIR)/printer \ $(MAGIC_FRAGMENT_DIR)/project \ $(MAGIC_FRAGMENT_DIR)/psdbms \ @@ -526,7 +519,6 @@ $(MAGIC_FRAGMENT_DIR)/unknown \ $(MAGIC_FRAGMENT_DIR)/uterus \ $(MAGIC_FRAGMENT_DIR)/uuencode \ $(MAGIC_FRAGMENT_DIR)/varied.out \ -$(MAGIC_FRAGMENT_DIR)/vacuum-cleaner \ $(MAGIC_FRAGMENT_DIR)/varied.script \ $(MAGIC_FRAGMENT_DIR)/vax \ $(MAGIC_FRAGMENT_DIR)/vicar \ @@ -784,7 +776,7 @@ ${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) @(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \ echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \ else \ - v=$$(${FILE_COMPILE} --version | sed -e s/file-// -e q); \ + v=$$(file --version | sed -e s/file-// -e q); \ if [ "$$v" != "${PACKAGE_VERSION}" ]; then \ echo "Cannot use the installed version of file ($$v) to"; \ echo "cross-compile file ${PACKAGE_VERSION}"; \ diff --git a/contrib/file/python/README b/contrib/file/python/README index e69de29..8b9a2a7 100644 --- a/contrib/file/python/README +++ b/contrib/file/python/README @@ -0,0 +1,13 @@ +This directory contains Python bindings to allow you to access the +libmagic api. At the moment their status is "experimental". + +You can install the modules either with: + +$ python setup.py build +$ python setup.py install + +or, if you have easy_install: + +$ easy_install . + +magic-python should work now! diff --git a/contrib/file/python/magic.py b/contrib/file/python/magic.py index c48f7d5..a17e8da 100644 --- a/contrib/file/python/magic.py +++ b/contrib/file/python/magic.py @@ -1,13 +1,10 @@ -# coding: utf-8 - +#!/usr/bin/env python ''' Python bindings for libmagic ''' import ctypes -from collections import namedtuple - from ctypes import * from ctypes.util import find_library @@ -35,7 +32,7 @@ MAGIC_PRESERVE_ATIME = PRESERVE_ATIME = 128 MAGIC_RAW = RAW = 256 MAGIC_ERROR = ERROR = 512 MAGIC_MIME_ENCODING = MIME_ENCODING = 1024 -MAGIC_MIME = MIME = 1040 # MIME_TYPE + MIME_ENCODING +MAGIC_MIME = MIME = 1040 MAGIC_APPLE = APPLE = 2048 MAGIC_NO_CHECK_COMPRESS = NO_CHECK_COMPRESS = 4096 @@ -50,8 +47,6 @@ MAGIC_NO_CHECK_ENCODING = NO_CHECK_ENCODING = 2097152 MAGIC_NO_CHECK_BUILTIN = NO_CHECK_BUILTIN = 4173824 -FileMagic = namedtuple('FileMagic', ('mime_type', 'encoding', 'name')) - class magic_set(Structure): pass @@ -123,18 +118,14 @@ class Magic(object): as a filename or None if an error occurred and the MAGIC_ERROR flag is set. A call to errno() will return the numeric error code. """ - if isinstance(filename, bytes): - bi = filename - else: - try: # keep Python 2 compatibility + try: # attempt python3 approach first + if isinstance(filename, bytes): + bi = filename + else: bi = bytes(filename, 'utf-8') - except TypeError: - bi = bytes(filename) - r = _file(self._magic_t, bi) - if isinstance(r, str): - return r - else: - return str(r).encode('utf-8') + return str(_file(self._magic_t, bi), 'utf-8') + except: + return _file(self._magic_t, filename.encode('utf-8')) def descriptor(self, fd): """ @@ -148,22 +139,20 @@ class Magic(object): as a buffer or None if an error occurred and the MAGIC_ERROR flag is set. A call to errno() will return the numeric error code. """ - r = _buffer(self._magic_t, buf, len(buf)) - if isinstance(r, str): - return r - else: - return str(r).encode('utf-8') + try: # attempt python3 approach first + return str(_buffer(self._magic_t, buf, len(buf)), 'utf-8') + except: + return _buffer(self._magic_t, buf, len(buf)) def error(self): """ Returns a textual explanation of the last error or None if there was no error. """ - e = _error(self._magic_t) - if isinstance(e, str): - return e - else: - return str(e).encode('utf-8') + try: # attempt python3 approach first + return str(_error(self._magic_t), 'utf-8') + except: + return _error(self._magic_t) def setflags(self, flags): """ @@ -230,48 +219,3 @@ def open(flags): Flags argument as for setflags. """ return Magic(_open(flags)) - - -# Objects used by `detect_from_` functions -mime_magic = Magic(_open(MAGIC_MIME)) -mime_magic.load() -none_magic = Magic(_open(MAGIC_NONE)) -none_magic.load() - - -def _create_filemagic(mime_detected, type_detected): - mime_type, mime_encoding = mime_detected.split('; ') - - return FileMagic(name=type_detected, mime_type=mime_type, - encoding=mime_encoding.replace('charset=', '')) - - -def detect_from_filename(filename): - '''Detect mime type, encoding and file type from a filename - - Returns a `FileMagic` namedtuple. - ''' - - return _create_filemagic(mime_magic.file(filename), - none_magic.file(filename)) - - -def detect_from_fobj(fobj): - '''Detect mime type, encoding and file type from file-like object - - Returns a `FileMagic` namedtuple. - ''' - - file_descriptor = fobj.fileno() - return _create_filemagic(mime_magic.descriptor(file_descriptor), - none_magic.descriptor(file_descriptor)) - - -def detect_from_content(byte_content): - '''Detect mime type, encoding and file type from bytes - - Returns a `FileMagic` namedtuple. - ''' - - return _create_filemagic(mime_magic.buffer(byte_content), - none_magic.buffer(byte_content)) diff --git a/contrib/file/python/setup.py b/contrib/file/python/setup.py index 24ae182..2c3b527 100644 --- a/contrib/file/python/setup.py +++ b/contrib/file/python/setup.py @@ -1,22 +1,10 @@ -# coding: utf-8 - -from __future__ import unicode_literals - -from setuptools import setup - - -setup(name='file-magic', - version='0.3.0', - author='Reuben Thomas, Ãlvaro Justen', - author_email='rrt@sc3d.org, alvarojusten@gmail.com', - url='https://github.com/file/file', - license='BSD', - description='(official) libmagic Python bindings', - py_modules=['magic'], - test_suite='tests', - classifiers = [ - 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', - 'Natural Language :: English', - 'Topic :: Software Development :: Libraries :: Python Modules', - ]) +# Python distutils build script for magic extension +from distutils.core import setup + +setup(name = 'Magic file extensions', + version = '0.2', + author = 'Reuben Thomas', + author_email = 'rrt@sc3d.org', + license = 'BSD', + description = 'libmagic Python bindings', + py_modules = ['magic']) diff --git a/contrib/file/src/Makefile.am b/contrib/file/src/Makefile.am index 5891feb..e3196ce 100644 --- a/contrib/file/src/Makefile.am +++ b/contrib/file/src/Makefile.am @@ -9,7 +9,7 @@ AM_CFLAGS = $(CFLAG_VISIBILITY) @WARNINGS@ libmagic_la_SOURCES = magic.c apprentice.c softmagic.c ascmagic.c \ encoding.c compress.c is_tar.c readelf.c print.c fsmagic.c \ - funcs.c file.h readelf.h tar.h apptype.c der.c der.h \ + funcs.c file.h readelf.h tar.h apptype.c \ file_opts.h elfclass.h mygetopt.h cdf.c cdf_time.c readcdf.c cdf.h libmagic_la_LDFLAGS = -no-undefined -version-info 1:0:0 if MINGW diff --git a/contrib/file/src/Makefile.in b/contrib/file/src/Makefile.in index a44bf88..5e69c00 100644 --- a/contrib/file/src/Makefile.in +++ b/contrib/file/src/Makefile.in @@ -138,8 +138,8 @@ am__DEPENDENCIES_1 = libmagic_la_DEPENDENCIES = $(LTLIBOBJS) $(am__DEPENDENCIES_1) am_libmagic_la_OBJECTS = magic.lo apprentice.lo softmagic.lo \ ascmagic.lo encoding.lo compress.lo is_tar.lo readelf.lo \ - print.lo fsmagic.lo funcs.lo apptype.lo der.lo cdf.lo \ - cdf_time.lo readcdf.lo + print.lo fsmagic.lo funcs.lo apptype.lo cdf.lo cdf_time.lo \ + readcdf.lo libmagic_la_OBJECTS = $(am_libmagic_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -214,9 +214,9 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ - asctime_r.c asprintf.c ctime_r.c dprintf.c fmtcheck.c \ - getline.c getopt_long.c gmtime_r.c localtime_r.c pread.c \ - strcasestr.c strlcat.c strlcpy.c vasprintf.c + asctime_r.c asprintf.c ctime_r.c fmtcheck.c getline.c \ + getopt_long.c gmtime_r.c localtime_r.c pread.c strcasestr.c \ + strlcat.c strlcpy.c vasprintf.c DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkgdatadir = @pkgdatadir@ ACLOCAL = @ACLOCAL@ @@ -345,7 +345,7 @@ AM_CPPFLAGS = -DMAGIC='"$(MAGIC)"' AM_CFLAGS = $(CFLAG_VISIBILITY) @WARNINGS@ libmagic_la_SOURCES = magic.c apprentice.c softmagic.c ascmagic.c \ encoding.c compress.c is_tar.c readelf.c print.c fsmagic.c \ - funcs.c file.h readelf.h tar.h apptype.c der.c der.h \ + funcs.c file.h readelf.h tar.h apptype.c \ file_opts.h elfclass.h mygetopt.h cdf.c cdf_time.c readcdf.c cdf.h libmagic_la_LDFLAGS = -no-undefined -version-info 1:0:0 @@ -493,7 +493,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/asctime_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/asprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ctime_r.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fmtcheck.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt_long.Plo@am__quote@ @@ -510,7 +509,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdf_time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compress.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/der.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/encoding.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsmagic.Plo@am__quote@ diff --git a/contrib/file/src/apprentice.c b/contrib/file/src/apprentice.c index f8956de..66f64bd 100644 --- a/contrib/file/src/apprentice.c +++ b/contrib/file/src/apprentice.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: apprentice.c,v 1.248 2016/03/31 17:51:12 christos Exp $") +FILE_RCSID("@(#)$File: apprentice.c,v 1.238 2015/09/12 18:10:42 christos Exp $") #endif /* lint */ #include "magic.h" @@ -86,9 +86,9 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1.248 2016/03/31 17:51:12 christos Exp $") #define ALLOC_CHUNK (size_t)10 #define ALLOC_INCR (size_t)200 -#define MAP_TYPE_USER 0 +#define MAP_TYPE_MMAP 0 #define MAP_TYPE_MALLOC 1 -#define MAP_TYPE_MMAP 2 +#define MAP_TYPE_USER 2 struct magic_entry { struct magic *mp; @@ -143,7 +143,7 @@ private int check_buffer(struct magic_set *, struct magic_map *, const char *); private void apprentice_unmap(struct magic_map *); private int apprentice_compile(struct magic_set *, struct magic_map *, const char *); -private int check_format_type(const char *, int, const char **); +private int check_format_type(const char *, int); private int check_format(struct magic_set *, struct magic *); private int get_op(char); private int parse_mime(struct magic_set *, struct magic_entry *, const char *); @@ -268,7 +268,6 @@ static const struct type_tbl_s type_tbl[] = { { XX("name"), FILE_NAME, FILE_FMT_NONE }, { XX("use"), FILE_USE, FILE_FMT_NONE }, { XX("clear"), FILE_CLEAR, FILE_FMT_NONE }, - { XX("der"), FILE_DER, FILE_FMT_STR }, { XX_NULL, FILE_INVALID, FILE_FMT_NONE }, }; @@ -277,7 +276,6 @@ static const struct type_tbl_s type_tbl[] = { * unsigned. */ static const struct type_tbl_s special_tbl[] = { - { XX("der"), FILE_DER, FILE_FMT_STR }, { XX("name"), FILE_NAME, FILE_FMT_STR }, { XX("use"), FILE_USE, FILE_FMT_STR }, { XX_NULL, FILE_INVALID, FILE_FMT_NONE }, @@ -534,7 +532,6 @@ file_ms_alloc(int flags) ms->elf_phnum_max = FILE_ELF_PHNUM_MAX; ms->elf_notes_max = FILE_ELF_NOTES_MAX; ms->regex_max = FILE_REGEX_MAX; - ms->bytes_max = FILE_BYTES_MAX; return ms; free: free(ms); @@ -549,23 +546,19 @@ apprentice_unmap(struct magic_map *map) return; switch (map->type) { - case MAP_TYPE_USER: - break; - case MAP_TYPE_MALLOC: - for (i = 0; i < MAGIC_SETS; i++) { - if ((char *)map->magic[i] >= (char *)map->p && - (char *)map->magic[i] < (char *)map->p + map->len) - continue; - free(map->magic[i]); - } - free(map->p); - break; #ifdef QUICK case MAP_TYPE_MMAP: - if (map->p && map->p != MAP_FAILED) + if (map->p) (void)munmap(map->p, map->len); break; #endif + case MAP_TYPE_MALLOC: + free(map->p); + for (i = 0; i < MAGIC_SETS; i++) + free(map->magic[i]); + break; + case MAP_TYPE_USER: + break; default: abort(); } @@ -869,10 +862,6 @@ apprentice_magic_strength(const struct magic *m) case FILE_USE: break; - case FILE_DER: - val += MULT; - break; - default: (void)fprintf(stderr, "Bad type %d\n", m->type); abort(); @@ -1028,7 +1017,6 @@ set_test_type(struct magic *mstart, struct magic *m) case FILE_DOUBLE: case FILE_BEDOUBLE: case FILE_LEDOUBLE: - case FILE_DER: mstart->flag |= BINTEST; break; case FILE_STRING: @@ -1460,7 +1448,6 @@ file_signextend(struct magic_set *ms, struct magic *m, uint64_t v) case FILE_NAME: case FILE_USE: case FILE_CLEAR: - case FILE_DER: break; default: if (ms->flags & MAGIC_CHECK) @@ -2116,7 +2103,7 @@ parse(struct magic_set *ms, struct magic_entry *me, const char *line, /* * TODO finish this macro and start using it! - * #define offsetcheck {if (offset > ms->bytes_max -1) + * #define offsetcheck {if (offset > HOWMANY-1) * magwarn("offset too big"); } */ @@ -2280,7 +2267,7 @@ parse_apple(struct magic_set *ms, struct magic_entry *me, const char *line) return parse_extra(ms, me, line, CAST(off_t, offsetof(struct magic, apple)), - sizeof(m->apple), "APPLE", "!+-./?", 0); + sizeof(m->apple), "APPLE", "!+-./", 0); } /* @@ -2311,13 +2298,11 @@ parse_mime(struct magic_set *ms, struct magic_entry *me, const char *line) } private int -check_format_type(const char *ptr, int type, const char **estr) +check_format_type(const char *ptr, int type) { int quad = 0, h; - size_t len, cnt; if (*ptr == '\0') { /* Missing format string; bad */ - *estr = "missing format spec"; return -1; } @@ -2354,22 +2339,15 @@ check_format_type(const char *ptr, int type, const char **estr) ptr++; if (*ptr == '.') ptr++; -#define CHECKLEN() do { \ - for (len = cnt = 0; isdigit((unsigned char)*ptr); ptr++, cnt++) \ - len = len * 10 + (*ptr - '0'); \ - if (cnt > 5 || len > 1024) \ - goto toolong; \ -} while (/*CONSTCOND*/0) - - CHECKLEN(); + while (isdigit((unsigned char)*ptr)) ptr++; if (*ptr == '.') ptr++; - CHECKLEN(); + while (isdigit((unsigned char)*ptr)) ptr++; if (quad) { if (*ptr++ != 'l') - goto invalid; + return -1; if (*ptr++ != 'l') - goto invalid; + return -1; } switch (*ptr++) { @@ -2383,11 +2361,9 @@ check_format_type(const char *ptr, int type, const char **estr) case 'o': case 'x': case 'X': - if (h == 0) - return 0; - /*FALLTHROUGH*/ + return h != 0 ? -1 : 0; default: - goto invalid; + return -1; } /* @@ -2396,11 +2372,11 @@ check_format_type(const char *ptr, int type, const char **estr) */ case 'h': if (h-- <= 0) - goto invalid; + return -1; switch (*ptr++) { case 'h': if (h-- <= 0) - goto invalid; + return -1; switch (*ptr++) { case 'i': case 'd': @@ -2410,7 +2386,7 @@ check_format_type(const char *ptr, int type, const char **estr) case 'X': return 0; default: - goto invalid; + return -1; } case 'i': case 'd': @@ -2418,17 +2394,13 @@ check_format_type(const char *ptr, int type, const char **estr) case 'o': case 'x': case 'X': - if (h == 0) - return 0; - /*FALLTHROUGH*/ + return h != 0 ? -1 : 0; default: - goto invalid; + return -1; } #endif case 'c': - if (h == 2) - return 0; - goto invalid; + return h != 2 ? -1 : 0; case 'i': case 'd': case 'u': @@ -2436,14 +2408,12 @@ check_format_type(const char *ptr, int type, const char **estr) case 'x': case 'X': #ifdef STRICT_FORMAT - if (h == 0) - return 0; - /*FALLTHROUGH*/ + return h != 0 ? -1 : 0; #else return 0; #endif default: - goto invalid; + return -1; } case FILE_FMT_FLOAT: @@ -2452,10 +2422,11 @@ check_format_type(const char *ptr, int type, const char **estr) ptr++; if (*ptr == '.') ptr++; - CHECKLEN(); + while (isdigit((unsigned char)*ptr)) ptr++; if (*ptr == '.') ptr++; - CHECKLEN(); + while (isdigit((unsigned char)*ptr)) ptr++; + switch (*ptr++) { case 'e': case 'E': @@ -2466,7 +2437,7 @@ check_format_type(const char *ptr, int type, const char **estr) return 0; default: - goto invalid; + return -1; } @@ -2485,17 +2456,14 @@ check_format_type(const char *ptr, int type, const char **estr) case 's': return 0; default: - goto invalid; + return -1; } default: /* internal error */ abort(); } -invalid: - *estr = "not valid"; -toolong: - *estr = "too long"; + /*NOTREACHED*/ return -1; } @@ -2507,7 +2475,6 @@ private int check_format(struct magic_set *ms, struct magic *m) { char *ptr; - const char *estr; for (ptr = m->desc; *ptr; ptr++) if (*ptr == '%') @@ -2531,13 +2498,13 @@ check_format(struct magic_set *ms, struct magic *m) } ptr++; - if (check_format_type(ptr, m->type, &estr) == -1) { + if (check_format_type(ptr, m->type) == -1) { /* * TODO: this error message is unhelpful if the format * string is not one character long */ - file_magwarn(ms, "Printf format is %s for type " - "`%s' in description `%s'", estr, + file_magwarn(ms, "Printf format `%c' is not valid for type " + "`%s' in description `%s'", *ptr ? *ptr : '?', file_names[m->type], m->desc); return -1; } @@ -2571,7 +2538,6 @@ getvalue(struct magic_set *ms, struct magic *m, const char **p, int action) case FILE_SEARCH: case FILE_NAME: case FILE_USE: - case FILE_DER: *p = getstr(ms, m, *p, action == FILE_COMPILE); if (*p == NULL) { if (ms->flags & MAGIC_CHECK) @@ -2936,7 +2902,6 @@ apprentice_map(struct magic_set *ms, const char *fn) file_oomem(ms, sizeof(*map)); goto error; } - map->type = MAP_TYPE_USER; /* unspecified */ dbname = mkdbname(ms, fn, 0); if (dbname == NULL) @@ -2957,14 +2922,13 @@ apprentice_map(struct magic_set *ms, const char *fn) map->len = (size_t)st.st_size; #ifdef QUICK - map->type = MAP_TYPE_MMAP; if ((map->p = mmap(0, (size_t)st.st_size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FILE, fd, (off_t)0)) == MAP_FAILED) { file_error(ms, errno, "cannot map `%s'", dbname); goto error; } + map->type = MAP_TYPE_MMAP; #else - map->type = MAP_TYPE_MALLOC; if ((map->p = CAST(void *, malloc(map->len))) == NULL) { file_oomem(ms, map->len); goto error; @@ -2973,6 +2937,7 @@ apprentice_map(struct magic_set *ms, const char *fn) file_badread(ms); goto error; } + map->type = MAP_TYPE_MALLOC; #define RET 1 #endif (void)close(fd); @@ -2980,12 +2945,6 @@ apprentice_map(struct magic_set *ms, const char *fn) if (check_buffer(ms, map, dbname) != 0) goto error; -#ifdef QUICK - if (mprotect(map->p, (size_t)st.st_size, PROT_READ) == -1) { - file_error(ms, errno, "cannot mprotect `%s'", dbname); - goto error; - } -#endif free(dbname); return map; diff --git a/contrib/file/src/ascmagic.c b/contrib/file/src/ascmagic.c index b9ab789..9e0f663 100644 --- a/contrib/file/src/ascmagic.c +++ b/contrib/file/src/ascmagic.c @@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: ascmagic.c,v 1.94 2016/03/31 17:51:12 christos Exp $") +FILE_RCSID("@(#)$File: ascmagic.c,v 1.92 2015/04/09 20:01:41 christos Exp $") #endif /* lint */ #include "magic.h" @@ -147,7 +147,7 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf, == NULL) goto done; if ((rv = file_softmagic(ms, utf8_buf, - (size_t)(utf8_end - utf8_buf), NULL, NULL, + (size_t)(utf8_end - utf8_buf), 0, NULL, TEXTTEST, text)) == 0) rv = -1; } @@ -183,10 +183,10 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf, } /* Beware, if the data has been truncated, the final CR could have - been followed by a LF. If we have ms->bytes_max bytes, it indicates + been followed by a LF. If we have HOWMANY bytes, it indicates that the data might have been truncated, probably even before this function was called. */ - if (seen_cr && nbytes < ms->bytes_max) + if (seen_cr && nbytes < HOWMANY) n_cr++; if (strcmp(type, "binary") == 0) { diff --git a/contrib/file/src/compress.c b/contrib/file/src/compress.c index ad86431..539031e 100644 --- a/contrib/file/src/compress.c +++ b/contrib/file/src/compress.c @@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: compress.c,v 1.93 2016/03/31 17:51:12 christos Exp $") +FILE_RCSID("@(#)$File: compress.c,v 1.80 2015/06/03 18:21:24 christos Exp $") #endif #include "magic.h" @@ -45,8 +45,6 @@ FILE_RCSID("@(#)$File: compress.c,v 1.93 2016/03/31 17:51:12 christos Exp $") #endif #include <string.h> #include <errno.h> -#include <ctype.h> -#include <stdarg.h> #ifdef HAVE_SIGNAL_H #include <signal.h> # ifndef HAVE_SIG_T @@ -65,119 +63,43 @@ typedef void (*sig_t)(int); #if defined(HAVE_ZLIB_H) && defined(HAVE_LIBZ) #define BUILTIN_DECOMPRESS #include <zlib.h> -#define ZLIBSUPPORT #endif -#ifdef DEBUG -int tty = -1; -#define DPRINTF(...) do { \ - if (tty == -1) \ - tty = open("/dev/tty", O_RDWR); \ - if (tty == -1) \ - abort(); \ - dprintf(tty, __VA_ARGS__); \ -} while (/*CONSTCOND*/0) -#else -#define DPRINTF(...) -#endif - -#ifdef ZLIBSUPPORT -/* - * The following python code is not really used because ZLIBSUPPORT is only - * defined if we have a built-in zlib, and the built-in zlib handles that. - */ -static const char zlibcode[] = - "import sys, zlib; sys.stdout.write(zlib.decompress(sys.stdin.read()))"; - -static const char *zlib_args[] = { "python", "-c", zlibcode, NULL }; - -static int -zlibcmp(const unsigned char *buf) -{ - unsigned short x = 1; - unsigned char *s = (unsigned char *)&x; - - if ((buf[0] & 0xf) != 8 || (buf[0] & 0x80) != 0) - return 0; - if (s[0] != 1) /* endianness test */ - x = buf[0] | (buf[1] << 8); - else - x = buf[1] | (buf[0] << 8); - if (x % 31) - return 0; - return 1; -} -#endif - -#define gzip_flags "-cd" -#define lrzip_flags "-do" -#define lzip_flags gzip_flags - -static const char *gzip_args[] = { - "gzip", gzip_flags, NULL -}; -static const char *uncompress_args[] = { - "uncompress", "-c", NULL -}; -static const char *bzip2_args[] = { - "bzip2", "-cd", NULL -}; -static const char *lzip_args[] = { - "lzip", lzip_flags, NULL -}; -static const char *xz_args[] = { - "xz", "-cd", NULL -}; -static const char *lrzip_args[] = { - "lrzip", lrzip_flags, NULL -}; -static const char *lz4_args[] = { - "lz4", "-cd", NULL -}; private const struct { - const void *magic; + const char magic[8]; size_t maglen; - const char **argv; + const char *argv[3]; + int silent; } compr[] = { - { "\037\235", 2, gzip_args }, /* compressed */ + { "\037\235", 2, { "gzip", "-cdq", NULL }, 1 }, /* compressed */ /* Uncompress can get stuck; so use gzip first if we have it * Idea from Damien Clark, thanks! */ - { "\037\235", 2, uncompress_args }, /* compressed */ - { "\037\213", 2, gzip_args }, /* gzipped */ - { "\037\236", 2, gzip_args }, /* frozen */ - { "\037\240", 2, gzip_args }, /* SCO LZH */ + { "\037\235", 2, { "uncompress", "-c", NULL }, 1 }, /* compressed */ + { "\037\213", 2, { "gzip", "-cdq", NULL }, 1 }, /* gzipped */ + { "\037\236", 2, { "gzip", "-cdq", NULL }, 1 }, /* frozen */ + { "\037\240", 2, { "gzip", "-cdq", NULL }, 1 }, /* SCO LZH */ /* the standard pack utilities do not accept standard input */ - { "\037\036", 2, gzip_args }, /* packed */ - { "PK\3\4", 4, gzip_args }, /* pkzipped, */ - /* ...only first file examined */ - { "BZh", 3, bzip2_args }, /* bzip2-ed */ - { "LZIP", 4, lzip_args }, /* lzip-ed */ - { "\3757zXZ\0", 6, xz_args }, /* XZ Utils */ - { "LRZI", 4, lrzip_args }, /* LRZIP */ - { "\004\"M\030",4, lz4_args }, /* LZ4 */ -#ifdef ZLIBSUPPORT - { zlibcmp, 0, zlib_args }, /* zlib */ -#endif + { "\037\036", 2, { "gzip", "-cdq", NULL }, 0 }, /* packed */ + { "PK\3\4", 4, { "gzip", "-cdq", NULL }, 1 }, /* pkzipped, */ + /* ...only first file examined */ + { "BZh", 3, { "bzip2", "-cd", NULL }, 1 }, /* bzip2-ed */ + { "LZIP", 4, { "lzip", "-cdq", NULL }, 1 }, + { "\3757zXZ\0",6,{ "xz", "-cd", NULL }, 1 }, /* XZ Utils */ + { "LRZI", 4, { "lrzip", "-dqo-", NULL }, 1 }, /* LRZIP */ + { "\004\"M\030", 4, { "lz4", "-cd", NULL }, 1 }, /* LZ4 */ }; -#define OKDATA 0 -#define NODATA 1 -#define ERRDATA 2 +#define NODATA ((size_t)~0) private ssize_t swrite(int, const void *, size_t); #if HAVE_FORK private size_t ncompr = sizeof(compr) / sizeof(compr[0]); -private int uncompressbuf(int, size_t, size_t, const unsigned char *, - unsigned char **, size_t *); +private size_t uncompressbuf(struct magic_set *, int, size_t, + const unsigned char *, unsigned char **, size_t); #ifdef BUILTIN_DECOMPRESS -private int uncompresszlib(const unsigned char *, unsigned char **, size_t, - size_t *, int); -private int uncompressgzipped(const unsigned char *, unsigned char **, size_t, - size_t *); +private size_t uncompressgzipped(struct magic_set *, const unsigned char *, + unsigned char **, size_t); #endif -static int makeerror(unsigned char **, size_t *, const char *, ...) - __attribute__((__format__(__printf__, 3, 4))); -private const char *methodname(size_t); protected int file_zmagic(struct magic_set *ms, int fd, const char *name, @@ -185,8 +107,6 @@ file_zmagic(struct magic_set *ms, int fd, const char *name, { unsigned char *newbuf = NULL; size_t i, nsz; - char *rbuf; - file_pushbuf_t *pb; int rv = 0; int mime = ms->flags & MAGIC_MIME; #ifdef HAVE_SIGNAL_H @@ -200,72 +120,37 @@ file_zmagic(struct magic_set *ms, int fd, const char *name, osigpipe = signal(SIGPIPE, SIG_IGN); #endif for (i = 0; i < ncompr; i++) { - int zm; if (nbytes < compr[i].maglen) continue; -#ifdef ZLIBSUPPORT - if (compr[i].maglen == 0) - zm = (CAST(int (*)(const unsigned char *), - CCAST(void *, compr[i].magic)))(buf); - else -#endif - zm = memcmp(buf, compr[i].magic, compr[i].maglen) == 0; - - if (!zm) - continue; - nsz = nbytes; - rv = uncompressbuf(fd, ms->bytes_max, i, buf, &newbuf, &nsz); - DPRINTF("uncompressbuf = %d, %s, %zu\n", rv, (char *)newbuf, - nsz); - switch (rv) { - case OKDATA: - case ERRDATA: - + if (memcmp(buf, compr[i].magic, compr[i].maglen) == 0 && + (nsz = uncompressbuf(ms, fd, i, buf, &newbuf, + nbytes)) != NODATA) { ms->flags &= ~MAGIC_COMPRESS; - if (rv == ERRDATA) - rv = file_printf(ms, "%s ERROR: %s", - methodname(i), newbuf); - else - rv = file_buffer(ms, -1, name, newbuf, nsz); - if (rv == -1) + rv = -1; + if (file_buffer(ms, -1, name, newbuf, nsz) == -1) goto error; - DPRINTF("rv = %d\n", rv); - if ((ms->flags & MAGIC_COMPRESS_TRANSP) != 0) - goto out; - if (mime != MAGIC_MIME && mime != 0) - goto out; - if ((file_printf(ms, - mime ? " compressed-encoding=" : " (")) == -1) - goto error; - if ((pb = file_push_buffer(ms)) == NULL) - goto error; - if (file_buffer(ms, -1, NULL, buf, nbytes) == -1) - goto error; - if ((rbuf = file_pop_buffer(ms, pb)) != NULL) { - if (file_printf(ms, "%s", rbuf) == -1) { - free(rbuf); + + if ((ms->flags & MAGIC_COMPRESS_TRANSP) == 0 && + (mime == MAGIC_MIME || mime == 0)) { + if (file_printf(ms, mime ? + " compressed-encoding=" : " (") == -1) + goto error; + if (file_buffer(ms, -1, NULL, buf, nbytes) == -1) + goto error; + if (!mime && file_printf(ms, ")") == -1) goto error; - } - free(rbuf); } - if (!mime && file_printf(ms, ")") == -1) - goto error; - goto out; - case NODATA: - goto out; - default: - abort(); + + rv = 1; + break; } } -out: - rv = 1; error: #ifdef HAVE_SIGNAL_H (void)signal(SIGPIPE, osigpipe); #endif free(newbuf); ms->flags |= MAGIC_COMPRESS; - DPRINTF("Zmagic returns %d\n", rv); return rv; } #endif @@ -437,314 +322,222 @@ file_pipe2file(struct magic_set *ms, int fd, const void *startbuf, #define FNAME (1 << 3) #define FCOMMENT (1 << 4) - -private int -uncompressgzipped(const unsigned char *old, unsigned char **newch, - size_t bytes_max, size_t *n) +private size_t +uncompressgzipped(struct magic_set *ms, const unsigned char *old, + unsigned char **newch, size_t n) { unsigned char flg = old[3]; size_t data_start = 10; + z_stream z; + int rc; if (flg & FEXTRA) { - if (data_start + 1 >= *n) - goto err; + if (data_start+1 >= n) + return 0; data_start += 2 + old[data_start] + old[data_start + 1] * 256; } if (flg & FNAME) { - while(data_start < *n && old[data_start]) + while(data_start < n && old[data_start]) data_start++; data_start++; } - if (flg & FCOMMENT) { - while(data_start < *n && old[data_start]) + if(flg & FCOMMENT) { + while(data_start < n && old[data_start]) data_start++; data_start++; } - if (flg & FHCRC) + if(flg & FHCRC) data_start += 2; - if (data_start >= *n) - goto err; - - *n -= data_start; - old += data_start; - return uncompresszlib(old, newch, bytes_max, n, 0); -err: - return makeerror(newch, n, "File too short"); -} - -private int -uncompresszlib(const unsigned char *old, unsigned char **newch, - size_t bytes_max, size_t *n, int zlib) -{ - int rc; - z_stream z; - - if ((*newch = CAST(unsigned char *, malloc(bytes_max + 1))) == NULL) - return makeerror(newch, n, "No buffer, %s", strerror(errno)); - - z.next_in = CCAST(Bytef *, old); - z.avail_in = CAST(uint32_t, *n); + if (data_start >= n) + return 0; + if ((*newch = CAST(unsigned char *, malloc(HOWMANY + 1))) == NULL) { + return 0; + } + + /* XXX: const castaway, via strchr */ + z.next_in = (Bytef *)strchr((const char *)old + data_start, + old[data_start]); + z.avail_in = CAST(uint32_t, (n - data_start)); z.next_out = *newch; - z.avail_out = bytes_max; + z.avail_out = HOWMANY; z.zalloc = Z_NULL; z.zfree = Z_NULL; z.opaque = Z_NULL; /* LINTED bug in header macro */ - rc = zlib ? inflateInit(&z) : inflateInit2(&z, -15); - if (rc != Z_OK) - goto err; + rc = inflateInit2(&z, -15); + if (rc != Z_OK) { + file_error(ms, 0, "zlib: %s", z.msg); + return 0; + } rc = inflate(&z, Z_SYNC_FLUSH); - if (rc != Z_OK && rc != Z_STREAM_END) - goto err; + if (rc != Z_OK && rc != Z_STREAM_END) { + file_error(ms, 0, "zlib: %s", z.msg); + return 0; + } - *n = (size_t)z.total_out; - rc = inflateEnd(&z); - if (rc != Z_OK) - goto err; + n = (size_t)z.total_out; + (void)inflateEnd(&z); /* let's keep the nul-terminate tradition */ - (*newch)[*n] = '\0'; - - return OKDATA; -err: - strlcpy((char *)*newch, z.msg, bytes_max); - *n = strlen((char *)*newch); - return ERRDATA; -} -#endif - -static int -makeerror(unsigned char **buf, size_t *len, const char *fmt, ...) -{ - char *msg; - va_list ap; - int rv; - - va_start(ap, fmt); - rv = vasprintf(&msg, fmt, ap); - va_end(ap); - if (rv < 0) { - *buf = NULL; - *len = 0; - return NODATA; - } - *buf = (unsigned char *)msg; - *len = strlen(msg); - return ERRDATA; -} - -static void -closefd(int *fd, size_t i) -{ - if (fd[i] == -1) - return; - (void) close(fd[i]); - fd[i] = -1; -} - -static void -closep(int *fd) -{ - size_t i; - for (i = 0; i < 2; i++) - closefd(fd, i); -} - -static void -copydesc(int i, int *fd) -{ - int j = fd[i == STDIN_FILENO ? 0 : 1]; - if (j == i) - return; - if (dup2(j, i) == -1) { - DPRINTF("dup(%d, %d) failed (%s)\n", j, i, strerror(errno)); - exit(1); - } - closep(fd); -} - -static void -writechild(int fdp[3][2], const void *old, size_t n) -{ - int status; - - closefd(fdp[STDIN_FILENO], 0); - /* - * fork again, to avoid blocking because both - * pipes filled - */ - switch (fork()) { - case 0: /* child */ - closefd(fdp[STDOUT_FILENO], 0); - if (swrite(fdp[STDIN_FILENO][1], old, n) != (ssize_t)n) { - DPRINTF("Write failed (%s)\n", strerror(errno)); - exit(1); - } - exit(0); - /*NOTREACHED*/ - - case -1: - DPRINTF("Fork failed (%s)\n", strerror(errno)); - exit(1); - /*NOTREACHED*/ + (*newch)[n] = '\0'; - default: /* parent */ - if (wait(&status) == -1) { - DPRINTF("Wait failed (%s)\n", strerror(errno)); - exit(1); - } - DPRINTF("Grandchild wait return %#x\n", status); - } - closefd(fdp[STDIN_FILENO], 1); -} - -static ssize_t -filter_error(unsigned char *ubuf, ssize_t n) -{ - char *p; - char *buf; - - ubuf[n] = '\0'; - buf = (char *)ubuf; - while (isspace((unsigned char)*buf)) - buf++; - DPRINTF("Filter error[[[%s]]]\n", buf); - if ((p = strchr((char *)buf, '\n')) != NULL) - *p = '\0'; - if ((p = strchr((char *)buf, ';')) != NULL) - *p = '\0'; - if ((p = strrchr((char *)buf, ':')) != NULL) { - ++p; - while (isspace((unsigned char)*p)) - p++; - n = strlen(p); - memmove(ubuf, p, n + 1); - } - DPRINTF("Filter error after[[[%s]]]\n", (char *)ubuf); - if (islower(*ubuf)) - *ubuf = toupper(*ubuf); return n; } - -private const char * -methodname(size_t method) -{ -#ifdef BUILTIN_DECOMPRESS - /* FIXME: This doesn't cope with bzip2 */ - if (method == 2 || compr[method].maglen == 0) - return "zlib"; #endif - return compr[method].argv[0]; -} -private int -uncompressbuf(int fd, size_t bytes_max, size_t method, const unsigned char *old, - unsigned char **newch, size_t* n) +private size_t +uncompressbuf(struct magic_set *ms, int fd, size_t method, + const unsigned char *old, unsigned char **newch, size_t n) { - int fdp[3][2]; - int status, rv; - size_t i; + int fdin[2], fdout[2]; + int status; ssize_t r; #ifdef BUILTIN_DECOMPRESS /* FIXME: This doesn't cope with bzip2 */ if (method == 2) - return uncompressgzipped(old, newch, bytes_max, n); - if (compr[method].maglen == 0) - return uncompresszlib(old, newch, bytes_max, n, 1); + return uncompressgzipped(ms, old, newch, n); #endif (void)fflush(stdout); (void)fflush(stderr); - for (i = 0; i < __arraycount(fdp); i++) - fdp[i][0] = fdp[i][1] = -1; - - if ((fd == -1 && pipe(fdp[STDIN_FILENO]) == -1) || - pipe(fdp[STDOUT_FILENO]) == -1 || pipe(fdp[STDERR_FILENO]) == -1) { - closep(fdp[STDIN_FILENO]); - closep(fdp[STDOUT_FILENO]); - return makeerror(newch, n, "Cannot create pipe, %s", - strerror(errno)); + if ((fd != -1 && pipe(fdin) == -1) || pipe(fdout) == -1) { + file_error(ms, errno, "cannot create pipe"); + return NODATA; } switch (fork()) { case 0: /* child */ + (void) close(0); if (fd != -1) { - fdp[STDIN_FILENO][0] = fd; - (void) lseek(fd, (off_t)0, SEEK_SET); + if (dup(fd) == -1) + _exit(1); + (void) lseek(0, (off_t)0, SEEK_SET); + } else { + if (dup(fdin[0]) == -1) + _exit(1); + (void) close(fdin[0]); + (void) close(fdin[1]); } - - for (i = 0; i < __arraycount(fdp); i++) - copydesc(i, fdp[i]); + + (void) close(1); + if (dup(fdout[1]) == -1) + _exit(1); + (void) close(fdout[0]); + (void) close(fdout[1]); +#ifndef DEBUG + if (compr[method].silent) + (void)close(2); +#endif (void)execvp(compr[method].argv[0], (char *const *)(intptr_t)compr[method].argv); - dprintf(STDERR_FILENO, "exec `%s' failed, %s", +#ifdef DEBUG + (void)fprintf(stderr, "exec `%s' failed (%s)\n", compr[method].argv[0], strerror(errno)); +#endif exit(1); /*NOTREACHED*/ case -1: - return makeerror(newch, n, "Cannot fork, %s", - strerror(errno)); + file_error(ms, errno, "could not fork"); + return NODATA; default: /* parent */ - for (i = 1; i < __arraycount(fdp); i++) - closefd(fdp[i], 1); + (void) close(fdout[1]); + if (fd == -1) { + (void) close(fdin[0]); + /* + * fork again, to avoid blocking because both + * pipes filled + */ + switch (fork()) { + case 0: /* child */ + (void)close(fdout[0]); + if (swrite(fdin[1], old, n) != (ssize_t)n) { +#ifdef DEBUG + (void)fprintf(stderr, + "Write failed (%s)\n", + strerror(errno)); +#endif + exit(1); + } + exit(0); + /*NOTREACHED*/ + + case -1: +#ifdef DEBUG + (void)fprintf(stderr, "Fork failed (%s)\n", + strerror(errno)); +#endif + exit(1); + /*NOTREACHED*/ - /* Write the buffer data to the child, if we don't have fd */ - if (fd == -1) - writechild(fdp, old, *n); + default: /* parent */ + if (wait(&status) == -1) { +#ifdef DEBUG + (void)fprintf(stderr, + "Wait failed (%s)\n", + strerror(errno)); +#endif + exit(1); + } + exit(WIFEXITED(status) ? + WEXITSTATUS(status) : 1); + /*NOTREACHED*/ + } + (void) close(fdin[1]); + fdin[1] = -1; + } - *newch = CAST(unsigned char *, malloc(bytes_max + 1)); - if (*newch == NULL) { - rv = makeerror(newch, n, "No buffer, %s", + if ((*newch = (unsigned char *) malloc(HOWMANY + 1)) == NULL) { +#ifdef DEBUG + (void)fprintf(stderr, "Malloc failed (%s)\n", strerror(errno)); +#endif + n = NODATA; goto err; } - rv = OKDATA; - if ((r = sread(fdp[STDOUT_FILENO][0], *newch, bytes_max, 0)) > 0) - break; - DPRINTF("Read stdout failed %d (%s)\n", fdp[STDOUT_FILENO][0], - r != -1 ? strerror(errno) : "no data"); - - rv = ERRDATA; - if (r == 0 && - (r = sread(fdp[STDERR_FILENO][0], *newch, bytes_max, 0)) > 0) - { - r = filter_error(*newch, r); - break; + if ((r = sread(fdout[0], *newch, HOWMANY, 0)) <= 0) { +#ifdef DEBUG + (void)fprintf(stderr, "Read failed (%s)\n", + strerror(errno)); +#endif + free(*newch); + n = NODATA; + *newch = NULL; + goto err; + } else { + n = r; } - free(*newch); - if (r == 0) - rv = makeerror(newch, n, "Read failed, %s", + /* NUL terminate, as every buffer is handled here. */ + (*newch)[n] = '\0'; +err: + if (fdin[1] != -1) + (void) close(fdin[1]); + (void) close(fdout[0]); + if (wait(&status) == -1) { +#ifdef DEBUG + (void)fprintf(stderr, "Wait failed (%s)\n", strerror(errno)); - else - rv = makeerror(newch, n, "No data"); - goto err; - } +#endif + n = NODATA; + } else if (!WIFEXITED(status)) { +#ifdef DEBUG + (void)fprintf(stderr, "Child not exited (0x%x)\n", + status); +#endif + } else if (WEXITSTATUS(status) != 0) { +#ifdef DEBUG + (void)fprintf(stderr, "Child exited (0x%d)\n", + WEXITSTATUS(status)); +#endif + } - *n = r; - /* NUL terminate, as every buffer is handled here. */ - (*newch)[*n] = '\0'; -err: - closefd(fdp[STDIN_FILENO], 1); - closefd(fdp[STDOUT_FILENO], 0); - closefd(fdp[STDERR_FILENO], 0); - if (wait(&status) == -1) { - free(*newch); - rv = makeerror(newch, n, "Wait failed, %s", strerror(errno)); - DPRINTF("Child wait return %#x\n", status); - } else if (!WIFEXITED(status)) { - DPRINTF("Child not exited (0x%x)\n", status); - } else if (WEXITSTATUS(status) != 0) { - DPRINTF("Child exited (0x%d)\n", WEXITSTATUS(status)); + (void) close(fdin[0]); + + return n; } - - closefd(fdp[STDIN_FILENO], 0); - DPRINTF("Returning %p n=%zu rv=%d\n", *newch, *n, rv); - - return rv; } #endif diff --git a/contrib/file/src/der.c b/contrib/file/src/der.c deleted file mode 100644 index e003795..0000000 --- a/contrib/file/src/der.c +++ /dev/null @@ -1,379 +0,0 @@ -/*- - * Copyright (c) 2016 Christos Zoulas - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -/* - * DER (Distinguished Encoding Rules) Parser - * - * Sources: - * https://en.wikipedia.org/wiki/X.690 - * http://fm4dd.com/openssl/certexamples.htm - * http://blog.engelke.com/2014/10/17/parsing-ber-and-der-encoded-asn-1-objects/ - */ -#ifndef TEST_DER -#include "file.h" - -#ifndef lint -FILE_RCSID("@(#)$File: der.c,v 1.4 2016/03/21 23:04:40 christos Exp $") -#endif -#endif - -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/mman.h> - -#include <stdio.h> -#include <err.h> -#include <fcntl.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> - -#ifndef TEST_DER -#include "magic.h" -#include "der.h" -#endif - -#define DER_BAD ((uint32_t)-1) - -#define DER_CLASS_UNIVERSAL 0 -#define DER_CLASS_APPLICATION 1 -#define DER_CLASS_CONTEXT 2 -#define DER_CLASS_PRIVATE 3 -static const char der_class[] = "UACP"; - -#define DER_TYPE_PRIMITIVE 0 -#define DER_TYPE_CONSTRUCTED 1 -static const char der_type[] = "PC"; - -#define DER_TAG_EOC 0x00 -#define DER_TAG_BOOLEAN 0x01 -#define DER_TAG_INTEGER 0x02 -#define DER_TAG_BIT STRING 0x03 -#define DER_TAG_OCTET_STRING 0x04 -#define DER_TAG_NULL 0x05 -#define DER_TAG_OBJECT_IDENTIFIER 0x06 -#define DER_TAG_OBJECT_DESCRIPTOR 0x07 -#define DER_TAG_EXTERNAL 0x08 -#define DER_TAG_REAL 0x09 -#define DER_TAG_ENUMERATED 0x0a -#define DER_TAG_EMBEDDED_PDV 0x0b -#define DER_TAG_UTF8_STRING 0x0c -#define DER_TAG_RELATIVE_OID 0x0d -#define DER_TAG_RESERVED_1 0x0e -#define DER_TAG_RESERVED_2 0x0f -#define DER_TAG_SEQUENCE 0x10 -#define DER_TAG_SET 0x11 -#define DER_TAG_NUMERIC_STRING 0x12 -#define DER_TAG_PRINTABLE_STRING 0x13 -#define DER_TAG_T61_STRING 0x14 -#define DER_TAG_VIDEOTEX_STRING 0x15 -#define DER_TAG_IA5_STRING 0x16 -#define DER_TAG_UTCTIME 0x17 -#define DER_TAG_GENERALIZED_TIME 0x18 -#define DER_TAG_GRAPHIC_STRING 0x19 -#define DER_TAG_VISIBLE_STRING 0x1a -#define DER_TAG_GENERAL_STRING 0x1b -#define DER_TAG_UNIVERSAL_STRING 0x1c -#define DER_TAG_CHARACTER_STRING 0x1d -#define DER_TAG_BMP_STRING 0x1e -#define DER_TAG_LONG 0x1f - -static const char *der__tag[] = { - "eoc", "bool", "int", "bit_str", "octet_str", - "null", "obj_id", "obj_desc", "ext", "real", - "enum", "embed", "utf8_str", "oid", "res1", - "res2", "seq", "set", "num_str", "prt_str", - "t61_str", "vid_str", "ia5_str", "utc_time", - "gen_time", "gr_str", "vis_str", "gen_str", - "char_str", "bmp_str", "long" -}; - -#ifdef DEBUG_DER -#define DPRINTF(a) printf a -#else -#define DPRINTF(a) -#endif - -#ifdef TEST_DER -static uint8_t -getclass(uint8_t c) -{ - return c >> 6; -} - -static uint8_t -gettype(uint8_t c) -{ - return (c >> 5) & 1; -} -#endif - -static uint32_t -gettag(const uint8_t *c, size_t *p, size_t l) -{ - uint32_t tag; - - if (*p >= l) - return DER_BAD; - - tag = c[(*p)++] & 0x1f; - - if (tag != 0x1f) - return tag; - - if (*p >= l) - return DER_BAD; - - while (c[*p] >= 0x80) { - tag = tag * 128 + c[(*p)++] - 0x80; - if (*p >= l) - return DER_BAD; - } - return tag; -} - -static uint32_t -getlength(const uint8_t *c, size_t *p, size_t l) -{ - uint8_t digits, i; - size_t len; - - if (*p >= l) - return DER_BAD; - - digits = c[(*p)++]; - - if ((digits & 0x80) == 0) - return digits; - - digits &= 0x7f; - len = 0; - - if (*p + digits >= l) - return DER_BAD; - - for (i = 0; i < digits; i++) - len = (len << 8) | c[(*p)++]; - return len; -} - -static const char * -der_tag(char *buf, size_t len, uint32_t tag) -{ - if (tag < DER_TAG_LONG) - strlcpy(buf, der__tag[tag], len); - else - snprintf(buf, len, "%#x", tag); - return buf; -} - -#ifndef TEST_DER -static int -der_data(char *buf, size_t blen, uint32_t tag, const void *q, uint32_t len) -{ - const uint8_t *d = q; - switch (tag) { - case DER_TAG_PRINTABLE_STRING: - case DER_TAG_UTF8_STRING: - case DER_TAG_IA5_STRING: - case DER_TAG_UTCTIME: - return snprintf(buf, blen, "%.*s", len, (const char *)q); - default: - break; - } - - for (uint32_t i = 0; i < len; i++) { - uint32_t z = i << 1; - if (z < blen - 2) - snprintf(buf + z, blen - z, "%.2x", d[i]); - } - return len * 2; -} - -int32_t -der_offs(struct magic_set *ms, struct magic *m, size_t nbytes) -{ - const uint8_t *b = CAST(const void *, ms->search.s); - size_t offs = 0, len = ms->search.rm_len ? ms->search.rm_len : nbytes; - - if (gettag(b, &offs, len) == DER_BAD) - return -1; - DPRINTF(("%s1: %d %zu %u\n", __func__, ms->offset, offs, m->offset)); - - uint32_t tlen = getlength(b, &offs, len); - if (tlen == DER_BAD) - return -1; - DPRINTF(("%s2: %d %zu %u\n", __func__, ms->offset, offs, tlen)); - - offs += ms->offset + m->offset; - DPRINTF(("cont_level = %d\n", m->cont_level)); -#ifdef DEBUG_DER - for (size_t i = 0; i < m->cont_level; i++) - printf("cont_level[%zu] = %u\n", i, ms->c.li[i].off); -#endif - if (m->cont_level != 0) { - if (offs + tlen > nbytes) - return DER_BAD; - ms->c.li[m->cont_level - 1].off = offs + tlen; - DPRINTF(("cont_level[%u] = %u\n", m->cont_level - 1, - ms->c.li[m->cont_level - 1].off)); - } - return offs; -} - -int -der_cmp(struct magic_set *ms, struct magic *m) -{ - const uint8_t *b = CAST(const void *, ms->search.s); - const char *s = m->value.s; - size_t offs = 0, len = ms->search.s_len; - uint32_t tag, tlen; - char buf[128]; - - tag = gettag(b, &offs, len); - if (tag == DER_BAD) - return -1; - - tlen = getlength(b, &offs, len); - if (tlen == DER_BAD) - return -1; - - der_tag(buf, sizeof(buf), tag); - if ((ms->flags & MAGIC_DEBUG) != 0) - fprintf(stderr, "%s: tag %p got=%s exp=%s\n", __func__, b, - buf, s); - size_t slen = strlen(buf); - - if (strncmp(buf, s, slen) != 0) - return 0; - - s += slen; - -again: - switch (*s) { - case '\0': - return 1; - case '=': - s++; - goto val; - default: - if (!isdigit((unsigned char)*s)) - return 0; - - slen = 0; - do - slen = slen * 10 + *s - '0'; - while (isdigit((unsigned char)*++s)); - if ((ms->flags & MAGIC_DEBUG) != 0) - fprintf(stderr, "%s: len %zu %u\n", __func__, - slen, tlen); - if (tlen != slen) - return 0; - goto again; - } -val: - DPRINTF(("%s: before data %zu %u\n", __func__, offs, tlen)); - der_data(buf, sizeof(buf), tag, b + offs, tlen); - if ((ms->flags & MAGIC_DEBUG) != 0) - fprintf(stderr, "%s: data %s %s\n", __func__, buf, s); - if (strcmp(buf, s) != 0 && strcmp("x", s) != 0) - return 0; - strlcpy(ms->ms_value.s, buf, sizeof(ms->ms_value.s)); - return 1; -} -#endif - -#ifdef TEST_DER -static void -printtag(uint32_t tag, const void *q, uint32_t len) -{ - const uint8_t *d = q; - switch (tag) { - case DER_TAG_PRINTABLE_STRING: - case DER_TAG_UTF8_STRING: - printf("%.*s\n", len, (const char *)q); - return; - default: - break; - } - - for (uint32_t i = 0; i < len; i++) - printf("%.2x", d[i]); - printf("\n"); -} - -static void -printdata(size_t level, const void *v, size_t x, size_t l) -{ - const uint8_t *p = v, *ep = p + l; - size_t ox; - char buf[128]; - - while (p + x < ep) { - const uint8_t *q; - uint8_t c = getclass(p[x]); - uint8_t t = gettype(p[x]); - ox = x; - if (x != 0) - printf("%.2x %.2x %.2x\n", p[x - 1], p[x], p[x + 1]); - uint32_t tag = gettag(p, &x, ep - p + x); - if (p + x >= ep) - break; - uint32_t len = getlength(p, &x, ep - p + x); - - printf("%zu %zu-%zu %c,%c,%s,%u:", level, ox, x, - der_class[c], der_type[t], - der_tag(buf, sizeof(buf), tag), len); - q = p + x; - if (p + len > ep) - errx(EXIT_FAILURE, "corrupt der"); - printtag(tag, q, len); - if (t != DER_TYPE_PRIMITIVE) - printdata(level + 1, p, x, len + x); - x += len; - } -} - -int -main(int argc, char *argv[]) -{ - int fd; - struct stat st; - size_t l; - void *p; - - if ((fd = open(argv[1], O_RDONLY)) == -1) - err(EXIT_FAILURE, "open `%s'", argv[1]); - if (fstat(fd, &st) == -1) - err(EXIT_FAILURE, "stat `%s'", argv[1]); - l = (size_t)st.st_size; - if ((p = mmap(NULL, l, PROT_READ, MAP_FILE, fd, 0)) == MAP_FAILED) - err(EXIT_FAILURE, "mmap `%s'", argv[1]); - - printdata(0, p, 0, l); - munmap(p, l); - return 0; -} -#endif diff --git a/contrib/file/src/der.h b/contrib/file/src/der.h deleted file mode 100644 index 3333239..0000000 --- a/contrib/file/src/der.h +++ /dev/null @@ -1,28 +0,0 @@ -/*- - * Copyright (c) 2016 Christos Zoulas - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -extern int der_offs(struct magic_set *, struct magic *, size_t); -extern int der_cmp(struct magic_set *, struct magic *); diff --git a/contrib/file/src/dprintf.c b/contrib/file/src/dprintf.c deleted file mode 100644 index 3ae1581..0000000 --- a/contrib/file/src/dprintf.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Ian F. Darwin 1986-1995. - * Software written by Ian F. Darwin and others; - * maintained 1995-present by Christos Zoulas and others. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice immediately at the beginning of the file, without modification, - * this list of conditions, and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#include "file.h" - -#ifndef lint -FILE_RCSID("@(#)$File: dprintf.c,v 1.1 2015/11/13 15:36:14 christos Exp $") -#endif /* lint */ - -#include <assert.h> -#include <unistd.h> -#include <stdio.h> -#include <stdarg.h> - -int -dprintf(int fd, const char *fmt, ...) -{ - va_list ap; - /* Simpler than using vasprintf() here, since we never need more */ - char buf[1024]; - int len; - - va_start(ap, fmt); - len = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - - if ((size_t)len >= sizeof(buf)) - return -1; - - if (write(fd, buf, (size_t)len) != len) - return -1; - - return len; -} diff --git a/contrib/file/src/file.c b/contrib/file/src/file.c index 2226ec4..fa46b95 100644 --- a/contrib/file/src/file.c +++ b/contrib/file/src/file.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: file.c,v 1.170 2016/03/31 17:51:12 christos Exp $") +FILE_RCSID("@(#)$File: file.c,v 1.167 2015/09/11 17:24:09 christos Exp $") #endif /* lint */ #include "magic.h" @@ -94,9 +94,9 @@ private const struct option long_options[] = { #define OPT_EXTENSIONS 3 #define OPT_MIME_TYPE 4 #define OPT_MIME_ENCODING 5 -#define OPT(shortname, longname, opt, def, doc) \ +#define OPT(shortname, longname, opt, doc) \ {longname, opt, NULL, shortname}, -#define OPT_LONGONLY(longname, opt, def, doc, id) \ +#define OPT_LONGONLY(longname, opt, doc, id) \ {longname, opt, NULL, id}, #include "file_opts.h" #undef OPT @@ -132,17 +132,15 @@ private struct { { "elf_shnum", MAGIC_PARAM_ELF_SHNUM_MAX, 0 }, { "elf_notes", MAGIC_PARAM_ELF_NOTES_MAX, 0 }, { "regex", MAGIC_PARAM_REGEX_MAX, 0 }, - { "bytes", MAGIC_PARAM_BYTES_MAX, 0 }, }; private char *progname; /* used throughout */ -private int posixly; #ifdef __dead __dead #endif private void usage(void); -private void docprint(const char *, int); +private void docprint(const char *); #ifdef __dead __dead #endif @@ -185,8 +183,7 @@ main(int argc, char *argv[]) progname = argv[0]; #ifdef S_IFLNK - posixly = getenv("POSIXLY_CORRECT") != NULL; - flags |= posixly ? MAGIC_SYMLINK : 0; + flags |= getenv("POSIXLY_CORRECT") ? MAGIC_SYMLINK : 0; #endif while ((c = getopt_long(argc, argv, OPTSTRING, long_options, &longindex)) != -1) @@ -207,7 +204,7 @@ main(int argc, char *argv[]) flags |= MAGIC_MIME_ENCODING; break; case '0': - nulsep++; + nulsep = 1; break; case 'b': bflag++; @@ -495,28 +492,24 @@ unwrap(struct magic_set *ms, const char *fn) private int process(struct magic_set *ms, const char *inname, int wid) { - const char *type, c = nulsep > 1 ? '\0' : '\n'; + const char *type; int std_in = strcmp(inname, "-") == 0; if (wid > 0 && !bflag) { (void)printf("%s", std_in ? "/dev/stdin" : inname); if (nulsep) (void)putc('\0', stdout); - if (nulsep < 2) { - (void)printf("%s", separator); - (void)printf("%*s ", - (int) (nopad ? 0 : (wid - file_mbswidth(inname))), - ""); - } + (void)printf("%s", separator); + (void)printf("%*s ", + (int) (nopad ? 0 : (wid - file_mbswidth(inname))), ""); } type = magic_file(ms, std_in ? NULL : inname); - if (type == NULL) { - (void)printf("ERROR: %s%c", magic_error(ms), c); + (void)printf("ERROR: %s\n", magic_error(ms)); return 1; } else { - (void)printf("%s%c", type, c); + (void)printf("%s\n", type); return 0; } } @@ -566,17 +559,7 @@ usage(void) } private void -defprint(int def) -{ - if (!def) - return; - if (((def & 1) && posixly) || ((def & 2) && !posixly)) - fprintf(stdout, " (default)"); - fputc('\n', stdout); -} - -private void -docprint(const char *opts, int def) +docprint(const char *opts) { size_t i; int comma; @@ -585,7 +568,6 @@ docprint(const char *opts, int def) p = strstr(opts, "%o"); if (p == NULL) { fprintf(stdout, "%s", opts); - defprint(def); return; } @@ -613,12 +595,12 @@ help(void) "Usage: file [OPTION...] [FILE...]\n" "Determine type of FILEs.\n" "\n", stdout); -#define OPT(shortname, longname, opt, def, doc) \ +#define OPT(shortname, longname, opt, doc) \ fprintf(stdout, " -%c, --" longname, shortname), \ - docprint(doc, def); -#define OPT_LONGONLY(longname, opt, def, doc, id) \ + docprint(doc); +#define OPT_LONGONLY(longname, opt, doc, id) \ fprintf(stdout, " --" longname), \ - docprint(doc, def); + docprint(doc); #include "file_opts.h" #undef OPT #undef OPT_LONGONLY diff --git a/contrib/file/src/file.h b/contrib/file/src/file.h index f22fcd9..b0f0cc1 100644 --- a/contrib/file/src/file.h +++ b/contrib/file/src/file.h @@ -27,7 +27,7 @@ */ /* * file.h - definitions for file(1) program - * @(#)$File: file.h,v 1.178 2016/03/31 17:51:12 christos Exp $ + * @(#)$File: file.h,v 1.172 2015/09/11 17:24:09 christos Exp $ */ #ifndef __file_h__ @@ -127,8 +127,8 @@ #define MAX(a,b) (((a) > (b)) ? (a) : (b)) #endif -#ifndef FILE_BYTES_MAX -# define FILE_BYTES_MAX (1024 * 1024) /* how much of the file to look at */ +#ifndef HOWMANY +# define HOWMANY (1024 * 1024) /* how much of the file to look at */ #endif #define MAXMAGIS 8192 /* max entries in any one magic file or directory */ @@ -227,8 +227,7 @@ struct magic { #define FILE_NAME 45 #define FILE_USE 46 #define FILE_CLEAR 47 -#define FILE_DER 48 -#define FILE_NAMES_SIZE 49 /* size of array to contain all names */ +#define FILE_NAMES_SIZE 48 /* size of array to contain all names */ #define IS_STRING(t) \ ((t) == FILE_STRING || \ @@ -366,11 +365,9 @@ struct mlist { #ifdef __cplusplus #define CAST(T, b) static_cast<T>(b) #define RCAST(T, b) reinterpret_cast<T>(b) -#define CCAST(T, b) const_cast<T>(b) #else -#define CAST(T, b) ((T)(b)) -#define RCAST(T, b) ((T)(b)) -#define CCAST(T, b) ((T)(uintptr_t)(b)) +#define CAST(T, b) (T)(b) +#define RCAST(T, b) (T)(b) #endif struct level_info { @@ -419,8 +416,7 @@ struct magic_set { uint16_t elf_phnum_max; uint16_t elf_notes_max; uint16_t regex_max; - size_t bytes_max; /* number of bytes to read from file */ -#define FILE_INDIR_MAX 50 +#define FILE_INDIR_MAX 15 #define FILE_NAME_MAX 30 #define FILE_ELF_SHNUM_MAX 32768 #define FILE_ELF_PHNUM_MAX 2048 @@ -465,7 +461,7 @@ protected int file_encoding(struct magic_set *, const unsigned char *, size_t, unichar **, size_t *, const char **, const char **, const char **); protected int file_is_tar(struct magic_set *, const unsigned char *, size_t); protected int file_softmagic(struct magic_set *, const unsigned char *, size_t, - uint16_t *, uint16_t *, int, int); + uint16_t, uint16_t *, int, int); protected int file_apprentice(struct magic_set *, const char *, int); protected int buffer_apprentice(struct magic_set *, struct magic **, size_t *, size_t); @@ -510,8 +506,6 @@ typedef struct { #define USE_C_LOCALE locale_t old_lc_ctype; locale_t c_lc_ctype; -#else - char *old_lc_ctype; #endif int rc; regex_t rx; @@ -556,9 +550,6 @@ int vasprintf(char **, const char *, va_list); #ifndef HAVE_ASPRINTF int asprintf(char **, const char *, ...); #endif -#ifndef HAVE_DPRINTF -int dprintf(int, const char *, ...); -#endif #ifndef HAVE_STRLCPY size_t strlcpy(char *, const char *, size_t); diff --git a/contrib/file/src/file_opts.h b/contrib/file/src/file_opts.h index 52ace18..3d9a7ce 100644 --- a/contrib/file/src/file_opts.h +++ b/contrib/file/src/file_opts.h @@ -12,47 +12,47 @@ * switch statement! */ -OPT_LONGONLY("help", 0, 0, " display this help and exit\n", OPT_HELP) -OPT('v', "version", 0, 0, " output version information and exit\n") -OPT('m', "magic-file", 1, 0, " LIST use LIST as a colon-separated list of magic\n" +OPT_LONGONLY("help", 0, " display this help and exit\n", OPT_HELP) +OPT('v', "version", 0, " output version information and exit\n") +OPT('m', "magic-file", 1, " LIST use LIST as a colon-separated list of magic\n" " number files\n") -OPT('z', "uncompress", 0, 0, " try to look inside compressed files\n") -OPT('Z', "uncompress-noreport", 0, 0, " only print the contents of compressed files\n") -OPT('b', "brief", 0, 0, " do not prepend filenames to output lines\n") -OPT('c', "checking-printout", 0, 0, " print the parsed form of the magic file, use in\n" +OPT('z', "uncompress", 0, " try to look inside compressed files\n") +OPT('Z', "uncompress-noreport", 0, " only print the contents of compressed files\n") +OPT('b', "brief", 0, " do not prepend filenames to output lines\n") +OPT('c', "checking-printout", 0, " print the parsed form of the magic file, use in\n" " conjunction with -m to debug a new magic file\n" " before installing it\n") -OPT('e', "exclude", 1, 0, " TEST exclude TEST from the list of test to be\n" +OPT('e', "exclude", 1, " TEST exclude TEST from the list of test to be\n" " performed for file. Valid tests are:\n" " %o\n") -OPT('f', "files-from", 1, 0, " FILE read the filenames to be examined from FILE\n") -OPT('F', "separator", 1, 0, " STRING use string as separator instead of `:'\n") -OPT('i', "mime", 0, 0, " output MIME type strings (--mime-type and\n" +OPT('f', "files-from", 1, " FILE read the filenames to be examined from FILE\n") +OPT('F', "separator", 1, " STRING use string as separator instead of `:'\n") +OPT('i', "mime", 0, " output MIME type strings (--mime-type and\n" " --mime-encoding)\n") -OPT_LONGONLY("apple", 0, 0, " output the Apple CREATOR/TYPE\n", OPT_APPLE) -OPT_LONGONLY("extension", 0, 0, " output a slash-separated list of extensions\n", OPT_EXTENSIONS) -OPT_LONGONLY("mime-type", 0, 0, " output the MIME type\n", OPT_MIME_TYPE) -OPT_LONGONLY("mime-encoding", 0, 0, " output the MIME encoding\n", OPT_MIME_ENCODING) -OPT('k', "keep-going", 0, 0, " don't stop at the first match\n") -OPT('l', "list", 0, 0, " list magic strength\n") +OPT_LONGONLY("apple", 0, " output the Apple CREATOR/TYPE\n", OPT_APPLE) +OPT_LONGONLY("extension", 0, " output a slash-separated list of extensions\n", OPT_EXTENSIONS) +OPT_LONGONLY("mime-type", 0, " output the MIME type\n", OPT_MIME_TYPE) +OPT_LONGONLY("mime-encoding", 0, " output the MIME encoding\n", OPT_MIME_ENCODING) +OPT('k', "keep-going", 0, " don't stop at the first match\n") +OPT('l', "list", 0, " list magic strength\n") #ifdef S_IFLNK -OPT('L', "dereference", 0, 1, " follow symlinks") -OPT('h', "no-dereference", 0, 2, " don't follow symlinks") +OPT('L', "dereference", 0, " follow symlinks (default)\n") +OPT('h', "no-dereference", 0, " don't follow symlinks\n") #endif -OPT('n', "no-buffer", 0, 0, " do not buffer output\n") -OPT('N', "no-pad", 0, 0, " do not pad output\n") -OPT('0', "print0", 0, 0, " terminate filenames with ASCII NUL\n") +OPT('n', "no-buffer", 0, " do not buffer output\n") +OPT('N', "no-pad", 0, " do not pad output\n") +OPT('0', "print0", 0, " terminate filenames with ASCII NUL\n") #if defined(HAVE_UTIME) || defined(HAVE_UTIMES) -OPT('p', "preserve-date", 0, 0, " preserve access times on files\n") +OPT('p', "preserve-date", 0, " preserve access times on files\n") #endif -OPT('P', "parameter", 1, 0, " set file engine parameter limits\n" +OPT('P', "parameter", 1, " set file engine parameter limits\n" " indir 15 recursion limit for indirection\n" " name 30 use limit for name/use magic\n" " elf_notes 256 max ELF notes processed\n" " elf_phnum 128 max ELF prog sections processed\n" " elf_shnum 32768 max ELF sections processed\n") -OPT('r', "raw", 0, 0, " don't translate unprintable chars to \\ooo\n") -OPT('s', "special-files", 0, 0, " treat special (block/char devices) files as\n" +OPT('r', "raw", 0, " don't translate unprintable chars to \\ooo\n") +OPT('s', "special-files", 0, " treat special (block/char devices) files as\n" " ordinary ones\n") -OPT('C', "compile", 0, 0, " compile file specified by -m\n") -OPT('d', "debug", 0, 0, " print debugging messages\n") +OPT('C', "compile", 0, " compile file specified by -m\n") +OPT('d', "debug", 0, " print debugging messages\n") diff --git a/contrib/file/src/fmtcheck.c b/contrib/file/src/fmtcheck.c index 486aa08..0fc7038 100644 --- a/contrib/file/src/fmtcheck.c +++ b/contrib/file/src/fmtcheck.c @@ -91,23 +91,6 @@ get_next_format_from_precision(const char **pf) f++; longdouble = 1; break; -#ifdef WIN32 - case 'I': - f++; - if (!*f) RETURN(pf,f,FMTCHECK_UNKNOWN); - if (*f == '3' && f[1] == '2') { - f += 2; - } else if (*f == '6' && f[1] == '4') { - f += 2; - quad = 1; - } -#ifdef _WIN64 - else { - quad = 1; - } -#endif - break; -#endif default: break; } diff --git a/contrib/file/src/funcs.c b/contrib/file/src/funcs.c index df8dbae..97d4a0a 100644 --- a/contrib/file/src/funcs.c +++ b/contrib/file/src/funcs.c @@ -27,7 +27,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: funcs.c,v 1.89 2016/03/21 15:56:53 christos Exp $") +FILE_RCSID("@(#)$File: funcs.c,v 1.84 2015/09/10 13:32:19 christos Exp $") #endif /* lint */ #include "magic.h" @@ -178,6 +178,7 @@ file_buffer(struct magic_set *ms, int fd, const char *inname __attribute__ ((__u const void *buf, size_t nb) { int m = 0, rv = 0, looks_text = 0; + int mime = ms->flags & MAGIC_MIME; const unsigned char *ubuf = CAST(const unsigned char *, buf); unichar *u8buf = NULL; size_t ulen; @@ -251,8 +252,7 @@ file_buffer(struct magic_set *ms, int fd, const char *inname __attribute__ ((__u /* try soft magic tests */ if ((ms->flags & MAGIC_NO_CHECK_SOFT) == 0) - m = file_softmagic(ms, ubuf, nb, NULL, NULL, BINTEST, - looks_text); + m = file_softmagic(ms, ubuf, nb, 0, NULL, BINTEST, looks_text); if ((ms->flags & MAGIC_DEBUG) != 0) (void)fprintf(stderr, "[try softmagic %d]\n", m); if (m) { @@ -293,19 +293,9 @@ file_buffer(struct magic_set *ms, int fd, const char *inname __attribute__ ((__u simple: /* give up */ m = 1; - if (ms->flags & MAGIC_MIME) { - if ((ms->flags & MAGIC_MIME_TYPE) && - file_printf(ms, "%s", type) == -1) - rv = -1; - } else if (ms->flags & MAGIC_APPLE) { - if (file_printf(ms, "UNKNUNKN") == -1) - rv = -1; - } else if (ms->flags & MAGIC_EXTENSION) { - if (file_printf(ms, "???") == -1) - rv = -1; - } else { - if (file_printf(ms, "%s", def) == -1) - rv = -1; + if ((!mime || (mime & MAGIC_MIME_TYPE)) && + file_printf(ms, "%s", mime ? type : def) == -1) { + rv = -1; } done: if ((ms->flags & MAGIC_MIME_ENCODING) != 0) { @@ -495,8 +485,6 @@ file_regcomp(file_regex_t *rx, const char *pat, int flags) assert(rx->c_lc_ctype != NULL); rx->old_lc_ctype = uselocale(rx->c_lc_ctype); assert(rx->old_lc_ctype != NULL); -#else - rx->old_lc_ctype = setlocale(LC_CTYPE, "C"); #endif rx->pat = pat; @@ -519,8 +507,6 @@ file_regfree(file_regex_t *rx) #ifdef USE_C_LOCALE (void)uselocale(rx->old_lc_ctype); freelocale(rx->c_lc_ctype); -#else - (void)setlocale(LC_CTYPE, rx->old_lc_ctype); #endif } diff --git a/contrib/file/src/magic.c b/contrib/file/src/magic.c index 315a944..87ac1cb 100644 --- a/contrib/file/src/magic.c +++ b/contrib/file/src/magic.c @@ -33,7 +33,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: magic.c,v 1.97 2016/03/31 17:51:12 christos Exp $") +FILE_RCSID("@(#)$File: magic.c,v 1.95 2015/09/11 17:24:09 christos Exp $") #endif /* lint */ #include "magic.h" @@ -346,7 +346,7 @@ private void close_and_restore(const struct magic_set *ms, const char *name, int fd, const struct stat *sb) { - if (name == NULL) + if (fd == STDIN_FILENO || name == NULL) return; (void) close(fd); @@ -417,7 +417,7 @@ file_or_fd(struct magic_set *ms, const char *inname, int fd) * some overlapping space for matches near EOF */ #define SLOP (1 + sizeof(union VALUETYPE)) - if ((buf = CAST(unsigned char *, malloc(ms->bytes_max + SLOP))) == NULL) + if ((buf = CAST(unsigned char *, malloc(HOWMANY + SLOP))) == NULL) return NULL; switch (file_fsmagic(ms, inname, &sb)) { @@ -481,13 +481,13 @@ file_or_fd(struct magic_set *ms, const char *inname, int fd) } /* - * try looking at the first ms->bytes_max bytes + * try looking at the first HOWMANY bytes */ if (ispipe) { ssize_t r = 0; while ((r = sread(fd, (void *)&buf[nbytes], - (size_t)(ms->bytes_max - nbytes), 1)) > 0) { + (size_t)(HOWMANY - nbytes), 1)) > 0) { nbytes += r; if (r < PIPE_BUF) break; } @@ -503,10 +503,10 @@ file_or_fd(struct magic_set *ms, const char *inname, int fd) } else { /* Windows refuses to read from a big console buffer. */ size_t howmany = -#if defined(WIN32) +#if defined(WIN32) && HOWMANY > 8 * 1024 _isatty(fd) ? 8 * 1024 : #endif - ms->bytes_max; + HOWMANY; if ((nbytes = read(fd, (char *)buf, howmany)) == -1) { if (inname == NULL && fd != STDIN_FILENO) file_error(ms, errno, "cannot read fd %d", fd); @@ -606,9 +606,6 @@ magic_setparam(struct magic_set *ms, int param, const void *val) case MAGIC_PARAM_REGEX_MAX: ms->elf_notes_max = (uint16_t)*(const size_t *)val; return 0; - case MAGIC_PARAM_BYTES_MAX: - ms->bytes_max = *(const size_t *)val; - return 0; default: errno = EINVAL; return -1; @@ -637,9 +634,6 @@ magic_getparam(struct magic_set *ms, int param, void *val) case MAGIC_PARAM_REGEX_MAX: *(size_t *)val = ms->regex_max; return 0; - case MAGIC_PARAM_BYTES_MAX: - *(size_t *)val = ms->bytes_max; - return 0; default: errno = EINVAL; return -1; diff --git a/contrib/file/src/magic.h b/contrib/file/src/magic.h index af6b5b6..eab3d3a 100644 --- a/contrib/file/src/magic.h +++ b/contrib/file/src/magic.h @@ -80,7 +80,7 @@ #define MAGIC_NO_CHECK_FORTRAN 0x000000 /* Don't check ascii/fortran */ #define MAGIC_NO_CHECK_TROFF 0x000000 /* Don't check ascii/troff */ -#define MAGIC_VERSION 525 /* This implementation */ +#define MAGIC_VERSION 524 /* This implementation */ #ifdef __cplusplus @@ -114,7 +114,6 @@ int magic_errno(magic_t); #define MAGIC_PARAM_ELF_SHNUM_MAX 3 #define MAGIC_PARAM_ELF_NOTES_MAX 4 #define MAGIC_PARAM_REGEX_MAX 5 -#define MAGIC_PARAM_BYTES_MAX 6 int magic_setparam(magic_t, int, const void *); int magic_getparam(magic_t, int, void *); diff --git a/contrib/file/src/print.c b/contrib/file/src/print.c index a0221b1..0d52290 100644 --- a/contrib/file/src/print.c +++ b/contrib/file/src/print.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: print.c,v 1.81 2016/01/19 15:09:03 christos Exp $") +FILE_RCSID("@(#)$File: print.c,v 1.80 2015/07/16 14:28:57 christos Exp $") #endif /* lint */ #include <string.h> @@ -198,7 +198,6 @@ file_mdump(struct magic *m) break; case FILE_USE: case FILE_NAME: - case FILE_DER: (void) fprintf(stderr, "'%s'", m->value.s); break; default: diff --git a/contrib/file/src/readcdf.c b/contrib/file/src/readcdf.c index f79ac99..99d8ec0 100644 --- a/contrib/file/src/readcdf.c +++ b/contrib/file/src/readcdf.c @@ -26,7 +26,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: readcdf.c,v 1.56 2016/03/03 22:20:03 christos Exp $") +FILE_RCSID("@(#)$File: readcdf.c,v 1.53 2015/04/09 20:01:41 christos Exp $") #endif #include <assert.h> @@ -60,16 +60,12 @@ static const struct nv { { "Windows Installer", "vnd.ms-msi", }, { NULL, NULL, }, }, name2mime[] = { - { "Book", "vnd.ms-excel", }, - { "Workbook", "vnd.ms-excel", }, { "WordDocument", "msword", }, { "PowerPoint", "vnd.ms-powerpoint", }, { "DigitalSignature", "vnd.ms-msi", }, { NULL, NULL, }, }, name2desc[] = { - { "Book", "Microsoft Excel", }, - { "Workbook", "Microsoft Excel", }, - { "WordDocument", "Microsoft Word", }, + { "WordDocument", "Microsoft Office Word",}, { "PowerPoint", "Microsoft PowerPoint", }, { "DigitalSignature", "Microsoft Installer", }, { NULL, NULL, }, @@ -123,8 +119,6 @@ cdf_app_to_mime(const char *vbuf, const struct nv *nv) assert(c_lc_ctype != NULL); old_lc_ctype = uselocale(c_lc_ctype); assert(old_lc_ctype != NULL); -#else - char *old_lc_ctype = setlocale(LC_CTYPE, "C"); #endif for (i = 0; nv[i].pattern != NULL; i++) if (strcasestr(vbuf, nv[i].pattern) != NULL) { @@ -137,8 +131,6 @@ cdf_app_to_mime(const char *vbuf, const struct nv *nv) #ifdef USE_C_LOCALE (void)uselocale(old_lc_ctype); freelocale(c_lc_ctype); -#else - setlocale(LC_CTYPE, old_lc_ctype); #endif return rv; } diff --git a/contrib/file/src/readelf.c b/contrib/file/src/readelf.c index 39598f7..2a7fc01 100644 --- a/contrib/file/src/readelf.c +++ b/contrib/file/src/readelf.c @@ -27,7 +27,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: readelf.c,v 1.127 2015/11/18 12:29:29 christos Exp $") +FILE_RCSID("@(#)$File: readelf.c,v 1.122 2015/09/10 13:59:32 christos Exp $") #endif #ifdef BUILTIN_ELF @@ -50,7 +50,7 @@ private int dophn_exec(struct magic_set *, int, int, int, off_t, int, size_t, private int doshn(struct magic_set *, int, int, int, off_t, int, size_t, off_t, int, int, int *, uint16_t *); private size_t donote(struct magic_set *, void *, size_t, size_t, int, - int, size_t, int *, uint16_t *, int, off_t, int, off_t); + int, size_t, int *, uint16_t *); #define ELF_ALIGN(a) ((((a) + align - 1) / align) * align) @@ -177,11 +177,6 @@ getu64(int swap, uint64_t value) elf_getu32(swap, ph32.p_align) : 4) \ : (off_t) (ph64.p_align ? \ elf_getu64(swap, ph64.p_align) : 4))) -#define xph_vaddr (size_t)((clazz == ELFCLASS32 \ - ? (off_t) (ph32.p_vaddr ? \ - elf_getu32(swap, ph32.p_vaddr) : 4) \ - : (off_t) (ph64.p_vaddr ? \ - elf_getu64(swap, ph64.p_vaddr) : 4))) #define xph_filesz (size_t)((clazz == ELFCLASS32 \ ? elf_getu32(swap, ph32.p_filesz) \ : elf_getu64(swap, ph64.p_filesz))) @@ -192,8 +187,8 @@ getu64(int swap, uint64_t value) ? elf_getu32(swap, ph32.p_memsz) \ : elf_getu64(swap, ph64.p_memsz))) #define xnh_sizeof (clazz == ELFCLASS32 \ - ? sizeof(nh32) \ - : sizeof(nh64)) + ? sizeof nh32 \ + : sizeof nh64) #define xnh_type (clazz == ELFCLASS32 \ ? elf_getu32(swap, nh32.n_type) \ : elf_getu32(swap, nh64.n_type)) @@ -218,18 +213,6 @@ getu64(int swap, uint64_t value) #define xcap_val (clazz == ELFCLASS32 \ ? elf_getu32(swap, cap32.c_un.c_val) \ : elf_getu64(swap, cap64.c_un.c_val)) -#define xauxv_addr (clazz == ELFCLASS32 \ - ? (void *)&auxv32 \ - : (void *)&auxv64) -#define xauxv_sizeof (clazz == ELFCLASS32 \ - ? sizeof(auxv32) \ - : sizeof(auxv64)) -#define xauxv_type (clazz == ELFCLASS32 \ - ? elf_getu32(swap, auxv32.a_type) \ - : elf_getu64(swap, auxv64.a_type)) -#define xauxv_val (clazz == ELFCLASS32 \ - ? elf_getu32(swap, auxv32.a_v) \ - : elf_getu64(swap, auxv64.a_v)) #ifdef ELFCORE /* @@ -319,7 +302,6 @@ private const char os_style_names[][8] = { #define FLAGS_DID_NETBSD_CMODEL 0x040 #define FLAGS_DID_NETBSD_UNKNOWN 0x080 #define FLAGS_IS_CORE 0x100 -#define FLAGS_DID_AUXV 0x200 private int dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off, @@ -330,8 +312,6 @@ dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off, size_t offset, len; unsigned char nbuf[BUFSIZ]; ssize_t bufsize; - off_t ph_off = off; - int ph_num = num; if (size != xph_sizeof) { if (file_printf(ms, ", corrupted program header size") == -1) @@ -371,8 +351,7 @@ dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off, if (offset >= (size_t)bufsize) break; offset = donote(ms, nbuf, offset, (size_t)bufsize, - clazz, swap, 4, flags, notecount, fd, ph_off, - ph_num, fsize); + clazz, swap, 4, flags, notecount); if (offset == 0) break; @@ -834,157 +813,9 @@ do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, return 0; } -private off_t -get_offset_from_virtaddr(struct magic_set *ms, int swap, int clazz, int fd, - off_t off, int num, off_t fsize, uint64_t virtaddr) -{ - Elf32_Phdr ph32; - Elf64_Phdr ph64; - - /* - * Loop through all the program headers and find the header with - * virtual address in which the "virtaddr" belongs to. - */ - for ( ; num; num--) { - if (pread(fd, xph_addr, xph_sizeof, off) < (ssize_t)xph_sizeof) { - file_badread(ms); - return -1; - } - off += xph_sizeof; - - if (fsize != SIZE_UNKNOWN && xph_offset > fsize) { - /* Perhaps warn here */ - continue; - } - - if (virtaddr >= xph_vaddr && virtaddr < xph_vaddr + xph_filesz) - return xph_offset + (virtaddr - xph_vaddr); - } - return 0; -} - -private size_t -get_string_on_virtaddr(struct magic_set *ms, - int swap, int clazz, int fd, off_t ph_off, int ph_num, - off_t fsize, uint64_t virtaddr, char *buf, ssize_t buflen) -{ - char *bptr; - off_t offset; - - if (buflen == 0) - return 0; - - offset = get_offset_from_virtaddr(ms, swap, clazz, fd, ph_off, ph_num, - fsize, virtaddr); - if ((buflen = pread(fd, buf, buflen, offset)) <= 0) { - file_badread(ms); - return 0; - } - - buf[buflen - 1] = '\0'; - - /* We expect only printable characters, so return if buffer contains - * non-printable character before the '\0' or just '\0'. */ - for (bptr = buf; *bptr && isprint((unsigned char)*bptr); bptr++) - continue; - if (*bptr != '\0') - return 0; - - return bptr - buf; -} - - -private int -do_auxv_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, - int swap, uint32_t namesz __attribute__((__unused__)), - uint32_t descsz __attribute__((__unused__)), - size_t noff __attribute__((__unused__)), size_t doff, - int *flags, size_t size __attribute__((__unused__)), int clazz, - int fd, off_t ph_off, int ph_num, off_t fsize) -{ -#ifdef ELFCORE - Aux32Info auxv32; - Aux64Info auxv64; - size_t elsize = xauxv_sizeof; - const char *tag; - int is_string; - size_t nval; - - if (type != NT_AUXV || (*flags & FLAGS_IS_CORE) == 0) - return 0; - - *flags |= FLAGS_DID_AUXV; - - nval = 0; - for (size_t off = 0; off + elsize <= descsz; off += elsize) { - (void)memcpy(xauxv_addr, &nbuf[doff + off], xauxv_sizeof); - /* Limit processing to 50 vector entries to prevent DoS */ - if (nval++ >= 50) { - file_error(ms, 0, "Too many ELF Auxv elements"); - return 1; - } - - switch(xauxv_type) { - case AT_LINUX_EXECFN: - is_string = 1; - tag = "execfn"; - break; - case AT_LINUX_PLATFORM: - is_string = 1; - tag = "platform"; - break; - case AT_LINUX_UID: - is_string = 0; - tag = "real uid"; - break; - case AT_LINUX_GID: - is_string = 0; - tag = "real gid"; - break; - case AT_LINUX_EUID: - is_string = 0; - tag = "effective uid"; - break; - case AT_LINUX_EGID: - is_string = 0; - tag = "effective gid"; - break; - default: - is_string = 0; - tag = NULL; - break; - } - - if (tag == NULL) - continue; - - if (is_string) { - char buf[256]; - ssize_t buflen; - buflen = get_string_on_virtaddr(ms, swap, clazz, fd, - ph_off, ph_num, fsize, xauxv_val, buf, sizeof(buf)); - - if (buflen == 0) - continue; - - if (file_printf(ms, ", %s: '%s'", tag, buf) == -1) - return 0; - } else { - if (file_printf(ms, ", %s: %d", tag, (int) xauxv_val) - == -1) - return 0; - } - } - return 1; -#else - return 0; -#endif -} - private size_t donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size, - int clazz, int swap, size_t align, int *flags, uint16_t *notecount, - int fd, off_t ph_off, int ph_num, off_t fsize) + int clazz, int swap, size_t align, int *flags, uint16_t *notecount) { Elf32_Nhdr nh32; Elf64_Nhdr nh64; @@ -1008,7 +839,6 @@ donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size, namesz = xnh_namesz; descsz = xnh_descsz; - if ((namesz == 0) && (descsz == 0)) { /* * We're out of note headers. @@ -1046,36 +876,28 @@ donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size, return (offset >= size) ? offset : size; } - if ((*flags & FLAGS_DID_OS_NOTE) == 0) { if (do_os_note(ms, nbuf, xnh_type, swap, namesz, descsz, noff, doff, flags)) - return offset; + return size; } if ((*flags & FLAGS_DID_BUILD_ID) == 0) { if (do_bid_note(ms, nbuf, xnh_type, swap, namesz, descsz, noff, doff, flags)) - return offset; + return size; } if ((*flags & FLAGS_DID_NETBSD_PAX) == 0) { if (do_pax_note(ms, nbuf, xnh_type, swap, namesz, descsz, noff, doff, flags)) - return offset; + return size; } if ((*flags & FLAGS_DID_CORE) == 0) { if (do_core_note(ms, nbuf, xnh_type, swap, namesz, descsz, noff, doff, flags, size, clazz)) - return offset; - } - - if ((*flags & FLAGS_DID_AUXV) == 0) { - if (do_auxv_note(ms, nbuf, xnh_type, swap, - namesz, descsz, noff, doff, flags, size, clazz, - fd, ph_off, ph_num, fsize)) - return offset; + return size; } if (namesz == 7 && strcmp((char *)&nbuf[noff], "NetBSD") == 0) { @@ -1083,32 +905,32 @@ donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size, descsz = 100; switch (xnh_type) { case NT_NETBSD_VERSION: - return offset; + return size; case NT_NETBSD_MARCH: if (*flags & FLAGS_DID_NETBSD_MARCH) - return offset; + return size; *flags |= FLAGS_DID_NETBSD_MARCH; if (file_printf(ms, ", compiled for: %.*s", (int)descsz, (const char *)&nbuf[doff]) == -1) - return offset; + return size; break; case NT_NETBSD_CMODEL: if (*flags & FLAGS_DID_NETBSD_CMODEL) - return offset; + return size; *flags |= FLAGS_DID_NETBSD_CMODEL; if (file_printf(ms, ", compiler model: %.*s", (int)descsz, (const char *)&nbuf[doff]) == -1) - return offset; + return size; break; default: if (*flags & FLAGS_DID_NETBSD_UNKNOWN) - return offset; + return size; *flags |= FLAGS_DID_NETBSD_UNKNOWN; if (file_printf(ms, ", note=%u", xnh_type) == -1) - return offset; + return size; break; } - return offset; + return size; } return offset; @@ -1258,8 +1080,7 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num, if (noff >= (off_t)xsh_size) break; noff = donote(ms, nbuf, (size_t)noff, - xsh_size, clazz, swap, 4, flags, notecount, - fd, 0, 0, 0); + xsh_size, clazz, swap, 4, flags, notecount); if (noff == 0) break; } @@ -1508,7 +1329,7 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off, break; offset = donote(ms, nbuf, offset, (size_t)bufsize, clazz, swap, align, - flags, notecount, fd, 0, 0, 0); + flags, notecount); if (offset == 0) break; } diff --git a/contrib/file/src/readelf.h b/contrib/file/src/readelf.h index f443b29..732b20c 100644 --- a/contrib/file/src/readelf.h +++ b/contrib/file/src/readelf.h @@ -54,42 +54,6 @@ typedef uint8_t Elf64_Char; #define EI_NIDENT 16 typedef struct { - Elf32_Word a_type; /* 32-bit id */ - Elf32_Word a_v; /* 32-bit id */ -} Aux32Info; - -typedef struct { - Elf64_Xword a_type; /* 64-bit id */ - Elf64_Xword a_v; /* 64-bit id */ -} Aux64Info; - -#define AT_NULL 0 /* end of vector */ -#define AT_IGNORE 1 /* entry should be ignored */ -#define AT_EXECFD 2 /* file descriptor of program */ -#define AT_PHDR 3 /* program headers for program */ -#define AT_PHENT 4 /* size of program header entry */ -#define AT_PHNUM 5 /* number of program headers */ -#define AT_PAGESZ 6 /* system page size */ -#define AT_BASE 7 /* base address of interpreter */ -#define AT_FLAGS 8 /* flags */ -#define AT_ENTRY 9 /* entry point of program */ -#define AT_LINUX_NOTELF 10 /* program is not ELF */ -#define AT_LINUX_UID 11 /* real uid */ -#define AT_LINUX_EUID 12 /* effective uid */ -#define AT_LINUX_GID 13 /* real gid */ -#define AT_LINUX_EGID 14 /* effective gid */ -#define AT_LINUX_PLATFORM 15 /* string identifying CPU for optimizations */ -#define AT_LINUX_HWCAP 16 /* arch dependent hints at CPU capabilities */ -#define AT_LINUX_CLKTCK 17 /* frequency at which times() increments */ -/* AT_* values 18 through 22 are reserved */ -#define AT_LINUX_SECURE 23 /* secure mode boolean */ -#define AT_LINUX_BASE_PLATFORM 24 /* string identifying real platform, may - * differ from AT_PLATFORM. */ -#define AT_LINUX_RANDOM 25 /* address of 16 random bytes */ -#define AT_LINUX_HWCAP2 26 /* extension of AT_HWCAP */ -#define AT_LINUX_EXECFN 31 /* filename of program */ - -typedef struct { Elf32_Char e_ident[EI_NIDENT]; Elf32_Half e_type; Elf32_Half e_machine; diff --git a/contrib/file/src/softmagic.c b/contrib/file/src/softmagic.c index 29533b5..84a8932 100644 --- a/contrib/file/src/softmagic.c +++ b/contrib/file/src/softmagic.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: softmagic.c,v 1.229 2016/03/21 23:04:40 christos Exp $") +FILE_RCSID("@(#)$File: softmagic.c,v 1.218 2015/09/11 17:24:09 christos Exp $") #endif /* lint */ #include "magic.h" @@ -41,27 +41,26 @@ FILE_RCSID("@(#)$File: softmagic.c,v 1.229 2016/03/21 23:04:40 christos Exp $") #include <ctype.h> #include <stdlib.h> #include <time.h> -#include "der.h" private int match(struct magic_set *, struct magic *, uint32_t, - const unsigned char *, size_t, size_t, int, int, int, uint16_t *, + const unsigned char *, size_t, size_t, int, int, int, uint16_t, uint16_t *, int *, int *, int *); private int mget(struct magic_set *, const unsigned char *, - struct magic *, size_t, size_t, unsigned int, int, int, int, uint16_t *, + struct magic *, size_t, size_t, unsigned int, int, int, int, uint16_t, uint16_t *, int *, int *, int *); private int magiccheck(struct magic_set *, struct magic *); private int32_t mprint(struct magic_set *, struct magic *); -private int moffset(struct magic_set *, struct magic *, size_t, int32_t *); +private int32_t moffset(struct magic_set *, struct magic *); private void mdebug(uint32_t, const char *, size_t); private int mcopy(struct magic_set *, union VALUETYPE *, int, int, const unsigned char *, uint32_t, size_t, struct magic *); private int mconvert(struct magic_set *, struct magic *, int); private int print_sep(struct magic_set *, int); private int handle_annotation(struct magic_set *, struct magic *); -private int cvt_8(union VALUETYPE *, const struct magic *); -private int cvt_16(union VALUETYPE *, const struct magic *); -private int cvt_32(union VALUETYPE *, const struct magic *); -private int cvt_64(union VALUETYPE *, const struct magic *); +private void cvt_8(union VALUETYPE *, const struct magic *); +private void cvt_16(union VALUETYPE *, const struct magic *); +private void cvt_32(union VALUETYPE *, const struct magic *); +private void cvt_64(union VALUETYPE *, const struct magic *); #define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o))) #define BE64(p) (((uint64_t)(p)->hq[0]<<56)|((uint64_t)(p)->hq[1]<<48)| \ @@ -88,24 +87,20 @@ private int cvt_64(union VALUETYPE *, const struct magic *); /*ARGSUSED1*/ /* nbytes passed for regularity, maybe need later */ protected int file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes, - uint16_t *indir_count, uint16_t *name_count, int mode, int text) + uint16_t indir_level, uint16_t *name_count, int mode, int text) { struct mlist *ml; int rv, printed_something = 0, need_separator = 0; - uint16_t nc, ic; + uint16_t nc; if (name_count == NULL) { nc = 0; name_count = &nc; } - if (indir_count == NULL) { - ic = 0; - indir_count = ⁣ - } for (ml = ms->mlist[0]->next; ml != ms->mlist[0]; ml = ml->next) if ((rv = match(ms, ml->magic, ml->nmagic, buf, nbytes, 0, mode, - text, 0, indir_count, name_count, + text, 0, indir_level, name_count, &printed_something, &need_separator, NULL)) != 0) return rv; @@ -161,7 +156,7 @@ file_fmtcheck(struct magic_set *ms, const struct magic *m, const char *def, private int match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, const unsigned char *s, size_t nbytes, size_t offset, int mode, int text, - int flip, uint16_t *indir_count, uint16_t *name_count, + int flip, uint16_t indir_level, uint16_t *name_count, int *printed_something, int *need_separator, int *returnval) { uint32_t magindex = 0; @@ -199,7 +194,7 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, /* if main entry matches, print it... */ switch (mget(ms, s, m, nbytes, offset, cont_level, mode, text, - flip, indir_count, name_count, + flip, indir_level, name_count, printed_something, need_separator, returnval)) { case -1: return -1; @@ -239,7 +234,6 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, *returnval = 1; return e; } - /* * If we are going to print something, we'll need to print * a blank before we print something else. @@ -255,8 +249,7 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, if (print && mprint(ms, m) == -1) return -1; - if (moffset(ms, m, nbytes, &ms->c.li[cont_level].off) == -1) - return -1; + ms->c.li[cont_level].off = moffset(ms, m); /* and any continuations that match */ if (file_check_mem(ms, ++cont_level) == -1) @@ -290,7 +283,7 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, } #endif switch (mget(ms, s, m, nbytes, offset, cont_level, mode, - text, flip, indir_count, name_count, + text, flip, indir_level, name_count, printed_something, need_separator, returnval)) { case -1: return -1; @@ -325,7 +318,6 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, break; } else ms->c.li[cont_level].got_match = 1; - if ((e = handle_annotation(ms, m)) != 0) { *need_separator = 1; *printed_something = 1; @@ -362,9 +354,7 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, if (print && mprint(ms, m) == -1) return -1; - if (moffset(ms, m, nbytes, - &ms->c.li[cont_level].off) == -1) - return -1; + ms->c.li[cont_level].off = moffset(ms, m); if (*m->desc) *need_separator = 1; @@ -692,12 +682,7 @@ mprint(struct magic_set *ms, struct magic *m) case FILE_NAME: t = ms->offset; break; - case FILE_DER: - if (file_printf(ms, F(ms, m, "%s"), - file_printable(sbuf, sizeof(sbuf), ms->ms_value.s)) == -1) - return -1; - t = ms->offset; - break; + default: file_magerror(ms, "invalid m->type (%d) in mprint()", m->type); return -1; @@ -705,144 +690,100 @@ mprint(struct magic_set *ms, struct magic *m) return (int32_t)t; } -private int -moffset(struct magic_set *ms, struct magic *m, size_t nbytes, int32_t *op) +private int32_t +moffset(struct magic_set *ms, struct magic *m) { - int32_t o; - switch (m->type) { case FILE_BYTE: - o = CAST(int32_t, (ms->offset + sizeof(char))); - break; + return CAST(int32_t, (ms->offset + sizeof(char))); case FILE_SHORT: case FILE_BESHORT: case FILE_LESHORT: - o = CAST(int32_t, (ms->offset + sizeof(short))); - break; + return CAST(int32_t, (ms->offset + sizeof(short))); case FILE_LONG: case FILE_BELONG: case FILE_LELONG: case FILE_MELONG: - o = CAST(int32_t, (ms->offset + sizeof(int32_t))); - break; + return CAST(int32_t, (ms->offset + sizeof(int32_t))); case FILE_QUAD: case FILE_BEQUAD: case FILE_LEQUAD: - o = CAST(int32_t, (ms->offset + sizeof(int64_t))); - break; + return CAST(int32_t, (ms->offset + sizeof(int64_t))); case FILE_STRING: case FILE_PSTRING: case FILE_BESTRING16: case FILE_LESTRING16: - if (m->reln == '=' || m->reln == '!') { - o = ms->offset + m->vallen; - } else { + if (m->reln == '=' || m->reln == '!') + return ms->offset + m->vallen; + else { union VALUETYPE *p = &ms->ms_value; + uint32_t t; if (*m->value.s == '\0') p->s[strcspn(p->s, "\r\n")] = '\0'; - o = CAST(uint32_t, (ms->offset + strlen(p->s))); + t = CAST(uint32_t, (ms->offset + strlen(p->s))); if (m->type == FILE_PSTRING) - o += (uint32_t)file_pstring_length_size(m); + t += (uint32_t)file_pstring_length_size(m); + return t; } - break; case FILE_DATE: case FILE_BEDATE: case FILE_LEDATE: case FILE_MEDATE: - o = CAST(int32_t, (ms->offset + sizeof(uint32_t))); - break; + return CAST(int32_t, (ms->offset + sizeof(uint32_t))); case FILE_LDATE: case FILE_BELDATE: case FILE_LELDATE: case FILE_MELDATE: - o = CAST(int32_t, (ms->offset + sizeof(uint32_t))); - break; + return CAST(int32_t, (ms->offset + sizeof(uint32_t))); case FILE_QDATE: case FILE_BEQDATE: case FILE_LEQDATE: - o = CAST(int32_t, (ms->offset + sizeof(uint64_t))); - break; + return CAST(int32_t, (ms->offset + sizeof(uint64_t))); case FILE_QLDATE: case FILE_BEQLDATE: case FILE_LEQLDATE: - o = CAST(int32_t, (ms->offset + sizeof(uint64_t))); - break; + return CAST(int32_t, (ms->offset + sizeof(uint64_t))); case FILE_FLOAT: case FILE_BEFLOAT: case FILE_LEFLOAT: - o = CAST(int32_t, (ms->offset + sizeof(float))); - break; + return CAST(int32_t, (ms->offset + sizeof(float))); case FILE_DOUBLE: case FILE_BEDOUBLE: case FILE_LEDOUBLE: - o = CAST(int32_t, (ms->offset + sizeof(double))); - break; + return CAST(int32_t, (ms->offset + sizeof(double))); case FILE_REGEX: if ((m->str_flags & REGEX_OFFSET_START) != 0) - o = CAST(int32_t, ms->search.offset); + return CAST(int32_t, ms->search.offset); else - o = CAST(int32_t, - (ms->search.offset + ms->search.rm_len)); - break; + return CAST(int32_t, (ms->search.offset + + ms->search.rm_len)); case FILE_SEARCH: if ((m->str_flags & REGEX_OFFSET_START) != 0) - o = CAST(int32_t, ms->search.offset); + return CAST(int32_t, ms->search.offset); else - o = CAST(int32_t, (ms->search.offset + m->vallen)); - break; + return CAST(int32_t, (ms->search.offset + m->vallen)); case FILE_CLEAR: case FILE_DEFAULT: case FILE_INDIRECT: - o = ms->offset; - break; - - case FILE_DER: - { - o = der_offs(ms, m, nbytes); - if (o == -1) { - file_error(ms, 0, "EOF computing DER offset"); - return -1; - } - break; - } + return ms->offset; default: - o = 0; - break; - } - - if ((size_t)o >= nbytes) { - file_error(ms, 0, "Offset out of range"); - return -1; + return 0; } - *op = o; - return 0; -} - -private uint32_t -cvt_id3(struct magic_set *ms, uint32_t v) -{ - v = ((((v >> 0) & 0x7f) << 0) | - (((v >> 8) & 0x7f) << 7) | - (((v >> 16) & 0x7f) << 14) | - (((v >> 24) & 0x7f) << 21)); - if ((ms->flags & MAGIC_DEBUG) != 0) - fprintf(stderr, "id3 offs=%u\n", v); - return v; } private int @@ -917,45 +858,37 @@ cvt_flip(int type, int flip) p->fld *= cast m->num_mask; \ break; \ case FILE_OPDIVIDE: \ - if (cast m->num_mask == 0) \ - return -1; \ p->fld /= cast m->num_mask; \ break; \ case FILE_OPMODULO: \ - if (cast m->num_mask == 0) \ - return -1; \ p->fld %= cast m->num_mask; \ break; \ } \ if (m->mask_op & FILE_OPINVERSE) \ p->fld = ~p->fld \ -private int +private void cvt_8(union VALUETYPE *p, const struct magic *m) { DO_CVT(b, (uint8_t)); - return 0; } -private int +private void cvt_16(union VALUETYPE *p, const struct magic *m) { DO_CVT(h, (uint16_t)); - return 0; } -private int +private void cvt_32(union VALUETYPE *p, const struct magic *m) { DO_CVT(l, (uint32_t)); - return 0; } -private int +private void cvt_64(union VALUETYPE *p, const struct magic *m) { DO_CVT(q, (uint64_t)); - return 0; } #define DO_CVT2(fld, cast) \ @@ -971,24 +904,20 @@ cvt_64(union VALUETYPE *p, const struct magic *m) p->fld *= cast m->num_mask; \ break; \ case FILE_OPDIVIDE: \ - if (cast m->num_mask == 0) \ - return -1; \ p->fld /= cast m->num_mask; \ break; \ } \ -private int +private void cvt_float(union VALUETYPE *p, const struct magic *m) { DO_CVT2(f, (float)); - return 0; } -private int +private void cvt_double(union VALUETYPE *p, const struct magic *m) { DO_CVT2(d, (double)); - return 0; } /* @@ -1004,25 +933,21 @@ mconvert(struct magic_set *ms, struct magic *m, int flip) switch (type = cvt_flip(m->type, flip)) { case FILE_BYTE: - if (cvt_8(p, m) == -1) - goto out; + cvt_8(p, m); return 1; case FILE_SHORT: - if (cvt_16(p, m) == -1) - goto out; + cvt_16(p, m); return 1; case FILE_LONG: case FILE_DATE: case FILE_LDATE: - if (cvt_32(p, m) == -1) - goto out; + cvt_32(p, m); return 1; case FILE_QUAD: case FILE_QDATE: case FILE_QLDATE: case FILE_QWDATE: - if (cvt_64(p, m) == -1) - goto out; + cvt_64(p, m); return 1; case FILE_STRING: case FILE_BESTRING16: @@ -1054,78 +979,65 @@ mconvert(struct magic_set *ms, struct magic *m, int flip) } case FILE_BESHORT: p->h = (short)BE16(p); - if (cvt_16(p, m) == -1) - goto out; + cvt_16(p, m); return 1; case FILE_BELONG: case FILE_BEDATE: case FILE_BELDATE: p->l = (int32_t)BE32(p); - if (cvt_32(p, m) == -1) - goto out; + cvt_32(p, m); return 1; case FILE_BEQUAD: case FILE_BEQDATE: case FILE_BEQLDATE: case FILE_BEQWDATE: p->q = (uint64_t)BE64(p); - if (cvt_64(p, m) == -1) - goto out; + cvt_64(p, m); return 1; case FILE_LESHORT: p->h = (short)LE16(p); - if (cvt_16(p, m) == -1) - goto out; + cvt_16(p, m); return 1; case FILE_LELONG: case FILE_LEDATE: case FILE_LELDATE: p->l = (int32_t)LE32(p); - if (cvt_32(p, m) == -1) - goto out; + cvt_32(p, m); return 1; case FILE_LEQUAD: case FILE_LEQDATE: case FILE_LEQLDATE: case FILE_LEQWDATE: p->q = (uint64_t)LE64(p); - if (cvt_64(p, m) == -1) - goto out; + cvt_64(p, m); return 1; case FILE_MELONG: case FILE_MEDATE: case FILE_MELDATE: p->l = (int32_t)ME32(p); - if (cvt_32(p, m) == -1) - goto out; + cvt_32(p, m); return 1; case FILE_FLOAT: - if (cvt_float(p, m) == -1) - goto out; + cvt_float(p, m); return 1; case FILE_BEFLOAT: p->l = BE32(p); - if (cvt_float(p, m) == -1) - goto out; + cvt_float(p, m); return 1; case FILE_LEFLOAT: p->l = LE32(p); - if (cvt_float(p, m) == -1) - goto out; + cvt_float(p, m); return 1; case FILE_DOUBLE: - if (cvt_double(p, m) == -1) - goto out; + cvt_double(p, m); return 1; case FILE_BEDOUBLE: p->q = BE64(p); - if (cvt_double(p, m) == -1) - goto out; + cvt_double(p, m); return 1; case FILE_LEDOUBLE: p->q = LE64(p); - if (cvt_double(p, m) == -1) - goto out; + cvt_double(p, m); return 1; case FILE_REGEX: case FILE_SEARCH: @@ -1133,15 +1045,11 @@ mconvert(struct magic_set *ms, struct magic *m, int flip) case FILE_CLEAR: case FILE_NAME: case FILE_USE: - case FILE_DER: return 1; default: file_magerror(ms, "invalid type %d in mconvert()", m->type); return 0; } -out: - file_magerror(ms, "zerodivide in mconvert()"); - return 0; } @@ -1164,7 +1072,6 @@ mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir, */ if (indir == 0) { switch (type) { - case FILE_DER: case FILE_SEARCH: ms->search.s = RCAST(const char *, s) + offset; ms->search.s_len = nbytes - offset; @@ -1279,7 +1186,7 @@ mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir, private int mget(struct magic_set *ms, const unsigned char *s, struct magic *m, size_t nbytes, size_t o, unsigned int cont_level, int mode, int text, - int flip, uint16_t *indir_count, uint16_t *name_count, + int flip, uint16_t indir_level, uint16_t *name_count, int *printed_something, int *need_separator, int *returnval) { uint32_t offset = ms->offset; @@ -1290,9 +1197,9 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m, union VALUETYPE *p = &ms->ms_value; struct mlist ml; - if (*indir_count >= ms->indir_max) { - file_error(ms, 0, "indirect count (%hu) exceeded", - *indir_count); + if (indir_level >= ms->indir_max) { + file_error(ms, 0, "indirect recursion nesting (%hu) exceeded", + indir_level); return -1; } @@ -1311,7 +1218,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m, SIZE_T_FORMAT "u, " "nbytes=%" SIZE_T_FORMAT "u, il=%hu, nc=%hu)\n", m->type, m->flag, offset, o, nbytes, - *indir_count, *name_count); + indir_level, *name_count); mdebug(offset, (char *)(void *)p, sizeof(union VALUETYPE)); #ifndef COMPILE_ONLY file_mdump(m); @@ -1323,8 +1230,6 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m, if (m->in_op & FILE_OPINDIRECT) { const union VALUETYPE *q = CAST(const union VALUETYPE *, ((const void *)(s + offset + off))); - if (OFFSET_OOB(nbytes, offset + off, sizeof(*q))) - return 0; switch (cvt_flip(m->in_type, flip)) { case FILE_BYTE: off = q->b; @@ -1505,8 +1410,6 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m, if (OFFSET_OOB(nbytes, offset, 4)) return 0; lhs = BE32(p); - if (in_type == FILE_BEID3) - lhs = cvt_id3(ms, lhs); if (off) { switch (m->in_op & FILE_OPS_MASK) { case FILE_OPAND: @@ -1544,8 +1447,6 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m, if (OFFSET_OOB(nbytes, offset, 4)) return 0; lhs = LE32(p); - if (in_type == FILE_LEID3) - lhs = cvt_id3(ms, lhs); if (off) { switch (m->in_op & FILE_OPS_MASK) { case FILE_OPAND: @@ -1653,6 +1554,20 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m, break; } + switch (in_type) { + case FILE_LEID3: + case FILE_BEID3: + offset = ((((offset >> 0) & 0x7f) << 0) | + (((offset >> 8) & 0x7f) << 7) | + (((offset >> 16) & 0x7f) << 14) | + (((offset >> 24) & 0x7f) << 21)); + if ((ms->flags & MAGIC_DEBUG) != 0) + fprintf(stderr, "id3 offs=%u\n", offset); + break; + default: + break; + } + if (m->flag & INDIROFFADD) { offset += ms->c.li[cont_level-1].off; if (offset == 0) { @@ -1741,9 +1656,8 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m, if ((pb = file_push_buffer(ms)) == NULL) return -1; - (*indir_count)++; rv = file_softmagic(ms, s + offset, nbytes - offset, - indir_count, name_count, BINTEST, text); + indir_level + 1, name_count, BINTEST, text); if ((ms->flags & MAGIC_DEBUG) != 0) fprintf(stderr, "indirect @offs=%u[%d]\n", offset, rv); @@ -1783,7 +1697,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m, if (m->flag & NOSPACE) *need_separator = 0; rv = match(ms, ml.magic, ml.nmagic, s, nbytes, offset + o, - mode, text, flip, indir_count, name_count, + mode, text, flip, indir_level, name_count, printed_something, need_separator, returnval); if (rv != 1) *need_separator = oneed_separator; @@ -1795,7 +1709,6 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m, if (file_printf(ms, "%s", m->desc) == -1) return -1; return 1; - case FILE_DER: case FILE_DEFAULT: /* nothing to check */ case FILE_CLEAR: default: @@ -2056,8 +1969,10 @@ magiccheck(struct magic_set *ms, struct magic *m) file_regerror(&rx, rc, ms); v = (uint64_t)-1; } else { - regmatch_t pmatch; + regmatch_t pmatch[1]; size_t slen = ms->search.s_len; +#ifndef REG_STARTEND +#define REG_STARTEND 0 char *copy; if (slen != 0) { copy = malloc(slen); @@ -2074,15 +1989,22 @@ magiccheck(struct magic_set *ms, struct magic *m) search = ms->search.s; copy = NULL; } +#else + search = ms->search.s; + pmatch[0].rm_so = 0; + pmatch[0].rm_eo = slen; +#endif rc = file_regexec(&rx, (const char *)search, - 1, &pmatch, 0); + 1, pmatch, REG_STARTEND); +#if REG_STARTEND == 0 free(copy); +#endif switch (rc) { case 0: - ms->search.s += (int)pmatch.rm_so; - ms->search.offset += (size_t)pmatch.rm_so; + ms->search.s += (int)pmatch[0].rm_so; + ms->search.offset += (size_t)pmatch[0].rm_so; ms->search.rm_len = - (size_t)(pmatch.rm_eo - pmatch.rm_so); + (size_t)(pmatch[0].rm_eo - pmatch[0].rm_so); v = 0; break; @@ -2105,11 +2027,6 @@ magiccheck(struct magic_set *ms, struct magic *m) case FILE_USE: case FILE_NAME: return 1; - case FILE_DER: - matched = der_cmp(ms, m); - if (matched == -1) - file_error(ms, 0, "EOF comparing DER entries"); - return matched; default: file_magerror(ms, "invalid type %d in magiccheck()", m->type); return -1; @@ -2209,12 +2126,12 @@ magiccheck(struct magic_set *ms, struct magic *m) private int handle_annotation(struct magic_set *ms, struct magic *m) { - if ((ms->flags & MAGIC_APPLE) && m->apple[0]) { + if (ms->flags & MAGIC_APPLE) { if (file_printf(ms, "%.8s", m->apple) == -1) return -1; return 1; } - if ((ms->flags & MAGIC_EXTENSION) && m->ext[0]) { + if (ms->flags & MAGIC_EXTENSION) { if (file_printf(ms, "%s", m->ext) == -1) return -1; return 1; diff --git a/contrib/netbsd-tests/lib/libc/ssp/h_read.c b/contrib/netbsd-tests/lib/libc/ssp/h_read.c index 1197b6c..c25cfeb 100644 --- a/contrib/netbsd-tests/lib/libc/ssp/h_read.c +++ b/contrib/netbsd-tests/lib/libc/ssp/h_read.c @@ -38,6 +38,7 @@ __RCSID("$NetBSD: h_read.c,v 1.1 2010/12/27 02:04:19 pgoyette Exp $"); #ifdef __FreeBSD__ #include <fcntl.h> +#include <paths.h> int main(int argc, char *argv[]) @@ -46,7 +47,8 @@ main(int argc, char *argv[]) int fd, n; size_t len = atoi(argv[1]); - fd = open("/dev/zero", O_RDONLY); + if ((fd = open(_PATH_DEVZERO, O_RDONLY)) == -1) + abort(); if ((n = read(fd, b, len)) == -1) abort(); (void)printf("%s\n", b); diff --git a/contrib/netbsd-tests/lib/libc/sys/t_connect.c b/contrib/netbsd-tests/lib/libc/sys/t_connect.c index e492206..896b490 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_connect.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_connect.c @@ -56,6 +56,11 @@ ATF_TC_BODY(connect_low_port, tc) slist = socket(AF_INET, SOCK_STREAM, 0); sd = socket(AF_INET, SOCK_STREAM, 0); +#ifdef __FreeBSD__ + ATF_REQUIRE(sd > 0); + ATF_REQUIRE(slist > 0); +#endif + /* bind listening socket */ memset(&sinlist, 0, sizeof(sinlist)); sinlist.sin_family = AF_INET; @@ -92,6 +97,9 @@ ATF_TC_BODY(connect_low_port, tc) ATF_REQUIRE(ntohs(sin.sin_port) <= IPPORT_RESERVEDMAX); close(sd); +#ifdef __FreeBSD__ + close(slist); +#endif } ATF_TP_ADD_TCS(tp) diff --git a/crypto/openssl/CHANGES b/crypto/openssl/CHANGES index 19e07ab..1c7a5ed 100644 --- a/crypto/openssl/CHANGES +++ b/crypto/openssl/CHANGES @@ -2,6 +2,103 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1s and 1.0.1t [3 May 2016] + + *) Prevent padding oracle in AES-NI CBC MAC check + + A MITM attacker can use a padding oracle attack to decrypt traffic + when the connection uses an AES CBC cipher and the server support + AES-NI. + + This issue was introduced as part of the fix for Lucky 13 padding + attack (CVE-2013-0169). The padding check was rewritten to be in + constant time by making sure that always the same bytes are read and + compared against either the MAC or padding bytes. But it no longer + checked that there was enough data to have both the MAC and padding + bytes. + + This issue was reported by Juraj Somorovsky using TLS-Attacker. + (CVE-2016-2107) + [Kurt Roeckx] + + *) Fix EVP_EncodeUpdate overflow + + An overflow can occur in the EVP_EncodeUpdate() function which is used for + Base64 encoding of binary data. If an attacker is able to supply very large + amounts of input data then a length check can overflow resulting in a heap + corruption. + + Internally to OpenSSL the EVP_EncodeUpdate() function is primarly used by + the PEM_write_bio* family of functions. These are mainly used within the + OpenSSL command line applications, so any application which processes data + from an untrusted source and outputs it as a PEM file should be considered + vulnerable to this issue. User applications that call these APIs directly + with large amounts of untrusted data may also be vulnerable. + + This issue was reported by Guido Vranken. + (CVE-2016-2105) + [Matt Caswell] + + *) Fix EVP_EncryptUpdate overflow + + An overflow can occur in the EVP_EncryptUpdate() function. If an attacker + is able to supply very large amounts of input data after a previous call to + EVP_EncryptUpdate() with a partial block then a length check can overflow + resulting in a heap corruption. Following an analysis of all OpenSSL + internal usage of the EVP_EncryptUpdate() function all usage is one of two + forms. The first form is where the EVP_EncryptUpdate() call is known to be + the first called function after an EVP_EncryptInit(), and therefore that + specific call must be safe. The second form is where the length passed to + EVP_EncryptUpdate() can be seen from the code to be some small value and + therefore there is no possibility of an overflow. Since all instances are + one of these two forms, it is believed that there can be no overflows in + internal code due to this problem. It should be noted that + EVP_DecryptUpdate() can call EVP_EncryptUpdate() in certain code paths. + Also EVP_CipherUpdate() is a synonym for EVP_EncryptUpdate(). All instances + of these calls have also been analysed too and it is believed there are no + instances in internal usage where an overflow could occur. + + This issue was reported by Guido Vranken. + (CVE-2016-2106) + [Matt Caswell] + + *) Prevent ASN.1 BIO excessive memory allocation + + When ASN.1 data is read from a BIO using functions such as d2i_CMS_bio() + a short invalid encoding can casuse allocation of large amounts of memory + potentially consuming excessive resources or exhausting memory. + + Any application parsing untrusted data through d2i BIO functions is + affected. The memory based functions such as d2i_X509() are *not* affected. + Since the memory based functions are used by the TLS library, TLS + applications are not affected. + + This issue was reported by Brian Carpenter. + (CVE-2016-2109) + [Stephen Henson] + + *) EBCDIC overread + + ASN1 Strings that are over 1024 bytes can cause an overread in applications + using the X509_NAME_oneline() function on EBCDIC systems. This could result + in arbitrary stack data being returned in the buffer. + + This issue was reported by Guido Vranken. + (CVE-2016-2176) + [Matt Caswell] + + *) Modify behavior of ALPN to invoke callback after SNI/servername + callback, such that updates to the SSL_CTX affect ALPN. + [Todd Short] + + *) Remove LOW from the DEFAULT cipher list. This removes singles DES from the + default. + [Kurt Roeckx] + + *) Only remove the SSLv2 methods with the no-ssl2-method option. When the + methods are enabled and ssl2 is disabled the methods return NULL. + [Kurt Roeckx] + Changes between 1.0.1r and 1.0.1s [1 Mar 2016] * Disable weak ciphers in SSLv3 and up in default builds of OpenSSL. diff --git a/crypto/openssl/Makefile b/crypto/openssl/Makefile index e5fe248..f2c621d 100644 --- a/crypto/openssl/Makefile +++ b/crypto/openssl/Makefile @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1s +VERSION=1.0.1t MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 diff --git a/crypto/openssl/NEWS b/crypto/openssl/NEWS index 26c7aa5..0fb2cc3 100644 --- a/crypto/openssl/NEWS +++ b/crypto/openssl/NEWS @@ -5,6 +5,19 @@ 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 1.0.1s and OpenSSL 1.0.1t [3 May 2016] + + o Prevent padding oracle in AES-NI CBC MAC check (CVE-2016-2107) + o Fix EVP_EncodeUpdate overflow (CVE-2016-2105) + o Fix EVP_EncryptUpdate overflow (CVE-2016-2106) + o Prevent ASN.1 BIO excessive memory allocation (CVE-2016-2109) + o EBCDIC overread (CVE-2016-2176) + o Modify behavior of ALPN to invoke callback after SNI/servername + callback, such that updates to the SSL_CTX affect ALPN. + o Remove LOW from the DEFAULT cipher list. This removes singles DES from + the default. + o Only remove the SSLv2 methods with the no-ssl2-method option. + Major changes between OpenSSL 1.0.1r and OpenSSL 1.0.1s [1 Mar 2016] o Disable weak ciphers in SSLv3 and up in default builds of OpenSSL. diff --git a/crypto/openssl/README b/crypto/openssl/README index adde4e8..9395f2b 100644 --- a/crypto/openssl/README +++ b/crypto/openssl/README @@ -1,5 +1,5 @@ - OpenSSL 1.0.1s 1 Mar 2016 + OpenSSL 1.0.1t 3 May 2016 Copyright (c) 1998-2015 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson diff --git a/crypto/openssl/apps/pkcs7.c b/crypto/openssl/apps/pkcs7.c index 643507f..b677633 100644 --- a/crypto/openssl/apps/pkcs7.c +++ b/crypto/openssl/apps/pkcs7.c @@ -235,12 +235,16 @@ int MAIN(int argc, char **argv) i = OBJ_obj2nid(p7->type); switch (i) { case NID_pkcs7_signed: - certs = p7->d.sign->cert; - crls = p7->d.sign->crl; + if (p7->d.sign != NULL) { + certs = p7->d.sign->cert; + crls = p7->d.sign->crl; + } break; case NID_pkcs7_signedAndEnveloped: - certs = p7->d.signed_and_enveloped->cert; - crls = p7->d.signed_and_enveloped->crl; + if (p7->d.signed_and_enveloped != NULL) { + certs = p7->d.signed_and_enveloped->cert; + crls = p7->d.signed_and_enveloped->crl; + } break; default: break; diff --git a/crypto/openssl/crypto/asn1/a_bytes.c b/crypto/openssl/crypto/asn1/a_bytes.c index 12715a7..385b539 100644 --- a/crypto/openssl/crypto/asn1/a_bytes.c +++ b/crypto/openssl/crypto/asn1/a_bytes.c @@ -200,13 +200,13 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp, } else { if (len != 0) { if ((ret->length < len) || (ret->data == NULL)) { - if (ret->data != NULL) - OPENSSL_free(ret->data); s = (unsigned char *)OPENSSL_malloc((int)len + 1); if (s == NULL) { i = ERR_R_MALLOC_FAILURE; goto err; } + if (ret->data != NULL) + OPENSSL_free(ret->data); } else s = ret->data; memcpy(s, p, (int)len); diff --git a/crypto/openssl/crypto/asn1/a_d2i_fp.c b/crypto/openssl/crypto/asn1/a_d2i_fp.c index a1864b4..51b6f24 100644 --- a/crypto/openssl/crypto/asn1/a_d2i_fp.c +++ b/crypto/openssl/crypto/asn1/a_d2i_fp.c @@ -141,6 +141,7 @@ void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x) #endif #define HEADER_SIZE 8 +#define ASN1_CHUNK_INITIAL_SIZE (16 * 1024) static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb) { BUF_MEM *b; @@ -217,29 +218,44 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb) /* suck in c.slen bytes of data */ want = c.slen; if (want > (len - off)) { + size_t chunk_max = ASN1_CHUNK_INITIAL_SIZE; + want -= (len - off); if (want > INT_MAX /* BIO_read takes an int length */ || len + want < len) { ASN1err(ASN1_F_ASN1_D2I_READ_BIO, ASN1_R_TOO_LONG); goto err; } - if (!BUF_MEM_grow_clean(b, len + want)) { - ASN1err(ASN1_F_ASN1_D2I_READ_BIO, ERR_R_MALLOC_FAILURE); - goto err; - } while (want > 0) { - i = BIO_read(in, &(b->data[len]), want); - if (i <= 0) { - ASN1err(ASN1_F_ASN1_D2I_READ_BIO, - ASN1_R_NOT_ENOUGH_DATA); + /* + * Read content in chunks of increasing size + * so we can return an error for EOF without + * having to allocate the entire content length + * in one go. + */ + size_t chunk = want > chunk_max ? chunk_max : want; + + if (!BUF_MEM_grow_clean(b, len + chunk)) { + ASN1err(ASN1_F_ASN1_D2I_READ_BIO, ERR_R_MALLOC_FAILURE); goto err; } + want -= chunk; + while (chunk > 0) { + i = BIO_read(in, &(b->data[len]), chunk); + if (i <= 0) { + ASN1err(ASN1_F_ASN1_D2I_READ_BIO, + ASN1_R_NOT_ENOUGH_DATA); + goto err; + } /* * This can't overflow because |len+want| didn't * overflow. */ - len += i; - want -= i; + len += i; + chunk -= i; + } + if (chunk_max < INT_MAX/2) + chunk_max *= 2; } } if (off + c.slen < off) { diff --git a/crypto/openssl/crypto/asn1/a_type.c b/crypto/openssl/crypto/asn1/a_type.c index af79530..bb166e8 100644 --- a/crypto/openssl/crypto/asn1/a_type.c +++ b/crypto/openssl/crypto/asn1/a_type.c @@ -126,9 +126,7 @@ int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b) result = 0; /* They do not have content. */ break; case V_ASN1_INTEGER: - case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: - case V_ASN1_NEG_ENUMERATED: case V_ASN1_BIT_STRING: case V_ASN1_OCTET_STRING: case V_ASN1_SEQUENCE: diff --git a/crypto/openssl/crypto/asn1/asn1_lib.c b/crypto/openssl/crypto/asn1/asn1_lib.c index 0b61fc9..874b1af8 100644 --- a/crypto/openssl/crypto/asn1/asn1_lib.c +++ b/crypto/openssl/crypto/asn1/asn1_lib.c @@ -63,7 +63,7 @@ #include <openssl/asn1_mac.h> static int asn1_get_length(const unsigned char **pp, int *inf, long *rl, - int max); + long max); static void asn1_put_length(unsigned char **pp, int length); const char ASN1_version[] = "ASN.1" OPENSSL_VERSION_PTEXT; @@ -131,7 +131,7 @@ int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag, } *ptag = tag; *pclass = xclass; - if (!asn1_get_length(&p, &inf, plength, (int)max)) + if (!asn1_get_length(&p, &inf, plength, max)) goto err; if (inf && !(ret & V_ASN1_CONSTRUCTED)) @@ -159,14 +159,14 @@ int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag, } static int asn1_get_length(const unsigned char **pp, int *inf, long *rl, - int max) + long max) { const unsigned char *p = *pp; unsigned long ret = 0; - unsigned int i; + unsigned long i; if (max-- < 1) - return (0); + return 0; if (*p == 0x80) { *inf = 1; ret = 0; @@ -175,15 +175,11 @@ static int asn1_get_length(const unsigned char **pp, int *inf, long *rl, *inf = 0; i = *p & 0x7f; if (*(p++) & 0x80) { - if (i > sizeof(long)) + if (i > sizeof(ret) || max < (long)i) return 0; - if (max-- == 0) - return (0); while (i-- > 0) { ret <<= 8L; ret |= *(p++); - if (max-- == 0) - return (0); } } else ret = i; @@ -192,7 +188,7 @@ static int asn1_get_length(const unsigned char **pp, int *inf, long *rl, return 0; *pp = p; *rl = (long)ret; - return (1); + return 1; } /* diff --git a/crypto/openssl/crypto/asn1/asn1_par.c b/crypto/openssl/crypto/asn1/asn1_par.c index 0ca985a..e85e339 100644 --- a/crypto/openssl/crypto/asn1/asn1_par.c +++ b/crypto/openssl/crypto/asn1/asn1_par.c @@ -173,6 +173,8 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, if (!asn1_print_info(bp, tag, xclass, j, (indent) ? depth : 0)) goto end; if (j & V_ASN1_CONSTRUCTED) { + const unsigned char *sp; + ep = p + len; if (BIO_write(bp, "\n", 1) <= 0) goto end; @@ -182,6 +184,7 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, goto end; } if ((j == 0x21) && (len == 0)) { + sp = p; for (;;) { r = asn1_parse2(bp, &p, (long)(tot - p), offset + (p - *pp), depth + 1, @@ -190,19 +193,25 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, ret = 0; goto end; } - if ((r == 2) || (p >= tot)) + if ((r == 2) || (p >= tot)) { + len = p - sp; break; + } } - } else + } else { + long tmp = len; + while (p < ep) { - r = asn1_parse2(bp, &p, (long)len, - offset + (p - *pp), depth + 1, + sp = p; + r = asn1_parse2(bp, &p, tmp, offset + (p - *pp), depth + 1, indent, dump); if (r == 0) { ret = 0; goto end; } + tmp -= p - sp; } + } } else if (xclass != 0) { p += len; if (BIO_write(bp, "\n", 1) <= 0) diff --git a/crypto/openssl/crypto/asn1/t_x509.c b/crypto/openssl/crypto/asn1/t_x509.c index 4e7c45d..4f69b51 100644 --- a/crypto/openssl/crypto/asn1/t_x509.c +++ b/crypto/openssl/crypto/asn1/t_x509.c @@ -140,7 +140,8 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, goto err; bs = X509_get_serialNumber(x); - if (bs->length <= (int)sizeof(long)) { + if (bs->length < (int)sizeof(long) + || (bs->length == sizeof(long) && (bs->data[0] & 0x80) == 0)) { l = ASN1_INTEGER_get(bs); if (bs->type == V_ASN1_NEG_INTEGER) { l = -l; diff --git a/crypto/openssl/crypto/asn1/tasn_dec.c b/crypto/openssl/crypto/asn1/tasn_dec.c index 9256049..2a13388 100644 --- a/crypto/openssl/crypto/asn1/tasn_dec.c +++ b/crypto/openssl/crypto/asn1/tasn_dec.c @@ -903,9 +903,7 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, break; case V_ASN1_INTEGER: - case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: - case V_ASN1_NEG_ENUMERATED: tint = (ASN1_INTEGER **)pval; if (!c2i_ASN1_INTEGER(tint, &cont, len)) goto err; diff --git a/crypto/openssl/crypto/asn1/tasn_enc.c b/crypto/openssl/crypto/asn1/tasn_enc.c index f04a689..f7f83e5 100644 --- a/crypto/openssl/crypto/asn1/tasn_enc.c +++ b/crypto/openssl/crypto/asn1/tasn_enc.c @@ -611,9 +611,7 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *putype, break; case V_ASN1_INTEGER: - case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: - case V_ASN1_NEG_ENUMERATED: /* * These are all have the same content format as ASN1_INTEGER */ diff --git a/crypto/openssl/crypto/asn1/x_name.c b/crypto/openssl/crypto/asn1/x_name.c index 737c426..a858c29 100644 --- a/crypto/openssl/crypto/asn1/x_name.c +++ b/crypto/openssl/crypto/asn1/x_name.c @@ -66,6 +66,13 @@ typedef STACK_OF(X509_NAME_ENTRY) STACK_OF_X509_NAME_ENTRY; DECLARE_STACK_OF(STACK_OF_X509_NAME_ENTRY) +/* + * Maximum length of X509_NAME: much larger than anything we should + * ever see in practice. + */ + +#define X509_NAME_MAX (1024 * 1024) + static int x509_name_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long len, const ASN1_ITEM *it, @@ -192,6 +199,10 @@ static int x509_name_ex_d2i(ASN1_VALUE **val, int i, j, ret; STACK_OF(X509_NAME_ENTRY) *entries; X509_NAME_ENTRY *entry; + if (len > X509_NAME_MAX) { + ASN1err(ASN1_F_X509_NAME_EX_D2I, ASN1_R_TOO_LONG); + return 0; + } q = p; /* Get internal representation of Name */ diff --git a/crypto/openssl/crypto/asn1/x_x509.c b/crypto/openssl/crypto/asn1/x_x509.c index bcd9166..1500871 100644 --- a/crypto/openssl/crypto/asn1/x_x509.c +++ b/crypto/openssl/crypto/asn1/x_x509.c @@ -201,9 +201,19 @@ X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length) int i2d_X509_AUX(X509 *a, unsigned char **pp) { - int length; + int length, tmplen; + unsigned char *start = pp != NULL ? *pp : NULL; length = i2d_X509(a, pp); - if (a) - length += i2d_X509_CERT_AUX(a->aux, pp); + if (length < 0 || a == NULL) + return length; + + tmplen = i2d_X509_CERT_AUX(a->aux, pp); + if (tmplen < 0) { + if (start != NULL) + *pp = start; + return tmplen; + } + length += tmplen; + return length; } diff --git a/crypto/openssl/crypto/bn/asm/x86-mont.pl b/crypto/openssl/crypto/bn/asm/x86-mont.pl index e8f6b05..89f4de6 100755 --- a/crypto/openssl/crypto/bn/asm/x86-mont.pl +++ b/crypto/openssl/crypto/bn/asm/x86-mont.pl @@ -85,6 +85,21 @@ $frame=32; # size of above frame rounded up to 16n &and ("esp",-64); # align to cache line + # Some OSes, *cough*-dows, insist on stack being "wired" to + # physical memory in strictly sequential manner, i.e. if stack + # allocation spans two pages, then reference to farmost one can + # be punishable by SEGV. But page walking can do good even on + # other OSes, because it guarantees that villain thread hits + # the guard page before it can make damage to innocent one... + &mov ("eax","ebp"); + &sub ("eax","esp"); + &and ("eax",-4096); +&set_label("page_walk"); + &mov ("edx",&DWP(0,"esp","eax")); + &sub ("eax",4096); + &data_byte(0x2e); + &jnc (&label("page_walk")); + ################################# load argument block... &mov ("eax",&DWP(0*4,"esi"));# BN_ULONG *rp &mov ("ebx",&DWP(1*4,"esi"));# const BN_ULONG *ap diff --git a/crypto/openssl/crypto/bn/asm/x86_64-mont.pl b/crypto/openssl/crypto/bn/asm/x86_64-mont.pl index 17fb94c..c8ae019 100755 --- a/crypto/openssl/crypto/bn/asm/x86_64-mont.pl +++ b/crypto/openssl/crypto/bn/asm/x86_64-mont.pl @@ -91,6 +91,20 @@ bn_mul_mont: mov %r11,8(%rsp,$num,8) # tp[num+1]=%rsp .Lmul_body: + # Some OSes, *cough*-dows, insist on stack being "wired" to + # physical memory in strictly sequential manner, i.e. if stack + # allocation spans two pages, then reference to farmost one can + # be punishable by SEGV. But page walking can do good even on + # other OSes, because it guarantees that villain thread hits + # the guard page before it can make damage to innocent one... + sub %rsp,%r11 + and \$-4096,%r11 +.Lmul_page_walk: + mov (%rsp,%r11),%r10 + sub \$4096,%r11 + .byte 0x66,0x2e # predict non-taken + jnc .Lmul_page_walk + mov $bp,%r12 # reassign $bp ___ $bp="%r12"; @@ -296,6 +310,14 @@ bn_mul4x_mont: mov %r11,8(%rsp,$num,8) # tp[num+1]=%rsp .Lmul4x_body: + sub %rsp,%r11 + and \$-4096,%r11 +.Lmul4x_page_walk: + mov (%rsp,%r11),%r10 + sub \$4096,%r11 + .byte 0x2e # predict non-taken + jnc .Lmul4x_page_walk + mov $rp,16(%rsp,$num,8) # tp[num+2]=$rp mov %rdx,%r12 # reassign $bp ___ @@ -707,6 +729,7 @@ $code.=<<___; .align 16 bn_sqr4x_mont: .Lsqr4x_enter: + mov %rsp,%rax push %rbx push %rbp push %r12 @@ -715,12 +738,23 @@ bn_sqr4x_mont: push %r15 shl \$3,${num}d # convert $num to bytes - xor %r10,%r10 mov %rsp,%r11 # put aside %rsp - sub $num,%r10 # -$num + neg $num # -$num mov ($n0),$n0 # *n0 - lea -72(%rsp,%r10,2),%rsp # alloca(frame+2*$num) + lea -72(%rsp,$num,2),%rsp # alloca(frame+2*$num) and \$-1024,%rsp # minimize TLB usage + + sub %rsp,%r11 + and \$-4096,%r11 +.Lsqr4x_page_walk: + mov (%rsp,%r11),%r10 + sub \$4096,%r11 + .byte 0x2e # predict non-taken + jnc .Lsqr4x_page_walk + + mov $num,%r10 + neg $num # restore $num + lea -48(%rax),%r11 # restore saved %rsp ############################################################## # Stack layout # diff --git a/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl b/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl index 2359791..99243ae 100755 --- a/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl +++ b/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl @@ -84,6 +84,20 @@ bn_mul_mont_gather5: mov %rax,8(%rsp,$num,8) # tp[num+1]=%rsp .Lmul_body: + # Some OSes, *cough*-dows, insist on stack being "wired" to + # physical memory in strictly sequential manner, i.e. if stack + # allocation spans two pages, then reference to farmost one can + # be punishable by SEGV. But page walking can do good even on + # other OSes, because it guarantees that villain thread hits + # the guard page before it can make damage to innocent one... + sub %rsp,%rax + and \$-4096,%rax +.Lmul_page_walk: + mov (%rsp,%rax),%r11 + sub \$4096,%rax + .byte 0x2e # predict non-taken + jnc .Lmul_page_walk + lea 128($bp),%r12 # reassign $bp (+size optimization) ___ $bp="%r12"; @@ -407,6 +421,14 @@ bn_mul4x_mont_gather5: mov %rax,8(%rsp,$num,8) # tp[num+1]=%rsp .Lmul4x_body: + sub %rsp,%rax + and \$-4096,%rax +.Lmul4x_page_walk: + mov (%rsp,%rax),%r11 + sub \$4096,%rax + .byte 0x2e # predict non-taken + jnc .Lmul4x_page_walk + mov $rp,16(%rsp,$num,8) # tp[num+2]=$rp lea 128(%rdx),%r12 # reassign $bp (+size optimization) ___ diff --git a/crypto/openssl/crypto/comp/comp.h b/crypto/openssl/crypto/comp/comp.h index 406c428..60a0734 100644 --- a/crypto/openssl/crypto/comp/comp.h +++ b/crypto/openssl/crypto/comp/comp.h @@ -4,6 +4,10 @@ # include <openssl/crypto.h> +# ifdef OPENSSL_NO_COMP +# error COMP is disabled. +# endif + #ifdef __cplusplus extern "C" { #endif diff --git a/crypto/openssl/crypto/evp/Makefile b/crypto/openssl/crypto/evp/Makefile index ed1502d..c0f834b 100644 --- a/crypto/openssl/crypto/evp/Makefile +++ b/crypto/openssl/crypto/evp/Makefile @@ -199,8 +199,8 @@ e_aes.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h e_aes.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h e_aes.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h e_aes.o: ../modes/modes_lcl.h e_aes.c evp_locl.h -e_aes_cbc_hmac_sha1.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -e_aes_cbc_hmac_sha1.o: ../../include/openssl/bio.h +e_aes_cbc_hmac_sha1.o: ../../e_os.h ../../include/openssl/aes.h +e_aes_cbc_hmac_sha1.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h e_aes_cbc_hmac_sha1.o: ../../include/openssl/crypto.h e_aes_cbc_hmac_sha1.o: ../../include/openssl/e_os2.h e_aes_cbc_hmac_sha1.o: ../../include/openssl/evp.h @@ -212,8 +212,8 @@ e_aes_cbc_hmac_sha1.o: ../../include/openssl/ossl_typ.h e_aes_cbc_hmac_sha1.o: ../../include/openssl/safestack.h e_aes_cbc_hmac_sha1.o: ../../include/openssl/sha.h e_aes_cbc_hmac_sha1.o: ../../include/openssl/stack.h -e_aes_cbc_hmac_sha1.o: ../../include/openssl/symhacks.h e_aes_cbc_hmac_sha1.c -e_aes_cbc_hmac_sha1.o: evp_locl.h +e_aes_cbc_hmac_sha1.o: ../../include/openssl/symhacks.h ../constant_time_locl.h +e_aes_cbc_hmac_sha1.o: e_aes_cbc_hmac_sha1.c evp_locl.h e_bf.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h e_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/buffer.h e_bf.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h diff --git a/crypto/openssl/crypto/evp/digest.c b/crypto/openssl/crypto/evp/digest.c index 2e202c8..32167b2 100644 --- a/crypto/openssl/crypto/evp/digest.c +++ b/crypto/openssl/crypto/evp/digest.c @@ -200,8 +200,10 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) } #endif if (ctx->digest != type) { - if (ctx->digest && ctx->digest->ctx_size) + if (ctx->digest && ctx->digest->ctx_size) { OPENSSL_free(ctx->md_data); + ctx->md_data = NULL; + } ctx->digest = type; if (!(ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) && type->ctx_size) { ctx->update = type->update; diff --git a/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c b/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c index d1f5928..1d598db 100644 --- a/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c +++ b/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c @@ -59,6 +59,7 @@ # include <openssl/aes.h> # include <openssl/sha.h> # include "evp_locl.h" +# include "constant_time_locl.h" # ifndef EVP_CIPH_FLAG_AEAD_CIPHER # define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000 @@ -286,6 +287,8 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, maxpad |= (255 - maxpad) >> (sizeof(maxpad) * 8 - 8); maxpad &= 255; + ret &= constant_time_ge(maxpad, pad); + inp_len = len - (SHA_DIGEST_LENGTH + pad + 1); mask = (0 - ((inp_len - len) >> (sizeof(inp_len) * 8 - 1))); inp_len &= mask; diff --git a/crypto/openssl/crypto/evp/encode.c b/crypto/openssl/crypto/evp/encode.c index c6abc4a..c6c775e 100644 --- a/crypto/openssl/crypto/evp/encode.c +++ b/crypto/openssl/crypto/evp/encode.c @@ -57,6 +57,7 @@ */ #include <stdio.h> +#include <limits.h> #include "cryptlib.h" #include <openssl/evp.h> @@ -151,13 +152,13 @@ void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl) { int i, j; - unsigned int total = 0; + size_t total = 0; *outl = 0; if (inl <= 0) return; OPENSSL_assert(ctx->length <= (int)sizeof(ctx->enc_data)); - if ((ctx->num + inl) < ctx->length) { + if (ctx->length - ctx->num > inl) { memcpy(&(ctx->enc_data[ctx->num]), in, inl); ctx->num += inl; return; @@ -174,7 +175,7 @@ void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, *out = '\0'; total = j + 1; } - while (inl >= ctx->length) { + while (inl >= ctx->length && total <= INT_MAX) { j = EVP_EncodeBlock(out, in, ctx->length); in += ctx->length; inl -= ctx->length; @@ -183,6 +184,11 @@ void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, *out = '\0'; total += j + 1; } + if (total > INT_MAX) { + /* Too much output data! */ + *outl = 0; + return; + } if (inl != 0) memcpy(&(ctx->enc_data[0]), in, inl); ctx->num = inl; diff --git a/crypto/openssl/crypto/evp/evp_enc.c b/crypto/openssl/crypto/evp/evp_enc.c index 4e983c4..1831572 100644 --- a/crypto/openssl/crypto/evp/evp_enc.c +++ b/crypto/openssl/crypto/evp/evp_enc.c @@ -334,7 +334,7 @@ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, bl = ctx->cipher->block_size; OPENSSL_assert(bl <= (int)sizeof(ctx->buf)); if (i != 0) { - if (i + inl < bl) { + if (bl - i > inl) { memcpy(&(ctx->buf[i]), in, inl); ctx->buf_len += inl; *outl = 0; diff --git a/crypto/openssl/crypto/opensslv.h b/crypto/openssl/crypto/opensslv.h index dc5c4a0..3ab8eb5 100644 --- a/crypto/openssl/crypto/opensslv.h +++ b/crypto/openssl/crypto/opensslv.h @@ -30,11 +30,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x1000113fL +# define OPENSSL_VERSION_NUMBER 0x1000114fL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1s-fips 1 Mar 2016" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1t-fips 3 May 2016" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1s-freebsd 1 Mar 2016" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1t-freebsd 3 May 2016" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT diff --git a/crypto/openssl/crypto/pem/pem_lib.c b/crypto/openssl/crypto/pem/pem_lib.c index 5507161..ab45a84 100644 --- a/crypto/openssl/crypto/pem/pem_lib.c +++ b/crypto/openssl/crypto/pem/pem_lib.c @@ -344,7 +344,7 @@ int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp, if (enc != NULL) { objstr = OBJ_nid2sn(EVP_CIPHER_nid(enc)); - if (objstr == NULL) { + if (objstr == NULL || EVP_CIPHER_iv_length(enc) == 0) { PEMerr(PEM_F_PEM_ASN1_WRITE_BIO, PEM_R_UNSUPPORTED_CIPHER); goto err; } diff --git a/crypto/openssl/crypto/pem/pvkfmt.c b/crypto/openssl/crypto/pem/pvkfmt.c index 82d4527..61864468 100644 --- a/crypto/openssl/crypto/pem/pvkfmt.c +++ b/crypto/openssl/crypto/pem/pvkfmt.c @@ -131,6 +131,10 @@ static int read_lebn(const unsigned char **in, unsigned int nbyte, BIGNUM **r) # define MS_PVKMAGIC 0xb0b5f11eL /* Salt length for PVK files */ # define PVK_SALTLEN 0x10 +/* Maximum length in PVK header */ +# define PVK_MAX_KEYLEN 102400 +/* Maximum salt length */ +# define PVK_MAX_SALTLEN 10240 static EVP_PKEY *b2i_rsa(const unsigned char **in, unsigned int length, unsigned int bitlen, int ispub); @@ -644,6 +648,9 @@ static int do_PVK_header(const unsigned char **in, unsigned int length, *psaltlen = read_ledword(&p); *pkeylen = read_ledword(&p); + if (*pkeylen > PVK_MAX_KEYLEN || *psaltlen > PVK_MAX_SALTLEN) + return 0; + if (is_encrypted && !*psaltlen) { PEMerr(PEM_F_DO_PVK_HEADER, PEM_R_INCONSISTENT_HEADER); return 0; diff --git a/crypto/openssl/crypto/x509/x509.h b/crypto/openssl/crypto/x509/x509.h index a491174..bd600de 100644 --- a/crypto/openssl/crypto/x509/x509.h +++ b/crypto/openssl/crypto/x509/x509.h @@ -1281,6 +1281,7 @@ void ERR_load_X509_strings(void); # define X509_R_LOADING_CERT_DIR 103 # define X509_R_LOADING_DEFAULTS 104 # define X509_R_METHOD_NOT_SUPPORTED 124 +# define X509_R_NAME_TOO_LONG 134 # define X509_R_NO_CERT_SET_FOR_US_TO_VERIFY 105 # define X509_R_PUBLIC_KEY_DECODE_ERROR 125 # define X509_R_PUBLIC_KEY_ENCODE_ERROR 126 diff --git a/crypto/openssl/crypto/x509/x509_err.c b/crypto/openssl/crypto/x509/x509_err.c index 61a19f7..a2b8b7f 100644 --- a/crypto/openssl/crypto/x509/x509_err.c +++ b/crypto/openssl/crypto/x509/x509_err.c @@ -145,6 +145,7 @@ static ERR_STRING_DATA X509_str_reasons[] = { {ERR_REASON(X509_R_LOADING_CERT_DIR), "loading cert dir"}, {ERR_REASON(X509_R_LOADING_DEFAULTS), "loading defaults"}, {ERR_REASON(X509_R_METHOD_NOT_SUPPORTED), "method not supported"}, + {ERR_REASON(X509_R_NAME_TOO_LONG), "name too long"}, {ERR_REASON(X509_R_NO_CERT_SET_FOR_US_TO_VERIFY), "no cert set for us to verify"}, {ERR_REASON(X509_R_PUBLIC_KEY_DECODE_ERROR), "public key decode error"}, diff --git a/crypto/openssl/crypto/x509/x509_obj.c b/crypto/openssl/crypto/x509/x509_obj.c index d317f3a..3de3ac7 100644 --- a/crypto/openssl/crypto/x509/x509_obj.c +++ b/crypto/openssl/crypto/x509/x509_obj.c @@ -63,6 +63,13 @@ #include <openssl/x509.h> #include <openssl/buffer.h> +/* + * Limit to ensure we don't overflow: much greater than + * anything enountered in practice. + */ + +#define NAME_ONELINE_MAX (1024 * 1024) + char *X509_NAME_oneline(X509_NAME *a, char *buf, int len) { X509_NAME_ENTRY *ne; @@ -86,6 +93,8 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len) goto err; b->data[0] = '\0'; len = 200; + } else if (len == 0) { + return NULL; } if (a == NULL) { if (b) { @@ -110,6 +119,10 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len) type = ne->value->type; num = ne->value->length; + if (num > NAME_ONELINE_MAX) { + X509err(X509_F_X509_NAME_ONELINE, X509_R_NAME_TOO_LONG); + goto end; + } q = ne->value->data; #ifdef CHARSET_EBCDIC if (type == V_ASN1_GENERALSTRING || @@ -117,8 +130,9 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len) type == V_ASN1_PRINTABLESTRING || type == V_ASN1_TELETEXSTRING || type == V_ASN1_VISIBLESTRING || type == V_ASN1_IA5STRING) { - ascii2ebcdic(ebcdic_buf, q, (num > sizeof ebcdic_buf) - ? sizeof ebcdic_buf : num); + if (num > (int)sizeof(ebcdic_buf)) + num = sizeof(ebcdic_buf); + ascii2ebcdic(ebcdic_buf, q, num); q = ebcdic_buf; } #endif @@ -154,6 +168,10 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len) lold = l; l += 1 + l1 + 1 + l2; + if (l > NAME_ONELINE_MAX) { + X509err(X509_F_X509_NAME_ONELINE, X509_R_NAME_TOO_LONG); + goto end; + } if (b != NULL) { if (!BUF_MEM_grow(b, l + 1)) goto err; @@ -206,7 +224,7 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len) return (p); err: X509err(X509_F_X509_NAME_ONELINE, ERR_R_MALLOC_FAILURE); - if (b != NULL) - BUF_MEM_free(b); + end: + BUF_MEM_free(b); return (NULL); } diff --git a/crypto/openssl/doc/apps/ciphers.pod b/crypto/openssl/doc/apps/ciphers.pod index 888b8ed..34bb816 100644 --- a/crypto/openssl/doc/apps/ciphers.pod +++ b/crypto/openssl/doc/apps/ciphers.pod @@ -107,7 +107,7 @@ The following is a list of all permitted cipher strings and their meanings. The default cipher list. This is determined at compile time and is normally -B<ALL:!EXPORT:!aNULL:!eNULL:!SSLv2>. +B<ALL:!EXPORT:!LOW:!aNULL:!eNULL:!SSLv2>. When used, this must be the first cipherstring specified. =item B<COMPLEMENTOFDEFAULT> diff --git a/crypto/openssl/doc/crypto/EVP_EncodeInit.pod b/crypto/openssl/doc/crypto/EVP_EncodeInit.pod new file mode 100644 index 0000000..c6f1267 --- /dev/null +++ b/crypto/openssl/doc/crypto/EVP_EncodeInit.pod @@ -0,0 +1,127 @@ +=pod + +=head1 NAME + +EVP_EncodeInit, EVP_EncodeUpdate, EVP_EncodeFinal, EVP_EncodeBlock, +EVP_DecodeInit, EVP_DecodeUpdate, EVP_DecodeFinal, EVP_DecodeBlock - EVP base 64 +encode/decode routines + +=head1 SYNOPSIS + + #include <openssl/evp.h> + + void EVP_EncodeInit(EVP_ENCODE_CTX *ctx); + void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, + const unsigned char *in, int inl); + void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl); + int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n); + + void EVP_DecodeInit(EVP_ENCODE_CTX *ctx); + int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, + const unsigned char *in, int inl); + int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned + char *out, int *outl); + int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n); + +=head1 DESCRIPTION + +The EVP encode routines provide a high level interface to base 64 encoding and +decoding. Base 64 encoding converts binary data into a printable form that uses +the characters A-Z, a-z, 0-9, "+" and "/" to represent the data. For every 3 +bytes of binary data provided 4 bytes of base 64 encoded data will be produced +plus some occasional newlines (see below). If the input data length is not a +multiple of 3 then the output data will be padded at the end using the "=" +character. + +Encoding of binary data is performed in blocks of 48 input bytes (or less for +the final block). For each 48 byte input block encoded 64 bytes of base 64 data +is output plus an additional newline character (i.e. 65 bytes in total). The +final block (which may be less than 48 bytes) will output 4 bytes for every 3 +bytes of input. If the data length is not divisible by 3 then a full 4 bytes is +still output for the final 1 or 2 bytes of input. Similarly a newline character +will also be output. + +EVP_EncodeInit() initialises B<ctx> for the start of a new encoding operation. + +EVP_EncodeUpdate() encode B<inl> bytes of data found in the buffer pointed to by +B<in>. The output is stored in the buffer B<out> and the number of bytes output +is stored in B<*outl>. It is the caller's responsibility to ensure that the +buffer at B<out> is sufficiently large to accommodate the output data. Only full +blocks of data (48 bytes) will be immediately processed and output by this +function. Any remainder is held in the B<ctx> object and will be processed by a +subsequent call to EVP_EncodeUpdate() or EVP_EncodeFinal(). To calculate the +required size of the output buffer add together the value of B<inl> with the +amount of unprocessed data held in B<ctx> and divide the result by 48 (ignore +any remainder). This gives the number of blocks of data that will be processed. +Ensure the output buffer contains 65 bytes of storage for each block, plus an +additional byte for a NUL terminator. EVP_EncodeUpdate() may be called +repeatedly to process large amounts of input data. In the event of an error +EVP_EncodeUpdate() will set B<*outl> to 0. + +EVP_EncodeFinal() must be called at the end of an encoding operation. It will +process any partial block of data remaining in the B<ctx> object. The output +data will be stored in B<out> and the length of the data written will be stored +in B<*outl>. It is the caller's responsibility to ensure that B<out> is +sufficiently large to accommodate the output data which will never be more than +65 bytes plus an additional NUL terminator (i.e. 66 bytes in total). + +EVP_EncodeBlock() encodes a full block of input data in B<f> and of length +B<dlen> and stores it in B<t>. For every 3 bytes of input provided 4 bytes of +output data will be produced. If B<dlen> is not divisible by 3 then the block is +encoded as a final block of data and the output is padded such that it is always +divisible by 4. Additionally a NUL terminator character will be added. For +example if 16 bytes of input data is provided then 24 bytes of encoded data is +created plus 1 byte for a NUL terminator (i.e. 25 bytes in total). The length of +the data generated I<without> the NUL terminator is returned from the function. + +EVP_DecodeInit() initialises B<ctx> for the start of a new decoding operation. + +EVP_DecodeUpdate() decodes B<inl> characters of data found in the buffer pointed +to by B<in>. The output is stored in the buffer B<out> and the number of bytes +output is stored in B<*outl>. It is the caller's responsibility to ensure that +the buffer at B<out> is sufficiently large to accommodate the output data. This +function will attempt to decode as much data as possible in 4 byte chunks. Any +whitespace, newline or carriage return characters are ignored. Any partial chunk +of unprocessed data (1, 2 or 3 bytes) that remains at the end will be held in +the B<ctx> object and processed by a subsequent call to EVP_DecodeUpdate(). If +any illegal base 64 characters are encountered or if the base 64 padding +character "=" is encountered in the middle of the data then the function returns +-1 to indicate an error. A return value of 0 or 1 indicates successful +processing of the data. A return value of 0 additionally indicates that the last +input data characters processed included the base 64 padding character "=" and +therefore no more non-padding character data is expected to be processed. For +every 4 valid base 64 bytes processed (ignoring whitespace, carriage returns and +line feeds), 3 bytes of binary output data will be produced (or less at the end +of the data where the padding character "=" has been used). + +EVP_DecodeFinal() must be called at the end of a decoding operation. If there +is any unprocessed data still in B<ctx> then the input data must not have been +a multiple of 4 and therefore an error has occurred. The function will return -1 +in this case. Otherwise the function returns 1 on success. + +EVP_DecodeBlock() will decode the block of B<n> characters of base 64 data +contained in B<f> and store the result in B<t>. Any leading whitespace will be +trimmed as will any trailing whitespace, newlines, carriage returns or EOF +characters. After such trimming the length of the data in B<f> must be divisbile +by 4. For every 4 input bytes exactly 3 output bytes will be produced. The +output will be padded with 0 bits if necessary to ensure that the output is +always 3 bytes for every 4 input bytes. This function will return the length of +the data decoded or -1 on error. + +=head1 RETURN VALUES + +EVP_EncodeBlock() returns the number of bytes encoded excluding the NUL +terminator. + +EVP_DecodeUpdate() returns -1 on error and 0 or 1 on success. If 0 is returned +then no more non-padding base 64 characters are expected. + +EVP_DecodeFinal() returns -1 on error or 1 on success. + +EVP_DecodeBlock() returns the length of the data decoded or -1 on error. + +=head1 SEE ALSO + +L<evp(3)> + +=cut diff --git a/crypto/openssl/doc/crypto/evp.pod b/crypto/openssl/doc/crypto/evp.pod index 9faa349..83fefe5 100644 --- a/crypto/openssl/doc/crypto/evp.pod +++ b/crypto/openssl/doc/crypto/evp.pod @@ -25,6 +25,10 @@ functions. The B<EVP_Digest>I<...> functions provide message digests. The B<EVP_PKEY>I<...> functions provide a high level interface to asymmetric algorithms. +The L<B<EVP_Encode>I<...>|EVP_EncodeInit(3)> and +L<B<EVP_Decode>I<...>|EVP_EncodeInit(3)> functions implement base 64 encoding +and decoding. + Algorithms are loaded with OpenSSL_add_all_algorithms(3). All the symmetric algorithms (ciphers), digests and asymmetric algorithms @@ -49,6 +53,7 @@ L<EVP_OpenInit(3)|EVP_OpenInit(3)>, L<EVP_SealInit(3)|EVP_SealInit(3)>, L<EVP_SignInit(3)|EVP_SignInit(3)>, L<EVP_VerifyInit(3)|EVP_VerifyInit(3)>, +L<EVP_EncodeInit(3)>, L<OpenSSL_add_all_algorithms(3)|OpenSSL_add_all_algorithms(3)>, L<engine(3)|engine(3)> diff --git a/crypto/openssl/ssl/d1_both.c b/crypto/openssl/ssl/d1_both.c index aaa1867..19c3da6 100644 --- a/crypto/openssl/ssl/d1_both.c +++ b/crypto/openssl/ssl/d1_both.c @@ -1579,6 +1579,8 @@ int dtls1_process_heartbeat(SSL *s) * plus 2 bytes payload length, plus payload, plus padding */ buffer = OPENSSL_malloc(write_length); + if (buffer == NULL) + return -1; bp = buffer; /* Enter response type, length and copy payload */ diff --git a/crypto/openssl/ssl/s2_lib.c b/crypto/openssl/ssl/s2_lib.c index 82c1731..7bcb81a 100644 --- a/crypto/openssl/ssl/s2_lib.c +++ b/crypto/openssl/ssl/s2_lib.c @@ -150,7 +150,7 @@ OPENSSL_GLOBAL const SSL_CIPHER ssl2_ciphers[] = { SSL_RC4, SSL_MD5, SSL_SSLV2, - SSL_NOT_EXP | SSL_MEDIUM, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_MEDIUM, 0, 128, 128, @@ -167,7 +167,7 @@ OPENSSL_GLOBAL const SSL_CIPHER ssl2_ciphers[] = { SSL_RC4, SSL_MD5, SSL_SSLV2, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL2_CF_5_BYTE_ENC, 40, 128, @@ -184,7 +184,7 @@ OPENSSL_GLOBAL const SSL_CIPHER ssl2_ciphers[] = { SSL_RC2, SSL_MD5, SSL_SSLV2, - SSL_NOT_EXP | SSL_MEDIUM, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_MEDIUM, 0, 128, 128, @@ -201,7 +201,7 @@ OPENSSL_GLOBAL const SSL_CIPHER ssl2_ciphers[] = { SSL_RC2, SSL_MD5, SSL_SSLV2, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL2_CF_5_BYTE_ENC, 40, 128, @@ -219,7 +219,7 @@ OPENSSL_GLOBAL const SSL_CIPHER ssl2_ciphers[] = { SSL_IDEA, SSL_MD5, SSL_SSLV2, - SSL_NOT_EXP | SSL_MEDIUM, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_MEDIUM, 0, 128, 128, @@ -237,7 +237,7 @@ OPENSSL_GLOBAL const SSL_CIPHER ssl2_ciphers[] = { SSL_DES, SSL_MD5, SSL_SSLV2, - SSL_NOT_EXP | SSL_LOW, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_LOW, 0, 56, 56, @@ -254,7 +254,7 @@ OPENSSL_GLOBAL const SSL_CIPHER ssl2_ciphers[] = { SSL_3DES, SSL_MD5, SSL_SSLV2, - SSL_NOT_EXP | SSL_HIGH, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_HIGH, 0, 112, 168, @@ -271,7 +271,7 @@ OPENSSL_GLOBAL const SSL_CIPHER ssl2_ciphers[] = { SSL_RC4, SSL_MD5, SSL_SSLV2, - SSL_NOT_EXP | SSL_LOW, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_LOW, SSL2_CF_8_BYTE_ENC, 64, 64, diff --git a/crypto/openssl/ssl/s2_meth.c b/crypto/openssl/ssl/s2_meth.c index b312f172..73885b7 100644 --- a/crypto/openssl/ssl/s2_meth.c +++ b/crypto/openssl/ssl/s2_meth.c @@ -57,7 +57,8 @@ */ #include "ssl_locl.h" -#ifndef OPENSSL_NO_SSL2 +#ifndef OPENSSL_NO_SSL2_METHOD +# ifndef OPENSSL_NO_SSL2 # include <stdio.h> # include <openssl/objects.h> @@ -72,7 +73,16 @@ static const SSL_METHOD *ssl2_get_method(int ver) IMPLEMENT_ssl2_meth_func(SSLv2_method, ssl2_accept, ssl2_connect, ssl2_get_method) -#else /* !OPENSSL_NO_SSL2 */ + +# else /* !OPENSSL_NO_SSL2 */ + +const SSL_METHOD *SSLv2_method(void) { return NULL; } +const SSL_METHOD *SSLv2_client_method(void) { return NULL; } +const SSL_METHOD *SSLv2_server_method(void) { return NULL; } + +# endif + +#else /* !OPENSSL_NO_SSL2_METHOD */ # if PEDANTIC static void *dummy = &dummy; diff --git a/crypto/openssl/ssl/s3_clnt.c b/crypto/openssl/ssl/s3_clnt.c index cfa5080..9e5875f 100644 --- a/crypto/openssl/ssl/s3_clnt.c +++ b/crypto/openssl/ssl/s3_clnt.c @@ -2104,6 +2104,7 @@ int ssl3_get_certificate_request(SSL *s) SSLerr(SSL_F_SSL3_GET_CERTIFICATE_REQUEST, ERR_R_MALLOC_FAILURE); goto err; } + xn = NULL; p += l; nc += l + 2; @@ -2127,6 +2128,7 @@ int ssl3_get_certificate_request(SSL *s) err: s->state = SSL_ST_ERR; done: + X509_NAME_free(xn); if (ca_sk != NULL) sk_X509_NAME_pop_free(ca_sk, X509_NAME_free); return (ret); diff --git a/crypto/openssl/ssl/s3_lib.c b/crypto/openssl/ssl/s3_lib.c index a48f2b6..35d6587d 100644 --- a/crypto/openssl/ssl/s3_lib.c +++ b/crypto/openssl/ssl/s3_lib.c @@ -213,7 +213,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_RC4, SSL_MD5, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 128, @@ -263,7 +263,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_RC2, SSL_MD5, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 128, @@ -299,7 +299,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 56, @@ -317,7 +317,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_SSLV3, - SSL_NOT_EXP | SSL_LOW, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_LOW, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 56, 56, @@ -352,7 +352,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 56, @@ -370,7 +370,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_SSLV3, - SSL_NOT_EXP | SSL_LOW, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_LOW, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 56, 56, @@ -404,7 +404,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 56, @@ -422,7 +422,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_SSLV3, - SSL_NOT_EXP | SSL_LOW, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_LOW, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 56, 56, @@ -457,7 +457,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 56, @@ -475,7 +475,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_SSLV3, - SSL_NOT_EXP | SSL_LOW, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_LOW, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 56, 56, @@ -509,7 +509,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 56, @@ -527,7 +527,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_SSLV3, - SSL_NOT_EXP | SSL_LOW, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_LOW, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 56, 56, @@ -561,7 +561,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_RC4, SSL_MD5, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 128, @@ -578,7 +578,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_RC4, SSL_MD5, SSL_SSLV3, - SSL_NOT_EXP | SSL_MEDIUM, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_MEDIUM, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 128, 128, @@ -595,7 +595,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 128, @@ -613,7 +613,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_SSLV3, - SSL_NOT_EXP | SSL_LOW, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_LOW, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 56, 56, @@ -630,7 +630,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_3DES, SSL_SHA1, SSL_SSLV3, - SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 112, 168, @@ -700,7 +700,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_SSLV3, - SSL_NOT_EXP | SSL_LOW, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_LOW, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 56, 56, @@ -766,7 +766,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_MD5, SSL_SSLV3, - SSL_NOT_EXP | SSL_LOW, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_LOW, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 56, 56, @@ -832,7 +832,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 56, @@ -850,7 +850,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_RC2, SSL_SHA1, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 128, @@ -868,7 +868,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_RC4, SSL_SHA1, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 128, @@ -886,7 +886,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_MD5, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 56, @@ -904,7 +904,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_RC2, SSL_MD5, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 128, @@ -922,7 +922,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_RC4, SSL_MD5, SSL_SSLV3, - SSL_EXPORT | SSL_EXP40, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP40, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 40, 128, @@ -1016,7 +1016,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_AES128, SSL_SHA1, SSL_TLSV1, - SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 128, 128, @@ -1111,7 +1111,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_AES256, SSL_SHA1, SSL_TLSV1, - SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 256, 256, @@ -1307,7 +1307,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_CAMELLIA128, SSL_SHA1, SSL_TLSV1, - SSL_NOT_EXP | SSL_HIGH, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_HIGH, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 128, 128, @@ -1327,7 +1327,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_RC4, SSL_MD5, SSL_TLSV1, - SSL_EXPORT | SSL_EXP56, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP56, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 56, 128, @@ -1343,7 +1343,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_RC2, SSL_MD5, SSL_TLSV1, - SSL_EXPORT | SSL_EXP56, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP56, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 56, 128, @@ -1361,7 +1361,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_TLSV1, - SSL_EXPORT | SSL_EXP56, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP56, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 56, 56, @@ -1379,7 +1379,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_DES, SSL_SHA1, SSL_TLSV1, - SSL_EXPORT | SSL_EXP56, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP56, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 56, 56, @@ -1397,7 +1397,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_RC4, SSL_SHA1, SSL_TLSV1, - SSL_EXPORT | SSL_EXP56, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP56, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 56, 128, @@ -1415,7 +1415,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_RC4, SSL_SHA1, SSL_TLSV1, - SSL_EXPORT | SSL_EXP56, + SSL_NOT_DEFAULT | SSL_EXPORT | SSL_EXP56, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 56, 128, @@ -1530,7 +1530,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_AES128, SSL_SHA256, SSL_TLSV1_2, - SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 128, 128, @@ -1546,7 +1546,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_AES256, SSL_SHA256, SSL_TLSV1_2, - SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 256, 256, @@ -1699,7 +1699,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_CAMELLIA256, SSL_SHA1, SSL_TLSV1, - SSL_NOT_EXP | SSL_HIGH, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_HIGH, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 256, 256, @@ -1865,7 +1865,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_SEED, SSL_SHA1, SSL_TLSV1, - SSL_NOT_EXP | SSL_MEDIUM, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_MEDIUM, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 128, 128, @@ -2045,7 +2045,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_AES128GCM, SSL_AEAD, SSL_TLSV1_2, - SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256, 128, 128, @@ -2061,7 +2061,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_AES256GCM, SSL_AEAD, SSL_TLSV1_2, - SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384, 256, 256, @@ -2414,7 +2414,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_RC4, SSL_SHA1, SSL_TLSV1, - SSL_NOT_EXP | SSL_MEDIUM, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_MEDIUM, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 128, 128, @@ -2430,7 +2430,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_3DES, SSL_SHA1, SSL_TLSV1, - SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 112, 168, @@ -2446,7 +2446,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_AES128, SSL_SHA1, SSL_TLSV1, - SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 128, 128, @@ -2462,7 +2462,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { SSL_AES256, SSL_SHA1, SSL_TLSV1, - SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, + SSL_NOT_DEFAULT | SSL_NOT_EXP | SSL_HIGH | SSL_FIPS, SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF, 256, 256, diff --git a/crypto/openssl/ssl/ssl.h b/crypto/openssl/ssl/ssl.h index 105047e..d6c475c 100644 --- a/crypto/openssl/ssl/ssl.h +++ b/crypto/openssl/ssl/ssl.h @@ -334,7 +334,7 @@ extern "C" { * The following cipher list is used by default. It also is substituted when * an application-defined cipher list string starts with 'DEFAULT'. */ -# define SSL_DEFAULT_CIPHER_LIST "ALL:!EXPORT:!aNULL:!eNULL:!SSLv2" +# define SSL_DEFAULT_CIPHER_LIST "ALL:!EXPORT:!LOW:!aNULL:!eNULL:!SSLv2" /* * As of OpenSSL 1.0.0, ssl_create_cipher_list() in ssl/ssl_ciph.c always * starts with a reasonable order, and all we have to do for DEFAULT is @@ -2017,7 +2017,7 @@ const char *SSL_get_version(const SSL *s); /* This sets the 'default' SSL version that SSL_new() will create */ int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth); -# ifndef OPENSSL_NO_SSL2 +# ifndef OPENSSL_NO_SSL2_METHOD const SSL_METHOD *SSLv2_method(void); /* SSLv2 */ const SSL_METHOD *SSLv2_server_method(void); /* SSLv2 */ const SSL_METHOD *SSLv2_client_method(void); /* SSLv2 */ diff --git a/crypto/openssl/ssl/ssl_ciph.c b/crypto/openssl/ssl/ssl_ciph.c index cb559d9..56dd437 100644 --- a/crypto/openssl/ssl/ssl_ciph.c +++ b/crypto/openssl/ssl/ssl_ciph.c @@ -235,8 +235,7 @@ static const SSL_CIPHER cipher_aliases[] = { * "COMPLEMENTOFDEFAULT" (does *not* include ciphersuites not found in * ALL!) */ - {0, SSL_TXT_CMPDEF, 0, 0, SSL_aNULL, ~SSL_eNULL, 0, ~SSL_SSLV2, - SSL_EXP_MASK, 0, 0, 0}, + {0, SSL_TXT_CMPDEF, 0, 0, 0, 0, 0, 0, SSL_NOT_DEFAULT, 0, 0, 0}, /* * key exchange aliases (some of those using only a single bit here @@ -1000,10 +999,6 @@ static void ssl_cipher_apply_rule(unsigned long cipher_id, cp->algorithm_enc, cp->algorithm_mac, cp->algorithm_ssl, cp->algo_strength); #endif - if (algo_strength == SSL_EXP_MASK && SSL_C_IS_EXPORT(cp)) - goto ok; - if (alg_ssl == ~SSL_SSLV2 && cp->algorithm_ssl == SSL_SSLV2) - goto ok; if (alg_mkey && !(alg_mkey & cp->algorithm_mkey)) continue; if (alg_auth && !(alg_auth & cp->algorithm_auth)) @@ -1020,10 +1015,11 @@ static void ssl_cipher_apply_rule(unsigned long cipher_id, if ((algo_strength & SSL_STRONG_MASK) && !(algo_strength & SSL_STRONG_MASK & cp->algo_strength)) continue; + if ((algo_strength & SSL_NOT_DEFAULT) + && !(cp->algo_strength & SSL_NOT_DEFAULT)) + continue; } - ok: - #ifdef CIPHER_DEBUG fprintf(stderr, "Action = %d\n", rule); #endif @@ -1307,6 +1303,10 @@ static int ssl_cipher_process_rulestr(const char *rule_str, ca_list[j]->algo_strength & SSL_STRONG_MASK; } + if (ca_list[j]->algo_strength & SSL_NOT_DEFAULT) { + algo_strength |= SSL_NOT_DEFAULT; + } + if (ca_list[j]->valid) { /* * explicit ciphersuite found; its protocol version does not diff --git a/crypto/openssl/ssl/ssl_locl.h b/crypto/openssl/ssl/ssl_locl.h index f5d9df6..d57b902 100644 --- a/crypto/openssl/ssl/ssl_locl.h +++ b/crypto/openssl/ssl/ssl_locl.h @@ -435,8 +435,9 @@ # define SSL_MEDIUM 0x00000040L # define SSL_HIGH 0x00000080L # define SSL_FIPS 0x00000100L +# define SSL_NOT_DEFAULT 0x00000200L -/* we have used 000001ff - 23 bits left to go */ +/* we have used 000003ff - 22 bits left to go */ /*- * Macros to check the export status and cipher strength for export ciphers. diff --git a/crypto/openssl/ssl/t1_lib.c b/crypto/openssl/ssl/t1_lib.c index 2e9b65b..0bdb77d 100644 --- a/crypto/openssl/ssl/t1_lib.c +++ b/crypto/openssl/ssl/t1_lib.c @@ -2321,8 +2321,10 @@ static int tls_decrypt_ticket(SSL *s, const unsigned char *etick, p = etick + 16 + EVP_CIPHER_CTX_iv_length(&ctx); eticklen -= 16 + EVP_CIPHER_CTX_iv_length(&ctx); sdec = OPENSSL_malloc(eticklen); - if (!sdec || EVP_DecryptUpdate(&ctx, sdec, &slen, p, eticklen) <= 0) { + if (sdec == NULL + || EVP_DecryptUpdate(&ctx, sdec, &slen, p, eticklen) <= 0) { EVP_CIPHER_CTX_cleanup(&ctx); + OPENSSL_free(sdec); return -1; } if (EVP_DecryptFinal(&ctx, sdec + slen, &mlen) <= 0) { @@ -2579,6 +2581,8 @@ int tls1_process_heartbeat(SSL *s) * plus 2 bytes payload length, plus payload, plus padding */ buffer = OPENSSL_malloc(1 + 2 + payload + padding); + if (buffer == NULL) + return -1; bp = buffer; /* Enter response type, length and copy payload */ diff --git a/crypto/openssl/util/libeay.num b/crypto/openssl/util/libeay.num index a83c3be..e71ca91 100644 --- a/crypto/openssl/util/libeay.num +++ b/crypto/openssl/util/libeay.num @@ -1065,8 +1065,8 @@ d2i_ASN1_BMPSTRING 1092 EXIST::FUNCTION: i2d_ASN1_BMPSTRING 1093 EXIST::FUNCTION: BIO_f_ber 1094 NOEXIST::FUNCTION: BN_init 1095 EXIST::FUNCTION: -COMP_CTX_new 1096 EXIST::FUNCTION: -COMP_CTX_free 1097 EXIST::FUNCTION: +COMP_CTX_new 1096 EXIST::FUNCTION:COMP +COMP_CTX_free 1097 EXIST::FUNCTION:COMP COMP_CTX_compress_block 1098 NOEXIST::FUNCTION: COMP_CTX_expand_block 1099 NOEXIST::FUNCTION: X509_STORE_CTX_get_ex_new_index 1100 EXIST::FUNCTION: @@ -1113,10 +1113,10 @@ PKCS7_digest_from_attributes 1140 EXIST::FUNCTION: PKCS7_get_attribute 1141 EXIST::FUNCTION: PKCS7_get_issuer_and_serial 1142 EXIST::FUNCTION: PKCS7_get_signed_attribute 1143 EXIST::FUNCTION: -COMP_compress_block 1144 EXIST::FUNCTION: -COMP_expand_block 1145 EXIST::FUNCTION: -COMP_rle 1146 EXIST::FUNCTION: -COMP_zlib 1147 EXIST::FUNCTION: +COMP_compress_block 1144 EXIST::FUNCTION:COMP +COMP_expand_block 1145 EXIST::FUNCTION:COMP +COMP_rle 1146 EXIST::FUNCTION:COMP +COMP_zlib 1147 EXIST::FUNCTION:COMP ms_time_diff 1148 NOEXIST::FUNCTION: ms_time_new 1149 NOEXIST::FUNCTION: ms_time_free 1150 NOEXIST::FUNCTION: @@ -1945,7 +1945,7 @@ ENGINE_get_ctrl_function 2521 EXIST::FUNCTION:ENGINE ENGINE_set_ctrl_function 2522 EXIST::FUNCTION:ENGINE BN_pseudo_rand_range 2523 EXIST::FUNCTION: X509_STORE_CTX_set_verify_cb 2524 EXIST::FUNCTION: -ERR_load_COMP_strings 2525 EXIST::FUNCTION: +ERR_load_COMP_strings 2525 EXIST::FUNCTION:COMP PKCS12_item_decrypt_d2i 2526 EXIST::FUNCTION: ASN1_UTF8STRING_it 2527 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: ASN1_UTF8STRING_it 2527 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: @@ -3545,8 +3545,8 @@ X509at_get0_data_by_OBJ 3931 EXIST::FUNCTION: ASN1_TYPE_set1 3932 EXIST::FUNCTION: ASN1_STRING_set0 3933 EXIST::FUNCTION: i2d_X509_ALGORS 3934 EXIST::FUNCTION: -BIO_f_zlib 3935 EXIST:ZLIB:FUNCTION: -COMP_zlib_cleanup 3936 EXIST::FUNCTION: +BIO_f_zlib 3935 EXIST:ZLIB:FUNCTION:COMP +COMP_zlib_cleanup 3936 EXIST::FUNCTION:COMP d2i_X509_ALGORS 3937 EXIST::FUNCTION: CMS_ReceiptRequest_free 3938 EXIST::FUNCTION:CMS PEM_write_CMS 3939 EXIST:!WIN16:FUNCTION:CMS diff --git a/crypto/openssl/util/mk1mf.pl b/crypto/openssl/util/mk1mf.pl index e5fe37c..8c7780a 100755 --- a/crypto/openssl/util/mk1mf.pl +++ b/crypto/openssl/util/mk1mf.pl @@ -282,8 +282,9 @@ $cflags.=" -DOPENSSL_FIPS" if $fips; $cflags.=" -DOPENSSL_NO_JPAKE" if $no_jpake; $cflags.=" -DOPENSSL_NO_EC2M" if $no_ec2m; $cflags.=" -DOPENSSL_NO_WEAK_SSL_CIPHERS" if $no_weak_ssl; -$cflags.= " -DZLIB" if $zlib_opt; -$cflags.= " -DZLIB_SHARED" if $zlib_opt == 2; +$cflags.=" -DZLIB" if $zlib_opt; +$cflags.=" -DZLIB_SHARED" if $zlib_opt == 2; +$cflags.=" -DOPENSSL_NO_COMP" if $no_comp; if ($no_static_engine) { @@ -780,6 +781,7 @@ sub var_add return("") if $no_gost && $dir =~ /\/ccgost/; return("") if $no_cms && $dir =~ /\/cms/; return("") if $no_jpake && $dir =~ /\/jpake/; + return("") if $no_comp && $dir =~ /\/comp/; if ($no_des && $dir =~ /\/des/) { if ($val =~ /read_pwd/) @@ -1115,6 +1117,7 @@ sub read_options "nw-mwasm" => \$nw_mwasm, "gaswin" => \$gaswin, "no-ssl2" => \$no_ssl2, + "no-ssl2-method" => 0, "no-ssl3" => \$no_ssl3, "no-ssl3-method" => 0, "no-tlsext" => \$no_tlsext, @@ -1156,6 +1159,7 @@ sub read_options "no-unit-test" => 0, "no-zlib" => 0, "no-zlib-dynamic" => 0, + "no-comp" => \$no_comp, "fips" => \$fips ); @@ -1173,7 +1177,6 @@ sub read_options } } } - elsif (/^no-comp$/) { $xcflags = "-DOPENSSL_NO_COMP $xcflags"; } elsif (/^enable-zlib$/) { $zlib_opt = 1 if $zlib_opt == 0 } elsif (/^enable-zlib-dynamic$/) { diff --git a/crypto/openssl/util/mkdef.pl b/crypto/openssl/util/mkdef.pl index 894f052..0b97aa4 100755 --- a/crypto/openssl/util/mkdef.pl +++ b/crypto/openssl/util/mkdef.pl @@ -107,6 +107,8 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", "CAPIENG", # SSL v2 "SSL2", + # SSL v2 method + "SSL2_METHOD", # SSL v3 method "SSL3_METHOD", # JPAKE @@ -143,7 +145,7 @@ my $no_fp_api; my $no_static_engine=1; my $no_gmp; my $no_deprecated; my $no_rfc3779; my $no_psk; my $no_tlsext; my $no_cms; my $no_capieng; my $no_jpake; my $no_srp; my $no_ssl2; my $no_ec2m; my $no_nistp_gcc; my $no_nextprotoneg; my $no_sctp; my $no_srtp; -my $no_unit_test; my $no_ssl3_method; +my $no_unit_test; my $no_ssl3_method; my $no_ssl2_method; my $fips; @@ -238,6 +240,7 @@ foreach (@ARGV, split(/ /, $options)) elsif (/^no-ec_nistp_64_gcc_128$/) { $no_nistp_gcc=1; } elsif (/^no-nextprotoneg$/) { $no_nextprotoneg=1; } elsif (/^no-ssl2$/) { $no_ssl2=1; } + elsif (/^no-ssl2-method$/) { $no_ssl2_method=1; } elsif (/^no-ssl3-method$/) { $no_ssl3_method=1; } elsif (/^no-capieng$/) { $no_capieng=1; } elsif (/^no-jpake$/) { $no_jpake=1; } @@ -1211,6 +1214,7 @@ sub is_valid if ($keyword eq "EC_NISTP_64_GCC_128" && $no_nistp_gcc) { return 0; } if ($keyword eq "SSL2" && $no_ssl2) { return 0; } + if ($keyword eq "SSL2_METHOD" && $no_ssl2_method) { return 0; } if ($keyword eq "SSL3_METHOD" && $no_ssl3_method) { return 0; } if ($keyword eq "CAPIENG" && $no_capieng) { return 0; } if ($keyword eq "JPAKE" && $no_jpake) { return 0; } diff --git a/crypto/openssl/util/ssleay.num b/crypto/openssl/util/ssleay.num index dd1c5e8..dd5811a 100644 --- a/crypto/openssl/util/ssleay.num +++ b/crypto/openssl/util/ssleay.num @@ -98,9 +98,9 @@ SSLeay_add_ssl_algorithms 109 NOEXIST::FUNCTION: SSLv23_client_method 110 EXIST::FUNCTION:RSA SSLv23_method 111 EXIST::FUNCTION:RSA SSLv23_server_method 112 EXIST::FUNCTION:RSA -SSLv2_client_method 113 EXIST::FUNCTION:RSA,SSL2 -SSLv2_method 114 EXIST::FUNCTION:RSA,SSL2 -SSLv2_server_method 115 EXIST::FUNCTION:RSA,SSL2 +SSLv2_client_method 113 EXIST::FUNCTION:RSA,SSL2_METHOD +SSLv2_method 114 EXIST::FUNCTION:RSA,SSL2_METHOD +SSLv2_server_method 115 EXIST::FUNCTION:RSA,SSL2_METHOD SSLv3_client_method 116 EXIST::FUNCTION:SSL3_METHOD SSLv3_method 117 EXIST::FUNCTION:SSL3_METHOD SSLv3_server_method 118 EXIST::FUNCTION:SSL3_METHOD diff --git a/etc/devd/usb.conf b/etc/devd/usb.conf index 56f1a5f..45e28fe 100644 --- a/etc/devd/usb.conf +++ b/etc/devd/usb.conf @@ -1721,7 +1721,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x07b8"; - match "product" "(0x8178|0x8188|0x8189)"; + match "product" "(0x8178|0x8179|0x8188|0x8189)"; action "kldload -n if_urtwn"; }; @@ -3161,7 +3161,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0df6"; - match "product" "(0x0052|0x005c|0x0061)"; + match "product" "0x0052"; + action "kldload -n if_urtwn"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0df6"; + match "product" "0x0056"; + action "kldload -n if_axe"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0df6"; + match "product" "(0x005c|0x0061)"; action "kldload -n if_urtwn"; }; @@ -4633,7 +4649,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x17e9"; - match "product" "(0x0059|0x0100|0x0117|0x0136|0x0138|0x0141|0x015a|0x0198|0x019b|0x01ba|0x01bb|0x01d4|0x01d7|0x01e2|0x0215|0x024c|0x02a9|0x0377|0x03e0|0x401a)"; + match "product" "(0x0059|0x0100|0x0117|0x0136|0x0138|0x0141|0x015a|0x0198|0x019b|0x01ba|0x01bb|0x01d4|0x01d7|0x01e2|0x0215|0x024c|0x02a9|0x02e9|0x0377|0x03e0|0x401a)"; action "kldload -n udl"; }; @@ -5801,5 +5817,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2719 USB entries processed +# 2722 USB entries processed diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2 index 104e7bd..b692c1f 100644 --- a/lib/libc/sys/kqueue.2 +++ b/lib/libc/sys/kqueue.2 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 29, 2015 +.Dd May 1, 2016 .Dt KQUEUE 2 .Os .Sh NAME @@ -373,6 +373,10 @@ The file referenced by the descriptor was extended. The file referenced by the descriptor had its attributes changed. .It Dv NOTE_LINK The link count on the file changed. +In particular, the +.Dv NOTE_LINK +event is reported if a subdirectory was created or deleted inside +the directory referenced by the descriptor. .It Dv NOTE_RENAME The file referenced by the descriptor was renamed. .It Dv NOTE_REVOKE @@ -577,6 +581,57 @@ will be set to indicate the error condition. If the time limit expires, then .Fn kevent returns 0. +.Sh EXAMPLES +.Bd -literal -compact +#include <sys/types.h> +#include <sys/event.h> +#include <sys/time.h> +#include <err.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +int +main(int argc, char **argv) +{ + struct kevent event; /* Event we want to monitor */ + struct kevent tevent; /* Event triggered */ + int kq, fd, ret; + + if (argc != 2) + err(EXIT_FAILURE, "Usage: %s path\en", argv[0]); + fd = open(argv[1], O_RDONLY); + if (fd == -1) + err(EXIT_FAILURE, "Failed to open '%s'", argv[1]); + + /* Create kqueue. */ + kq = kqueue(); + if (kq == -1) + err(EXIT_FAILURE, "kqueue() failed"); + + /* Initialize kevent structure. */ + EV_SET(&event, fd, EVFILT_VNODE, EV_ADD | EV_CLEAR, NOTE_WRITE, + 0, NULL); + /* Attach event to the kqueue. */ + ret = kevent(kq, &event, 1, NULL, 0, NULL); + if (ret == -1) + err(EXIT_FAILURE, "kevent register"); + if (event.flags & EV_ERROR) + errx(EXIT_FAILURE, "Event error: %s", strerror(event.data)); + + for (;;) { + /* Sleep until something happens. */ + ret = kevent(kq, NULL, 0, &tevent, 1, NULL); + if (ret == -1) { + err(EXIT_FAILURE, "kevent wait"); + } else if (ret > 0) { + printf("Something was written in '%s'\en", argv[1]); + } + } +} +.Ed .Sh ERRORS The .Fn kqueue diff --git a/lib/libc/tests/stdio/fmemopen2_test.c b/lib/libc/tests/stdio/fmemopen2_test.c index 62831fb..6b6392d 100644 --- a/lib/libc/tests/stdio/fmemopen2_test.c +++ b/lib/libc/tests/stdio/fmemopen2_test.c @@ -249,12 +249,14 @@ ATF_TC_BODY(test_append_binary_pos, tc) FILE *fp; fp = fmemopen(NULL, 16, "ab+"); + ATF_REQUIRE(fp != NULL); ATF_REQUIRE(ftell(fp) == 0L); fclose(fp); /* Make sure that a pre-allocated buffer behaves correctly. */ char buf[] = "Hello"; fp = fmemopen(buf, sizeof(buf), "ab+"); + ATF_REQUIRE(fp != NULL); ATF_REQUIRE(ftell(fp) == strlen(buf)); fclose(fp); } diff --git a/lib/libc/tests/stdio/freopen_test.c b/lib/libc/tests/stdio/freopen_test.c index 1719927..8ca4719 100644 --- a/lib/libc/tests/stdio/freopen_test.c +++ b/lib/libc/tests/stdio/freopen_test.c @@ -48,7 +48,6 @@ runtest(const char *fname1, const char *mode1, const char *fname2, "fopen(\"%s\", \"%s\") failed; errno=%d", fname1, mode1, errno); fp2 = freopen(fname2, mode2, fp1); if (fp2 == NULL) { - fclose(fp1); ATF_REQUIRE_MSG(success == false, "freopen(\"%s\", \"%s\", fopen(\"%s\", \"%s\")) succeeded " "unexpectedly", fname2_print, mode2, fname1, mode1); diff --git a/lib/libcam/camlib.c b/lib/libcam/camlib.c index b7024a6..8986230 100644 --- a/lib/libcam/camlib.c +++ b/lib/libcam/camlib.c @@ -102,7 +102,7 @@ cam_freeccb(union ccb *ccb) * /dev/foo0 * foo0 * nfoo0 - * + * * Some peripheral drivers create separate device nodes with 'n' prefix for * non-rewind operations. Currently only sa(4) tape driver has this feature. * We extract pure peripheral name as device name for this special case. @@ -194,7 +194,7 @@ cam_get_device(const char *path, char *dev_name, int devnamelen, int *unit) /* * At this point, if the last character of the string isn't a - * number, we know the user either didn't give us a device number, + * number, we know the user either didn't give us a device number, * or he gave us a device name/number format we don't recognize. */ if (!isdigit(tmpstr[strlen(tmpstr) - 1])) { @@ -275,7 +275,7 @@ cam_open_btl(path_id_t path_id, target_id_t target_id, lun_id_t target_lun, int fd, bufsize; if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, "%s: couldn't open %s\n%s: %s", func_name, XPT_DEVICE, func_name, strerror(errno)); return(NULL); @@ -292,7 +292,7 @@ cam_open_btl(path_id_t path_id, target_id_t target_id, lun_id_t target_lun, ccb.cdm.match_buf_len = bufsize; ccb.cdm.matches = (struct dev_match_result *)malloc(bufsize); if (ccb.cdm.matches == NULL) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, "%s: couldn't malloc match buffer", func_name); close(fd); return(NULL); @@ -305,14 +305,14 @@ cam_open_btl(path_id_t path_id, target_id_t target_id, lun_id_t target_lun, ccb.cdm.patterns = (struct dev_match_pattern *)malloc( sizeof(struct dev_match_pattern)); if (ccb.cdm.patterns == NULL) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, "%s: couldn't malloc pattern buffer", func_name); free(ccb.cdm.matches); close(fd); return(NULL); } ccb.cdm.patterns[0].type = DEV_MATCH_PERIPH; - match_pat = &ccb.cdm.patterns[0].pattern.periph_pattern; + match_pat = &ccb.cdm.patterns[0].pattern.periph_pattern; /* * We're looking for the passthrough device associated with this @@ -421,7 +421,7 @@ cam_lookup_pass(const char *dev_name, int unit, int flags, * passthrough device. */ if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, "%s: couldn't open %s\n%s: %s", func_name, XPT_DEVICE, func_name, strerror(errno)); return(NULL); @@ -435,7 +435,7 @@ cam_lookup_pass(const char *dev_name, int unit, int flags, ccb.cgdl.unit_number = unit; /* - * Attempt to get the passthrough device. This ioctl will fail if + * Attempt to get the passthrough device. This ioctl will fail if * the device name is null, if the device doesn't exist, or if the * passthrough driver isn't in the kernel. */ @@ -512,7 +512,7 @@ cam_real_open_device(const char *path, int flags, struct cam_device *device, } device->fd = -1; malloced_device = 1; - } + } /* * If the user passed in a path, save it for him. @@ -551,7 +551,7 @@ cam_real_open_device(const char *path, int flags, struct cam_device *device, * we don't have to set any fields. */ ccb.ccb_h.func_code = XPT_GDEVLIST; - + /* * We're only doing this to get some information on the device in * question. Otherwise, we'd have to pass in yet another @@ -611,7 +611,7 @@ cam_real_open_device(const char *path, int flags, struct cam_device *device, goto crod_bailout; } device->pd_type = SID_TYPE(&ccb.cgd.inq_data); - bcopy(&ccb.cgd.inq_data, &device->inq_data, + bcopy(&ccb.cgd.inq_data, &device->inq_data, sizeof(struct scsi_inquiry_data)); device->serial_num_len = ccb.cgd.serial_num_len; bcopy(&ccb.cgd.serial_num, &device->serial_num, device->serial_num_len); @@ -719,7 +719,7 @@ cam_device_dup(struct cam_device *device) newdev = malloc(sizeof(struct cam_device)); if (newdev == NULL) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, "%s: couldn't malloc CAM device structure", func_name); return(NULL); } diff --git a/lib/libcam/camlib.h b/lib/libcam/camlib.h index e505c77..4fa6a67 100644 --- a/lib/libcam/camlib.h +++ b/lib/libcam/camlib.h @@ -83,7 +83,7 @@ extern char cam_errbuf[]; struct cam_device { char device_path[MAXPATHLEN];/* - * Pathname of the device + * Pathname of the device * given by the user. This * may be null if the * user states the device @@ -98,15 +98,15 @@ struct cam_device { * Unit number given by * the user. */ - char device_name[DEV_IDLEN+1];/* - * Name of the device, - * e.g. 'pass' + char device_name[DEV_IDLEN+1];/* + * Name of the device, + * e.g. 'pass' */ u_int32_t dev_unit_num; /* Unit number of the passthrough * device associated with this * particular device. */ - + char sim_name[SIM_IDLEN+1]; /* Controller name, e.g. 'ahc' */ u_int32_t sim_unit_number; /* Controller unit number */ u_int32_t bus_id; /* Controller bus number */ @@ -142,7 +142,7 @@ int cam_send_ccb(struct cam_device *device, union ccb *ccb); char * cam_path_string(struct cam_device *dev, char *str, int len); struct cam_device * cam_device_dup(struct cam_device *device); -void cam_device_copy(struct cam_device *src, +void cam_device_copy(struct cam_device *src, struct cam_device *dst); int cam_get_device(const char *path, char *dev_name, int devnamelen, int *unit); diff --git a/lib/libcam/scsi_cmdparse.c b/lib/libcam/scsi_cmdparse.c index 3d977e1..4a322ba 100644 --- a/lib/libcam/scsi_cmdparse.c +++ b/lib/libcam/scsi_cmdparse.c @@ -102,7 +102,7 @@ __FBSDID("$FreeBSD$"); static int do_buff_decode(u_int8_t *databuf, size_t len, void (*arg_put)(void *, int , void *, int, char *), - void *puthook, const char *fmt, va_list ap) + void *puthook, const char *fmt, va_list *ap) { int assigned = 0; int width; @@ -128,7 +128,7 @@ do_buff_decode(u_int8_t *databuf, size_t len, (void *)((long)(ARG)), width, \ field_name); \ else \ - *(va_arg(ap, int *)) = (ARG); \ + *(va_arg(*ap, int *)) = (ARG); \ assigned++; \ } \ field_name[0] = 0; \ @@ -255,7 +255,7 @@ do_buff_decode(u_int8_t *databuf, size_t len, databuf, width, field_name); else { char *dest; - dest = va_arg(ap, char *); + dest = va_arg(*ap, char *); bcopy(databuf, dest, width); if (letter == 'z') { char *p; @@ -287,7 +287,7 @@ do_buff_decode(u_int8_t *databuf, size_t len, * can't have a variable seek when you are using * "arg_put". */ - width = (arg_put) ? 0 : va_arg(ap, int); + width = (arg_put) ? 0 : va_arg(*ap, int); fmt++; } else { width = strtol(fmt, &intendp, 10); @@ -539,7 +539,7 @@ next_field(const char **pp, char *fmt, int *width_p, int *value_p, char *name, static int do_encode(u_char *buff, size_t vec_max, size_t *used, int (*arg_get)(void *, char *), void *gethook, const char *fmt, - va_list ap) + va_list *ap) { int ind; int shift; @@ -564,7 +564,7 @@ do_encode(u_char *buff, size_t vec_max, size_t *used, else value = arg_get ? (*arg_get)(gethook, field_name) : - va_arg(ap, int); + va_arg(*ap, int); } #if 0 @@ -662,11 +662,16 @@ int csio_decode(struct ccb_scsiio *csio, const char *fmt, ...) { va_list ap; + int retval; va_start(ap, fmt); - return(do_buff_decode(csio->data_ptr, (size_t)csio->dxfer_len, - 0, 0, fmt, ap)); + retval = do_buff_decode(csio->data_ptr, (size_t)csio->dxfer_len, 0, 0, + fmt, &ap); + + va_end(ap); + + return (retval); } int @@ -674,29 +679,31 @@ csio_decode_visit(struct ccb_scsiio *csio, const char *fmt, void (*arg_put)(void *, int, void *, int, char *), void *puthook) { - va_list ap; /* * We need some way to output things; we can't do it without * the arg_put function. */ if (arg_put == NULL) - return(-1); - - bzero(&ap, sizeof(ap)); + return (-1); - return(do_buff_decode(csio->data_ptr, (size_t)csio->dxfer_len, - arg_put, puthook, fmt, ap)); + return (do_buff_decode(csio->data_ptr, (size_t)csio->dxfer_len, + arg_put, puthook, fmt, NULL)); } int buff_decode(u_int8_t *buff, size_t len, const char *fmt, ...) { va_list ap; + int retval; va_start(ap, fmt); - return(do_buff_decode(buff, len, 0, 0, fmt, ap)); + retval = do_buff_decode(buff, len, 0, 0, fmt, &ap); + + va_end(ap); + + return (retval); } int @@ -704,7 +711,6 @@ buff_decode_visit(u_int8_t *buff, size_t len, const char *fmt, void (*arg_put)(void *, int, void *, int, char *), void *puthook) { - va_list ap; /* * We need some way to output things; we can't do it without @@ -713,9 +719,7 @@ buff_decode_visit(u_int8_t *buff, size_t len, const char *fmt, if (arg_put == NULL) return(-1); - bzero(&ap, sizeof(ap)); - - return(do_buff_decode(buff, len, arg_put, puthook, fmt, ap)); + return (do_buff_decode(buff, len, arg_put, puthook, fmt, NULL)); } /* @@ -732,15 +736,15 @@ csio_build(struct ccb_scsiio *csio, u_int8_t *data_ptr, u_int32_t dxfer_len, va_list ap; if (csio == NULL) - return(0); + return (0); bzero(csio, sizeof(struct ccb_scsiio)); va_start(ap, cmd_spec); if ((retval = do_encode(csio->cdb_io.cdb_bytes, SCSI_MAX_CDBLEN, - &cmdlen, NULL, NULL, cmd_spec, ap)) == -1) - return(retval); + &cmdlen, NULL, NULL, cmd_spec, &ap)) == -1) + goto done; cam_fill_csio(csio, /* retries */ retry_count, @@ -753,7 +757,10 @@ csio_build(struct ccb_scsiio *csio, u_int8_t *data_ptr, u_int32_t dxfer_len, /* cdb_len */ cmdlen, /* timeout */ timeout ? timeout : 5000); - return(retval); +done: + va_end(ap); + + return (retval); } int @@ -762,7 +769,6 @@ csio_build_visit(struct ccb_scsiio *csio, u_int8_t *data_ptr, int timeout, const char *cmd_spec, int (*arg_get)(void *hook, char *field_name), void *gethook) { - va_list ap; size_t cmdlen; int retval; @@ -776,12 +782,10 @@ csio_build_visit(struct ccb_scsiio *csio, u_int8_t *data_ptr, if (arg_get == NULL) return(-1); - bzero(&ap, sizeof(ap)); - bzero(csio, sizeof(struct ccb_scsiio)); if ((retval = do_encode(csio->cdb_io.cdb_bytes, SCSI_MAX_CDBLEN, - &cmdlen, arg_get, gethook, cmd_spec, ap)) == -1) + &cmdlen, arg_get, gethook, cmd_spec, NULL)) == -1) return(retval); cam_fill_csio(csio, @@ -802,20 +806,24 @@ int csio_encode(struct ccb_scsiio *csio, const char *fmt, ...) { va_list ap; + int retval; if (csio == NULL) - return(0); + return (0); va_start(ap, fmt); - return(do_encode(csio->data_ptr, csio->dxfer_len, 0, 0, 0, fmt, ap)); + retval = do_encode(csio->data_ptr, csio->dxfer_len, 0, 0, 0, fmt, &ap); + + va_end(ap); + + return (retval); } int buff_encode_visit(u_int8_t *buff, size_t len, const char *fmt, int (*arg_get)(void *hook, char *field_name), void *gethook) { - va_list ap; /* * We need something to encode, but we can't get it without the @@ -824,16 +832,13 @@ buff_encode_visit(u_int8_t *buff, size_t len, const char *fmt, if (arg_get == NULL) return(-1); - bzero(&ap, sizeof(ap)); - - return(do_encode(buff, len, 0, arg_get, gethook, fmt, ap)); + return (do_encode(buff, len, 0, arg_get, gethook, fmt, NULL)); } int csio_encode_visit(struct ccb_scsiio *csio, const char *fmt, int (*arg_get)(void *hook, char *field_name), void *gethook) { - va_list ap; /* * We need something to encode, but we can't get it without the @@ -842,8 +847,6 @@ csio_encode_visit(struct ccb_scsiio *csio, const char *fmt, if (arg_get == NULL) return(-1); - bzero(&ap, sizeof(ap)); - - return(do_encode(csio->data_ptr, csio->dxfer_len, 0, arg_get, - gethook, fmt, ap)); + return (do_encode(csio->data_ptr, csio->dxfer_len, 0, arg_get, + gethook, fmt, NULL)); } diff --git a/lib/libmagic/Makefile b/lib/libmagic/Makefile index 0ddecc8..14f1702 100644 --- a/lib/libmagic/Makefile +++ b/lib/libmagic/Makefile @@ -12,7 +12,7 @@ LDADD= -lz MAN= libmagic.3 magic.5 SRCS= apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c \ - der.c encoding.c fsmagic.c funcs.c \ + encoding.c fsmagic.c funcs.c \ is_tar.c magic.c print.c readcdf.c readelf.c softmagic.c INCS= magic.h diff --git a/lib/libmagic/config.h b/lib/libmagic/config.h index 2650445..752b82b 100644 --- a/lib/libmagic/config.h +++ b/lib/libmagic/config.h @@ -43,9 +43,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #define HAVE_DLFCN_H 1 -/* Define to 1 if you have the `dprintf' function. */ -#define HAVE_DPRINTF 1 - /* Define to 1 if you have the <err.h> header file. */ #define HAVE_ERR_H 1 @@ -293,7 +290,7 @@ #define PACKAGE_NAME "file" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "file 5.26" +#define PACKAGE_STRING "file 5.25" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "file" @@ -302,7 +299,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "5.26" +#define PACKAGE_VERSION "5.25" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -333,7 +330,7 @@ /* Version number of package */ -#define VERSION "5.26" +#define VERSION "5.25" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ diff --git a/release/Makefile b/release/Makefile index a29d84c..d37f2a5 100644 --- a/release/Makefile +++ b/release/Makefile @@ -70,6 +70,8 @@ VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} .endfor .endif +NO_INSTALLEXTRAKERNELS=no + .if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL) VOLUME_LABEL= FreeBSD_Install .endif diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index d91a64a..83722ce 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -814,9 +814,6 @@ scsidoinquiry(struct cam_device *device, int argc, char **argv, if (arglist & CAM_ARG_GET_SERIAL) scsiserial(device, retry_count, timeout); - if (error != 0) - return(error); - if (arglist & CAM_ARG_GET_XFERRATE) error = camxferrate(device); diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 97f9d47..b173eb2 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2277,6 +2277,17 @@ script_set_env(struct client_state *client, const char *prefix, { int i, j, namelen; + /* No `` or $() command substitution allowed in environment values! */ + for (j=0; j < strlen(value); j++) + switch (value[j]) { + case '`': + case '$': + warning("illegal character (%c) in value '%s'", + value[j], value); + /* Ignore this option */ + return; + } + namelen = strlen(name); for (i = 0; client->scriptEnv[i]; i++) @@ -2313,16 +2324,6 @@ script_set_env(struct client_state *client, const char *prefix, strlen(value) + 1); if (client->scriptEnv[i] == NULL) error("script_set_env: no memory for variable assignment"); - - /* No `` or $() command substitution allowed in environment values! */ - for (j=0; j < strlen(value); j++) - switch (value[j]) { - case '`': - case '$': - error("illegal character (%c) in value '%s'", value[j], - value); - /* not reached */ - } snprintf(client->scriptEnv[i], strlen(prefix) + strlen(name) + 1 + strlen(value) + 1, "%s%s=%s", prefix, name, value); } diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index accb175..034d578 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -223,7 +223,7 @@ static int canpromote(int i, int from, int to) { const struct ieee80211_channel *fc = &chaninfo->ic_chans[i]; - int j; + u_int j; if ((fc->ic_flags & from) != from) return i; @@ -302,7 +302,7 @@ promote(int i) static void mapfreq(struct ieee80211_channel *chan, int freq, int flags) { - int i; + u_int i; for (i = 0; i < chaninfo->ic_nchans; i++) { const struct ieee80211_channel *c = &chaninfo->ic_chans[i]; @@ -322,7 +322,7 @@ mapfreq(struct ieee80211_channel *chan, int freq, int flags) static void mapchan(struct ieee80211_channel *chan, int ieee, int flags) { - int i; + u_int i; for (i = 0; i < chaninfo->ic_nchans; i++) { const struct ieee80211_channel *c = &chaninfo->ic_chans[i]; @@ -2939,7 +2939,7 @@ copy_essid(char buf[], size_t bufsize, const u_int8_t *essid, size_t essid_len) { const u_int8_t *p; size_t maxlen; - int i; + u_int i; if (essid_len > bufsize) maxlen = bufsize; @@ -4133,7 +4133,7 @@ static void printkey(const struct ieee80211req_key *ik) { static const uint8_t zerodata[IEEE80211_KEYBUF_SIZE]; - int keylen = ik->ik_keylen; + u_int keylen = ik->ik_keylen; int printcontents; printcontents = printkeys && @@ -4170,7 +4170,7 @@ printkey(const struct ieee80211req_key *ik) break; } if (printcontents) { - int i; + u_int i; printf(" <"); for (i = 0; i < keylen; i++) diff --git a/sbin/restore/main.c b/sbin/restore/main.c index 91f4a83..d74e59e 100644 --- a/sbin/restore/main.c +++ b/sbin/restore/main.c @@ -366,7 +366,8 @@ obsolete(int *argcp, char **argvp[]) if (flags) { *p = '\0'; *nargv++ = flagsp; - } + } else + free(flagsp); /* Copy remaining arguments. */ while ((*nargv++ = *argv++)); diff --git a/sbin/restore/symtab.c b/sbin/restore/symtab.c index 9d0313d..17bd642 100644 --- a/sbin/restore/symtab.c +++ b/sbin/restore/symtab.c @@ -560,6 +560,7 @@ initsymtable(char *filename) fprintf(stderr, "read: %s\n", strerror(errno)); panic("cannot read symbol table file %s\n", filename); } + (void)close(fd); switch (command) { case 'r': /* diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index 384f025..a212ab0 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -3,8 +3,8 @@ .include <bsd.own.mk> # OpenSSL version used for manual page generation -OPENSSL_VER= 1.0.1s -OPENSSL_DATE= 2016-03-01 +OPENSSL_VER= 1.0.1t +OPENSSL_DATE= 2016-05-03 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc diff --git a/secure/lib/libcrypto/Makefile.man b/secure/lib/libcrypto/Makefile.man index 74576a6..87266de 100644 --- a/secure/lib/libcrypto/Makefile.man +++ b/secure/lib/libcrypto/Makefile.man @@ -94,6 +94,7 @@ MAN+= EVP_BytesToKey.3 MAN+= EVP_DigestInit.3 MAN+= EVP_DigestSignInit.3 MAN+= EVP_DigestVerifyInit.3 +MAN+= EVP_EncodeInit.3 MAN+= EVP_EncryptInit.3 MAN+= EVP_OpenInit.3 MAN+= EVP_PKEY_CTX_ctrl.3 @@ -500,6 +501,13 @@ MLINKS+= EVP_DigestSignInit.3 EVP_DigestSignUpdate.3 MLINKS+= EVP_DigestSignInit.3 EVP_DigestSignFinal.3 MLINKS+= EVP_DigestVerifyInit.3 EVP_DigestVerifyUpdate.3 MLINKS+= EVP_DigestVerifyInit.3 EVP_DigestVerifyFinal.3 +MLINKS+= EVP_EncodeInit.3 EVP_EncodeUpdate.3 +MLINKS+= EVP_EncodeInit.3 EVP_EncodeFinal.3 +MLINKS+= EVP_EncodeInit.3 EVP_EncodeBlock.3 +MLINKS+= EVP_EncodeInit.3 EVP_DecodeInit.3 +MLINKS+= EVP_EncodeInit.3 EVP_DecodeUpdate.3 +MLINKS+= EVP_EncodeInit.3 EVP_DecodeFinal.3 +MLINKS+= EVP_EncodeInit.3 EVP_DecodeBlock.3 MLINKS+= EVP_EncryptInit.3 EVP_CIPHER_CTX_init.3 MLINKS+= EVP_EncryptInit.3 EVP_EncryptInit_ex.3 MLINKS+= EVP_EncryptInit.3 EVP_EncryptUpdate.3 diff --git a/secure/lib/libcrypto/amd64/x86_64-mont.S b/secure/lib/libcrypto/amd64/x86_64-mont.S index 5997f3c..9e7fa54 100644 --- a/secure/lib/libcrypto/amd64/x86_64-mont.S +++ b/secure/lib/libcrypto/amd64/x86_64-mont.S @@ -31,6 +31,20 @@ bn_mul_mont: movq %r11,8(%rsp,%r9,8) .Lmul_body: + + + + + + + subq %rsp,%r11 + andq $-4096,%r11 +.Lmul_page_walk: + movq (%rsp,%r11,1),%r10 + subq $4096,%r11 +.byte 0x66,0x2e + jnc .Lmul_page_walk + movq %rdx,%r12 movq (%r8),%r8 movq (%r12),%rbx @@ -228,6 +242,14 @@ bn_mul4x_mont: movq %r11,8(%rsp,%r9,8) .Lmul4x_body: + subq %rsp,%r11 + andq $-4096,%r11 +.Lmul4x_page_walk: + movq (%rsp,%r11,1),%r10 + subq $4096,%r11 +.byte 0x2e + jnc .Lmul4x_page_walk + movq %rdi,16(%rsp,%r9,8) movq %rdx,%r12 movq (%r8),%r8 @@ -610,6 +632,7 @@ bn_mul4x_mont: .align 16 bn_sqr4x_mont: .Lsqr4x_enter: + movq %rsp,%rax pushq %rbx pushq %rbp pushq %r12 @@ -618,13 +641,24 @@ bn_sqr4x_mont: pushq %r15 shll $3,%r9d - xorq %r10,%r10 movq %rsp,%r11 - subq %r9,%r10 + negq %r9 movq (%r8),%r8 - leaq -72(%rsp,%r10,2),%rsp + leaq -72(%rsp,%r9,2),%rsp andq $-1024,%rsp + subq %rsp,%r11 + andq $-4096,%r11 +.Lsqr4x_page_walk: + movq (%rsp,%r11,1),%r10 + subq $4096,%r11 +.byte 0x2e + jnc .Lsqr4x_page_walk + + movq %r9,%r10 + negq %r9 + leaq -48(%rax),%r11 + diff --git a/secure/lib/libcrypto/amd64/x86_64-mont5.S b/secure/lib/libcrypto/amd64/x86_64-mont5.S index 5820e12..8fe1ce7 100644 --- a/secure/lib/libcrypto/amd64/x86_64-mont5.S +++ b/secure/lib/libcrypto/amd64/x86_64-mont5.S @@ -32,6 +32,20 @@ bn_mul_mont_gather5: movq %rax,8(%rsp,%r9,8) .Lmul_body: + + + + + + + subq %rsp,%rax + andq $-4096,%rax +.Lmul_page_walk: + movq (%rsp,%rax,1),%r11 + subq $4096,%rax +.byte 0x2e + jnc .Lmul_page_walk + leaq 128(%rdx),%r12 movdqa 0(%r10),%xmm0 movdqa 16(%r10),%xmm1 @@ -420,6 +434,14 @@ bn_mul4x_mont_gather5: movq %rax,8(%rsp,%r9,8) .Lmul4x_body: + subq %rsp,%rax + andq $-4096,%rax +.Lmul4x_page_walk: + movq (%rsp,%rax,1),%r11 + subq $4096,%rax +.byte 0x2e + jnc .Lmul4x_page_walk + movq %rdi,16(%rsp,%r9,8) leaq 128(%rdx),%r12 movdqa 0(%r10),%xmm0 diff --git a/secure/lib/libcrypto/i386/x86-mont.s b/secure/lib/libcrypto/i386/x86-mont.s index 0eec75d..8f95759 100644 --- a/secure/lib/libcrypto/i386/x86-mont.s +++ b/secure/lib/libcrypto/i386/x86-mont.s @@ -30,6 +30,14 @@ bn_mul_mont: xorl $2048,%edx subl %edx,%esp andl $-64,%esp + movl %ebp,%eax + subl %esp,%eax + andl $-4096,%eax +.L001page_walk: + movl (%esp,%eax,1),%edx + subl $4096,%eax +.byte 46 + jnc .L001page_walk movl (%esi),%eax movl 4(%esi),%ebx movl 8(%esi),%ecx @@ -45,7 +53,7 @@ bn_mul_mont: movl %ebp,24(%esp) leal OPENSSL_ia32cap_P,%eax btl $26,(%eax) - jnc .L001non_sse2 + jnc .L002non_sse2 movl $-1,%eax movd %eax,%mm7 movl 8(%esp),%esi @@ -69,7 +77,7 @@ bn_mul_mont: psrlq $32,%mm3 incl %ecx .align 16 -.L0021st: +.L0031st: pmuludq %mm4,%mm0 pmuludq %mm5,%mm1 paddq %mm0,%mm2 @@ -84,7 +92,7 @@ bn_mul_mont: psrlq $32,%mm3 leal 1(%ecx),%ecx cmpl %ebx,%ecx - jl .L0021st + jl .L0031st pmuludq %mm4,%mm0 pmuludq %mm5,%mm1 paddq %mm0,%mm2 @@ -98,7 +106,7 @@ bn_mul_mont: paddq %mm2,%mm3 movq %mm3,32(%esp,%ebx,4) incl %edx -.L003outer: +.L004outer: xorl %ecx,%ecx movd (%edi,%edx,4),%mm4 movd (%esi),%mm5 @@ -120,7 +128,7 @@ bn_mul_mont: paddq %mm6,%mm2 incl %ecx decl %ebx -.L004inner: +.L005inner: pmuludq %mm4,%mm0 pmuludq %mm5,%mm1 paddq %mm0,%mm2 @@ -137,7 +145,7 @@ bn_mul_mont: paddq %mm6,%mm2 decl %ebx leal 1(%ecx),%ecx - jnz .L004inner + jnz .L005inner movl %ecx,%ebx pmuludq %mm4,%mm0 pmuludq %mm5,%mm1 @@ -155,11 +163,11 @@ bn_mul_mont: movq %mm3,32(%esp,%ebx,4) leal 1(%edx),%edx cmpl %ebx,%edx - jle .L003outer + jle .L004outer emms - jmp .L005common_tail + jmp .L006common_tail .align 16 -.L001non_sse2: +.L002non_sse2: movl 8(%esp),%esi leal 1(%ebx),%ebp movl 12(%esp),%edi @@ -170,12 +178,12 @@ bn_mul_mont: leal 4(%edi,%ebx,4),%eax orl %edx,%ebp movl (%edi),%edi - jz .L006bn_sqr_mont + jz .L007bn_sqr_mont movl %eax,28(%esp) movl (%esi),%eax xorl %edx,%edx .align 16 -.L007mull: +.L008mull: movl %edx,%ebp mull %edi addl %eax,%ebp @@ -184,7 +192,7 @@ bn_mul_mont: movl (%esi,%ecx,4),%eax cmpl %ebx,%ecx movl %ebp,28(%esp,%ecx,4) - jl .L007mull + jl .L008mull movl %edx,%ebp mull %edi movl 20(%esp),%edi @@ -202,9 +210,9 @@ bn_mul_mont: movl 4(%esi),%eax adcl $0,%edx incl %ecx - jmp .L0082ndmadd + jmp .L0092ndmadd .align 16 -.L0091stmadd: +.L0101stmadd: movl %edx,%ebp mull %edi addl 32(%esp,%ecx,4),%ebp @@ -215,7 +223,7 @@ bn_mul_mont: adcl $0,%edx cmpl %ebx,%ecx movl %ebp,28(%esp,%ecx,4) - jl .L0091stmadd + jl .L0101stmadd movl %edx,%ebp mull %edi addl 32(%esp,%ebx,4),%eax @@ -238,7 +246,7 @@ bn_mul_mont: adcl $0,%edx movl $1,%ecx .align 16 -.L0082ndmadd: +.L0092ndmadd: movl %edx,%ebp mull %edi addl 32(%esp,%ecx,4),%ebp @@ -249,7 +257,7 @@ bn_mul_mont: adcl $0,%edx cmpl %ebx,%ecx movl %ebp,24(%esp,%ecx,4) - jl .L0082ndmadd + jl .L0092ndmadd movl %edx,%ebp mull %edi addl 32(%esp,%ebx,4),%ebp @@ -265,16 +273,16 @@ bn_mul_mont: movl %edx,32(%esp,%ebx,4) cmpl 28(%esp),%ecx movl %eax,36(%esp,%ebx,4) - je .L005common_tail + je .L006common_tail movl (%ecx),%edi movl 8(%esp),%esi movl %ecx,12(%esp) xorl %ecx,%ecx xorl %edx,%edx movl (%esi),%eax - jmp .L0091stmadd + jmp .L0101stmadd .align 16 -.L006bn_sqr_mont: +.L007bn_sqr_mont: movl %ebx,(%esp) movl %ecx,12(%esp) movl %edi,%eax @@ -285,7 +293,7 @@ bn_mul_mont: andl $1,%ebx incl %ecx .align 16 -.L010sqr: +.L011sqr: movl (%esi,%ecx,4),%eax movl %edx,%ebp mull %edi @@ -297,7 +305,7 @@ bn_mul_mont: cmpl (%esp),%ecx movl %eax,%ebx movl %ebp,28(%esp,%ecx,4) - jl .L010sqr + jl .L011sqr movl (%esi,%ecx,4),%eax movl %edx,%ebp mull %edi @@ -321,7 +329,7 @@ bn_mul_mont: movl 4(%esi),%eax movl $1,%ecx .align 16 -.L0113rdmadd: +.L0123rdmadd: movl %edx,%ebp mull %edi addl 32(%esp,%ecx,4),%ebp @@ -340,7 +348,7 @@ bn_mul_mont: adcl $0,%edx cmpl %ebx,%ecx movl %ebp,24(%esp,%ecx,4) - jl .L0113rdmadd + jl .L0123rdmadd movl %edx,%ebp mull %edi addl 32(%esp,%ebx,4),%ebp @@ -356,7 +364,7 @@ bn_mul_mont: movl %edx,32(%esp,%ebx,4) cmpl %ebx,%ecx movl %eax,36(%esp,%ebx,4) - je .L005common_tail + je .L006common_tail movl 4(%esi,%ecx,4),%edi leal 1(%ecx),%ecx movl %edi,%eax @@ -368,12 +376,12 @@ bn_mul_mont: xorl %ebp,%ebp cmpl %ebx,%ecx leal 1(%ecx),%ecx - je .L012sqrlast + je .L013sqrlast movl %edx,%ebx shrl $1,%edx andl $1,%ebx .align 16 -.L013sqradd: +.L014sqradd: movl (%esi,%ecx,4),%eax movl %edx,%ebp mull %edi @@ -389,13 +397,13 @@ bn_mul_mont: cmpl (%esp),%ecx movl %ebp,28(%esp,%ecx,4) movl %eax,%ebx - jle .L013sqradd + jle .L014sqradd movl %edx,%ebp addl %edx,%edx shrl $31,%ebp addl %ebx,%edx adcl $0,%ebp -.L012sqrlast: +.L013sqrlast: movl 20(%esp),%edi movl 16(%esp),%esi imull 32(%esp),%edi @@ -410,9 +418,9 @@ bn_mul_mont: adcl $0,%edx movl $1,%ecx movl 4(%esi),%eax - jmp .L0113rdmadd + jmp .L0123rdmadd .align 16 -.L005common_tail: +.L006common_tail: movl 16(%esp),%ebp movl 4(%esp),%edi leal 32(%esp),%esi @@ -420,13 +428,13 @@ bn_mul_mont: movl %ebx,%ecx xorl %edx,%edx .align 16 -.L014sub: +.L015sub: sbbl (%ebp,%edx,4),%eax movl %eax,(%edi,%edx,4) decl %ecx movl 4(%esi,%edx,4),%eax leal 1(%edx),%edx - jge .L014sub + jge .L015sub sbbl $0,%eax andl %eax,%esi notl %eax @@ -434,12 +442,12 @@ bn_mul_mont: andl %eax,%ebp orl %ebp,%esi .align 16 -.L015copy: +.L016copy: movl (%esi,%ebx,4),%eax movl %eax,(%edi,%ebx,4) movl %ecx,32(%esp,%ebx,4) decl %ebx - jge .L015copy + jge .L016copy movl 24(%esp),%esp movl $1,%eax .L000just_leave: diff --git a/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 b/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 index 85a7853..410dfba 100644 --- a/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 +++ b/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ASN1_STRING_length.3 b/secure/lib/libcrypto/man/ASN1_STRING_length.3 index 89b8a17..ec7d376 100644 --- a/secure/lib/libcrypto/man/ASN1_STRING_length.3 +++ b/secure/lib/libcrypto/man/ASN1_STRING_length.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_length 3" -.TH ASN1_STRING_length 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ASN1_STRING_length 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ASN1_STRING_new.3 b/secure/lib/libcrypto/man/ASN1_STRING_new.3 index c02e481..a74fd93 100644 --- a/secure/lib/libcrypto/man/ASN1_STRING_new.3 +++ b/secure/lib/libcrypto/man/ASN1_STRING_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_new 3" -.TH ASN1_STRING_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ASN1_STRING_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 b/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 index a109d81..6373559 100644 --- a/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 +++ b/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_print_ex 3" -.TH ASN1_STRING_print_ex 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ASN1_STRING_print_ex 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ASN1_generate_nconf.3 b/secure/lib/libcrypto/man/ASN1_generate_nconf.3 index 32b4f8d..6aa8d47 100644 --- a/secure/lib/libcrypto/man/ASN1_generate_nconf.3 +++ b/secure/lib/libcrypto/man/ASN1_generate_nconf.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_generate_nconf 3" -.TH ASN1_generate_nconf 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ASN1_generate_nconf 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_ctrl.3 b/secure/lib/libcrypto/man/BIO_ctrl.3 index 1ec2d38..80685ac 100644 --- a/secure/lib/libcrypto/man/BIO_ctrl.3 +++ b/secure/lib/libcrypto/man/BIO_ctrl.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ctrl 3" -.TH BIO_ctrl 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_ctrl 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_f_base64.3 b/secure/lib/libcrypto/man/BIO_f_base64.3 index 60fc29c..480df19 100644 --- a/secure/lib/libcrypto/man/BIO_f_base64.3 +++ b/secure/lib/libcrypto/man/BIO_f_base64.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_base64 3" -.TH BIO_f_base64 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_f_base64 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_f_buffer.3 b/secure/lib/libcrypto/man/BIO_f_buffer.3 index b8b24ee..b6e8c71 100644 --- a/secure/lib/libcrypto/man/BIO_f_buffer.3 +++ b/secure/lib/libcrypto/man/BIO_f_buffer.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_buffer 3" -.TH BIO_f_buffer 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_f_buffer 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_f_cipher.3 b/secure/lib/libcrypto/man/BIO_f_cipher.3 index 60193e1..7ef2642 100644 --- a/secure/lib/libcrypto/man/BIO_f_cipher.3 +++ b/secure/lib/libcrypto/man/BIO_f_cipher.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_cipher 3" -.TH BIO_f_cipher 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_f_cipher 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_f_md.3 b/secure/lib/libcrypto/man/BIO_f_md.3 index 4679828..865daa6 100644 --- a/secure/lib/libcrypto/man/BIO_f_md.3 +++ b/secure/lib/libcrypto/man/BIO_f_md.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_md 3" -.TH BIO_f_md 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_f_md 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_f_null.3 b/secure/lib/libcrypto/man/BIO_f_null.3 index 56deb1f..5bdfd4c 100644 --- a/secure/lib/libcrypto/man/BIO_f_null.3 +++ b/secure/lib/libcrypto/man/BIO_f_null.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_null 3" -.TH BIO_f_null 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_f_null 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_f_ssl.3 b/secure/lib/libcrypto/man/BIO_f_ssl.3 index 594a5f6..8a34506 100644 --- a/secure/lib/libcrypto/man/BIO_f_ssl.3 +++ b/secure/lib/libcrypto/man/BIO_f_ssl.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_ssl 3" -.TH BIO_f_ssl 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_f_ssl 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_find_type.3 b/secure/lib/libcrypto/man/BIO_find_type.3 index 92da58a..be8e5bd 100644 --- a/secure/lib/libcrypto/man/BIO_find_type.3 +++ b/secure/lib/libcrypto/man/BIO_find_type.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_find_type 3" -.TH BIO_find_type 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_find_type 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_new.3 b/secure/lib/libcrypto/man/BIO_new.3 index 000d30c..c4d99f3 100644 --- a/secure/lib/libcrypto/man/BIO_new.3 +++ b/secure/lib/libcrypto/man/BIO_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new 3" -.TH BIO_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_new_CMS.3 b/secure/lib/libcrypto/man/BIO_new_CMS.3 index b85d3ed..0a12169 100644 --- a/secure/lib/libcrypto/man/BIO_new_CMS.3 +++ b/secure/lib/libcrypto/man/BIO_new_CMS.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new_CMS 3" -.TH BIO_new_CMS 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_new_CMS 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_push.3 b/secure/lib/libcrypto/man/BIO_push.3 index 2115394..49722a7 100644 --- a/secure/lib/libcrypto/man/BIO_push.3 +++ b/secure/lib/libcrypto/man/BIO_push.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_push 3" -.TH BIO_push 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_push 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_read.3 b/secure/lib/libcrypto/man/BIO_read.3 index c282d66..5ddd7e5 100644 --- a/secure/lib/libcrypto/man/BIO_read.3 +++ b/secure/lib/libcrypto/man/BIO_read.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_read 3" -.TH BIO_read 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_read 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_s_accept.3 b/secure/lib/libcrypto/man/BIO_s_accept.3 index c7df1c5..bdd87a2 100644 --- a/secure/lib/libcrypto/man/BIO_s_accept.3 +++ b/secure/lib/libcrypto/man/BIO_s_accept.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_accept 3" -.TH BIO_s_accept 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_s_accept 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_s_bio.3 b/secure/lib/libcrypto/man/BIO_s_bio.3 index 2e2d17e..86a738b 100644 --- a/secure/lib/libcrypto/man/BIO_s_bio.3 +++ b/secure/lib/libcrypto/man/BIO_s_bio.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_bio 3" -.TH BIO_s_bio 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_s_bio 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_s_connect.3 b/secure/lib/libcrypto/man/BIO_s_connect.3 index 9505655..f274043 100644 --- a/secure/lib/libcrypto/man/BIO_s_connect.3 +++ b/secure/lib/libcrypto/man/BIO_s_connect.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_connect 3" -.TH BIO_s_connect 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_s_connect 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_s_fd.3 b/secure/lib/libcrypto/man/BIO_s_fd.3 index b525a79..55fa15a 100644 --- a/secure/lib/libcrypto/man/BIO_s_fd.3 +++ b/secure/lib/libcrypto/man/BIO_s_fd.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_fd 3" -.TH BIO_s_fd 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_s_fd 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_s_file.3 b/secure/lib/libcrypto/man/BIO_s_file.3 index 3eeef63..60196ed 100644 --- a/secure/lib/libcrypto/man/BIO_s_file.3 +++ b/secure/lib/libcrypto/man/BIO_s_file.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_file 3" -.TH BIO_s_file 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_s_file 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_s_mem.3 b/secure/lib/libcrypto/man/BIO_s_mem.3 index ee6092d..ad5c0ec 100644 --- a/secure/lib/libcrypto/man/BIO_s_mem.3 +++ b/secure/lib/libcrypto/man/BIO_s_mem.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_mem 3" -.TH BIO_s_mem 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_s_mem 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_s_null.3 b/secure/lib/libcrypto/man/BIO_s_null.3 index 95b7bb3..5f5d64c 100644 --- a/secure/lib/libcrypto/man/BIO_s_null.3 +++ b/secure/lib/libcrypto/man/BIO_s_null.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_null 3" -.TH BIO_s_null 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_s_null 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_s_socket.3 b/secure/lib/libcrypto/man/BIO_s_socket.3 index 665296d..852d1d2 100644 --- a/secure/lib/libcrypto/man/BIO_s_socket.3 +++ b/secure/lib/libcrypto/man/BIO_s_socket.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_socket 3" -.TH BIO_s_socket 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_s_socket 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_set_callback.3 b/secure/lib/libcrypto/man/BIO_set_callback.3 index 4e1f4d2..e263963 100644 --- a/secure/lib/libcrypto/man/BIO_set_callback.3 +++ b/secure/lib/libcrypto/man/BIO_set_callback.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_set_callback 3" -.TH BIO_set_callback 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_set_callback 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BIO_should_retry.3 b/secure/lib/libcrypto/man/BIO_should_retry.3 index 7756ef8..87bd337 100644 --- a/secure/lib/libcrypto/man/BIO_should_retry.3 +++ b/secure/lib/libcrypto/man/BIO_should_retry.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_should_retry 3" -.TH BIO_should_retry 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BIO_should_retry 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_BLINDING_new.3 b/secure/lib/libcrypto/man/BN_BLINDING_new.3 index c25ad33..368f22e 100644 --- a/secure/lib/libcrypto/man/BN_BLINDING_new.3 +++ b/secure/lib/libcrypto/man/BN_BLINDING_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_BLINDING_new 3" -.TH BN_BLINDING_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_BLINDING_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_CTX_new.3 b/secure/lib/libcrypto/man/BN_CTX_new.3 index 3c00f0c..aa1e4aa 100644 --- a/secure/lib/libcrypto/man/BN_CTX_new.3 +++ b/secure/lib/libcrypto/man/BN_CTX_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_new 3" -.TH BN_CTX_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_CTX_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_CTX_start.3 b/secure/lib/libcrypto/man/BN_CTX_start.3 index 74977c0..0574e22 100644 --- a/secure/lib/libcrypto/man/BN_CTX_start.3 +++ b/secure/lib/libcrypto/man/BN_CTX_start.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_start 3" -.TH BN_CTX_start 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_CTX_start 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_add.3 b/secure/lib/libcrypto/man/BN_add.3 index 85f92be..6ef661d 100644 --- a/secure/lib/libcrypto/man/BN_add.3 +++ b/secure/lib/libcrypto/man/BN_add.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add 3" -.TH BN_add 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_add 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_add_word.3 b/secure/lib/libcrypto/man/BN_add_word.3 index f9b52d8..a81679c 100644 --- a/secure/lib/libcrypto/man/BN_add_word.3 +++ b/secure/lib/libcrypto/man/BN_add_word.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add_word 3" -.TH BN_add_word 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_add_word 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_bn2bin.3 b/secure/lib/libcrypto/man/BN_bn2bin.3 index 63b3c17..2c14646 100644 --- a/secure/lib/libcrypto/man/BN_bn2bin.3 +++ b/secure/lib/libcrypto/man/BN_bn2bin.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_bn2bin 3" -.TH BN_bn2bin 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_bn2bin 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_cmp.3 b/secure/lib/libcrypto/man/BN_cmp.3 index 4e69052..894de08 100644 --- a/secure/lib/libcrypto/man/BN_cmp.3 +++ b/secure/lib/libcrypto/man/BN_cmp.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_cmp 3" -.TH BN_cmp 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_cmp 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_copy.3 b/secure/lib/libcrypto/man/BN_copy.3 index 3a4fe3f..29d1efa 100644 --- a/secure/lib/libcrypto/man/BN_copy.3 +++ b/secure/lib/libcrypto/man/BN_copy.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_copy 3" -.TH BN_copy 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_copy 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_generate_prime.3 b/secure/lib/libcrypto/man/BN_generate_prime.3 index f425a3b..fea257d 100644 --- a/secure/lib/libcrypto/man/BN_generate_prime.3 +++ b/secure/lib/libcrypto/man/BN_generate_prime.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_generate_prime 3" -.TH BN_generate_prime 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_generate_prime 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_mod_inverse.3 b/secure/lib/libcrypto/man/BN_mod_inverse.3 index 9b5ba47..53057fd 100644 --- a/secure/lib/libcrypto/man/BN_mod_inverse.3 +++ b/secure/lib/libcrypto/man/BN_mod_inverse.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_inverse 3" -.TH BN_mod_inverse 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_mod_inverse 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 b/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 index a2b6fa1..e0c2595 100644 --- a/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 +++ b/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_montgomery 3" -.TH BN_mod_mul_montgomery 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_mod_mul_montgomery 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 b/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 index f20a53d..14b3c57 100644 --- a/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 +++ b/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_reciprocal 3" -.TH BN_mod_mul_reciprocal 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_mod_mul_reciprocal 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_new.3 b/secure/lib/libcrypto/man/BN_new.3 index a97b942..d507dd0 100644 --- a/secure/lib/libcrypto/man/BN_new.3 +++ b/secure/lib/libcrypto/man/BN_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_new 3" -.TH BN_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_num_bytes.3 b/secure/lib/libcrypto/man/BN_num_bytes.3 index 0c78da6..ccf3b31 100644 --- a/secure/lib/libcrypto/man/BN_num_bytes.3 +++ b/secure/lib/libcrypto/man/BN_num_bytes.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_num_bytes 3" -.TH BN_num_bytes 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_num_bytes 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_rand.3 b/secure/lib/libcrypto/man/BN_rand.3 index 8526f1c..9524010 100644 --- a/secure/lib/libcrypto/man/BN_rand.3 +++ b/secure/lib/libcrypto/man/BN_rand.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_rand 3" -.TH BN_rand 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_rand 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_set_bit.3 b/secure/lib/libcrypto/man/BN_set_bit.3 index 9e9511e..906272d 100644 --- a/secure/lib/libcrypto/man/BN_set_bit.3 +++ b/secure/lib/libcrypto/man/BN_set_bit.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_set_bit 3" -.TH BN_set_bit 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_set_bit 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_swap.3 b/secure/lib/libcrypto/man/BN_swap.3 index 5e10e24..fa640bb 100644 --- a/secure/lib/libcrypto/man/BN_swap.3 +++ b/secure/lib/libcrypto/man/BN_swap.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_swap 3" -.TH BN_swap 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_swap 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/BN_zero.3 b/secure/lib/libcrypto/man/BN_zero.3 index f33e6d4..7593a97 100644 --- a/secure/lib/libcrypto/man/BN_zero.3 +++ b/secure/lib/libcrypto/man/BN_zero.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_zero 3" -.TH BN_zero 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH BN_zero 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_add0_cert.3 b/secure/lib/libcrypto/man/CMS_add0_cert.3 index 96e71e1..856c3b9 100644 --- a/secure/lib/libcrypto/man/CMS_add0_cert.3 +++ b/secure/lib/libcrypto/man/CMS_add0_cert.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add0_cert 3" -.TH CMS_add0_cert 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_add0_cert 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 b/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 index 273ed5b..27b4177 100644 --- a/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 +++ b/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_recipient_cert 3" -.TH CMS_add1_recipient_cert 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_add1_recipient_cert 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_add1_signer.3 b/secure/lib/libcrypto/man/CMS_add1_signer.3 index edd592c..37dc57a 100644 --- a/secure/lib/libcrypto/man/CMS_add1_signer.3 +++ b/secure/lib/libcrypto/man/CMS_add1_signer.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_signer 3" -.TH CMS_add1_signer 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_add1_signer 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_compress.3 b/secure/lib/libcrypto/man/CMS_compress.3 index de38c3d..83fdd8a 100644 --- a/secure/lib/libcrypto/man/CMS_compress.3 +++ b/secure/lib/libcrypto/man/CMS_compress.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_compress 3" -.TH CMS_compress 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_compress 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_decrypt.3 b/secure/lib/libcrypto/man/CMS_decrypt.3 index d92e7ec..9bcd7b4 100644 --- a/secure/lib/libcrypto/man/CMS_decrypt.3 +++ b/secure/lib/libcrypto/man/CMS_decrypt.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_decrypt 3" -.TH CMS_decrypt 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_decrypt 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_encrypt.3 b/secure/lib/libcrypto/man/CMS_encrypt.3 index 2b8a62a..e841674 100644 --- a/secure/lib/libcrypto/man/CMS_encrypt.3 +++ b/secure/lib/libcrypto/man/CMS_encrypt.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_encrypt 3" -.TH CMS_encrypt 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_encrypt 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_final.3 b/secure/lib/libcrypto/man/CMS_final.3 index 0c3504a..57a431d 100644 --- a/secure/lib/libcrypto/man/CMS_final.3 +++ b/secure/lib/libcrypto/man/CMS_final.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_final 3" -.TH CMS_final 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_final 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 b/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 index 5b6f9c4..0e475f6 100644 --- a/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 +++ b/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_RecipientInfos 3" -.TH CMS_get0_RecipientInfos 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_get0_RecipientInfos 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 b/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 index d2fb282..de6c70b 100644 --- a/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 +++ b/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_SignerInfos 3" -.TH CMS_get0_SignerInfos 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_get0_SignerInfos 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_get0_type.3 b/secure/lib/libcrypto/man/CMS_get0_type.3 index a8ad3de..3610187 100644 --- a/secure/lib/libcrypto/man/CMS_get0_type.3 +++ b/secure/lib/libcrypto/man/CMS_get0_type.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_type 3" -.TH CMS_get0_type 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_get0_type 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 b/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 index e00bb30..eb4bcf1 100644 --- a/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 +++ b/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get1_ReceiptRequest 3" -.TH CMS_get1_ReceiptRequest 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_get1_ReceiptRequest 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_sign.3 b/secure/lib/libcrypto/man/CMS_sign.3 index 2d64721..b2f9edd 100644 --- a/secure/lib/libcrypto/man/CMS_sign.3 +++ b/secure/lib/libcrypto/man/CMS_sign.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign 3" -.TH CMS_sign 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_sign 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_sign_receipt.3 b/secure/lib/libcrypto/man/CMS_sign_receipt.3 index e584b35..a92e5c6 100644 --- a/secure/lib/libcrypto/man/CMS_sign_receipt.3 +++ b/secure/lib/libcrypto/man/CMS_sign_receipt.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign_receipt 3" -.TH CMS_sign_receipt 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_sign_receipt 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_uncompress.3 b/secure/lib/libcrypto/man/CMS_uncompress.3 index fee74a0..52020db 100644 --- a/secure/lib/libcrypto/man/CMS_uncompress.3 +++ b/secure/lib/libcrypto/man/CMS_uncompress.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_uncompress 3" -.TH CMS_uncompress 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_uncompress 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_verify.3 b/secure/lib/libcrypto/man/CMS_verify.3 index b637a12..8a27235 100644 --- a/secure/lib/libcrypto/man/CMS_verify.3 +++ b/secure/lib/libcrypto/man/CMS_verify.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify 3" -.TH CMS_verify 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_verify 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CMS_verify_receipt.3 b/secure/lib/libcrypto/man/CMS_verify_receipt.3 index c99ea40..9e3cbbd 100644 --- a/secure/lib/libcrypto/man/CMS_verify_receipt.3 +++ b/secure/lib/libcrypto/man/CMS_verify_receipt.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify_receipt 3" -.TH CMS_verify_receipt 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS_verify_receipt 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CONF_modules_free.3 b/secure/lib/libcrypto/man/CONF_modules_free.3 index f28e374..4510d54 100644 --- a/secure/lib/libcrypto/man/CONF_modules_free.3 +++ b/secure/lib/libcrypto/man/CONF_modules_free.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_free 3" -.TH CONF_modules_free 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CONF_modules_free 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CONF_modules_load_file.3 b/secure/lib/libcrypto/man/CONF_modules_load_file.3 index 7588765..df29da4 100644 --- a/secure/lib/libcrypto/man/CONF_modules_load_file.3 +++ b/secure/lib/libcrypto/man/CONF_modules_load_file.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_load_file 3" -.TH CONF_modules_load_file 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CONF_modules_load_file 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 b/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 index d976586..bcbb104 100644 --- a/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 +++ b/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CRYPTO_set_ex_data 3" -.TH CRYPTO_set_ex_data 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CRYPTO_set_ex_data 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DH_generate_key.3 b/secure/lib/libcrypto/man/DH_generate_key.3 index f6ff8eb..7954fcf 100644 --- a/secure/lib/libcrypto/man/DH_generate_key.3 +++ b/secure/lib/libcrypto/man/DH_generate_key.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_key 3" -.TH DH_generate_key 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DH_generate_key 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DH_generate_parameters.3 b/secure/lib/libcrypto/man/DH_generate_parameters.3 index 449c44c..7eebd53 100644 --- a/secure/lib/libcrypto/man/DH_generate_parameters.3 +++ b/secure/lib/libcrypto/man/DH_generate_parameters.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_parameters 3" -.TH DH_generate_parameters 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DH_generate_parameters 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DH_get_ex_new_index.3 b/secure/lib/libcrypto/man/DH_get_ex_new_index.3 index 0ccd48c..44695f0 100644 --- a/secure/lib/libcrypto/man/DH_get_ex_new_index.3 +++ b/secure/lib/libcrypto/man/DH_get_ex_new_index.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_get_ex_new_index 3" -.TH DH_get_ex_new_index 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DH_get_ex_new_index 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DH_new.3 b/secure/lib/libcrypto/man/DH_new.3 index 7af518e..e39da5b 100644 --- a/secure/lib/libcrypto/man/DH_new.3 +++ b/secure/lib/libcrypto/man/DH_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_new 3" -.TH DH_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DH_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DH_set_method.3 b/secure/lib/libcrypto/man/DH_set_method.3 index c46426e..3ac38c3 100644 --- a/secure/lib/libcrypto/man/DH_set_method.3 +++ b/secure/lib/libcrypto/man/DH_set_method.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_set_method 3" -.TH DH_set_method 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DH_set_method 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DH_size.3 b/secure/lib/libcrypto/man/DH_size.3 index b9c69bd..1b7093b 100644 --- a/secure/lib/libcrypto/man/DH_size.3 +++ b/secure/lib/libcrypto/man/DH_size.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_size 3" -.TH DH_size 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DH_size 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DSA_SIG_new.3 b/secure/lib/libcrypto/man/DSA_SIG_new.3 index 579016b..8212f50 100644 --- a/secure/lib/libcrypto/man/DSA_SIG_new.3 +++ b/secure/lib/libcrypto/man/DSA_SIG_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_SIG_new 3" -.TH DSA_SIG_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DSA_SIG_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DSA_do_sign.3 b/secure/lib/libcrypto/man/DSA_do_sign.3 index 0f39b3d..ce42ef7 100644 --- a/secure/lib/libcrypto/man/DSA_do_sign.3 +++ b/secure/lib/libcrypto/man/DSA_do_sign.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_do_sign 3" -.TH DSA_do_sign 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DSA_do_sign 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DSA_dup_DH.3 b/secure/lib/libcrypto/man/DSA_dup_DH.3 index 1b4f22b..6ab27a5 100644 --- a/secure/lib/libcrypto/man/DSA_dup_DH.3 +++ b/secure/lib/libcrypto/man/DSA_dup_DH.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_dup_DH 3" -.TH DSA_dup_DH 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DSA_dup_DH 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DSA_generate_key.3 b/secure/lib/libcrypto/man/DSA_generate_key.3 index 55146f1..2ca4acf 100644 --- a/secure/lib/libcrypto/man/DSA_generate_key.3 +++ b/secure/lib/libcrypto/man/DSA_generate_key.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_key 3" -.TH DSA_generate_key 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DSA_generate_key 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DSA_generate_parameters.3 b/secure/lib/libcrypto/man/DSA_generate_parameters.3 index 11fda15..e01fac1 100644 --- a/secure/lib/libcrypto/man/DSA_generate_parameters.3 +++ b/secure/lib/libcrypto/man/DSA_generate_parameters.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_parameters 3" -.TH DSA_generate_parameters 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DSA_generate_parameters 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 b/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 index 8c86784..06fe7d2 100644 --- a/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 +++ b/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_get_ex_new_index 3" -.TH DSA_get_ex_new_index 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DSA_get_ex_new_index 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DSA_new.3 b/secure/lib/libcrypto/man/DSA_new.3 index a477809..e18bc64 100644 --- a/secure/lib/libcrypto/man/DSA_new.3 +++ b/secure/lib/libcrypto/man/DSA_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_new 3" -.TH DSA_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DSA_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DSA_set_method.3 b/secure/lib/libcrypto/man/DSA_set_method.3 index e2d93e2..daaae1c 100644 --- a/secure/lib/libcrypto/man/DSA_set_method.3 +++ b/secure/lib/libcrypto/man/DSA_set_method.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_set_method 3" -.TH DSA_set_method 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DSA_set_method 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DSA_sign.3 b/secure/lib/libcrypto/man/DSA_sign.3 index bfc6e29..3a69b6c 100644 --- a/secure/lib/libcrypto/man/DSA_sign.3 +++ b/secure/lib/libcrypto/man/DSA_sign.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_sign 3" -.TH DSA_sign 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DSA_sign 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/DSA_size.3 b/secure/lib/libcrypto/man/DSA_size.3 index 8794c81..701331a 100644 --- a/secure/lib/libcrypto/man/DSA_size.3 +++ b/secure/lib/libcrypto/man/DSA_size.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_size 3" -.TH DSA_size 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DSA_size 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ERR_GET_LIB.3 b/secure/lib/libcrypto/man/ERR_GET_LIB.3 index 27fef14..87d0d43 100644 --- a/secure/lib/libcrypto/man/ERR_GET_LIB.3 +++ b/secure/lib/libcrypto/man/ERR_GET_LIB.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ERR_GET_LIB 3" -.TH ERR_GET_LIB 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ERR_GET_LIB 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ERR_clear_error.3 b/secure/lib/libcrypto/man/ERR_clear_error.3 index 8664205..2d47ccb 100644 --- a/secure/lib/libcrypto/man/ERR_clear_error.3 +++ b/secure/lib/libcrypto/man/ERR_clear_error.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ERR_clear_error 3" -.TH ERR_clear_error 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ERR_clear_error 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ERR_error_string.3 b/secure/lib/libcrypto/man/ERR_error_string.3 index 6376640..8bf0fff 100644 --- a/secure/lib/libcrypto/man/ERR_error_string.3 +++ b/secure/lib/libcrypto/man/ERR_error_string.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ERR_error_string 3" -.TH ERR_error_string 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ERR_error_string 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ERR_get_error.3 b/secure/lib/libcrypto/man/ERR_get_error.3 index 573e9f2..521ef38 100644 --- a/secure/lib/libcrypto/man/ERR_get_error.3 +++ b/secure/lib/libcrypto/man/ERR_get_error.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ERR_get_error 3" -.TH ERR_get_error 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ERR_get_error 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 b/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 index f15d4ad..23f9bb4 100644 --- a/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 +++ b/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ERR_load_crypto_strings 3" -.TH ERR_load_crypto_strings 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ERR_load_crypto_strings 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ERR_load_strings.3 b/secure/lib/libcrypto/man/ERR_load_strings.3 index d645ab8..b91ac79 100644 --- a/secure/lib/libcrypto/man/ERR_load_strings.3 +++ b/secure/lib/libcrypto/man/ERR_load_strings.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ERR_load_strings 3" -.TH ERR_load_strings 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ERR_load_strings 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ERR_print_errors.3 b/secure/lib/libcrypto/man/ERR_print_errors.3 index 721938e..9534383 100644 --- a/secure/lib/libcrypto/man/ERR_print_errors.3 +++ b/secure/lib/libcrypto/man/ERR_print_errors.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ERR_print_errors 3" -.TH ERR_print_errors 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ERR_print_errors 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ERR_put_error.3 b/secure/lib/libcrypto/man/ERR_put_error.3 index 7bddf86..555c614 100644 --- a/secure/lib/libcrypto/man/ERR_put_error.3 +++ b/secure/lib/libcrypto/man/ERR_put_error.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ERR_put_error 3" -.TH ERR_put_error 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ERR_put_error 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ERR_remove_state.3 b/secure/lib/libcrypto/man/ERR_remove_state.3 index a2aa8e2..bb71fb3 100644 --- a/secure/lib/libcrypto/man/ERR_remove_state.3 +++ b/secure/lib/libcrypto/man/ERR_remove_state.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ERR_remove_state 3" -.TH ERR_remove_state 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ERR_remove_state 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ERR_set_mark.3 b/secure/lib/libcrypto/man/ERR_set_mark.3 index 3651fc0..ce45b2d 100644 --- a/secure/lib/libcrypto/man/ERR_set_mark.3 +++ b/secure/lib/libcrypto/man/ERR_set_mark.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ERR_set_mark 3" -.TH ERR_set_mark 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ERR_set_mark 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_BytesToKey.3 b/secure/lib/libcrypto/man/EVP_BytesToKey.3 index d84614d..32c7a32 100644 --- a/secure/lib/libcrypto/man/EVP_BytesToKey.3 +++ b/secure/lib/libcrypto/man/EVP_BytesToKey.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_BytesToKey 3" -.TH EVP_BytesToKey 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_BytesToKey 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_DigestInit.3 b/secure/lib/libcrypto/man/EVP_DigestInit.3 index 433e7a0..4590bfe 100644 --- a/secure/lib/libcrypto/man/EVP_DigestInit.3 +++ b/secure/lib/libcrypto/man/EVP_DigestInit.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_DigestInit 3" -.TH EVP_DigestInit 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_DigestInit 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_DigestSignInit.3 b/secure/lib/libcrypto/man/EVP_DigestSignInit.3 index 6c6a950..6066a59 100644 --- a/secure/lib/libcrypto/man/EVP_DigestSignInit.3 +++ b/secure/lib/libcrypto/man/EVP_DigestSignInit.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_DigestSignInit 3" -.TH EVP_DigestSignInit 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_DigestSignInit 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 b/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 index e386873..2de6919 100644 --- a/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 +++ b/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_DigestVerifyInit 3" -.TH EVP_DigestVerifyInit 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_DigestVerifyInit 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_EncodeInit.3 b/secure/lib/libcrypto/man/EVP_EncodeInit.3 new file mode 100644 index 0000000..d664100 --- /dev/null +++ b/secure/lib/libcrypto/man/EVP_EncodeInit.3 @@ -0,0 +1,260 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.30) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "EVP_EncodeInit 3" +.TH EVP_EncodeInit 3 "2016-05-03" "1.0.1t" "OpenSSL" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +EVP_EncodeInit, EVP_EncodeUpdate, EVP_EncodeFinal, EVP_EncodeBlock, +EVP_DecodeInit, EVP_DecodeUpdate, EVP_DecodeFinal, EVP_DecodeBlock \- EVP base 64 +encode/decode routines +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& #include <openssl/evp.h> +\& +\& void EVP_EncodeInit(EVP_ENCODE_CTX *ctx); +\& void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, +\& const unsigned char *in, int inl); +\& void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl); +\& int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n); +\& +\& void EVP_DecodeInit(EVP_ENCODE_CTX *ctx); +\& int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, +\& const unsigned char *in, int inl); +\& int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned +\& char *out, int *outl); +\& int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +The \s-1EVP\s0 encode routines provide a high level interface to base 64 encoding and +decoding. Base 64 encoding converts binary data into a printable form that uses +the characters A\-Z, a\-z, 0\-9, \*(L"+\*(R" and \*(L"/\*(R" to represent the data. For every 3 +bytes of binary data provided 4 bytes of base 64 encoded data will be produced +plus some occasional newlines (see below). If the input data length is not a +multiple of 3 then the output data will be padded at the end using the \*(L"=\*(R" +character. +.PP +Encoding of binary data is performed in blocks of 48 input bytes (or less for +the final block). For each 48 byte input block encoded 64 bytes of base 64 data +is output plus an additional newline character (i.e. 65 bytes in total). The +final block (which may be less than 48 bytes) will output 4 bytes for every 3 +bytes of input. If the data length is not divisible by 3 then a full 4 bytes is +still output for the final 1 or 2 bytes of input. Similarly a newline character +will also be output. +.PP +\&\fIEVP_EncodeInit()\fR initialises \fBctx\fR for the start of a new encoding operation. +.PP +\&\fIEVP_EncodeUpdate()\fR encode \fBinl\fR bytes of data found in the buffer pointed to by +\&\fBin\fR. The output is stored in the buffer \fBout\fR and the number of bytes output +is stored in \fB*outl\fR. It is the caller's responsibility to ensure that the +buffer at \fBout\fR is sufficiently large to accommodate the output data. Only full +blocks of data (48 bytes) will be immediately processed and output by this +function. Any remainder is held in the \fBctx\fR object and will be processed by a +subsequent call to \fIEVP_EncodeUpdate()\fR or \fIEVP_EncodeFinal()\fR. To calculate the +required size of the output buffer add together the value of \fBinl\fR with the +amount of unprocessed data held in \fBctx\fR and divide the result by 48 (ignore +any remainder). This gives the number of blocks of data that will be processed. +Ensure the output buffer contains 65 bytes of storage for each block, plus an +additional byte for a \s-1NUL\s0 terminator. \fIEVP_EncodeUpdate()\fR may be called +repeatedly to process large amounts of input data. In the event of an error +\&\fIEVP_EncodeUpdate()\fR will set \fB*outl\fR to 0. +.PP +\&\fIEVP_EncodeFinal()\fR must be called at the end of an encoding operation. It will +process any partial block of data remaining in the \fBctx\fR object. The output +data will be stored in \fBout\fR and the length of the data written will be stored +in \fB*outl\fR. It is the caller's responsibility to ensure that \fBout\fR is +sufficiently large to accommodate the output data which will never be more than +65 bytes plus an additional \s-1NUL\s0 terminator (i.e. 66 bytes in total). +.PP +\&\fIEVP_EncodeBlock()\fR encodes a full block of input data in \fBf\fR and of length +\&\fBdlen\fR and stores it in \fBt\fR. For every 3 bytes of input provided 4 bytes of +output data will be produced. If \fBdlen\fR is not divisible by 3 then the block is +encoded as a final block of data and the output is padded such that it is always +divisible by 4. Additionally a \s-1NUL\s0 terminator character will be added. For +example if 16 bytes of input data is provided then 24 bytes of encoded data is +created plus 1 byte for a \s-1NUL\s0 terminator (i.e. 25 bytes in total). The length of +the data generated \fIwithout\fR the \s-1NUL\s0 terminator is returned from the function. +.PP +\&\fIEVP_DecodeInit()\fR initialises \fBctx\fR for the start of a new decoding operation. +.PP +\&\fIEVP_DecodeUpdate()\fR decodes \fBinl\fR characters of data found in the buffer pointed +to by \fBin\fR. The output is stored in the buffer \fBout\fR and the number of bytes +output is stored in \fB*outl\fR. It is the caller's responsibility to ensure that +the buffer at \fBout\fR is sufficiently large to accommodate the output data. This +function will attempt to decode as much data as possible in 4 byte chunks. Any +whitespace, newline or carriage return characters are ignored. Any partial chunk +of unprocessed data (1, 2 or 3 bytes) that remains at the end will be held in +the \fBctx\fR object and processed by a subsequent call to \fIEVP_DecodeUpdate()\fR. If +any illegal base 64 characters are encountered or if the base 64 padding +character \*(L"=\*(R" is encountered in the middle of the data then the function returns +\&\-1 to indicate an error. A return value of 0 or 1 indicates successful +processing of the data. A return value of 0 additionally indicates that the last +input data characters processed included the base 64 padding character \*(L"=\*(R" and +therefore no more non-padding character data is expected to be processed. For +every 4 valid base 64 bytes processed (ignoring whitespace, carriage returns and +line feeds), 3 bytes of binary output data will be produced (or less at the end +of the data where the padding character \*(L"=\*(R" has been used). +.PP +\&\fIEVP_DecodeFinal()\fR must be called at the end of a decoding operation. If there +is any unprocessed data still in \fBctx\fR then the input data must not have been +a multiple of 4 and therefore an error has occurred. The function will return \-1 +in this case. Otherwise the function returns 1 on success. +.PP +\&\fIEVP_DecodeBlock()\fR will decode the block of \fBn\fR characters of base 64 data +contained in \fBf\fR and store the result in \fBt\fR. Any leading whitespace will be +trimmed as will any trailing whitespace, newlines, carriage returns or \s-1EOF\s0 +characters. After such trimming the length of the data in \fBf\fR must be divisbile +by 4. For every 4 input bytes exactly 3 output bytes will be produced. The +output will be padded with 0 bits if necessary to ensure that the output is +always 3 bytes for every 4 input bytes. This function will return the length of +the data decoded or \-1 on error. +.SH "RETURN VALUES" +.IX Header "RETURN VALUES" +\&\fIEVP_EncodeBlock()\fR returns the number of bytes encoded excluding the \s-1NUL\s0 +terminator. +.PP +\&\fIEVP_DecodeUpdate()\fR returns \-1 on error and 0 or 1 on success. If 0 is returned +then no more non-padding base 64 characters are expected. +.PP +\&\fIEVP_DecodeFinal()\fR returns \-1 on error or 1 on success. +.PP +\&\fIEVP_DecodeBlock()\fR returns the length of the data decoded or \-1 on error. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fIevp\fR\|(3) diff --git a/secure/lib/libcrypto/man/EVP_EncryptInit.3 b/secure/lib/libcrypto/man/EVP_EncryptInit.3 index ca9aa37..5135fd2 100644 --- a/secure/lib/libcrypto/man/EVP_EncryptInit.3 +++ b/secure/lib/libcrypto/man/EVP_EncryptInit.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_EncryptInit 3" -.TH EVP_EncryptInit 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_EncryptInit 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_OpenInit.3 b/secure/lib/libcrypto/man/EVP_OpenInit.3 index 2a65aa1..2dac78f 100644 --- a/secure/lib/libcrypto/man/EVP_OpenInit.3 +++ b/secure/lib/libcrypto/man/EVP_OpenInit.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_OpenInit 3" -.TH EVP_OpenInit 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_OpenInit 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 b/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 index a96cac1..5b3b1ca 100644 --- a/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 +++ b/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_CTX_ctrl 3" -.TH EVP_PKEY_CTX_ctrl 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_PKEY_CTX_ctrl 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 b/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 index ac13bab..c1fc15c 100644 --- a/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 +++ b/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_CTX_new 3" -.TH EVP_PKEY_CTX_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_PKEY_CTX_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 b/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 index 933022e..070f96a 100644 --- a/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 +++ b/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_cmp 3" -.TH EVP_PKEY_cmp 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_PKEY_cmp 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 b/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 index 73e91b9..67ec3df 100644 --- a/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 +++ b/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_decrypt 3" -.TH EVP_PKEY_decrypt 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_PKEY_decrypt 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_PKEY_derive.3 b/secure/lib/libcrypto/man/EVP_PKEY_derive.3 index 7d0610e..72db57c 100644 --- a/secure/lib/libcrypto/man/EVP_PKEY_derive.3 +++ b/secure/lib/libcrypto/man/EVP_PKEY_derive.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_derive 3" -.TH EVP_PKEY_derive 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_PKEY_derive 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 b/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 index 0e4a2e2..47fb4a5 100644 --- a/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 +++ b/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_encrypt 3" -.TH EVP_PKEY_encrypt 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_PKEY_encrypt 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 b/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 index 213ee8f..bb2555e 100644 --- a/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 +++ b/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_get_default_digest 3" -.TH EVP_PKEY_get_default_digest 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_PKEY_get_default_digest 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 b/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 index a89e2e2..14bb8a2 100644 --- a/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 +++ b/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_keygen 3" -.TH EVP_PKEY_keygen 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_PKEY_keygen 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_PKEY_new.3 b/secure/lib/libcrypto/man/EVP_PKEY_new.3 index e3f91d1..c45ac3f 100644 --- a/secure/lib/libcrypto/man/EVP_PKEY_new.3 +++ b/secure/lib/libcrypto/man/EVP_PKEY_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_new 3" -.TH EVP_PKEY_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_PKEY_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 b/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 index c4551f6..81ae3fd 100644 --- a/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 +++ b/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_print_private 3" -.TH EVP_PKEY_print_private 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_PKEY_print_private 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 b/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 index a0a4752..f003a22 100644 --- a/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 +++ b/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_set1_RSA 3" -.TH EVP_PKEY_set1_RSA 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_PKEY_set1_RSA 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_PKEY_sign.3 b/secure/lib/libcrypto/man/EVP_PKEY_sign.3 index 5eb4c32..66d1fab 100644 --- a/secure/lib/libcrypto/man/EVP_PKEY_sign.3 +++ b/secure/lib/libcrypto/man/EVP_PKEY_sign.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_sign 3" -.TH EVP_PKEY_sign 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_PKEY_sign 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_PKEY_verify.3 b/secure/lib/libcrypto/man/EVP_PKEY_verify.3 index 6fe6a46..bb925ee 100644 --- a/secure/lib/libcrypto/man/EVP_PKEY_verify.3 +++ b/secure/lib/libcrypto/man/EVP_PKEY_verify.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_verify 3" -.TH EVP_PKEY_verify 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_PKEY_verify 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 b/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 index 2365c7e..ef4081c 100644 --- a/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 +++ b/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_PKEY_verify_recover 3" -.TH EVP_PKEY_verify_recover 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_PKEY_verify_recover 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_SealInit.3 b/secure/lib/libcrypto/man/EVP_SealInit.3 index e118a06..c042dc7 100644 --- a/secure/lib/libcrypto/man/EVP_SealInit.3 +++ b/secure/lib/libcrypto/man/EVP_SealInit.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_SealInit 3" -.TH EVP_SealInit 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_SealInit 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_SignInit.3 b/secure/lib/libcrypto/man/EVP_SignInit.3 index 6b78a03..6d79de3 100644 --- a/secure/lib/libcrypto/man/EVP_SignInit.3 +++ b/secure/lib/libcrypto/man/EVP_SignInit.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_SignInit 3" -.TH EVP_SignInit 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_SignInit 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/EVP_VerifyInit.3 b/secure/lib/libcrypto/man/EVP_VerifyInit.3 index c53e7e5..567546d 100644 --- a/secure/lib/libcrypto/man/EVP_VerifyInit.3 +++ b/secure/lib/libcrypto/man/EVP_VerifyInit.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EVP_VerifyInit 3" -.TH EVP_VerifyInit 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EVP_VerifyInit 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/OBJ_nid2obj.3 b/secure/lib/libcrypto/man/OBJ_nid2obj.3 index 16923e5..01e7925 100644 --- a/secure/lib/libcrypto/man/OBJ_nid2obj.3 +++ b/secure/lib/libcrypto/man/OBJ_nid2obj.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "OBJ_nid2obj 3" -.TH OBJ_nid2obj 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH OBJ_nid2obj 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/OPENSSL_Applink.3 b/secure/lib/libcrypto/man/OPENSSL_Applink.3 index 3056a7e..dd3f7a6 100644 --- a/secure/lib/libcrypto/man/OPENSSL_Applink.3 +++ b/secure/lib/libcrypto/man/OPENSSL_Applink.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_Applink 3" -.TH OPENSSL_Applink 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH OPENSSL_Applink 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 b/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 index de2cefc..98f8a2e 100644 --- a/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 +++ b/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_VERSION_NUMBER 3" -.TH OPENSSL_VERSION_NUMBER 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH OPENSSL_VERSION_NUMBER 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/OPENSSL_config.3 b/secure/lib/libcrypto/man/OPENSSL_config.3 index a600a4d..978d561 100644 --- a/secure/lib/libcrypto/man/OPENSSL_config.3 +++ b/secure/lib/libcrypto/man/OPENSSL_config.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_config 3" -.TH OPENSSL_config 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH OPENSSL_config 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 b/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 index 99947bf..c41f78b 100644 --- a/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 +++ b/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_ia32cap 3" -.TH OPENSSL_ia32cap 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH OPENSSL_ia32cap 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 b/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 index 803a542..18fa6f5 100644 --- a/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 +++ b/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL_load_builtin_modules 3" -.TH OPENSSL_load_builtin_modules 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH OPENSSL_load_builtin_modules 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 b/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 index 9efc471..78cb3f3 100644 --- a/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 +++ b/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "OpenSSL_add_all_algorithms 3" -.TH OpenSSL_add_all_algorithms 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH OpenSSL_add_all_algorithms 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 b/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 index 58f4fa9..1e23b62 100644 --- a/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 +++ b/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PEM_write_bio_CMS_stream 3" -.TH PEM_write_bio_CMS_stream 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PEM_write_bio_CMS_stream 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 b/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 index 4a61968..fcdb3bc 100644 --- a/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 +++ b/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PEM_write_bio_PKCS7_stream 3" -.TH PEM_write_bio_PKCS7_stream 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PEM_write_bio_PKCS7_stream 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/PKCS12_create.3 b/secure/lib/libcrypto/man/PKCS12_create.3 index 5b3095d..b866d6a 100644 --- a/secure/lib/libcrypto/man/PKCS12_create.3 +++ b/secure/lib/libcrypto/man/PKCS12_create.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PKCS12_create 3" -.TH PKCS12_create 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PKCS12_create 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/PKCS12_parse.3 b/secure/lib/libcrypto/man/PKCS12_parse.3 index b3adbd6..98e7a53 100644 --- a/secure/lib/libcrypto/man/PKCS12_parse.3 +++ b/secure/lib/libcrypto/man/PKCS12_parse.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PKCS12_parse 3" -.TH PKCS12_parse 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PKCS12_parse 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/PKCS7_decrypt.3 b/secure/lib/libcrypto/man/PKCS7_decrypt.3 index 2879dbc..71be8c2 100644 --- a/secure/lib/libcrypto/man/PKCS7_decrypt.3 +++ b/secure/lib/libcrypto/man/PKCS7_decrypt.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PKCS7_decrypt 3" -.TH PKCS7_decrypt 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PKCS7_decrypt 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/PKCS7_encrypt.3 b/secure/lib/libcrypto/man/PKCS7_encrypt.3 index 293ad7d..39585ed 100644 --- a/secure/lib/libcrypto/man/PKCS7_encrypt.3 +++ b/secure/lib/libcrypto/man/PKCS7_encrypt.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PKCS7_encrypt 3" -.TH PKCS7_encrypt 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PKCS7_encrypt 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/PKCS7_sign.3 b/secure/lib/libcrypto/man/PKCS7_sign.3 index 748fe72..a997b77 100644 --- a/secure/lib/libcrypto/man/PKCS7_sign.3 +++ b/secure/lib/libcrypto/man/PKCS7_sign.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PKCS7_sign 3" -.TH PKCS7_sign 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PKCS7_sign 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 b/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 index 082371f..72b3c43 100644 --- a/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 +++ b/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PKCS7_sign_add_signer 3" -.TH PKCS7_sign_add_signer 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PKCS7_sign_add_signer 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/PKCS7_verify.3 b/secure/lib/libcrypto/man/PKCS7_verify.3 index 06d9001..7455401 100644 --- a/secure/lib/libcrypto/man/PKCS7_verify.3 +++ b/secure/lib/libcrypto/man/PKCS7_verify.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PKCS7_verify 3" -.TH PKCS7_verify 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PKCS7_verify 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RAND_add.3 b/secure/lib/libcrypto/man/RAND_add.3 index ef5d292..f1aa6ec 100644 --- a/secure/lib/libcrypto/man/RAND_add.3 +++ b/secure/lib/libcrypto/man/RAND_add.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RAND_add 3" -.TH RAND_add 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RAND_add 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RAND_bytes.3 b/secure/lib/libcrypto/man/RAND_bytes.3 index 6cc74cd..a189af0 100644 --- a/secure/lib/libcrypto/man/RAND_bytes.3 +++ b/secure/lib/libcrypto/man/RAND_bytes.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RAND_bytes 3" -.TH RAND_bytes 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RAND_bytes 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RAND_cleanup.3 b/secure/lib/libcrypto/man/RAND_cleanup.3 index 305952b..3fcebfa 100644 --- a/secure/lib/libcrypto/man/RAND_cleanup.3 +++ b/secure/lib/libcrypto/man/RAND_cleanup.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RAND_cleanup 3" -.TH RAND_cleanup 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RAND_cleanup 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RAND_egd.3 b/secure/lib/libcrypto/man/RAND_egd.3 index 3505617..5f11398 100644 --- a/secure/lib/libcrypto/man/RAND_egd.3 +++ b/secure/lib/libcrypto/man/RAND_egd.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RAND_egd 3" -.TH RAND_egd 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RAND_egd 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RAND_load_file.3 b/secure/lib/libcrypto/man/RAND_load_file.3 index 008af40..05bdf0e 100644 --- a/secure/lib/libcrypto/man/RAND_load_file.3 +++ b/secure/lib/libcrypto/man/RAND_load_file.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RAND_load_file 3" -.TH RAND_load_file 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RAND_load_file 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RAND_set_rand_method.3 b/secure/lib/libcrypto/man/RAND_set_rand_method.3 index eeec70f..d0794fe 100644 --- a/secure/lib/libcrypto/man/RAND_set_rand_method.3 +++ b/secure/lib/libcrypto/man/RAND_set_rand_method.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RAND_set_rand_method 3" -.TH RAND_set_rand_method 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RAND_set_rand_method 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RSA_blinding_on.3 b/secure/lib/libcrypto/man/RSA_blinding_on.3 index 1e6abbb..699d644 100644 --- a/secure/lib/libcrypto/man/RSA_blinding_on.3 +++ b/secure/lib/libcrypto/man/RSA_blinding_on.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSA_blinding_on 3" -.TH RSA_blinding_on 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSA_blinding_on 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RSA_check_key.3 b/secure/lib/libcrypto/man/RSA_check_key.3 index b29d191..ec5363d 100644 --- a/secure/lib/libcrypto/man/RSA_check_key.3 +++ b/secure/lib/libcrypto/man/RSA_check_key.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSA_check_key 3" -.TH RSA_check_key 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSA_check_key 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RSA_generate_key.3 b/secure/lib/libcrypto/man/RSA_generate_key.3 index 767819f..ee5dbc3 100644 --- a/secure/lib/libcrypto/man/RSA_generate_key.3 +++ b/secure/lib/libcrypto/man/RSA_generate_key.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSA_generate_key 3" -.TH RSA_generate_key 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSA_generate_key 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 b/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 index b019d5e..4156913 100644 --- a/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 +++ b/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSA_get_ex_new_index 3" -.TH RSA_get_ex_new_index 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSA_get_ex_new_index 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RSA_new.3 b/secure/lib/libcrypto/man/RSA_new.3 index 60b4618..40a6623 100644 --- a/secure/lib/libcrypto/man/RSA_new.3 +++ b/secure/lib/libcrypto/man/RSA_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSA_new 3" -.TH RSA_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSA_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 b/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 index 1ff1ab2..735ab17 100644 --- a/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 +++ b/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSA_padding_add_PKCS1_type_1 3" -.TH RSA_padding_add_PKCS1_type_1 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSA_padding_add_PKCS1_type_1 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RSA_print.3 b/secure/lib/libcrypto/man/RSA_print.3 index 5aadfac..8ce6894 100644 --- a/secure/lib/libcrypto/man/RSA_print.3 +++ b/secure/lib/libcrypto/man/RSA_print.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSA_print 3" -.TH RSA_print 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSA_print 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RSA_private_encrypt.3 b/secure/lib/libcrypto/man/RSA_private_encrypt.3 index c3b2826..cecf181 100644 --- a/secure/lib/libcrypto/man/RSA_private_encrypt.3 +++ b/secure/lib/libcrypto/man/RSA_private_encrypt.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSA_private_encrypt 3" -.TH RSA_private_encrypt 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSA_private_encrypt 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RSA_public_encrypt.3 b/secure/lib/libcrypto/man/RSA_public_encrypt.3 index 21e8b4d..40d5eea 100644 --- a/secure/lib/libcrypto/man/RSA_public_encrypt.3 +++ b/secure/lib/libcrypto/man/RSA_public_encrypt.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSA_public_encrypt 3" -.TH RSA_public_encrypt 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSA_public_encrypt 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RSA_set_method.3 b/secure/lib/libcrypto/man/RSA_set_method.3 index 065aa78..762607b 100644 --- a/secure/lib/libcrypto/man/RSA_set_method.3 +++ b/secure/lib/libcrypto/man/RSA_set_method.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSA_set_method 3" -.TH RSA_set_method 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSA_set_method 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RSA_sign.3 b/secure/lib/libcrypto/man/RSA_sign.3 index 9086fd5..4a0c8b8 100644 --- a/secure/lib/libcrypto/man/RSA_sign.3 +++ b/secure/lib/libcrypto/man/RSA_sign.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSA_sign 3" -.TH RSA_sign 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSA_sign 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 b/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 index 2bf8252..f2ab036 100644 --- a/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 +++ b/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSA_sign_ASN1_OCTET_STRING 3" -.TH RSA_sign_ASN1_OCTET_STRING 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSA_sign_ASN1_OCTET_STRING 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/RSA_size.3 b/secure/lib/libcrypto/man/RSA_size.3 index 62e8bf7..a02e55a 100644 --- a/secure/lib/libcrypto/man/RSA_size.3 +++ b/secure/lib/libcrypto/man/RSA_size.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSA_size 3" -.TH RSA_size 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSA_size 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/SMIME_read_CMS.3 b/secure/lib/libcrypto/man/SMIME_read_CMS.3 index a560cab..f17fe12 100644 --- a/secure/lib/libcrypto/man/SMIME_read_CMS.3 +++ b/secure/lib/libcrypto/man/SMIME_read_CMS.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SMIME_read_CMS 3" -.TH SMIME_read_CMS 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SMIME_read_CMS 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 b/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 index cf32d29..cd7e7cc 100644 --- a/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 +++ b/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SMIME_read_PKCS7 3" -.TH SMIME_read_PKCS7 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SMIME_read_PKCS7 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/SMIME_write_CMS.3 b/secure/lib/libcrypto/man/SMIME_write_CMS.3 index 6e43e82..90b20dc 100644 --- a/secure/lib/libcrypto/man/SMIME_write_CMS.3 +++ b/secure/lib/libcrypto/man/SMIME_write_CMS.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SMIME_write_CMS 3" -.TH SMIME_write_CMS 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SMIME_write_CMS 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 b/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 index 8ae55fa..b0b43a3 100644 --- a/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 +++ b/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SMIME_write_PKCS7 3" -.TH SMIME_write_PKCS7 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SMIME_write_PKCS7 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 b/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 index dbef423..abc968a 100644 --- a/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 +++ b/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509_NAME_ENTRY_get_object 3" -.TH X509_NAME_ENTRY_get_object 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH X509_NAME_ENTRY_get_object 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 b/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 index be67097..9555314 100644 --- a/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 +++ b/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509_NAME_add_entry_by_txt 3" -.TH X509_NAME_add_entry_by_txt 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH X509_NAME_add_entry_by_txt 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 b/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 index a91e863..74bdf2c 100644 --- a/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 +++ b/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509_NAME_get_index_by_NID 3" -.TH X509_NAME_get_index_by_NID 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH X509_NAME_get_index_by_NID 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/X509_NAME_print_ex.3 b/secure/lib/libcrypto/man/X509_NAME_print_ex.3 index 97f3e8e..f9ba8b4 100644 --- a/secure/lib/libcrypto/man/X509_NAME_print_ex.3 +++ b/secure/lib/libcrypto/man/X509_NAME_print_ex.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509_NAME_print_ex 3" -.TH X509_NAME_print_ex 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH X509_NAME_print_ex 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 b/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 index b4170f5..34ad24c 100644 --- a/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 +++ b/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509_STORE_CTX_get_error 3" -.TH X509_STORE_CTX_get_error 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH X509_STORE_CTX_get_error 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 b/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 index dcd34e8..0f5965e 100644 --- a/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 +++ b/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509_STORE_CTX_get_ex_new_index 3" -.TH X509_STORE_CTX_get_ex_new_index 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH X509_STORE_CTX_get_ex_new_index 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 b/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 index 5d4b695..8b583e8 100644 --- a/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 +++ b/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509_STORE_CTX_new 3" -.TH X509_STORE_CTX_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH X509_STORE_CTX_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 b/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 index d39bb42..3f1d166 100644 --- a/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 +++ b/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509_STORE_CTX_set_verify_cb 3" -.TH X509_STORE_CTX_set_verify_cb 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH X509_STORE_CTX_set_verify_cb 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 b/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 index b9ac966..d03eeab 100644 --- a/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 +++ b/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509_STORE_set_verify_cb_func 3" -.TH X509_STORE_set_verify_cb_func 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH X509_STORE_set_verify_cb_func 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 b/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 index c062690..6ac8a7a 100644 --- a/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 +++ b/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509_VERIFY_PARAM_set_flags 3" -.TH X509_VERIFY_PARAM_set_flags 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH X509_VERIFY_PARAM_set_flags 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/X509_new.3 b/secure/lib/libcrypto/man/X509_new.3 index b9c76c5..2cda17a 100644 --- a/secure/lib/libcrypto/man/X509_new.3 +++ b/secure/lib/libcrypto/man/X509_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509_new 3" -.TH X509_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH X509_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/X509_verify_cert.3 b/secure/lib/libcrypto/man/X509_verify_cert.3 index 531e603..6fc6956 100644 --- a/secure/lib/libcrypto/man/X509_verify_cert.3 +++ b/secure/lib/libcrypto/man/X509_verify_cert.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509_verify_cert 3" -.TH X509_verify_cert 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH X509_verify_cert 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/bio.3 b/secure/lib/libcrypto/man/bio.3 index 9791f22..c4eef70 100644 --- a/secure/lib/libcrypto/man/bio.3 +++ b/secure/lib/libcrypto/man/bio.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "bio 3" -.TH bio 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH bio 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/blowfish.3 b/secure/lib/libcrypto/man/blowfish.3 index 858f81c..9fcc7c6 100644 --- a/secure/lib/libcrypto/man/blowfish.3 +++ b/secure/lib/libcrypto/man/blowfish.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "blowfish 3" -.TH blowfish 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH blowfish 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/bn.3 b/secure/lib/libcrypto/man/bn.3 index c233f2a..f569b26 100644 --- a/secure/lib/libcrypto/man/bn.3 +++ b/secure/lib/libcrypto/man/bn.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "bn 3" -.TH bn 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH bn 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/bn_internal.3 b/secure/lib/libcrypto/man/bn_internal.3 index 2dcb15a..e8d86b1 100644 --- a/secure/lib/libcrypto/man/bn_internal.3 +++ b/secure/lib/libcrypto/man/bn_internal.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "bn_internal 3" -.TH bn_internal 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH bn_internal 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/buffer.3 b/secure/lib/libcrypto/man/buffer.3 index 85c60d3..c72cdba 100644 --- a/secure/lib/libcrypto/man/buffer.3 +++ b/secure/lib/libcrypto/man/buffer.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "buffer 3" -.TH buffer 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH buffer 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/crypto.3 b/secure/lib/libcrypto/man/crypto.3 index 028787a..8aabb39 100644 --- a/secure/lib/libcrypto/man/crypto.3 +++ b/secure/lib/libcrypto/man/crypto.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "crypto 3" -.TH crypto 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH crypto 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 b/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 index 52dab42..b248d7c 100644 --- a/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 +++ b/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "d2i_ASN1_OBJECT 3" -.TH d2i_ASN1_OBJECT 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH d2i_ASN1_OBJECT 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 b/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 index ec3dc56..ee3a7a3 100644 --- a/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 +++ b/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "d2i_CMS_ContentInfo 3" -.TH d2i_CMS_ContentInfo 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH d2i_CMS_ContentInfo 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/d2i_DHparams.3 b/secure/lib/libcrypto/man/d2i_DHparams.3 index aca4002..7610971 100644 --- a/secure/lib/libcrypto/man/d2i_DHparams.3 +++ b/secure/lib/libcrypto/man/d2i_DHparams.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "d2i_DHparams 3" -.TH d2i_DHparams 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH d2i_DHparams 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 b/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 index d7db90e..454bc3c 100644 --- a/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 +++ b/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "d2i_DSAPublicKey 3" -.TH d2i_DSAPublicKey 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH d2i_DSAPublicKey 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 b/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 index 910abc5..a0bce99 100644 --- a/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 +++ b/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "d2i_ECPrivateKey 3" -.TH d2i_ECPrivateKey 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH d2i_ECPrivateKey 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 b/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 index 3c141b5..f75e6b0 100644 --- a/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 +++ b/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "d2i_PKCS8PrivateKey 3" -.TH d2i_PKCS8PrivateKey 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH d2i_PKCS8PrivateKey 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 b/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 index 158f1cf..7d37dc5 100644 --- a/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 +++ b/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "d2i_RSAPublicKey 3" -.TH d2i_RSAPublicKey 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH d2i_RSAPublicKey 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/d2i_X509.3 b/secure/lib/libcrypto/man/d2i_X509.3 index 40cff97..7717487 100644 --- a/secure/lib/libcrypto/man/d2i_X509.3 +++ b/secure/lib/libcrypto/man/d2i_X509.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "d2i_X509 3" -.TH d2i_X509 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH d2i_X509 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 b/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 index 2aa0eac..8dc3b23 100644 --- a/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 +++ b/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "d2i_X509_ALGOR 3" -.TH d2i_X509_ALGOR 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH d2i_X509_ALGOR 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/d2i_X509_CRL.3 b/secure/lib/libcrypto/man/d2i_X509_CRL.3 index 5683a8c..de25bb9 100644 --- a/secure/lib/libcrypto/man/d2i_X509_CRL.3 +++ b/secure/lib/libcrypto/man/d2i_X509_CRL.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "d2i_X509_CRL 3" -.TH d2i_X509_CRL 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH d2i_X509_CRL 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/d2i_X509_NAME.3 b/secure/lib/libcrypto/man/d2i_X509_NAME.3 index 628656b..5c65167 100644 --- a/secure/lib/libcrypto/man/d2i_X509_NAME.3 +++ b/secure/lib/libcrypto/man/d2i_X509_NAME.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "d2i_X509_NAME 3" -.TH d2i_X509_NAME 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH d2i_X509_NAME 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/d2i_X509_REQ.3 b/secure/lib/libcrypto/man/d2i_X509_REQ.3 index e1a406a..9cdfb16 100644 --- a/secure/lib/libcrypto/man/d2i_X509_REQ.3 +++ b/secure/lib/libcrypto/man/d2i_X509_REQ.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "d2i_X509_REQ 3" -.TH d2i_X509_REQ 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH d2i_X509_REQ 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/d2i_X509_SIG.3 b/secure/lib/libcrypto/man/d2i_X509_SIG.3 index 4354cf3..5f1b381 100644 --- a/secure/lib/libcrypto/man/d2i_X509_SIG.3 +++ b/secure/lib/libcrypto/man/d2i_X509_SIG.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "d2i_X509_SIG 3" -.TH d2i_X509_SIG 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH d2i_X509_SIG 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/des.3 b/secure/lib/libcrypto/man/des.3 index dd22909..2e40f24 100644 --- a/secure/lib/libcrypto/man/des.3 +++ b/secure/lib/libcrypto/man/des.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "des 3" -.TH des 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH des 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/dh.3 b/secure/lib/libcrypto/man/dh.3 index cd0dec4..402e530 100644 --- a/secure/lib/libcrypto/man/dh.3 +++ b/secure/lib/libcrypto/man/dh.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "dh 3" -.TH dh 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH dh 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/dsa.3 b/secure/lib/libcrypto/man/dsa.3 index 0f0debb..5e4c0eb 100644 --- a/secure/lib/libcrypto/man/dsa.3 +++ b/secure/lib/libcrypto/man/dsa.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "dsa 3" -.TH dsa 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH dsa 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ecdsa.3 b/secure/lib/libcrypto/man/ecdsa.3 index 06c05d3..f8189f3 100644 --- a/secure/lib/libcrypto/man/ecdsa.3 +++ b/secure/lib/libcrypto/man/ecdsa.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ecdsa 3" -.TH ecdsa 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ecdsa 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/engine.3 b/secure/lib/libcrypto/man/engine.3 index 31bbb9d..f93bac3 100644 --- a/secure/lib/libcrypto/man/engine.3 +++ b/secure/lib/libcrypto/man/engine.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "engine 3" -.TH engine 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH engine 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/err.3 b/secure/lib/libcrypto/man/err.3 index 848e585..b0b903f 100644 --- a/secure/lib/libcrypto/man/err.3 +++ b/secure/lib/libcrypto/man/err.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "err 3" -.TH err 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH err 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/evp.3 b/secure/lib/libcrypto/man/evp.3 index 3fd531a..b29730c 100644 --- a/secure/lib/libcrypto/man/evp.3 +++ b/secure/lib/libcrypto/man/evp.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "evp 3" -.TH evp 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH evp 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -162,6 +162,10 @@ functions. The \fBEVP_Digest\fR\fI...\fR functions provide message digests. The \fB\s-1EVP_PKEY\s0\fR\fI...\fR functions provide a high level interface to asymmetric algorithms. .PP +The \fBEVP_Encode\fR\fI...\fR and +\&\fBEVP_Decode\fR\fI...\fR functions implement base 64 encoding +and decoding. +.PP Algorithms are loaded with \fIOpenSSL_add_all_algorithms\fR\|(3). .PP All the symmetric algorithms (ciphers), digests and asymmetric algorithms @@ -185,5 +189,6 @@ using the high level interface. \&\fIEVP_SealInit\fR\|(3), \&\fIEVP_SignInit\fR\|(3), \&\fIEVP_VerifyInit\fR\|(3), +\&\fIEVP_EncodeInit\fR\|(3), \&\fIOpenSSL_add_all_algorithms\fR\|(3), \&\fIengine\fR\|(3) diff --git a/secure/lib/libcrypto/man/hmac.3 b/secure/lib/libcrypto/man/hmac.3 index e8f9be9..52a64e4 100644 --- a/secure/lib/libcrypto/man/hmac.3 +++ b/secure/lib/libcrypto/man/hmac.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "hmac 3" -.TH hmac 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH hmac 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 b/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 index a5b1e8e..69d015c 100644 --- a/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 +++ b/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "i2d_CMS_bio_stream 3" -.TH i2d_CMS_bio_stream 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH i2d_CMS_bio_stream 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 b/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 index 60c7f6f..291de7d 100644 --- a/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 +++ b/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "i2d_PKCS7_bio_stream 3" -.TH i2d_PKCS7_bio_stream 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH i2d_PKCS7_bio_stream 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/lh_stats.3 b/secure/lib/libcrypto/man/lh_stats.3 index 9ab94b5..b09233f 100644 --- a/secure/lib/libcrypto/man/lh_stats.3 +++ b/secure/lib/libcrypto/man/lh_stats.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "lh_stats 3" -.TH lh_stats 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH lh_stats 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/lhash.3 b/secure/lib/libcrypto/man/lhash.3 index d86620b..ffa993c 100644 --- a/secure/lib/libcrypto/man/lhash.3 +++ b/secure/lib/libcrypto/man/lhash.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "lhash 3" -.TH lhash 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH lhash 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/md5.3 b/secure/lib/libcrypto/man/md5.3 index 941f14e..85af56f 100644 --- a/secure/lib/libcrypto/man/md5.3 +++ b/secure/lib/libcrypto/man/md5.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "md5 3" -.TH md5 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH md5 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/mdc2.3 b/secure/lib/libcrypto/man/mdc2.3 index bc61e3b..d0e902f 100644 --- a/secure/lib/libcrypto/man/mdc2.3 +++ b/secure/lib/libcrypto/man/mdc2.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "mdc2 3" -.TH mdc2 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH mdc2 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/pem.3 b/secure/lib/libcrypto/man/pem.3 index 79ee14f..7573f49 100644 --- a/secure/lib/libcrypto/man/pem.3 +++ b/secure/lib/libcrypto/man/pem.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "pem 3" -.TH pem 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH pem 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/rand.3 b/secure/lib/libcrypto/man/rand.3 index 2c6920c..7605635 100644 --- a/secure/lib/libcrypto/man/rand.3 +++ b/secure/lib/libcrypto/man/rand.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "rand 3" -.TH rand 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH rand 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/rc4.3 b/secure/lib/libcrypto/man/rc4.3 index 2151e56..a56608a 100644 --- a/secure/lib/libcrypto/man/rc4.3 +++ b/secure/lib/libcrypto/man/rc4.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "rc4 3" -.TH rc4 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH rc4 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ripemd.3 b/secure/lib/libcrypto/man/ripemd.3 index 030578b..1cfaa6d 100644 --- a/secure/lib/libcrypto/man/ripemd.3 +++ b/secure/lib/libcrypto/man/ripemd.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ripemd 3" -.TH ripemd 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ripemd 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/rsa.3 b/secure/lib/libcrypto/man/rsa.3 index 365ed9a..ff152de 100644 --- a/secure/lib/libcrypto/man/rsa.3 +++ b/secure/lib/libcrypto/man/rsa.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "rsa 3" -.TH rsa 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH rsa 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/sha.3 b/secure/lib/libcrypto/man/sha.3 index 4141a8c..7607620 100644 --- a/secure/lib/libcrypto/man/sha.3 +++ b/secure/lib/libcrypto/man/sha.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "sha 3" -.TH sha 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH sha 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/threads.3 b/secure/lib/libcrypto/man/threads.3 index 02a55cb..fe255dd 100644 --- a/secure/lib/libcrypto/man/threads.3 +++ b/secure/lib/libcrypto/man/threads.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "threads 3" -.TH threads 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH threads 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ui.3 b/secure/lib/libcrypto/man/ui.3 index a54e4c4..6e7681f 100644 --- a/secure/lib/libcrypto/man/ui.3 +++ b/secure/lib/libcrypto/man/ui.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ui 3" -.TH ui 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ui 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/ui_compat.3 b/secure/lib/libcrypto/man/ui_compat.3 index eab057c..3df7df7 100644 --- a/secure/lib/libcrypto/man/ui_compat.3 +++ b/secure/lib/libcrypto/man/ui_compat.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ui_compat 3" -.TH ui_compat 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ui_compat 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/x509.3 b/secure/lib/libcrypto/man/x509.3 index a4dabfe..55b52da 100644 --- a/secure/lib/libcrypto/man/x509.3 +++ b/secure/lib/libcrypto/man/x509.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "x509 3" -.TH x509 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH x509 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CIPHER_get_name.3 b/secure/lib/libssl/man/SSL_CIPHER_get_name.3 index 3fb6529..13b71b8 100644 --- a/secure/lib/libssl/man/SSL_CIPHER_get_name.3 +++ b/secure/lib/libssl/man/SSL_CIPHER_get_name.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CIPHER_get_name 3" -.TH SSL_CIPHER_get_name 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CIPHER_get_name 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 b/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 index fc2134f..303aa13 100644 --- a/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 +++ b/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_COMP_add_compression_method 3" -.TH SSL_COMP_add_compression_method 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_COMP_add_compression_method 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 b/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 index f3e30b5..6c7038a 100644 --- a/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 +++ b/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_add_extra_chain_cert 3" -.TH SSL_CTX_add_extra_chain_cert 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_add_extra_chain_cert 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_add_session.3 b/secure/lib/libssl/man/SSL_CTX_add_session.3 index 538450d..e4a0b28 100644 --- a/secure/lib/libssl/man/SSL_CTX_add_session.3 +++ b/secure/lib/libssl/man/SSL_CTX_add_session.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_add_session 3" -.TH SSL_CTX_add_session 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_add_session 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_ctrl.3 b/secure/lib/libssl/man/SSL_CTX_ctrl.3 index cdf31ec..2afdc8a 100644 --- a/secure/lib/libssl/man/SSL_CTX_ctrl.3 +++ b/secure/lib/libssl/man/SSL_CTX_ctrl.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_ctrl 3" -.TH SSL_CTX_ctrl 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_ctrl 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 b/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 index 3c60b09..51aef13 100644 --- a/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 +++ b/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_flush_sessions 3" -.TH SSL_CTX_flush_sessions 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_flush_sessions 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_free.3 b/secure/lib/libssl/man/SSL_CTX_free.3 index e3b1160..94c7ceb 100644 --- a/secure/lib/libssl/man/SSL_CTX_free.3 +++ b/secure/lib/libssl/man/SSL_CTX_free.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_free 3" -.TH SSL_CTX_free 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_free 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 b/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 index 5fe7cfa..7cd38ca 100644 --- a/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 +++ b/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_get_ex_new_index 3" -.TH SSL_CTX_get_ex_new_index 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_get_ex_new_index 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 b/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 index 0e06272..cd47fca 100644 --- a/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 +++ b/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_get_verify_mode 3" -.TH SSL_CTX_get_verify_mode 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_get_verify_mode 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 b/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 index 9dd9e11f..77461e7 100644 --- a/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 +++ b/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_load_verify_locations 3" -.TH SSL_CTX_load_verify_locations 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_load_verify_locations 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_new.3 b/secure/lib/libssl/man/SSL_CTX_new.3 index beeeaec..60ae902 100644 --- a/secure/lib/libssl/man/SSL_CTX_new.3 +++ b/secure/lib/libssl/man/SSL_CTX_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_new 3" -.TH SSL_CTX_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_sess_number.3 b/secure/lib/libssl/man/SSL_CTX_sess_number.3 index 8fcc012..732a239 100644 --- a/secure/lib/libssl/man/SSL_CTX_sess_number.3 +++ b/secure/lib/libssl/man/SSL_CTX_sess_number.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_sess_number 3" -.TH SSL_CTX_sess_number 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_sess_number 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 b/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 index 9a9fe80..21fc72f 100644 --- a/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 +++ b/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_sess_set_cache_size 3" -.TH SSL_CTX_sess_set_cache_size 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_sess_set_cache_size 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 b/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 index e87e13e..f120d5f 100644 --- a/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 +++ b/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_sess_set_get_cb 3" -.TH SSL_CTX_sess_set_get_cb 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_sess_set_get_cb 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_sessions.3 b/secure/lib/libssl/man/SSL_CTX_sessions.3 index aca1f23..d12d6bf 100644 --- a/secure/lib/libssl/man/SSL_CTX_sessions.3 +++ b/secure/lib/libssl/man/SSL_CTX_sessions.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_sessions 3" -.TH SSL_CTX_sessions 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_sessions 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 b/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 index a92e187..fafa81c 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_cert_store 3" -.TH SSL_CTX_set_cert_store 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_cert_store 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 b/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 index 679f3c7..8d5e843 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_cert_verify_callback 3" -.TH SSL_CTX_set_cert_verify_callback 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_cert_verify_callback 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 b/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 index 27b2d57..1f65c6c 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_cipher_list 3" -.TH SSL_CTX_set_cipher_list 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_cipher_list 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 b/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 index 8d41353..2a8f753 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_client_CA_list 3" -.TH SSL_CTX_set_client_CA_list 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_client_CA_list 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 b/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 index 21e72b5..b1e9d71 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_client_cert_cb 3" -.TH SSL_CTX_set_client_cert_cb 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_client_cert_cb 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 b/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 index b28eba1..6599931 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_default_passwd_cb 3" -.TH SSL_CTX_set_default_passwd_cb 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_default_passwd_cb 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 b/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 index 29f8e78..1bd58b7 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_generate_session_id 3" -.TH SSL_CTX_set_generate_session_id 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_generate_session_id 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 b/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 index 7ab208b..0b5c8c7 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_info_callback 3" -.TH SSL_CTX_set_info_callback 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_info_callback 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 b/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 index 83cad9e..6e4db38 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_max_cert_list 3" -.TH SSL_CTX_set_max_cert_list 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_max_cert_list 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_mode.3 b/secure/lib/libssl/man/SSL_CTX_set_mode.3 index c1cf85d..05a14d5 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_mode.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_mode.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_mode 3" -.TH SSL_CTX_set_mode 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_mode 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 b/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 index 5dc504a..826e122 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_msg_callback 3" -.TH SSL_CTX_set_msg_callback 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_msg_callback 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_options.3 b/secure/lib/libssl/man/SSL_CTX_set_options.3 index 7475736..003b4dd 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_options.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_options.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_options 3" -.TH SSL_CTX_set_options 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_options 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 b/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 index 161c71a..97b1273 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_psk_client_callback 3" -.TH SSL_CTX_set_psk_client_callback 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_psk_client_callback 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 b/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 index b651dba..26b62e7 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_quiet_shutdown 3" -.TH SSL_CTX_set_quiet_shutdown 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_quiet_shutdown 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 b/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 index 8dfbefd..550c1c1 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_read_ahead 3" -.TH SSL_CTX_set_read_ahead 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_read_ahead 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 b/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 index 3128e7b..3c17fd0 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_session_cache_mode 3" -.TH SSL_CTX_set_session_cache_mode 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_session_cache_mode 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 b/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 index e6393ff..9787bf0 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_session_id_context 3" -.TH SSL_CTX_set_session_id_context 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_session_id_context 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 b/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 index d0c7f9a..4fca271 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_ssl_version 3" -.TH SSL_CTX_set_ssl_version 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_ssl_version 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_timeout.3 b/secure/lib/libssl/man/SSL_CTX_set_timeout.3 index c9819a4..13a1ce0 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_timeout.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_timeout.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_timeout 3" -.TH SSL_CTX_set_timeout 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_timeout 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 b/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 index b87a682..3e5035c 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_tlsext_status_cb 3" -.TH SSL_CTX_set_tlsext_status_cb 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_tlsext_status_cb 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 b/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 index 7a90390..6aa26cb 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_tlsext_ticket_key_cb 3" -.TH SSL_CTX_set_tlsext_ticket_key_cb 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_tlsext_ticket_key_cb 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 b/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 index 3b79ad0..082b235 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_tmp_dh_callback 3" -.TH SSL_CTX_set_tmp_dh_callback 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_tmp_dh_callback 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 b/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 index 455ef0e..d4fd56d 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_tmp_rsa_callback 3" -.TH SSL_CTX_set_tmp_rsa_callback 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_tmp_rsa_callback 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_set_verify.3 b/secure/lib/libssl/man/SSL_CTX_set_verify.3 index bc1ebdc..1e0a143 100644 --- a/secure/lib/libssl/man/SSL_CTX_set_verify.3 +++ b/secure/lib/libssl/man/SSL_CTX_set_verify.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_set_verify 3" -.TH SSL_CTX_set_verify 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_set_verify 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_use_certificate.3 b/secure/lib/libssl/man/SSL_CTX_use_certificate.3 index 86211f1..89d159a 100644 --- a/secure/lib/libssl/man/SSL_CTX_use_certificate.3 +++ b/secure/lib/libssl/man/SSL_CTX_use_certificate.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_use_certificate 3" -.TH SSL_CTX_use_certificate 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_use_certificate 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 b/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 index d733803..7558961 100644 --- a/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 +++ b/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_CTX_use_psk_identity_hint 3" -.TH SSL_CTX_use_psk_identity_hint 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_CTX_use_psk_identity_hint 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_SESSION_free.3 b/secure/lib/libssl/man/SSL_SESSION_free.3 index 670482c..3498cc8 100644 --- a/secure/lib/libssl/man/SSL_SESSION_free.3 +++ b/secure/lib/libssl/man/SSL_SESSION_free.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_SESSION_free 3" -.TH SSL_SESSION_free 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_SESSION_free 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 b/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 index 9b3db2e..4b4ac1f 100644 --- a/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 +++ b/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_SESSION_get_ex_new_index 3" -.TH SSL_SESSION_get_ex_new_index 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_SESSION_get_ex_new_index 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_SESSION_get_time.3 b/secure/lib/libssl/man/SSL_SESSION_get_time.3 index b0c978e..3602c45 100644 --- a/secure/lib/libssl/man/SSL_SESSION_get_time.3 +++ b/secure/lib/libssl/man/SSL_SESSION_get_time.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_SESSION_get_time 3" -.TH SSL_SESSION_get_time 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_SESSION_get_time 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_accept.3 b/secure/lib/libssl/man/SSL_accept.3 index 0ecb5c8..02f4a56 100644 --- a/secure/lib/libssl/man/SSL_accept.3 +++ b/secure/lib/libssl/man/SSL_accept.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_accept 3" -.TH SSL_accept 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_accept 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_alert_type_string.3 b/secure/lib/libssl/man/SSL_alert_type_string.3 index 8ce1254..6daa6ed 100644 --- a/secure/lib/libssl/man/SSL_alert_type_string.3 +++ b/secure/lib/libssl/man/SSL_alert_type_string.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_alert_type_string 3" -.TH SSL_alert_type_string 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_alert_type_string 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_clear.3 b/secure/lib/libssl/man/SSL_clear.3 index d8f4c4f..d4d4e96 100644 --- a/secure/lib/libssl/man/SSL_clear.3 +++ b/secure/lib/libssl/man/SSL_clear.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_clear 3" -.TH SSL_clear 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_clear 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_connect.3 b/secure/lib/libssl/man/SSL_connect.3 index 3c1581f..47b94af 100644 --- a/secure/lib/libssl/man/SSL_connect.3 +++ b/secure/lib/libssl/man/SSL_connect.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_connect 3" -.TH SSL_connect 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_connect 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_do_handshake.3 b/secure/lib/libssl/man/SSL_do_handshake.3 index a61df8a..724129e 100644 --- a/secure/lib/libssl/man/SSL_do_handshake.3 +++ b/secure/lib/libssl/man/SSL_do_handshake.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_do_handshake 3" -.TH SSL_do_handshake 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_do_handshake 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_free.3 b/secure/lib/libssl/man/SSL_free.3 index 0b0f954..ac5ac44 100644 --- a/secure/lib/libssl/man/SSL_free.3 +++ b/secure/lib/libssl/man/SSL_free.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_free 3" -.TH SSL_free 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_free 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_SSL_CTX.3 b/secure/lib/libssl/man/SSL_get_SSL_CTX.3 index 73e893e..eff0c65 100644 --- a/secure/lib/libssl/man/SSL_get_SSL_CTX.3 +++ b/secure/lib/libssl/man/SSL_get_SSL_CTX.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_SSL_CTX 3" -.TH SSL_get_SSL_CTX 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_SSL_CTX 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_ciphers.3 b/secure/lib/libssl/man/SSL_get_ciphers.3 index c8b0609..d01bd60 100644 --- a/secure/lib/libssl/man/SSL_get_ciphers.3 +++ b/secure/lib/libssl/man/SSL_get_ciphers.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_ciphers 3" -.TH SSL_get_ciphers 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_ciphers 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_client_CA_list.3 b/secure/lib/libssl/man/SSL_get_client_CA_list.3 index 8e7b447..7e62781 100644 --- a/secure/lib/libssl/man/SSL_get_client_CA_list.3 +++ b/secure/lib/libssl/man/SSL_get_client_CA_list.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_client_CA_list 3" -.TH SSL_get_client_CA_list 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_client_CA_list 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_current_cipher.3 b/secure/lib/libssl/man/SSL_get_current_cipher.3 index adc8f7d..608f689 100644 --- a/secure/lib/libssl/man/SSL_get_current_cipher.3 +++ b/secure/lib/libssl/man/SSL_get_current_cipher.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_current_cipher 3" -.TH SSL_get_current_cipher 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_current_cipher 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_default_timeout.3 b/secure/lib/libssl/man/SSL_get_default_timeout.3 index 1d8d254..4c47b18 100644 --- a/secure/lib/libssl/man/SSL_get_default_timeout.3 +++ b/secure/lib/libssl/man/SSL_get_default_timeout.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_default_timeout 3" -.TH SSL_get_default_timeout 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_default_timeout 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_error.3 b/secure/lib/libssl/man/SSL_get_error.3 index ce8e132..7440ae3 100644 --- a/secure/lib/libssl/man/SSL_get_error.3 +++ b/secure/lib/libssl/man/SSL_get_error.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_error 3" -.TH SSL_get_error 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_error 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 b/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 index 4d9800f..6e7fa96 100644 --- a/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 +++ b/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_ex_data_X509_STORE_CTX_idx 3" -.TH SSL_get_ex_data_X509_STORE_CTX_idx 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_ex_data_X509_STORE_CTX_idx 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_ex_new_index.3 b/secure/lib/libssl/man/SSL_get_ex_new_index.3 index 97d1f77..917ee23 100644 --- a/secure/lib/libssl/man/SSL_get_ex_new_index.3 +++ b/secure/lib/libssl/man/SSL_get_ex_new_index.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_ex_new_index 3" -.TH SSL_get_ex_new_index 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_ex_new_index 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_fd.3 b/secure/lib/libssl/man/SSL_get_fd.3 index 4908d93..f80d982 100644 --- a/secure/lib/libssl/man/SSL_get_fd.3 +++ b/secure/lib/libssl/man/SSL_get_fd.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_fd 3" -.TH SSL_get_fd 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_fd 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 b/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 index dd932f0..56ff3c73 100644 --- a/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 +++ b/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_peer_cert_chain 3" -.TH SSL_get_peer_cert_chain 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_peer_cert_chain 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_peer_certificate.3 b/secure/lib/libssl/man/SSL_get_peer_certificate.3 index 6f03681..61deb917 100644 --- a/secure/lib/libssl/man/SSL_get_peer_certificate.3 +++ b/secure/lib/libssl/man/SSL_get_peer_certificate.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_peer_certificate 3" -.TH SSL_get_peer_certificate 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_peer_certificate 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_psk_identity.3 b/secure/lib/libssl/man/SSL_get_psk_identity.3 index bd6f0c7..cdf4e23 100644 --- a/secure/lib/libssl/man/SSL_get_psk_identity.3 +++ b/secure/lib/libssl/man/SSL_get_psk_identity.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_psk_identity 3" -.TH SSL_get_psk_identity 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_psk_identity 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_rbio.3 b/secure/lib/libssl/man/SSL_get_rbio.3 index ce07f19..832d3e4 100644 --- a/secure/lib/libssl/man/SSL_get_rbio.3 +++ b/secure/lib/libssl/man/SSL_get_rbio.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_rbio 3" -.TH SSL_get_rbio 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_rbio 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_session.3 b/secure/lib/libssl/man/SSL_get_session.3 index 65547af..1c2f30a 100644 --- a/secure/lib/libssl/man/SSL_get_session.3 +++ b/secure/lib/libssl/man/SSL_get_session.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_session 3" -.TH SSL_get_session 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_session 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_verify_result.3 b/secure/lib/libssl/man/SSL_get_verify_result.3 index 3e8b603..9ef5722 100644 --- a/secure/lib/libssl/man/SSL_get_verify_result.3 +++ b/secure/lib/libssl/man/SSL_get_verify_result.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_verify_result 3" -.TH SSL_get_verify_result 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_verify_result 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_get_version.3 b/secure/lib/libssl/man/SSL_get_version.3 index 2435f70..5b6e6c2 100644 --- a/secure/lib/libssl/man/SSL_get_version.3 +++ b/secure/lib/libssl/man/SSL_get_version.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_get_version 3" -.TH SSL_get_version 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_get_version 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_library_init.3 b/secure/lib/libssl/man/SSL_library_init.3 index 226f391..e4bcea7 100644 --- a/secure/lib/libssl/man/SSL_library_init.3 +++ b/secure/lib/libssl/man/SSL_library_init.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_library_init 3" -.TH SSL_library_init 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_library_init 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_load_client_CA_file.3 b/secure/lib/libssl/man/SSL_load_client_CA_file.3 index 2b264a9..e6540d5 100644 --- a/secure/lib/libssl/man/SSL_load_client_CA_file.3 +++ b/secure/lib/libssl/man/SSL_load_client_CA_file.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_load_client_CA_file 3" -.TH SSL_load_client_CA_file 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_load_client_CA_file 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_new.3 b/secure/lib/libssl/man/SSL_new.3 index a6eb3c5..24747d1 100644 --- a/secure/lib/libssl/man/SSL_new.3 +++ b/secure/lib/libssl/man/SSL_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_new 3" -.TH SSL_new 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_new 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_pending.3 b/secure/lib/libssl/man/SSL_pending.3 index c9591e3..2de2d76 100644 --- a/secure/lib/libssl/man/SSL_pending.3 +++ b/secure/lib/libssl/man/SSL_pending.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_pending 3" -.TH SSL_pending 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_pending 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_read.3 b/secure/lib/libssl/man/SSL_read.3 index f8a4acb..b2f55c2 100644 --- a/secure/lib/libssl/man/SSL_read.3 +++ b/secure/lib/libssl/man/SSL_read.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_read 3" -.TH SSL_read 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_read 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_rstate_string.3 b/secure/lib/libssl/man/SSL_rstate_string.3 index c86a91b..3f77d54 100644 --- a/secure/lib/libssl/man/SSL_rstate_string.3 +++ b/secure/lib/libssl/man/SSL_rstate_string.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_rstate_string 3" -.TH SSL_rstate_string 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_rstate_string 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_session_reused.3 b/secure/lib/libssl/man/SSL_session_reused.3 index 8d69327..69a3f8a 100644 --- a/secure/lib/libssl/man/SSL_session_reused.3 +++ b/secure/lib/libssl/man/SSL_session_reused.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_session_reused 3" -.TH SSL_session_reused 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_session_reused 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_set_bio.3 b/secure/lib/libssl/man/SSL_set_bio.3 index 0557eff..7cdfcef 100644 --- a/secure/lib/libssl/man/SSL_set_bio.3 +++ b/secure/lib/libssl/man/SSL_set_bio.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_set_bio 3" -.TH SSL_set_bio 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_set_bio 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_set_connect_state.3 b/secure/lib/libssl/man/SSL_set_connect_state.3 index 4d4e0d7..49fbe20 100644 --- a/secure/lib/libssl/man/SSL_set_connect_state.3 +++ b/secure/lib/libssl/man/SSL_set_connect_state.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_set_connect_state 3" -.TH SSL_set_connect_state 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_set_connect_state 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_set_fd.3 b/secure/lib/libssl/man/SSL_set_fd.3 index 1115863..6e4af40 100644 --- a/secure/lib/libssl/man/SSL_set_fd.3 +++ b/secure/lib/libssl/man/SSL_set_fd.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_set_fd 3" -.TH SSL_set_fd 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_set_fd 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_set_session.3 b/secure/lib/libssl/man/SSL_set_session.3 index 5a33f02..bbbd5f5 100644 --- a/secure/lib/libssl/man/SSL_set_session.3 +++ b/secure/lib/libssl/man/SSL_set_session.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_set_session 3" -.TH SSL_set_session 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_set_session 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_set_shutdown.3 b/secure/lib/libssl/man/SSL_set_shutdown.3 index 8a7b596..c0023f2 100644 --- a/secure/lib/libssl/man/SSL_set_shutdown.3 +++ b/secure/lib/libssl/man/SSL_set_shutdown.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_set_shutdown 3" -.TH SSL_set_shutdown 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_set_shutdown 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_set_verify_result.3 b/secure/lib/libssl/man/SSL_set_verify_result.3 index d706f90..f7aa11a 100644 --- a/secure/lib/libssl/man/SSL_set_verify_result.3 +++ b/secure/lib/libssl/man/SSL_set_verify_result.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_set_verify_result 3" -.TH SSL_set_verify_result 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_set_verify_result 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_shutdown.3 b/secure/lib/libssl/man/SSL_shutdown.3 index 6b9f0f2..7c51ac4 100644 --- a/secure/lib/libssl/man/SSL_shutdown.3 +++ b/secure/lib/libssl/man/SSL_shutdown.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_shutdown 3" -.TH SSL_shutdown 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_shutdown 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_state_string.3 b/secure/lib/libssl/man/SSL_state_string.3 index 3fc234f..fd21d92 100644 --- a/secure/lib/libssl/man/SSL_state_string.3 +++ b/secure/lib/libssl/man/SSL_state_string.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_state_string 3" -.TH SSL_state_string 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_state_string 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_want.3 b/secure/lib/libssl/man/SSL_want.3 index 6f13aa8..5c498f7c 100644 --- a/secure/lib/libssl/man/SSL_want.3 +++ b/secure/lib/libssl/man/SSL_want.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_want 3" -.TH SSL_want 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_want 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/SSL_write.3 b/secure/lib/libssl/man/SSL_write.3 index 0d86618..d7d0af8 100644 --- a/secure/lib/libssl/man/SSL_write.3 +++ b/secure/lib/libssl/man/SSL_write.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_write 3" -.TH SSL_write 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SSL_write 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/d2i_SSL_SESSION.3 b/secure/lib/libssl/man/d2i_SSL_SESSION.3 index 73159b2..a2ad3ae 100644 --- a/secure/lib/libssl/man/d2i_SSL_SESSION.3 +++ b/secure/lib/libssl/man/d2i_SSL_SESSION.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "d2i_SSL_SESSION 3" -.TH d2i_SSL_SESSION 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH d2i_SSL_SESSION 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libssl/man/ssl.3 b/secure/lib/libssl/man/ssl.3 index 5cc79ad..c97a2a4 100644 --- a/secure/lib/libssl/man/ssl.3 +++ b/secure/lib/libssl/man/ssl.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ssl 3" -.TH ssl 3 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ssl 3 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/CA.pl.1 b/secure/usr.bin/openssl/man/CA.pl.1 index 631064d..691bd04 100644 --- a/secure/usr.bin/openssl/man/CA.pl.1 +++ b/secure/usr.bin/openssl/man/CA.pl.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CA.PL 1" -.TH CA.PL 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CA.PL 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/asn1parse.1 b/secure/usr.bin/openssl/man/asn1parse.1 index 32e471d..7e550ed 100644 --- a/secure/usr.bin/openssl/man/asn1parse.1 +++ b/secure/usr.bin/openssl/man/asn1parse.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1PARSE 1" -.TH ASN1PARSE 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ASN1PARSE 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/c_rehash.1 b/secure/usr.bin/openssl/man/c_rehash.1 index 972ca4f..763666f 100644 --- a/secure/usr.bin/openssl/man/c_rehash.1 +++ b/secure/usr.bin/openssl/man/c_rehash.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "C_REHASH 1" -.TH C_REHASH 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH C_REHASH 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/ca.1 b/secure/usr.bin/openssl/man/ca.1 index fc62e88..3b59580 100644 --- a/secure/usr.bin/openssl/man/ca.1 +++ b/secure/usr.bin/openssl/man/ca.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CA 1" -.TH CA 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CA 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/ciphers.1 b/secure/usr.bin/openssl/man/ciphers.1 index 2d3f818..1414570 100644 --- a/secure/usr.bin/openssl/man/ciphers.1 +++ b/secure/usr.bin/openssl/man/ciphers.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CIPHERS 1" -.TH CIPHERS 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CIPHERS 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -227,7 +227,7 @@ The following is a list of all permitted cipher strings and their meanings. .IX Item "DEFAULT" The default cipher list. This is determined at compile time and is normally -\&\fB\s-1ALL:\s0!EXPORT:!aNULL:!eNULL:!SSLv2\fR. +\&\fB\s-1ALL:\s0!EXPORT:!LOW:!aNULL:!eNULL:!SSLv2\fR. When used, this must be the first cipherstring specified. .IP "\fB\s-1COMPLEMENTOFDEFAULT\s0\fR" 4 .IX Item "COMPLEMENTOFDEFAULT" diff --git a/secure/usr.bin/openssl/man/cms.1 b/secure/usr.bin/openssl/man/cms.1 index 768d019..91440dc 100644 --- a/secure/usr.bin/openssl/man/cms.1 +++ b/secure/usr.bin/openssl/man/cms.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS 1" -.TH CMS 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CMS 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/crl.1 b/secure/usr.bin/openssl/man/crl.1 index 3178885..eda6791 100644 --- a/secure/usr.bin/openssl/man/crl.1 +++ b/secure/usr.bin/openssl/man/crl.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CRL 1" -.TH CRL 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CRL 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/crl2pkcs7.1 b/secure/usr.bin/openssl/man/crl2pkcs7.1 index 93eeb39..cc85cb5 100644 --- a/secure/usr.bin/openssl/man/crl2pkcs7.1 +++ b/secure/usr.bin/openssl/man/crl2pkcs7.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CRL2PKCS7 1" -.TH CRL2PKCS7 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH CRL2PKCS7 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/dgst.1 b/secure/usr.bin/openssl/man/dgst.1 index 6607190..34781ec 100644 --- a/secure/usr.bin/openssl/man/dgst.1 +++ b/secure/usr.bin/openssl/man/dgst.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DGST 1" -.TH DGST 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DGST 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/dhparam.1 b/secure/usr.bin/openssl/man/dhparam.1 index 14861e5..10e4bff 100644 --- a/secure/usr.bin/openssl/man/dhparam.1 +++ b/secure/usr.bin/openssl/man/dhparam.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DHPARAM 1" -.TH DHPARAM 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DHPARAM 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/dsa.1 b/secure/usr.bin/openssl/man/dsa.1 index 7968022..2bde067 100644 --- a/secure/usr.bin/openssl/man/dsa.1 +++ b/secure/usr.bin/openssl/man/dsa.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA 1" -.TH DSA 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DSA 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/dsaparam.1 b/secure/usr.bin/openssl/man/dsaparam.1 index 6500983..96774a5 100644 --- a/secure/usr.bin/openssl/man/dsaparam.1 +++ b/secure/usr.bin/openssl/man/dsaparam.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSAPARAM 1" -.TH DSAPARAM 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH DSAPARAM 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/ec.1 b/secure/usr.bin/openssl/man/ec.1 index 615879d..dc9e668 100644 --- a/secure/usr.bin/openssl/man/ec.1 +++ b/secure/usr.bin/openssl/man/ec.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EC 1" -.TH EC 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH EC 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/ecparam.1 b/secure/usr.bin/openssl/man/ecparam.1 index 7681bde..53ba9c0 100644 --- a/secure/usr.bin/openssl/man/ecparam.1 +++ b/secure/usr.bin/openssl/man/ecparam.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ECPARAM 1" -.TH ECPARAM 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ECPARAM 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/enc.1 b/secure/usr.bin/openssl/man/enc.1 index d221e18..a5da1fc 100644 --- a/secure/usr.bin/openssl/man/enc.1 +++ b/secure/usr.bin/openssl/man/enc.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ENC 1" -.TH ENC 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ENC 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/errstr.1 b/secure/usr.bin/openssl/man/errstr.1 index ab39a7b..58daf85 100644 --- a/secure/usr.bin/openssl/man/errstr.1 +++ b/secure/usr.bin/openssl/man/errstr.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ERRSTR 1" -.TH ERRSTR 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH ERRSTR 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/gendsa.1 b/secure/usr.bin/openssl/man/gendsa.1 index eb7c307..3714487 100644 --- a/secure/usr.bin/openssl/man/gendsa.1 +++ b/secure/usr.bin/openssl/man/gendsa.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "GENDSA 1" -.TH GENDSA 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH GENDSA 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/genpkey.1 b/secure/usr.bin/openssl/man/genpkey.1 index 2e5fe66..57f50e7 100644 --- a/secure/usr.bin/openssl/man/genpkey.1 +++ b/secure/usr.bin/openssl/man/genpkey.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "GENPKEY 1" -.TH GENPKEY 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH GENPKEY 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/genrsa.1 b/secure/usr.bin/openssl/man/genrsa.1 index 6d0c807..2999a35 100644 --- a/secure/usr.bin/openssl/man/genrsa.1 +++ b/secure/usr.bin/openssl/man/genrsa.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "GENRSA 1" -.TH GENRSA 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH GENRSA 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/nseq.1 b/secure/usr.bin/openssl/man/nseq.1 index 6901b20..b1a4a97 100644 --- a/secure/usr.bin/openssl/man/nseq.1 +++ b/secure/usr.bin/openssl/man/nseq.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "NSEQ 1" -.TH NSEQ 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH NSEQ 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/ocsp.1 b/secure/usr.bin/openssl/man/ocsp.1 index 6be2480..11ac59f 100644 --- a/secure/usr.bin/openssl/man/ocsp.1 +++ b/secure/usr.bin/openssl/man/ocsp.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "OCSP 1" -.TH OCSP 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH OCSP 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/openssl.1 b/secure/usr.bin/openssl/man/openssl.1 index 468549f..05a9723 100644 --- a/secure/usr.bin/openssl/man/openssl.1 +++ b/secure/usr.bin/openssl/man/openssl.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "OPENSSL 1" -.TH OPENSSL 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH OPENSSL 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/passwd.1 b/secure/usr.bin/openssl/man/passwd.1 index 955b58d..a642c4b 100644 --- a/secure/usr.bin/openssl/man/passwd.1 +++ b/secure/usr.bin/openssl/man/passwd.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PASSWD 1" -.TH PASSWD 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PASSWD 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/pkcs12.1 b/secure/usr.bin/openssl/man/pkcs12.1 index 8c5e2ae..af79ff3 100644 --- a/secure/usr.bin/openssl/man/pkcs12.1 +++ b/secure/usr.bin/openssl/man/pkcs12.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PKCS12 1" -.TH PKCS12 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PKCS12 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/pkcs7.1 b/secure/usr.bin/openssl/man/pkcs7.1 index a6bd781..1bbe8f3 100644 --- a/secure/usr.bin/openssl/man/pkcs7.1 +++ b/secure/usr.bin/openssl/man/pkcs7.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PKCS7 1" -.TH PKCS7 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PKCS7 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/pkcs8.1 b/secure/usr.bin/openssl/man/pkcs8.1 index bc42cd0..3a212d2 100644 --- a/secure/usr.bin/openssl/man/pkcs8.1 +++ b/secure/usr.bin/openssl/man/pkcs8.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PKCS8 1" -.TH PKCS8 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PKCS8 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/pkey.1 b/secure/usr.bin/openssl/man/pkey.1 index 73f90d3..e6675b1 100644 --- a/secure/usr.bin/openssl/man/pkey.1 +++ b/secure/usr.bin/openssl/man/pkey.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PKEY 1" -.TH PKEY 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PKEY 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/pkeyparam.1 b/secure/usr.bin/openssl/man/pkeyparam.1 index 575d34f..526b58b 100644 --- a/secure/usr.bin/openssl/man/pkeyparam.1 +++ b/secure/usr.bin/openssl/man/pkeyparam.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PKEYPARAM 1" -.TH PKEYPARAM 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PKEYPARAM 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/pkeyutl.1 b/secure/usr.bin/openssl/man/pkeyutl.1 index fbb903f..12b6ed1 100644 --- a/secure/usr.bin/openssl/man/pkeyutl.1 +++ b/secure/usr.bin/openssl/man/pkeyutl.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PKEYUTL 1" -.TH PKEYUTL 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH PKEYUTL 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/rand.1 b/secure/usr.bin/openssl/man/rand.1 index c6347c9..8062e5c 100644 --- a/secure/usr.bin/openssl/man/rand.1 +++ b/secure/usr.bin/openssl/man/rand.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RAND 1" -.TH RAND 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RAND 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/req.1 b/secure/usr.bin/openssl/man/req.1 index 0256651..2c60b87 100644 --- a/secure/usr.bin/openssl/man/req.1 +++ b/secure/usr.bin/openssl/man/req.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "REQ 1" -.TH REQ 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH REQ 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/rsa.1 b/secure/usr.bin/openssl/man/rsa.1 index ba38eb3..7977ea2 100644 --- a/secure/usr.bin/openssl/man/rsa.1 +++ b/secure/usr.bin/openssl/man/rsa.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSA 1" -.TH RSA 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSA 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/rsautl.1 b/secure/usr.bin/openssl/man/rsautl.1 index e299900..b81719e 100644 --- a/secure/usr.bin/openssl/man/rsautl.1 +++ b/secure/usr.bin/openssl/man/rsautl.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RSAUTL 1" -.TH RSAUTL 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH RSAUTL 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/s_client.1 b/secure/usr.bin/openssl/man/s_client.1 index 69bad65..394a9c6 100644 --- a/secure/usr.bin/openssl/man/s_client.1 +++ b/secure/usr.bin/openssl/man/s_client.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "S_CLIENT 1" -.TH S_CLIENT 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH S_CLIENT 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/s_server.1 b/secure/usr.bin/openssl/man/s_server.1 index 0b1f118..a1bc676 100644 --- a/secure/usr.bin/openssl/man/s_server.1 +++ b/secure/usr.bin/openssl/man/s_server.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "S_SERVER 1" -.TH S_SERVER 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH S_SERVER 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/s_time.1 b/secure/usr.bin/openssl/man/s_time.1 index 60ef25b..026ae9e 100644 --- a/secure/usr.bin/openssl/man/s_time.1 +++ b/secure/usr.bin/openssl/man/s_time.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "S_TIME 1" -.TH S_TIME 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH S_TIME 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/sess_id.1 b/secure/usr.bin/openssl/man/sess_id.1 index c1868d1..fd53a29 100644 --- a/secure/usr.bin/openssl/man/sess_id.1 +++ b/secure/usr.bin/openssl/man/sess_id.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SESS_ID 1" -.TH SESS_ID 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SESS_ID 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/smime.1 b/secure/usr.bin/openssl/man/smime.1 index 41433d0..db72d0e 100644 --- a/secure/usr.bin/openssl/man/smime.1 +++ b/secure/usr.bin/openssl/man/smime.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SMIME 1" -.TH SMIME 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SMIME 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/speed.1 b/secure/usr.bin/openssl/man/speed.1 index bfbdfe1..d25bc5b 100644 --- a/secure/usr.bin/openssl/man/speed.1 +++ b/secure/usr.bin/openssl/man/speed.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SPEED 1" -.TH SPEED 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SPEED 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/spkac.1 b/secure/usr.bin/openssl/man/spkac.1 index 97d0212..39eac21 100644 --- a/secure/usr.bin/openssl/man/spkac.1 +++ b/secure/usr.bin/openssl/man/spkac.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SPKAC 1" -.TH SPKAC 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH SPKAC 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/ts.1 b/secure/usr.bin/openssl/man/ts.1 index da4646d..0934b36 100644 --- a/secure/usr.bin/openssl/man/ts.1 +++ b/secure/usr.bin/openssl/man/ts.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "TS 1" -.TH TS 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH TS 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/tsget.1 b/secure/usr.bin/openssl/man/tsget.1 index 80efe3a..aaaa74d 100644 --- a/secure/usr.bin/openssl/man/tsget.1 +++ b/secure/usr.bin/openssl/man/tsget.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "TSGET 1" -.TH TSGET 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH TSGET 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/verify.1 b/secure/usr.bin/openssl/man/verify.1 index 18608a7..cd1f0fa 100644 --- a/secure/usr.bin/openssl/man/verify.1 +++ b/secure/usr.bin/openssl/man/verify.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "VERIFY 1" -.TH VERIFY 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH VERIFY 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/version.1 b/secure/usr.bin/openssl/man/version.1 index 378a91a..ef7ce18 100644 --- a/secure/usr.bin/openssl/man/version.1 +++ b/secure/usr.bin/openssl/man/version.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "VERSION 1" -.TH VERSION 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH VERSION 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/x509.1 b/secure/usr.bin/openssl/man/x509.1 index 82de2f1..706678f 100644 --- a/secure/usr.bin/openssl/man/x509.1 +++ b/secure/usr.bin/openssl/man/x509.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509 1" -.TH X509 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH X509 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/usr.bin/openssl/man/x509v3_config.1 b/secure/usr.bin/openssl/man/x509v3_config.1 index e07be90..0d03589 100644 --- a/secure/usr.bin/openssl/man/x509v3_config.1 +++ b/secure/usr.bin/openssl/man/x509v3_config.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "X509V3_CONFIG 1" -.TH X509V3_CONFIG 1 "2016-03-01" "1.0.1s" "OpenSSL" +.TH X509V3_CONFIG 1 "2016-05-03" "1.0.1t" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index c7ee188..912d146 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 4, 2015 +.Dd April 28, 2016 .Dt BUILD 7 .Os .Sh NAME @@ -179,6 +179,12 @@ Build everything but the kernel, configure files in .Pa etc , and .Pa release . +The object directory can be changed from the default +.Pa /usr/obj +by setting the +.Pa MAKEOBJDIRPREFIX +.Xr make 1 +variable. The actual build location prefix used is .Pa ${MAKEOBJDIRPREFIX}${.CURDIR} for native builds, and @@ -262,6 +268,12 @@ are: .Bl -tag -width ".Cm distributekernel" .It Cm buildkernel Rebuild the kernel and the kernel modules. +The object directory can be changed from the default +.Pa /usr/obj +by setting the +.Pa MAKEOBJDIRPREFIX +.Xr make 1 +variable. .It Cm installkernel Install the kernel and the kernel modules to directory .Pa ${DESTDIR}/boot/kernel , @@ -331,7 +343,7 @@ should be set as with .Dq Li "make installworld" . .It Cm delete-old-libs Delete obsolete base system libraries interactively. -This target should only be used if no 3rd party software uses these +This target should only be used if no third party software uses these libraries. When .Li -DBATCH_DELETE_OLD_FILES @@ -525,7 +537,7 @@ on built objects. .It Va NO_SHARE If set, the build does not descend into the .Pa /usr/src/share -subdirectory (i.e., manpages, locale data files, timezone data files and +subdirectory (i.e., manual pages, locale data files, timezone data files and other .Pa /usr/src/share files will not be rebuild from their sources). diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 43bb023..c18042b 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -682,7 +682,7 @@ init_secondary(void) wrmsr(MSR_FSBASE, 0); /* User value */ wrmsr(MSR_GSBASE, (u_int64_t)pc); wrmsr(MSR_KGSBASE, (u_int64_t)pc); /* XXX User value while we're in the kernel */ - intel_fix_cpuid(); + fix_cpuid(); lidt(&r_idt); diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h index cc95db1..36a6d7f 100644 --- a/sys/amd64/include/md_var.h +++ b/sys/amd64/include/md_var.h @@ -112,7 +112,7 @@ void dump_drop_page(vm_paddr_t); void identify_cpu(void); void initializecpu(void); void initializecpucache(void); -bool intel_fix_cpuid(void); +bool fix_cpuid(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); void fpstate_drop(struct thread *td); int is_physical_memory(vm_paddr_t addr); diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 68f7881..1d0d9ce 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -2447,6 +2447,7 @@ ctl_copyin_args(int num_args, struct ctl_be_arg *uargs, && (tmpptr[args[i].vallen - 1] != '\0')) { snprintf(error_str, error_str_len, "Argument " "%d value is not NUL-terminated", i); + free(tmpptr, M_CTL); goto bailout; } args[i].kvalue = tmpptr; diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c index 9266ffc..ed99c4b 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c @@ -9295,6 +9295,10 @@ dtrace_helper_provide_one(dof_helper_t *dhp, dof_sec_t *sec, pid_t pid) probe = (dof_probe_t *)(uintptr_t)(daddr + prb_sec->dofs_offset + i * prb_sec->dofs_entsize); + /* See the check in dtrace_helper_provider_validate(). */ + if (strlen(strtab + probe->dofpr_func) >= DTRACE_FUNCNAMELEN) + continue; + dhpb.dthpb_mod = dhp->dofhp_mod; dhpb.dthpb_func = strtab + probe->dofpr_func; dhpb.dthpb_name = strtab + probe->dofpr_name; @@ -15805,7 +15809,13 @@ dtrace_helper_provider_validate(dof_hdr_t *dof, dof_sec_t *sec) if (strlen(strtab + probe->dofpr_func) >= DTRACE_FUNCNAMELEN) { dtrace_dof_error(dof, "function name too long"); - return (-1); + /* + * Keep going if the function name is too long. + * Unlike provider and probe names, we cannot reasonably + * impose restrictions on function names, since they're + * a property of the code being instrumented. We will + * skip this probe in dtrace_helper_provide_one(). + */ } if (probe->dofpr_name >= str_sec->dofs_size || diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c index 84b72d2..c94a3ba 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c @@ -63,14 +63,16 @@ #ifndef illumos #include <sys/dtrace_bsd.h> #include <sys/eventhandler.h> +#include <sys/rmlock.h> #include <sys/sysctl.h> #include <sys/u8_textprep.h> #include <sys/user.h> + #include <vm/vm.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_param.h> -#include <sys/u8_textprep.h> + #include <cddl/dev/dtrace/dtrace_cddl.h> #endif @@ -225,7 +227,7 @@ static void fasttrap_thread_dtor(void *, struct thread *); #define FASTTRAP_PROCS_INDEX(pid) ((pid) & fasttrap_procs.fth_mask) #ifndef illumos -static kmutex_t fasttrap_cpuc_pid_lock[MAXCPU]; +struct rmlock fasttrap_tp_lock; static eventhandler_tag fasttrap_thread_dtor_tag; #endif @@ -440,10 +442,15 @@ fasttrap_mod_barrier(uint64_t gen) fasttrap_mod_gen++; +#ifdef illumos CPU_FOREACH(i) { mutex_enter(&fasttrap_cpuc_pid_lock[i]); mutex_exit(&fasttrap_cpuc_pid_lock[i]); } +#else + rm_wlock(&fasttrap_tp_lock); + rm_wunlock(&fasttrap_tp_lock); +#endif } /* @@ -2565,10 +2572,7 @@ fasttrap_load(void) mutex_init(&fasttrap_procs.fth_table[i].ftb_mtx, "processes bucket mtx", MUTEX_DEFAULT, NULL); - CPU_FOREACH(i) { - mutex_init(&fasttrap_cpuc_pid_lock[i], "fasttrap barrier", - MUTEX_DEFAULT, NULL); - } + rm_init(&fasttrap_tp_lock, "fasttrap tracepoint"); /* * This event handler must run before kdtrace_thread_dtor() since it @@ -2701,9 +2705,7 @@ fasttrap_unload(void) #ifndef illumos destroy_dev(fasttrap_cdev); mutex_destroy(&fasttrap_count_mtx); - CPU_FOREACH(i) { - mutex_destroy(&fasttrap_cpuc_pid_lock[i]); - } + rm_destroy(&fasttrap_tp_lock); #endif return (0); diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c index f135af70..b089ce1 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c @@ -133,11 +133,13 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, sync_pass_rewrite, CTLFLAG_RDTUN, boolean_t zio_requeue_io_start_cut_in_line = B_TRUE; +#ifdef illumos #ifdef ZFS_DEBUG int zio_buf_debug_limit = 16384; #else int zio_buf_debug_limit = 0; #endif +#endif void zio_init(void) @@ -159,7 +161,7 @@ zio_init(void) size_t size = (c + 1) << SPA_MINBLOCKSHIFT; size_t p2 = size; size_t align = 0; - size_t cflags = (size > zio_buf_debug_limit) ? KMC_NODEBUG : 0; + int cflags = zio_exclude_metadata ? KMC_NODEBUG : 0; while (!ISP2(p2)) p2 &= p2 - 1; diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h b/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h index cae9193..c104e79 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h @@ -206,6 +206,10 @@ extern fasttrap_scrspace_t *fasttrap_scraddr(struct thread *, extern dtrace_id_t fasttrap_probe_id; extern fasttrap_hash_t fasttrap_tpoints; +#ifndef illumos +extern struct rmlock fasttrap_tp_lock; +#endif + #define FASTTRAP_TPOINTS_INDEX(pid, pc) \ (((pc) / sizeof (fasttrap_instr_t) + (pid)) & fasttrap_tpoints.fth_mask) diff --git a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c index 5d60a07..cd7c9c1 100644 --- a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c +++ b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c @@ -46,6 +46,7 @@ #include <cddl/dev/dtrace/dtrace_cddl.h> #include <sys/types.h> #include <sys/proc.h> +#include <sys/rmlock.h> #include <sys/dtrace_bsd.h> #include <cddl/dev/dtrace/x86/regset.h> #include <machine/segments.h> @@ -749,11 +750,13 @@ fasttrap_return_common(struct reg *rp, uintptr_t pc, pid_t pid, fasttrap_id_t *id; #ifdef illumos kmutex_t *pid_mtx; -#endif -#ifdef illumos pid_mtx = &cpu_core[CPU->cpu_id].cpuc_pid_lock; mutex_enter(pid_mtx); +#else + struct rm_priotracker tracker; + + rm_rlock(&fasttrap_tp_lock, &tracker); #endif bucket = &fasttrap_tpoints.fth_table[FASTTRAP_TPOINTS_INDEX(pid, pc)]; @@ -771,6 +774,8 @@ fasttrap_return_common(struct reg *rp, uintptr_t pc, pid_t pid, if (tp == NULL) { #ifdef illumos mutex_exit(pid_mtx); +#else + rm_runlock(&fasttrap_tp_lock, &tracker); #endif return; } @@ -794,6 +799,8 @@ fasttrap_return_common(struct reg *rp, uintptr_t pc, pid_t pid, #ifdef illumos mutex_exit(pid_mtx); +#else + rm_runlock(&fasttrap_tp_lock, &tracker); #endif } @@ -1002,6 +1009,7 @@ fasttrap_pid_probe(struct reg *rp) { proc_t *p = curproc; #ifndef illumos + struct rm_priotracker tracker; proc_t *pp; #endif uintptr_t pc = rp->r_rip - 1; @@ -1061,8 +1069,7 @@ fasttrap_pid_probe(struct reg *rp) sx_sunlock(&proctree_lock); pp = NULL; - PROC_LOCK(p); - _PHOLD(p); + rm_rlock(&fasttrap_tp_lock, &tracker); #endif bucket = &fasttrap_tpoints.fth_table[FASTTRAP_TPOINTS_INDEX(pid, pc)]; @@ -1085,8 +1092,7 @@ fasttrap_pid_probe(struct reg *rp) #ifdef illumos mutex_exit(pid_mtx); #else - _PRELE(p); - PROC_UNLOCK(p); + rm_runlock(&fasttrap_tp_lock, &tracker); #endif return (-1); } @@ -1212,7 +1218,7 @@ fasttrap_pid_probe(struct reg *rp) #ifdef illumos mutex_exit(pid_mtx); #else - PROC_UNLOCK(p); + rm_runlock(&fasttrap_tp_lock, &tracker); #endif tp = &tp_local; @@ -1825,7 +1831,6 @@ done: #ifndef illumos PROC_LOCK(p); proc_write_regs(curthread, rp); - _PRELE(p); PROC_UNLOCK(p); #endif diff --git a/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c index f076f5d..3b19cc7 100644 --- a/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c +++ b/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c @@ -33,6 +33,7 @@ #include <sys/types.h> #include <sys/uio.h> #include <sys/ptrace.h> +#include <sys/rmlock.h> #include <sys/sysent.h> #define OP(x) ((x) >> 26) @@ -302,10 +303,12 @@ static void fasttrap_return_common(struct reg *rp, uintptr_t pc, pid_t pid, uintptr_t new_pc) { + struct rm_priotracker tracker; fasttrap_tracepoint_t *tp; fasttrap_bucket_t *bucket; fasttrap_id_t *id; + rm_rlock(&fasttrap_tp_lock, &tracker); bucket = &fasttrap_tpoints.fth_table[FASTTRAP_TPOINTS_INDEX(pid, pc)]; for (tp = bucket->ftb_data; tp != NULL; tp = tp->ftt_next) { @@ -320,6 +323,7 @@ fasttrap_return_common(struct reg *rp, uintptr_t pc, pid_t pid, * is not essential to the correct execution of the process. */ if (tp == NULL) { + rm_runlock(&fasttrap_tp_lock, &tracker); return; } @@ -337,6 +341,7 @@ fasttrap_return_common(struct reg *rp, uintptr_t pc, pid_t pid, pc - id->fti_probe->ftp_faddr, rp->fixreg[3], rp->fixreg[4], 0, 0); } + rm_runlock(&fasttrap_tp_lock, &tracker); } @@ -365,6 +370,7 @@ fasttrap_branch_taken(int bo, int bi, struct reg *regs) int fasttrap_pid_probe(struct reg *rp) { + struct rm_priotracker tracker; proc_t *p = curproc; uintptr_t pc = rp->pc; uintptr_t new_pc = 0; @@ -395,8 +401,7 @@ fasttrap_pid_probe(struct reg *rp) curthread->t_dtrace_scrpc = 0; curthread->t_dtrace_astpc = 0; - - PROC_LOCK(p); + rm_rlock(&fasttrap_tp_lock, &tracker); pid = p->p_pid; bucket = &fasttrap_tpoints.fth_table[FASTTRAP_TPOINTS_INDEX(pid, pc)]; @@ -415,7 +420,7 @@ fasttrap_pid_probe(struct reg *rp) * fasttrap_ioctl), or somehow we have mislaid this tracepoint. */ if (tp == NULL) { - PROC_UNLOCK(p); + rm_runlock(&fasttrap_tp_lock, &tracker); return (-1); } @@ -469,7 +474,7 @@ fasttrap_pid_probe(struct reg *rp) * tracepoint again later if we need to light up any return probes. */ tp_local = *tp; - PROC_UNLOCK(p); + rm_runlock(&fasttrap_tp_lock, &tracker); tp = &tp_local; /* diff --git a/sys/cddl/dev/sdt/sdt.c b/sys/cddl/dev/sdt/sdt.c index 3681d72..bd2896f 100644 --- a/sys/cddl/dev/sdt/sdt.c +++ b/sys/cddl/dev/sdt/sdt.c @@ -381,28 +381,20 @@ sdt_unload() static int sdt_modevent(module_t mod __unused, int type, void *data __unused) { - int error = 0; switch (type) { case MOD_LOAD: - sdt_load(); - break; - case MOD_UNLOAD: - error = sdt_unload(); - break; - case MOD_SHUTDOWN: - break; - + return (0); default: - error = EOPNOTSUPP; - break; + return (EOPNOTSUPP); } - - return (error); } +SYSINIT(sdt_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, sdt_load, NULL); +SYSUNINIT(sdt_unload, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, sdt_unload, NULL); + DEV_MODULE(sdt, sdt_modevent, NULL); MODULE_VERSION(sdt, 1); MODULE_DEPEND(sdt, dtrace, 1, 1, 1); diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 9142c93..bf0610b 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include <sys/proc.h> #include <sys/ptrace.h> #include <sys/resourcevar.h> +#include <sys/resource.h> #include <sys/sbuf.h> #include <sys/sem.h> #include <sys/smp.h> @@ -858,10 +859,20 @@ linprocfs_doprocstatus(PFS_FILL_ARGS) static int linprocfs_doproccwd(PFS_FILL_ARGS) { + struct filedesc *fdp; + struct vnode *vp; char *fullpath = "unknown"; char *freepath = NULL; - vn_fullpath(td, p->p_fd->fd_cdir, &fullpath, &freepath); + fdp = p->p_fd; + FILEDESC_SLOCK(fdp); + vp = fdp->fd_cdir; + if (vp != NULL) + VREF(vp); + FILEDESC_SUNLOCK(fdp); + vn_fullpath(td, vp, &fullpath, &freepath); + if (vp != NULL) + vrele(vp); sbuf_printf(sb, "%s", fullpath); if (freepath) free(freepath, M_TEMP); @@ -874,12 +885,20 @@ linprocfs_doproccwd(PFS_FILL_ARGS) static int linprocfs_doprocroot(PFS_FILL_ARGS) { - struct vnode *rvp; + struct filedesc *fdp; + struct vnode *vp; char *fullpath = "unknown"; char *freepath = NULL; - rvp = jailed(p->p_ucred) ? p->p_fd->fd_jdir : p->p_fd->fd_rdir; - vn_fullpath(td, rvp, &fullpath, &freepath); + fdp = p->p_fd; + FILEDESC_SLOCK(fdp); + vp = jailed(p->p_ucred) ? fdp->fd_jdir : fdp->fd_rdir; + if (vp != NULL) + VREF(vp); + FILEDESC_SUNLOCK(fdp); + vn_fullpath(td, vp, &fullpath, &freepath); + if (vp != NULL) + vrele(vp); sbuf_printf(sb, "%s", fullpath); if (freepath) free(freepath, M_TEMP); @@ -1332,6 +1351,97 @@ linprocfs_dofdescfs(PFS_FILL_ARGS) return (0); } +/* + * Filler function for proc/pid/limits + */ +static const struct linux_rlimit_ident { + const char *desc; + const char *unit; + unsigned int rlim_id; +} linux_rlimits_ident[] = { + { "Max cpu time", "seconds", RLIMIT_CPU }, + { "Max file size", "bytes", RLIMIT_FSIZE }, + { "Max data size", "bytes", RLIMIT_DATA }, + { "Max stack size", "bytes", RLIMIT_STACK }, + { "Max core file size", "bytes", RLIMIT_CORE }, + { "Max resident set", "bytes", RLIMIT_RSS }, + { "Max processes", "processes", RLIMIT_NPROC }, + { "Max open files", "files", RLIMIT_NOFILE }, + { "Max locked memory", "bytes", RLIMIT_MEMLOCK }, + { "Max address space", "bytes", RLIMIT_AS }, + { "Max file locks", "locks", LINUX_RLIMIT_LOCKS }, + { "Max pending signals", "signals", LINUX_RLIMIT_SIGPENDING }, + { "Max msgqueue size", "bytes", LINUX_RLIMIT_MSGQUEUE }, + { "Max nice priority", "", LINUX_RLIMIT_NICE }, + { "Max realtime priority", "", LINUX_RLIMIT_RTPRIO }, + { "Max realtime timeout", "us", LINUX_RLIMIT_RTTIME }, + { 0, 0, 0 } +}; + +static int +linprocfs_doproclimits(PFS_FILL_ARGS) +{ + const struct linux_rlimit_ident *li; + struct plimit *limp; + struct rlimit rl; + ssize_t size; + int res, error; + + error = 0; + + PROC_LOCK(p); + limp = lim_hold(p->p_limit); + PROC_UNLOCK(p); + size = sizeof(res); + sbuf_printf(sb, "%-26s%-21s%-21s%-21s\n", "Limit", "Soft Limit", + "Hard Limit", "Units"); + for (li = linux_rlimits_ident; li->desc != NULL; ++li) { + switch (li->rlim_id) + { + case LINUX_RLIMIT_LOCKS: + /* FALLTHROUGH */ + case LINUX_RLIMIT_RTTIME: + rl.rlim_cur = RLIM_INFINITY; + break; + case LINUX_RLIMIT_SIGPENDING: + error = kernel_sysctlbyname(td, + "kern.sigqueue.max_pending_per_proc", + &res, &size, 0, 0, 0, 0); + if (error != 0) + goto out; + rl.rlim_cur = res; + rl.rlim_max = res; + break; + case LINUX_RLIMIT_MSGQUEUE: + error = kernel_sysctlbyname(td, + "kern.ipc.msgmnb", &res, &size, 0, 0, 0, 0); + if (error != 0) + goto out; + rl.rlim_cur = res; + rl.rlim_max = res; + break; + case LINUX_RLIMIT_NICE: + /* FALLTHROUGH */ + case LINUX_RLIMIT_RTPRIO: + rl.rlim_cur = 0; + rl.rlim_max = 0; + break; + default: + rl = limp->pl_rlimit[li->rlim_id]; + break; + } + if (rl.rlim_cur == RLIM_INFINITY) + sbuf_printf(sb, "%-26s%-21s%-21s%-10s\n", + li->desc, "unlimited", "unlimited", li->unit); + else + sbuf_printf(sb, "%-26s%-21llu%-21llu%-10s\n", + li->desc, (unsigned long long)rl.rlim_cur, + (unsigned long long)rl.rlim_max, li->unit); + } +out: + lim_free(limp); + return (error); +} /* * Filler function for proc/sys/kernel/random/uuid @@ -1470,6 +1580,8 @@ linprocfs_init(PFS_INIT_ARGS) NULL, NULL, NULL, 0); pfs_create_file(dir, "auxv", &linprocfs_doauxv, NULL, &procfs_candebug, NULL, PFS_RD|PFS_RAWRD); + pfs_create_file(dir, "limits", &linprocfs_doproclimits, + NULL, NULL, NULL, PFS_RD); /* /proc/scsi/... */ dir = pfs_create_dir(root, "scsi", NULL, NULL, NULL, 0); diff --git a/sys/compat/linux/linux_misc.h b/sys/compat/linux/linux_misc.h index f969c4d..d140c67 100644 --- a/sys/compat/linux/linux_misc.h +++ b/sys/compat/linux/linux_misc.h @@ -141,6 +141,13 @@ extern int stclohz; #define LINUX_P_PID 1 #define LINUX_P_PGID 2 +#define LINUX_RLIMIT_LOCKS RLIM_NLIMITS + 1 +#define LINUX_RLIMIT_SIGPENDING RLIM_NLIMITS + 2 +#define LINUX_RLIMIT_MSGQUEUE RLIM_NLIMITS + 3 +#define LINUX_RLIMIT_NICE RLIM_NLIMITS + 4 +#define LINUX_RLIMIT_RTPRIO RLIM_NLIMITS + 5 +#define LINUX_RLIMIT_RTTIME RLIM_NLIMITS + 6 + #define LINUX_RLIM_INFINITY (~0UL) int linux_common_wait(struct thread *td, int pid, int *status, diff --git a/sys/compat/ndis/subr_ndis.c b/sys/compat/ndis/subr_ndis.c index bc13b2f..d9fe3ee 100644 --- a/sys/compat/ndis/subr_ndis.c +++ b/sys/compat/ndis/subr_ndis.c @@ -895,7 +895,7 @@ NdisReadPciSlotInformation(adapter, slot, offset, buf, len) uint32_t len; { ndis_miniport_block *block; - int i; + uint32_t i; char *dest; device_t dev; @@ -938,7 +938,7 @@ NdisWritePciSlotInformation(adapter, slot, offset, buf, len) uint32_t len; { ndis_miniport_block *block; - int i; + uint32_t i; char *dest; device_t dev; @@ -2431,7 +2431,7 @@ NdisReadPcmciaAttributeMemory(handle, offset, buf, len) bus_space_handle_t bh; bus_space_tag_t bt; char *dest; - int i; + uint32_t i; if (handle == NULL) return (0); @@ -2461,7 +2461,7 @@ NdisWritePcmciaAttributeMemory(handle, offset, buf, len) bus_space_handle_t bh; bus_space_tag_t bt; char *src; - int i; + uint32_t i; if (handle == NULL) return (0); @@ -2669,7 +2669,7 @@ ndis_find_sym(lf, filename, suffix, sym) { char *fullsym; char *suf; - int i; + u_int i; fullsym = ExAllocatePoolWithTag(NonPagedPool, MAXPATHLEN, 0); if (fullsym == NULL) diff --git a/sys/compat/svr4/svr4_ipc.c b/sys/compat/svr4/svr4_ipc.c index 579c48b..3834d55 100644 --- a/sys/compat/svr4/svr4_ipc.c +++ b/sys/compat/svr4/svr4_ipc.c @@ -86,14 +86,10 @@ __FBSDID("$FreeBSD$"); #include <compat/svr4/svr4_util.h> #include <compat/svr4/svr4_ipc.h> -#if defined(SYSVMSG) || defined(SYSVSHM) || defined(SYSVSEM) static void svr4_to_bsd_ipc_perm(const struct svr4_ipc_perm *, struct ipc_perm *); static void bsd_to_svr4_ipc_perm(const struct ipc_perm *, struct svr4_ipc_perm *); -#endif - -#ifdef SYSVSEM static void bsd_to_svr4_semid_ds(const struct semid_ds *, struct svr4_semid_ds *); static void svr4_to_bsd_semid_ds(const struct svr4_semid_ds *, @@ -101,9 +97,6 @@ static void svr4_to_bsd_semid_ds(const struct svr4_semid_ds *, static int svr4_semop(struct thread *, void *); static int svr4_semget(struct thread *, void *); static int svr4_semctl(struct thread *, void *); -#endif - -#ifdef SYSVMSG static void bsd_to_svr4_msqid_ds(const struct msqid_ds *, struct svr4_msqid_ds *); static void svr4_to_bsd_msqid_ds(const struct svr4_msqid_ds *, @@ -112,9 +105,6 @@ static int svr4_msgsnd(struct thread *, void *); static int svr4_msgrcv(struct thread *, void *); static int svr4_msgget(struct thread *, void *); static int svr4_msgctl(struct thread *, void *); -#endif - -#ifdef SYSVSHM static void bsd_to_svr4_shmid_ds(const struct shmid_ds *, struct svr4_shmid_ds *); static void svr4_to_bsd_shmid_ds(const struct svr4_shmid_ds *, @@ -123,9 +113,6 @@ static int svr4_shmat(struct thread *, void *); static int svr4_shmdt(struct thread *, void *); static int svr4_shmget(struct thread *, void *); static int svr4_shmctl(struct thread *, void *); -#endif - -#if defined(SYSVMSG) || defined(SYSVSHM) || defined(SYSVSEM) static void svr4_to_bsd_ipc_perm(spp, bpp) @@ -154,9 +141,7 @@ bsd_to_svr4_ipc_perm(bpp, spp) spp->mode = bpp->mode; spp->seq = bpp->seq; } -#endif -#ifdef SYSVSEM static void bsd_to_svr4_semid_ds(bds, sds) const struct semid_ds *bds; @@ -331,10 +316,7 @@ svr4_sys_semsys(td, uap) } } -MODULE_DEPEND(svr4elf, sysvsem, 1, 1, 1); -#endif -#ifdef SYSVMSG static void bsd_to_svr4_msqid_ds(bds, sds) const struct msqid_ds *bds; @@ -421,7 +403,7 @@ svr4_msgrcv(td, v) return sys_msgrcv(td, &ap); } - + struct svr4_sys_msgget_args { int what; svr4_key_t key; @@ -504,10 +486,6 @@ svr4_sys_msgsys(td, uap) } } -MODULE_DEPEND(svr4elf, sysvmsg, 1, 1, 1); -#endif - -#ifdef SYSVSHM static void bsd_to_svr4_shmid_ds(bds, sds) @@ -657,7 +635,7 @@ svr4_shmctl(td, v) default: return (EINVAL); } - + error = kern_shmctl(td, uap->shmid, cmd, &bs, &bufsize); if (error) return (error); @@ -697,4 +675,5 @@ svr4_sys_shmsys(td, uap) } MODULE_DEPEND(svr4elf, sysvshm, 1, 1, 1); -#endif /* SYSVSHM */ +MODULE_DEPEND(svr4elf, sysvmsg, 1, 1, 1); +MODULE_DEPEND(svr4elf, sysvsem, 1, 1, 1); diff --git a/sys/compat/svr4/svr4_socket.c b/sys/compat/svr4/svr4_socket.c index 038267c..736f618 100644 --- a/sys/compat/svr4/svr4_socket.c +++ b/sys/compat/svr4/svr4_socket.c @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include <compat/svr4/svr4_signal.h> #include <compat/svr4/svr4_sockmod.h> #include <compat/svr4/svr4_proto.h> +#include <compat/svr4/svr4_stropts.h> struct svr4_sockcache_entry { struct proc *p; /* Process for the socket */ @@ -168,6 +169,19 @@ svr4_delete_socket(p, fp) mtx_unlock(&svr4_sockcache_lock); } +struct svr4_strm * +svr4_stream_get(fp) + struct file *fp; +{ + struct socket *so; + + if (fp == NULL || fp->f_type != DTYPE_SOCKET) + return NULL; + + so = fp->f_data; + return so->so_emuldata; +} + void svr4_purge_sockcache(arg, p) void *arg; diff --git a/sys/compat/svr4/svr4_sysvec.c b/sys/compat/svr4/svr4_sysvec.c index 8b339c8..362604b 100644 --- a/sys/compat/svr4/svr4_sysvec.c +++ b/sys/compat/svr4/svr4_sysvec.c @@ -313,4 +313,4 @@ static moduledata_t svr4_elf_mod = { 0 }; DECLARE_MODULE_TIED(svr4elf, svr4_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY); -MODULE_DEPEND(svr4elf, streams, 1, 1, 1); +MODULE_VERSION(svr4elf, 1); diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c index 1e53ac3..69e6ec5 100644 --- a/sys/dev/aac/aac.c +++ b/sys/dev/aac/aac.c @@ -3103,18 +3103,30 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t arg) /* Retrieve correct SG entries. */ if (fibsize == (sizeof(struct aac_srb) + srbcmd->sg_map.SgCount * sizeof(struct aac_sg_entry))) { + struct aac_sg_entry sg; + sge = srbcmd->sg_map.SgEntry; sge64 = NULL; - srb_sg_bytecount = sge->SgByteCount; - srb_sg_address = (void *)(uintptr_t)sge->SgAddress; + + if ((error = copyin(sge, &sg, sizeof(sg))) != 0) + goto out; + + srb_sg_bytecount = sg.SgByteCount; + srb_sg_address = (void *)(uintptr_t)sg.SgAddress; } #ifdef __amd64__ else if (fibsize == (sizeof(struct aac_srb) + srbcmd->sg_map.SgCount * sizeof(struct aac_sg_entry64))) { + struct aac_sg_entry64 sg; + sge = NULL; sge64 = (struct aac_sg_entry64 *)srbcmd->sg_map.SgEntry; - srb_sg_bytecount = sge64->SgByteCount; - srb_sg_address = (void *)sge64->SgAddress; + + if ((error = copyin(sge64, &sg, sizeof(sg))) != 0) + goto out; + + srb_sg_bytecount = sg.SgByteCount; + srb_sg_address = (void *)sg.SgAddress; if (sge64->SgAddress > 0xffffffffull && (sc->flags & AAC_FLAGS_SG_64BIT) == 0) { error = EINVAL; diff --git a/sys/dev/aacraid/aacraid.c b/sys/dev/aacraid/aacraid.c index 7c300a6..b0ab8a1 100644 --- a/sys/dev/aacraid/aacraid.c +++ b/sys/dev/aacraid/aacraid.c @@ -2873,15 +2873,25 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t arg) if (fibsize == (sizeof(struct aac_srb) + srbcmd->sg_map.SgCount * sizeof(struct aac_sg_entry))) { struct aac_sg_entry *sgp = srbcmd->sg_map.SgEntry; - srb_sg_bytecount = sgp->SgByteCount; - srb_sg_address = (u_int64_t)sgp->SgAddress; + struct aac_sg_entry sg; + + if ((error = copyin(sgp, &sg, sizeof(sg))) != 0) + goto out; + + srb_sg_bytecount = sg.SgByteCount; + srb_sg_address = (u_int64_t)sg.SgAddress; } else if (fibsize == (sizeof(struct aac_srb) + srbcmd->sg_map.SgCount * sizeof(struct aac_sg_entry64))) { #ifdef __LP64__ struct aac_sg_entry64 *sgp = (struct aac_sg_entry64 *)srbcmd->sg_map.SgEntry; - srb_sg_bytecount = sgp->SgByteCount; - srb_sg_address = sgp->SgAddress; + struct aac_sg_entry64 sg; + + if ((error = copyin(sgp, &sg, sizeof(sg))) != 0) + goto out; + + srb_sg_bytecount = sg.SgByteCount; + srb_sg_address = sg.SgAddress; if (srb_sg_address > 0xffffffffull && !(sc->flags & AAC_FLAGS_SG_64BIT)) #endif diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index b77d0e9..a81cf58 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -2099,7 +2099,7 @@ retry: txr->tx_tso = FALSE; } - if (nsegs > (txr->tx_avail - EM_MAX_SCATTER)) { + if (txr->tx_avail < (nsegs + EM_MAX_SCATTER)) { txr->no_desc_avail++; bus_dmamap_unload(txr->txtag, map); return (ENOBUFS); diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c index 4945950..ab445f6 100644 --- a/sys/dev/e1000/if_igb.c +++ b/sys/dev/e1000/if_igb.c @@ -1829,7 +1829,7 @@ retry: } /* Make certain there are enough descriptors */ - if (nsegs > txr->tx_avail - 2) { + if (txr->tx_avail < (nsegs + 2)) { txr->no_desc_avail++; bus_dmamap_unload(txr->txtag, map); return (ENOBUFS); diff --git a/sys/dev/e1000/if_lem.c b/sys/dev/e1000/if_lem.c index 9d3be4c..b8310a1 100644 --- a/sys/dev/e1000/if_lem.c +++ b/sys/dev/e1000/if_lem.c @@ -1694,7 +1694,7 @@ lem_xmit(struct adapter *adapter, struct mbuf **m_headp) return (error); } - if (nsegs > (adapter->num_tx_desc_avail - 2)) { + if (adapter->num_tx_desc_avail < (nsegs + 2)) { adapter->no_tx_desc_avail2++; bus_dmamap_unload(adapter->txtag, map); return (ENOBUFS); diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c index d26810d..442eb9c 100644 --- a/sys/dev/firewire/fwdev.c +++ b/sys/dev/firewire/fwdev.c @@ -98,7 +98,6 @@ struct cdevsw firewire_cdevsw = { .d_mmap = fw_mmap, .d_strategy = fw_strategy, .d_name = "fw", - .d_flags = D_MEM #else #define CDEV_MAJOR 127 fw_open, fw_close, fw_read, fw_write, fw_ioctl, diff --git a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c index 7582aec..0159a9d 100644 --- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c +++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c @@ -1273,6 +1273,7 @@ storvsc_timeout_test(struct hv_storvsc_request *reqp, } #endif /* HVS_TIMEOUT_TEST */ +#ifdef notyet /** * @brief timeout handler for requests * @@ -1320,6 +1321,7 @@ storvsc_timeout(void *arg) storvsc_timeout_test(reqp, MODE_SELECT_10, 1); #endif } +#endif /** * @brief StorVSC device poll function @@ -1472,6 +1474,7 @@ storvsc_action(struct cam_sim *sim, union ccb *ccb) return; } +#ifdef notyet if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) { callout_init(&reqp->callout, CALLOUT_MPSAFE); callout_reset_sbt(&reqp->callout, @@ -1491,6 +1494,7 @@ storvsc_action(struct cam_sim *sim, union ccb *ccb) } #endif /* HVS_TIMEOUT_TEST */ } +#endif if ((res = hv_storvsc_io_request(sc->hs_dev, reqp)) != 0) { xpt_print(ccb->ccb_h.path, @@ -2039,6 +2043,7 @@ storvsc_io_done(struct hv_storvsc_request *reqp) mtx_unlock(&sc->hs_lock); } +#ifdef notyet /* * callout_drain() will wait for the timer handler to finish * if it is running. So we don't need any lock to synchronize @@ -2049,6 +2054,7 @@ storvsc_io_done(struct hv_storvsc_request *reqp) if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) { callout_drain(&reqp->callout); } +#endif ccb->ccb_h.status &= ~CAM_SIM_QUEUED; ccb->ccb_h.status &= ~CAM_STATUS_MASK; diff --git a/sys/dev/ixgbe/ix_txrx.c b/sys/dev/ixgbe/ix_txrx.c index 8c311c1..70c7701 100644 --- a/sys/dev/ixgbe/ix_txrx.c +++ b/sys/dev/ixgbe/ix_txrx.c @@ -404,7 +404,7 @@ retry: } /* Make certain there are enough descriptors */ - if (nsegs > txr->tx_avail - 2) { + if (txr->tx_avail < (nsegs + 2)) { txr->no_desc_avail++; bus_dmamap_unload(txr->txtag, map); return (ENOBUFS); diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index 83793d5..8136e57 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -542,6 +542,7 @@ struct mlx5_core_dev { atomic_t num_qps; u32 issi; struct mlx5_special_contexts special_contexts; + unsigned int module_status[MLX5_MAX_PORTS]; }; enum { @@ -835,6 +836,7 @@ int mlx5_set_port_mtu(struct mlx5_core_dev *dev, int mtu); int mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, int *max_mtu); int mlx5_query_port_oper_mtu(struct mlx5_core_dev *dev, int *oper_mtu); +unsigned int mlx5_query_module_status(struct mlx5_core_dev *dev, int module_num); int mlx5_query_module_num(struct mlx5_core_dev *dev, int *module_num); int mlx5_query_eeprom(struct mlx5_core_dev *dev, int i2c_addr, int page_num, int device_addr, int size, int module_num, u32 *data, diff --git a/sys/dev/mlx5/mlx5_core/mlx5_eq.c b/sys/dev/mlx5/mlx5_core/mlx5_eq.c index 0cbfc31..e314bb9 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_eq.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_eq.c @@ -581,6 +581,13 @@ static const char *mlx5_port_module_event_error_type_to_string(u8 error_type) } } +unsigned int mlx5_query_module_status(struct mlx5_core_dev *dev, int module_num) +{ + if (module_num < 0 || module_num >= MLX5_MAX_PORTS) + return 0; /* undefined */ + return dev->module_status[module_num]; +} + static void mlx5_port_module_event(struct mlx5_core_dev *dev, struct mlx5_eqe *eqe) { @@ -614,5 +621,8 @@ static void mlx5_port_module_event(struct mlx5_core_dev *dev, default: device_printf((&pdev->dev)->bsddev, "INFO: ""Module %u, unknown status", module_num); } + /* store module status */ + if (module_num < MLX5_MAX_PORTS) + dev->module_status[module_num] = module_status; } diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 3676910..a76d32e 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -2559,9 +2559,15 @@ out: if (error) { if_printf(ifp, "Query module num failed, eeprom " "reading is not supported\n"); + error = EINVAL; + goto err_i2c; + } + /* Check if module is present before doing an access */ + if (mlx5_query_module_status(priv->mdev, module_num) != + MLX5_MODULE_STATUS_PLUGGED) { + error = EINVAL; goto err_i2c; } - /* * Currently 0XA0 and 0xA2 are the only addresses permitted. * The internal conversion is as follows: @@ -2583,6 +2589,7 @@ out: if (error) { if_printf(ifp, "Query eeprom failed, eeprom " "reading is not supported\n"); + error = EINVAL; goto err_i2c; } @@ -2596,6 +2603,7 @@ out: if (error) { if_printf(ifp, "Query eeprom failed, eeprom " "reading is not supported\n"); + error = EINVAL; goto err_i2c; } diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c index 3ddbcc7..7b4dcb9 100644 --- a/sys/dev/streams/streams.c +++ b/sys/dev/streams/streams.c @@ -176,6 +176,7 @@ static moduledata_t streams_mod = { }; DECLARE_MODULE(streams, streams_mod, SI_SUB_DRIVERS, SI_ORDER_ANY); MODULE_VERSION(streams, 1); +MODULE_DEPEND(streams, svr4elf, 1, 1, 1); /* * We only need open() and close() routines. open() calls socreate() @@ -329,19 +330,6 @@ svr4_ptm_alloc(td) } -struct svr4_strm * -svr4_stream_get(fp) - struct file *fp; -{ - struct socket *so; - - if (fp == NULL || fp->f_type != DTYPE_SOCKET) - return NULL; - - so = fp->f_data; - return so->so_emuldata; -} - static int svr4_soo_close(struct file *fp, struct thread *td) { diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index a45e07d..c0d135d 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -1409,7 +1409,7 @@ devfs_revoke(struct vop_revoke_args *ap) struct cdev *dev; struct cdev_priv *cdp; struct devfs_dirent *de; - int i; + u_int i; KASSERT((ap->a_flags & REVOKEALL) != 0, ("devfs_revoke !REVOKEALL")); diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h index eea9df0..1e0c0ba 100644 --- a/sys/fs/nfs/nfsport.h +++ b/sys/fs/nfs/nfsport.h @@ -787,12 +787,14 @@ MALLOC_DECLARE(M_NEWNFSDSESSION); /* * Set the n_time in the client write rpc, as required. */ -#define NFSWRITERPC_SETTIME(w, n, v4) \ +#define NFSWRITERPC_SETTIME(w, n, a, v4) \ do { \ if (w) { \ - (n)->n_mtime = (n)->n_vattr.na_vattr.va_mtime; \ + mtx_lock(&((n)->n_mtx)); \ + (n)->n_mtime = (a)->na_mtime; \ if (v4) \ - (n)->n_change = (n)->n_vattr.na_vattr.va_filerev; \ + (n)->n_change = (a)->na_filerev; \ + mtx_unlock(&((n)->n_mtx)); \ } \ } while (0) diff --git a/sys/fs/nfs/nfsrvstate.h b/sys/fs/nfs/nfsrvstate.h index 6d32244..42254ab 100644 --- a/sys/fs/nfs/nfsrvstate.h +++ b/sys/fs/nfs/nfsrvstate.h @@ -113,7 +113,7 @@ struct nfsclient { * Structure for an NFSv4.1 session. * Locking rules for this structure. * To add/delete one of these structures from the lists, you must lock - * both: NFSLOCKSESSION(session hashhead) and NFSLOCKSTATE() in that order. + * both: NFSLOCKSTATE() and NFSLOCKSESSION(session hashhead) in that order. * To traverse the lists looking for one of these, you must hold one * of these two locks. * The exception is if the thread holds the exclusive root sleep lock. diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 429cfcc..642d184 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -1731,7 +1731,7 @@ nfsrpc_writerpc(vnode_t vp, struct uio *uiop, int *iomode, } if (error) goto nfsmout; - NFSWRITERPC_SETTIME(wccflag, np, (nd->nd_flag & ND_NFSV4)); + NFSWRITERPC_SETTIME(wccflag, np, nap, (nd->nd_flag & ND_NFSV4)); mbuf_freem(nd->nd_mrep); nd->nd_mrep = NULL; tsiz -= len; diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 99fbf4d..cdbda07 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -794,6 +794,11 @@ nfsvno_createsub(struct nfsrv_descript *nd, struct nameidata *ndp, nvap->na_atime.tv_nsec = cverf[1]; error = VOP_SETATTR(ndp->ni_vp, &nvap->na_vattr, nd->nd_cred); + if (error != 0) { + vput(ndp->ni_vp); + ndp->ni_vp = NULL; + error = NFSERR_NOTSUPP; + } } } /* @@ -1422,6 +1427,11 @@ nfsvno_open(struct nfsrv_descript *nd, struct nameidata *ndp, nvap->na_atime.tv_nsec = cverf[1]; nd->nd_repstat = VOP_SETATTR(ndp->ni_vp, &nvap->na_vattr, cred); + if (nd->nd_repstat != 0) { + vput(ndp->ni_vp); + ndp->ni_vp = NULL; + nd->nd_repstat = NFSERR_NOTSUPP; + } } else { nfsrv_fixattr(nd, ndp->ni_vp, nvap, aclp, p, attrbitp, exp); diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index 37fb3b6..456e923 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -629,13 +629,13 @@ nfsrv_getclient(nfsquad_t clientid, int opflags, struct nfsclient **clpp, NFSBCOPY(sessid, nsep->sess_cbsess.nfsess_sessionid, NFSX_V4SESSIONID); shp = NFSSESSIONHASH(nsep->sess_sessionid); + NFSLOCKSTATE(); NFSLOCKSESSION(shp); LIST_INSERT_HEAD(&shp->list, nsep, sess_hash); - NFSLOCKSTATE(); LIST_INSERT_HEAD(&clp->lc_session, nsep, sess_list); nsep->sess_clp = clp; - NFSUNLOCKSTATE(); NFSUNLOCKSESSION(shp); + NFSUNLOCKSTATE(); } } } else if (clp->lc_flags & LCL_NEEDSCONFIRM) { @@ -5915,6 +5915,7 @@ nfsrv_freesession(struct nfsdsession *sep, uint8_t *sessionid) struct nfssessionhash *shp; int i; + NFSLOCKSTATE(); if (sep == NULL) { shp = NFSSESSIONHASH(sessionid); NFSLOCKSESSION(shp); @@ -5924,18 +5925,17 @@ nfsrv_freesession(struct nfsdsession *sep, uint8_t *sessionid) NFSLOCKSESSION(shp); } if (sep != NULL) { - NFSLOCKSTATE(); sep->sess_refcnt--; if (sep->sess_refcnt > 0) { - NFSUNLOCKSTATE(); NFSUNLOCKSESSION(shp); + NFSUNLOCKSTATE(); return (0); } LIST_REMOVE(sep, sess_hash); LIST_REMOVE(sep, sess_list); - NFSUNLOCKSTATE(); } NFSUNLOCKSESSION(shp); + NFSUNLOCKSTATE(); if (sep == NULL) return (NFSERR_BADSESSION); for (i = 0; i < NFSV4_SLOTS; i++) diff --git a/sys/fs/nfsserver/nfs_nfsdsubs.c b/sys/fs/nfsserver/nfs_nfsdsubs.c index 986a0f4..0fb1cda 100644 --- a/sys/fs/nfsserver/nfs_nfsdsubs.c +++ b/sys/fs/nfsserver/nfs_nfsdsubs.c @@ -1144,6 +1144,7 @@ static short nfsv4err_setclientid[] = { NFSERR_INVAL, NFSERR_RESOURCE, NFSERR_SERVERFAULT, + NFSERR_WRONGSEC, 0, }; diff --git a/sys/i386/bios/smapi.c b/sys/i386/bios/smapi.c index a7710bb..ef1ba42 100644 --- a/sys/i386/bios/smapi.c +++ b/sys/i386/bios/smapi.c @@ -80,7 +80,7 @@ static struct cdevsw smapi_cdevsw = { .d_version = D_VERSION, .d_ioctl = smapi_ioctl, .d_name = "smapi", - .d_flags = D_MEM | D_NEEDGIANT, + .d_flags = D_NEEDGIANT, }; static void smapi_identify(driver_t *, device_t); diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c index 7b27265..8b5be80 100644 --- a/sys/i386/i386/mp_machdep.c +++ b/sys/i386/i386/mp_machdep.c @@ -684,7 +684,7 @@ init_secondary(void) pc->pc_prvspace = pc; pc->pc_curthread = 0; - intel_fix_cpuid(); + fix_cpuid(); gdt_segs[GPRIV_SEL].ssd_base = (int) pc; gdt_segs[GPROC0_SEL].ssd_base = (int) &pc->pc_common_tss; diff --git a/sys/i386/include/md_var.h b/sys/i386/include/md_var.h index 892b30a..76254c2 100644 --- a/sys/i386/include/md_var.h +++ b/sys/i386/include/md_var.h @@ -116,7 +116,7 @@ void fillw(int /*u_short*/ pat, void *base, size_t cnt); void fill_based_sd(struct segment_descriptor *sdp, uint32_t base); void initializecpu(void); void initializecpucache(void); -bool intel_fix_cpuid(void); +bool fix_cpuid(void); void i686_pagezero(void *addr); void sse2_pagezero(void *addr); void init_AMD_Elan_sc520(void); diff --git a/sys/modules/streams/Makefile b/sys/modules/streams/Makefile index cbffdee..86e7996 100644 --- a/sys/modules/streams/Makefile +++ b/sys/modules/streams/Makefile @@ -5,10 +5,6 @@ KMOD= streams SRCS= streams.c -EXPORT_SYMS= svr4_str_initialized \ - svr4_stream_get \ - svr4_delete_socket - .if defined(DEBUG) CFLAGS+= -DDEBUG_SVR4 .endif diff --git a/sys/modules/svr4/Makefile b/sys/modules/svr4/Makefile index 9fc0901..eeca8a5 100644 --- a/sys/modules/svr4/Makefile +++ b/sys/modules/svr4/Makefile @@ -8,6 +8,7 @@ SRCS= svr4_sysent.c svr4_sysvec.c opt_compat.h opt_svr4.h \ svr4_termios.c svr4_stream.c svr4_socket.c svr4_sockio.c \ svr4_machdep.c svr4_resource.c svr4_ipc.c OBJS= svr4_locore.o +EXPORT_SYMS= svr4_delete_socket SRCS+= opt_ktrace.h opt_sysvipc.h diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 114802e..ecc7c9f 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2731,6 +2731,9 @@ process_ACK: INP_WLOCK_ASSERT(tp->t_inpcb); acked = BYTES_THIS_ACK(tp, th); + KASSERT(acked >= 0, ("%s: acked unexepectedly negative " + "(tp->snd_una=%u, th->th_ack=%u, tp=%p, m=%p)", __func__, + tp->snd_una, th->th_ack, tp, m)); TCPSTAT_INC(tcps_rcvackpack); TCPSTAT_ADD(tcps_rcvackbyte, acked); @@ -2800,13 +2803,19 @@ process_ACK: SOCKBUF_LOCK(&so->so_snd); if (acked > so->so_snd.sb_cc) { - tp->snd_wnd -= so->so_snd.sb_cc; + if (tp->snd_wnd >= so->so_snd.sb_cc) + tp->snd_wnd -= so->so_snd.sb_cc; + else + tp->snd_wnd = 0; mfree = sbcut_locked(&so->so_snd, (int)so->so_snd.sb_cc); ourfinisacked = 1; } else { mfree = sbcut_locked(&so->so_snd, acked); - tp->snd_wnd -= acked; + if (tp->snd_wnd >= (u_long) acked) + tp->snd_wnd -= acked; + else + tp->snd_wnd = 0; ourfinisacked = 0; } /* NB: sowwakeup_locked() does an implicit unlock. */ diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index d226911..0726675 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -112,11 +112,6 @@ VNET_DEFINE(int, nd6_debug) = 1; VNET_DEFINE(int, nd6_debug) = 0; #endif -/* for debugging? */ -#if 0 -static int nd6_inuse, nd6_allocated; -#endif - VNET_DEFINE(struct nd_drhead, nd_defrouter); VNET_DEFINE(struct nd_prhead, nd_prefix); @@ -175,7 +170,7 @@ nd6_ifattach(struct ifnet *ifp) { struct nd_ifinfo *nd; - nd = (struct nd_ifinfo *)malloc(sizeof(*nd), M_IP6NDP, M_WAITOK|M_ZERO); + nd = malloc(sizeof(*nd), M_IP6NDP, M_WAITOK | M_ZERO); nd->initialized = 1; nd->chlim = IPV6_DEFHLIM; @@ -2182,7 +2177,6 @@ clear_llinfo_pqueue(struct llentry *ln) } ln->la_hold = NULL; - return; } static int nd6_sysctl_drlist(SYSCTL_HANDLER_ARGS); @@ -2221,7 +2215,7 @@ nd6_sysctl_drlist(SYSCTL_HANDLER_ARGS) error = sa6_recoverscope(&d.rtaddr); if (error != 0) return (error); - d.flags = dr->flags; + d.flags = dr->raflags; d.rtlifetime = dr->rtlifetime; d.expire = dr->expire + (time_second - time_uptime); d.if_index = dr->ifp->if_index; diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 7a83681..510d208 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -235,13 +235,13 @@ struct in6_ndifreq { ((MAX_RANDOM_FACTOR - MIN_RANDOM_FACTOR) * (x >> 10)))) /1000) TAILQ_HEAD(nd_drhead, nd_defrouter); -struct nd_defrouter { +struct nd_defrouter { TAILQ_ENTRY(nd_defrouter) dr_entry; - struct in6_addr rtaddr; - u_char flags; /* flags on RA message */ + struct in6_addr rtaddr; + u_char raflags; /* flags on RA message */ u_short rtlifetime; u_long expire; - struct ifnet *ifp; + struct ifnet *ifp; int installed; /* is installed into kernel routing table */ }; @@ -445,7 +445,6 @@ void nd6_dad_stop(struct ifaddr *); /* nd6_rtr.c */ void nd6_rs_input(struct mbuf *, int, int); void nd6_ra_input(struct mbuf *, int, int); -void prelist_del(struct nd_prefix *); void defrouter_reset(void); void defrouter_select(void); void defrtrlist_del(struct nd_defrouter *); diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 5232f8f..7e58cc5 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -623,7 +623,6 @@ nd6_ns_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6, RTFREE(ro.ro_rt); } m_freem(m); - return; } #ifndef BURN_BRIDGES @@ -901,12 +900,6 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) in6 = &L3_ADDR_SIN6(ln)->sin6_addr; - /* - * Lock to protect the default router list. - * XXX: this might be unnecessary, since this function - * is only called under the network software interrupt - * context. However, we keep it just for safety. - */ dr = defrouter_lookup(in6, ln->lle_tbl->llt_ifp); if (dr) defrtrlist_del(dr); @@ -1127,7 +1120,6 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, RTFREE(ro.ro_rt); } m_freem(m); - return; } #ifndef BURN_BRIDGES @@ -1323,9 +1315,10 @@ nd6_dad_start(struct ifaddr *ifa, int delay) } if ((dp = nd6_dad_find(ifa, NULL)) != NULL) { /* - * DAD already in progress. Let the existing entry - * to finish it. + * DAD is already in progress. Let the existing entry + * finish it. */ + nd6_dad_rele(dp); return; } diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index 8588a6b..4342f0a 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -270,7 +270,7 @@ nd6_ra_input(struct mbuf *m, int off, int icmp6len) bzero(&dr0, sizeof(dr0)); dr0.rtaddr = saddr6; - dr0.flags = nd_ra->nd_ra_flags_reserved; + dr0.raflags = nd_ra->nd_ra_flags_reserved; /* * Effectively-disable routes from RA messages when * ND6_IFF_NO_RADR enabled on the receiving interface or @@ -501,7 +501,6 @@ defrouter_addreq(struct nd_defrouter *new) } if (error == 0) new->installed = 1; - return; } struct nd_defrouter * @@ -700,8 +699,6 @@ defrouter_select(void) defrouter_delreq(installed_dr); defrouter_addreq(selected_dr); } - - return; } /* @@ -711,7 +708,7 @@ defrouter_select(void) static int rtpref(struct nd_defrouter *dr) { - switch (dr->flags & ND_RA_FLAG_RTPREF_MASK) { + switch (dr->raflags & ND_RA_FLAG_RTPREF_MASK) { case ND_RA_FLAG_RTPREF_HIGH: return (RTPREF_HIGH); case ND_RA_FLAG_RTPREF_MEDIUM: @@ -725,7 +722,7 @@ rtpref(struct nd_defrouter *dr) * serious bug of kernel internal. We thus always bark here. * Or, can we even panic? */ - log(LOG_ERR, "rtpref: impossible RA flag %x\n", dr->flags); + log(LOG_ERR, "rtpref: impossible RA flag %x\n", dr->raflags); return (RTPREF_INVALID); } /* NOTREACHED */ @@ -735,53 +732,47 @@ static struct nd_defrouter * defrtrlist_update(struct nd_defrouter *new) { struct nd_defrouter *dr, *n; + int oldpref; if ((dr = defrouter_lookup(&new->rtaddr, new->ifp)) != NULL) { /* entry exists */ if (new->rtlifetime == 0) { defrtrlist_del(dr); - dr = NULL; - } else { - int oldpref = rtpref(dr); + return (NULL); + } - /* override */ - dr->flags = new->flags; /* xxx flag check */ - dr->rtlifetime = new->rtlifetime; - dr->expire = new->expire; + oldpref = rtpref(dr); - /* - * If the preference does not change, there's no need - * to sort the entries. Also make sure the selected - * router is still installed in the kernel. - */ - if (dr->installed && rtpref(new) == oldpref) - return (dr); + /* override */ + dr->raflags = new->raflags; /* XXX flag check */ + dr->rtlifetime = new->rtlifetime; + dr->expire = new->expire; - /* - * preferred router may be changed, so relocate - * this router. - * XXX: calling TAILQ_REMOVE directly is a bad manner. - * However, since defrtrlist_del() has many side - * effects, we intentionally do so here. - * defrouter_select() below will handle routing - * changes later. - */ - TAILQ_REMOVE(&V_nd_defrouter, dr, dr_entry); - n = dr; - goto insert; - } - return (dr); + /* + * If the preference does not change, there's no need + * to sort the entries. Also make sure the selected + * router is still installed in the kernel. + */ + if (dr->installed && rtpref(new) == oldpref) + return (dr); + + /* + * The preferred router may have changed, so relocate this + * router. + */ + TAILQ_REMOVE(&V_nd_defrouter, dr, dr_entry); + n = dr; + goto insert; } /* entry does not exist */ if (new->rtlifetime == 0) return (NULL); - n = (struct nd_defrouter *)malloc(sizeof(*n), M_IP6NDP, M_NOWAIT); + n = malloc(sizeof(*n), M_IP6NDP, M_NOWAIT | M_ZERO); if (n == NULL) return (NULL); - bzero(n, sizeof(*n)); - *n = *new; + memcpy(n, new, sizeof(*n)); insert: /* @@ -824,10 +815,9 @@ pfxrtr_add(struct nd_prefix *pr, struct nd_defrouter *dr) { struct nd_pfxrouter *new; - new = (struct nd_pfxrouter *)malloc(sizeof(*new), M_IP6NDP, M_NOWAIT); + new = malloc(sizeof(*new), M_IP6NDP, M_NOWAIT | M_ZERO); if (new == NULL) return; - bzero(new, sizeof(*new)); new->router = dr; LIST_INSERT_HEAD(&pr->ndpr_advrtrs, new, pfr_entry); @@ -868,10 +858,9 @@ nd6_prelist_add(struct nd_prefixctl *pr, struct nd_defrouter *dr, int i; char ip6buf[INET6_ADDRSTRLEN]; - new = (struct nd_prefix *)malloc(sizeof(*new), M_IP6NDP, M_NOWAIT); + new = malloc(sizeof(*new), M_IP6NDP, M_NOWAIT | M_ZERO); if (new == NULL) - return(ENOMEM); - bzero(new, sizeof(*new)); + return (ENOMEM); new->ndpr_ifp = pr->ndpr_ifp; new->ndpr_prefix = pr->ndpr_prefix; new->ndpr_plen = pr->ndpr_plen; @@ -948,9 +937,9 @@ prelist_remove(struct nd_prefix *pr) /* unlink ndpr_entry from nd_prefix list */ LIST_REMOVE(pr, ndpr_entry); - /* free list of routers that adversed the prefix */ + /* free list of routers that advertised the prefix */ LIST_FOREACH_SAFE(pfr, &pr->ndpr_advrtrs, pfr_entry, next) { - free(pfr, M_IP6NDP); + pfxrtr_del(pfr); } free(pr, M_IP6NDP); diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c index 0e748b1..1b711a0 100644 --- a/sys/netinet6/scope6.c +++ b/sys/netinet6/scope6.c @@ -416,7 +416,7 @@ sa6_recoverscope(struct sockaddr_in6 *sin6) zoneid != sin6->sin6_scope_id) { log(LOG_NOTICE, "%s: embedded scope mismatch: %s%%%d. " - "sin6_scope_id was overridden.", __func__, + "sin6_scope_id was overridden\n", __func__, ip6_sprintf(ip6buf, &sin6->sin6_addr), sin6->sin6_scope_id); } diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 34c65a8..946656d 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -156,7 +156,7 @@ typedef int dumper_t( #define D_TAPE 0x0001 #define D_DISK 0x0002 #define D_TTY 0x0004 -#define D_MEM 0x0008 +#define D_MEM 0x0008 /* /dev/(k)mem */ #ifdef _KERNEL diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index fd110c7..4f58e26 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -299,7 +299,7 @@ old_dev_pager_fault(vm_object_t object, vm_ooffset_t offset, int prot, struct cdevsw *csw; struct file *fpop; struct thread *td; - vm_memattr_t memattr; + vm_memattr_t memattr, memattr1; int ref, ret; pidx = OFF_TO_IDX(offset); @@ -328,10 +328,18 @@ old_dev_pager_fault(vm_object_t object, vm_ooffset_t offset, int prot, /* If "paddr" is a real page, perform a sanity check on "memattr". */ if ((m_paddr = vm_phys_paddr_to_vm_page(paddr)) != NULL && - pmap_page_get_memattr(m_paddr) != memattr) { - memattr = pmap_page_get_memattr(m_paddr); - printf( - "WARNING: A device driver has set \"memattr\" inconsistently.\n"); + (memattr1 = pmap_page_get_memattr(m_paddr)) != memattr) { + /* + * For the /dev/mem d_mmap routine to return the + * correct memattr, pmap_page_get_memattr() needs to + * be called, which we do there. + */ + if ((csw->d_flags & D_MEM) == 0) { + printf("WARNING: Device driver %s has set " + "\"memattr\" inconsistently (drv %u pmap %u).\n", + csw->d_name, memattr, memattr1); + } + memattr = memattr1; } if (((*mres)->flags & PG_FICTITIOUS) != 0) { /* diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h index 3846efc..3e04273 100644 --- a/sys/x86/include/specialreg.h +++ b/sys/x86/include/specialreg.h @@ -821,6 +821,7 @@ #define MSR_P_STATE_CONFIG(n) (0xc0010064 + (n)) /* P-state Config */ #define MSR_SMM_ADDR 0xc0010112 /* SMM TSEG base address */ #define MSR_SMM_MASK 0xc0010113 /* SMM TSEG address mask */ +#define MSR_EXTFEATURES 0xc0011005 /* Extended CPUID Features override */ #define MSR_IC_CFG 0xc0011021 /* Instruction Cache Configuration */ #define MSR_K8_UCODE_UPDATE 0xc0010020 /* update microcode */ #define MSR_MC0_CTL_MASK 0xc0010044 diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 69a978f..b6c7f95 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -1304,23 +1304,22 @@ identify_hypervisor(void) } #endif -/* - * Clear "Limit CPUID Maxval" bit and return true if the caller should - * get the largest standard CPUID function number again if it is set - * from BIOS. It is necessary for probing correct CPU topology later - * and for the correct operation of the AVX-aware userspace. - */ bool -intel_fix_cpuid(void) +fix_cpuid(void) { uint64_t msr; - if (cpu_vendor_id != CPU_VENDOR_INTEL) - return (false); - if ((CPUID_TO_FAMILY(cpu_id) == 0xf && + /* + * Clear "Limit CPUID Maxval" bit and return true if the caller should + * get the largest standard CPUID function number again if it is set + * from BIOS. It is necessary for probing correct CPU topology later + * and for the correct operation of the AVX-aware userspace. + */ + if (cpu_vendor_id == CPU_VENDOR_INTEL && + ((CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x3) || (CPUID_TO_FAMILY(cpu_id) == 0x6 && - CPUID_TO_MODEL(cpu_id) >= 0xe)) { + CPUID_TO_MODEL(cpu_id) >= 0xe))) { msr = rdmsr(MSR_IA32_MISC_ENABLE); if ((msr & IA32_MISC_EN_LIMCPUID) != 0) { msr &= ~IA32_MISC_EN_LIMCPUID; @@ -1328,6 +1327,22 @@ intel_fix_cpuid(void) return (true); } } + + /* + * Re-enable AMD Topology Extension that could be disabled by BIOS + * on some notebook processors. Without the extension it's really + * hard to determine the correct CPU cache topology. + * See BIOS and Kernel Developer’s Guide (BKDG) for AMD Family 15h + * Models 60h-6Fh Processors, Publication # 50742. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && CPUID_TO_FAMILY(cpu_id) == 0x15) { + msr = rdmsr(MSR_EXTFEATURES); + if ((msr & ((uint64_t)1 << 54)) == 0) { + msr |= (uint64_t)1 << 54; + wrmsr(MSR_EXTFEATURES, msr); + return (true); + } + } return (false); } @@ -1367,7 +1382,7 @@ identify_cpu(void) #endif cpu_vendor_id = find_cpu_vendor_id(); - if (intel_fix_cpuid()) { + if (fix_cpuid()) { do_cpuid(0, regs); cpu_high = regs[0]; } diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c index b1a7c08..05774df 100644 --- a/tests/sys/posixshm/posixshm_test.c +++ b/tests/sys/posixshm/posixshm_test.c @@ -50,12 +50,9 @@ static char test_path[TEST_PATH_LEN]; static void gen_test_path(void) { - char *tmpdir = getenv("TMPDIR"); - if (tmpdir == NULL) - tmpdir = "/tmp"; - - snprintf(test_path, sizeof(test_path), "%s/tmp.XXXXXX", tmpdir); + snprintf(test_path, sizeof(test_path), "%s/tmp.XXXXXX", + getenv("TMPDIR") == NULL ? "/tmp" : getenv("TMPDIR")); test_path[sizeof(test_path) - 1] = '\0'; ATF_REQUIRE_MSG(mkstemp(test_path) != -1, "mkstemp failed; errno=%d", errno); @@ -99,10 +96,12 @@ static int scribble_object(void) { char *page; - int fd; + int fd, pagesize; gen_test_path(); + ATF_REQUIRE(0 < (pagesize = getpagesize())); + fd = shm_open(test_path, O_CREAT|O_EXCL|O_RDWR, 0777); if (fd < 0 && errno == EEXIST) { if (shm_unlink(test_path) < 0) @@ -111,17 +110,16 @@ scribble_object(void) } if (fd < 0) atf_tc_fail("shm_open failed; errno=%d", errno); - if (ftruncate(fd, getpagesize()) < 0) + if (ftruncate(fd, pagesize) < 0) atf_tc_fail("ftruncate failed; errno=%d", errno); - page = mmap(0, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, - 0); + page = mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (page == MAP_FAILED) atf_tc_fail("mmap failed; errno=%d", errno); page[0] = '1'; - if (munmap(page, getpagesize()) < 0) - atf_tc_fail("munmap failed; errno=%d", errno); + ATF_REQUIRE_MSG(munmap(page, pagesize) == 0, "munmap failed; errno=%d", + errno); return (fd); } @@ -130,12 +128,13 @@ ATF_TC_WITHOUT_HEAD(remap_object); ATF_TC_BODY(remap_object, tc) { char *page; - int fd; + int fd, pagesize; + + ATF_REQUIRE(0 < (pagesize = getpagesize())); fd = scribble_object(); - page = mmap(0, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, - 0); + page = mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (page == MAP_FAILED) atf_tc_fail("mmap(2) failed; errno=%d", errno); @@ -143,8 +142,8 @@ ATF_TC_BODY(remap_object, tc) atf_tc_fail("missing data ('%c' != '1')", page[0]); close(fd); - if (munmap(page, getpagesize()) < 0) - atf_tc_fail("munmap failed; errno=%d", errno); + ATF_REQUIRE_MSG(munmap(page, pagesize) == 0, "munmap failed; errno=%d", + errno); ATF_REQUIRE_MSG(shm_unlink(test_path) != -1, "shm_unlink failed; errno=%d", errno); @@ -154,7 +153,9 @@ ATF_TC_WITHOUT_HEAD(reopen_object); ATF_TC_BODY(reopen_object, tc) { char *page; - int fd; + int fd, pagesize; + + ATF_REQUIRE(0 < (pagesize = getpagesize())); fd = scribble_object(); close(fd); @@ -163,14 +164,15 @@ ATF_TC_BODY(reopen_object, tc) if (fd < 0) atf_tc_fail("shm_open(2) failed; errno=%d", errno); - page = mmap(0, getpagesize(), PROT_READ, MAP_SHARED, fd, 0); + page = mmap(0, pagesize, PROT_READ, MAP_SHARED, fd, 0); if (page == MAP_FAILED) atf_tc_fail("mmap(2) failed; errno=%d", errno); if (page[0] != '1') atf_tc_fail("missing data ('%c' != '1')", page[0]); - munmap(page, getpagesize()); + ATF_REQUIRE_MSG(munmap(page, pagesize) == 0, "munmap failed; errno=%d", + errno); close(fd); ATF_REQUIRE_MSG(shm_unlink(test_path) != -1, "shm_unlink failed; errno=%d", errno); @@ -180,7 +182,9 @@ ATF_TC_WITHOUT_HEAD(readonly_mmap_write); ATF_TC_BODY(readonly_mmap_write, tc) { char *page; - int fd; + int fd, pagesize; + + ATF_REQUIRE(0 < (pagesize = getpagesize())); gen_test_path(); @@ -188,8 +192,7 @@ ATF_TC_BODY(readonly_mmap_write, tc) ATF_REQUIRE_MSG(fd >= 0, "shm_open failed; errno=%d", errno); /* PROT_WRITE should fail with EACCES. */ - page = mmap(0, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, - 0); + page = mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (page != MAP_FAILED) atf_tc_fail("mmap(PROT_WRITE) succeeded unexpectedly"); @@ -359,49 +362,49 @@ ATF_TC_BODY(object_resize, tc) { pid_t pid; struct stat sb; - char err_buf[1024], *page; - int fd, status; + char *page; + int fd, pagesize, status; + + ATF_REQUIRE(0 < (pagesize = getpagesize())); /* Start off with a size of a single page. */ fd = shm_open(SHM_ANON, O_CREAT|O_RDWR, 0777); if (fd < 0) atf_tc_fail("shm_open failed; errno=%d", errno); - if (ftruncate(fd, getpagesize()) < 0) + if (ftruncate(fd, pagesize) < 0) atf_tc_fail("ftruncate(1) failed; errno=%d", errno); if (fstat(fd, &sb) < 0) atf_tc_fail("fstat(1) failed; errno=%d", errno); - if (sb.st_size != getpagesize()) + if (sb.st_size != pagesize) atf_tc_fail("first resize failed (%d != %d)", - (int)sb.st_size, getpagesize()); + (int)sb.st_size, pagesize); /* Write a '1' to the first byte. */ - page = mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd, - 0); + page = mmap(0, pagesize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); if (page == MAP_FAILED) atf_tc_fail("mmap(1)"); page[0] = '1'; - if (munmap(page, getpagesize()) < 0) - atf_tc_fail("munmap(1) failed; errno=%d", errno); + ATF_REQUIRE_MSG(munmap(page, pagesize) == 0, "munmap failed; errno=%d", + errno); /* Grow the object to 2 pages. */ - if (ftruncate(fd, getpagesize() * 2) < 0) + if (ftruncate(fd, pagesize * 2) < 0) atf_tc_fail("ftruncate(2) failed; errno=%d", errno); if (fstat(fd, &sb) < 0) atf_tc_fail("fstat(2) failed; errno=%d", errno); - if (sb.st_size != getpagesize() * 2) + if (sb.st_size != pagesize * 2) atf_tc_fail("second resize failed (%d != %d)", - (int)sb.st_size, getpagesize() * 2); + (int)sb.st_size, pagesize * 2); /* Check for '1' at the first byte. */ - page = mmap(0, getpagesize() * 2, PROT_READ|PROT_WRITE, MAP_SHARED, - fd, 0); + page = mmap(0, pagesize * 2, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); if (page == MAP_FAILED) atf_tc_fail("mmap(2) failed; errno=%d", errno); @@ -409,18 +412,18 @@ ATF_TC_BODY(object_resize, tc) atf_tc_fail("'%c' != '1'", page[0]); /* Write a '2' at the start of the second page. */ - page[getpagesize()] = '2'; + page[pagesize] = '2'; /* Shrink the object back to 1 page. */ - if (ftruncate(fd, getpagesize()) < 0) + if (ftruncate(fd, pagesize) < 0) atf_tc_fail("ftruncate(3) failed; errno=%d", errno); if (fstat(fd, &sb) < 0) atf_tc_fail("fstat(3) failed; errno=%d", errno); - if (sb.st_size != getpagesize()) + if (sb.st_size != pagesize) atf_tc_fail("third resize failed (%d != %d)", - (int)sb.st_size, getpagesize()); + (int)sb.st_size, pagesize); /* * Fork a child process to make sure the second page is no @@ -435,16 +438,16 @@ ATF_TC_BODY(object_resize, tc) char c; /* Don't generate a core dump. */ - getrlimit(RLIMIT_CORE, &lim); + ATF_REQUIRE(getrlimit(RLIMIT_CORE, &lim) == 0); lim.rlim_cur = 0; - setrlimit(RLIMIT_CORE, &lim); + ATF_REQUIRE(setrlimit(RLIMIT_CORE, &lim) == 0); /* * The previous ftruncate(2) shrunk the backing object * so that this address is no longer valid, so reading * from it should trigger a SIGSEGV. */ - c = page[getpagesize()]; + c = page[pagesize]; fprintf(stderr, "child: page 1: '%c'\n", c); exit(0); } @@ -456,15 +459,15 @@ ATF_TC_BODY(object_resize, tc) atf_tc_fail("child terminated with status %x", status); /* Grow the object back to 2 pages. */ - if (ftruncate(fd, getpagesize() * 2) < 0) + if (ftruncate(fd, pagesize * 2) < 0) atf_tc_fail("ftruncate(2) failed; errno=%d", errno); if (fstat(fd, &sb) < 0) atf_tc_fail("fstat(2) failed; errno=%d", errno); - if (sb.st_size != getpagesize() * 2) + if (sb.st_size != pagesize * 2) atf_tc_fail("fourth resize failed (%d != %d)", - (int)sb.st_size, getpagesize()); + (int)sb.st_size, pagesize); /* * Note that the mapping at 'page' for the second page is @@ -475,9 +478,9 @@ ATF_TC_BODY(object_resize, tc) * object was shrunk and the new pages when an object are * grown are zero-filled. */ - if (page[getpagesize()] != 0) + if (page[pagesize] != 0) atf_tc_fail("invalid data at %d: %x != 0", - getpagesize(), (int)page[getpagesize()]); + pagesize, (int)page[pagesize]); close(fd); } @@ -524,7 +527,7 @@ ATF_TC_BODY(shm_functionality_across_fork, tc) scval = sysconf(_SC_PAGESIZE); if (scval == -1 && errno != 0) { atf_tc_fail("sysconf(_SC_PAGESIZE) failed; errno=%d", errno); - } else if (scval <= 0 || (size_t)psize != psize) { + } else if (scval <= 0) { fprintf(stderr, "bogus return from sysconf(_SC_PAGESIZE): %ld", scval); psize = 4096; @@ -542,8 +545,7 @@ ATF_TC_BODY(shm_functionality_across_fork, tc) ATF_REQUIRE_MSG(ftruncate(desc, (off_t)psize) != -1, "ftruncate failed; errno=%d", errno); - region = mmap((void *)0, psize, PROT_READ | PROT_WRITE, MAP_SHARED, - desc, (off_t)0); + region = mmap(NULL, psize, PROT_READ | PROT_WRITE, MAP_SHARED, desc, 0); ATF_REQUIRE_MSG(region != MAP_FAILED, "mmap failed; errno=%d", errno); memset(region, '\377', psize); @@ -601,6 +603,10 @@ ATF_TC_BODY(shm_functionality_across_fork, tc) strsignal(WTERMSIG(status))); } } + + ATF_REQUIRE_MSG(munmap(region, psize) == 0, "munmap failed; errno=%d", + errno); + shm_unlink(test_path); } ATF_TP_ADD_TCS(tp) diff --git a/tests/sys/vm/mmap_test.c b/tests/sys/vm/mmap_test.c index 88013da..df52072 100644 --- a/tests/sys/vm/mmap_test.c +++ b/tests/sys/vm/mmap_test.c @@ -91,8 +91,10 @@ static void checked_mmap(int prot, int flags, int fd, int error, const char *msg) { void *p; + int pagesize; - p = mmap(NULL, getpagesize(), prot, flags, fd, 0); + ATF_REQUIRE((pagesize = getpagesize()) > 0); + p = mmap(NULL, pagesize, prot, flags, fd, 0); if (p == MAP_FAILED) { if (error == 0) ATF_CHECK_MSG(0, "%s failed with errno %d", msg, @@ -103,18 +105,19 @@ checked_mmap(int prot, int flags, int fd, int error, const char *msg) errno, error); } else { ATF_CHECK_MSG(error == 0, "%s succeeded", msg); - munmap(p, getpagesize()); + munmap(p, pagesize); } } ATF_TC_WITHOUT_HEAD(mmap__bad_arguments); ATF_TC_BODY(mmap__bad_arguments, tc) { - int devstatfd, shmfd, zerofd; + int devstatfd, pagesize, shmfd, zerofd; + ATF_REQUIRE((pagesize = getpagesize()) > 0); ATF_REQUIRE((devstatfd = open("/dev/devstat", O_RDONLY)) >= 0); ATF_REQUIRE((shmfd = shm_open(SHM_ANON, O_RDWR, 0644)) >= 0); - ATF_REQUIRE(ftruncate(shmfd, getpagesize()) == 0); + ATF_REQUIRE(ftruncate(shmfd, pagesize) == 0); ATF_REQUIRE((zerofd = open("/dev/zero", O_RDONLY)) >= 0); /* These should work. */ @@ -179,6 +182,10 @@ ATF_TC_BODY(mmap__bad_arguments, tc) */ checked_mmap(PROT_READ, MAP_PRIVATE, devstatfd, EINVAL, "MAP_PRIVATE of /dev/devstat"); + + close(devstatfd); + close(shmfd); + close(zerofd); } ATF_TC_WITHOUT_HEAD(mmap__dev_zero_private); @@ -186,22 +193,21 @@ ATF_TC_BODY(mmap__dev_zero_private, tc) { char *p1, *p2, *p3; size_t i; - int fd; + int fd, pagesize; + ATF_REQUIRE((pagesize = getpagesize()) > 0); ATF_REQUIRE((fd = open("/dev/zero", O_RDONLY)) >= 0); - p1 = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, - 0); + p1 = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); ATF_REQUIRE(p1 != MAP_FAILED); - p2 = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, - 0); + p2 = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); ATF_REQUIRE(p2 != MAP_FAILED); - for (i = 0; i < getpagesize(); i++) + for (i = 0; i < pagesize; i++) ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%zu] is %x", i, p1[i]); - ATF_REQUIRE(memcmp(p1, p2, getpagesize()) == 0); + ATF_REQUIRE(memcmp(p1, p2, pagesize) == 0); p1[0] = 1; @@ -211,11 +217,15 @@ ATF_TC_BODY(mmap__dev_zero_private, tc) ATF_REQUIRE(p1[0] == 1); - p3 = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, - 0); + p3 = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); ATF_REQUIRE(p3 != MAP_FAILED); ATF_REQUIRE(p3[0] == 0); + + munmap(p1, pagesize); + munmap(p2, pagesize); + munmap(p3, pagesize); + close(fd); } ATF_TC_WITHOUT_HEAD(mmap__dev_zero_shared); @@ -223,22 +233,21 @@ ATF_TC_BODY(mmap__dev_zero_shared, tc) { char *p1, *p2, *p3; size_t i; - int fd; + int fd, pagesize; + ATF_REQUIRE((pagesize = getpagesize()) > 0); ATF_REQUIRE((fd = open("/dev/zero", O_RDWR)) >= 0); - p1 = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, - 0); + p1 = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); ATF_REQUIRE(p1 != MAP_FAILED); - p2 = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, - 0); + p2 = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); ATF_REQUIRE(p2 != MAP_FAILED); - for (i = 0; i < getpagesize(); i++) + for (i = 0; i < pagesize; i++) ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%zu] is %x", i, p1[i]); - ATF_REQUIRE(memcmp(p1, p2, getpagesize()) == 0); + ATF_REQUIRE(memcmp(p1, p2, pagesize) == 0); p1[0] = 1; @@ -248,11 +257,16 @@ ATF_TC_BODY(mmap__dev_zero_shared, tc) ATF_REQUIRE(p1[0] == 1); - p3 = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, + p3 = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); ATF_REQUIRE(p3 != MAP_FAILED); ATF_REQUIRE(p3[0] == 0); + + munmap(p1, pagesize); + munmap(p2, pagesize); + munmap(p3, pagesize); + close(fd); } ATF_TP_ADD_TCS(tp) diff --git a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c index b92532f..67a44d9 100644 --- a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c +++ b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c @@ -693,6 +693,7 @@ snmp_import_table(struct snmp_toolinfo *snmptoolctx, struct snmp_oid2str *obj) /* Same entry already present in lists. */ free(entry->string); free(entry); + return (0); } (void) snmp_import_update_table(ENTRY_INDEX, entry); diff --git a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptc.c b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptc.c index dc22c69..a682c80 100644 --- a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptc.c +++ b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptc.c @@ -338,8 +338,9 @@ static char * snmp_date2asn_oid(char *str, struct asn_oid *oid) { char *endptr, *ptr; - uint32_t v; + static const char UTC[3] = "UTC"; int32_t saved_errno; + uint32_t v; if (snmp_suboid_append(oid, (asn_subid_t) SNMP_DATETIME_OCTETS) < 0) return (NULL); @@ -440,8 +441,8 @@ snmp_date2asn_oid(char *str, struct asn_oid *oid) /* 'UTC' - optional */ ptr = endptr + 1; - if (*ptr == 'U' && *(ptr + 1) == 'T' && *(ptr + 1) == 'C') - ptr += 3; + if (strncmp(ptr, UTC, sizeof(UTC)) == 0) + ptr += sizeof(UTC); /* '+/-' */ if (*ptr == '-' || *ptr == '+') { diff --git a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c index 52aa1a9..38665bf 100644 --- a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c +++ b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c @@ -1079,10 +1079,9 @@ snmp_oid2asn_oid(struct snmp_toolinfo *snmptoolctx, char *str, strlcpy(string, str, i + 1); string[i] = '\0'; if (snmp_lookup_enumoid(snmptoolctx, &obj, string) < 0) { - warnx("Unknown string - %s",string); + warnx("Unknown string - %s", string); return (NULL); } - free(string); } asn_append_oid(oid, &(obj.val.var)); |