#!/bin/sh # # Generate completely random data and attempt to stuff that into a key. # # Format: # # fuzz-x509.sh [] # file=/tmp/data if [ "$1" != "" ] then file=$1 fi cd /tmp sync declare -i n i j k while true do n=$RANDOM j=$RANDOM j=j%10 k=0 echo $n $j dd if=/dev/urandom of=$file bs=$n count=1 for ((i=1; i/dev/null | keyctl padd asymmetric foo @s 2>/dev/null k=k+1 if [ $k -eq 10 ] then echo -n . k=0 fi done echo done