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

KIO

  • 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  * ASN1_STRING_data
612  */
613  unsigned char *ASN1_STRING_data(ASN1_STRING *x);
614 
615  /*
616  * ASN1_STRING_length
617  */
618  int ASN1_STRING_length(ASN1_STRING *x);
619 
620  /*
621  *
622  */
623  int OBJ_obj2nid(ASN1_OBJECT *o);
624 
625  /*
626  *
627  */
628  const char * OBJ_nid2ln(int n);
629 
630  /*
631  * get the number of extensions
632  */
633  int X509_get_ext_count(X509 *x);
634 
635  /*
636  *
637  */
638  int X509_get_ext_by_NID(X509 *x, int nid, int lastpos);
639 
640  /*
641  *
642  */
643  int X509_get_ext_by_OBJ(X509 *x,ASN1_OBJECT *obj,int lastpos);
644 
645  /*
646  *
647  */
648  X509_EXTENSION *X509_get_ext(X509 *x, int loc);
649 
650  /*
651  *
652  */
653  X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
654 
655  /*
656  *
657  */
658  int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
659 
660  /*
661  *
662  */
663  void *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);
664 
665  /*
666  *
667  */
668  char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *ia5);
669 
670  /*
671  *
672  */
673  int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n);
674 
675  /*
676  *
677  */
678  PKCS7 *PKCS7_new(void);
679 
680  /*
681  *
682  */
683  void PKCS7_free(PKCS7 *a);
684 
685  /*
686  *
687  */
688  void PKCS7_content_free(PKCS7 *a);
689 
690  /*
691  *
692  */
693  int i2d_PKCS7(PKCS7 *a, unsigned char **pp);
694 
695  /*
696  *
697  */
698  PKCS7 *d2i_PKCS7(PKCS7 **a, unsigned char **pp,long length);
699 
700  /*
701  *
702  */
703  int i2d_PKCS7_fp(FILE *fp,PKCS7 *p7);
704 
705  /*
706  *
707  */
708  PKCS7 *d2i_PKCS7_fp(FILE *fp,PKCS7 **p7);
709 
710  /*
711  *
712  */
713  int i2d_PKCS7_bio(BIO *bp,PKCS7 *p7);
714 
715  /*
716  *
717  */
718  PKCS7 *d2i_PKCS7_bio(BIO *bp,PKCS7 **p7);
719 
720  /*
721  *
722  */
723  PKCS7 *PKCS7_dup(PKCS7 *p7);
724 
725  /*
726  * Create a PKCS7 signature / signed message
727  */
728  PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
729  BIO *data, int flags);
730 
731  /*
732  * Verify a PKCS7 signature.
733  */
734  int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
735  BIO *indata, BIO *out, int flags);
736 
737  /*
738  * Get signers of a verified PKCS7 signature
739  */
740  STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags);
741 
742  /*
743  * PKCS7 encrypt message
744  */
745  PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, EVP_CIPHER *cipher,
746  int flags);
747 
748  /*
749  * decrypt PKCS7 message
750  */
751  int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags);
752 
753 
754  /*
755  * Load a CA list file.
756  */
757  STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
758 
759  /*
760  * Load a file of PEM encoded objects.
761  */
762  STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
763  pem_password_cb *cb, void *u);
764 
765  /*
766  * Get the number of purposes available
767  */
768  int X509_PURPOSE_get_count();
769 
770 
771  /*
772  * Get the ID of a purpose
773  */
774  int X509_PURPOSE_get_id(X509_PURPOSE *);
775 
776 
777  /*
778  * Check the existence of purpose id "id" in x. for CA, set ca = 1, else 0
779  */
780  int X509_check_purpose(X509 *x, int id, int ca);
781 
782 
783  /*
784  * Get the purpose with index #idx
785  */
786  X509_PURPOSE * X509_PURPOSE_get0(int idx);
787 
788 
789  /*
790  * Create a new Private KEY
791  */
792  EVP_PKEY* EVP_PKEY_new();
793 
794 
795  /*
796  * Assign a private key
797  */
798  int EVP_PKEY_assign(EVP_PKEY *pkey, int type, char *key);
799 
800 
801  /*
802  * Generate a RSA key
803  */
804  RSA *RSA_generate_key(int bits, unsigned long e, void
805  (*callback)(int,int,void *), void *cb_arg);
806 
807 
808  /*
809  * Create/destroy a certificate request
810  */
811  X509_REQ *X509_REQ_new();
812  void X509_REQ_free(X509_REQ *a);
813 
814 
815  /*
816  * Set the public key in the REQ object
817  */
818  int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
819 
820  /* for testing */
821  int i2d_X509_REQ_fp(FILE *fp, X509_REQ *x);
822 
823  /* SMime support */
824  STACK *X509_get1_email(X509 *x);
825  void X509_email_free(STACK *sk);
826 
827  /* Ciphers needed for SMime */
828  EVP_CIPHER *EVP_des_ede3_cbc();
829  EVP_CIPHER *EVP_des_cbc();
830  EVP_CIPHER *EVP_rc2_cbc();
831  EVP_CIPHER *EVP_rc2_64_cbc();
832  EVP_CIPHER *EVP_rc2_40_cbc();
833 
834  /* clear the current error - use this often*/
835  void ERR_clear_error();
836 
837  /* retrieve the latest error */
838  unsigned long ERR_get_error();
839 
840  /* Print the errors to this stream */
841  void ERR_print_errors_fp(FILE *fp);
842 
843  /* Get a pointer to the SSL session id (reference counted) */
844  SSL_SESSION *SSL_get1_session(SSL *ssl);
845 
846  /* Frees a pointer to the SSL session id (reference decremented if needed) */
847  void SSL_SESSION_free(SSL_SESSION *session);
848 
849  /* Set the SSL session to reuse. */
850  int SSL_set_session(SSL *ssl, SSL_SESSION *session);
851 
852  /* Decode ASN.1 to SSL_SESSION */
853  SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, long length);
854  /* Encode SSL_SESSION to ASN.1 */
855  int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp);
856 
857  /* Write privatekey to FILE stream */
858  int i2d_PrivateKey_fp(FILE*, EVP_PKEY*);
859 
860  /* Write PKCS#8privatekey to FILE stream */
861  int i2d_PKCS8PrivateKey_fp(FILE*, EVP_PKEY*, const EVP_CIPHER*, char*, int, pem_password_cb*, void*);
862 
863  /* Free RSA structure */
864  void RSA_free(RSA*);
865 
866  /* Get a blowfish CBC pointer */
867  EVP_CIPHER *EVP_bf_cbc();
868 
869  /* Sign a CSR */
870  int X509_REQ_sign(X509_REQ*, EVP_PKEY*, const EVP_MD*);
871 
872  /* add a name entry */
873  int X509_NAME_add_entry_by_txt(X509_NAME*, char*, int, unsigned char*, int, int, int);
874 
875  /* Create a name */
876  X509_NAME *X509_NAME_new();
877 
878  /* Set the subject */
879  int X509_REQ_set_subject_name(X509_REQ*,X509_NAME*);
880 
881  /* get list of available SSL_CIPHER's sorted by preference */
882  STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL* ssl);
883 
884 #endif
885 
886 private:
887  friend class KOpenSSLProxyPrivate;
888  KOpenSSLProxy();
889  ~KOpenSSLProxy();
890  KOpenSSLProxyPrivate * const d;
891 };
892 
893 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Wed Mar 20 2013 07:19:34 by doxygen 1.8.3.1 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-4.10.1 API Reference

Skip menu "kdelibs-4.10.1 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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