projects
/
project
/
ustream-ssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
506b660
)
return -1/0 instead of ssl specific return codes when setting crt/key files
author
Felix Fietkau
<
[email protected]
>
Fri, 4 Jan 2013 17:27:05 +0000
(18:27 +0100)
committer
Felix Fietkau
<
[email protected]
>
Fri, 4 Jan 2013 17:27:13 +0000
(18:27 +0100)
Signed-off-by: Felix Fietkau <
[email protected]
>
ustream-ssl.c
patch
|
blob
|
history
diff --git
a/ustream-ssl.c
b/ustream-ssl.c
index 471e29c10cdf31c9401746312fcd06479fa25433..ce32eb5761dfaf9ff1c4ca08e1ab32f3c9c20e2f 100644
(file)
--- a/
ustream-ssl.c
+++ b/
ustream-ssl.c
@@
-221,7
+221,10
@@
static int _ustream_ssl_context_set_crt_file(void *ctx, const char *file)
if (ret < 1)
ret = SSL_CTX_use_certificate_file(ctx, file, SSL_FILETYPE_ASN1);
- return ret;
+ if (ret < 1)
+ return -1;
+
+ return 0;
}
static int _ustream_ssl_context_set_key_file(void *ctx, const char *file)
@@
-232,7
+235,10
@@
static int _ustream_ssl_context_set_key_file(void *ctx, const char *file)
if (ret < 1)
ret = SSL_CTX_use_PrivateKey_file(ctx, file, SSL_FILETYPE_ASN1);
- return ret;
+ if (ret < 1)
+ return -1;
+
+ return 0;
}
static void _ustream_ssl_context_free(void *ctx)