diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-05-16 15:11:24 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-05-16 15:11:24 +0200 |
commit | 29ebd4ab3e391aea53b6e337061d226359aeb993 (patch) | |
tree | 4ae2c32da9e8ed71109a2de600911df6dfdbd0d5 /runtime/nsd_gtls.c | |
parent | ffa17a25d2c2098d4977d377cbf20d0136fea820 (diff) | |
parent | dfb1f20ce71e69bf164c9b1d59e0b4cd9f81c252 (diff) | |
download | rsyslog-29ebd4ab3e391aea53b6e337061d226359aeb993.tar.gz rsyslog-29ebd4ab3e391aea53b6e337061d226359aeb993.tar.xz rsyslog-29ebd4ab3e391aea53b6e337061d226359aeb993.zip |
Merge branch 'master' into ietf-tls
Diffstat (limited to 'runtime/nsd_gtls.c')
-rw-r--r-- | runtime/nsd_gtls.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/nsd_gtls.c b/runtime/nsd_gtls.c index 3edaf68f..60685de7 100644 --- a/runtime/nsd_gtls.c +++ b/runtime/nsd_gtls.c @@ -496,7 +496,7 @@ AcceptConnReq(nsd_t *pNsd, nsd_t **ppNew) nsd_gtls_t *pThis = (nsd_gtls_t*) pNsd; ISOBJ_TYPE_assert((pThis), nsd_gtls); - CHKiRet(nsd_gtlsConstruct(&pNew)); + CHKiRet(nsd_gtlsConstruct(&pNew)); // TODO: prevent construct/destruct! CHKiRet(nsd_ptcp.Destruct(&pNew->pTcp)); CHKiRet(nsd_ptcp.AcceptConnReq(pThis->pTcp, &pNew->pTcp)); @@ -559,6 +559,12 @@ Rcv(nsd_t *pNsd, uchar *pBuf, ssize_t *pLenBuf) /* in TLS mode now */ lenRcvd = gnutls_record_recv(pThis->sess, pBuf, *pLenBuf); + if(lenRcvd < 0) { + int gnuRet; /* TODO: build a specific function for GnuTLS error reporting */ + *pLenBuf = -1; + CHKgnutls(lenRcvd); /* this will abort the function */ + } + *pLenBuf = lenRcvd; finalize_it: |