diff options
| author | Gary Lin <glin@suse.com> | 2016-03-17 14:59:04 +0800 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2016-09-06 15:05:36 -0400 |
| commit | 0297aa3cf34ca3a95a6e95db7aff82020aefa0e5 (patch) | |
| tree | d2b0ff4c76d6df0960782c647a33cb30f7a2ef86 /Cryptlib/OpenSSL/crypto/bio/bss_conn.c | |
| parent | 7b9281af14930040ec6cb333de2d64e0ff91cf3c (diff) | |
| download | efi-boot-shim-0297aa3cf34ca3a95a6e95db7aff82020aefa0e5.tar.gz efi-boot-shim-0297aa3cf34ca3a95a6e95db7aff82020aefa0e5.zip | |
Update openssl to 1.0.2g
Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/bio/bss_conn.c')
| -rw-r--r-- | Cryptlib/OpenSSL/crypto/bio/bss_conn.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/Cryptlib/OpenSSL/crypto/bio/bss_conn.c b/Cryptlib/OpenSSL/crypto/bio/bss_conn.c index 42d0afff..7d15ad29 100644 --- a/Cryptlib/OpenSSL/crypto/bio/bss_conn.c +++ b/Cryptlib/OpenSSL/crypto/bio/bss_conn.c @@ -419,7 +419,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) { BIO *dbio; int *ip; - const char **pptr; + const char **pptr = NULL; long ret = 1; BIO_CONNECT *data; @@ -442,19 +442,28 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) case BIO_C_GET_CONNECT: if (ptr != NULL) { pptr = (const char **)ptr; - if (num == 0) { - *pptr = data->param_hostname; + } - } else if (num == 1) { - *pptr = data->param_port; - } else if (num == 2) { - *pptr = (char *)&(data->ip[0]); - } else if (num == 3) { - *((int *)ptr) = data->port; + if (b->init) { + if (pptr != NULL) { + ret = 1; + if (num == 0) { + *pptr = data->param_hostname; + } else if (num == 1) { + *pptr = data->param_port; + } else if (num == 2) { + *pptr = (char *)&(data->ip[0]); + } else { + ret = 0; + } + } + if (num == 3) { + ret = data->port; } - if ((!b->init) || (ptr == NULL)) + } else { + if (pptr != NULL) *pptr = "not initialized"; - ret = 1; + ret = 0; } break; case BIO_C_SET_CONNECT: |
