| OLD | NEW |
| 1 /* crypto/engine/e_gmp.c */ | 1 /* crypto/engine/e_gmp.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 2003. | 3 * project 2003. |
| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 * montgomery forms) is probably the difference. However, if some unconfirmed | 78 * montgomery forms) is probably the difference. However, if some unconfirmed |
| 79 * reports from users is anything to go by, the situation on some other | 79 * reports from users is anything to go by, the situation on some other |
| 80 * chipsets might be a good deal more favourable to the GMP version (eg. PPC). | 80 * chipsets might be a good deal more favourable to the GMP version (eg. PPC). |
| 81 * Feedback welcome. */ | 81 * Feedback welcome. */ |
| 82 | 82 |
| 83 #include <stdio.h> | 83 #include <stdio.h> |
| 84 #include <string.h> | 84 #include <string.h> |
| 85 #include <openssl/crypto.h> | 85 #include <openssl/crypto.h> |
| 86 #include <openssl/buffer.h> | 86 #include <openssl/buffer.h> |
| 87 #include <openssl/engine.h> | 87 #include <openssl/engine.h> |
| 88 #ifndef OPENSSL_NO_RSA |
| 88 #include <openssl/rsa.h> | 89 #include <openssl/rsa.h> |
| 90 #endif |
| 89 #include <openssl/bn.h> | 91 #include <openssl/bn.h> |
| 90 | 92 |
| 91 #ifndef OPENSSL_NO_HW | 93 #ifndef OPENSSL_NO_HW |
| 92 #ifndef OPENSSL_NO_GMP | 94 #ifndef OPENSSL_NO_GMP |
| 93 | 95 |
| 94 #include <gmp.h> | 96 #include <gmp.h> |
| 95 | 97 |
| 96 #define E_GMP_LIB_NAME "gmp engine" | 98 #define E_GMP_LIB_NAME "gmp engine" |
| 97 #include "e_gmp_err.c" | 99 #include "e_gmp_err.c" |
| 98 | 100 |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 { | 464 { |
| 463 if(id && (strcmp(id, engine_e_gmp_id) != 0)) | 465 if(id && (strcmp(id, engine_e_gmp_id) != 0)) |
| 464 return 0; | 466 return 0; |
| 465 if(!bind_helper(e)) | 467 if(!bind_helper(e)) |
| 466 return 0; | 468 return 0; |
| 467 return 1; | 469 return 1; |
| 468 } | 470 } |
| 469 IMPLEMENT_DYNAMIC_BIND_FN(bind_fn) | 471 IMPLEMENT_DYNAMIC_BIND_FN(bind_fn) |
| 470 #else | 472 #else |
| 471 OPENSSL_EXPORT | 473 OPENSSL_EXPORT |
| 474 int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns); |
| 475 OPENSSL_EXPORT |
| 472 int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { return 0; } | 476 int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { return 0; } |
| 473 #endif | 477 #endif |
| 474 #endif /* OPENSSL_NO_DYNAMIC_ENGINE */ | 478 #endif /* !OPENSSL_NO_DYNAMIC_ENGINE */ |
| 475 | 479 |
| 476 #endif /* !OPENSSL_NO_HW */ | 480 #endif /* !OPENSSL_NO_HW */ |
| OLD | NEW |