| OLD | NEW |
| 1 /* crypto/engine/eng_openssl.c */ | 1 /* crypto/engine/eng_openssl.c */ |
| 2 /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | 2 /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL |
| 3 * project 2000. | 3 * project 2000. |
| 4 */ | 4 */ |
| 5 /* ==================================================================== | 5 /* ==================================================================== |
| 6 * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. | 6 * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. |
| 7 * | 7 * |
| 8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
| 9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
| 10 * are met: | 10 * are met: |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 { | 231 { |
| 232 #ifdef TEST_ENG_OPENSSL_RC4_P_INIT | 232 #ifdef TEST_ENG_OPENSSL_RC4_P_INIT |
| 233 fprintf(stderr, "(TEST_ENG_OPENSSL_RC4) test_init_key() called\n"); | 233 fprintf(stderr, "(TEST_ENG_OPENSSL_RC4) test_init_key() called\n"); |
| 234 #endif | 234 #endif |
| 235 memcpy(&test(ctx)->key[0],key,EVP_CIPHER_CTX_key_length(ctx)); | 235 memcpy(&test(ctx)->key[0],key,EVP_CIPHER_CTX_key_length(ctx)); |
| 236 RC4_set_key(&test(ctx)->ks,EVP_CIPHER_CTX_key_length(ctx), | 236 RC4_set_key(&test(ctx)->ks,EVP_CIPHER_CTX_key_length(ctx), |
| 237 test(ctx)->key); | 237 test(ctx)->key); |
| 238 return 1; | 238 return 1; |
| 239 } | 239 } |
| 240 static int test_rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | 240 static int test_rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
| 241 » » const unsigned char *in, unsigned int inl) | 241 » » const unsigned char *in, size_t inl) |
| 242 { | 242 { |
| 243 #ifdef TEST_ENG_OPENSSL_RC4_P_CIPHER | 243 #ifdef TEST_ENG_OPENSSL_RC4_P_CIPHER |
| 244 fprintf(stderr, "(TEST_ENG_OPENSSL_RC4) test_cipher() called\n"); | 244 fprintf(stderr, "(TEST_ENG_OPENSSL_RC4) test_cipher() called\n"); |
| 245 #endif | 245 #endif |
| 246 RC4(&test(ctx)->ks,inl,in,out); | 246 RC4(&test(ctx)->ks,inl,in,out); |
| 247 return 1; | 247 return 1; |
| 248 } | 248 } |
| 249 static const EVP_CIPHER test_r4_cipher= | 249 static const EVP_CIPHER test_r4_cipher= |
| 250 { | 250 { |
| 251 NID_rc4, | 251 NID_rc4, |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 EVP_PKEY *key; | 375 EVP_PKEY *key; |
| 376 fprintf(stderr, "(TEST_ENG_OPENSSL_PKEY)Loading Private key %s\n", key_i
d); | 376 fprintf(stderr, "(TEST_ENG_OPENSSL_PKEY)Loading Private key %s\n", key_i
d); |
| 377 in = BIO_new_file(key_id, "r"); | 377 in = BIO_new_file(key_id, "r"); |
| 378 if (!in) | 378 if (!in) |
| 379 return NULL; | 379 return NULL; |
| 380 key = PEM_read_bio_PrivateKey(in, NULL, 0, NULL); | 380 key = PEM_read_bio_PrivateKey(in, NULL, 0, NULL); |
| 381 BIO_free(in); | 381 BIO_free(in); |
| 382 return key; | 382 return key; |
| 383 } | 383 } |
| 384 #endif | 384 #endif |
| OLD | NEW |