Update RSA selftest code to use a 2048 bit RSA and only a single KAT
[openssl.git] / fips / rsa / Makefile
1 #
2 # OpenSSL/fips/rsa/Makefile
3 #
4
5 DIR=    rsa
6 TOP=    ../..
7 CC=     cc
8 INCLUDES=
9 CFLAG=-g
10 INSTALL_PREFIX=
11 OPENSSLDIR=     /usr/local/ssl
12 INSTALLTOP=/usr/local/ssl
13 MAKEDEPPROG=    makedepend
14 MAKEDEPEND=     $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
15 MAKEFILE=       Makefile
16 AR=             ar r
17
18 CFLAGS= $(INCLUDES) $(CFLAG)
19
20 GENERAL=Makefile
21 TEST= fips_rsavtest.c fips_rsastest.c fips_rsagtest.c
22 APPS=
23
24 LIB=$(TOP)/libcrypto.a
25 LIBSRC= fips_rsa_selftest.c fips_rsa_sign.c fips_rsa_lib.c
26 LIBOBJ= fips_rsa_selftest.o fips_rsa_sign.o fips_rsa_lib.o
27
28 SRC= $(LIBSRC)
29
30 EXHEADER=
31 HEADER= $(EXHEADER)
32
33 ALL=    $(GENERAL) $(SRC) $(HEADER)
34
35 top:
36         (cd $(TOP); $(MAKE) DIRS=fips FDIRS=$(DIR) sub_all)
37
38 all:    lib
39
40 lib:    $(LIBOBJ)
41         @echo $(LIBOBJ) > lib
42
43 files:
44         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
45
46 links:
47         @$(PERL) $(TOP)/util/mklink.pl $(TOP)/include/openssl $(EXHEADER)
48         @$(PERL) $(TOP)/util/mklink.pl $(TOP)/test $(TEST)
49         @$(PERL) $(TOP)/util/mklink.pl $(TOP)/apps $(APPS)
50
51 install:
52         @headerlist="$(EXHEADER)"; for i in $$headerlist; \
53         do \
54           (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
55           chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
56         done
57
58 tags:
59         ctags $(SRC)
60
61 tests:
62
63 Q=../testvectors/rsa/req
64 A=../testvectors/rsa/rsp
65 Q62=../testvectors/rsa_salt_62/req
66 A62=../testvectors/rsa_salt_62/rsp
67
68 fips_test:
69         -rm -rf $(A) $(A62)
70         mkdir $(A) $(A62)
71         if [ -f $(Q)/SigGen15.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsastest < $(Q)/SigGen15.req  > $(A)/SigGen15.rsp; fi
72         if [ -f $(Q)/SigVer15.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsavtest < $(Q)/SigVer15.req > $(A)/SigVer15.rsp; fi
73         if [ -f $(Q)/SigGenPSS.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsastest -saltlen 0 < $(Q)/SigGenPSS.req > $(A)/SigGenPSS.rsp; fi
74         if [ -f $(Q)/SigVerPSS.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsavtest -saltlen 0 < $(Q)/SigVerPSS.req > $(A)/SigVerPSS.rsp; fi
75         if [ -f $(Q)/SigGenRSA.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsastest -x931 < $(Q)/SigGenRSA.req > $(A)/SigGenRSA.rsp; fi
76         if [ -f $(Q)/SigVerRSA.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsavtest -x931 < $(Q)/SigVerRSA.req > $(A)/SigVerRSA.rsp; fi
77         if [ -f $(Q62)/SigGenPSS.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsastest -saltlen 62 < $(Q62)/SigGenPSS.req >$(A62)/SigGenPSS.rsp; fi
78         if [ -f $(Q62)/SigVerPSS.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsavtest -saltlen 62 <$(Q62)/SigVerPSS.req >$(A62)/SigVerPSS.rsp; fi
79         if [ -f $(Q)/KeyGenRSA.req ]; then $(TOP)/util/shlib_wrap.sh $(TOP)/test/fips_rsagtest < $(Q)/KeyGenRSA.req > $(A)/KeyGenRSA.rsp; fi
80
81 lint:
82         lint -DLINT $(INCLUDES) $(SRC)>fluff
83
84 depend:
85         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(SRC) $(TEST)
86
87 dclean:
88         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
89         mv -f Makefile.new $(MAKEFILE)
90
91 clean:
92         rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
93 # DO NOT DELETE THIS LINE -- make depend depends on it.
94
95 fips_rsa_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
96 fips_rsa_lib.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
97 fips_rsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
98 fips_rsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
99 fips_rsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
100 fips_rsa_lib.o: ../../include/openssl/objects.h
101 fips_rsa_lib.o: ../../include/openssl/opensslconf.h
102 fips_rsa_lib.o: ../../include/openssl/opensslv.h
103 fips_rsa_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h
104 fips_rsa_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
105 fips_rsa_lib.o: ../../include/openssl/symhacks.h fips_rsa_lib.c
106 fips_rsa_selftest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
107 fips_rsa_selftest.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
108 fips_rsa_selftest.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
109 fips_rsa_selftest.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
110 fips_rsa_selftest.o: ../../include/openssl/lhash.h
111 fips_rsa_selftest.o: ../../include/openssl/obj_mac.h
112 fips_rsa_selftest.o: ../../include/openssl/objects.h
113 fips_rsa_selftest.o: ../../include/openssl/opensslconf.h
114 fips_rsa_selftest.o: ../../include/openssl/opensslv.h
115 fips_rsa_selftest.o: ../../include/openssl/ossl_typ.h
116 fips_rsa_selftest.o: ../../include/openssl/rsa.h
117 fips_rsa_selftest.o: ../../include/openssl/safestack.h
118 fips_rsa_selftest.o: ../../include/openssl/stack.h
119 fips_rsa_selftest.o: ../../include/openssl/symhacks.h fips_rsa_selftest.c
120 fips_rsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
121 fips_rsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
122 fips_rsa_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h
123 fips_rsa_sign.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
124 fips_rsa_sign.o: ../../include/openssl/obj_mac.h
125 fips_rsa_sign.o: ../../include/openssl/objects.h
126 fips_rsa_sign.o: ../../include/openssl/opensslconf.h
127 fips_rsa_sign.o: ../../include/openssl/opensslv.h
128 fips_rsa_sign.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h
129 fips_rsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
130 fips_rsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
131 fips_rsa_sign.o: fips_rsa_sign.c
132 fips_rsagtest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
133 fips_rsagtest.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
134 fips_rsagtest.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
135 fips_rsagtest.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
136 fips_rsagtest.o: ../../include/openssl/hmac.h ../../include/openssl/lhash.h
137 fips_rsagtest.o: ../../include/openssl/obj_mac.h
138 fips_rsagtest.o: ../../include/openssl/objects.h
139 fips_rsagtest.o: ../../include/openssl/opensslconf.h
140 fips_rsagtest.o: ../../include/openssl/opensslv.h
141 fips_rsagtest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h
142 fips_rsagtest.o: ../../include/openssl/safestack.h
143 fips_rsagtest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
144 fips_rsagtest.o: ../fips_utl.h fips_rsagtest.c
145 fips_rsastest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
146 fips_rsastest.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
147 fips_rsastest.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
148 fips_rsastest.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
149 fips_rsastest.o: ../../include/openssl/hmac.h ../../include/openssl/lhash.h
150 fips_rsastest.o: ../../include/openssl/obj_mac.h
151 fips_rsastest.o: ../../include/openssl/objects.h
152 fips_rsastest.o: ../../include/openssl/opensslconf.h
153 fips_rsastest.o: ../../include/openssl/opensslv.h
154 fips_rsastest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h
155 fips_rsastest.o: ../../include/openssl/safestack.h
156 fips_rsastest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
157 fips_rsastest.o: ../fips_utl.h fips_rsastest.c
158 fips_rsavtest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
159 fips_rsavtest.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
160 fips_rsavtest.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
161 fips_rsavtest.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
162 fips_rsavtest.o: ../../include/openssl/hmac.h ../../include/openssl/lhash.h
163 fips_rsavtest.o: ../../include/openssl/obj_mac.h
164 fips_rsavtest.o: ../../include/openssl/objects.h
165 fips_rsavtest.o: ../../include/openssl/opensslconf.h
166 fips_rsavtest.o: ../../include/openssl/opensslv.h
167 fips_rsavtest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h
168 fips_rsavtest.o: ../../include/openssl/safestack.h
169 fips_rsavtest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
170 fips_rsavtest.o: ../fips_utl.h fips_rsavtest.c