diff options
Diffstat (limited to 'src/lib/libcrypto/engine')
-rw-r--r-- | src/lib/libcrypto/engine/Makefile | 532 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/eng_cryptodev.c | 1133 |
2 files changed, 1275 insertions, 390 deletions
diff --git a/src/lib/libcrypto/engine/Makefile b/src/lib/libcrypto/engine/Makefile index 38f83f1654..13f211a0ae 100644 --- a/src/lib/libcrypto/engine/Makefile +++ b/src/lib/libcrypto/engine/Makefile | |||
@@ -7,11 +7,6 @@ TOP= ../.. | |||
7 | CC= cc | 7 | CC= cc |
8 | INCLUDES= -I.. -I$(TOP) -I../../include | 8 | INCLUDES= -I.. -I$(TOP) -I../../include |
9 | CFLAG=-g | 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 | 10 | MAKEFILE= Makefile |
16 | AR= ar r | 11 | AR= ar r |
17 | 12 | ||
@@ -24,16 +19,14 @@ APPS= | |||
24 | LIB=$(TOP)/libcrypto.a | 19 | LIB=$(TOP)/libcrypto.a |
25 | LIBSRC= eng_err.c eng_lib.c eng_list.c eng_init.c eng_ctrl.c \ | 20 | LIBSRC= eng_err.c eng_lib.c eng_list.c eng_init.c eng_ctrl.c \ |
26 | eng_table.c eng_pkey.c eng_fat.c eng_all.c \ | 21 | eng_table.c eng_pkey.c eng_fat.c eng_all.c \ |
27 | tb_rsa.c tb_dsa.c tb_dh.c tb_rand.c tb_cipher.c tb_digest.c \ | 22 | tb_rsa.c tb_dsa.c tb_ecdsa.c tb_dh.c tb_ecdh.c tb_rand.c tb_store.c \ |
28 | eng_openssl.c eng_dyn.c eng_cnf.c \ | 23 | tb_cipher.c tb_digest.c \ |
29 | hw_atalla.c hw_cswift.c hw_ncipher.c hw_nuron.c hw_ubsec.c \ | 24 | eng_openssl.c eng_cnf.c eng_dyn.c eng_cryptodev.c eng_padlock.c |
30 | hw_cryptodev.c hw_aep.c hw_sureware.c hw_4758_cca.c | ||
31 | LIBOBJ= eng_err.o eng_lib.o eng_list.o eng_init.o eng_ctrl.o \ | 25 | LIBOBJ= eng_err.o eng_lib.o eng_list.o eng_init.o eng_ctrl.o \ |
32 | eng_table.o eng_pkey.o eng_fat.o eng_all.o \ | 26 | eng_table.o eng_pkey.o eng_fat.o eng_all.o \ |
33 | tb_rsa.o tb_dsa.o tb_dh.o tb_rand.o tb_cipher.o tb_digest.o \ | 27 | tb_rsa.o tb_dsa.o tb_ecdsa.o tb_dh.o tb_ecdh.o tb_rand.o tb_store.o \ |
34 | eng_openssl.o eng_dyn.o eng_cnf.o \ | 28 | tb_cipher.o tb_digest.o \ |
35 | hw_atalla.o hw_cswift.o hw_ncipher.o hw_nuron.o hw_ubsec.o \ | 29 | eng_openssl.o eng_cnf.o eng_dyn.o eng_cryptodev.o eng_padlock.o |
36 | hw_cryptodev.o hw_aep.o hw_sureware.o hw_4758_cca.o | ||
37 | 30 | ||
38 | SRC= $(LIBSRC) | 31 | SRC= $(LIBSRC) |
39 | 32 | ||
@@ -61,6 +54,7 @@ links: | |||
61 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | 54 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) |
62 | 55 | ||
63 | install: | 56 | install: |
57 | @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... | ||
64 | @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ | 58 | @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ |
65 | do \ | 59 | do \ |
66 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | 60 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ |
@@ -70,16 +64,13 @@ install: | |||
70 | tags: | 64 | tags: |
71 | ctags $(SRC) | 65 | ctags $(SRC) |
72 | 66 | ||
73 | errors: | ||
74 | $(PERL) $(TOP)/util/mkerr.pl -conf hw.ec \ | ||
75 | -nostatic -staticloader -write hw_*.c | ||
76 | |||
77 | tests: | 67 | tests: |
78 | 68 | ||
79 | lint: | 69 | lint: |
80 | lint -DLINT $(INCLUDES) $(SRC)>fluff | 70 | lint -DLINT $(INCLUDES) $(SRC)>fluff |
81 | 71 | ||
82 | depend: | 72 | depend: |
73 | @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile... | ||
83 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) | 74 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) |
84 | 75 | ||
85 | dclean: | 76 | dclean: |
@@ -91,446 +82,207 @@ clean: | |||
91 | 82 | ||
92 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 83 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
93 | 84 | ||
94 | eng_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 85 | eng_all.o: ../../e_os.h ../../include/openssl/bio.h |
95 | eng_all.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h | 86 | eng_all.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
96 | eng_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
97 | eng_all.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | 87 | eng_all.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
98 | eng_all.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | 88 | eng_all.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
99 | eng_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 89 | eng_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
100 | eng_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h | 90 | eng_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h |
101 | eng_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
102 | eng_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 91 | eng_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
103 | eng_all.o: ../../include/openssl/ui.h eng_all.c eng_int.h | 92 | eng_all.o: ../cryptlib.h eng_all.c eng_int.h |
104 | eng_cnf.o: ../../e_os.h ../../include/openssl/asn1.h | 93 | eng_cnf.o: ../../e_os.h ../../include/openssl/bio.h |
105 | eng_cnf.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
106 | eng_cnf.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h | 94 | eng_cnf.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
107 | eng_cnf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h | 95 | eng_cnf.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h |
108 | eng_cnf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
109 | eng_cnf.o: ../../include/openssl/engine.h ../../include/openssl/err.h | 96 | eng_cnf.o: ../../include/openssl/engine.h ../../include/openssl/err.h |
110 | eng_cnf.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | 97 | eng_cnf.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
111 | eng_cnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 98 | eng_cnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
112 | eng_cnf.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h | ||
113 | eng_cnf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 99 | eng_cnf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
114 | eng_cnf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | 100 | eng_cnf.o: ../../include/openssl/symhacks.h ../cryptlib.h eng_cnf.c eng_int.h |
115 | eng_cnf.o: ../cryptlib.h eng_cnf.c | 101 | eng_cryptodev.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
116 | eng_ctrl.o: ../../e_os.h ../../include/openssl/asn1.h | 102 | eng_cryptodev.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h |
117 | eng_ctrl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 103 | eng_cryptodev.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
104 | eng_cryptodev.o: ../../include/openssl/evp.h ../../include/openssl/obj_mac.h | ||
105 | eng_cryptodev.o: ../../include/openssl/objects.h | ||
106 | eng_cryptodev.o: ../../include/openssl/opensslconf.h | ||
107 | eng_cryptodev.o: ../../include/openssl/opensslv.h | ||
108 | eng_cryptodev.o: ../../include/openssl/ossl_typ.h | ||
109 | eng_cryptodev.o: ../../include/openssl/safestack.h | ||
110 | eng_cryptodev.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
111 | eng_cryptodev.o: eng_cryptodev.c | ||
112 | eng_ctrl.o: ../../e_os.h ../../include/openssl/bio.h | ||
118 | eng_ctrl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 113 | eng_ctrl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
119 | eng_ctrl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
120 | eng_ctrl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | 114 | eng_ctrl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
121 | eng_ctrl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | 115 | eng_ctrl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
122 | eng_ctrl.o: ../../include/openssl/opensslconf.h | 116 | eng_ctrl.o: ../../include/openssl/opensslconf.h |
123 | eng_ctrl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 117 | eng_ctrl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
124 | eng_ctrl.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h | ||
125 | eng_ctrl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 118 | eng_ctrl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
126 | eng_ctrl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | 119 | eng_ctrl.o: ../../include/openssl/symhacks.h ../cryptlib.h eng_ctrl.c eng_int.h |
127 | eng_ctrl.o: ../cryptlib.h eng_ctrl.c eng_int.h | 120 | eng_dyn.o: ../../e_os.h ../../include/openssl/bio.h |
128 | eng_dyn.o: ../../e_os.h ../../include/openssl/asn1.h | ||
129 | eng_dyn.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
130 | eng_dyn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 121 | eng_dyn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
131 | eng_dyn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
132 | eng_dyn.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h | 122 | eng_dyn.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h |
133 | eng_dyn.o: ../../include/openssl/engine.h ../../include/openssl/err.h | 123 | eng_dyn.o: ../../include/openssl/engine.h ../../include/openssl/err.h |
134 | eng_dyn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | 124 | eng_dyn.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
135 | eng_dyn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 125 | eng_dyn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
136 | eng_dyn.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h | ||
137 | eng_dyn.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 126 | eng_dyn.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
138 | eng_dyn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | 127 | eng_dyn.o: ../../include/openssl/symhacks.h ../cryptlib.h eng_dyn.c eng_int.h |
139 | eng_dyn.o: ../cryptlib.h eng_dyn.c eng_int.h | 128 | eng_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h |
140 | eng_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
141 | eng_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h | ||
142 | eng_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
143 | eng_err.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | 129 | eng_err.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
144 | eng_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | 130 | eng_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
145 | eng_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 131 | eng_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
146 | eng_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h | 132 | eng_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h |
147 | eng_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
148 | eng_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 133 | eng_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
149 | eng_err.o: ../../include/openssl/ui.h eng_err.c | 134 | eng_err.o: eng_err.c |
150 | eng_fat.o: ../../e_os.h ../../include/openssl/asn1.h | 135 | eng_fat.o: ../../e_os.h ../../include/openssl/bio.h |
151 | eng_fat.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
152 | eng_fat.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h | 136 | eng_fat.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
153 | eng_fat.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h | 137 | eng_fat.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h |
154 | eng_fat.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
155 | eng_fat.o: ../../include/openssl/engine.h ../../include/openssl/err.h | 138 | eng_fat.o: ../../include/openssl/engine.h ../../include/openssl/err.h |
156 | eng_fat.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | 139 | eng_fat.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
157 | eng_fat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 140 | eng_fat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
158 | eng_fat.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h | ||
159 | eng_fat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 141 | eng_fat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
160 | eng_fat.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | 142 | eng_fat.o: ../../include/openssl/symhacks.h ../cryptlib.h eng_fat.c eng_int.h |
161 | eng_fat.o: ../cryptlib.h eng_fat.c eng_int.h | 143 | eng_init.o: ../../e_os.h ../../include/openssl/bio.h |
162 | eng_init.o: ../../e_os.h ../../include/openssl/asn1.h | ||
163 | eng_init.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
164 | eng_init.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 144 | eng_init.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
165 | eng_init.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
166 | eng_init.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | 145 | eng_init.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
167 | eng_init.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | 146 | eng_init.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
168 | eng_init.o: ../../include/openssl/opensslconf.h | 147 | eng_init.o: ../../include/openssl/opensslconf.h |
169 | eng_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 148 | eng_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
170 | eng_init.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h | ||
171 | eng_init.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 149 | eng_init.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
172 | eng_init.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | 150 | eng_init.o: ../../include/openssl/symhacks.h ../cryptlib.h eng_init.c eng_int.h |
173 | eng_init.o: ../cryptlib.h eng_init.c eng_int.h | 151 | eng_lib.o: ../../e_os.h ../../include/openssl/bio.h |
174 | eng_lib.o: ../../e_os.h ../../include/openssl/asn1.h | ||
175 | eng_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
176 | eng_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 152 | eng_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
177 | eng_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
178 | eng_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | 153 | eng_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
179 | eng_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | 154 | eng_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
180 | eng_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 155 | eng_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
181 | eng_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h | 156 | eng_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h |
182 | eng_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 157 | eng_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
183 | eng_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 158 | eng_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h eng_int.h eng_lib.c |
184 | eng_lib.o: ../../include/openssl/ui.h ../cryptlib.h eng_int.h eng_lib.c | 159 | eng_list.o: ../../e_os.h ../../include/openssl/bio.h |
185 | eng_list.o: ../../e_os.h ../../include/openssl/asn1.h | ||
186 | eng_list.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
187 | eng_list.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 160 | eng_list.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
188 | eng_list.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
189 | eng_list.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | 161 | eng_list.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
190 | eng_list.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | 162 | eng_list.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
191 | eng_list.o: ../../include/openssl/opensslconf.h | 163 | eng_list.o: ../../include/openssl/opensslconf.h |
192 | eng_list.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 164 | eng_list.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
193 | eng_list.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h | ||
194 | eng_list.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 165 | eng_list.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
195 | eng_list.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | 166 | eng_list.o: ../../include/openssl/symhacks.h ../cryptlib.h eng_int.h eng_list.c |
196 | eng_list.o: ../cryptlib.h eng_int.h eng_list.c | 167 | eng_openssl.o: ../../e_os.h ../../include/openssl/asn1.h |
197 | eng_openssl.o: ../../e_os.h ../../include/openssl/aes.h | 168 | eng_openssl.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
198 | eng_openssl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 169 | eng_openssl.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
199 | eng_openssl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
200 | eng_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
201 | eng_openssl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
202 | eng_openssl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
203 | eng_openssl.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h | 170 | eng_openssl.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h |
204 | eng_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | 171 | eng_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h |
205 | eng_openssl.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 172 | eng_openssl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h |
206 | eng_openssl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 173 | eng_openssl.o: ../../include/openssl/engine.h ../../include/openssl/err.h |
207 | eng_openssl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 174 | eng_openssl.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
208 | eng_openssl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
209 | eng_openssl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 175 | eng_openssl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
210 | eng_openssl.o: ../../include/openssl/opensslconf.h | 176 | eng_openssl.o: ../../include/openssl/opensslconf.h |
211 | eng_openssl.o: ../../include/openssl/opensslv.h | 177 | eng_openssl.o: ../../include/openssl/opensslv.h |
212 | eng_openssl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h | 178 | eng_openssl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h |
213 | eng_openssl.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | 179 | eng_openssl.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h |
214 | eng_openssl.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 180 | eng_openssl.o: ../../include/openssl/rand.h ../../include/openssl/rc4.h |
215 | eng_openssl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 181 | eng_openssl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
216 | eng_openssl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 182 | eng_openssl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
217 | eng_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 183 | eng_openssl.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
218 | eng_openssl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 184 | eng_openssl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_openssl.c |
219 | eng_openssl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | 185 | eng_padlock.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h |
220 | eng_openssl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 186 | eng_padlock.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h |
221 | eng_openssl.o: ../cryptlib.h eng_openssl.c | 187 | eng_padlock.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h |
222 | eng_pkey.o: ../../e_os.h ../../include/openssl/asn1.h | 188 | eng_padlock.o: ../../include/openssl/engine.h ../../include/openssl/err.h |
223 | eng_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 189 | eng_padlock.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
190 | eng_padlock.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
191 | eng_padlock.o: ../../include/openssl/opensslconf.h | ||
192 | eng_padlock.o: ../../include/openssl/opensslv.h | ||
193 | eng_padlock.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h | ||
194 | eng_padlock.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
195 | eng_padlock.o: ../../include/openssl/symhacks.h eng_padlock.c | ||
196 | eng_pkey.o: ../../e_os.h ../../include/openssl/bio.h | ||
224 | eng_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 197 | eng_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
225 | eng_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
226 | eng_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | 198 | eng_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
227 | eng_pkey.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | 199 | eng_pkey.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
228 | eng_pkey.o: ../../include/openssl/opensslconf.h | 200 | eng_pkey.o: ../../include/openssl/opensslconf.h |
229 | eng_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 201 | eng_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
230 | eng_pkey.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h | ||
231 | eng_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 202 | eng_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
232 | eng_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | 203 | eng_pkey.o: ../../include/openssl/symhacks.h ../cryptlib.h eng_int.h eng_pkey.c |
233 | eng_pkey.o: ../cryptlib.h eng_int.h eng_pkey.c | 204 | eng_table.o: ../../e_os.h ../../include/openssl/asn1.h |
234 | eng_table.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h | 205 | eng_table.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
235 | eng_table.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 206 | eng_table.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h |
236 | eng_table.o: ../../include/openssl/bn.h ../../include/openssl/cast.h | ||
237 | eng_table.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
238 | eng_table.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
239 | eng_table.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
240 | eng_table.o: ../../include/openssl/engine.h ../../include/openssl/err.h | 207 | eng_table.o: ../../include/openssl/engine.h ../../include/openssl/err.h |
241 | eng_table.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 208 | eng_table.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
242 | eng_table.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 209 | eng_table.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
243 | eng_table.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
244 | eng_table.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
245 | eng_table.o: ../../include/openssl/objects.h | ||
246 | eng_table.o: ../../include/openssl/opensslconf.h | 210 | eng_table.o: ../../include/openssl/opensslconf.h |
247 | eng_table.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 211 | eng_table.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
248 | eng_table.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 212 | eng_table.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
249 | eng_table.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 213 | eng_table.o: ../../include/openssl/symhacks.h ../cryptlib.h eng_int.h |
250 | eng_table.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 214 | eng_table.o: eng_table.c |
251 | eng_table.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 215 | tb_cipher.o: ../../e_os.h ../../include/openssl/bio.h |
252 | eng_table.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 216 | tb_cipher.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
253 | eng_table.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | 217 | tb_cipher.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
254 | eng_table.o: eng_int.h eng_table.c | 218 | tb_cipher.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
255 | hw_4758_cca.o: ../../e_os.h ../../include/openssl/aes.h | ||
256 | hw_4758_cca.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
257 | hw_4758_cca.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
258 | hw_4758_cca.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
259 | hw_4758_cca.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
260 | hw_4758_cca.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
261 | hw_4758_cca.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h | ||
262 | hw_4758_cca.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | ||
263 | hw_4758_cca.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
264 | hw_4758_cca.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
265 | hw_4758_cca.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
266 | hw_4758_cca.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
267 | hw_4758_cca.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
268 | hw_4758_cca.o: ../../include/openssl/opensslconf.h | ||
269 | hw_4758_cca.o: ../../include/openssl/opensslv.h | ||
270 | hw_4758_cca.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
271 | hw_4758_cca.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | ||
272 | hw_4758_cca.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
273 | hw_4758_cca.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
274 | hw_4758_cca.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
275 | hw_4758_cca.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
276 | hw_4758_cca.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
277 | hw_4758_cca.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
278 | hw_4758_cca.o: ../cryptlib.h hw_4758_cca.c hw_4758_cca_err.c hw_4758_cca_err.h | ||
279 | hw_4758_cca.o: vendor_defns/hw_4758_cca.h | ||
280 | hw_aep.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
281 | hw_aep.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
282 | hw_aep.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h | ||
283 | hw_aep.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h | ||
284 | hw_aep.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | ||
285 | hw_aep.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
286 | hw_aep.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
287 | hw_aep.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h | ||
288 | hw_aep.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
289 | hw_aep.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
290 | hw_aep.o: ../../include/openssl/ui.h hw_aep.c hw_aep_err.c hw_aep_err.h | ||
291 | hw_aep.o: vendor_defns/aep.h | ||
292 | hw_atalla.o: ../../e_os.h ../../include/openssl/asn1.h | ||
293 | hw_atalla.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
294 | hw_atalla.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
295 | hw_atalla.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
296 | hw_atalla.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h | ||
297 | hw_atalla.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
298 | hw_atalla.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
299 | hw_atalla.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
300 | hw_atalla.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h | ||
301 | hw_atalla.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
302 | hw_atalla.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
303 | hw_atalla.o: ../cryptlib.h hw_atalla.c hw_atalla_err.c hw_atalla_err.h | ||
304 | hw_atalla.o: vendor_defns/atalla.h | ||
305 | hw_cryptodev.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
306 | hw_cryptodev.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
307 | hw_cryptodev.o: ../../include/openssl/bn.h ../../include/openssl/cast.h | ||
308 | hw_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
309 | hw_cryptodev.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
310 | hw_cryptodev.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
311 | hw_cryptodev.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
312 | hw_cryptodev.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
313 | hw_cryptodev.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
314 | hw_cryptodev.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
315 | hw_cryptodev.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
316 | hw_cryptodev.o: ../../include/openssl/objects.h | ||
317 | hw_cryptodev.o: ../../include/openssl/opensslconf.h | ||
318 | hw_cryptodev.o: ../../include/openssl/opensslv.h | ||
319 | hw_cryptodev.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h | ||
320 | hw_cryptodev.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
321 | hw_cryptodev.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
322 | hw_cryptodev.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
323 | hw_cryptodev.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
324 | hw_cryptodev.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
325 | hw_cryptodev.o: ../../include/openssl/ui_compat.h hw_cryptodev.c | ||
326 | hw_cswift.o: ../../e_os.h ../../include/openssl/asn1.h | ||
327 | hw_cswift.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
328 | hw_cswift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
329 | hw_cswift.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
330 | hw_cswift.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h | ||
331 | hw_cswift.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
332 | hw_cswift.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
333 | hw_cswift.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
334 | hw_cswift.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h | ||
335 | hw_cswift.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
336 | hw_cswift.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
337 | hw_cswift.o: ../cryptlib.h hw_cswift.c hw_cswift_err.c hw_cswift_err.h | ||
338 | hw_cswift.o: vendor_defns/cswift.h | ||
339 | hw_ncipher.o: ../../e_os.h ../../include/openssl/aes.h | ||
340 | hw_ncipher.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
341 | hw_ncipher.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
342 | hw_ncipher.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
343 | hw_ncipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
344 | hw_ncipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
345 | hw_ncipher.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h | ||
346 | hw_ncipher.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | ||
347 | hw_ncipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
348 | hw_ncipher.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
349 | hw_ncipher.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
350 | hw_ncipher.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
351 | hw_ncipher.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
352 | hw_ncipher.o: ../../include/openssl/opensslconf.h | ||
353 | hw_ncipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
354 | hw_ncipher.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h | ||
355 | hw_ncipher.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | ||
356 | hw_ncipher.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
357 | hw_ncipher.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
358 | hw_ncipher.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
359 | hw_ncipher.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
360 | hw_ncipher.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
361 | hw_ncipher.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h | ||
362 | hw_ncipher.o: ../../include/openssl/x509_vfy.h ../cryptlib.h hw_ncipher.c | ||
363 | hw_ncipher.o: hw_ncipher_err.c hw_ncipher_err.h vendor_defns/hwcryptohook.h | ||
364 | hw_nuron.o: ../../e_os.h ../../include/openssl/asn1.h | ||
365 | hw_nuron.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
366 | hw_nuron.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
367 | hw_nuron.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
368 | hw_nuron.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h | ||
369 | hw_nuron.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
370 | hw_nuron.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
371 | hw_nuron.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
372 | hw_nuron.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h | ||
373 | hw_nuron.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
374 | hw_nuron.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
375 | hw_nuron.o: ../cryptlib.h hw_nuron.c hw_nuron_err.c hw_nuron_err.h | ||
376 | hw_sureware.o: ../../e_os.h ../../include/openssl/aes.h | ||
377 | hw_sureware.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
378 | hw_sureware.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
379 | hw_sureware.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
380 | hw_sureware.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
381 | hw_sureware.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
382 | hw_sureware.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h | ||
383 | hw_sureware.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | ||
384 | hw_sureware.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
385 | hw_sureware.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
386 | hw_sureware.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
387 | hw_sureware.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
388 | hw_sureware.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
389 | hw_sureware.o: ../../include/openssl/opensslconf.h | ||
390 | hw_sureware.o: ../../include/openssl/opensslv.h | ||
391 | hw_sureware.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h | ||
392 | hw_sureware.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | ||
393 | hw_sureware.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | ||
394 | hw_sureware.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
395 | hw_sureware.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
396 | hw_sureware.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
397 | hw_sureware.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
398 | hw_sureware.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
399 | hw_sureware.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
400 | hw_sureware.o: ../cryptlib.h eng_int.h engine.h hw_sureware.c hw_sureware_err.c | ||
401 | hw_sureware.o: hw_sureware_err.h vendor_defns/sureware.h | ||
402 | hw_ubsec.o: ../../e_os.h ../../include/openssl/asn1.h | ||
403 | hw_ubsec.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
404 | hw_ubsec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
405 | hw_ubsec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
406 | hw_ubsec.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h | ||
407 | hw_ubsec.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
408 | hw_ubsec.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
409 | hw_ubsec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
410 | hw_ubsec.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h | ||
411 | hw_ubsec.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
412 | hw_ubsec.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
413 | hw_ubsec.o: ../cryptlib.h hw_ubsec.c hw_ubsec_err.c hw_ubsec_err.h | ||
414 | hw_ubsec.o: vendor_defns/hw_ubsec.h | ||
415 | tb_cipher.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
416 | tb_cipher.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
417 | tb_cipher.o: ../../include/openssl/bn.h ../../include/openssl/cast.h | ||
418 | tb_cipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
419 | tb_cipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
420 | tb_cipher.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
421 | tb_cipher.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
422 | tb_cipher.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
423 | tb_cipher.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
424 | tb_cipher.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
425 | tb_cipher.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
426 | tb_cipher.o: ../../include/openssl/objects.h | ||
427 | tb_cipher.o: ../../include/openssl/opensslconf.h | 219 | tb_cipher.o: ../../include/openssl/opensslconf.h |
428 | tb_cipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 220 | tb_cipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
429 | tb_cipher.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 221 | tb_cipher.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
430 | tb_cipher.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 222 | tb_cipher.o: ../../include/openssl/symhacks.h ../cryptlib.h eng_int.h |
431 | tb_cipher.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 223 | tb_cipher.o: tb_cipher.c |
432 | tb_cipher.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 224 | tb_dh.o: ../../e_os.h ../../include/openssl/bio.h |
433 | tb_cipher.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 225 | tb_dh.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
434 | tb_cipher.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | 226 | tb_dh.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
435 | tb_cipher.o: eng_int.h tb_cipher.c | 227 | tb_dh.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
436 | tb_dh.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h | 228 | tb_dh.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
437 | tb_dh.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 229 | tb_dh.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h |
438 | tb_dh.o: ../../include/openssl/bn.h ../../include/openssl/cast.h | ||
439 | tb_dh.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
440 | tb_dh.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
441 | tb_dh.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
442 | tb_dh.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
443 | tb_dh.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
444 | tb_dh.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
445 | tb_dh.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
446 | tb_dh.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
447 | tb_dh.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
448 | tb_dh.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
449 | tb_dh.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | ||
450 | tb_dh.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
451 | tb_dh.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
452 | tb_dh.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
453 | tb_dh.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 230 | tb_dh.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
454 | tb_dh.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h eng_int.h | 231 | tb_dh.o: ../cryptlib.h eng_int.h tb_dh.c |
455 | tb_dh.o: tb_dh.c | 232 | tb_digest.o: ../../e_os.h ../../include/openssl/bio.h |
456 | tb_digest.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h | 233 | tb_digest.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
457 | tb_digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 234 | tb_digest.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
458 | tb_digest.o: ../../include/openssl/bn.h ../../include/openssl/cast.h | 235 | tb_digest.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
459 | tb_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
460 | tb_digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
461 | tb_digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
462 | tb_digest.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
463 | tb_digest.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
464 | tb_digest.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
465 | tb_digest.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
466 | tb_digest.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
467 | tb_digest.o: ../../include/openssl/objects.h | ||
468 | tb_digest.o: ../../include/openssl/opensslconf.h | 236 | tb_digest.o: ../../include/openssl/opensslconf.h |
469 | tb_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 237 | tb_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
470 | tb_digest.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 238 | tb_digest.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
471 | tb_digest.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 239 | tb_digest.o: ../../include/openssl/symhacks.h ../cryptlib.h eng_int.h |
472 | tb_digest.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 240 | tb_digest.o: tb_digest.c |
473 | tb_digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 241 | tb_dsa.o: ../../e_os.h ../../include/openssl/bio.h |
474 | tb_digest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 242 | tb_dsa.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
475 | tb_digest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | 243 | tb_dsa.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
476 | tb_digest.o: eng_int.h tb_digest.c | 244 | tb_dsa.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
477 | tb_dsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h | 245 | tb_dsa.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
478 | tb_dsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 246 | tb_dsa.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h |
479 | tb_dsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h | ||
480 | tb_dsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
481 | tb_dsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
482 | tb_dsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
483 | tb_dsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
484 | tb_dsa.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
485 | tb_dsa.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
486 | tb_dsa.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
487 | tb_dsa.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
488 | tb_dsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
489 | tb_dsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
490 | tb_dsa.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | ||
491 | tb_dsa.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
492 | tb_dsa.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
493 | tb_dsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
494 | tb_dsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 247 | tb_dsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
495 | tb_dsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | 248 | tb_dsa.o: ../cryptlib.h eng_int.h tb_dsa.c |
496 | tb_dsa.o: eng_int.h tb_dsa.c | 249 | tb_ecdh.o: ../../e_os.h ../../include/openssl/bio.h |
497 | tb_rand.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h | 250 | tb_ecdh.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
498 | tb_rand.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 251 | tb_ecdh.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
499 | tb_rand.o: ../../include/openssl/bn.h ../../include/openssl/cast.h | 252 | tb_ecdh.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
500 | tb_rand.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 253 | tb_ecdh.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
501 | tb_rand.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | 254 | tb_ecdh.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h |
502 | tb_rand.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | 255 | tb_ecdh.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
503 | tb_rand.o: ../../include/openssl/engine.h ../../include/openssl/err.h | 256 | tb_ecdh.o: ../cryptlib.h eng_int.h tb_ecdh.c |
504 | tb_rand.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 257 | tb_ecdsa.o: ../../e_os.h ../../include/openssl/bio.h |
505 | tb_rand.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 258 | tb_ecdsa.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
506 | tb_rand.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 259 | tb_ecdsa.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
507 | tb_rand.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 260 | tb_ecdsa.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
508 | tb_rand.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 261 | tb_ecdsa.o: ../../include/openssl/opensslconf.h |
509 | tb_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 262 | tb_ecdsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
510 | tb_rand.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | 263 | tb_ecdsa.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
511 | tb_rand.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 264 | tb_ecdsa.o: ../../include/openssl/symhacks.h ../cryptlib.h eng_int.h tb_ecdsa.c |
512 | tb_rand.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 265 | tb_rand.o: ../../e_os.h ../../include/openssl/bio.h |
513 | tb_rand.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 266 | tb_rand.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
267 | tb_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | ||
268 | tb_rand.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
269 | tb_rand.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
270 | tb_rand.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h | ||
514 | tb_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 271 | tb_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
515 | tb_rand.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | 272 | tb_rand.o: ../cryptlib.h eng_int.h tb_rand.c |
516 | tb_rand.o: eng_int.h tb_rand.c | 273 | tb_rsa.o: ../../e_os.h ../../include/openssl/bio.h |
517 | tb_rsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h | 274 | tb_rsa.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
518 | tb_rsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 275 | tb_rsa.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h |
519 | tb_rsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h | 276 | tb_rsa.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
520 | tb_rsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 277 | tb_rsa.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
521 | tb_rsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | 278 | tb_rsa.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h |
522 | tb_rsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
523 | tb_rsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
524 | tb_rsa.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
525 | tb_rsa.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
526 | tb_rsa.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
527 | tb_rsa.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
528 | tb_rsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
529 | tb_rsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
530 | tb_rsa.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | ||
531 | tb_rsa.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
532 | tb_rsa.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
533 | tb_rsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
534 | tb_rsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 279 | tb_rsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
535 | tb_rsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | 280 | tb_rsa.o: ../cryptlib.h eng_int.h tb_rsa.c |
536 | tb_rsa.o: eng_int.h tb_rsa.c | 281 | tb_store.o: ../../e_os.h ../../include/openssl/bio.h |
282 | tb_store.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
283 | tb_store.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | ||
284 | tb_store.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
285 | tb_store.o: ../../include/openssl/opensslconf.h | ||
286 | tb_store.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
287 | tb_store.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
288 | tb_store.o: ../../include/openssl/symhacks.h ../cryptlib.h eng_int.h tb_store.c | ||
diff --git a/src/lib/libcrypto/engine/eng_cryptodev.c b/src/lib/libcrypto/engine/eng_cryptodev.c new file mode 100644 index 0000000000..ab38cd52f0 --- /dev/null +++ b/src/lib/libcrypto/engine/eng_cryptodev.c | |||
@@ -0,0 +1,1133 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2002 Bob Beck <beck@openbsd.org> | ||
3 | * Copyright (c) 2002 Theo de Raadt | ||
4 | * Copyright (c) 2002 Markus Friedl | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Redistribution and use in source and binary forms, with or without | ||
8 | * modification, are permitted provided that the following conditions | ||
9 | * are met: | ||
10 | * 1. Redistributions of source code must retain the above copyright | ||
11 | * notice, this list of conditions and the following disclaimer. | ||
12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in the | ||
14 | * documentation and/or other materials provided with the distribution. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | #include <openssl/objects.h> | ||
30 | #include <openssl/engine.h> | ||
31 | #include <openssl/evp.h> | ||
32 | #include <openssl/bn.h> | ||
33 | |||
34 | #if (defined(__unix__) || defined(unix)) && !defined(USG) && \ | ||
35 | (defined(OpenBSD) || defined(__FreeBSD_version)) | ||
36 | #include <sys/param.h> | ||
37 | # if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041) | ||
38 | # define HAVE_CRYPTODEV | ||
39 | # endif | ||
40 | # if (OpenBSD >= 200110) | ||
41 | # define HAVE_SYSLOG_R | ||
42 | # endif | ||
43 | #endif | ||
44 | |||
45 | #ifndef HAVE_CRYPTODEV | ||
46 | |||
47 | void | ||
48 | ENGINE_load_cryptodev(void) | ||
49 | { | ||
50 | /* This is a NOP on platforms without /dev/crypto */ | ||
51 | return; | ||
52 | } | ||
53 | |||
54 | #else | ||
55 | |||
56 | #include <sys/types.h> | ||
57 | #include <crypto/cryptodev.h> | ||
58 | #include <sys/ioctl.h> | ||
59 | #include <errno.h> | ||
60 | #include <stdio.h> | ||
61 | #include <unistd.h> | ||
62 | #include <fcntl.h> | ||
63 | #include <stdarg.h> | ||
64 | #include <syslog.h> | ||
65 | #include <errno.h> | ||
66 | #include <string.h> | ||
67 | |||
68 | struct dev_crypto_state { | ||
69 | struct session_op d_sess; | ||
70 | int d_fd; | ||
71 | }; | ||
72 | |||
73 | static u_int32_t cryptodev_asymfeat = 0; | ||
74 | |||
75 | static int get_asym_dev_crypto(void); | ||
76 | static int open_dev_crypto(void); | ||
77 | static int get_dev_crypto(void); | ||
78 | static int cryptodev_max_iv(int cipher); | ||
79 | static int cryptodev_key_length_valid(int cipher, int len); | ||
80 | static int cipher_nid_to_cryptodev(int nid); | ||
81 | static int get_cryptodev_ciphers(const int **cnids); | ||
82 | static int get_cryptodev_digests(const int **cnids); | ||
83 | static int cryptodev_usable_ciphers(const int **nids); | ||
84 | static int cryptodev_usable_digests(const int **nids); | ||
85 | static int cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
86 | const unsigned char *in, unsigned int inl); | ||
87 | static int cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
88 | const unsigned char *iv, int enc); | ||
89 | static int cryptodev_cleanup(EVP_CIPHER_CTX *ctx); | ||
90 | static int cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, | ||
91 | const int **nids, int nid); | ||
92 | static int cryptodev_engine_digests(ENGINE *e, const EVP_MD **digest, | ||
93 | const int **nids, int nid); | ||
94 | static int bn2crparam(const BIGNUM *a, struct crparam *crp); | ||
95 | static int crparam2bn(struct crparam *crp, BIGNUM *a); | ||
96 | static void zapparams(struct crypt_kop *kop); | ||
97 | static int cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r, | ||
98 | int slen, BIGNUM *s); | ||
99 | |||
100 | static int cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, | ||
101 | const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
102 | static int cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, | ||
103 | RSA *rsa); | ||
104 | static int cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx); | ||
105 | static int cryptodev_dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, | ||
106 | const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
107 | static int cryptodev_dsa_dsa_mod_exp(DSA *dsa, BIGNUM *t1, BIGNUM *g, | ||
108 | BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p, | ||
109 | BN_CTX *ctx, BN_MONT_CTX *mont); | ||
110 | static DSA_SIG *cryptodev_dsa_do_sign(const unsigned char *dgst, | ||
111 | int dlen, DSA *dsa); | ||
112 | static int cryptodev_dsa_verify(const unsigned char *dgst, int dgst_len, | ||
113 | DSA_SIG *sig, DSA *dsa); | ||
114 | static int cryptodev_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a, | ||
115 | const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, | ||
116 | BN_MONT_CTX *m_ctx); | ||
117 | static int cryptodev_dh_compute_key(unsigned char *key, | ||
118 | const BIGNUM *pub_key, DH *dh); | ||
119 | static int cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p, | ||
120 | void (*f)()); | ||
121 | void ENGINE_load_cryptodev(void); | ||
122 | |||
123 | static const ENGINE_CMD_DEFN cryptodev_defns[] = { | ||
124 | { 0, NULL, NULL, 0 } | ||
125 | }; | ||
126 | |||
127 | static struct { | ||
128 | int id; | ||
129 | int nid; | ||
130 | int ivmax; | ||
131 | int keylen; | ||
132 | } ciphers[] = { | ||
133 | { CRYPTO_DES_CBC, NID_des_cbc, 8, 8, }, | ||
134 | { CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24, }, | ||
135 | { CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16, }, | ||
136 | { CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16, }, | ||
137 | { CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16, }, | ||
138 | { CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0, }, | ||
139 | { 0, NID_undef, 0, 0, }, | ||
140 | }; | ||
141 | |||
142 | static struct { | ||
143 | int id; | ||
144 | int nid; | ||
145 | } digests[] = { | ||
146 | { CRYPTO_SHA1_HMAC, NID_hmacWithSHA1, }, | ||
147 | { CRYPTO_RIPEMD160_HMAC, NID_ripemd160, }, | ||
148 | { CRYPTO_MD5_KPDK, NID_undef, }, | ||
149 | { CRYPTO_SHA1_KPDK, NID_undef, }, | ||
150 | { CRYPTO_MD5, NID_md5, }, | ||
151 | { CRYPTO_SHA1, NID_undef, }, | ||
152 | { 0, NID_undef, }, | ||
153 | }; | ||
154 | |||
155 | /* | ||
156 | * Return a fd if /dev/crypto seems usable, 0 otherwise. | ||
157 | */ | ||
158 | static int | ||
159 | open_dev_crypto(void) | ||
160 | { | ||
161 | static int fd = -1; | ||
162 | |||
163 | if (fd == -1) { | ||
164 | if ((fd = open("/dev/crypto", O_RDWR, 0)) == -1) | ||
165 | return (-1); | ||
166 | /* close on exec */ | ||
167 | if (fcntl(fd, F_SETFD, 1) == -1) { | ||
168 | close(fd); | ||
169 | fd = -1; | ||
170 | return (-1); | ||
171 | } | ||
172 | } | ||
173 | return (fd); | ||
174 | } | ||
175 | |||
176 | static int | ||
177 | get_dev_crypto(void) | ||
178 | { | ||
179 | int fd, retfd; | ||
180 | |||
181 | if ((fd = open_dev_crypto()) == -1) | ||
182 | return (-1); | ||
183 | if (ioctl(fd, CRIOGET, &retfd) == -1) | ||
184 | return (-1); | ||
185 | |||
186 | /* close on exec */ | ||
187 | if (fcntl(retfd, F_SETFD, 1) == -1) { | ||
188 | close(retfd); | ||
189 | return (-1); | ||
190 | } | ||
191 | return (retfd); | ||
192 | } | ||
193 | |||
194 | /* Caching version for asym operations */ | ||
195 | static int | ||
196 | get_asym_dev_crypto(void) | ||
197 | { | ||
198 | static int fd = -1; | ||
199 | |||
200 | if (fd == -1) | ||
201 | fd = get_dev_crypto(); | ||
202 | return fd; | ||
203 | } | ||
204 | |||
205 | /* | ||
206 | * XXXX this needs to be set for each alg - and determined from | ||
207 | * a running card. | ||
208 | */ | ||
209 | static int | ||
210 | cryptodev_max_iv(int cipher) | ||
211 | { | ||
212 | int i; | ||
213 | |||
214 | for (i = 0; ciphers[i].id; i++) | ||
215 | if (ciphers[i].id == cipher) | ||
216 | return (ciphers[i].ivmax); | ||
217 | return (0); | ||
218 | } | ||
219 | |||
220 | /* | ||
221 | * XXXX this needs to be set for each alg - and determined from | ||
222 | * a running card. For now, fake it out - but most of these | ||
223 | * for real devices should return 1 for the supported key | ||
224 | * sizes the device can handle. | ||
225 | */ | ||
226 | static int | ||
227 | cryptodev_key_length_valid(int cipher, int len) | ||
228 | { | ||
229 | int i; | ||
230 | |||
231 | for (i = 0; ciphers[i].id; i++) | ||
232 | if (ciphers[i].id == cipher) | ||
233 | return (ciphers[i].keylen == len); | ||
234 | return (0); | ||
235 | } | ||
236 | |||
237 | /* convert libcrypto nids to cryptodev */ | ||
238 | static int | ||
239 | cipher_nid_to_cryptodev(int nid) | ||
240 | { | ||
241 | int i; | ||
242 | |||
243 | for (i = 0; ciphers[i].id; i++) | ||
244 | if (ciphers[i].nid == nid) | ||
245 | return (ciphers[i].id); | ||
246 | return (0); | ||
247 | } | ||
248 | |||
249 | /* | ||
250 | * Find out what ciphers /dev/crypto will let us have a session for. | ||
251 | * XXX note, that some of these openssl doesn't deal with yet! | ||
252 | * returning them here is harmless, as long as we return NULL | ||
253 | * when asked for a handler in the cryptodev_engine_ciphers routine | ||
254 | */ | ||
255 | static int | ||
256 | get_cryptodev_ciphers(const int **cnids) | ||
257 | { | ||
258 | static int nids[CRYPTO_ALGORITHM_MAX]; | ||
259 | struct session_op sess; | ||
260 | int fd, i, count = 0; | ||
261 | |||
262 | if ((fd = get_dev_crypto()) < 0) { | ||
263 | *cnids = NULL; | ||
264 | return (0); | ||
265 | } | ||
266 | memset(&sess, 0, sizeof(sess)); | ||
267 | sess.key = (caddr_t)"123456781234567812345678"; | ||
268 | |||
269 | for (i = 0; ciphers[i].id && count < CRYPTO_ALGORITHM_MAX; i++) { | ||
270 | if (ciphers[i].nid == NID_undef) | ||
271 | continue; | ||
272 | sess.cipher = ciphers[i].id; | ||
273 | sess.keylen = ciphers[i].keylen; | ||
274 | sess.mac = 0; | ||
275 | if (ioctl(fd, CIOCGSESSION, &sess) != -1 && | ||
276 | ioctl(fd, CIOCFSESSION, &sess.ses) != -1) | ||
277 | nids[count++] = ciphers[i].nid; | ||
278 | } | ||
279 | close(fd); | ||
280 | |||
281 | if (count > 0) | ||
282 | *cnids = nids; | ||
283 | else | ||
284 | *cnids = NULL; | ||
285 | return (count); | ||
286 | } | ||
287 | |||
288 | /* | ||
289 | * Find out what digests /dev/crypto will let us have a session for. | ||
290 | * XXX note, that some of these openssl doesn't deal with yet! | ||
291 | * returning them here is harmless, as long as we return NULL | ||
292 | * when asked for a handler in the cryptodev_engine_digests routine | ||
293 | */ | ||
294 | static int | ||
295 | get_cryptodev_digests(const int **cnids) | ||
296 | { | ||
297 | static int nids[CRYPTO_ALGORITHM_MAX]; | ||
298 | struct session_op sess; | ||
299 | int fd, i, count = 0; | ||
300 | |||
301 | if ((fd = get_dev_crypto()) < 0) { | ||
302 | *cnids = NULL; | ||
303 | return (0); | ||
304 | } | ||
305 | memset(&sess, 0, sizeof(sess)); | ||
306 | for (i = 0; digests[i].id && count < CRYPTO_ALGORITHM_MAX; i++) { | ||
307 | if (digests[i].nid == NID_undef) | ||
308 | continue; | ||
309 | sess.mac = digests[i].id; | ||
310 | sess.cipher = 0; | ||
311 | if (ioctl(fd, CIOCGSESSION, &sess) != -1 && | ||
312 | ioctl(fd, CIOCFSESSION, &sess.ses) != -1) | ||
313 | nids[count++] = digests[i].nid; | ||
314 | } | ||
315 | close(fd); | ||
316 | |||
317 | if (count > 0) | ||
318 | *cnids = nids; | ||
319 | else | ||
320 | *cnids = NULL; | ||
321 | return (count); | ||
322 | } | ||
323 | |||
324 | /* | ||
325 | * Find the useable ciphers|digests from dev/crypto - this is the first | ||
326 | * thing called by the engine init crud which determines what it | ||
327 | * can use for ciphers from this engine. We want to return | ||
328 | * only what we can do, anythine else is handled by software. | ||
329 | * | ||
330 | * If we can't initialize the device to do anything useful for | ||
331 | * any reason, we want to return a NULL array, and 0 length, | ||
332 | * which forces everything to be done is software. By putting | ||
333 | * the initalization of the device in here, we ensure we can | ||
334 | * use this engine as the default, and if for whatever reason | ||
335 | * /dev/crypto won't do what we want it will just be done in | ||
336 | * software | ||
337 | * | ||
338 | * This can (should) be greatly expanded to perhaps take into | ||
339 | * account speed of the device, and what we want to do. | ||
340 | * (although the disabling of particular alg's could be controlled | ||
341 | * by the device driver with sysctl's.) - this is where we | ||
342 | * want most of the decisions made about what we actually want | ||
343 | * to use from /dev/crypto. | ||
344 | */ | ||
345 | static int | ||
346 | cryptodev_usable_ciphers(const int **nids) | ||
347 | { | ||
348 | return (get_cryptodev_ciphers(nids)); | ||
349 | } | ||
350 | |||
351 | static int | ||
352 | cryptodev_usable_digests(const int **nids) | ||
353 | { | ||
354 | /* | ||
355 | * XXXX just disable all digests for now, because it sucks. | ||
356 | * we need a better way to decide this - i.e. I may not | ||
357 | * want digests on slow cards like hifn on fast machines, | ||
358 | * but might want them on slow or loaded machines, etc. | ||
359 | * will also want them when using crypto cards that don't | ||
360 | * suck moose gonads - would be nice to be able to decide something | ||
361 | * as reasonable default without having hackery that's card dependent. | ||
362 | * of course, the default should probably be just do everything, | ||
363 | * with perhaps a sysctl to turn algoritms off (or have them off | ||
364 | * by default) on cards that generally suck like the hifn. | ||
365 | */ | ||
366 | *nids = NULL; | ||
367 | return (0); | ||
368 | } | ||
369 | |||
370 | static int | ||
371 | cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
372 | const unsigned char *in, unsigned int inl) | ||
373 | { | ||
374 | struct crypt_op cryp; | ||
375 | struct dev_crypto_state *state = ctx->cipher_data; | ||
376 | struct session_op *sess = &state->d_sess; | ||
377 | void *iiv; | ||
378 | unsigned char save_iv[EVP_MAX_IV_LENGTH]; | ||
379 | |||
380 | if (state->d_fd < 0) | ||
381 | return (0); | ||
382 | if (!inl) | ||
383 | return (1); | ||
384 | if ((inl % ctx->cipher->block_size) != 0) | ||
385 | return (0); | ||
386 | |||
387 | memset(&cryp, 0, sizeof(cryp)); | ||
388 | |||
389 | cryp.ses = sess->ses; | ||
390 | cryp.flags = 0; | ||
391 | cryp.len = inl; | ||
392 | cryp.src = (caddr_t) in; | ||
393 | cryp.dst = (caddr_t) out; | ||
394 | cryp.mac = 0; | ||
395 | |||
396 | cryp.op = ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT; | ||
397 | |||
398 | if (ctx->cipher->iv_len) { | ||
399 | cryp.iv = (caddr_t) ctx->iv; | ||
400 | if (!ctx->encrypt) { | ||
401 | iiv = (void *) in + inl - ctx->cipher->iv_len; | ||
402 | memcpy(save_iv, iiv, ctx->cipher->iv_len); | ||
403 | } | ||
404 | } else | ||
405 | cryp.iv = NULL; | ||
406 | |||
407 | if (ioctl(state->d_fd, CIOCCRYPT, &cryp) == -1) { | ||
408 | /* XXX need better errror handling | ||
409 | * this can fail for a number of different reasons. | ||
410 | */ | ||
411 | return (0); | ||
412 | } | ||
413 | |||
414 | if (ctx->cipher->iv_len) { | ||
415 | if (ctx->encrypt) | ||
416 | iiv = (void *) out + inl - ctx->cipher->iv_len; | ||
417 | else | ||
418 | iiv = save_iv; | ||
419 | memcpy(ctx->iv, iiv, ctx->cipher->iv_len); | ||
420 | } | ||
421 | return (1); | ||
422 | } | ||
423 | |||
424 | static int | ||
425 | cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
426 | const unsigned char *iv, int enc) | ||
427 | { | ||
428 | struct dev_crypto_state *state = ctx->cipher_data; | ||
429 | struct session_op *sess = &state->d_sess; | ||
430 | int cipher; | ||
431 | |||
432 | if ((cipher = cipher_nid_to_cryptodev(ctx->cipher->nid)) == NID_undef) | ||
433 | return (0); | ||
434 | |||
435 | if (ctx->cipher->iv_len > cryptodev_max_iv(cipher)) | ||
436 | return (0); | ||
437 | |||
438 | if (!cryptodev_key_length_valid(cipher, ctx->key_len)) | ||
439 | return (0); | ||
440 | |||
441 | memset(sess, 0, sizeof(struct session_op)); | ||
442 | |||
443 | if ((state->d_fd = get_dev_crypto()) < 0) | ||
444 | return (0); | ||
445 | |||
446 | sess->key = (unsigned char *)key; | ||
447 | sess->keylen = ctx->key_len; | ||
448 | sess->cipher = cipher; | ||
449 | |||
450 | if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { | ||
451 | close(state->d_fd); | ||
452 | state->d_fd = -1; | ||
453 | return (0); | ||
454 | } | ||
455 | return (1); | ||
456 | } | ||
457 | |||
458 | /* | ||
459 | * free anything we allocated earlier when initting a | ||
460 | * session, and close the session. | ||
461 | */ | ||
462 | static int | ||
463 | cryptodev_cleanup(EVP_CIPHER_CTX *ctx) | ||
464 | { | ||
465 | int ret = 0; | ||
466 | struct dev_crypto_state *state = ctx->cipher_data; | ||
467 | struct session_op *sess = &state->d_sess; | ||
468 | |||
469 | if (state->d_fd < 0) | ||
470 | return (0); | ||
471 | |||
472 | /* XXX if this ioctl fails, someting's wrong. the invoker | ||
473 | * may have called us with a bogus ctx, or we could | ||
474 | * have a device that for whatever reason just doesn't | ||
475 | * want to play ball - it's not clear what's right | ||
476 | * here - should this be an error? should it just | ||
477 | * increase a counter, hmm. For right now, we return | ||
478 | * 0 - I don't believe that to be "right". we could | ||
479 | * call the gorpy openssl lib error handlers that | ||
480 | * print messages to users of the library. hmm.. | ||
481 | */ | ||
482 | |||
483 | if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) == -1) { | ||
484 | ret = 0; | ||
485 | } else { | ||
486 | ret = 1; | ||
487 | } | ||
488 | close(state->d_fd); | ||
489 | state->d_fd = -1; | ||
490 | |||
491 | return (ret); | ||
492 | } | ||
493 | |||
494 | /* | ||
495 | * libcrypto EVP stuff - this is how we get wired to EVP so the engine | ||
496 | * gets called when libcrypto requests a cipher NID. | ||
497 | */ | ||
498 | |||
499 | /* DES CBC EVP */ | ||
500 | const EVP_CIPHER cryptodev_des_cbc = { | ||
501 | NID_des_cbc, | ||
502 | 8, 8, 8, | ||
503 | EVP_CIPH_CBC_MODE, | ||
504 | cryptodev_init_key, | ||
505 | cryptodev_cipher, | ||
506 | cryptodev_cleanup, | ||
507 | sizeof(struct dev_crypto_state), | ||
508 | EVP_CIPHER_set_asn1_iv, | ||
509 | EVP_CIPHER_get_asn1_iv, | ||
510 | NULL | ||
511 | }; | ||
512 | |||
513 | /* 3DES CBC EVP */ | ||
514 | const EVP_CIPHER cryptodev_3des_cbc = { | ||
515 | NID_des_ede3_cbc, | ||
516 | 8, 24, 8, | ||
517 | EVP_CIPH_CBC_MODE, | ||
518 | cryptodev_init_key, | ||
519 | cryptodev_cipher, | ||
520 | cryptodev_cleanup, | ||
521 | sizeof(struct dev_crypto_state), | ||
522 | EVP_CIPHER_set_asn1_iv, | ||
523 | EVP_CIPHER_get_asn1_iv, | ||
524 | NULL | ||
525 | }; | ||
526 | |||
527 | const EVP_CIPHER cryptodev_bf_cbc = { | ||
528 | NID_bf_cbc, | ||
529 | 8, 16, 8, | ||
530 | EVP_CIPH_CBC_MODE, | ||
531 | cryptodev_init_key, | ||
532 | cryptodev_cipher, | ||
533 | cryptodev_cleanup, | ||
534 | sizeof(struct dev_crypto_state), | ||
535 | EVP_CIPHER_set_asn1_iv, | ||
536 | EVP_CIPHER_get_asn1_iv, | ||
537 | NULL | ||
538 | }; | ||
539 | |||
540 | const EVP_CIPHER cryptodev_cast_cbc = { | ||
541 | NID_cast5_cbc, | ||
542 | 8, 16, 8, | ||
543 | EVP_CIPH_CBC_MODE, | ||
544 | cryptodev_init_key, | ||
545 | cryptodev_cipher, | ||
546 | cryptodev_cleanup, | ||
547 | sizeof(struct dev_crypto_state), | ||
548 | EVP_CIPHER_set_asn1_iv, | ||
549 | EVP_CIPHER_get_asn1_iv, | ||
550 | NULL | ||
551 | }; | ||
552 | |||
553 | const EVP_CIPHER cryptodev_aes_cbc = { | ||
554 | NID_aes_128_cbc, | ||
555 | 16, 16, 16, | ||
556 | EVP_CIPH_CBC_MODE, | ||
557 | cryptodev_init_key, | ||
558 | cryptodev_cipher, | ||
559 | cryptodev_cleanup, | ||
560 | sizeof(struct dev_crypto_state), | ||
561 | EVP_CIPHER_set_asn1_iv, | ||
562 | EVP_CIPHER_get_asn1_iv, | ||
563 | NULL | ||
564 | }; | ||
565 | |||
566 | /* | ||
567 | * Registered by the ENGINE when used to find out how to deal with | ||
568 | * a particular NID in the ENGINE. this says what we'll do at the | ||
569 | * top level - note, that list is restricted by what we answer with | ||
570 | */ | ||
571 | static int | ||
572 | cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher, | ||
573 | const int **nids, int nid) | ||
574 | { | ||
575 | if (!cipher) | ||
576 | return (cryptodev_usable_ciphers(nids)); | ||
577 | |||
578 | switch (nid) { | ||
579 | case NID_des_ede3_cbc: | ||
580 | *cipher = &cryptodev_3des_cbc; | ||
581 | break; | ||
582 | case NID_des_cbc: | ||
583 | *cipher = &cryptodev_des_cbc; | ||
584 | break; | ||
585 | case NID_bf_cbc: | ||
586 | *cipher = &cryptodev_bf_cbc; | ||
587 | break; | ||
588 | case NID_cast5_cbc: | ||
589 | *cipher = &cryptodev_cast_cbc; | ||
590 | break; | ||
591 | case NID_aes_128_cbc: | ||
592 | *cipher = &cryptodev_aes_cbc; | ||
593 | break; | ||
594 | default: | ||
595 | *cipher = NULL; | ||
596 | break; | ||
597 | } | ||
598 | return (*cipher != NULL); | ||
599 | } | ||
600 | |||
601 | static int | ||
602 | cryptodev_engine_digests(ENGINE *e, const EVP_MD **digest, | ||
603 | const int **nids, int nid) | ||
604 | { | ||
605 | if (!digest) | ||
606 | return (cryptodev_usable_digests(nids)); | ||
607 | |||
608 | switch (nid) { | ||
609 | case NID_md5: | ||
610 | *digest = NULL; /* need to make a clean md5 critter */ | ||
611 | break; | ||
612 | default: | ||
613 | *digest = NULL; | ||
614 | break; | ||
615 | } | ||
616 | return (*digest != NULL); | ||
617 | } | ||
618 | |||
619 | /* | ||
620 | * Convert a BIGNUM to the representation that /dev/crypto needs. | ||
621 | * Upon completion of use, the caller is responsible for freeing | ||
622 | * crp->crp_p. | ||
623 | */ | ||
624 | static int | ||
625 | bn2crparam(const BIGNUM *a, struct crparam *crp) | ||
626 | { | ||
627 | int i, j, k; | ||
628 | ssize_t words, bytes, bits; | ||
629 | u_char *b; | ||
630 | |||
631 | crp->crp_p = NULL; | ||
632 | crp->crp_nbits = 0; | ||
633 | |||
634 | bits = BN_num_bits(a); | ||
635 | bytes = (bits + 7) / 8; | ||
636 | |||
637 | b = malloc(bytes); | ||
638 | if (b == NULL) | ||
639 | return (1); | ||
640 | |||
641 | crp->crp_p = b; | ||
642 | crp->crp_nbits = bits; | ||
643 | |||
644 | for (i = 0, j = 0; i < a->top; i++) { | ||
645 | for (k = 0; k < BN_BITS2 / 8; k++) { | ||
646 | if ((j + k) >= bytes) | ||
647 | return (0); | ||
648 | b[j + k] = a->d[i] >> (k * 8); | ||
649 | } | ||
650 | j += BN_BITS2 / 8; | ||
651 | } | ||
652 | return (0); | ||
653 | } | ||
654 | |||
655 | /* Convert a /dev/crypto parameter to a BIGNUM */ | ||
656 | static int | ||
657 | crparam2bn(struct crparam *crp, BIGNUM *a) | ||
658 | { | ||
659 | u_int8_t *pd; | ||
660 | int i, bytes; | ||
661 | |||
662 | bytes = (crp->crp_nbits + 7) / 8; | ||
663 | |||
664 | if (bytes == 0) | ||
665 | return (-1); | ||
666 | |||
667 | if ((pd = (u_int8_t *) malloc(bytes)) == NULL) | ||
668 | return (-1); | ||
669 | |||
670 | for (i = 0; i < bytes; i++) | ||
671 | pd[i] = crp->crp_p[bytes - i - 1]; | ||
672 | |||
673 | BN_bin2bn(pd, bytes, a); | ||
674 | free(pd); | ||
675 | |||
676 | return (0); | ||
677 | } | ||
678 | |||
679 | static void | ||
680 | zapparams(struct crypt_kop *kop) | ||
681 | { | ||
682 | int i; | ||
683 | |||
684 | for (i = 0; i <= kop->crk_iparams + kop->crk_oparams; i++) { | ||
685 | if (kop->crk_param[i].crp_p) | ||
686 | free(kop->crk_param[i].crp_p); | ||
687 | kop->crk_param[i].crp_p = NULL; | ||
688 | kop->crk_param[i].crp_nbits = 0; | ||
689 | } | ||
690 | } | ||
691 | |||
692 | static int | ||
693 | cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r, int slen, BIGNUM *s) | ||
694 | { | ||
695 | int fd, ret = -1; | ||
696 | |||
697 | if ((fd = get_asym_dev_crypto()) < 0) | ||
698 | return (ret); | ||
699 | |||
700 | if (r) { | ||
701 | kop->crk_param[kop->crk_iparams].crp_p = calloc(rlen, sizeof(char)); | ||
702 | kop->crk_param[kop->crk_iparams].crp_nbits = rlen * 8; | ||
703 | kop->crk_oparams++; | ||
704 | } | ||
705 | if (s) { | ||
706 | kop->crk_param[kop->crk_iparams+1].crp_p = calloc(slen, sizeof(char)); | ||
707 | kop->crk_param[kop->crk_iparams+1].crp_nbits = slen * 8; | ||
708 | kop->crk_oparams++; | ||
709 | } | ||
710 | |||
711 | if (ioctl(fd, CIOCKEY, kop) == 0) { | ||
712 | if (r) | ||
713 | crparam2bn(&kop->crk_param[kop->crk_iparams], r); | ||
714 | if (s) | ||
715 | crparam2bn(&kop->crk_param[kop->crk_iparams+1], s); | ||
716 | ret = 0; | ||
717 | } | ||
718 | |||
719 | return (ret); | ||
720 | } | ||
721 | |||
722 | static int | ||
723 | cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | ||
724 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) | ||
725 | { | ||
726 | struct crypt_kop kop; | ||
727 | int ret = 1; | ||
728 | |||
729 | /* Currently, we know we can do mod exp iff we can do any | ||
730 | * asymmetric operations at all. | ||
731 | */ | ||
732 | if (cryptodev_asymfeat == 0) { | ||
733 | ret = BN_mod_exp(r, a, p, m, ctx); | ||
734 | return (ret); | ||
735 | } | ||
736 | |||
737 | memset(&kop, 0, sizeof kop); | ||
738 | kop.crk_op = CRK_MOD_EXP; | ||
739 | |||
740 | /* inputs: a^p % m */ | ||
741 | if (bn2crparam(a, &kop.crk_param[0])) | ||
742 | goto err; | ||
743 | if (bn2crparam(p, &kop.crk_param[1])) | ||
744 | goto err; | ||
745 | if (bn2crparam(m, &kop.crk_param[2])) | ||
746 | goto err; | ||
747 | kop.crk_iparams = 3; | ||
748 | |||
749 | if (cryptodev_asym(&kop, BN_num_bytes(m), r, 0, NULL) == -1) { | ||
750 | const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); | ||
751 | ret = meth->bn_mod_exp(r, a, p, m, ctx, in_mont); | ||
752 | } | ||
753 | err: | ||
754 | zapparams(&kop); | ||
755 | return (ret); | ||
756 | } | ||
757 | |||
758 | static int | ||
759 | cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa) | ||
760 | { | ||
761 | int r; | ||
762 | BN_CTX *ctx; | ||
763 | |||
764 | ctx = BN_CTX_new(); | ||
765 | r = cryptodev_bn_mod_exp(r0, I, rsa->d, rsa->n, ctx, NULL); | ||
766 | BN_CTX_free(ctx); | ||
767 | return (r); | ||
768 | } | ||
769 | |||
770 | static int | ||
771 | cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) | ||
772 | { | ||
773 | struct crypt_kop kop; | ||
774 | int ret = 1; | ||
775 | |||
776 | if (!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp) { | ||
777 | /* XXX 0 means failure?? */ | ||
778 | return (0); | ||
779 | } | ||
780 | |||
781 | memset(&kop, 0, sizeof kop); | ||
782 | kop.crk_op = CRK_MOD_EXP_CRT; | ||
783 | /* inputs: rsa->p rsa->q I rsa->dmp1 rsa->dmq1 rsa->iqmp */ | ||
784 | if (bn2crparam(rsa->p, &kop.crk_param[0])) | ||
785 | goto err; | ||
786 | if (bn2crparam(rsa->q, &kop.crk_param[1])) | ||
787 | goto err; | ||
788 | if (bn2crparam(I, &kop.crk_param[2])) | ||
789 | goto err; | ||
790 | if (bn2crparam(rsa->dmp1, &kop.crk_param[3])) | ||
791 | goto err; | ||
792 | if (bn2crparam(rsa->dmq1, &kop.crk_param[4])) | ||
793 | goto err; | ||
794 | if (bn2crparam(rsa->iqmp, &kop.crk_param[5])) | ||
795 | goto err; | ||
796 | kop.crk_iparams = 6; | ||
797 | |||
798 | if (cryptodev_asym(&kop, BN_num_bytes(rsa->n), r0, 0, NULL) == -1) { | ||
799 | const RSA_METHOD *meth = RSA_PKCS1_SSLeay(); | ||
800 | ret = (*meth->rsa_mod_exp)(r0, I, rsa, ctx); | ||
801 | } | ||
802 | err: | ||
803 | zapparams(&kop); | ||
804 | return (ret); | ||
805 | } | ||
806 | |||
807 | static RSA_METHOD cryptodev_rsa = { | ||
808 | "cryptodev RSA method", | ||
809 | NULL, /* rsa_pub_enc */ | ||
810 | NULL, /* rsa_pub_dec */ | ||
811 | NULL, /* rsa_priv_enc */ | ||
812 | NULL, /* rsa_priv_dec */ | ||
813 | NULL, | ||
814 | NULL, | ||
815 | NULL, /* init */ | ||
816 | NULL, /* finish */ | ||
817 | 0, /* flags */ | ||
818 | NULL, /* app_data */ | ||
819 | NULL, /* rsa_sign */ | ||
820 | NULL /* rsa_verify */ | ||
821 | }; | ||
822 | |||
823 | static int | ||
824 | cryptodev_dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
825 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) | ||
826 | { | ||
827 | return (cryptodev_bn_mod_exp(r, a, p, m, ctx, m_ctx)); | ||
828 | } | ||
829 | |||
830 | static int | ||
831 | cryptodev_dsa_dsa_mod_exp(DSA *dsa, BIGNUM *t1, BIGNUM *g, | ||
832 | BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p, | ||
833 | BN_CTX *ctx, BN_MONT_CTX *mont) | ||
834 | { | ||
835 | BIGNUM t2; | ||
836 | int ret = 0; | ||
837 | |||
838 | BN_init(&t2); | ||
839 | |||
840 | /* v = ( g^u1 * y^u2 mod p ) mod q */ | ||
841 | /* let t1 = g ^ u1 mod p */ | ||
842 | ret = 0; | ||
843 | |||
844 | if (!dsa->meth->bn_mod_exp(dsa,t1,dsa->g,u1,dsa->p,ctx,mont)) | ||
845 | goto err; | ||
846 | |||
847 | /* let t2 = y ^ u2 mod p */ | ||
848 | if (!dsa->meth->bn_mod_exp(dsa,&t2,dsa->pub_key,u2,dsa->p,ctx,mont)) | ||
849 | goto err; | ||
850 | /* let u1 = t1 * t2 mod p */ | ||
851 | if (!BN_mod_mul(u1,t1,&t2,dsa->p,ctx)) | ||
852 | goto err; | ||
853 | |||
854 | BN_copy(t1,u1); | ||
855 | |||
856 | ret = 1; | ||
857 | err: | ||
858 | BN_free(&t2); | ||
859 | return(ret); | ||
860 | } | ||
861 | |||
862 | static DSA_SIG * | ||
863 | cryptodev_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) | ||
864 | { | ||
865 | struct crypt_kop kop; | ||
866 | BIGNUM *r = NULL, *s = NULL; | ||
867 | DSA_SIG *dsaret = NULL; | ||
868 | |||
869 | if ((r = BN_new()) == NULL) | ||
870 | goto err; | ||
871 | if ((s = BN_new()) == NULL) { | ||
872 | BN_free(r); | ||
873 | goto err; | ||
874 | } | ||
875 | |||
876 | memset(&kop, 0, sizeof kop); | ||
877 | kop.crk_op = CRK_DSA_SIGN; | ||
878 | |||
879 | /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ | ||
880 | kop.crk_param[0].crp_p = (caddr_t)dgst; | ||
881 | kop.crk_param[0].crp_nbits = dlen * 8; | ||
882 | if (bn2crparam(dsa->p, &kop.crk_param[1])) | ||
883 | goto err; | ||
884 | if (bn2crparam(dsa->q, &kop.crk_param[2])) | ||
885 | goto err; | ||
886 | if (bn2crparam(dsa->g, &kop.crk_param[3])) | ||
887 | goto err; | ||
888 | if (bn2crparam(dsa->priv_key, &kop.crk_param[4])) | ||
889 | goto err; | ||
890 | kop.crk_iparams = 5; | ||
891 | |||
892 | if (cryptodev_asym(&kop, BN_num_bytes(dsa->q), r, | ||
893 | BN_num_bytes(dsa->q), s) == 0) { | ||
894 | dsaret = DSA_SIG_new(); | ||
895 | dsaret->r = r; | ||
896 | dsaret->s = s; | ||
897 | } else { | ||
898 | const DSA_METHOD *meth = DSA_OpenSSL(); | ||
899 | BN_free(r); | ||
900 | BN_free(s); | ||
901 | dsaret = (meth->dsa_do_sign)(dgst, dlen, dsa); | ||
902 | } | ||
903 | err: | ||
904 | kop.crk_param[0].crp_p = NULL; | ||
905 | zapparams(&kop); | ||
906 | return (dsaret); | ||
907 | } | ||
908 | |||
909 | static int | ||
910 | cryptodev_dsa_verify(const unsigned char *dgst, int dlen, | ||
911 | DSA_SIG *sig, DSA *dsa) | ||
912 | { | ||
913 | struct crypt_kop kop; | ||
914 | int dsaret = 1; | ||
915 | |||
916 | memset(&kop, 0, sizeof kop); | ||
917 | kop.crk_op = CRK_DSA_VERIFY; | ||
918 | |||
919 | /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ | ||
920 | kop.crk_param[0].crp_p = (caddr_t)dgst; | ||
921 | kop.crk_param[0].crp_nbits = dlen * 8; | ||
922 | if (bn2crparam(dsa->p, &kop.crk_param[1])) | ||
923 | goto err; | ||
924 | if (bn2crparam(dsa->q, &kop.crk_param[2])) | ||
925 | goto err; | ||
926 | if (bn2crparam(dsa->g, &kop.crk_param[3])) | ||
927 | goto err; | ||
928 | if (bn2crparam(dsa->pub_key, &kop.crk_param[4])) | ||
929 | goto err; | ||
930 | if (bn2crparam(sig->r, &kop.crk_param[5])) | ||
931 | goto err; | ||
932 | if (bn2crparam(sig->s, &kop.crk_param[6])) | ||
933 | goto err; | ||
934 | kop.crk_iparams = 7; | ||
935 | |||
936 | if (cryptodev_asym(&kop, 0, NULL, 0, NULL) == 0) { | ||
937 | dsaret = kop.crk_status; | ||
938 | } else { | ||
939 | const DSA_METHOD *meth = DSA_OpenSSL(); | ||
940 | |||
941 | dsaret = (meth->dsa_do_verify)(dgst, dlen, sig, dsa); | ||
942 | } | ||
943 | err: | ||
944 | kop.crk_param[0].crp_p = NULL; | ||
945 | zapparams(&kop); | ||
946 | return (dsaret); | ||
947 | } | ||
948 | |||
949 | static DSA_METHOD cryptodev_dsa = { | ||
950 | "cryptodev DSA method", | ||
951 | NULL, | ||
952 | NULL, /* dsa_sign_setup */ | ||
953 | NULL, | ||
954 | NULL, /* dsa_mod_exp */ | ||
955 | NULL, | ||
956 | NULL, /* init */ | ||
957 | NULL, /* finish */ | ||
958 | 0, /* flags */ | ||
959 | NULL /* app_data */ | ||
960 | }; | ||
961 | |||
962 | static int | ||
963 | cryptodev_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a, | ||
964 | const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, | ||
965 | BN_MONT_CTX *m_ctx) | ||
966 | { | ||
967 | return (cryptodev_bn_mod_exp(r, a, p, m, ctx, m_ctx)); | ||
968 | } | ||
969 | |||
970 | static int | ||
971 | cryptodev_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) | ||
972 | { | ||
973 | struct crypt_kop kop; | ||
974 | int dhret = 1; | ||
975 | int fd, keylen; | ||
976 | |||
977 | if ((fd = get_asym_dev_crypto()) < 0) { | ||
978 | const DH_METHOD *meth = DH_OpenSSL(); | ||
979 | |||
980 | return ((meth->compute_key)(key, pub_key, dh)); | ||
981 | } | ||
982 | |||
983 | keylen = BN_num_bits(dh->p); | ||
984 | |||
985 | memset(&kop, 0, sizeof kop); | ||
986 | kop.crk_op = CRK_DH_COMPUTE_KEY; | ||
987 | |||
988 | /* inputs: dh->priv_key pub_key dh->p key */ | ||
989 | if (bn2crparam(dh->priv_key, &kop.crk_param[0])) | ||
990 | goto err; | ||
991 | if (bn2crparam(pub_key, &kop.crk_param[1])) | ||
992 | goto err; | ||
993 | if (bn2crparam(dh->p, &kop.crk_param[2])) | ||
994 | goto err; | ||
995 | kop.crk_iparams = 3; | ||
996 | |||
997 | kop.crk_param[3].crp_p = key; | ||
998 | kop.crk_param[3].crp_nbits = keylen * 8; | ||
999 | kop.crk_oparams = 1; | ||
1000 | |||
1001 | if (ioctl(fd, CIOCKEY, &kop) == -1) { | ||
1002 | const DH_METHOD *meth = DH_OpenSSL(); | ||
1003 | |||
1004 | dhret = (meth->compute_key)(key, pub_key, dh); | ||
1005 | } | ||
1006 | err: | ||
1007 | kop.crk_param[3].crp_p = NULL; | ||
1008 | zapparams(&kop); | ||
1009 | return (dhret); | ||
1010 | } | ||
1011 | |||
1012 | static DH_METHOD cryptodev_dh = { | ||
1013 | "cryptodev DH method", | ||
1014 | NULL, /* cryptodev_dh_generate_key */ | ||
1015 | NULL, | ||
1016 | NULL, | ||
1017 | NULL, | ||
1018 | NULL, | ||
1019 | 0, /* flags */ | ||
1020 | NULL /* app_data */ | ||
1021 | }; | ||
1022 | |||
1023 | /* | ||
1024 | * ctrl right now is just a wrapper that doesn't do much | ||
1025 | * but I expect we'll want some options soon. | ||
1026 | */ | ||
1027 | static int | ||
1028 | cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()) | ||
1029 | { | ||
1030 | #ifdef HAVE_SYSLOG_R | ||
1031 | struct syslog_data sd = SYSLOG_DATA_INIT; | ||
1032 | #endif | ||
1033 | |||
1034 | switch (cmd) { | ||
1035 | default: | ||
1036 | #ifdef HAVE_SYSLOG_R | ||
1037 | syslog_r(LOG_ERR, &sd, | ||
1038 | "cryptodev_ctrl: unknown command %d", cmd); | ||
1039 | #else | ||
1040 | syslog(LOG_ERR, "cryptodev_ctrl: unknown command %d", cmd); | ||
1041 | #endif | ||
1042 | break; | ||
1043 | } | ||
1044 | return (1); | ||
1045 | } | ||
1046 | |||
1047 | void | ||
1048 | ENGINE_load_cryptodev(void) | ||
1049 | { | ||
1050 | ENGINE *engine = ENGINE_new(); | ||
1051 | int fd; | ||
1052 | |||
1053 | if (engine == NULL) | ||
1054 | return; | ||
1055 | if ((fd = get_dev_crypto()) < 0) { | ||
1056 | ENGINE_free(engine); | ||
1057 | return; | ||
1058 | } | ||
1059 | |||
1060 | /* | ||
1061 | * find out what asymmetric crypto algorithms we support | ||
1062 | */ | ||
1063 | if (ioctl(fd, CIOCASYMFEAT, &cryptodev_asymfeat) == -1) { | ||
1064 | close(fd); | ||
1065 | ENGINE_free(engine); | ||
1066 | return; | ||
1067 | } | ||
1068 | close(fd); | ||
1069 | |||
1070 | if (!ENGINE_set_id(engine, "cryptodev") || | ||
1071 | !ENGINE_set_name(engine, "BSD cryptodev engine") || | ||
1072 | !ENGINE_set_ciphers(engine, cryptodev_engine_ciphers) || | ||
1073 | !ENGINE_set_digests(engine, cryptodev_engine_digests) || | ||
1074 | !ENGINE_set_ctrl_function(engine, cryptodev_ctrl) || | ||
1075 | !ENGINE_set_cmd_defns(engine, cryptodev_defns)) { | ||
1076 | ENGINE_free(engine); | ||
1077 | return; | ||
1078 | } | ||
1079 | |||
1080 | if (ENGINE_set_RSA(engine, &cryptodev_rsa)) { | ||
1081 | const RSA_METHOD *rsa_meth = RSA_PKCS1_SSLeay(); | ||
1082 | |||
1083 | cryptodev_rsa.bn_mod_exp = rsa_meth->bn_mod_exp; | ||
1084 | cryptodev_rsa.rsa_mod_exp = rsa_meth->rsa_mod_exp; | ||
1085 | cryptodev_rsa.rsa_pub_enc = rsa_meth->rsa_pub_enc; | ||
1086 | cryptodev_rsa.rsa_pub_dec = rsa_meth->rsa_pub_dec; | ||
1087 | cryptodev_rsa.rsa_priv_enc = rsa_meth->rsa_priv_enc; | ||
1088 | cryptodev_rsa.rsa_priv_dec = rsa_meth->rsa_priv_dec; | ||
1089 | if (cryptodev_asymfeat & CRF_MOD_EXP) { | ||
1090 | cryptodev_rsa.bn_mod_exp = cryptodev_bn_mod_exp; | ||
1091 | if (cryptodev_asymfeat & CRF_MOD_EXP_CRT) | ||
1092 | cryptodev_rsa.rsa_mod_exp = | ||
1093 | cryptodev_rsa_mod_exp; | ||
1094 | else | ||
1095 | cryptodev_rsa.rsa_mod_exp = | ||
1096 | cryptodev_rsa_nocrt_mod_exp; | ||
1097 | } | ||
1098 | } | ||
1099 | |||
1100 | if (ENGINE_set_DSA(engine, &cryptodev_dsa)) { | ||
1101 | const DSA_METHOD *meth = DSA_OpenSSL(); | ||
1102 | |||
1103 | memcpy(&cryptodev_dsa, meth, sizeof(DSA_METHOD)); | ||
1104 | if (cryptodev_asymfeat & CRF_DSA_SIGN) | ||
1105 | cryptodev_dsa.dsa_do_sign = cryptodev_dsa_do_sign; | ||
1106 | if (cryptodev_asymfeat & CRF_MOD_EXP) { | ||
1107 | cryptodev_dsa.bn_mod_exp = cryptodev_dsa_bn_mod_exp; | ||
1108 | cryptodev_dsa.dsa_mod_exp = cryptodev_dsa_dsa_mod_exp; | ||
1109 | } | ||
1110 | if (cryptodev_asymfeat & CRF_DSA_VERIFY) | ||
1111 | cryptodev_dsa.dsa_do_verify = cryptodev_dsa_verify; | ||
1112 | } | ||
1113 | |||
1114 | if (ENGINE_set_DH(engine, &cryptodev_dh)){ | ||
1115 | const DH_METHOD *dh_meth = DH_OpenSSL(); | ||
1116 | |||
1117 | cryptodev_dh.generate_key = dh_meth->generate_key; | ||
1118 | cryptodev_dh.compute_key = dh_meth->compute_key; | ||
1119 | cryptodev_dh.bn_mod_exp = dh_meth->bn_mod_exp; | ||
1120 | if (cryptodev_asymfeat & CRF_MOD_EXP) { | ||
1121 | cryptodev_dh.bn_mod_exp = cryptodev_mod_exp_dh; | ||
1122 | if (cryptodev_asymfeat & CRF_DH_COMPUTE_KEY) | ||
1123 | cryptodev_dh.compute_key = | ||
1124 | cryptodev_dh_compute_key; | ||
1125 | } | ||
1126 | } | ||
1127 | |||
1128 | ENGINE_add(engine); | ||
1129 | ENGINE_free(engine); | ||
1130 | ERR_clear_error(); | ||
1131 | } | ||
1132 | |||
1133 | #endif /* HAVE_CRYPTODEV */ | ||