diff options
-rw-r--r-- | src/openssl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/openssl.c b/src/openssl.c index 8d1435a..e91e270 100644 --- a/src/openssl.c +++ b/src/openssl.c | |||
@@ -2420,8 +2420,8 @@ static int pk_toPEM(lua_State *L) { | |||
2420 | 2420 | ||
2421 | len = BIO_get_mem_data(bio, &pem); | 2421 | len = BIO_get_mem_data(bio, &pem); |
2422 | lua_pushlstring(L, pem, len); | 2422 | lua_pushlstring(L, pem, len); |
2423 | |||
2424 | BIO_reset(bio); | 2423 | BIO_reset(bio); |
2424 | |||
2425 | break; | 2425 | break; |
2426 | case 2: case 3: /* private, PrivateKey */ | 2426 | case 2: case 3: /* private, PrivateKey */ |
2427 | if (!PEM_write_bio_PrivateKey(bio, key, 0, 0, 0, 0, 0)) | 2427 | if (!PEM_write_bio_PrivateKey(bio, key, 0, 0, 0, 0, 0)) |
@@ -2429,6 +2429,7 @@ static int pk_toPEM(lua_State *L) { | |||
2429 | 2429 | ||
2430 | len = BIO_get_mem_data(bio, &pem); | 2430 | len = BIO_get_mem_data(bio, &pem); |
2431 | lua_pushlstring(L, pem, len); | 2431 | lua_pushlstring(L, pem, len); |
2432 | BIO_reset(bio); | ||
2432 | 2433 | ||
2433 | break; | 2434 | break; |
2434 | #if 0 | 2435 | #if 0 |