• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

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

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal