diff options
author | Simon Josefsson <simon@josefsson.org> | 2006-10-24 11:44:26 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2006-10-24 11:44:26 +0000 |
commit | 62812094cbe2282874b74eac0ceba3068a0ad3e1 (patch) | |
tree | 274c3259d0bde27c37ad4fdc2d5e0f258e44d61b /tests/pkcs8-decode/pkcs8 | |
parent | 82a372b758758ba22c62d71dd08a2f621eb70900 (diff) | |
download | gnutls-62812094cbe2282874b74eac0ceba3068a0ad3e1.tar.gz |
Move pkcs8 tests to pkcs8-decode/.
Diffstat (limited to 'tests/pkcs8-decode/pkcs8')
-rwxr-xr-x | tests/pkcs8-decode/pkcs8 | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/pkcs8-decode/pkcs8 b/tests/pkcs8-decode/pkcs8 new file mode 100755 index 0000000000..597ec289af --- /dev/null +++ b/tests/pkcs8-decode/pkcs8 @@ -0,0 +1,44 @@ +#!/bin/sh + +# Copyright (C) 2004, 2005, 2006 Free Software Foundation +# +# Author: Simon Josefsson +# +# This file is part of GNUTLS. +# +# GNUTLS 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 2 of the License, or (at +# your option) any later version. +# +# GNUTLS 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 GNUTLS; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +srcdir=${srcdir:-.} +CERTTOOL=${CERTTOOL:-../../src/certtool} + +ret=0 +for p8 in 'encpkcs8.pem foobar' unencpkcs8.pem 'enc2pkcs8.pem baz'; do + set -- $p8 + file=$1 + passwd=$2 + $CERTTOOL --key-info --pkcs8 --password "$passwd" \ + --infile $srcdir/$file > out 2>&1 + rc=$? + if test $rc != 0; then + echo "PKCS8 FATAL $p8" + ret=1 + else + echo "PKCS8 OK $p8" + fi +done +rm -f out + +echo "PKCS8 DONE (rc $ret)" +exit $ret |