Fwd: [kde-solaris] Patches for kde-3.1-beta2 on Solaris 2.8/Forte C++ 6.x
Michael J. Bond
michaelbond3 at aol.com
Mon Oct 14 16:33:30 BST 2002
I'm responding to both David's (david at mandrakesoft.com) and Alex's
(zipzippy at sonic.net) comments here.
On Sat, 2002-10-12 at 16:16, zipzippy at sonic.net wrote:
> konsole/konsole/keytrans.cpp: if you're going to use casts could you
> please use "C++ style" / "template" casts?
Sure, though I was just changing existing casts, previously int, trying
to preserve the original style. I'm not even clear "unsigned long(...)"
works, having never tried the C++ style casts with a two word type,
hmm...
> kioslave/nfs/mount_xdr.c: okay.. on a side note I wonder if register
is
> really of any use here?
The register keyword is unlikely to have any effect at all there. Again,
was trying not to change the style, didn't want to offend anyone ;-).
> kcontrol/kfontinst/kfontinst/FontEngine.cpp: is this really necesary,
> maybe my eyes have gone out.. but are the casts necesary for strchr?
Unfortunately Solaris thinks strchr returns a const char *, so for those
cases that it had to be put into a non-const, I had to cast the const
away. Ugly, but only way I could get it to compile.
> As far as the libtool changes.. have they been run by the libtool
> developers yet?
I have not. The copy of libtool.m4.in that you have in kde didn't match
anything I could find in libtool, either release or CVS snapshot, so
figured it wouldn't do much good to submit any diffs from what KDE has
to them.
> You don't happen to have a testbox with solaris that I can play around
on
> w/ KDE do you? :)
Sadly no, sorry.
On Sun, 2002-10-13 at 04:11, david at mandrakesoft.com wrote:
> It must go to stdout, and without 'appname:' prefix. This is used by the caller
> shell script.
> The patch isn't for the current CVS version of the file anyway, stream.h is no more there.
>
> > libkonq/konq_popupmenu.cc (still.. pretty casts would be nice)
>
> Better use .data() than a cast anyway. But why doesn't the char* cast work
> on Solaris? That's either a Qt bug or a Sun compiler bug. This cast is advertised
> to work, in the Qt API. Please investigate.
Actually, Solaris didn't like the .data() either. The explicit casts
were the only thing that would work for me. Could quite well be a
compliler bug. I'm not sure if an explicit non-const cast would have
worked, never even thought to try, I tend towards const where possible.
>
> > kicker/applets/clock/clock.cpp: unsure if time.h is needed elsewhere,
> > perhaps this should be wrapped around an ifdef HAVE_TIME_H
>
> Err, we use it unconditionnally in many other places... Is time.h not available on Solaris?
Solaris does have time.h. The problem is that Solaris requires some
other header to be included before time.h and I was being lazy. I tried
ifdefing it originally, and since it compiled, I looked further to see
if it was perhaps no longer needed. I saw no use of any types or
functions that would require time.h, as far as I could tell, for any
platform.
> I committed kdirwatch_p.h, kdirlister.h.
> The kdelibs patch was truncated, please submit that one again
> (If possible after updating kdelibs again)
Sure, I've attached both the kdelibs changelog and diffs.
-------------- next part --------------
These changes are based on kdelibs-3.0.8 from kde-3.1-beta2.
One thing that kept coming up appears to be a bug in the Sun C++ compiler. It
gets confused when the 'class' keyword is used in front of the class name as
part of a variable declaration rather than just using the class name by itself.
In many cases it required a forward declaration of the class to get around.
This likely hasn't come up before with regards to Sun C++ as using the 'class'
keyword in other than just the class declaration or forward declarations is not
common practice.
admin/libtool.m4.in:
* Don't ever force undef sym checking when building libs. Forcing checking
for undefined symbols causes problems as Sun C++ leaves out Cstd and
Crun, for very good reasons, when building shared libs.
* The '-Qoption ld ' is not necessary with Sun C++ as CC will
automatically pass all -z options to ld. Using '-Qoption ld' has the
adverse effect of causing those flags to be passed out of order to
ld. What was happening is ld would incorrectly get:
-z allextract -z defaultextract <lib>
* There is still a problem with libtool in that it adds the convenience
archives twice when linking shared libraries such as libkdecore.so, once
from the whole_archive_flag_spec, once from deplibs. This causes multiply
defined symbols which by default causes the linker to fail. I've
temporarily gotten around this by adding the -z muldefs to shared library
linking when using Sun C++.
interfaces/ktexteditor/sessionconfiginterface.h:
* Using the 'class' keyword as part of typenames instead of providing
forward declarations confuses Sun C++. This caused the three variants
of sessionConfigInterface() to look to be the same to the compiler.
kabc/addresseelist.h:
* Removed spurious semicolon that causes Sun C++ to fail.
kate/part/kateviewinternal.h:
* Sun C++ doesn't allow private types to be accessed from a nested class.
kate/part/katedialogs.h:
* Using the 'class' keyword as part of typenames confuses Sun C++. In this
case it caused the compiler to not recognize QMap as a template.
kate/interfaces/document.h:
* Using the 'class' keyword as part of typenames instead of providing
forward declarations confuses Sun C++. This caused updateMenu() to
appear as a redeclaration.
kdecore/kallocator.cpp:
* Sun C++ doesn't allow casting from pointer to 32 bit scalar when
compiling for 64 bit target.
kdeui/kaccelmanager.cpp:
* Sun C++ doesn't allow private types to be accessed from a nested class.
kdeui/kmainwindow.cpp:
* For some reason Sun C++ didn't like the global static no_query_exit.
Moved it into KMWSessionManaged.
kdesu/client.cpp:
* Sun C++ doesn't allow casting from pointer to 32 bit scalar when
compiling for 64 bit target.
kdesu/kdesu_pty.cpp:
* Don't define _XOPEN_SOURCE for sun
khtml/ecma/kjs_window.h:
* Sun C++ doesn't allow private types to be accessed from a nested class.
khtml/rendering/bidi.cpp:
* Sun C++ requires inline methods be defined prior to invocation.
kio/kio/kdirlister.h:
* Sun C++ doesn't allow private types to be accessed from a nested class.
kio/kio/kdirwatch_p.h:
* Sun C++ doesn't allow private types to be accessed from a nested class.
kio/kio/kfilemetainfo.cpp:
* Sun C++ for some reason won't implicitly use the const char *() operator.
kio/kpasswdserver/kpasswdserver.h:
* Sun C++ doesn't allow private types to be accessed from a nested class.
kio/kssl/kopenssl.cc:
* Sun C++ requires that parameters maintain their link semantics, ie
extern "C". This required providing typedefs to all function pointers
within the extern "C" block to enforce the linkage semantics.
kjs/lookup.h:
* Removed spurious semicolon that causes Sun C++ to fail.
kjs/operations.cpp:
* Need additional include for Sun C++ for isinf declaration.
kparts/componentfactory.h:
* Sun C++ for some reason won't implicitly use the const char *() operator.
-------------- next part --------------
--- kdelibs-3.0.8/kio/kio/kdirwatch_p.h.orig 2002-10-08 10:10:00.591001000 -0400
+++ kdelibs-3.0.8/kio/kio/kdirwatch_p.h 2002-10-08 16:44:33.790005000 -0400
@@ -18,11 +18,11 @@
{
Q_OBJECT
+public:
enum entryStatus { Normal = 0, NonExistent };
enum entryMode { UnknownMode = 0, StatMode, DNotifyMode, FAMMode };
enum { NoChange=0, Changed=1, Created=2, Deleted=4 };
-public:
struct Client {
KDirWatch* instance;
int count;
--- kdelibs-3.0.8/kio/kio/kdirlister.h.orig 2002-10-08 10:20:43.067773000 -0400
+++ kdelibs-3.0.8/kio/kio/kdirlister.h 2002-10-08 16:44:33.800003000 -0400
@@ -53,6 +53,8 @@
*/
class KDirLister : public QObject
{
+ class KDirListerPrivate;
+ friend class KDirListerPrivate;
friend class KDirListerCache;
Q_OBJECT
@@ -408,6 +410,10 @@
void speed( int bytes_per_second );
protected:
+ enum Changes {
+ NONE=0, NAME_FILTER=1, MIME_FILTER=2, DOT_FILES=4, DIR_ONLY_MODE=8
+ };
+
/**
* Called for every new item before emitting @ref newItems().
* @return true if the item is "ok".
@@ -463,11 +469,6 @@
virtual void emitItems();
virtual void emitDeleteItem( KFileItem *item );
- enum Changes {
- NONE=0, NAME_FILTER=1, MIME_FILTER=2, DOT_FILES=4, DIR_ONLY_MODE=8
- };
-
- class KDirListerPrivate;
KDirListerPrivate *d;
};
--- kdelibs-3.0.8/kio/kio/kfilemetainfo.cpp.orig 2002-10-08 10:26:00.211026000 -0400
+++ kdelibs-3.0.8/kio/kio/kfilemetainfo.cpp 2002-10-08 16:44:33.820001000 -0400
@@ -870,7 +870,7 @@
}
p = KParts::ComponentFactory::createInstanceFromService<KFilePlugin>
- ( service, this, mimeType.local8Bit() );
+ ( service, this, (const char *) mimeType.local8Bit() );
if (!p)
{
--- kdelibs-3.0.8/kio/kssl/kopenssl.cc.orig 2002-10-09 13:38:23.411635000 -0400
+++ kdelibs-3.0.8/kio/kssl/kopenssl.cc 2002-10-09 14:00:34.266012000 -0400
@@ -30,132 +30,256 @@
extern "C" {
#ifdef HAVE_SSL
-static int (*K_SSL_connect) (SSL *) = NULL;
-static int (*K_SSL_accept) (SSL *) = NULL;
-static int (*K_SSL_read) (SSL *, void *, int) = NULL;
-static int (*K_SSL_write) (SSL *, const void *, int) = NULL;
-static SSL *(*K_SSL_new) (SSL_CTX *) = NULL;
-static void (*K_SSL_free) (SSL *) = NULL;
-static int (*K_SSL_shutdown) (SSL *) = NULL;
-static SSL_CTX *(*K_SSL_CTX_new)(SSL_METHOD *) = NULL;
-static void (*K_SSL_CTX_free) (SSL_CTX *) = NULL;
-static int (*K_SSL_set_fd) (SSL *, int) = NULL;
-static int (*K_SSL_pending) (SSL *) = NULL;
-static int (*K_SSL_peek) (SSL *, void *, int) = NULL;
-static int (*K_SSL_CTX_set_cipher_list)(SSL_CTX *, const char *) = NULL;
-static void (*K_SSL_CTX_set_verify)(SSL_CTX *, int,
- int (*)(int, X509_STORE_CTX *)) = NULL;
-static int (*K_SSL_use_certificate)(SSL *, X509 *) = NULL;
-static SSL_CIPHER *(*K_SSL_get_current_cipher)(SSL *) = NULL;
-static long (*K_SSL_ctrl) (SSL *,int, long, char *) = NULL;
-static int (*K_RAND_egd) (const char *) = NULL;
-static const char* (*K_RAND_file_name) (char *, size_t) = NULL;
-static int (*K_RAND_load_file) (const char *, long) = NULL;
-static int (*K_RAND_write_file) (const char *) = NULL;
-static SSL_METHOD * (*K_TLSv1_client_method) () = NULL;
-static SSL_METHOD * (*K_SSLv2_client_method) () = NULL;
-static SSL_METHOD * (*K_SSLv3_client_method) () = NULL;
-static SSL_METHOD * (*K_SSLv23_client_method) () = NULL;
-static X509 * (*K_SSL_get_peer_certificate) (SSL *) = NULL;
-static int (*K_SSL_CIPHER_get_bits) (SSL_CIPHER *,int *) = NULL;
-static char * (*K_SSL_CIPHER_get_version) (SSL_CIPHER *) = NULL;
-static const char * (*K_SSL_CIPHER_get_name) (SSL_CIPHER *) = NULL;
-static char * (*K_SSL_CIPHER_description) (SSL_CIPHER *, char *, int) = NULL;
-static X509 * (*K_d2i_X509) (X509 **,unsigned char **,long) = NULL;
-static int (*K_i2d_X509) (X509 *,unsigned char **) = NULL;
-static int (*K_X509_cmp) (X509 *, X509 *) = NULL;
-static void (*K_X509_STORE_CTX_free) (X509_STORE_CTX *) = NULL;
-static int (*K_X509_verify_cert) (X509_STORE_CTX *) = NULL;
-static X509_STORE_CTX *(*K_X509_STORE_CTX_new) (void) = NULL;
-static void (*K_X509_STORE_free) (X509_STORE *) = NULL;
-static X509_STORE *(*K_X509_STORE_new) (void) = NULL;
-static void (*K_X509_free) (X509 *) = NULL;
-static char *(*K_X509_NAME_oneline) (X509_NAME *,char *,int) = NULL;
-static X509_NAME *(*K_X509_get_subject_name) (X509 *) = NULL;
-static X509_NAME *(*K_X509_get_issuer_name) (X509 *) = NULL;
-static X509_LOOKUP *(*K_X509_STORE_add_lookup) (X509_STORE *, X509_LOOKUP_METHOD *) = NULL;
-static X509_LOOKUP_METHOD *(*K_X509_LOOKUP_file)(void) = NULL;
-static void (*K_X509_LOOKUP_free)(X509_LOOKUP *) = NULL;
-static int (*K_X509_LOOKUP_ctrl)(X509_LOOKUP *, int, const char *, long, char **) = NULL;
-static void (*K_X509_STORE_CTX_init)(X509_STORE_CTX *, X509_STORE *, X509 *, STACK_OF(X509) *) = NULL;
-static void (*K_CRYPTO_free) (void *) = NULL;
-static X509* (*K_X509_dup) (X509 *) = NULL;
-static BIO* (*K_BIO_new_fp) (FILE *, int) = NULL;
-static int (*K_BIO_free) (BIO *) = NULL;
-static int (*K_PEM_ASN1_write_bio) (int (*)(),const char *,BIO *,char *,
- const EVP_CIPHER *,unsigned char *,int ,
- pem_password_cb *, void *) = NULL;
-static ASN1_METHOD* (*K_X509_asn1_meth) (void) = NULL;
-static int (*K_ASN1_i2d_fp)(int (*)(),FILE *,unsigned char *) = NULL;
-static int (*K_i2d_ASN1_HEADER)(ASN1_HEADER *, unsigned char **) = NULL;
-static int (*K_X509_print_fp) (FILE *, X509*) = NULL;
-static int (*K_i2d_PKCS12) (PKCS12*, unsigned char**) = NULL;
-static int (*K_i2d_PKCS12_fp) (FILE *, PKCS12*) = NULL;
-static int (*K_PKCS12_newpass) (PKCS12*, char*, char*) = NULL;
-static PKCS12* (*K_d2i_PKCS12_fp) (FILE*, PKCS12**) = NULL;
-static PKCS12* (*K_PKCS12_new) (void) = NULL;
-static void (*K_PKCS12_free) (PKCS12 *) = NULL;
-static int (*K_PKCS12_parse) (PKCS12*, const char *, EVP_PKEY**,
- X509**, STACK_OF(X509)**) = NULL;
-static void (*K_EVP_PKEY_free) (EVP_PKEY *) = NULL;
-static EVP_PKEY* (*K_EVP_PKEY_new) () = NULL;
-static void (*K_X509_REQ_free) (X509_REQ *) = NULL;
-static X509_REQ* (*K_X509_REQ_new) () = NULL;
-static int (*K_SSL_CTX_use_PrivateKey) (SSL_CTX*, EVP_PKEY*) = NULL;
-static int (*K_SSL_CTX_use_certificate) (SSL_CTX*, X509*) = NULL;
-static int (*K_SSL_get_error) (SSL*, int) = NULL;
-static STACK_OF(X509)* (*K_SSL_get_peer_cert_chain) (SSL*) = NULL;
-static void (*K_X509_STORE_CTX_set_chain) (X509_STORE_CTX *, STACK_OF(X509)*) = NULL;
-static void (*K_X509_STORE_CTX_set_purpose) (X509_STORE_CTX *, int) = NULL;
-static void (*K_sk_free) (STACK*) = NULL;
-static int (*K_sk_num) (STACK*) = NULL;
-static char* (*K_sk_pop) (STACK*) = NULL;
-static char* (*K_sk_value) (STACK*, int) = NULL;
-static STACK* (*K_sk_new) (int (*)()) = NULL;
-static int (*K_sk_push) (STACK*, char*) = NULL;
-static STACK* (*K_sk_dup) (STACK *) = NULL;
-static char * (*K_i2s_ASN1_INTEGER) (X509V3_EXT_METHOD *, ASN1_INTEGER *) =NULL;
-static ASN1_INTEGER * (*K_X509_get_serialNumber) (X509 *) = NULL;
-static EVP_PKEY *(*K_X509_get_pubkey)(X509 *) = NULL;
-static int (*K_i2d_PublicKey)(EVP_PKEY *, unsigned char **) = NULL;
-static int (*K_X509_check_private_key)(X509 *, EVP_PKEY *) = NULL;
-static char * (*K_BN_bn2hex)(const BIGNUM *) = NULL;
-static int (*K_X509_digest)(const X509 *,const EVP_MD *, unsigned char *, unsigned int *) = NULL;
-static EVP_MD* (*K_EVP_md5)() = NULL;
-static void (*K_ASN1_INTEGER_free)(ASN1_INTEGER *) = NULL;
-static int (*K_OBJ_obj2nid)(ASN1_OBJECT *) = NULL;
-static const char * (*K_OBJ_nid2ln)(int) = NULL;
-static int (*K_X509_get_ext_count)(X509*) = NULL;
-static int (*K_X509_get_ext_by_NID)(X509*, int, int) = NULL;
-static int (*K_X509_get_ext_by_OBJ)(X509*,ASN1_OBJECT*,int) = NULL;
-static X509_EXTENSION *(*K_X509_get_ext)(X509*, int loc) = NULL;
-static X509_EXTENSION *(*K_X509_delete_ext)(X509*, int) = NULL;
-static int (*K_X509_add_ext)(X509*, X509_EXTENSION*, int) = NULL;
-static void *(*K_X509_get_ext_d2i)(X509*, int, int*, int*) = NULL;
-static char *(*K_i2s_ASN1_OCTET_STRING)(X509V3_EXT_METHOD*, ASN1_OCTET_STRING*) = NULL;
-static int (*K_ASN1_BIT_STRING_get_bit)(ASN1_BIT_STRING*, int) = NULL;
-static PKCS7 *(*K_PKCS7_new)() = NULL;
-static void (*K_PKCS7_free)(PKCS7*) = NULL;
-static void (*K_PKCS7_content_free)(PKCS7*) = NULL;
-static int (*K_i2d_PKCS7)(PKCS7*, unsigned char**) = NULL;
-static PKCS7 *(*K_d2i_PKCS7)(PKCS7**, unsigned char**,long) = NULL;
-static int (*K_i2d_PKCS7_fp)(FILE*,PKCS7*) = NULL;
-static PKCS7* (*K_d2i_PKCS7_fp)(FILE*,PKCS7**) = NULL;
-static PKCS7* (*K_PKCS7_dup)(PKCS7*) = NULL;
-static STACK_OF(X509_NAME) *(*K_SSL_load_client_CA_file)(const char*) = NULL;
-static STACK_OF(X509_INFO) *(*K_PEM_X509_INFO_read)(FILE*, STACK_OF(X509_INFO)*, pem_password_cb*, void*) = NULL;
-static char *(*K_ASN1_d2i_fp)(char *(*)(),char *(*)(),FILE*,unsigned char**) = NULL;
-static X509 *(*K_X509_new)() = NULL;
-static int (*K_X509_PURPOSE_get_count)() = NULL;
-static int (*K_X509_PURPOSE_get_id)(X509_PURPOSE *) = NULL;
-static int (*K_X509_check_purpose)(X509*,int,int) = NULL;
-static X509_PURPOSE* (*K_X509_PURPOSE_get0)(int) = NULL;
-static int (*K_EVP_PKEY_assign)(EVP_PKEY*, int, char*) = NULL;
-static int (*K_X509_REQ_set_pubkey)(X509_REQ*, EVP_PKEY*) = NULL;
-static RSA *(*K_RSA_generate_key)(int, unsigned long, void (*)(int,int,void *), void *) = NULL;
-static int (*K_i2d_X509_REQ_fp)(FILE*, X509_REQ*) = NULL;
-static void (*K_ERR_clear_error)() = NULL;
-static void (*K_ERR_print_errors_fp)(FILE*) = NULL;
+typedef int (*K_int_func)();
+typedef char *(*K_str_func)();
+typedef int (*K_SSL_CTX_set_verify_cb)(int, X509_STORE_CTX *);
+typedef void (*K_RSA_generate_key_cb)(int,int,void *);
+
+typedef int (*K_SSL_connect_func) (SSL *);
+typedef int (*K_SSL_accept_func) (SSL *);
+typedef int (*K_SSL_read_func) (SSL *, void *, int);
+typedef int (*K_SSL_write_func) (SSL *, const void *, int);
+typedef SSL *(*K_SSL_new_func) (SSL_CTX *);
+typedef void (*K_SSL_free_func) (SSL *);
+typedef int (*K_SSL_shutdown_func) (SSL *);
+typedef SSL_CTX *(*K_SSL_CTX_new_func)(SSL_METHOD *);
+typedef void (*K_SSL_CTX_free_func) (SSL_CTX *);
+typedef int (*K_SSL_set_fd_func) (SSL *, int);
+typedef int (*K_SSL_pending_func) (SSL *);
+typedef int (*K_SSL_peek_func) (SSL *, void *, int);
+typedef int (*K_SSL_CTX_set_cipher_list_func)(SSL_CTX *, const char *);
+typedef void (*K_SSL_CTX_set_verify_func)(SSL_CTX *, int, K_SSL_CTX_set_verify_cb);
+typedef int (*K_SSL_use_certificate_func)(SSL *, X509 *);
+typedef SSL_CIPHER *(*K_SSL_get_current_cipher_func)(SSL *);
+typedef long (*K_SSL_ctrl_func) (SSL *,int, long, char *);
+typedef int (*K_RAND_egd_func) (const char *);
+typedef const char* (*K_RAND_file_name_func) (char *, size_t);
+typedef int (*K_RAND_load_file_func) (const char *, long);
+typedef int (*K_RAND_write_file_func) (const char *);
+typedef SSL_METHOD * (*K_TLSv1_client_method_func) ();
+typedef SSL_METHOD * (*K_SSLv2_client_method_func) ();
+typedef SSL_METHOD * (*K_SSLv3_client_method_func) ();
+typedef SSL_METHOD * (*K_SSLv23_client_method_func) ();
+typedef X509 * (*K_SSL_get_peer_certificate_func) (SSL *);
+typedef int (*K_SSL_CIPHER_get_bits_func) (SSL_CIPHER *,int *);
+typedef char * (*K_SSL_CIPHER_get_version_func) (SSL_CIPHER *);
+typedef const char * (*K_SSL_CIPHER_get_name_func) (SSL_CIPHER *);
+typedef char * (*K_SSL_CIPHER_description_func) (SSL_CIPHER *, char *, int);
+typedef X509 * (*K_d2i_X509_func) (X509 **,unsigned char **,long);
+typedef int (*K_i2d_X509_func) (X509 *,unsigned char **);
+typedef int (*K_X509_cmp_func) (X509 *, X509 *);
+typedef void (*K_X509_STORE_CTX_free_func) (X509_STORE_CTX *);
+typedef int (*K_X509_verify_cert_func) (X509_STORE_CTX *);
+typedef X509_STORE_CTX *(*K_X509_STORE_CTX_new_func) (void);
+typedef void (*K_X509_STORE_free_func) (X509_STORE *);
+typedef X509_STORE *(*K_X509_STORE_new_func) (void);
+typedef void (*K_X509_free_func) (X509 *);
+typedef char *(*K_X509_NAME_oneline_func) (X509_NAME *,char *,int);
+typedef X509_NAME *(*K_X509_get_subject_name_func) (X509 *);
+typedef X509_NAME *(*K_X509_get_issuer_name_func) (X509 *);
+typedef X509_LOOKUP *(*K_X509_STORE_add_lookup_func) (X509_STORE *, X509_LOOKUP_METHOD *);
+typedef X509_LOOKUP_METHOD *(*K_X509_LOOKUP_file_func)(void);
+typedef void (*K_X509_LOOKUP_free_func)(X509_LOOKUP *);
+typedef int (*K_X509_LOOKUP_ctrl_func)(X509_LOOKUP *, int, const char *, long, char **);
+typedef void (*K_X509_STORE_CTX_init_func)(X509_STORE_CTX *, X509_STORE *, X509 *, STACK_OF(X509) *);
+typedef void (*K_CRYPTO_free_func) (void *);
+typedef X509* (*K_X509_dup_func) (X509 *);
+typedef BIO* (*K_BIO_new_fp_func) (FILE *, int);
+typedef int (*K_BIO_free_func) (BIO *);
+typedef int (*K_PEM_ASN1_write_bio_func) (K_int_func,const char *,BIO *,char *, const EVP_CIPHER *,unsigned char *,int , pem_password_cb *, void *);
+typedef ASN1_METHOD* (*K_X509_asn1_meth_func) (void);
+typedef int (*K_ASN1_i2d_fp_func)(K_int_func,FILE *,unsigned char *);
+typedef int (*K_i2d_ASN1_HEADER_func)(ASN1_HEADER *, unsigned char **);
+typedef int (*K_X509_print_fp_func) (FILE *, X509*);
+typedef int (*K_i2d_PKCS12_func) (PKCS12*, unsigned char**);
+typedef int (*K_i2d_PKCS12_fp_func) (FILE *, PKCS12*);
+typedef int (*K_PKCS12_newpass_func) (PKCS12*, char*, char*);
+typedef PKCS12* (*K_d2i_PKCS12_fp_func) (FILE*, PKCS12**);
+typedef PKCS12* (*K_PKCS12_new_func) (void);
+typedef void (*K_PKCS12_free_func) (PKCS12 *);
+typedef int (*K_PKCS12_parse_func) (PKCS12*, const char *, EVP_PKEY**, X509**, STACK_OF(X509)**);
+typedef void (*K_EVP_PKEY_free_func) (EVP_PKEY *);
+typedef EVP_PKEY* (*K_EVP_PKEY_new_func) ();
+typedef void (*K_X509_REQ_free_func) (X509_REQ *);
+typedef X509_REQ* (*K_X509_REQ_new_func) ();
+typedef int (*K_SSL_CTX_use_PrivateKey_func) (SSL_CTX*, EVP_PKEY*);
+typedef int (*K_SSL_CTX_use_certificate_func) (SSL_CTX*, X509*);
+typedef int (*K_SSL_get_error_func) (SSL*, int);
+typedef STACK_OF(X509)* (*K_SSL_get_peer_cert_chain_func) (SSL*);
+typedef void (*K_X509_STORE_CTX_set_chain_func) (X509_STORE_CTX *, STACK_OF(X509)*);
+typedef void (*K_X509_STORE_CTX_set_purpose_func) (X509_STORE_CTX *, int);
+typedef void (*K_sk_free_func) (STACK*);
+typedef int (*K_sk_num_func) (STACK*);
+typedef char* (*K_sk_pop_func) (STACK*);
+typedef char* (*K_sk_value_func) (STACK*, int);
+typedef STACK* (*K_sk_new_func) (K_int_func);
+typedef int (*K_sk_push_func) (STACK*, char*);
+typedef STACK* (*K_sk_dup_func) (STACK *);
+typedef char * (*K_i2s_ASN1_INTEGER_func) (X509V3_EXT_METHOD *, ASN1_INTEGER *);
+typedef ASN1_INTEGER * (*K_X509_get_serialNumber_func) (X509 *);
+typedef EVP_PKEY *(*K_X509_get_pubkey_func)(X509 *);
+typedef int (*K_i2d_PublicKey_func)(EVP_PKEY *, unsigned char **);
+typedef int (*K_X509_check_private_key_func)(X509 *, EVP_PKEY *);
+typedef char * (*K_BN_bn2hex_func)(const BIGNUM *);
+typedef int (*K_X509_digest_func)(const X509 *,const EVP_MD *, unsigned char *, unsigned int *);
+typedef EVP_MD* (*K_EVP_md5_func)();
+typedef void (*K_ASN1_INTEGER_free_func)(ASN1_INTEGER *);
+typedef int (*K_OBJ_obj2nid_func)(ASN1_OBJECT *);
+typedef const char * (*K_OBJ_nid2ln_func)(int);
+typedef int (*K_X509_get_ext_count_func)(X509*);
+typedef int (*K_X509_get_ext_by_NID_func)(X509*, int, int);
+typedef int (*K_X509_get_ext_by_OBJ_func)(X509*,ASN1_OBJECT*,int);
+typedef X509_EXTENSION *(*K_X509_get_ext_func)(X509*, int loc);
+typedef X509_EXTENSION *(*K_X509_delete_ext_func)(X509*, int);
+typedef int (*K_X509_add_ext_func)(X509*, X509_EXTENSION*, int);
+typedef void *(*K_X509_get_ext_d2i_func)(X509*, int, int*, int*);
+typedef char *(*K_i2s_ASN1_OCTET_STRING_func)(X509V3_EXT_METHOD*, ASN1_OCTET_STRING*);
+typedef int (*K_ASN1_BIT_STRING_get_bit_func)(ASN1_BIT_STRING*, int);
+typedef PKCS7 *(*K_PKCS7_new_func)();
+typedef void (*K_PKCS7_free_func)(PKCS7*);
+typedef void (*K_PKCS7_content_free_func)(PKCS7*);
+typedef int (*K_i2d_PKCS7_func)(PKCS7*, unsigned char**);
+typedef PKCS7 *(*K_d2i_PKCS7_func)(PKCS7**, unsigned char**,long);
+typedef int (*K_i2d_PKCS7_fp_func)(FILE*,PKCS7*);
+typedef PKCS7* (*K_d2i_PKCS7_fp_func)(FILE*,PKCS7**);
+typedef PKCS7* (*K_PKCS7_dup_func)(PKCS7*);
+typedef STACK_OF(X509_NAME) *(*K_SSL_load_client_CA_file_func)(const char*);
+typedef STACK_OF(X509_INFO) *(*K_PEM_X509_INFO_read_func)(FILE*, STACK_OF(X509_INFO)*, pem_password_cb*, void*);
+typedef char *(*K_ASN1_d2i_fp_func)(K_str_func,K_str_func,FILE*,unsigned char**);
+typedef X509 *(*K_X509_new_func)();
+typedef int (*K_X509_PURPOSE_get_count_func)();
+typedef int (*K_X509_PURPOSE_get_id_func)(X509_PURPOSE *);
+typedef int (*K_X509_check_purpose_func)(X509*,int,int);
+typedef X509_PURPOSE* (*K_X509_PURPOSE_get0_func)(int);
+typedef int (*K_EVP_PKEY_assign_func)(EVP_PKEY*, int, char*);
+typedef int (*K_X509_REQ_set_pubkey_func)(X509_REQ*, EVP_PKEY*);
+typedef RSA *(*K_RSA_generate_key_func)(int, unsigned long, K_RSA_generate_key_cb, void *);
+typedef int (*K_i2d_X509_REQ_fp_func)(FILE*, X509_REQ*);
+typedef void (*K_ERR_clear_error_func)();
+typedef void (*K_ERR_print_errors_fp_func)(FILE*);
+
+static K_SSL_connect_func K_SSL_connect = NULL;
+static K_SSL_accept_func K_SSL_accept = NULL;
+static K_SSL_read_func K_SSL_read = NULL;
+static K_SSL_write_func K_SSL_write = NULL;
+static K_SSL_new_func K_SSL_new = NULL;
+static K_SSL_free_func K_SSL_free = NULL;
+static K_SSL_shutdown_func K_SSL_shutdown = NULL;
+static K_SSL_CTX_new_func K_SSL_CTX_new = NULL;
+static K_SSL_CTX_free_func K_SSL_CTX_free = NULL;
+static K_SSL_set_fd_func K_SSL_set_fd = NULL;
+static K_SSL_pending_func K_SSL_pending = NULL;
+static K_SSL_peek_func K_SSL_peek = NULL;
+static K_SSL_CTX_set_cipher_list_func K_SSL_CTX_set_cipher_list = NULL;
+static K_SSL_CTX_set_verify_func K_SSL_CTX_set_verify = NULL;
+static K_SSL_use_certificate_func K_SSL_use_certificate = NULL;
+static K_SSL_get_current_cipher_func K_SSL_get_current_cipher = NULL;
+static K_SSL_ctrl_func K_SSL_ctrl = NULL;
+static K_RAND_egd_func K_RAND_egd = NULL;
+static K_RAND_file_name_func K_RAND_file_name = NULL;
+static K_RAND_load_file_func K_RAND_load_file = NULL;
+static K_RAND_write_file_func K_RAND_write_file = NULL;
+static K_TLSv1_client_method_func K_TLSv1_client_method = NULL;
+static K_SSLv2_client_method_func K_SSLv2_client_method = NULL;
+static K_SSLv3_client_method_func K_SSLv3_client_method = NULL;
+static K_SSLv23_client_method_func K_SSLv23_client_method = NULL;
+static K_SSL_get_peer_certificate_func K_SSL_get_peer_certificate = NULL;
+static K_SSL_CIPHER_get_bits_func K_SSL_CIPHER_get_bits = NULL;
+static K_SSL_CIPHER_get_version_func K_SSL_CIPHER_get_version = NULL;
+static K_SSL_CIPHER_get_name_func K_SSL_CIPHER_get_name = NULL;
+static K_SSL_CIPHER_description_func K_SSL_CIPHER_description = NULL;
+static K_d2i_X509_func K_d2i_X509 = NULL;
+static K_i2d_X509_func K_i2d_X509 = NULL;
+static K_X509_cmp_func K_X509_cmp = NULL;
+static K_X509_STORE_CTX_free_func K_X509_STORE_CTX_free = NULL;
+static K_X509_verify_cert_func K_X509_verify_cert = NULL;
+static K_X509_STORE_CTX_new_func K_X509_STORE_CTX_new = NULL;
+static K_X509_STORE_free_func K_X509_STORE_free = NULL;
+static K_X509_STORE_new_func K_X509_STORE_new = NULL;
+static K_X509_free_func K_X509_free = NULL;
+static K_X509_NAME_oneline_func K_X509_NAME_oneline = NULL;
+static K_X509_get_subject_name_func K_X509_get_subject_name = NULL;
+static K_X509_get_issuer_name_func K_X509_get_issuer_name = NULL;
+static K_X509_STORE_add_lookup_func K_X509_STORE_add_lookup = NULL;
+static K_X509_LOOKUP_file_func K_X509_LOOKUP_file = NULL;
+static K_X509_LOOKUP_free_func K_X509_LOOKUP_free = NULL;
+static K_X509_LOOKUP_ctrl_func K_X509_LOOKUP_ctrl = NULL;
+static K_X509_STORE_CTX_init_func K_X509_STORE_CTX_init = NULL;
+static K_CRYPTO_free_func K_CRYPTO_free = NULL;
+static K_X509_dup_func K_X509_dup = NULL;
+static K_BIO_new_fp_func K_BIO_new_fp = NULL;
+static K_BIO_free_func K_BIO_free = NULL;
+static K_PEM_ASN1_write_bio_func K_PEM_ASN1_write_bio = NULL;
+static K_X509_asn1_meth_func K_X509_asn1_meth = NULL;
+static K_ASN1_i2d_fp_func K_ASN1_i2d_fp = NULL;
+static K_i2d_ASN1_HEADER_func K_i2d_ASN1_HEADER = NULL;
+static K_X509_print_fp_func K_X509_print_fp = NULL;
+static K_i2d_PKCS12_func K_i2d_PKCS12 = NULL;
+static K_i2d_PKCS12_fp_func K_i2d_PKCS12_fp = NULL;
+static K_PKCS12_newpass_func K_PKCS12_newpass = NULL;
+static K_d2i_PKCS12_fp_func K_d2i_PKCS12_fp = NULL;
+static K_PKCS12_new_func K_PKCS12_new = NULL;
+static K_PKCS12_free_func K_PKCS12_free = NULL;
+static K_PKCS12_parse_func K_PKCS12_parse = NULL;
+static K_EVP_PKEY_free_func K_EVP_PKEY_free = NULL;
+static K_EVP_PKEY_new_func K_EVP_PKEY_new = NULL;
+static K_X509_REQ_free_func K_X509_REQ_free = NULL;
+static K_X509_REQ_new_func K_X509_REQ_new = NULL;
+static K_SSL_CTX_use_PrivateKey_func K_SSL_CTX_use_PrivateKey = NULL;
+static K_SSL_CTX_use_certificate_func K_SSL_CTX_use_certificate = NULL;
+static K_SSL_get_error_func K_SSL_get_error = NULL;
+static K_SSL_get_peer_cert_chain_func K_SSL_get_peer_cert_chain = NULL;
+static K_X509_STORE_CTX_set_chain_func K_X509_STORE_CTX_set_chain = NULL;
+static K_X509_STORE_CTX_set_purpose_func K_X509_STORE_CTX_set_purpose = NULL;
+static K_sk_free_func K_sk_free = NULL;
+static K_sk_num_func K_sk_num = NULL;
+static K_sk_pop_func K_sk_pop = NULL;
+static K_sk_value_func K_sk_value = NULL;
+static K_sk_new_func K_sk_new = NULL;
+static K_sk_push_func K_sk_push = NULL;
+static K_sk_dup_func K_sk_dup = NULL;
+static K_i2s_ASN1_INTEGER_func K_i2s_ASN1_INTEGER = NULL;
+static K_X509_get_serialNumber_func K_X509_get_serialNumber = NULL;
+static K_X509_get_pubkey_func K_X509_get_pubkey = NULL;
+static K_i2d_PublicKey_func K_i2d_PublicKey = NULL;
+static K_X509_check_private_key_func K_X509_check_private_key = NULL;
+static K_BN_bn2hex_func K_BN_bn2hex = NULL;
+static K_X509_digest_func K_X509_digest = NULL;
+static K_EVP_md5_func K_EVP_md5 = NULL;
+static K_ASN1_INTEGER_free_func K_ASN1_INTEGER_free = NULL;
+static K_OBJ_obj2nid_func K_OBJ_obj2nid = NULL;
+static K_OBJ_nid2ln_func K_OBJ_nid2ln = NULL;
+static K_X509_get_ext_count_func K_X509_get_ext_count = NULL;
+static K_X509_get_ext_by_NID_func K_X509_get_ext_by_NID = NULL;
+static K_X509_get_ext_by_OBJ_func K_X509_get_ext_by_OBJ = NULL;
+static K_X509_get_ext_func K_X509_get_ext = NULL;
+static K_X509_delete_ext_func K_X509_delete_ext = NULL;
+static K_X509_add_ext_func K_X509_add_ext = NULL;
+static K_X509_get_ext_d2i_func K_X509_get_ext_d2i = NULL;
+static K_i2s_ASN1_OCTET_STRING_func K_i2s_ASN1_OCTET_STRING = NULL;
+static K_ASN1_BIT_STRING_get_bit_func K_ASN1_BIT_STRING_get_bit = NULL;
+static K_PKCS7_new_func K_PKCS7_new = NULL;
+static K_PKCS7_free_func K_PKCS7_free = NULL;
+static K_PKCS7_content_free_func K_PKCS7_content_free = NULL;
+static K_i2d_PKCS7_func K_i2d_PKCS7 = NULL;
+static K_d2i_PKCS7_func K_d2i_PKCS7 = NULL;
+static K_i2d_PKCS7_fp_func K_i2d_PKCS7_fp = NULL;
+static K_d2i_PKCS7_fp_func K_d2i_PKCS7_fp = NULL;
+static K_PKCS7_dup_func K_PKCS7_dup = NULL;
+static K_SSL_load_client_CA_file_func K_SSL_load_client_CA_file = NULL;
+static K_PEM_X509_INFO_read_func K_PEM_X509_INFO_read = NULL;
+static K_ASN1_d2i_fp_func K_ASN1_d2i_fp = NULL;
+static K_X509_new_func K_X509_new = NULL;
+static K_X509_PURPOSE_get_count_func K_X509_PURPOSE_get_count = NULL;
+static K_X509_PURPOSE_get_id_func K_X509_PURPOSE_get_id = NULL;
+static K_X509_check_purpose_func K_X509_check_purpose = NULL;
+static K_X509_PURPOSE_get0_func K_X509_PURPOSE_get0 = NULL;
+static K_EVP_PKEY_assign_func K_EVP_PKEY_assign = NULL;
+static K_X509_REQ_set_pubkey_func K_X509_REQ_set_pubkey = NULL;
+static K_RSA_generate_key_func K_RSA_generate_key = NULL;
+static K_i2d_X509_REQ_fp_func K_i2d_X509_REQ_fp = NULL;
+static K_ERR_clear_error_func K_ERR_clear_error = NULL;
+static K_ERR_print_errors_fp_func K_ERR_print_errors_fp = NULL;
#endif
};
@@ -315,98 +439,97 @@
if (_cryptoLib) {
#ifdef HAVE_SSL
- K_X509_free = (void (*) (X509 *)) _cryptoLib->symbol("X509_free");
- K_RAND_egd = (int (*)(const char *)) _cryptoLib->symbol("RAND_egd");
- K_RAND_load_file = (int (*)(const char *, long)) _cryptoLib->symbol("RAND_load_file");
- K_RAND_file_name = (const char* (*)(char *, size_t)) _cryptoLib->symbol("RAND_file_name");
- K_RAND_write_file = (int (*)(const char *)) _cryptoLib->symbol("RAND_write_file");
- K_CRYPTO_free = (void (*) (void *)) _cryptoLib->symbol("CRYPTO_free");
- K_d2i_X509 = (X509 * (*)(X509 **,unsigned char **,long)) _cryptoLib->symbol("d2i_X509");
- K_i2d_X509 = (int (*)(X509 *,unsigned char **)) _cryptoLib->symbol("i2d_X509");
- K_X509_cmp = (int (*)(X509 *, X509 *)) _cryptoLib->symbol("X509_cmp");
- K_X509_STORE_CTX_new = (X509_STORE_CTX * (*) (void)) _cryptoLib->symbol("X509_STORE_CTX_new");
- K_X509_STORE_CTX_free = (void (*) (X509_STORE_CTX *)) _cryptoLib->symbol("X509_STORE_CTX_free");
- K_X509_verify_cert = (int (*) (X509_STORE_CTX *)) _cryptoLib->symbol("X509_verify_cert");
- K_X509_STORE_new = (X509_STORE * (*) (void)) _cryptoLib->symbol("X509_STORE_new");
- K_X509_STORE_free = (void (*) (X509_STORE *)) _cryptoLib->symbol("X509_STORE_free");
- K_X509_NAME_oneline = (char * (*) (X509_NAME *,char *,int)) _cryptoLib->symbol("X509_NAME_oneline");
- K_X509_get_subject_name = (X509_NAME * (*) (X509 *)) _cryptoLib->symbol("X509_get_subject_name");
- K_X509_get_issuer_name = (X509_NAME * (*) (X509 *)) _cryptoLib->symbol("X509_get_issuer_name");
- K_X509_STORE_add_lookup = (X509_LOOKUP *(*) (X509_STORE *, X509_LOOKUP_METHOD *)) _cryptoLib->symbol("X509_STORE_add_lookup");
- K_X509_LOOKUP_file = (X509_LOOKUP_METHOD *(*)(void)) _cryptoLib->symbol("X509_LOOKUP_file");
- K_X509_LOOKUP_free = (void (*)(X509_LOOKUP *)) _cryptoLib->symbol("X509_LOOKUP_free");
- K_X509_LOOKUP_ctrl = (int (*)(X509_LOOKUP *, int, const char *, long, char **)) _cryptoLib->symbol("X509_LOOKUP_ctrl");
- K_X509_STORE_CTX_init = (void (*)(X509_STORE_CTX *, X509_STORE *, X509 *, STACK_OF(X509) *)) _cryptoLib->symbol("X509_STORE_CTX_init");
- K_X509_dup = (X509* (*)(X509*)) _cryptoLib->symbol("X509_dup");
- K_BIO_new_fp = (BIO* (*)(FILE*, int)) _cryptoLib->symbol("BIO_new_fp");
- K_BIO_free = (int (*)(BIO*)) _cryptoLib->symbol("BIO_free");
- K_PEM_ASN1_write_bio = (int (*)(int (*)(), const char *,BIO*, char*, const EVP_CIPHER *, unsigned char *, int, pem_password_cb *, void *)) _cryptoLib->symbol("PEM_ASN1_write_bio");
- K_X509_asn1_meth = (ASN1_METHOD* (*)(void)) _cryptoLib->symbol("X509_asn1_meth");
- K_ASN1_i2d_fp = (int (*)(int (*)(), FILE*, unsigned char *)) _cryptoLib->symbol("ASN1_i2d_fp");
- K_i2d_ASN1_HEADER = (int (*)(ASN1_HEADER *, unsigned char **)) _cryptoLib->symbol("i2d_ASN1_HEADER");
- K_X509_print_fp = (int (*)(FILE*, X509*)) _cryptoLib->symbol("X509_print_fp");
- K_i2d_PKCS12 = (int (*)(PKCS12*, unsigned char**)) _cryptoLib->symbol("i2d_PKCS12");
- K_i2d_PKCS12_fp = (int (*)(FILE *, PKCS12*)) _cryptoLib->symbol("i2d_PKCS12_fp");
- K_PKCS12_newpass = (int (*)(PKCS12*, char*, char*)) _cryptoLib->symbol("PKCS12_newpass");
- K_d2i_PKCS12_fp = (PKCS12* (*)(FILE*, PKCS12**)) _cryptoLib->symbol("d2i_PKCS12_fp");
- K_PKCS12_new = (PKCS12* (*)()) _cryptoLib->symbol("PKCS12_new");
- K_PKCS12_free = (void (*)(PKCS12 *)) _cryptoLib->symbol("PKCS12_free");
- K_PKCS12_parse = (int (*)(PKCS12*, const char *, EVP_PKEY**,
- X509**, STACK_OF(X509)**)) _cryptoLib->symbol("PKCS12_parse");
- K_EVP_PKEY_free = (void (*) (EVP_PKEY *)) _cryptoLib->symbol("EVP_PKEY_free");
- K_EVP_PKEY_new = (EVP_PKEY* (*)()) _cryptoLib->symbol("EVP_PKEY_new");
- K_X509_REQ_free = (void (*)(X509_REQ*)) _cryptoLib->symbol("X509_REQ_free");
- K_X509_REQ_new = (X509_REQ* (*)()) _cryptoLib->symbol("X509_REQ_new");
- K_X509_STORE_CTX_set_chain = (void (*)(X509_STORE_CTX *, STACK_OF(X509)*)) _cryptoLib->symbol("X509_STORE_CTX_set_chain");
- K_X509_STORE_CTX_set_purpose = (void (*)(X509_STORE_CTX *, int)) _cryptoLib->symbol("X509_STORE_CTX_set_purpose");
- K_sk_free = (void (*) (STACK *)) _cryptoLib->symbol("sk_free");
- K_sk_num = (int (*) (STACK *)) _cryptoLib->symbol("sk_num");
- K_sk_pop = (char* (*) (STACK *)) _cryptoLib->symbol("sk_pop");
- K_sk_value = (char* (*) (STACK *, int)) _cryptoLib->symbol("sk_value");
- K_sk_new = (STACK* (*) (int (*)())) _cryptoLib->symbol("sk_new");
- K_sk_push = (int (*) (STACK*, char*)) _cryptoLib->symbol("sk_push");
- K_sk_dup = (STACK* (*) (STACK *)) _cryptoLib->symbol("sk_dup");
- K_i2s_ASN1_INTEGER = (char *(*) (X509V3_EXT_METHOD *, ASN1_INTEGER *)) _cryptoLib->symbol("i2s_ASN1_INTEGER");
- K_X509_get_serialNumber = (ASN1_INTEGER * (*) (X509 *)) _cryptoLib->symbol("X509_get_serialNumber");
- K_X509_get_pubkey = (EVP_PKEY *(*)(X509 *)) _cryptoLib->symbol("X509_get_pubkey");
- K_i2d_PublicKey = (int (*)(EVP_PKEY *, unsigned char **)) _cryptoLib->symbol("i2d_PublicKey");
- K_X509_check_private_key = (int (*)(X509 *, EVP_PKEY *)) _cryptoLib->symbol("X509_check_private_key");
- K_BN_bn2hex = (char *(*)(const BIGNUM *)) _cryptoLib->symbol("BN_bn2hex");
- K_X509_digest = (int (*)(const X509 *,const EVP_MD *, unsigned char *, unsigned int *)) _cryptoLib->symbol("X509_digest");
- K_EVP_md5 = (EVP_MD *(*)()) _cryptoLib->symbol("EVP_md5");
- K_ASN1_INTEGER_free = (void (*)(ASN1_INTEGER *)) _cryptoLib->symbol("ASN1_INTEGER_free");
- K_OBJ_obj2nid = (int (*)(ASN1_OBJECT *)) _cryptoLib->symbol("OBJ_obj2nid");
- K_OBJ_nid2ln = (const char *(*)(int)) _cryptoLib->symbol("OBJ_nid2ln");
- K_X509_get_ext_count = (int (*)(X509*)) _cryptoLib->symbol("X509_get_ext_count");
- K_X509_get_ext_by_NID = (int (*)(X509*,int,int)) _cryptoLib->symbol("X509_get_ext_by_NID");
- K_X509_get_ext_by_OBJ = (int (*)(X509*,ASN1_OBJECT*,int)) _cryptoLib->symbol("X509_get_ext_by_OBJ");
- K_X509_get_ext = (X509_EXTENSION* (*)(X509*,int)) _cryptoLib->symbol("X509_get_ext");
- K_X509_delete_ext = (X509_EXTENSION* (*)(X509*,int)) _cryptoLib->symbol("X509_delete_ext");
- K_X509_add_ext = (int (*)(X509*,X509_EXTENSION*,int)) _cryptoLib->symbol("X509_add_ext");
- K_X509_get_ext_d2i = (void* (*)(X509*,int,int*,int*)) _cryptoLib->symbol("X509_get_ext_d2i");
- K_i2s_ASN1_OCTET_STRING = (char *(*)(X509V3_EXT_METHOD*,ASN1_OCTET_STRING*)) _cryptoLib->symbol("i2s_ASN1_OCTET_STRING");
- K_ASN1_BIT_STRING_get_bit = (int (*)(ASN1_BIT_STRING*,int)) _cryptoLib->symbol("ASN1_BIT_STRING_get_bit");
- K_PKCS7_new = (PKCS7 *(*)()) _cryptoLib->symbol("PKCS7_new");
- K_PKCS7_free = (void (*)(PKCS7*)) _cryptoLib->symbol("PKCS7_free");
- K_PKCS7_content_free = (void (*)(PKCS7*)) _cryptoLib->symbol("PKCS7_content_free");
- K_i2d_PKCS7 = (int (*)(PKCS7*, unsigned char**)) _cryptoLib->symbol("i2d_PKCS7");
- K_i2d_PKCS7_fp = (int (*)(FILE*,PKCS7*)) _cryptoLib->symbol("i2d_PKCS7_fp");
- K_d2i_PKCS7 = (PKCS7* (*)(PKCS7**,unsigned char**,long)) _cryptoLib->symbol("d2i_PKCS7");
- K_d2i_PKCS7_fp = (PKCS7 *(*)(FILE *,PKCS7**)) _cryptoLib->symbol("d2i_PKCS7_fp");
- K_PKCS7_dup = (PKCS7* (*)(PKCS7*)) _cryptoLib->symbol("PKCS7_dup");
- K_PEM_X509_INFO_read = (STACK_OF(X509_INFO) *(*)(FILE*, STACK_OF(X509_INFO)*, pem_password_cb*, void *)) _cryptoLib->symbol("PEM_X509_INFO_read");
- K_ASN1_d2i_fp = (char *(*)(char *(*)(),char *(*)(),FILE*,unsigned char**)) _cryptoLib->symbol("ASN1_d2i_fp");
- K_X509_new = (X509 *(*)()) _cryptoLib->symbol("X509_new");
- K_X509_PURPOSE_get_count = (int (*)()) _cryptoLib->symbol("X509_PURPOSE_get_count");
- K_X509_PURPOSE_get_id = (int (*)(X509_PURPOSE *)) _cryptoLib->symbol("X509_PURPOSE_get_id");
- K_X509_check_purpose = (int (*)(X509*,int,int)) _cryptoLib->symbol("X509_check_purpose");
- K_X509_PURPOSE_get0 = (X509_PURPOSE *(*)(int)) _cryptoLib->symbol("X509_PURPOSE_get0");
- K_EVP_PKEY_assign = (int (*)(EVP_PKEY*, int, char*)) _cryptoLib->symbol("EVP_PKEY_assign");
- K_X509_REQ_set_pubkey = (int (*)(X509_REQ*, EVP_PKEY*)) _cryptoLib->symbol("X509_REQ_set_pubkey");
- K_RSA_generate_key = (RSA* (*)(int, unsigned long, void (*)(int,int,void *), void *)) _cryptoLib->symbol("RSA_generate_key");
- K_i2d_X509_REQ_fp = (int (*)(FILE *, X509_REQ *)) _cryptoLib->symbol("i2d_X509_REQ_fp");
- K_ERR_clear_error = (void (*)()) _cryptoLib->symbol("ERR_clear_error");
- K_ERR_print_errors_fp = (void (*)(FILE*)) _cryptoLib->symbol("ERR_print_errors_fp");
+ K_X509_free = (K_X509_free_func) _cryptoLib->symbol("X509_free");
+ K_RAND_egd = (K_RAND_egd_func) _cryptoLib->symbol("RAND_egd");
+ K_RAND_load_file = (K_RAND_load_file_func) _cryptoLib->symbol("RAND_load_file");
+ K_RAND_file_name = (K_RAND_file_name_func) _cryptoLib->symbol("RAND_file_name");
+ K_RAND_write_file = (K_RAND_write_file_func) _cryptoLib->symbol("RAND_write_file");
+ K_CRYPTO_free = (K_CRYPTO_free_func) _cryptoLib->symbol("CRYPTO_free");
+ K_d2i_X509 = (K_d2i_X509_func) _cryptoLib->symbol("d2i_X509");
+ K_i2d_X509 = (K_i2d_X509_func) _cryptoLib->symbol("i2d_X509");
+ K_X509_cmp = (K_X509_cmp_func) _cryptoLib->symbol("X509_cmp");
+ K_X509_STORE_CTX_new = (K_X509_STORE_CTX_new_func) _cryptoLib->symbol("X509_STORE_CTX_new");
+ K_X509_STORE_CTX_free = (K_X509_STORE_CTX_free_func) _cryptoLib->symbol("X509_STORE_CTX_free");
+ K_X509_verify_cert = (K_X509_verify_cert_func) _cryptoLib->symbol("X509_verify_cert");
+ K_X509_STORE_new = (K_X509_STORE_new_func) _cryptoLib->symbol("X509_STORE_new");
+ K_X509_STORE_free = (K_X509_STORE_free_func) _cryptoLib->symbol("X509_STORE_free");
+ K_X509_NAME_oneline = (K_X509_NAME_oneline_func) _cryptoLib->symbol("X509_NAME_oneline");
+ K_X509_get_subject_name = (K_X509_get_subject_name_func) _cryptoLib->symbol("X509_get_subject_name");
+ K_X509_get_issuer_name = (K_X509_get_issuer_name_func) _cryptoLib->symbol("X509_get_issuer_name");
+ K_X509_STORE_add_lookup = (K_X509_STORE_add_lookup_func) _cryptoLib->symbol("X509_STORE_add_lookup");
+ K_X509_LOOKUP_file = (K_X509_LOOKUP_file_func) _cryptoLib->symbol("X509_LOOKUP_file");
+ K_X509_LOOKUP_free = (K_X509_LOOKUP_free_func) _cryptoLib->symbol("X509_LOOKUP_free");
+ K_X509_LOOKUP_ctrl = (K_X509_LOOKUP_ctrl_func) _cryptoLib->symbol("X509_LOOKUP_ctrl");
+ K_X509_STORE_CTX_init = (K_X509_STORE_CTX_init_func) _cryptoLib->symbol("X509_STORE_CTX_init");
+ K_X509_dup = (K_X509_dup_func) _cryptoLib->symbol("X509_dup");
+ K_BIO_new_fp = (K_BIO_new_fp_func) _cryptoLib->symbol("BIO_new_fp");
+ K_BIO_free = (K_BIO_free_func) _cryptoLib->symbol("BIO_free");
+ K_PEM_ASN1_write_bio = (K_PEM_ASN1_write_bio_func) _cryptoLib->symbol("PEM_ASN1_write_bio");
+ K_X509_asn1_meth = (K_X509_asn1_meth_func) _cryptoLib->symbol("X509_asn1_meth");
+ K_ASN1_i2d_fp = (K_ASN1_i2d_fp_func) _cryptoLib->symbol("ASN1_i2d_fp");
+ K_i2d_ASN1_HEADER = (K_i2d_ASN1_HEADER_func) _cryptoLib->symbol("i2d_ASN1_HEADER");
+ K_X509_print_fp = (K_X509_print_fp_func) _cryptoLib->symbol("X509_print_fp");
+ K_i2d_PKCS12 = (K_i2d_PKCS12_func) _cryptoLib->symbol("i2d_PKCS12");
+ K_i2d_PKCS12_fp = (K_i2d_PKCS12_fp_func) _cryptoLib->symbol("i2d_PKCS12_fp");
+ K_PKCS12_newpass = (K_PKCS12_newpass_func) _cryptoLib->symbol("PKCS12_newpass");
+ K_d2i_PKCS12_fp = (K_d2i_PKCS12_fp_func) _cryptoLib->symbol("d2i_PKCS12_fp");
+ K_PKCS12_new = (K_PKCS12_new_func) _cryptoLib->symbol("PKCS12_new");
+ K_PKCS12_free = (K_PKCS12_free_func) _cryptoLib->symbol("PKCS12_free");
+ K_PKCS12_parse = (K_PKCS12_parse_func) _cryptoLib->symbol("PKCS12_parse");
+ K_EVP_PKEY_free = (K_EVP_PKEY_free_func) _cryptoLib->symbol("EVP_PKEY_free");
+ K_EVP_PKEY_new = (K_EVP_PKEY_new_func) _cryptoLib->symbol("EVP_PKEY_new");
+ K_X509_REQ_free = (K_X509_REQ_free_func) _cryptoLib->symbol("X509_REQ_free");
+ K_X509_REQ_new = (K_X509_REQ_new_func) _cryptoLib->symbol("X509_REQ_new");
+ K_X509_STORE_CTX_set_chain = (K_X509_STORE_CTX_set_chain_func) _cryptoLib->symbol("X509_STORE_CTX_set_chain");
+ K_X509_STORE_CTX_set_purpose = (K_X509_STORE_CTX_set_purpose_func) _cryptoLib->symbol("X509_STORE_CTX_set_purpose");
+ K_sk_free = (K_sk_free_func) _cryptoLib->symbol("sk_free");
+ K_sk_num = (K_sk_num_func) _cryptoLib->symbol("sk_num");
+ K_sk_pop = (K_sk_pop_func) _cryptoLib->symbol("sk_pop");
+ K_sk_value = (K_sk_value_func) _cryptoLib->symbol("sk_value");
+ K_sk_new = (K_sk_new_func) _cryptoLib->symbol("sk_new");
+ K_sk_push = (K_sk_push_func) _cryptoLib->symbol("sk_push");
+ K_sk_dup = (K_sk_dup_func) _cryptoLib->symbol("sk_dup");
+ K_i2s_ASN1_INTEGER = (K_i2s_ASN1_INTEGER_func) _cryptoLib->symbol("i2s_ASN1_INTEGER");
+ K_X509_get_serialNumber = (K_X509_get_serialNumber_func) _cryptoLib->symbol("X509_get_serialNumber");
+ K_X509_get_pubkey = (K_X509_get_pubkey_func) _cryptoLib->symbol("X509_get_pubkey");
+ K_i2d_PublicKey = (K_i2d_PublicKey_func) _cryptoLib->symbol("i2d_PublicKey");
+ K_X509_check_private_key = (K_X509_check_private_key_func) _cryptoLib->symbol("X509_check_private_key");
+ K_BN_bn2hex = (K_BN_bn2hex_func) _cryptoLib->symbol("BN_bn2hex");
+ K_X509_digest = (K_X509_digest_func) _cryptoLib->symbol("X509_digest");
+ K_EVP_md5 = (K_EVP_md5_func) _cryptoLib->symbol("EVP_md5");
+ K_ASN1_INTEGER_free = (K_ASN1_INTEGER_free_func) _cryptoLib->symbol("ASN1_INTEGER_free");
+ K_OBJ_obj2nid = (K_OBJ_obj2nid_func) _cryptoLib->symbol("OBJ_obj2nid");
+ K_OBJ_nid2ln = (K_OBJ_nid2ln_func) _cryptoLib->symbol("OBJ_nid2ln");
+ K_X509_get_ext_count = (K_X509_get_ext_count_func) _cryptoLib->symbol("X509_get_ext_count");
+ K_X509_get_ext_by_NID = (K_X509_get_ext_by_NID_func) _cryptoLib->symbol("X509_get_ext_by_NID");
+ K_X509_get_ext_by_OBJ = (K_X509_get_ext_by_OBJ_func) _cryptoLib->symbol("X509_get_ext_by_OBJ");
+ K_X509_get_ext = (K_X509_get_ext_func) _cryptoLib->symbol("X509_get_ext");
+ K_X509_delete_ext = (K_X509_delete_ext_func) _cryptoLib->symbol("X509_delete_ext");
+ K_X509_add_ext = (K_X509_add_ext_func) _cryptoLib->symbol("X509_add_ext");
+ K_X509_get_ext_d2i = (K_X509_get_ext_d2i_func) _cryptoLib->symbol("X509_get_ext_d2i");
+ K_i2s_ASN1_OCTET_STRING = (K_i2s_ASN1_OCTET_STRING_func) _cryptoLib->symbol("i2s_ASN1_OCTET_STRING");
+ K_ASN1_BIT_STRING_get_bit = (K_ASN1_BIT_STRING_get_bit_func) _cryptoLib->symbol("ASN1_BIT_STRING_get_bit");
+ K_PKCS7_new = (K_PKCS7_new_func) _cryptoLib->symbol("PKCS7_new");
+ K_PKCS7_free = (K_PKCS7_free_func) _cryptoLib->symbol("PKCS7_free");
+ K_PKCS7_content_free = (K_PKCS7_content_free_func) _cryptoLib->symbol("PKCS7_content_free");
+ K_i2d_PKCS7 = (K_i2d_PKCS7_func) _cryptoLib->symbol("i2d_PKCS7");
+ K_i2d_PKCS7_fp = (K_i2d_PKCS7_fp_func) _cryptoLib->symbol("i2d_PKCS7_fp");
+ K_d2i_PKCS7 = (K_d2i_PKCS7_func) _cryptoLib->symbol("d2i_PKCS7");
+ K_d2i_PKCS7_fp = (K_d2i_PKCS7_fp_func) _cryptoLib->symbol("d2i_PKCS7_fp");
+ K_PKCS7_dup = (K_PKCS7_dup_func) _cryptoLib->symbol("PKCS7_dup");
+ K_PEM_X509_INFO_read = (K_PEM_X509_INFO_read_func) _cryptoLib->symbol("PEM_X509_INFO_read");
+ K_ASN1_d2i_fp = (K_ASN1_d2i_fp_func) _cryptoLib->symbol("ASN1_d2i_fp");
+ K_X509_new = (K_X509_new_func) _cryptoLib->symbol("X509_new");
+ K_X509_PURPOSE_get_count = (K_X509_PURPOSE_get_count_func) _cryptoLib->symbol("X509_PURPOSE_get_count");
+ K_X509_PURPOSE_get_id = (K_X509_PURPOSE_get_id_func) _cryptoLib->symbol("X509_PURPOSE_get_id");
+ K_X509_check_purpose = (K_X509_check_purpose_func) _cryptoLib->symbol("X509_check_purpose");
+ K_X509_PURPOSE_get0 = (K_X509_PURPOSE_get0_func) _cryptoLib->symbol("X509_PURPOSE_get0");
+ K_EVP_PKEY_assign = (K_EVP_PKEY_assign_func) _cryptoLib->symbol("EVP_PKEY_assign");
+ K_X509_REQ_set_pubkey = (K_X509_REQ_set_pubkey_func) _cryptoLib->symbol("X509_REQ_set_pubkey");
+ K_RSA_generate_key = (K_RSA_generate_key_func) _cryptoLib->symbol("RSA_generate_key");
+ K_i2d_X509_REQ_fp = (K_i2d_X509_REQ_fp_func) _cryptoLib->symbol("i2d_X509_REQ_fp");
+ K_ERR_clear_error = (K_ERR_clear_error_func) _cryptoLib->symbol("ERR_clear_error");
+ K_ERR_print_errors_fp = (K_ERR_print_errors_fp_func) _cryptoLib->symbol("ERR_print_errors_fp");
#endif
}
@@ -440,42 +563,37 @@
if (_sslLib) {
#ifdef HAVE_SSL
// stand back from your monitor and look at this. it's fun! :)
- K_SSL_connect = (int (*)(SSL *)) _sslLib->symbol("SSL_connect");
- K_SSL_accept = (int (*)(SSL *)) _sslLib->symbol("SSL_accept");
- K_SSL_read = (int (*)(SSL *, void *, int)) _sslLib->symbol("SSL_read");
- K_SSL_write = (int (*)(SSL *, const void *, int))
- _sslLib->symbol("SSL_write");
- K_SSL_new = (SSL* (*)(SSL_CTX *)) _sslLib->symbol("SSL_new");
- K_SSL_free = (void (*)(SSL *)) _sslLib->symbol("SSL_free");
- K_SSL_shutdown = (int (*)(SSL *)) _sslLib->symbol("SSL_shutdown");
- K_SSL_CTX_new = (SSL_CTX* (*)(SSL_METHOD*)) _sslLib->symbol("SSL_CTX_new");
- K_SSL_CTX_free = (void (*)(SSL_CTX*)) _sslLib->symbol("SSL_CTX_free");
- K_SSL_set_fd = (int (*)(SSL *, int)) _sslLib->symbol("SSL_set_fd");
- K_SSL_pending = (int (*)(SSL *)) _sslLib->symbol("SSL_pending");
- K_SSL_CTX_set_cipher_list = (int (*)(SSL_CTX *, const char *))
- _sslLib->symbol("SSL_CTX_set_cipher_list");
- K_SSL_CTX_set_verify = (void (*)(SSL_CTX*, int, int (*)(int, X509_STORE_CTX*))) _sslLib->symbol("SSL_CTX_set_verify");
- K_SSL_use_certificate = (int (*)(SSL*, X509*))
- _sslLib->symbol("SSL_CTX_use_certificate");
- K_SSL_get_current_cipher = (SSL_CIPHER *(*)(SSL *))
- _sslLib->symbol("SSL_get_current_cipher");
- K_SSL_ctrl = (long (*)(SSL * ,int, long, char *))
- _sslLib->symbol("SSL_ctrl");
- K_TLSv1_client_method = (SSL_METHOD *(*)()) _sslLib->symbol("TLSv1_client_method");
- K_SSLv2_client_method = (SSL_METHOD *(*)()) _sslLib->symbol("SSLv2_client_method");
- K_SSLv3_client_method = (SSL_METHOD *(*)()) _sslLib->symbol("SSLv3_client_method");
- K_SSLv23_client_method = (SSL_METHOD *(*)()) _sslLib->symbol("SSLv23_client_method");
- K_SSL_get_peer_certificate = (X509 *(*)(SSL *)) _sslLib->symbol("SSL_get_peer_certificate");
- K_SSL_CIPHER_get_bits = (int (*)(SSL_CIPHER *,int *)) _sslLib->symbol("SSL_CIPHER_get_bits");
- K_SSL_CIPHER_get_version = (char * (*)(SSL_CIPHER *)) _sslLib->symbol("SSL_CIPHER_get_version");
- K_SSL_CIPHER_get_name = (const char * (*)(SSL_CIPHER *)) _sslLib->symbol("SSL_CIPHER_get_name");
- K_SSL_CIPHER_description = (char * (*)(SSL_CIPHER *, char *, int)) _sslLib->symbol("SSL_CIPHER_description");
- K_SSL_CTX_use_PrivateKey = (int (*)(SSL_CTX*, EVP_PKEY*)) _sslLib->symbol("SSL_CTX_use_PrivateKey");
- K_SSL_CTX_use_certificate = (int (*)(SSL_CTX*, X509*)) _sslLib->symbol("SSL_CTX_use_certificate");
- K_SSL_get_error = (int (*)(SSL*, int)) _sslLib->symbol("SSL_get_error");
- K_SSL_get_peer_cert_chain = (STACK_OF(X509)* (*)(SSL*)) _sslLib->symbol("SSL_get_peer_cert_chain");
- K_SSL_load_client_CA_file = (STACK_OF(X509_NAME)* (*)(const char *)) _sslLib->symbol("SSL_load_client_CA_file");
- K_SSL_peek = (int (*)(SSL*,void*,int)) _sslLib->symbol("SSL_peek");
+ K_SSL_connect = (K_SSL_connect_func) _sslLib->symbol("SSL_connect");
+ K_SSL_accept = (K_SSL_accept_func) _sslLib->symbol("SSL_accept");
+ K_SSL_read = (K_SSL_read_func) _sslLib->symbol("SSL_read");
+ K_SSL_write = (K_SSL_write_func) _sslLib->symbol("SSL_write");
+ K_SSL_new = (K_SSL_new_func) _sslLib->symbol("SSL_new");
+ K_SSL_free = (K_SSL_free_func) _sslLib->symbol("SSL_free");
+ K_SSL_shutdown = (K_SSL_shutdown_func) _sslLib->symbol("SSL_shutdown");
+ K_SSL_CTX_new = (K_SSL_CTX_new_func) _sslLib->symbol("SSL_CTX_new");
+ K_SSL_CTX_free = (K_SSL_CTX_free_func) _sslLib->symbol("SSL_CTX_free");
+ K_SSL_set_fd = (K_SSL_set_fd_func) _sslLib->symbol("SSL_set_fd");
+ K_SSL_pending = (K_SSL_pending_func) _sslLib->symbol("SSL_pending");
+ K_SSL_CTX_set_cipher_list = (K_SSL_CTX_set_cipher_list_func) _sslLib->symbol("SSL_CTX_set_cipher_list");
+ K_SSL_CTX_set_verify = (K_SSL_CTX_set_verify_func) _sslLib->symbol("SSL_CTX_set_verify");
+ K_SSL_use_certificate = (K_SSL_use_certificate_func) _sslLib->symbol("SSL_CTX_use_certificate");
+ K_SSL_get_current_cipher = (K_SSL_get_current_cipher_func) _sslLib->symbol("SSL_get_current_cipher");
+ K_SSL_ctrl = (K_SSL_ctrl_func) _sslLib->symbol("SSL_ctrl");
+ K_TLSv1_client_method = (K_TLSv1_client_method_func) _sslLib->symbol("TLSv1_client_method");
+ K_SSLv2_client_method = (K_SSLv2_client_method_func) _sslLib->symbol("SSLv2_client_method");
+ K_SSLv3_client_method = (K_SSLv3_client_method_func) _sslLib->symbol("SSLv3_client_method");
+ K_SSLv23_client_method = (K_SSLv23_client_method_func) _sslLib->symbol("SSLv23_client_method");
+ K_SSL_get_peer_certificate = (K_SSL_get_peer_certificate_func) _sslLib->symbol("SSL_get_peer_certificate");
+ K_SSL_CIPHER_get_bits = (K_SSL_CIPHER_get_bits_func) _sslLib->symbol("SSL_CIPHER_get_bits");
+ K_SSL_CIPHER_get_version = (K_SSL_CIPHER_get_version_func) _sslLib->symbol("SSL_CIPHER_get_version");
+ K_SSL_CIPHER_get_name = (K_SSL_CIPHER_get_name_func) _sslLib->symbol("SSL_CIPHER_get_name");
+ K_SSL_CIPHER_description = (K_SSL_CIPHER_description_func) _sslLib->symbol("SSL_CIPHER_description");
+ K_SSL_CTX_use_PrivateKey = (K_SSL_CTX_use_PrivateKey_func) _sslLib->symbol("SSL_CTX_use_PrivateKey");
+ K_SSL_CTX_use_certificate = (K_SSL_CTX_use_certificate_func) _sslLib->symbol("SSL_CTX_use_certificate");
+ K_SSL_get_error = (K_SSL_get_error_func) _sslLib->symbol("SSL_get_error");
+ K_SSL_get_peer_cert_chain = (K_SSL_get_peer_cert_chain_func) _sslLib->symbol("SSL_get_peer_cert_chain");
+ K_SSL_load_client_CA_file = (K_SSL_load_client_CA_file_func) _sslLib->symbol("SSL_load_client_CA_file");
+ K_SSL_peek = (K_SSL_peek_func) _sslLib->symbol("SSL_peek");
#endif
@@ -483,7 +601,7 @@
void *x;
x = _sslLib->symbol("SSL_library_init");
if (_cryptoLib) {
- if (x) ((int (*)())x)();
+ if (x) ((K_int_func)x)();
x = _cryptoLib->symbol("OpenSSL_add_all_algorithms");
if (x) ((void (*)())x)();
x = _cryptoLib->symbol("OpenSSL_add_all_ciphers");
@@ -603,7 +721,7 @@
void KOpenSSLProxy::SSL_CTX_set_verify(SSL_CTX *ctx, int mode,
int (*verify_callback)(int, X509_STORE_CTX *)) {
- if (K_SSL_CTX_set_verify) (K_SSL_CTX_set_verify)(ctx, mode, verify_callback);
+ if (K_SSL_CTX_set_verify) (K_SSL_CTX_set_verify)(ctx, mode, (K_SSL_CTX_set_verify_cb) verify_callback);
}
@@ -806,7 +924,7 @@
int KOpenSSLProxy::PEM_write_bio_X509(BIO *bp, X509 *x) {
- if (K_PEM_ASN1_write_bio) return (K_PEM_ASN1_write_bio) ((int (*)())K_i2d_X509, PEM_STRING_X509, bp, (char *)x, NULL, NULL, 0, NULL, NULL);
+ if (K_PEM_ASN1_write_bio) return (K_PEM_ASN1_write_bio) ((K_int_func)K_i2d_X509, PEM_STRING_X509, bp, (char *)x, NULL, NULL, 0, NULL, NULL);
else return -1;
}
@@ -819,7 +937,7 @@
int KOpenSSLProxy::ASN1_i2d_fp(FILE *out,unsigned char *x) {
if (K_ASN1_i2d_fp && K_i2d_ASN1_HEADER)
- return (K_ASN1_i2d_fp)((int (*)())K_i2d_ASN1_HEADER, out, x);
+ return (K_ASN1_i2d_fp)((K_int_func)K_i2d_ASN1_HEADER, out, x);
else return -1;
}
@@ -957,13 +1075,13 @@
STACK* KOpenSSLProxy::sk_new(int (*cmp)()) {
- if (K_sk_new) return (K_sk_new)(cmp);
+ if (K_sk_new) return (K_sk_new)((K_int_func) cmp);
else return NULL;
}
-int KOpenSSLProxy::sk_push(STACK* s, char* d) {
- if (K_sk_push) return (K_sk_push)(s,d);
+int KOpenSSLProxy::sk_push(STACK* s, char* _d) {
+ if (K_sk_push) return (K_sk_push)(s,_d);
else return -1;
}
@@ -1146,7 +1264,7 @@
X509 *KOpenSSLProxy::X509_d2i_fp(FILE *out, X509** buf) {
- if (K_ASN1_d2i_fp) return reinterpret_cast<X509 *>((K_ASN1_d2i_fp)(reinterpret_cast<char *(*)()>(K_X509_new), reinterpret_cast<char *(*)()>(K_d2i_X509), out, reinterpret_cast<unsigned char **>(buf)));
+ if (K_ASN1_d2i_fp) return reinterpret_cast<X509 *>((K_ASN1_d2i_fp)(reinterpret_cast<K_str_func>(K_X509_new), reinterpret_cast<K_str_func>(K_d2i_X509), out, reinterpret_cast<unsigned char **>(buf)));
else return NULL;
}
@@ -1213,7 +1331,7 @@
RSA* KOpenSSLProxy::RSA_generate_key(int bits, unsigned long e, void
(*callback)(int,int,void *), void *cb_arg) {
- if (K_RSA_generate_key) return (K_RSA_generate_key)(bits, e, callback, cb_arg);
+ if (K_RSA_generate_key) return (K_RSA_generate_key)(bits, e, (K_RSA_generate_key_cb) callback, cb_arg);
else return NULL;
}
--- kdelibs-3.0.8/kio/kpasswdserver/kpasswdserver.h.orig 2002-10-08 10:30:17.553601000 -0400
+++ kdelibs-3.0.8/kio/kpasswdserver/kpasswdserver.h 2002-10-08 16:44:33.850000000 -0400
@@ -84,6 +84,7 @@
AuthInfoList() { setAutoDelete(true); }
int compareItems(QPtrCollection::Item n1, QPtrCollection::Item n2);
};
+ friend class AuthInfoList;
QDict< AuthInfoList > m_authDict;
--- kdelibs-3.0.8/kjs/operations.cpp.orig 2002-10-08 10:03:27.267049000 -0400
+++ kdelibs-3.0.8/kjs/operations.cpp 2002-10-08 16:44:33.869999000 -0400
@@ -33,6 +33,10 @@
#include <math.h>
#include <stdlib.h>
+#ifdef __SUNPRO_CC
+#include <sunmath.h>
+#endif
+
#ifndef HAVE_FUNC_ISINF
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
--- kdelibs-3.0.8/kjs/lookup.h.orig 2002-10-08 09:58:07.943795000 -0400
+++ kdelibs-3.0.8/kjs/lookup.h 2002-10-08 16:44:33.939994000 -0400
@@ -195,7 +195,7 @@
fprintf(stderr, "Function bit not set! Shouldn't happen in lookupGetFunction!\n" );
return Undefined();
- };
+ }
/**
* Simplified version of lookupGet in case there are no functions, only "values".
--- kdelibs-3.0.8/interfaces/ktexteditor/sessionconfiginterface.h.orig 2002-10-10 09:23:31.908449000 -0400
+++ kdelibs-3.0.8/interfaces/ktexteditor/sessionconfiginterface.h 2002-10-10 09:24:38.819110000 -0400
@@ -25,6 +25,11 @@
namespace KTextEditor
{
+class PrivateSessionConfigInterface;
+class Document;
+class View;
+class Plugin;
+
/*
* This is an interface for the KTextEditor::Document/View/Plugin/ViewPlugin classes !!!
*/
@@ -52,14 +57,14 @@
virtual void writeSessionConfig (KConfig *) = 0;
private:
- class PrivateSessionConfigInterface *d;
+ PrivateSessionConfigInterface *d;
static unsigned int globalSessionConfigInterfaceNumber;
unsigned int mySessionConfigInterfaceNumber;
};
-SessionConfigInterface *sessionConfigInterface (class Document *doc);
-SessionConfigInterface *sessionConfigInterface (class View *view);
-SessionConfigInterface *sessionConfigInterface (class Plugin *plugin);
+SessionConfigInterface *sessionConfigInterface (Document *doc);
+SessionConfigInterface *sessionConfigInterface (View *view);
+SessionConfigInterface *sessionConfigInterface (Plugin *plugin);
};
--- kdelibs-3.0.8/kabc/addresseelist.h.orig 2002-10-09 16:43:03.869866000 -0400
+++ kdelibs-3.0.8/kabc/addresseelist.h 2002-10-09 16:43:12.539886000 -0400
@@ -74,7 +74,7 @@
static bool lt( const Addressee &, const Addressee & );
};
-};
+}
/**
* Addressee attribute used for sorting.
--- kdelibs-3.0.8/kate/interfaces/document.h.orig 2002-10-09 17:39:10.405000000 -0400
+++ kdelibs-3.0.8/kate/interfaces/document.h 2002-10-09 17:39:46.785389000 -0400
@@ -42,6 +42,7 @@
namespace Kate
{
+class Document;
class View;
class Cursor : public KTextEditor::Cursor
@@ -75,7 +76,7 @@
virtual ~ActionMenu () { ; };
public:
- virtual void updateMenu (class Document *) = 0;
+ virtual void updateMenu (Document *) = 0;
};
/** This interface provides access to the Kate Document class.
--- kdelibs-3.0.8/kate/part/kateviewinternal.h.orig 2002-10-09 17:01:40.601447000 -0400
+++ kdelibs-3.0.8/kate/part/kateviewinternal.h 2002-10-09 17:06:16.214302000 -0400
@@ -223,8 +223,13 @@
BracketMark bm;
+protected:
+ struct _dragInfo;
+ friend struct _dragInfo;
+
enum DragState { diNone, diPending, diDragging };
+private:
struct _dragInfo {
DragState state;
QPoint start;
--- kdelibs-3.0.8/kate/part/katedialogs.h.orig 2002-10-09 17:29:32.298798000 -0400
+++ kdelibs-3.0.8/kate/part/katedialogs.h 2002-10-09 17:29:38.478844000 -0400
@@ -367,9 +367,9 @@
class QComboBox *ItemAttribute;
class KIntNumInput *ItemPopCount;
- class QMap<int,QString> id2tag;
- class QMap<int,ItemInfo> id2info;
- class QMap<QString,int> tag2id;
+ QMap<int,QString> id2tag;
+ QMap<int,ItemInfo> id2info;
+ QMap<QString,int> tag2id;
class AttribEditor *attrEd;
int transTableCnt;
--- kdelibs-3.0.8/kdecore/kallocator.cpp.orig 2002-10-08 09:36:00.549931000 -0400
+++ kdelibs-3.0.8/kdecore/kallocator.cpp 2002-10-08 17:45:22.738605000 -0400
@@ -79,10 +79,10 @@
void KZoneAllocator::insertHash(MemBlock *b)
{
- unsigned int adr = ((unsigned int)b->begin) & (~(blockSize - 1));
- unsigned int end = ((unsigned int)b->begin) + blockSize;
+ unsigned long adr = ((unsigned long)b->begin) & (~(blockSize - 1));
+ unsigned long end = ((unsigned long)b->begin) + blockSize;
while (adr < end) {
- unsigned int key = adr >> log2;
+ unsigned long key = adr >> log2;
key = key & (hashSize - 1);
if (!hashList[key])
hashList[key] = new QValueList<MemBlock *>;
@@ -137,10 +137,10 @@
/* Update also the hashlists if we aren't going to reconstruct them
soon. */
if (hashList && !hashDirty) {
- unsigned int adr = ((unsigned int)b->begin) & (~(blockSize - 1));
- unsigned int end = ((unsigned int)b->begin) + blockSize;
+ unsigned long adr = ((unsigned long)b->begin) & (~(blockSize - 1));
+ unsigned long end = ((unsigned long)b->begin) + blockSize;
while (adr < end) {
- unsigned int key = adr >> log2;
+ unsigned long key = adr >> log2;
key = key & (hashSize - 1);
if (hashList[key]) {
QValueList<MemBlock *> *list = hashList[key];
--- kdelibs-3.0.8/admin/libtool.m4.in.orig 2002-09-15 17:12:53.000000000 -0400
+++ kdelibs-3.0.8/admin/libtool.m4.in 2002-10-09 12:40:42.814121000 -0400
@@ -2922,23 +2922,22 @@
case $cc_basename in
CC)
# Sun C++ 4.2, 5.x and Centerline C++
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=''
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -z muldefs${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+ $CC -G -z muldefs${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The C++ compiler is used as linker so we must use $wl
- # flag to pass the commands to the underlying system
- # linker.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- ;;
- esac
+
+ # The '-Qoption ld ' is not necessary with Sun C++ as CC will
+ # automatically pass all -z options to ld. Using '-Qoption ld' has the
+ # adverse effect of causing those flags to be passed out of order to
+ # ld. What was happening is ld would incorrectly get:
+ #
+ # -z allextract -z defaultextract <lib>
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
# Commands to make compiler produce verbose output that lists
--- kdelibs-3.0.8/kdesu/client.cpp.orig 2002-10-08 09:54:27.821141000 -0400
+++ kdelibs-3.0.8/kdesu/client.cpp 2002-10-08 16:44:34.139998000 -0400
@@ -42,7 +42,7 @@
};
#ifndef SUN_LEN
-#define SUN_LEN(ptr) ((socklen_t) (((struct sockaddr_un *) 0)->sun_path) \
+#define SUN_LEN(ptr) ((socklen_t) ((unsigned long) ((struct sockaddr_un *) 0)->sun_path) \
+ strlen ((ptr)->sun_path))
#endif
--- kdelibs-3.0.8/kdesu/kdesu_pty.cpp.orig 2002-10-08 09:55:18.481678000 -0400
+++ kdelibs-3.0.8/kdesu/kdesu_pty.cpp 2002-10-08 16:44:34.150004000 -0400
@@ -20,7 +20,7 @@
#define _GNU_SOURCE /* Needed for getpt, ptsname in glibc 2.1.x systems */
#endif
-#if !defined(_XOPEN_SOURCE) && !defined(__osf__)
+#if !defined(_XOPEN_SOURCE) && !defined(__osf__) && !defined(sun)
#define _XOPEN_SOURCE /* Needed for grantpt, unlockpt in glibc 2.1.x */
#endif
--- kdelibs-3.0.8/kdeui/kaccelmanager.cpp.orig 2002-10-08 09:36:35.120287000 -0400
+++ kdelibs-3.0.8/kdeui/kaccelmanager.cpp 2002-10-08 16:44:34.209998000 -0400
@@ -82,21 +82,12 @@
class KAcceleratorManagerPrivate
{
public:
-
- static void manage(QWidget *widget);
- static bool programmers_mode;
- static bool standardName(const QString &str);
-
-private:
class Item;
typedef QPtrList<Item> ItemList;
- static void traverseChildren(QWidget *widget, Item *item);
-
- static void manageMenuBar(QMenuBar *mbar, Item *item);
- static void manageTabBar(QTabBar *bar, Item *item);
-
- static void calculateAccelerators(Item *item, QString &used);
+ static void manage(QWidget *widget);
+ static bool programmers_mode;
+ static bool standardName(const QString &str);
class Item
{
@@ -113,6 +104,13 @@
int m_index;
};
+private:
+ static void traverseChildren(QWidget *widget, Item *item);
+
+ static void manageMenuBar(QMenuBar *mbar, Item *item);
+ static void manageTabBar(QTabBar *bar, Item *item);
+
+ static void calculateAccelerators(Item *item, QString &used);
};
--- kdelibs-3.0.8/kdeui/kmainwindow.cpp.orig 2002-10-08 09:40:51.962874000 -0400
+++ kdelibs-3.0.8/kdeui/kmainwindow.cpp 2002-10-08 16:44:34.230025000 -0400
@@ -65,13 +65,14 @@
};
QPtrList<KMainWindow>* KMainWindow::memberList = 0L;
-static bool no_query_exit = false;
static KMWSessionManaged* ksm = 0;
static KStaticDeleter<KMWSessionManaged> ksmd;
class KMWSessionManaged : public KSessionManaged
{
public:
+ static bool no_query_exit;
+
KMWSessionManaged()
{
};
@@ -104,7 +105,7 @@
if ( sm.allowsInteraction() ) {
bool cancelled = false;
QPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
- ::no_query_exit = true;
+ KMWSessionManaged::no_query_exit = true;
for (it.toFirst(); it.current() && !cancelled;){
KMainWindow *window = *it;
++it; // Update now, the current window might get deleted
@@ -128,7 +129,7 @@
*/
}
}
- ::no_query_exit = false;
+ KMWSessionManaged::no_query_exit = false;
if (cancelled)
return false;
@@ -150,6 +151,7 @@
}
};
+bool KMWSessionManaged::no_query_exit = false;
static bool beeing_first = true;
KMainWindow::KMainWindow( QWidget* parent, const char *name, WFlags f )
@@ -501,7 +503,7 @@
not_withdrawn++;
}
- if ( !no_query_exit && not_withdrawn <= 0 ) { // last window close accepted?
+ if ( !KMWSessionManaged::no_query_exit && not_withdrawn <= 0 ) { // last window close accepted?
if ( queryExit() ) { // Yes, Quit app?
// We saved the toolbars already
disconnect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown()));
--- kdelibs-3.0.8/khtml/ecma/kjs_window.h.orig 2002-10-10 10:56:14.254873000 -0400
+++ kdelibs-3.0.8/khtml/ecma/kjs_window.h 2002-10-10 10:58:09.676022000 -0400
@@ -119,9 +119,14 @@
Onmouseout, Onmouseover, Onmouseup, Onmove, Onreset, Onresize,
Onselect, Onsubmit, Onunload };
protected:
+ enum DelayedActionId { NullAction, DelayedClose, DelayedGoHistory };
+
Value getListener(ExecState *exec, int eventId) const;
void setListener(ExecState *exec, int eventId, Value func);
private:
+ struct DelayedAction;
+ friend struct DelayedAction;
+
QGuardedPtr<KHTMLPart> m_part;
Screen *screen;
History *history;
@@ -130,7 +135,6 @@
WindowQObject *winq;
DOM::Event *m_evt;
- enum DelayedActionId { NullAction, DelayedClose, DelayedGoHistory };
struct DelayedAction {
DelayedAction() : actionId(NullAction) {} // for QValueList
DelayedAction( DelayedActionId id, QVariant p = QVariant() ) : actionId(id), param(p) {}
--- kdelibs-3.0.8/khtml/rendering/bidi.cpp.orig 2002-10-10 10:33:16.280663000 -0400
+++ kdelibs-3.0.8/khtml/rendering/bidi.cpp 2002-10-10 10:33:32.660821000 -0400
@@ -48,6 +48,13 @@
#endif
+inline BidiIterator::BidiIterator()
+{
+ par = 0;
+ obj = 0;
+ pos = 0;
+}
+
static BidiIterator sor;
static BidiIterator eor;
static BidiIterator last;
@@ -163,13 +170,6 @@
return o;
}
-inline BidiIterator::BidiIterator()
-{
- par = 0;
- obj = 0;
- pos = 0;
-}
-
BidiIterator::BidiIterator(RenderFlow *_par)
{
par = _par;
--- kdelibs-3.0.8/kparts/componentfactory.h.orig 2002-10-10 11:15:59.727462000 -0400
+++ kdelibs-3.0.8/kparts/componentfactory.h 2002-10-10 11:16:35.407799000 -0400
@@ -229,7 +229,7 @@
return 0;
}
- return createPartInstanceFromLibrary<T>( library.local8Bit(), parentWidget,
+ return createPartInstanceFromLibrary<T>( (const char *) library.local8Bit(), parentWidget,
widgetName, parent, name, args, error );
}
More information about the kde-core-devel
mailing list