rsa-encrypt-test 451 Bytes
Newer Older
Niels Möller's avatar
Niels Möller committed
1
2
3
4
5
6
7
8
#! /bin/sh

if [ -z "$srcdir" ] ; then
  srcdir=`pwd`
fi

data="$srcdir/nettle-benchmark.c"

9
10
if [ -x rsa-encrypt$EXEEXT ] ; then
  if $EMULATOR ./rsa-encrypt -r rsa-decrypt$EXEEXT testkey.pub < "$data" > testciphertext ; then
Niels Möller's avatar
Niels Möller committed
11
12
13
14
    :
  else
    exit 1
  fi
15
  if $EMULATOR ./rsa-decrypt testkey < testciphertext > testcleartext ; then
Niels Möller's avatar
Niels Möller committed
16
17
18
19
20
21
22
23
24
25
26
27
    :
  else
    exit 1
  fi
  if cmp "$data" testcleartext ; then
    exit 0
  else
    exit 1
  fi
else
  exit 77
fi