summaryrefslogtreecommitdiffstats
path: root/common/ssl_calls.c
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2017-03-12 09:35:00 -0700
committerjsorg71 <jay.sorg@gmail.com>2017-03-14 00:21:48 -0700
commit6ed4c969f4d646a7751fe2da29ba94eddd3d6477 (patch)
tree951c72b16a0be1a1cc8c77e6d2ecaa1f25f2bcd6 /common/ssl_calls.c
parent8be83473b72c926d3c056fd8a81965dbce0a0e5e (diff)
downloadxrdp-proprietary-6ed4c969f4d646a7751fe2da29ba94eddd3d6477.tar.gz
xrdp-proprietary-6ed4c969f4d646a7751fe2da29ba94eddd3d6477.zip
Eliminate APP_CC and DEFAULT_CC
Diffstat (limited to 'common/ssl_calls.c')
-rw-r--r--common/ssl_calls.c69
1 files changed, 34 insertions, 35 deletions
diff --git a/common/ssl_calls.c b/common/ssl_calls.c
index 1e50270b..f92cc972 100644
--- a/common/ssl_calls.c
+++ b/common/ssl_calls.c
@@ -85,28 +85,28 @@ ssl_finish(void)
/* rc4 stuff */
/*****************************************************************************/
-void *APP_CC
+void *
ssl_rc4_info_create(void)
{
return g_malloc(sizeof(RC4_KEY), 1);
}
/*****************************************************************************/
-void APP_CC
+void
ssl_rc4_info_delete(void *rc4_info)
{
g_free(rc4_info);
}
/*****************************************************************************/
-void APP_CC
+void
ssl_rc4_set_key(void *rc4_info, char *key, int len)
{
RC4_set_key((RC4_KEY *)rc4_info, len, (tui8 *)key);
}
/*****************************************************************************/
-void APP_CC
+void
ssl_rc4_crypt(void *rc4_info, char *data, int len)
{
RC4((RC4_KEY *)rc4_info, len, (tui8 *)data, (tui8 *)data);
@@ -115,35 +115,35 @@ ssl_rc4_crypt(void *rc4_info, char *data, int len)
/* sha1 stuff */
/*****************************************************************************/
-void *APP_CC
+void *
ssl_sha1_info_create(void)
{
return g_malloc(sizeof(SHA_CTX), 1);
}
/*****************************************************************************/
-void APP_CC
+void
ssl_sha1_info_delete(void *sha1_info)
{
g_free(sha1_info);
}
/*****************************************************************************/
-void APP_CC
+void
ssl_sha1_clear(void *sha1_info)
{
SHA1_Init((SHA_CTX *)sha1_info);
}
/*****************************************************************************/
-void APP_CC
+void
ssl_sha1_transform(void *sha1_info, const char *data, int len)
{
SHA1_Update((SHA_CTX *)sha1_info, data, len);
}
/*****************************************************************************/
-void APP_CC
+void
ssl_sha1_complete(void *sha1_info, char *data)
{
SHA1_Final((tui8 *)data, (SHA_CTX *)sha1_info);
@@ -152,35 +152,35 @@ ssl_sha1_complete(void *sha1_info, char *data)
/* md5 stuff */
/*****************************************************************************/
-void *APP_CC
+void *
ssl_md5_info_create(void)
{
return g_malloc(sizeof(MD5_CTX), 1);
}
/*****************************************************************************/
-void APP_CC
+void
ssl_md5_info_delete(void *md5_info)
{
g_free(md5_info);
}
/*****************************************************************************/
-void APP_CC
+void
ssl_md5_clear(void *md5_info)
{
MD5_Init((MD5_CTX *)md5_info);
}
/*****************************************************************************/
-void APP_CC
+void
ssl_md5_transform(void *md5_info, char *data, int len)
{
MD5_Update((MD5_CTX *)md5_info, data, len);
}
/*****************************************************************************/
-void APP_CC
+void
ssl_md5_complete(void *md5_info, char *data)
{
MD5_Final((tui8 *)data, (MD5_CTX *)md5_info);
@@ -189,7 +189,7 @@ ssl_md5_complete(void *md5_info, char *data)
/* FIPS stuff */
/*****************************************************************************/
-void *APP_CC
+void *
ssl_des3_encrypt_info_create(const char *key, const char* ivec)
{
EVP_CIPHER_CTX *des3_ctx;
@@ -205,7 +205,7 @@ ssl_des3_encrypt_info_create(const char *key, const char* ivec)
}
/*****************************************************************************/
-void *APP_CC
+void *
ssl_des3_decrypt_info_create(const char *key, const char* ivec)
{
EVP_CIPHER_CTX *des3_ctx;
@@ -221,7 +221,7 @@ ssl_des3_decrypt_info_create(const char *key, const char* ivec)
}
/*****************************************************************************/
-void APP_CC
+void
ssl_des3_info_delete(void *des3)
{
EVP_CIPHER_CTX *des3_ctx;
@@ -234,7 +234,7 @@ ssl_des3_info_delete(void *des3)
}
/*****************************************************************************/
-int APP_CC
+int
ssl_des3_encrypt(void *des3, int length, const char *in_data, char *out_data)
{
EVP_CIPHER_CTX *des3_ctx;
@@ -251,7 +251,7 @@ ssl_des3_encrypt(void *des3, int length, const char *in_data, char *out_data)
}
/*****************************************************************************/
-int APP_CC
+int
ssl_des3_decrypt(void *des3, int length, const char *in_data, char *out_data)
{
EVP_CIPHER_CTX *des3_ctx;
@@ -268,7 +268,7 @@ ssl_des3_decrypt(void *des3, int length, const char *in_data, char *out_data)
}
/*****************************************************************************/
-void * APP_CC
+void *
ssl_hmac_info_create(void)
{
HMAC_CTX *hmac_ctx;
@@ -278,7 +278,7 @@ ssl_hmac_info_create(void)
}
/*****************************************************************************/
-void APP_CC
+void
ssl_hmac_info_delete(void *hmac)
{
HMAC_CTX *hmac_ctx;
@@ -291,7 +291,7 @@ ssl_hmac_info_delete(void *hmac)
}
/*****************************************************************************/
-void APP_CC
+void
ssl_hmac_sha1_init(void *hmac, const char *data, int len)
{
HMAC_CTX *hmac_ctx;
@@ -301,7 +301,7 @@ ssl_hmac_sha1_init(void *hmac, const char *data, int len)
}
/*****************************************************************************/
-void APP_CC
+void
ssl_hmac_transform(void *hmac, const char *data, int len)
{
HMAC_CTX *hmac_ctx;
@@ -313,7 +313,7 @@ ssl_hmac_transform(void *hmac, const char *data, int len)
}
/*****************************************************************************/
-void APP_CC
+void
ssl_hmac_complete(void *hmac, char *data, int len)
{
HMAC_CTX *hmac_ctx;
@@ -327,7 +327,7 @@ ssl_hmac_complete(void *hmac, char *data, int len)
}
/*****************************************************************************/
-static void APP_CC
+static void
ssl_reverse_it(char *p, int len)
{
int i;
@@ -348,7 +348,7 @@ ssl_reverse_it(char *p, int len)
}
/*****************************************************************************/
-int APP_CC
+int
ssl_mod_exp(char *out, int out_len, const char *in, int in_len,
const char *mod, int mod_len, const char *exp, int exp_len)
{
@@ -410,7 +410,7 @@ ssl_mod_exp(char *out, int out_len, const char *in, int in_len,
/* returns error
generates a new rsa key
exp is passed in and mod and pri are passed out */
-int APP_CC
+int
ssl_gen_key_xrdp1(int key_size_in_bits, const char *exp, int exp_len,
char *mod, int mod_len, char *pri, int pri_len)
{
@@ -486,7 +486,6 @@ ssl_gen_key_xrdp1(int key_size_in_bits, const char *exp, int exp_len,
/*****************************************************************************/
struct ssl_tls *
-APP_CC
ssl_tls_create(struct trans *trans, const char *key, const char *cert)
{
struct ssl_tls *self;
@@ -508,7 +507,7 @@ ssl_tls_create(struct trans *trans, const char *key, const char *cert)
}
/*****************************************************************************/
-int APP_CC
+int
ssl_tls_print_error(const char *func, SSL *connection, int value)
{
switch (SSL_get_error(connection, value))
@@ -538,7 +537,7 @@ ssl_tls_print_error(const char *func, SSL *connection, int value)
}
/*****************************************************************************/
-int APP_CC
+int
ssl_tls_accept(struct ssl_tls *self, long ssl_protocols,
const char *tls_ciphers)
{
@@ -665,7 +664,7 @@ ssl_tls_accept(struct ssl_tls *self, long ssl_protocols,
/*****************************************************************************/
/* returns error, */
-int APP_CC
+int
ssl_tls_disconnect(struct ssl_tls *self)
{
int status;
@@ -699,7 +698,7 @@ ssl_tls_disconnect(struct ssl_tls *self)
}
/*****************************************************************************/
-void APP_CC
+void
ssl_tls_delete(struct ssl_tls *self)
{
if (self != NULL)
@@ -717,7 +716,7 @@ ssl_tls_delete(struct ssl_tls *self)
}
/*****************************************************************************/
-int APP_CC
+int
ssl_tls_read(struct ssl_tls *tls, char *data, int length)
{
int status;
@@ -766,7 +765,7 @@ ssl_tls_read(struct ssl_tls *tls, char *data, int length)
}
/*****************************************************************************/
-int APP_CC
+int
ssl_tls_write(struct ssl_tls *tls, const char *data, int length)
{
int status;
@@ -811,7 +810,7 @@ ssl_tls_write(struct ssl_tls *tls, const char *data, int length)
/*****************************************************************************/
/* returns boolean */
-int APP_CC
+int
ssl_tls_can_recv(struct ssl_tls *tls, int sck, int millis)
{
if (SSL_pending(tls->ssl) > 0)