/[rdesktop]/sourceforge.net/trunk/rdesktop/ssl.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /sourceforge.net/trunk/rdesktop/ssl.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1475 - (hide annotations)
Fri Jul 11 03:51:23 2008 UTC (15 years, 11 months ago) by jsorg71
File MIME type: text/plain
File size: 2440 byte(s)
update the copyright year

1 jsorg71 1374 /* -*- c-basic-offset: 8 -*-
2     rdesktop: A Remote Desktop Protocol client.
3     Secure sockets abstraction layer
4 jsorg71 1475 Copyright (C) Matthew Chapman 1999-2008
5     Copyright (C) Jay Sorg 2006-2008
6 jsorg71 1374
7     This program is free software; you can redistribute it and/or modify
8     it under the terms of the GNU General Public License as published by
9     the Free Software Foundation; either version 2 of the License, or
10     (at your option) any later version.
11    
12     This program is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     GNU General Public License for more details.
16    
17     You should have received a copy of the GNU General Public License
18     along with this program; if not, write to the Free Software
19     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20     */
21    
22     #ifndef _SSL_H
23     #define _SSL_H
24    
25     #include <openssl/rc4.h>
26     #include <openssl/md5.h>
27     #include <openssl/sha.h>
28     #include <openssl/bn.h>
29     #include <openssl/x509v3.h>
30    
31     #if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x0090800f)
32     #define D2I_X509_CONST const
33     #else
34     #define D2I_X509_CONST
35     #endif
36    
37     #define SSL_RC4 RC4_KEY
38     #define SSL_SHA1 SHA_CTX
39     #define SSL_MD5 MD5_CTX
40     #define SSL_CERT X509
41     #define SSL_RKEY RSA
42    
43 jsorg71 1377 void ssl_sha1_init(SSL_SHA1 * sha1);
44     void ssl_sha1_update(SSL_SHA1 * sha1, uint8 * data, uint32 len);
45     void ssl_sha1_final(SSL_SHA1 * sha1, uint8 * out_data);
46     void ssl_md5_init(SSL_MD5 * md5);
47     void ssl_md5_update(SSL_MD5 * md5, uint8 * data, uint32 len);
48     void ssl_md5_final(SSL_MD5 * md5, uint8 * out_data);
49     void ssl_rc4_set_key(SSL_RC4 * rc4, uint8 * key, uint32 len);
50     void ssl_rc4_crypt(SSL_RC4 * rc4, uint8 * in_data, uint8 * out_data, uint32 len);
51 jsorg71 1378 void ssl_rsa_encrypt(uint8 * out, uint8 * in, int len, uint32 modulus_size, uint8 * modulus,
52     uint8 * exponent);
53 jsorg71 1377 SSL_CERT *ssl_cert_read(uint8 * data, uint32 len);
54     void ssl_cert_free(SSL_CERT * cert);
55     SSL_RKEY *ssl_cert_to_rkey(SSL_CERT * cert, uint32 * key_len);
56     RD_BOOL ssl_certs_ok(SSL_CERT * server_cert, SSL_CERT * cacert);
57     int ssl_cert_print_fp(FILE * fp, SSL_CERT * cert);
58     void ssl_rkey_free(SSL_RKEY * rkey);
59 jsorg71 1378 int ssl_rkey_get_exp_mod(SSL_RKEY * rkey, uint8 * exponent, uint32 max_exp_len, uint8 * modulus,
60     uint32 max_mod_len);
61     RD_BOOL ssl_sig_ok(uint8 * exponent, uint32 exp_len, uint8 * modulus, uint32 mod_len,
62     uint8 * signature, uint32 sig_len);
63 jsorg71 1374
64     #endif

  ViewVC Help
Powered by ViewVC 1.1.26