GNU Libtasn1 NEWS -*- outline -*-
+* Noteworthy changes in release 4.12 (released 2017-05-29) [stable]
+- Corrected so-name version
+
+* Noteworthy changes in release 4.11 (released 2017-05-27) [stable]
+- Introduced the ASN1_TIME_ENCODING_ERROR error code to indicate
+ an invalid encoding in the DER time fields.
+- Introduced flag ASN1_DECODE_FLAG_ALLOW_INCORRECT_TIME. This flag
+ allows decoding errors in time fields even when in strict DER mode.
+ That is introduced in order to allow toleration of invalid times in
+ X.509 certificates (which are common) even though strict DER adherence
+ is enforced in other fields.
+- Added safety check in asn1_find_node(). That prevents a crash
+ when a very long variable name is provided by the developer.
+ Note that this to be exploited requires controlling the ASN.1
+ definitions used by the developer, i.e., the 'name' parameter of
+ asn1_write_value() or asn1_read_value(). The library is
+ not designed to protect against malicious manipulation of the
+ developer assigned variable names. Reported by Jakub Jirasek.
+
* Noteworthy changes in release 4.10 (released 2017-01-16) [stable]
- Updated gnulib
- Removed -Werror from default compiler flags
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for GNU Libtasn1 4.10.
+# Generated by GNU Autoconf 2.69 for GNU Libtasn1 4.12.
#
# Report bugs to <help-libtasn1@gnu.org>.
#
# Identity of this package.
PACKAGE_NAME='GNU Libtasn1'
PACKAGE_TARNAME='libtasn1'
-PACKAGE_VERSION='4.10'
-PACKAGE_STRING='GNU Libtasn1 4.10'
+PACKAGE_VERSION='4.12'
+PACKAGE_STRING='GNU Libtasn1 4.12'
PACKAGE_BUGREPORT='help-libtasn1@gnu.org'
PACKAGE_URL='http://www.gnu.org/software/libtasn1/'
# 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 GNU Libtasn1 4.10 to adapt to many kinds of systems.
+\`configure' configures GNU Libtasn1 4.12 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GNU Libtasn1 4.10:";;
+ short | recursive ) echo "Configuration of GNU Libtasn1 4.12:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU Libtasn1 configure 4.10
+GNU Libtasn1 configure 4.12
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by GNU Libtasn1 $as_me 4.10, which was
+It was created by GNU Libtasn1 $as_me 4.12, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='libtasn1'
- VERSION='4.10'
+ VERSION='4.12'
cat >>confdefs.h <<_ACEOF
# Interfaces removed: AGE=0
LT_CURRENT=11
-LT_REVISION=3
+LT_REVISION=4
LT_AGE=5
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by GNU Libtasn1 $as_me 4.10, which was
+This file was extended by GNU Libtasn1 $as_me 4.12, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-GNU Libtasn1 config.status 4.10
+GNU Libtasn1 config.status 4.12
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
# along with this program. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ([2.61])
-AC_INIT([GNU Libtasn1],[4.10],[help-libtasn1@gnu.org])
+AC_INIT([GNU Libtasn1],[4.12],[help-libtasn1@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS(config.h)
# Interfaces added: AGE++
# Interfaces removed: AGE=0
AC_SUBST(LT_CURRENT, 11)
-AC_SUBST(LT_REVISION, 3)
+AC_SUBST(LT_REVISION, 4)
AC_SUBST(LT_AGE, 5)
AC_PROG_CC
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
-.TH ASN1CODING "1" "October 2016" "asn1Coding (libtasn1) 4.10" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
+.TH ASN1CODING "1" "May 2017" "asn1Coding (libtasn1) 4.12" "User Commands"
.SH NAME
asn1Coding \- ASN.1 DER encoder
.SH SYNOPSIS
.br
General help using GNU software: <http://www.gnu.org/gethelp/>
.SH COPYRIGHT
-Copyright \(co 2016 Free Software Foundation, Inc.
+Copyright \(co 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
-.TH ASN1DECODING "1" "October 2016" "asn1Decoding (libtasn1) 4.10" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
+.TH ASN1DECODING "1" "May 2017" "asn1Decoding (libtasn1) 4.12" "User Commands"
.SH NAME
asn1Decoding \- ASN.1 DER decoder
.SH SYNOPSIS
\fB\-s\fR, \fB\-\-strict\fR
use strict DER decoding
.TP
+\fB\-t\fR, \fB\-\-no\-time\-strict\fR
+use strict DER decoding but not in time fields
+.TP
\fB\-h\fR, \fB\-\-help\fR
display this help and exit
.TP
.br
General help using GNU software: <http://www.gnu.org/gethelp/>
.SH COPYRIGHT
-Copyright \(co 2016 Free Software Foundation, Inc.
+Copyright \(co 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
-.TH ASN1PARSER "1" "October 2016" "asn1Parser (libtasn1) 4.10" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
+.TH ASN1PARSER "1" "May 2017" "asn1Parser (libtasn1) 4.12" "User Commands"
.SH NAME
asn1Parser \- ASN.1 syntax tree generator for libtasn1
.SH SYNOPSIS
.br
General help using GNU software: <http://www.gnu.org/gethelp/>
.SH COPYRIGHT
-Copyright \(co 2016 Free Software Foundation, Inc.
+Copyright \(co 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This manual is for GNU Libtasn1
-(version 4.10, 4 April 2016),
+(version 4.12, 4 April 2016),
which is a library for Abstract Syntax Notation One (ASN.1) and
Distinguished Encoding Rules (DER) manipulation.
Documentation License". -->
<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
<head>
-<title>GNU Libtasn1 4.10</title>
+<title>GNU Libtasn1 4.12</title>
-<meta name="description" content="GNU Libtasn1 4.10">
-<meta name="keywords" content="GNU Libtasn1 4.10">
+<meta name="description" content="GNU Libtasn1 4.12">
+<meta name="keywords" content="GNU Libtasn1 4.12">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
</head>
<body lang="en">
-<h1 class="settitle" align="center">GNU Libtasn1 4.10</h1>
+<h1 class="settitle" align="center">GNU Libtasn1 4.12</h1>
<h1 class="top">Libtasn1</h1>
<p>This manual is for GNU Libtasn1
-(version 4.10, 4 April 2016),
+(version 4.12, 4 April 2016),
which is a library for Abstract Syntax Notation One (ASN.1) and
Distinguished Encoding Rules (DER) manipulation.
</p>
-This is libtasn1.info, produced by makeinfo version 6.1 from
+This is libtasn1.info, produced by makeinfo version 6.3 from
libtasn1.texi.
-This manual is for GNU Libtasn1 (version 4.10, 4 April 2016), which is a
+This manual is for GNU Libtasn1 (version 4.12, 4 April 2016), which is a
library for Abstract Syntax Notation One (ASN.1) and Distinguished
Encoding Rules (DER) manipulation.
Libtasn1
********
-This manual is for GNU Libtasn1 (version 4.10, 4 April 2016), which is a
+This manual is for GNU Libtasn1 (version 4.12, 4 April 2016), which is a
library for Abstract Syntax Notation One (ASN.1) and Distinguished
Encoding Rules (DER) manipulation.
%!PS-Adobe-2.0
%%Creator: dvips(k) 5.996 Copyright 2016 Radical Eye Software
%%Title: libtasn1.dvi
-%%CreationDate: Mon Jan 16 18:51:48 2017
+%%CreationDate: Mon May 29 04:41:51 2017
%%Pages: 36
%%PageOrder: Ascend
%%BoundingBox: 0 0 612 792
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips -q -o libtasn1.ps libtasn1.dvi
%DVIPSParameters: dpi=600
-%DVIPSSource: TeX output 2017.01.16:1851
+%DVIPSSource: TeX output 2017.05.29:0641
%%BeginProcSet: tex.pro 0 0
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
TeXDict begin 1 0 bop 150 1318 a Fs(Libtasn1)p 150 1385
3600 34 v 1035 1486 a Fr(Abstract)31 b(Syn)m(tax)f(Notation)j(One)d
(\(ASN.1\))h(library)f(for)g(the)h(GNU)g(system)2592
-1594 y(for)f(v)m(ersion)h(4.10,)h(4)f(April)f(2016)150
+1594 y(for)f(v)m(ersion)h(4.12,)h(4)f(April)f(2016)150
4795 y Fq(F)-11 b(abio)45 b(Fiorina)150 4928 y(Simon)g(Josefsson)150
5061 y(Nik)l(os)h(Ma)l(vrogiannop)t(oulos)g(\()p Fp(help-libtasn1@)o
(gn)o(u.o)o(rg)o Fq(\))p 150 5141 3600 17 v eop end
%%Page: 2 2
TeXDict begin 2 1 bop 150 4523 a Fr(This)21 b(man)m(ual)i(is)f(for)g
-(GNU)h(Libtasn1)g(\(v)m(ersion)g(4.10,)j(4)c(April)g(2016\),)k(whic)m
+(GNU)h(Libtasn1)g(\(v)m(ersion)g(4.12,)j(4)c(April)g(2016\),)k(whic)m
(h)c(is)h(a)f(library)g(for)g(Abstract)150 4633 y(Syn)m(tax)31
b(Notation)h(One)e(\(ASN.1\))h(and)f(Distinguished)h(Enco)s(ding)e
(Rules)i(\(DER\))g(manipulation.)150 4767 y(Cop)m(yrigh)m(t)602
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>API Index: GNU Libtasn1 API Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GNU Libtasn1 API Reference Manual">
<link rel="up" href="index.html" title="GNU Libtasn1 API Reference Manual">
<link rel="prev" href="libtasn1-libtasn1.html" title="libtasn1">
<link rel="next" href="ix02.html" title="Index of deprecated symbols">
-<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<dd></dd>
</div>
<div class="footer">
-<hr>Generated by GTK-Doc V1.24</div>
+<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
\ No newline at end of file
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GNU Libtasn1 API Reference Manual: GNU Libtasn1 API Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GNU Libtasn1 API Reference Manual">
<link rel="next" href="intro.html" title="GNU Libtasn1 API Reference Manual">
-<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">GNU Libtasn1 API Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">
- for GNU Libtasn1 4.7
+ for GNU Libtasn1 4.10
.
The latest version of this documentation can be found on-line at
<a class="ulink" href="https://www.gnu.org/software/libtasn1/reference/" target="_top">https://www.gnu.org/software/libtasn1/reference/</a>.
</dl></div>
</div>
<div class="footer">
-<hr>Generated by GTK-Doc V1.24</div>
+<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
\ No newline at end of file
+++ /dev/null
-<ONLINE href="https://www.gnu.org/software/libtasn1/reference/">
-<ANCHOR id="libtasn1-libtasn1" href="libtasn1/libtasn1-libtasn1.html">
-<ANCHOR id="libtasn1-libtasn1.other" href="libtasn1/libtasn1-libtasn1.html#libtasn1-libtasn1.other">
-<ANCHOR id="libtasn1-libtasn1.description" href="libtasn1/libtasn1-libtasn1.html#libtasn1-libtasn1.description">
-<ANCHOR id="libtasn1-libtasn1.functions_details" href="libtasn1/libtasn1-libtasn1.html#libtasn1-libtasn1.functions_details">
-<ANCHOR id="libtasn1-libtasn1.other_details" href="libtasn1/libtasn1-libtasn1.html#libtasn1-libtasn1.other_details">
-<ANCHOR id="ASN1-API:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-API:CAPS">
-<ANCHOR id="ASN1-VERSION:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-VERSION:CAPS">
-<ANCHOR id="ASN1-SUCCESS:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-SUCCESS:CAPS">
-<ANCHOR id="ASN1-FILE-NOT-FOUND:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-FILE-NOT-FOUND:CAPS">
-<ANCHOR id="ASN1-ELEMENT-NOT-FOUND:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-ELEMENT-NOT-FOUND:CAPS">
-<ANCHOR id="ASN1-IDENTIFIER-NOT-FOUND:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-IDENTIFIER-NOT-FOUND:CAPS">
-<ANCHOR id="ASN1-DER-ERROR:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-DER-ERROR:CAPS">
-<ANCHOR id="ASN1-VALUE-NOT-FOUND:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-VALUE-NOT-FOUND:CAPS">
-<ANCHOR id="ASN1-GENERIC-ERROR:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-GENERIC-ERROR:CAPS">
-<ANCHOR id="ASN1-VALUE-NOT-VALID:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-VALUE-NOT-VALID:CAPS">
-<ANCHOR id="ASN1-TAG-ERROR:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-ERROR:CAPS">
-<ANCHOR id="ASN1-TAG-IMPLICIT:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-IMPLICIT:CAPS">
-<ANCHOR id="ASN1-ERROR-TYPE-ANY:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-ERROR-TYPE-ANY:CAPS">
-<ANCHOR id="ASN1-SYNTAX-ERROR:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-SYNTAX-ERROR:CAPS">
-<ANCHOR id="ASN1-MEM-ERROR:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-MEM-ERROR:CAPS">
-<ANCHOR id="ASN1-MEM-ALLOC-ERROR:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-MEM-ALLOC-ERROR:CAPS">
-<ANCHOR id="ASN1-DER-OVERFLOW:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-DER-OVERFLOW:CAPS">
-<ANCHOR id="ASN1-NAME-TOO-LONG:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-NAME-TOO-LONG:CAPS">
-<ANCHOR id="ASN1-ARRAY-ERROR:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-ARRAY-ERROR:CAPS">
-<ANCHOR id="ASN1-ELEMENT-NOT-EMPTY:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-ELEMENT-NOT-EMPTY:CAPS">
-<ANCHOR id="ASN1-PRINT-NAME:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-PRINT-NAME:CAPS">
-<ANCHOR id="ASN1-PRINT-NAME-TYPE:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-PRINT-NAME-TYPE:CAPS">
-<ANCHOR id="ASN1-PRINT-NAME-TYPE-VALUE:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-PRINT-NAME-TYPE-VALUE:CAPS">
-<ANCHOR id="ASN1-PRINT-ALL:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-PRINT-ALL:CAPS">
-<ANCHOR id="ASN1-CLASS-UNIVERSAL:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-CLASS-UNIVERSAL:CAPS">
-<ANCHOR id="ASN1-CLASS-APPLICATION:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-CLASS-APPLICATION:CAPS">
-<ANCHOR id="ASN1-CLASS-CONTEXT-SPECIFIC:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-CLASS-CONTEXT-SPECIFIC:CAPS">
-<ANCHOR id="ASN1-CLASS-PRIVATE:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-CLASS-PRIVATE:CAPS">
-<ANCHOR id="ASN1-CLASS-STRUCTURED:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-CLASS-STRUCTURED:CAPS">
-<ANCHOR id="ASN1-TAG-BOOLEAN:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-BOOLEAN:CAPS">
-<ANCHOR id="ASN1-TAG-INTEGER:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-INTEGER:CAPS">
-<ANCHOR id="ASN1-TAG-SEQUENCE:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-SEQUENCE:CAPS">
-<ANCHOR id="ASN1-TAG-SET:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-SET:CAPS">
-<ANCHOR id="ASN1-TAG-OCTET-STRING:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-OCTET-STRING:CAPS">
-<ANCHOR id="ASN1-TAG-BIT-STRING:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-BIT-STRING:CAPS">
-<ANCHOR id="ASN1-TAG-UTCTime" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-UTCTime">
-<ANCHOR id="ASN1-TAG-GENERALIZEDTime" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-GENERALIZEDTime">
-<ANCHOR id="ASN1-TAG-OBJECT-ID:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-OBJECT-ID:CAPS">
-<ANCHOR id="ASN1-TAG-ENUMERATED:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-ENUMERATED:CAPS">
-<ANCHOR id="ASN1-TAG-NULL:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-NULL:CAPS">
-<ANCHOR id="ASN1-TAG-GENERALSTRING:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-GENERALSTRING:CAPS">
-<ANCHOR id="ASN1-TAG-NUMERIC-STRING:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-NUMERIC-STRING:CAPS">
-<ANCHOR id="ASN1-TAG-IA5-STRING:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-IA5-STRING:CAPS">
-<ANCHOR id="ASN1-TAG-TELETEX-STRING:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-TELETEX-STRING:CAPS">
-<ANCHOR id="ASN1-TAG-PRINTABLE-STRING:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-PRINTABLE-STRING:CAPS">
-<ANCHOR id="ASN1-TAG-UNIVERSAL-STRING:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-UNIVERSAL-STRING:CAPS">
-<ANCHOR id="ASN1-TAG-BMP-STRING:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-BMP-STRING:CAPS">
-<ANCHOR id="ASN1-TAG-UTF8-STRING:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-UTF8-STRING:CAPS">
-<ANCHOR id="ASN1-TAG-VISIBLE-STRING:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-TAG-VISIBLE-STRING:CAPS">
-<ANCHOR id="asn1-node-st" href="libtasn1/libtasn1-libtasn1.html#asn1-node-st">
-<ANCHOR id="asn1-node" href="libtasn1/libtasn1-libtasn1.html#asn1-node">
-<ANCHOR id="ASN1-MAX-NAME-SIZE:CAPS" href="libtasn1/libtasn1-libtasn1.html#ASN1-MAX-NAME-SIZE:CAPS">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GNU Libtasn1 API Reference Manual: GNU Libtasn1 API Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GNU Libtasn1 API Reference Manual">
<link rel="up" href="index.html" title="GNU Libtasn1 API Reference Manual">
<link rel="prev" href="index.html" title="GNU Libtasn1 API Reference Manual">
<link rel="next" href="libtasn1-libtasn1.html" title="libtasn1">
-<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
</p>
</div>
<div class="footer">
-<hr>Generated by GTK-Doc V1.24</div>
+<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
\ No newline at end of file
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Index of deprecated symbols: GNU Libtasn1 API Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GNU Libtasn1 API Reference Manual">
<link rel="up" href="index.html" title="GNU Libtasn1 API Reference Manual">
<link rel="prev" href="api-index-full.html" title="API Index">
<link rel="next" href="ix03.html" title="Index of new symbols in 1.6">
-<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="index">
<div class="titlepage"><div><div><h1 class="title">
<a name="id-1.4"></a>Index of deprecated symbols</h1></div></div></div>
-<div class="index"></div>
+<div xmlns:xlink="http://www.w3.org/1999/xlink" class="index"></div>
</div>
<div class="footer">
-<hr>Generated by GTK-Doc V1.24</div>
+<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
\ No newline at end of file
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Index of new symbols in 1.6: GNU Libtasn1 API Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GNU Libtasn1 API Reference Manual">
<link rel="up" href="index.html" title="GNU Libtasn1 API Reference Manual">
<link rel="prev" href="ix02.html" title="Index of deprecated symbols">
<link rel="next" href="ix04.html" title="Index of new symbols in 2.0">
-<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="index">
<div class="titlepage"><div><div><h1 class="title">
<a name="id-1.5"></a>Index of new symbols in 1.6</h1></div></div></div>
-<div class="index"></div>
+<div xmlns:xlink="http://www.w3.org/1999/xlink" class="index"></div>
</div>
<div class="footer">
-<hr>Generated by GTK-Doc V1.24</div>
+<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
\ No newline at end of file
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Index of new symbols in 2.0: GNU Libtasn1 API Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GNU Libtasn1 API Reference Manual">
<link rel="up" href="index.html" title="GNU Libtasn1 API Reference Manual">
<link rel="prev" href="ix03.html" title="Index of new symbols in 1.6">
-<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="index">
<div class="titlepage"><div><div><h1 class="title">
<a name="id-1.6"></a>Index of new symbols in 2.0</h1></div></div></div>
-<div class="index"></div>
+<div xmlns:xlink="http://www.w3.org/1999/xlink" class="index"></div>
</div>
<div class="footer">
-<hr>Generated by GTK-Doc V1.24</div>
+<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
\ No newline at end of file
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>libtasn1: GNU Libtasn1 API Reference Manual</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GNU Libtasn1 API Reference Manual">
<link rel="up" href="intro.html" title="GNU Libtasn1 API Reference Manual">
<link rel="prev" href="intro.html" title="GNU Libtasn1 API Reference Manual">
<link rel="next" href="api-index-full.html" title="API Index">
-<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
</tr></table></div>
<div class="refsect1">
<a name="libtasn1-libtasn1.other"></a><h2>Types and Values</h2>
-<div class="informaltable"><table width="100%" border="0">
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
<hr>
<div class="refsect2">
<a name="ASN1-VERSION:CAPS"></a><h3>ASN1_VERSION</h3>
-<pre class="programlisting">#define ASN1_VERSION "4.7"
+<pre class="programlisting">#define ASN1_VERSION "4.10"
</pre>
<p>
</p>
</div>
</div>
<div class="footer">
-<hr>Generated by GTK-Doc V1.24</div>
+<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="no"?>
-<book xmlns="http://www.devhelp.net/book" title="GNU Libtasn1 API Reference Manual" link="index.html" author="" name="libtasn1" version="2" language="c">
+<book xmlns="http://www.devhelp.net/book" title="GNU Libtasn1 API Reference Manual" link="index.html" author="" name="libtasn1" version="2" language="c" online="https://www.gnu.org/software/libtasn1/reference/">
<chapters>
<sub name="GNU Libtasn1 API Reference Manual" link="intro.html">
<sub name="libtasn1" link="libtasn1-libtasn1.html"/>
@set UPDATED 4 April 2016
@set UPDATED-MONTH April 2016
-@set EDITION 4.10
-@set VERSION 4.10
+@set EDITION 4.12
+@set VERSION 4.12
@set UPDATED 4 April 2016
@set UPDATED-MONTH April 2016
-@set EDITION 4.10
-@set VERSION 4.10
+@set EDITION 4.12
+@set VERSION 4.12
/* Is STRING a number? */
for (k = 0; k < counter; k++)
- if (!isdigit (string[k]))
+ if (!isdigit ((int)string[k]))
break;
if (k >= counter)
{
/* Is STRING a number? */
for (k = 0; k < counter; k++)
- if (!isdigit (string[k]))
+ if (!isdigit ((int)string[k]))
break;
if (k >= counter)
{
if (str_len < 8)
{
warn();
- return ASN1_DER_ERROR;
+ return ASN1_TIME_ENCODING_ERROR;
}
- if (flags & ASN1_DECODE_FLAG_STRICT_DER)
+ if ((flags & ASN1_DECODE_FLAG_STRICT_DER) && !(flags & ASN1_DECODE_FLAG_ALLOW_INCORRECT_TIME))
{
p = &der[len_len];
for (i=0;i<(unsigned)(str_len-1);i++)
}
warn();
- return ASN1_DER_ERROR;
+ return ASN1_TIME_ENCODING_ERROR;
}
}
if (sign_count == 0 && p[str_len-1] != 'Z')
{
warn();
- return ASN1_DER_ERROR;
+ return ASN1_TIME_ENCODING_ERROR;
}
}
memcpy (str, der + len_len, str_len);
{ /* indefinite length method */
if (!HAVE_TWO(ider_len) || ((der[counter]) || der[counter + 1]))
{
- _asn1_append_sequence_set (p, &tcache);
+ result = _asn1_append_sequence_set (p, &tcache);
+ if (result != 0)
+ {
+ warn();
+ goto cleanup;
+ }
p = tcache.tail;
move = RIGHT;
continue;
{ /* definite length method */
if (len2 > counter)
{
- _asn1_append_sequence_set (p, &tcache);
+ result = _asn1_append_sequence_set (p, &tcache);
+ if (result != 0)
+ {
+ warn();
+ goto cleanup;
+ }
p = tcache.tail;
move = RIGHT;
continue;
|| (type_field (p2->type) == ASN1_ETYPE_SIZE))
p2 = p2->right;
if (p2->right == NULL)
- _asn1_append_sequence_set (p, &tcache);
+ {
+ result = _asn1_append_sequence_set (p, &tcache);
+ if (result != 0)
+ {
+ warn();
+ goto cleanup;
+ }
+ }
p = p2;
}
}
return ASN1_SUCCESS;
}
-/* Appends a new element into the sequent (or set) defined by this
+/* Appends a new element into the sequence (or set) defined by this
* node. The new element will have a name of '?number', where number
* is a monotonically increased serial number.
*
LIBTASN1_ERROR_ENTRY (ASN1_NAME_TOO_LONG),
LIBTASN1_ERROR_ENTRY (ASN1_ARRAY_ERROR),
LIBTASN1_ERROR_ENTRY (ASN1_ELEMENT_NOT_EMPTY),
+ LIBTASN1_ERROR_ENTRY (ASN1_TIME_ENCODING_ERROR),
{0, 0}
};
{
#endif
-#define ASN1_VERSION "4.10"
+#define ASN1_VERSION "4.12"
#if defined(__GNUC__) && !defined(ASN1_INTERNAL_BUILD)
# define _ASN1_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#define ASN1_NAME_TOO_LONG 15
#define ASN1_ARRAY_ERROR 16
#define ASN1_ELEMENT_NOT_EMPTY 17
+#define ASN1_TIME_ENCODING_ERROR 18
/*************************************/
/* Constants used in asn1_visit_tree */
#define ASN1_DECODE_FLAG_ALLOW_PADDING 1
/* This flag would ensure that no BER decoding takes place */
#define ASN1_DECODE_FLAG_STRICT_DER (1<<1)
+/* This flag will tolerate Time encoding errors when in strict DER */
+#define ASN1_DECODE_FLAG_ALLOW_INCORRECT_TIME (1<<2)
struct asn1_data_node_st
if (n_end)
{
nsize = n_end - n_start;
+ if (nsize >= sizeof(n))
+ return NULL;
+
memcpy (n, n_start, nsize);
n[nsize] = 0;
n_start = n_end;
if (n_end)
{
nsize = n_end - n_start;
+ if (nsize >= sizeof(n))
+ return NULL;
+
memcpy (n, n_start, nsize);
n[nsize] = 0;
n_start = n_end;
printf ("\
-b, --benchmark perform a benchmark on decoding\n\
-s, --strict use strict DER decoding\n\
+ -t, --no-time-strict use strict DER decoding but not in time fields\n\
-h, --help display this help and exit\n\
-v, --version output version information and exit\n");
emit_bug_reporting_address ();
static const struct option long_options[] = {
{"help", no_argument, 0, 'h'},
{"strict", no_argument, 0, 's'},
+ {"no-time-strict", no_argument, 0, 't'},
{"debug", no_argument, 0, 'd'},
{"benchmark", no_argument, 0, 'b'},
{"version", no_argument, 0, 'v'},
int asn1_result = ASN1_SUCCESS;
unsigned char *der;
int der_len = 0, benchmark = 0;
- int strict = 0, debug = 0;
+ int flags = 0, debug = 0;
/* FILE *outputFile; */
set_program_name (argv[0]);
{
option_result =
- getopt_long (argc, argv, "hbdsvc", long_options, &option_index);
+ getopt_long (argc, argv, "hbdsvtc", long_options, &option_index);
if (option_result == -1)
break;
debug = 1;
break;
case 's':
- strict = 1;
+ case 't':
+ flags |= ASN1_DECODE_FLAG_STRICT_DER;
+ if (option_result == 't')
+ flags |= ASN1_DECODE_FLAG_ALLOW_INCORRECT_TIME;
break;
case 'v': /* VERSION */
version_etc (stdout, program_name, PACKAGE, VERSION,
fclose(inputFile);
*/
- if (decode (definitions, typeName, der, der_len, benchmark, strict) != ASN1_SUCCESS)
+ if (decode (definitions, typeName, der, der_len, benchmark, flags) != ASN1_SUCCESS)
{
asn1_delete_structure (&definitions);
free (inputFileAsnName);
static int
simple_decode (asn1_node definitions, const char *typeName, void *der,
- int der_len, int benchmark, int strict)
+ int der_len, int benchmark, int flags)
{
int asn1_result;
return asn1_result;
}
- if (strict != 0)
+ if (flags != 0)
asn1_result =
- asn1_der_decoding2(&structure, der, &der_len, ASN1_DECODE_FLAG_STRICT_DER, errorDescription);
+ asn1_der_decoding2(&structure, der, &der_len, flags, errorDescription);
else
asn1_result =
asn1_der_decoding (&structure, der, der_len, errorDescription);
static int
decode (asn1_node definitions, const char *typeName, void *der, int der_len,
- int benchmark, int strict)
+ int benchmark, int flags)
{
struct benchmark_st st;
if (benchmark == 0)
- return simple_decode (definitions, typeName, der, der_len, benchmark, strict);
+ return simple_decode (definitions, typeName, der, der_len, benchmark, flags);
else
{
start_benchmark (&st);
do
{
- simple_decode (definitions, typeName, der, der_len, benchmark, strict);
+ simple_decode (definitions, typeName, der, der_len, benchmark, flags);
st.size++;
}
while (benchmark_must_finish == 0);
EXTRA_DIST = Test_parser.asn Test_tree.asn Test_tree_asn1_tab.c mscat.asn \
Test_encoding.asn pkix.asn TestIndef.p12 choice.asn coding-decoding2.asn \
TestIndef2.p12 TestIndef3.der TestCertOctetOverflow.der \
+ cert-invalid-time.der \
libtasn1.supp ocsp-basic-response.der spc_pe_image_data.der \
invalid-x509/id-000000.der invalid-x509/id-000001.der \
invalid-x509/id-000002.der invalid-x509/id-000003.der \
invalid-x509/id-000032.der invalid-x509/id-000033.der \
invalid-x509/id-000034.der invalid-x509/id-000035.der \
invalid-pkcs7/id-000001.der invalid-pkcs7/id-000002.der \
- invalid-pkcs7/id-000003.der
+ invalid-pkcs7/id-000003.der invalid-assignments1.txt \
+ invalid-assignments2.txt
# For crlf.
EXTRA_DIST += crlf.cer crl.der ocsp.der
dist_check_SCRIPTS = crlf benchmark threadsafety decoding decoding-invalid-x509 \
- decoding-invalid-pkcs7
+ decoding-invalid-pkcs7 coding
MOSTLYCLEANFILES = Test_parser_ERROR.asn
Test_strings Test_choice Test_encdec copynode coding-decoding2 \
strict-der Test_choice_ocsp decoding decoding-invalid-x509 \
ocsp-basic-response octet-string coding-long-oid object-id-decoding \
- spc_pe_image_data decoding-invalid-pkcs7
+ spc_pe_image_data decoding-invalid-pkcs7 coding
TESTS_ENVIRONMENT = \
ASN1PARSER=$(srcdir)/Test_parser.asn \
Test_choice_ocsp$(EXEEXT) decoding decoding-invalid-x509 \
ocsp-basic-response$(EXEEXT) octet-string$(EXEEXT) \
coding-long-oid$(EXEEXT) object-id-decoding$(EXEEXT) \
- spc_pe_image_data$(EXEEXT) decoding-invalid-pkcs7
+ spc_pe_image_data$(EXEEXT) decoding-invalid-pkcs7 coding
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/lib/glm4/gnulib-comp.m4 \
EXTRA_DIST = Test_parser.asn Test_tree.asn Test_tree_asn1_tab.c \
mscat.asn Test_encoding.asn pkix.asn TestIndef.p12 choice.asn \
coding-decoding2.asn TestIndef2.p12 TestIndef3.der \
- TestCertOctetOverflow.der libtasn1.supp \
+ TestCertOctetOverflow.der cert-invalid-time.der libtasn1.supp \
ocsp-basic-response.der spc_pe_image_data.der \
invalid-x509/id-000000.der invalid-x509/id-000001.der \
invalid-x509/id-000002.der invalid-x509/id-000003.der \
invalid-x509/id-000032.der invalid-x509/id-000033.der \
invalid-x509/id-000034.der invalid-x509/id-000035.der \
invalid-pkcs7/id-000001.der invalid-pkcs7/id-000002.der \
- invalid-pkcs7/id-000003.der crlf.cer crl.der ocsp.der
+ invalid-pkcs7/id-000003.der invalid-assignments1.txt \
+ invalid-assignments2.txt crlf.cer crl.der ocsp.der
dist_check_SCRIPTS = crlf benchmark threadsafety decoding decoding-invalid-x509 \
- decoding-invalid-pkcs7
+ decoding-invalid-pkcs7 coding
MOSTLYCLEANFILES = Test_parser_ERROR.asn
TESTS_ENVIRONMENT = \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+coding.log: coding
+ @p='coding'; \
+ b='coding'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
.test.log:
@p='$<'; \
$(am__set_b); \
--- /dev/null
+#!/bin/sh
+
+# Copyright (C) 2017 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+srcdir="${srcdir:-.}"
+
+ASAN_OPTIONS="detect_leaks=0:exitcode=6"
+export ASAN_OPTIONS
+
+if ! test -z "${VALGRIND}";then
+VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=7 --leak-check=no"
+fi
+
+ASN1CODING="${ASN1CODING:-../src/asn1Coding$EXEEXT}"
+ASN1PKIX="${ASN1PKIX:-pkix.asn}"
+TMPFILE="asn1.$$.tmp"
+
+cat <<EOF >$TMPFILE
+PKIX1 { }
+
+DEFINITIONS IMPLICIT TAGS ::=
+
+BEGIN
+
+Dss-Sig-Value ::= SEQUENCE {
+ r INTEGER,
+ s INTEGER
+}
+
+END
+EOF
+
+$VALGRIND $ASN1CODING -c $TMPFILE ${srcdir}/invalid-assignments1.txt
+if test $? != 1;then
+ echo "Encoding failed (1)"
+ exit 1
+fi
+
+$VALGRIND $ASN1CODING -c $TMPFILE ${srcdir}/invalid-assignments2.txt
+if test $? != 1;then
+ echo "Encoding failed (2)"
+ exit 1
+fi
+
+rm -f $TMPFILE
+
+exit 0
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+srcdir="${srcdir:-.}"
+
if ! test -z "${VALGRIND}";then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=7 --leak-check=no"
fi
ASN1DECODING="${ASN1DECODING:-../src/asn1Decoding$EXEEXT}"
ASN1PKIX="${ASN1PKIX:-pkix.asn}"
-$VALGRIND $ASN1DECODING $ASN1PKIX TestCertOctetOverflow.der PKIX1.Certificate
+$VALGRIND $ASN1DECODING $ASN1PKIX ${srcdir}/TestCertOctetOverflow.der PKIX1.Certificate
if test $? != 1;then
echo "Decoding failed"
exit 1
fi
+# test decoding of certificate with invalid time field
+$VALGRIND $ASN1DECODING -s $ASN1PKIX ${srcdir}/cert-invalid-time.der PKIX1.Certificate
+if test $? != 1;then
+ echo "Decoding with invalid time succeeded when not expected"
+ exit 1
+fi
+
+# test decoding of certificate with invalid time field
+$VALGRIND $ASN1DECODING -t $ASN1PKIX ${srcdir}/cert-invalid-time.der PKIX1.Certificate
+if test $? != 0;then
+ echo "Decoding with invalid time failed when not expected"
+ exit 1
+fi
+
exit 0
--- /dev/null
+dp ?CIX1-V÷÷\1aKçrú÷÷÷alxeKIX1\e\e\e\eãããi\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89\89g-VãþãããããKIX1.ãããããã\e\eIsÿg-V÷÷\1aKçr÷÷÷÷-V
\ No newline at end of file
if (etype != ASN1_ETYPE_OCTET_STRING)
{
- fprintf (stderr, "error in %d: The type (%d) doesn't match octet string.\n", __LINE__, etype);
+ fprintf (stderr, "error in %d: The type (%d) doesn't match octet string.\n", __LINE__, (int)etype);
exit (1);
}