diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-09-08 21:03:45 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-09-08 21:03:45 +0200 |
commit | 20700893c89d35b9b628a086d6465ed2f6a7a5b5 (patch) | |
tree | 6a5be1fa613dee806ed1fe35cb14d0d2dd8e7cf0 /tests | |
parent | f46ad825895cc5f27a00bc0b763190fa330c4d78 (diff) | |
download | libtasn1-20700893c89d35b9b628a086d6465ed2f6a7a5b5.tar.gz libtasn1-20700893c89d35b9b628a086d6465ed2f6a7a5b5.tar.bz2 libtasn1-20700893c89d35b9b628a086d6465ed2f6a7a5b5.zip |
Added tool to benchmark X.509 structure decoding.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rwxr-xr-x | tests/benchmark | 35 |
2 files changed, 36 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 61c8737..a7f8336 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -27,7 +27,7 @@ EXTRA_DIST = Test_parser.asn Test_tree.asn Test_tree_asn1_tab.c \ # For crlf. EXTRA_DIST += crlf.cer -dist_check_SCRIPTS = crlf +dist_check_SCRIPTS = crlf benchmark dist_check_SCRIPTS += threadsafety diff --git a/tests/benchmark b/tests/benchmark new file mode 100755 index 0000000..17a006a --- /dev/null +++ b/tests/benchmark @@ -0,0 +1,35 @@ +#!/bin/sh + +# Copyright (C) 2006-2012 Free Software Foundation, Inc. +# +# Author: Simon Josefsson +# +# This file is part of LIBTASN1. +# +# 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/>. + +set -e + +srcdir=${srcdir:-.} +ASN1DECODING=../src/asn1Decoding${EXEEXT} + +# The crlf.cer file is a normal certificate which contains bytes 0x0A +# (LF), 0x0D (CF), and 0xFF (EOF), all are known to cause failures +# when using fopen/fgetc/fscanf on streams on some systems (read: +# Windows). + +$ASN1DECODING \ + -b $srcdir/../examples/pkix.asn \ + $srcdir/crlf.cer \ + PKIX1Implicit88.Certificate |