• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kio/kssl
 

kio/kssl

  • kio
  • kssl
kopenssl.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2001-2003 George Staikos <staikos@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 
20 // IF YOU ARE USING THIS CLASS, YOU ARE MAKING A MISTAKE.
21 
22 #ifndef __KOPENSSLPROXY_H
23 #define __KOPENSSLPROXY_H
24 
25 #define KOSSL KOpenSSLProxy
26 class KOpenSSLProxyPrivate;
27 
28 #include <klibloader.h>
29 
30 #ifdef Q_WS_WIN
31 #include "ksslconfig_win.h"
32 #else
33 #include "ksslconfig.h"
34 #endif
35 
36 #ifdef KSSL_HAVE_SSL
37 #define crypt _openssl_crypt
38 #include <openssl/ssl.h>
39 #include <openssl/x509.h>
40 #include <openssl/x509v3.h>
41 #include <openssl/pem.h>
42 #include <openssl/bio.h>
43 #include <openssl/rand.h>
44 #include <openssl/asn1.h>
45 #include <openssl/pkcs7.h>
46 #include <openssl/pkcs12.h>
47 #include <openssl/evp.h>
48 #include <openssl/stack.h>
49 #include <openssl/bn.h>
50 #undef crypt
51 #if OPENSSL_VERSION_NUMBER >= 0x10000000L
52 #define STACK _STACK
53 #endif
54 #endif
55 
56 #include <kstaticdeleter.h>
57 
66 class KIO_EXPORT KOpenSSLProxy {
67 friend class KStaticDeleter<KOpenSSLProxy>;
68 public:
69 
74  static KOpenSSLProxy *self();
75 
79  bool hasLibCrypto() const;
80 
84  bool hasLibSSL() const;
85 
90  void destroy();
91 
92  // Here are the symbols that we need.
93 #ifdef KSSL_HAVE_SSL
94 
95  /*
96  * SSL_connect - initiate the TLS/SSL handshake with an TLS/SSL server
97  */
98  int SSL_connect(SSL *ssl);
99 
100  /*
101  * SSL_accept - initiate the TLS/SSL handshake with an TLS/SSL server
102  */
103  int SSL_accept(SSL *ssl);
104 
105  /*
106  * SSL_get_error - get the error code
107  */
108  int SSL_get_error(SSL *ssl, int rc);
109 
110  /*
111  * SSL_read - read bytes from a TLS/SSL connection.
112  */
113  int SSL_read(SSL *ssl, void *buf, int num);
114 
115  /*
116  * SSL_write - write bytes to a TLS/SSL connection.
117  */
118  int SSL_write(SSL *ssl, const void *buf, int num);
119 
120  /*
121  * SSL_new - create a new SSL structure for a connection
122  */
123  SSL *SSL_new(SSL_CTX *ctx);
124 
125  /*
126  * SSL_free - free an allocated SSL structure
127  */
128  void SSL_free(SSL *ssl);
129 
130  /*
131  * SSL_shutdown - shutdown an allocated SSL connection
132  */
133  int SSL_shutdown(SSL *ssl);
134 
135  /*
136  * SSL_CTX_new - create a new SSL_CTX object as framework for TLS/SSL enabled functions
137  */
138  SSL_CTX *SSL_CTX_new(SSL_METHOD *method);
139 
140  /*
141  * SSL_CTX_free - free an allocated SSL_CTX object
142  */
143  void SSL_CTX_free(SSL_CTX *ctx);
144 
145  /*
146  * SSL_set_fd - connect the SSL object with a file descriptor
147  */
148  int SSL_set_fd(SSL *ssl, int fd);
149 
150  /*
151  * SSL_pending - obtain number of readable bytes buffered in an SSL object
152  */
153  int SSL_pending(SSL *ssl);
154 
155  /*
156  * SSL_peek - obtain bytes buffered in an SSL object
157  */
158  int SSL_peek(SSL *ssl, void *buf, int num);
159 
160  /*
161  * SSL_CTX_set_cipher_list - choose list of available SSL_CIPHERs
162  */
163  int SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str);
164 
165  /*
166  * SSL_CTX_set_verify - set peer certificate verification parameters
167  */
168  void SSL_CTX_set_verify(SSL_CTX *ctx, int mode,
169  int (*verify_callback)(int, X509_STORE_CTX *));
170 
171  /*
172  * SSL_use_certificate - load certificate
173  */
174  int SSL_use_certificate(SSL *ssl, X509 *x);
175 
176  /*
177  * SSL_get_current_cipher - get SSL_CIPHER of a connection
178  */
179  SSL_CIPHER *SSL_get_current_cipher(SSL *ssl);
180 
181  /*
182  * SSL_set_options - manipulate SSL engine options
183  * Note: These are all mapped to SSL_ctrl so call them as the comment
184  * specifies but know that they use SSL_ctrl. They are #define
185  * so they will map to the one in this class if called as a
186  * member function of this class.
187  */
188  /* long SSL_set_options(SSL *ssl, long options); */
189  /* Returns 0 if not reused, 1 if session id is reused */
190  /* int SSL_session_reused(SSL *ssl); */
191  long SSL_ctrl(SSL *ssl,int cmd, long larg, char *parg);
192 
193  /*
194  * RAND_egd - set the path to the EGD
195  */
196  int RAND_egd(const char *path);
197 
198 
199  /*
200  * RAND_file_name
201  */
202  const char *RAND_file_name(char *buf, size_t num);
203 
204 
205  /*
206  * RAND_load_file
207  */
208  int RAND_load_file(const char *filename, long max_bytes);
209 
210 
211  /*
212  * RAND_write_file
213  */
214  int RAND_write_file(const char *filename);
215 
216 
217  /*
218  * TLSv1_client_method - return a TLSv1 client method object
219  */
220  SSL_METHOD *TLSv1_client_method();
221 
222 
223  /*
224  * SSLv2_client_method - return a SSLv2 client method object
225  */
226  SSL_METHOD *SSLv2_client_method();
227 
228 
229  /*
230  * SSLv3_client_method - return a SSLv3 client method object
231  */
232  SSL_METHOD *SSLv3_client_method();
233 
234 
235  /*
236  * SSLv23_client_method - return a SSLv23 client method object
237  */
238  SSL_METHOD *SSLv23_client_method();
239 
240 
241  /*
242  * SSL_get_peer_certificate - return the peer's certificate
243  */
244  X509 *SSL_get_peer_certificate(SSL *s);
245 
246 
247  /*
248  * SSL_get_peer_cert_chain - get the peer's certificate chain
249  */
250  STACK_OF(X509) *SSL_get_peer_cert_chain(SSL *s);
251 
252  /*
253  * SSL_CIPHER_get_bits - get the number of bits in this cipher
254  */
255  int SSL_CIPHER_get_bits(SSL_CIPHER *c,int *alg_bits);
256 
257 
258  /*
259  * SSL_CIPHER_get_version - get the version of this cipher
260  */
261  char *SSL_CIPHER_get_version(SSL_CIPHER *c);
262 
263 
264  /*
265  * SSL_CIPHER_get_name - get the name of this cipher
266  */
267  const char *SSL_CIPHER_get_name(SSL_CIPHER *c);
268 
269 
270  /*
271  * SSL_CIPHER_description - get the description of this cipher
272  */
273  char *SSL_CIPHER_description(SSL_CIPHER *,char *buf,int size);
274 
275 
276  /*
277  * SSL_CTX_use_PrivateKey - set the private key for the session.
278  * - for use with client certificates
279  */
280  int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey);
281 
282 
283  /*
284  * SSL_CTX_use_certificate - set the client certificate for the session.
285  */
286  int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x);
287 
288 
289  /*
290  * d2i_X509 - Covert a text representation of X509 to an X509 object
291  */
292  X509 * d2i_X509(X509 **a,unsigned char **pp,long length);
293 
294 
295  /*
296  * i2d_X509 - Covert an X509 object into a text representation
297  */
298  int i2d_X509(X509 *a,unsigned char **pp);
299 
300 
301  /*
302  * X509_cmp - compare two X509 objects
303  */
304  int X509_cmp(X509 *a, X509 *b);
305 
306 
307  /*
308  * X509_dup - duplicate an X509 object
309  */
310  X509 *X509_dup(X509 *x509);
311 
312 
313  /*
314  * X509_STORE_CTX_new - create an X509 store context
315  */
316  X509_STORE_CTX *X509_STORE_CTX_new(void);
317 
318 
319  /*
320  * X509_STORE_CTX_free - free up an X509 store context
321  */
322  void X509_STORE_CTX_free(X509_STORE_CTX *v);
323 
324 
325  /*
326  * X509_STORE_CTX_set_chain - set the certificate chain
327  */
328  void X509_STORE_CTX_set_chain(X509_STORE_CTX *v, STACK_OF(X509)* x);
329 
330  /*
331  * X509_STORE_CTX_set_purpose - set the purpose of the certificate
332  */
333  void X509_STORE_CTX_set_purpose(X509_STORE_CTX *v, int purpose);
334 
335  /*
336  * X509_verify_cert - verify the certificate
337  */
338  int X509_verify_cert(X509_STORE_CTX *v);
339 
340 
341  /*
342  * X509_STORE_new - create an X509 store
343  */
344  X509_STORE *X509_STORE_new(void);
345 
346 
347  /*
348  * X509_STORE_free - free up an X509 store
349  */
350  void X509_STORE_free(X509_STORE *v);
351 
352 
353  /*
354  * X509_free - free up an X509
355  */
356  void X509_free(X509 *v);
357 
358 
359  /*
360  * X509_NAME_oneline - return the X509 data in a string
361  */
362  char *X509_NAME_oneline(X509_NAME *a, char *buf, int size);
363 
364 
365  /*
366  * X509_get_subject_name - return the X509_NAME for the subject field
367  */
368  X509_NAME *X509_get_subject_name(X509 *a);
369 
370 
371  /*
372  * X509_get_issuer_name - return the X509_NAME for the issuer field
373  */
374  X509_NAME *X509_get_issuer_name(X509 *a);
375 
376 
377  /*
378  * X509_STORE_add_lookup - add a lookup file/method to an X509 store
379  */
380  X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m);
381 
382 
383  /*
384  * X509_LOOKUP_file - Definition of the LOOKUP_file method
385  */
386  X509_LOOKUP_METHOD *X509_LOOKUP_file(void);
387 
388 
389  /*
390  * X509_LOOKUP_free - Free an X509_LOOKUP
391  */
392  void X509_LOOKUP_free(X509_LOOKUP *x);
393 
394 
395  /*
396  * X509_LOOKUP_ctrl - This is not normally called directly (use macros)
397  */
398  int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, char **ret);
399 
400 
401  /*
402  * X509_STORE_CTX_init - initialize an X509 STORE context
403  */
404  void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, STACK_OF(X509) *chain);
405 
406 
407  /*
408  * CRYPTO_free - free up an internally allocated object
409  */
410  void CRYPTO_free(void *x);
411 
412  /*
413  * BIO_new - create new BIO
414  */
415  BIO *BIO_new(BIO_METHOD *type);
416 
417  /*
418  * BIO methods - only one defined here yet
419  */
420  BIO_METHOD *BIO_s_mem(void);
421 
422  /*
423  * BIO_new_fp - nastiness called BIO - used to create BIO* from FILE*
424  */
425  BIO *BIO_new_fp(FILE *stream, int close_flag);
426 
427  /*
428  * BIO_new_mem_buf - read only BIO from memory region
429  */
430  BIO *BIO_new_mem_buf(void *buf, int len);
431 
432  /*
433  * BIO_free - nastiness called BIO - used to destroy BIO*
434  */
435  int BIO_free(BIO *a);
436 
437  /*
438  * BIO_ctrl - BIO control method
439  */
440  long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg);
441 
442  /*
443  * BIO_write - equivalent to ::write for BIO
444  */
445  int BIO_write(BIO *b, const void *data, int len);
446 
447  /*
448  * PEM_write_bio_X509 - write a PEM encoded cert to a BIO*
449  */
450  int PEM_write_bio_X509(BIO *bp, X509 *x);
451 
452 #if OPENSSL_VERSION_NUMBER < 0x10000000L
453  /*
454  * X509_asn1_meth - used for netscape output
455  */
456  ASN1_METHOD *X509_asn1_meth();
457 #endif
458 
459  /*
460  * ASN1_i2d_fp - used for netscape output
461  */
462  int ASN1_i2d_fp(FILE *out, unsigned char *x);
463 
464 
465  /*
466  * ASN1_d2i_fp - read an X509 from a DER encoded file (buf can be NULL)
467  */
468  X509 *X509_d2i_fp(FILE *out, X509** buf);
469 
470 
471  /*
472  * X509_print - print the text form of an X509
473  */
474  int X509_print(FILE *fp, X509 *x);
475 
476 
477  /*
478  * Read a PKCS#12 cert from fp
479  */
480  PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12);
481 
482 
483  /*
484  * Change the password on a PKCS#12 cert
485  */
486  int PKCS12_newpass(PKCS12 *p12, char *oldpass, char *newpass);
487 
488 
489  /*
490  * Write a PKCS#12 to mem
491  */
492  int i2d_PKCS12(PKCS12 *p12, unsigned char **p);
493 
494 
495  /*
496  * Write a PKCS#12 to FILE*
497  */
498  int i2d_PKCS12_fp(FILE *fp, PKCS12 *p12);
499 
500 
501  /*
502  * Create a new PKCS#12 object
503  */
504  PKCS12 *PKCS12_new(void);
505 
506 
507  /*
508  * Destroy that PKCS#12 that you created!
509  */
510  void PKCS12_free(PKCS12 *a);
511 
512 
513  /*
514  * Parse the PKCS#12
515  */
516  int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey,
517  X509 **cert, STACK_OF(X509) **ca);
518 
519 
520  /*
521  * Free the Private Key
522  */
523  void EVP_PKEY_free(EVP_PKEY *x);
524 
525 
526  /*
527  * Pop off the stack
528  */
529  char *sk_pop(STACK *s);
530 
531 
532  /*
533  * Free the stack
534  */
535  void sk_free(STACK *s);
536 
537 #if OPENSSL_VERSION_NUMBER >= 0x10000000L
538  void sk_free(void *s) { return sk_free(reinterpret_cast<STACK*>(s)); }
539 #endif
540 
541  /*
542  * Number of elements in the stack
543  */
544  int sk_num(STACK *s);
545 
546 
547  /*
548  * Value of element n in the stack
549  */
550  char *sk_value(STACK *s, int n);
551 
552 #if OPENSSL_VERSION_NUMBER >= 0x10000000L
553  char *sk_value(void *s, int n) { return sk_value(reinterpret_cast<STACK*>(s), n); }
554 #endif
555 
556  /*
557  * Create a new stack
558  */
559  STACK *sk_new(int (*cmp)());
560 
561 
562  /*
563  * Add an element to the stack
564  */
565  int sk_push(STACK *s, char *d);
566 
567 #if OPENSSL_VERSION_NUMBER >= 0x10000000L
568  int sk_push(void *s, void *d) { return sk_push(reinterpret_cast<STACK*>(s), reinterpret_cast<char*>(d)); }
569 #endif
570 
571  /*
572  * Duplicate the stack
573  */
574  STACK *sk_dup(STACK *s);
575 
576 
577  /*
578  * Convert an ASN1_INTEGER to it's text form
579  */
580  char *i2s_ASN1_INTEGER(X509V3_EXT_METHOD *meth, ASN1_INTEGER *aint);
581 
582 
583  /*
584  * Get the certificate's serial number
585  */
586  ASN1_INTEGER *X509_get_serialNumber(X509 *x);
587 
588 
589  /*
590  * Get the certificate's public key
591  */
592  EVP_PKEY *X509_get_pubkey(X509 *x);
593 
594 
595  /*
596  * Convert the public key to a decimal form
597  */
598  int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp);
599 
600 
601  /*
602  * Check the private key of a PKCS bundle against the X509
603  */
604  int X509_check_private_key(X509 *x, EVP_PKEY *p);
605 
606 
607  /*
608  * Convert a BIGNUM to a hex string
609  */
610  char *BN_bn2hex(const BIGNUM *a);
611 
612 
613  /*
614  * Compute the digest of an X.509
615  */
616  int X509_digest(const X509 *x,const EVP_MD *t, unsigned char *md, unsigned int *len);
617 
618 
619  /*
620  * EVP_md5
621  */
622  EVP_MD *EVP_md5();
623 
624 
625  /*
626  * ASN1_INTEGER free
627  */
628  void ASN1_INTEGER_free(ASN1_INTEGER *x);
629 
630 
631  /*
632  * ASN1_STRING_data
633  */
634  unsigned char *ASN1_STRING_data(ASN1_STRING *x);
635 
636  /*
637  * ASN1_STRING_length
638  */
639  int ASN1_STRING_length(ASN1_STRING *x);
640 
641  /*
642  *
643  */
644  int OBJ_obj2nid(ASN1_OBJECT *o);
645 
646  /*
647  *
648  */
649  const char * OBJ_nid2ln(int n);
650 
651  /*
652  * get the number of extensions
653  */
654  int X509_get_ext_count(X509 *x);
655 
656  /*
657  *
658  */
659  int X509_get_ext_by_NID(X509 *x, int nid, int lastpos);
660 
661  /*
662  *
663  */
664  int X509_get_ext_by_OBJ(X509 *x,ASN1_OBJECT *obj,int lastpos);
665 
666  /*
667  *
668  */
669  X509_EXTENSION *X509_get_ext(X509 *x, int loc);
670 
671  /*
672  *
673  */
674  X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
675 
676  /*
677  *
678  */
679  int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
680 
681  /*
682  *
683  */
684  void *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);
685 
686  /*
687  *
688  */
689  char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *ia5);
690 
691  /*
692  *
693  */
694  int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n);
695 
696  /*
697  *
698  */
699  PKCS7 *PKCS7_new(void);
700 
701  /*
702  *
703  */
704  void PKCS7_free(PKCS7 *a);
705 
706  /*
707  *
708  */
709  void PKCS7_content_free(PKCS7 *a);
710 
711  /*
712  *
713  */
714  int i2d_PKCS7(PKCS7 *a, unsigned char **pp);
715 
716  /*
717  *
718  */
719  PKCS7 *d2i_PKCS7(PKCS7 **a, unsigned char **pp,long length);
720 
721  /*
722  *
723  */
724  int i2d_PKCS7_fp(FILE *fp,PKCS7 *p7);
725 
726  /*
727  *
728  */
729  PKCS7 *d2i_PKCS7_fp(FILE *fp,PKCS7 **p7);
730 
731  /*
732  *
733  */
734  int i2d_PKCS7_bio(BIO *bp,PKCS7 *p7);
735 
736  /*
737  *
738  */
739  PKCS7 *d2i_PKCS7_bio(BIO *bp,PKCS7 **p7);
740 
741  /*
742  *
743  */
744  PKCS7 *PKCS7_dup(PKCS7 *p7);
745 
746  /*
747  * Create a PKCS7 signature / signed message
748  */
749  PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
750  BIO *data, int flags);
751 
752  /*
753  * Verify a PKCS7 signature.
754  */
755  int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
756  BIO *indata, BIO *out, int flags);
757 
758  /*
759  * Get signers of a verified PKCS7 signature
760  */
761  STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags);
762 
763  /*
764  * PKCS7 encrypt message
765  */
766  PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, EVP_CIPHER *cipher,
767  int flags);
768 
769  /*
770  * decrypt PKCS7 message
771  */
772  int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags);
773 
774 
775  /*
776  * Load a CA list file.
777  */
778  STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
779 
780  /*
781  * Load a file of PEM encoded objects.
782  */
783  STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
784  pem_password_cb *cb, void *u);
785 
786  /*
787  * Get the number of purposes available
788  */
789  int X509_PURPOSE_get_count();
790 
791 
792  /*
793  * Get the ID of a purpose
794  */
795  int X509_PURPOSE_get_id(X509_PURPOSE *);
796 
797 
798  /*
799  * Check the existence of purpose id "id" in x. for CA, set ca = 1, else 0
800  */
801  int X509_check_purpose(X509 *x, int id, int ca);
802 
803 
804  /*
805  * Get the purpose with index #idx
806  */
807  X509_PURPOSE * X509_PURPOSE_get0(int idx);
808 
809 
810  /*
811  * Create a new Private KEY
812  */
813  EVP_PKEY* EVP_PKEY_new();
814 
815 
816  /*
817  * Assign a private key
818  */
819  int EVP_PKEY_assign(EVP_PKEY *pkey, int type, char *key);
820 
821 
822  /*
823  * Generate a RSA key
824  */
825  RSA *RSA_generate_key(int bits, unsigned long e, void
826  (*callback)(int,int,void *), void *cb_arg);
827 
828 
829  /*
830  * Create/destroy a certificate request
831  */
832  X509_REQ *X509_REQ_new();
833  void X509_REQ_free(X509_REQ *a);
834 
835 
836  /*
837  * Set the public key in the REQ object
838  */
839  int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
840 
841  /* for testing */
842  int i2d_X509_REQ_fp(FILE *fp, X509_REQ *x);
843 
844  /* SMime support */
845  STACK *X509_get1_email(X509 *x);
846  void X509_email_free(STACK *sk);
847 
848  /* Ciphers needed for SMime */
849  EVP_CIPHER *EVP_des_ede3_cbc();
850  EVP_CIPHER *EVP_des_cbc();
851  EVP_CIPHER *EVP_rc2_cbc();
852  EVP_CIPHER *EVP_rc2_64_cbc();
853  EVP_CIPHER *EVP_rc2_40_cbc();
854 
855  /* clear the current error - use this often*/
856  void ERR_clear_error();
857 
858  /* retrieve the latest error */
859  unsigned long ERR_get_error();
860 
861  /* Print the errors to this stream */
862  void ERR_print_errors_fp(FILE *fp);
863 
864  /* Get a pointer to the SSL session id (reference counted) */
865  SSL_SESSION *SSL_get1_session(SSL *ssl);
866 
867  /* Frees a pointer to the SSL session id (reference decremented if needed) */
868  void SSL_SESSION_free(SSL_SESSION *session);
869 
870  /* Set the SSL session to reuse. */
871  int SSL_set_session(SSL *ssl, SSL_SESSION *session);
872 
873  /* Decode ASN.1 to SSL_SESSION */
874  SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, long length);
875  /* Encode SSL_SESSION to ASN.1 */
876  int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp);
877 
878  /* Write privatekey to FILE stream */
879  int i2d_PrivateKey_fp(FILE*, EVP_PKEY*);
880 
881  /* Write PKCS#8privatekey to FILE stream */
882  int i2d_PKCS8PrivateKey_fp(FILE*, EVP_PKEY*, const EVP_CIPHER*, char*, int, pem_password_cb*, void*);
883 
884  /* Free RSA structure */
885  void RSA_free(RSA*);
886 
887  /* Get a blowfish CBC pointer */
888  EVP_CIPHER *EVP_bf_cbc();
889 
890  /* Sign a CSR */
891  int X509_REQ_sign(X509_REQ*, EVP_PKEY*, const EVP_MD*);
892 
893  /* add a name entry */
894  int X509_NAME_add_entry_by_txt(X509_NAME*, char*, int, unsigned char*, int, int, int);
895 
896  /* Create a name */
897  X509_NAME *X509_NAME_new();
898 
899  /* Set the subject */
900  int X509_REQ_set_subject_name(X509_REQ*,X509_NAME*);
901 
902  /* get list of available SSL_CIPHER's sorted by preference */
903  STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL* ssl);
904 
905 #endif
906 
907 private:
908  KOpenSSLProxy();
909  ~KOpenSSLProxy();
910  KOpenSSLProxyPrivate *d;
911 
912  KLibrary *_sslLib;
913  KLibrary *_cryptoLib;
914  static KOpenSSLProxy *_me;
915 
916  bool _ok;
917 };
918 
919 #endif
920 

kio/kssl

Skip menu "kio/kssl"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kio/kssl

Skip menu "kio/kssl"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kio/kssl by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |