diff options
author | nectar <nectar@FreeBSD.org> | 2002-07-30 12:46:49 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2002-07-30 12:46:49 +0000 |
commit | 8b62a95bfc62aca74fc680ca8676348f39a51bd6 (patch) | |
tree | 8349084912ae6ced5698dc3c8d8b0166dc4786f1 /crypto/openssl | |
parent | 050218e0d0c68a2e1a37afaab11e3c586d4f1b7d (diff) | |
download | FreeBSD-src-8b62a95bfc62aca74fc680ca8676348f39a51bd6.zip FreeBSD-src-8b62a95bfc62aca74fc680ca8676348f39a51bd6.tar.gz |
Resolve conflicts after import of OpenSSL 0.9.6d.
Diffstat (limited to 'crypto/openssl')
-rw-r--r-- | crypto/openssl/apps/speed.c | 31 | ||||
-rw-r--r-- | crypto/openssl/crypto/evp/evp.h | 2 | ||||
-rw-r--r-- | crypto/openssl/crypto/rsa/rsa.h | 17 |
3 files changed, 37 insertions, 13 deletions
diff --git a/crypto/openssl/apps/speed.c b/crypto/openssl/apps/speed.c index 554169c..ad3ebad 100644 --- a/crypto/openssl/apps/speed.c +++ b/crypto/openssl/apps/speed.c @@ -84,12 +84,12 @@ #include <openssl/rand.h> #include <openssl/err.h> -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(_DARWIN) # define USE_TOD -#elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) +#elif !defined(MSDOS) && !defined(VXWORKS) && (!defined(VMS) || defined(__DECC)) # define TIMES #endif -#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) && !defined(__NetBSD__) +#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) && !defined(__NetBSD__) && !defined(_DARWIN) && !defined(VXWORKS) # define TIMEB #endif @@ -117,7 +117,7 @@ #include <sys/timeb.h> #endif -#if !defined(TIMES) && !defined(TIMEB) && !defined(USE_TOD) +#if !defined(TIMES) && !defined(TIMEB) && !defined(USE_TOD) && !defined(VXWORKS) #error "It seems neither struct tms nor struct timeb is supported in this platform!" #endif @@ -226,7 +226,7 @@ static double Time_F(int s, int usertime) #ifdef USE_TOD if(usertime) - { + { static struct rusage tstart,tend; if (s == START) @@ -286,7 +286,23 @@ static double Time_F(int s, int usertime) # if defined(TIMES) && defined(TIMEB) else # endif -# ifdef TIMEB +# ifdef VXWORKS + { + static unsigned long tick_start, tick_end; + + if( s == START ) + { + tick_start = tickGet(); + return 0; + } + else + { + tick_end = tickGet(); + ret = (double)(tick_end - tick_start) / (double)sysClkRateGet(); + return((ret < 0.001)?0.001:ret); + } + } +# elif defined(TIMEB) { static struct timeb tstart,tend; long i; @@ -305,6 +321,7 @@ static double Time_F(int s, int usertime) } } # endif + #endif } @@ -320,7 +337,9 @@ int MAIN(int argc, char **argv) #define DSA_NUM 3 long count,rsa_count; int i,j,k; +#ifndef NO_RSA unsigned rsa_num; +#endif #ifndef NO_MD2 unsigned char md2[MD2_DIGEST_LENGTH]; #endif diff --git a/crypto/openssl/crypto/evp/evp.h b/crypto/openssl/crypto/evp/evp.h index 3bf39e3..b7acdf3 100644 --- a/crypto/openssl/crypto/evp/evp.h +++ b/crypto/openssl/crypto/evp/evp.h @@ -501,7 +501,7 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, #define EVP_CIPHER_key_length(e) ((e)->key_len) #define EVP_CIPHER_iv_length(e) ((e)->iv_len) #define EVP_CIPHER_flags(e) ((e)->flags) -#define EVP_CIPHER_mode(e) ((e)->flags) & EVP_CIPH_MODE) +#define EVP_CIPHER_mode(e) (((e)->flags) & EVP_CIPH_MODE) #define EVP_CIPHER_CTX_cipher(e) ((e)->cipher) #define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid) diff --git a/crypto/openssl/crypto/rsa/rsa.h b/crypto/openssl/crypto/rsa/rsa.h index 1f91a49..179706a 100644 --- a/crypto/openssl/crypto/rsa/rsa.h +++ b/crypto/openssl/crypto/rsa/rsa.h @@ -102,9 +102,14 @@ typedef struct rsa_meth_st * compatibility this functionality is only enabled if the RSA_FLAG_SIGN_VER * option is set in 'flags'. */ - int (*rsa_sign)(int type, unsigned char *m, unsigned int m_len, + +/* changed m_len to m_length to avoid a conflict with a #define in + vxworks for m_len for the mbuf code. This only shows up in apps + that have USE_SOCKETS defined */ + + int (*rsa_sign)(int type, unsigned char *m, unsigned int m_length, unsigned char *sigret, unsigned int *siglen, RSA *rsa); - int (*rsa_verify)(int dtype, unsigned char *m, unsigned int m_len, + int (*rsa_verify)(int dtype, unsigned char *m, unsigned int m_length, unsigned char *sigbuf, unsigned int siglen, RSA *rsa); } RSA_METHOD; @@ -227,16 +232,16 @@ RSA *d2i_Netscape_RSA_2(RSA **a, unsigned char **pp, long length, int (*cb)()); /* The following 2 functions sign and verify a X509_SIG ASN1 object * inside PKCS#1 padded RSA encryption */ -int RSA_sign(int type, unsigned char *m, unsigned int m_len, +int RSA_sign(int type, unsigned char *m, unsigned int m_length, unsigned char *sigret, unsigned int *siglen, RSA *rsa); -int RSA_verify(int type, unsigned char *m, unsigned int m_len, +int RSA_verify(int type, unsigned char *m, unsigned int m_length, unsigned char *sigbuf, unsigned int siglen, RSA *rsa); /* The following 2 function sign and verify a ASN1_OCTET_STRING * object inside PKCS#1 padded RSA encryption */ -int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len, +int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_length, unsigned char *sigret, unsigned int *siglen, RSA *rsa); -int RSA_verify_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len, +int RSA_verify_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_length, unsigned char *sigbuf, unsigned int siglen, RSA *rsa); int RSA_blinding_on(RSA *rsa, BN_CTX *ctx); |