[sr-dev] git:master: tls: two small code cleanups

Henning Westerholt henning.westerholt at 1und1.de
Thu Jul 28 23:59:02 CEST 2011


Module: sip-router
Branch: master
Commit: e17e7fa307a5f43d210b6cf31afaedf7d6622c6c
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e17e7fa307a5f43d210b6cf31afaedf7d6622c6c

Author: Henning Westerholt <henning.westerholt at 1und1.de>
Committer: Henning Westerholt <henning.westerholt at 1und1.de>
Date:   Thu Jul 28 22:26:24 2011 +0200

tls: two small code cleanups

---

 modules/tls/tls_domain.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/modules/tls/tls_domain.c b/modules/tls/tls_domain.c
index e6cae06..07fe4b8 100644
--- a/modules/tls/tls_domain.c
+++ b/modules/tls/tls_domain.c
@@ -68,10 +68,6 @@ tls_domain_t* tls_new_domain(int type, struct ip_addr *ip, unsigned short port)
 	d->verify_depth = -1;
 	d->require_cert = -1;
 	return d;
-/*
- error:
-	shm_free(d);
-	return 0; */
 }
 
 
@@ -831,7 +827,6 @@ static int passwd_cb(char *buf, int size, int rwflag, void *filename)
 }
 
 
-#define NUM_RETRIES 3
 /**
  * @brief Load a private key from a file 
  * @param d TLS domain
@@ -854,7 +849,7 @@ static int load_private_key(tls_domain_t* d)
 		SSL_CTX_set_default_passwd_cb(d->ctx[i], passwd_cb);
 		SSL_CTX_set_default_passwd_cb_userdata(d->ctx[i], d->pkey_file.s);
 		
-		for(idx = 0, ret_pwd = 0; idx < NUM_RETRIES; idx++) {
+		for(idx = 0, ret_pwd = 0; idx < 3; idx++) {
 			ret_pwd = SSL_CTX_use_PrivateKey_file(d->ctx[i], d->pkey_file.s,
 					SSL_FILETYPE_PEM);
 			if (ret_pwd) {




More information about the sr-dev mailing list