Home | History | Annotate | Line # | Download | only in cgd
t_cgdconfig.sh revision 1.1
      1  1.1  riastrad #	$NetBSD: t_cgdconfig.sh,v 1.1 2022/08/12 10:48:28 riastradh Exp $
      2  1.1  riastrad #
      3  1.1  riastrad # Copyright (c) 2022 The NetBSD Foundation, Inc.
      4  1.1  riastrad # All rights reserved.
      5  1.1  riastrad #
      6  1.1  riastrad # Redistribution and use in source and binary forms, with or without
      7  1.1  riastrad # modification, are permitted provided that the following conditions
      8  1.1  riastrad # are met:
      9  1.1  riastrad # 1. Redistributions of source code must retain the above copyright
     10  1.1  riastrad #    notice, this list of conditions and the following disclaimer.
     11  1.1  riastrad # 2. Redistributions in binary form must reproduce the above copyright
     12  1.1  riastrad #    notice, this list of conditions and the following disclaimer in the
     13  1.1  riastrad #    documentation and/or other materials provided with the distribution.
     14  1.1  riastrad #
     15  1.1  riastrad # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     16  1.1  riastrad # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     17  1.1  riastrad # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     18  1.1  riastrad # PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     19  1.1  riastrad # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     20  1.1  riastrad # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     21  1.1  riastrad # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     22  1.1  riastrad # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     23  1.1  riastrad # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     24  1.1  riastrad # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     25  1.1  riastrad # POSSIBILITY OF SUCH DAMAGE.
     26  1.1  riastrad #
     27  1.1  riastrad 
     28  1.1  riastrad atf_test_case storedkey
     29  1.1  riastrad storedkey_head()
     30  1.1  riastrad {
     31  1.1  riastrad 	atf_set descr "Test key generation with storedkey"
     32  1.1  riastrad }
     33  1.1  riastrad storedkey_body()
     34  1.1  riastrad {
     35  1.1  riastrad 	cat <<EOF >params
     36  1.1  riastrad algorithm adiantum;
     37  1.1  riastrad iv-method encblkno1;
     38  1.1  riastrad keylength 256;
     39  1.1  riastrad verify_method none;
     40  1.1  riastrad keygen storedkey key AAABAJtnmp3XZspMBAFpCYnB8Hekn0 \
     41  1.1  riastrad                      gj5cDVngslfGLSqwcy;
     42  1.1  riastrad EOF
     43  1.1  riastrad 	atf_check -o inline:'m2eanddmykwEAWkJicHwd6SfSCPlwNWeCyV8YtKrBzI=\n' \
     44  1.1  riastrad 	    cgdconfig -t params
     45  1.1  riastrad }
     46  1.1  riastrad 
     47  1.1  riastrad atf_test_case storedkey2a
     48  1.1  riastrad storedkey2a_head()
     49  1.1  riastrad {
     50  1.1  riastrad 	atf_set descr "Test key generation with combined storedkeys"
     51  1.1  riastrad }
     52  1.1  riastrad storedkey2a_body()
     53  1.1  riastrad {
     54  1.1  riastrad 	cat <<EOF >params
     55  1.1  riastrad algorithm adiantum;
     56  1.1  riastrad iv-method encblkno1;
     57  1.1  riastrad keylength 256;
     58  1.1  riastrad verify_method none;
     59  1.1  riastrad keygen storedkey key AAABAJtnmp3XZspMBAFpCYnB8Hekn0 \
     60  1.1  riastrad                      gj5cDVngslfGLSqwcy;
     61  1.1  riastrad keygen storedkey key AAABAK1pbgIayXftX0RQ3AaMK4YEd/ \
     62  1.1  riastrad                      fowKwQbENxpu3o1k9m;
     63  1.1  riastrad EOF
     64  1.1  riastrad 	atf_check -o inline:'Ng70n82vvaFbRTnVj03b8aDov8slbMXySFTajzp9SFQ=\n' \
     65  1.1  riastrad 	    cgdconfig -t params
     66  1.1  riastrad }
     67  1.1  riastrad 
     68  1.1  riastrad atf_test_case storedkey2b
     69  1.1  riastrad storedkey2b_head()
     70  1.1  riastrad {
     71  1.1  riastrad 	atf_set descr "Test key generation with combined storedkeys, reversed"
     72  1.1  riastrad }
     73  1.1  riastrad storedkey2b_body()
     74  1.1  riastrad {
     75  1.1  riastrad 	cat <<EOF >params
     76  1.1  riastrad algorithm adiantum;
     77  1.1  riastrad iv-method encblkno1;
     78  1.1  riastrad keylength 256;
     79  1.1  riastrad verify_method none;
     80  1.1  riastrad keygen storedkey key AAABAK1pbgIayXftX0RQ3AaMK4YEd/ \
     81  1.1  riastrad                      fowKwQbENxpu3o1k9m;
     82  1.1  riastrad keygen storedkey key AAABAJtnmp3XZspMBAFpCYnB8Hekn0 \
     83  1.1  riastrad                      gj5cDVngslfGLSqwcy;
     84  1.1  riastrad EOF
     85  1.1  riastrad 	atf_check -o inline:'Ng70n82vvaFbRTnVj03b8aDov8slbMXySFTajzp9SFQ=\n' \
     86  1.1  riastrad 	    cgdconfig -t params
     87  1.1  riastrad }
     88  1.1  riastrad 
     89  1.1  riastrad atf_init_test_cases()
     90  1.1  riastrad {
     91  1.1  riastrad 	atf_add_test_case storedkey
     92  1.1  riastrad 	atf_add_test_case storedkey2a
     93  1.1  riastrad 	atf_add_test_case storedkey2b
     94  1.1  riastrad }
     95