aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatarLibravatar william <william@25tandclement.com> 2014-07-17 16:24:57 -0700
committerLibravatarLibravatar william <william@25tandclement.com> 2014-07-17 16:24:57 -0700
commitf026c11953f5a3b3e7285a08829f5777cfe31331 (patch)
tree13bac56882ff5097e7a102817acbcfb8762ac9ce /src
parentb93223ff2e5a74f14431aa0fb09db55f0a96ecd9 (diff)
downloadluaossl-f026c11953f5a3b3e7285a08829f5777cfe31331.tar.gz
luaossl-f026c11953f5a3b3e7285a08829f5777cfe31331.tar.bz2
luaossl-f026c11953f5a3b3e7285a08829f5777cfe31331.zip
be more consistent about idiomatic 'return throwssl', patterned after 'return lua_error'
Diffstat (limited to 'src')
-rw-r--r--src/openssl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openssl.c b/src/openssl.c
index 0701642..76a409e 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -743,7 +743,7 @@ static int bn__tostring(lua_State *L) {
char *txt;
if (!(txt = BN_bn2dec(bn)))
- throwssl(L, "bignum:__tostring");
+ return throwssl(L, "bignum:__tostring");
lua_pushstring(L, txt);
@@ -1202,7 +1202,7 @@ static int pk_toPEM(lua_State *L) {
break;
case 2: case 3: /* private, PrivateKey */
if (!PEM_write_bio_PrivateKey(bio, key, 0, 0, 0, 0, 0))
- throwssl(L, "pkey:__tostring");
+ return throwssl(L, "pkey:__tostring");
len = BIO_get_mem_data(bio, &pem);
lua_pushlstring(L, pem, len);
@@ -2613,7 +2613,7 @@ static int xc_addExtension(lua_State *L) {
X509_EXTENSION *ext = checksimple(L, 2, X509_EXT_CLASS);
if (!X509_add_ext(crt, ext, -1))
- throwssl(L, "x509.cert:addExtension");
+ return throwssl(L, "x509.cert:addExtension");
lua_pushboolean(L, 1);