Update files for OpenSSL-1.0.0g import.
[dragonfly.git] / secure / lib / libssh / Makefile.etc
1 # $DragonFly: src/secure/lib/libssh/Makefile.etc,v 1.5 2008/05/24 09:15:43 corecode Exp $
2 #
3
4 .include "../../Makefile.ssh.common"
5
6 FILES=          ${SSHDIR}/moduli
7 FILESDIR=       /etc/ssh
8 FILESOWN=       ${BINOWN}
9 FILESGRP=       ${BINGRP}
10 FILESMODE=      644
11
12 # make confuses the text file `moduli' with a binary which needs
13 # to be created from `moduli.c'.  Override this implicit rule by an
14 # explicit do-nothing.
15 ${SSHDIR}/moduli:
16         @true
17
18 BLACKLISTS!=    ls ${.CURDIR}/[RD]SA-*.?e* | sed -e 's/\.[^.]*$$//' | sort -u
19
20 .for bl in ${BLACKLISTS}
21 FILES+= blacklist.${bl:T}
22 CLEANFILES+= blacklist.${bl:T}
23
24 ${bl:T}_input!= echo ${bl}*
25
26 blacklist.${bl:T}: ${${bl:T}_input}
27         @printf "# After these initial comments, all the lines in this file must be\n" > ${.TARGET}
28         @printf "# exactly the same length, and must be in sorted order. Each line must\n" >> ${.TARGET}
29         @printf "# consist of the lower-case key fingerprint (ssh-keygen -l -f\n" >> ${.TARGET}
30         @printf "# /path/to/key), without colons, and with the first 12 characters\n" >> ${.TARGET}
31         @printf "# removed (that is, the lower 80 bits of the fingerprint). Unless these\n" >> ${.TARGET}
32         @printf "# rules are followed, the blacklist will not work properly. See\n" >> ${.TARGET}
33         @printf "# ssh-vulnkey(1).\n" >> ${.TARGET}
34         @printf "#\n" >> ${.TARGET}
35         @printf "# Copyright: (C) 2008 Canonical, Ltd., License: GPL-3.\n" >> ${.TARGET}
36         grep -h '^#' ${.ALLSRC} >> ${.TARGET}
37
38         grep -hv '^#' ${.ALLSRC} | cut -b13- | sort >> ${.TARGET}
39
40 .endfor
41
42 ALLBLACKLIST!=  ls ${.CURDIR}/[DR]SA-*.all
43
44 .for abl in ${ALLBLACKLIST}
45 .for bl in ${abl:T:R:S/^/blacklist./}
46 FILES+= ${bl}
47 CLEANFILES+=    ${bl}
48 ${bl}: ${abl}
49         cat ${.ALLSRC} > ${.TARGET}
50 .endfor
51 .endfor
52
53 .include <bsd.prog.mk>