summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libssl/src')
-rw-r--r--lib/libssl/src/crypto/asn1/asn1_par.c5
-rw-r--r--lib/libssl/src/crypto/ocsp/ocsp_ht.c12
-rw-r--r--lib/libssl/src/crypto/ui/ui_lib.c16
-rw-r--r--lib/libssl/src/ssl/ssl_ciph.c6
4 files changed, 19 insertions, 20 deletions
diff --git a/lib/libssl/src/crypto/asn1/asn1_par.c b/lib/libssl/src/crypto/asn1/asn1_par.c
index f5e3a8b5297..2c8062bb8aa 100644
--- a/lib/libssl/src/crypto/asn1/asn1_par.c
+++ b/lib/libssl/src/crypto/asn1/asn1_par.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asn1_par.c,v 1.20 2014/07/12 16:03:36 miod Exp $ */
+/* $OpenBSD: asn1_par.c,v 1.21 2014/10/03 06:02:38 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -71,7 +71,6 @@ static int
asn1_print_info(BIO *bp, int tag, int xclass, int constructed,
int indent)
{
- static const char fmt[] = "%-18s";
char str[128];
const char *p;
@@ -95,7 +94,7 @@ asn1_print_info(BIO *bp, int tag, int xclass, int constructed,
else
p = ASN1_tag2str(tag);
- if (BIO_printf(bp, fmt, p) <= 0)
+ if (BIO_printf(bp, "%-18s", p) <= 0)
goto err;
return (1);
err:
diff --git a/lib/libssl/src/crypto/ocsp/ocsp_ht.c b/lib/libssl/src/crypto/ocsp/ocsp_ht.c
index 5d1627192cc..4d21543396a 100644
--- a/lib/libssl/src/crypto/ocsp/ocsp_ht.c
+++ b/lib/libssl/src/crypto/ocsp/ocsp_ht.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ocsp_ht.c,v 1.21 2014/07/25 06:05:32 doug Exp $ */
+/* $OpenBSD: ocsp_ht.c,v 1.22 2014/10/03 06:02:38 doug Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
@@ -119,11 +119,8 @@ OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx)
int
OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, OCSP_REQUEST *req)
{
- static const char req_hdr[] =
- "Content-Type: application/ocsp-request\r\n"
- "Content-Length: %d\r\n\r\n";
-
- if (BIO_printf(rctx->mem, req_hdr, i2d_OCSP_REQUEST(req, NULL)) <= 0)
+ if (BIO_printf(rctx->mem, "Content-Type: application/ocsp-request\r\n"
+ "Content-Length: %d\r\n\r\n", i2d_OCSP_REQUEST(req, NULL)) <= 0)
return 0;
if (i2d_OCSP_REQUEST_bio(rctx->mem, req) <= 0)
return 0;
@@ -154,7 +151,6 @@ OCSP_REQ_CTX_add1_header(OCSP_REQ_CTX *rctx, const char *name,
OCSP_REQ_CTX *
OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, int maxline)
{
- static const char post_hdr[] = "POST %s HTTP/1.0\r\n";
OCSP_REQ_CTX *rctx;
rctx = malloc(sizeof(OCSP_REQ_CTX));
@@ -177,7 +173,7 @@ OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, int maxline)
if (!path)
path = "/";
- if (BIO_printf(rctx->mem, post_hdr, path) <= 0) {
+ if (BIO_printf(rctx->mem, "POST %s HTTP/1.0\r\n", path) <= 0) {
free(rctx->iobuf);
BIO_free(rctx->mem);
free(rctx);
diff --git a/lib/libssl/src/crypto/ui/ui_lib.c b/lib/libssl/src/crypto/ui/ui_lib.c
index baf86d7635b..2c53f534e7c 100644
--- a/lib/libssl/src/crypto/ui/ui_lib.c
+++ b/lib/libssl/src/crypto/ui/ui_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ui_lib.c,v 1.28 2014/07/22 02:21:20 beck Exp $ */
+/* $OpenBSD: ui_lib.c,v 1.29 2014/10/03 06:02:38 doug Exp $ */
/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
* project 2001.
*/
@@ -386,7 +386,6 @@ UI_dup_error_string(UI *ui, const char *text)
char *
UI_construct_prompt(UI *ui, const char *object_desc, const char *object_name)
{
- const char *format = "Enter %s for %s:";
char *prompt;
if (ui->meth->ui_construct_prompt)
@@ -395,10 +394,15 @@ UI_construct_prompt(UI *ui, const char *object_desc, const char *object_name)
if (object_desc == NULL)
return NULL;
- if (object_name == NULL)
- format = "Enter %s:";
- if (asprintf(&prompt, format, object_desc, object_name) == -1)
- return NULL;
+
+ if (object_name == NULL) {
+ if (asprintf(&prompt, "Enter %s:", object_desc) == -1)
+ return (NULL);
+ } else {
+ if (asprintf(&prompt, "Enter %s for %s:", object_desc,
+ object_name) == -1)
+ return (NULL);
+ }
return prompt;
}
diff --git a/lib/libssl/src/ssl/ssl_ciph.c b/lib/libssl/src/ssl/ssl_ciph.c
index 586ae139745..35e81e18f17 100644
--- a/lib/libssl/src/ssl/ssl_ciph.c
+++ b/lib/libssl/src/ssl/ssl_ciph.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_ciph.c,v 1.68 2014/09/19 16:02:35 jsing Exp $ */
+/* $OpenBSD: ssl_ciph.c,v 1.69 2014/10/03 06:02:38 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1559,7 +1559,6 @@ ssl_create_cipher_list(const SSL_METHOD *ssl_method,
char *
SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len)
{
- static const char *fmt="%-23s %s Kx=%-8s Au=%-4s Enc=%-9s Mac=%-4s\n";
unsigned long alg_mkey, alg_auth, alg_enc, alg_mac, alg_ssl, alg2;
const char *ver, *kx, *au, *enc, *mac;
char *ret;
@@ -1692,7 +1691,8 @@ SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len)
break;
}
- if (asprintf(&ret, fmt, cipher->name, ver, kx, au, enc, mac) == -1)
+ if (asprintf(&ret, "%-23s %s Kx=%-8s Au=%-4s Enc=%-9s Mac=%-4s\n",
+ cipher->name, ver, kx, au, enc, mac) == -1)
return "OPENSSL_malloc Error";
if (buf != NULL) {