diff options
| author | djm <> | 2006-06-27 05:05:40 +0000 |
|---|---|---|
| committer | djm <> | 2006-06-27 05:05:40 +0000 |
| commit | 4f828b924f54507141fb95ebe49dfcd261945e85 (patch) | |
| tree | f6b05913ca6b34db73a343a7bb36d57ff4105356 /src/lib/libcrypto/rsa | |
| parent | 588543a0946f1dbf0f1dd5135f8f6447486dc183 (diff) | |
| download | openbsd-4f828b924f54507141fb95ebe49dfcd261945e85.tar.gz openbsd-4f828b924f54507141fb95ebe49dfcd261945e85.tar.bz2 openbsd-4f828b924f54507141fb95ebe49dfcd261945e85.zip | |
import of openssl-0.9.7j
Diffstat (limited to 'src/lib/libcrypto/rsa')
| -rw-r--r-- | src/lib/libcrypto/rsa/Makefile | 36 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_test.c | 5 |
2 files changed, 36 insertions, 5 deletions
diff --git a/src/lib/libcrypto/rsa/Makefile b/src/lib/libcrypto/rsa/Makefile index 5748b0d3d0..8851825250 100644 --- a/src/lib/libcrypto/rsa/Makefile +++ b/src/lib/libcrypto/rsa/Makefile | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # | 1 | # |
| 2 | # SSLeay/crypto/rsa/Makefile | 2 | # OpenSSL/crypto/rsa/Makefile |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | DIR= rsa | 5 | DIR= rsa |
| @@ -24,10 +24,10 @@ APPS= | |||
| 24 | LIB=$(TOP)/libcrypto.a | 24 | LIB=$(TOP)/libcrypto.a |
| 25 | LIBSRC= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c \ | 25 | LIBSRC= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c \ |
| 26 | rsa_pk1.c rsa_ssl.c rsa_none.c rsa_oaep.c rsa_chk.c rsa_null.c \ | 26 | rsa_pk1.c rsa_ssl.c rsa_none.c rsa_oaep.c rsa_chk.c rsa_null.c \ |
| 27 | rsa_asn1.c | 27 | rsa_pss.c rsa_x931.c rsa_asn1.c |
| 28 | LIBOBJ= rsa_eay.o rsa_gen.o rsa_lib.o rsa_sign.o rsa_saos.o rsa_err.o \ | 28 | LIBOBJ= rsa_eay.o rsa_gen.o rsa_lib.o rsa_sign.o rsa_saos.o rsa_err.o \ |
| 29 | rsa_pk1.o rsa_ssl.o rsa_none.o rsa_oaep.o rsa_chk.o rsa_null.o \ | 29 | rsa_pk1.o rsa_ssl.o rsa_none.o rsa_oaep.o rsa_chk.o rsa_null.o \ |
| 30 | rsa_asn1.o | 30 | rsa_pss.o rsa_x931.o rsa_asn1.o |
| 31 | 31 | ||
| 32 | SRC= $(LIBSRC) | 32 | SRC= $(LIBSRC) |
| 33 | 33 | ||
| @@ -184,6 +184,26 @@ rsa_pk1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | |||
| 184 | rsa_pk1.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h | 184 | rsa_pk1.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h |
| 185 | rsa_pk1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 185 | rsa_pk1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 186 | rsa_pk1.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_pk1.c | 186 | rsa_pk1.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_pk1.c |
| 187 | rsa_pss.o: ../../e_os.h ../../include/openssl/aes.h | ||
| 188 | rsa_pss.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 189 | rsa_pss.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 190 | rsa_pss.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 191 | rsa_pss.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 192 | rsa_pss.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 193 | rsa_pss.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 194 | rsa_pss.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 195 | rsa_pss.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 196 | rsa_pss.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 197 | rsa_pss.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 198 | rsa_pss.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 199 | rsa_pss.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 200 | rsa_pss.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h | ||
| 201 | rsa_pss.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 202 | rsa_pss.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 203 | rsa_pss.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 204 | rsa_pss.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 205 | rsa_pss.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 206 | rsa_pss.o: ../../include/openssl/ui_compat.h ../cryptlib.h rsa_pss.c | ||
| 187 | rsa_saos.o: ../../e_os.h ../../include/openssl/aes.h | 207 | rsa_saos.o: ../../e_os.h ../../include/openssl/aes.h |
| 188 | rsa_saos.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 208 | rsa_saos.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 189 | rsa_saos.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 209 | rsa_saos.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h |
| @@ -237,3 +257,13 @@ rsa_ssl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | |||
| 237 | rsa_ssl.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h | 257 | rsa_ssl.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h |
| 238 | rsa_ssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 258 | rsa_ssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 239 | rsa_ssl.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_ssl.c | 259 | rsa_ssl.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_ssl.c |
| 260 | rsa_x931.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 261 | rsa_x931.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
| 262 | rsa_x931.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 263 | rsa_x931.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 264 | rsa_x931.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 265 | rsa_x931.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 266 | rsa_x931.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 267 | rsa_x931.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h | ||
| 268 | rsa_x931.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 269 | rsa_x931.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_x931.c | ||
diff --git a/src/lib/libcrypto/rsa/rsa_test.c b/src/lib/libcrypto/rsa/rsa_test.c index 924e9ad1f6..218bb2a39b 100644 --- a/src/lib/libcrypto/rsa/rsa_test.c +++ b/src/lib/libcrypto/rsa/rsa_test.c | |||
| @@ -227,10 +227,10 @@ int main(int argc, char *argv[]) | |||
| 227 | 227 | ||
| 228 | plen = sizeof(ptext_ex) - 1; | 228 | plen = sizeof(ptext_ex) - 1; |
| 229 | 229 | ||
| 230 | for (v = 0; v < 3; v++) | 230 | for (v = 0; v < 6; v++) |
| 231 | { | 231 | { |
| 232 | key = RSA_new(); | 232 | key = RSA_new(); |
| 233 | switch (v) { | 233 | switch (v%3) { |
| 234 | case 0: | 234 | case 0: |
| 235 | clen = key1(key, ctext_ex); | 235 | clen = key1(key, ctext_ex); |
| 236 | break; | 236 | break; |
| @@ -241,6 +241,7 @@ int main(int argc, char *argv[]) | |||
| 241 | clen = key3(key, ctext_ex); | 241 | clen = key3(key, ctext_ex); |
| 242 | break; | 242 | break; |
| 243 | } | 243 | } |
| 244 | if (v/3 > 1) key->flags |= RSA_FLAG_NO_EXP_CONSTTIME; | ||
| 244 | 245 | ||
| 245 | num = RSA_public_encrypt(plen, ptext_ex, ctext, key, | 246 | num = RSA_public_encrypt(plen, ptext_ex, ctext, key, |
| 246 | RSA_PKCS1_PADDING); | 247 | RSA_PKCS1_PADDING); |
