# $OpenBSD: Makefile,v 1.6 2002/01/15 18:51:39 art Exp $ CLEANFILES+= testdsa.key testdsa.pem rsakey.pem rsacert.pem dsa512.pem REGRESSTARGETS=ssl-enc ssl-dsa ssl-rsa OPENSSL=/usr/sbin/openssl CLEAR1=p CIPHER=cipher CLEAR2=clear ${CLEAR1}: openssl.cnf cat ${.CURDIR}/openssl.cnf > ${CLEAR1} CLEANFILES+=${CLEAR1} ENCTARGETS=rc4 des-cfb des-ede-cfb des-ede3-cfb des-ofb des-ede-ofb des-ede3-ofb ENCTARGETS+=des-ecb des-ede des-ede3 desx des-cbc des-ede-cbc des-ede3-cbc ENCTARGETS+=rc2-ecb rc2-cfb rc2-ofb rc2-cbc bf-ecb bf-cfb bf-ofb bf-cbc rc4 ENCTARGETS+=cast5-ecb cast5-cfb cast5-ofb cast5-cbc .for ENC in ${ENCTARGETS} ${CIPHER}.${ENC}: ${CLEAR1} ${OPENSSL} ${ENC} -bufsize 113 -e -k test < ${CLEAR1} > ${CIPHER}.${ENC} ${CIPHER}.${ENC}.b64: ${CLEAR1} ${OPENSSL} ${ENC} -bufsize 113 -a -e -k test < ${CLEAR1} > ${CIPHER}.${ENC}.b64 ${CLEAR2}.${ENC}: ${CIPHER}.${ENC} ${OPENSSL} ${ENC} -bufsize 157 -d -k test < ${CIPHER}.${ENC} > ${CLEAR2}.${ENC} ${CLEAR2}.${ENC}.b64: ${CIPHER}.${ENC}.b64 ${OPENSSL} ${ENC} -bufsize 157 -a -d -k test < ${CIPHER}.${ENC}.b64 > ${CLEAR2}.${ENC}.b64 ssl-enc-${ENC}: ${CLEAR1} ${CLEAR2}.${ENC} cmp ${CLEAR1} ${CLEAR2}.${ENC} ssl-enc-${ENC}.b64: ${CLEAR1} ${CLEAR2}.${ENC}.b64 cmp ${CLEAR1} ${CLEAR2}.${ENC}.b64 REGRESSTARGETS+=ssl-enc-${ENC} ssl-enc-${ENC}.b64 CLEANFILES+=${CIPHER}.${ENC} ${CIPHER}.${ENC}.b64 ${CLEAR2}.${ENC} ${CLEAR2}.${ENC}.b64 .endfor ssl-enc: sh ${.CURDIR}/testenc.sh ${.OBJDIR} ${.CURDIR} ssl-dsa: sh ${.CURDIR}/testdsa.sh ${.OBJDIR} ${.CURDIR} ssl-rsa: sh ${.CURDIR}/testrsa.sh ${.OBJDIR} ${.CURDIR} .include