diff options
-rw-r--r-- | src/lib/libssl/bs_ber.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/bs_cbs.c | 6 | ||||
-rw-r--r-- | src/lib/libssl/bytestring.h | 12 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/bs_ber.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/bs_cbs.c | 6 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/bytestring.h | 12 |
6 files changed, 22 insertions, 22 deletions
diff --git a/src/lib/libssl/bs_ber.c b/src/lib/libssl/bs_ber.c index 1dde38264e..2ec91fc800 100644 --- a/src/lib/libssl/bs_ber.c +++ b/src/lib/libssl/bs_ber.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bs_ber.c,v 1.3 2015/04/29 01:31:39 doug Exp $ */ | 1 | /* $OpenBSD: bs_ber.c,v 1.4 2015/04/29 02:11:09 doug Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -54,7 +54,7 @@ cbs_find_ber(CBS *orig_in, char *ber_found, unsigned depth) | |||
54 | return 0; | 54 | return 0; |
55 | 55 | ||
56 | if (CBS_len(&contents) == header_len && header_len > 0 && | 56 | if (CBS_len(&contents) == header_len && header_len > 0 && |
57 | CBS_data(&contents)[header_len-1] == 0x80) { | 57 | CBS_data(&contents)[header_len - 1] == 0x80) { |
58 | *ber_found = 1; | 58 | *ber_found = 1; |
59 | return 1; | 59 | return 1; |
60 | } | 60 | } |
diff --git a/src/lib/libssl/bs_cbs.c b/src/lib/libssl/bs_cbs.c index 0237f73681..4c1bfa3288 100644 --- a/src/lib/libssl/bs_cbs.c +++ b/src/lib/libssl/bs_cbs.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bs_cbs.c,v 1.6 2015/04/29 01:27:34 doug Exp $ */ | 1 | /* $OpenBSD: bs_cbs.c,v 1.7 2015/04/29 02:11:09 doug Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -84,7 +84,7 @@ int | |||
84 | CBS_strdup(const CBS *cbs, char **out_ptr) | 84 | CBS_strdup(const CBS *cbs, char **out_ptr) |
85 | { | 85 | { |
86 | free(*out_ptr); | 86 | free(*out_ptr); |
87 | *out_ptr = strndup((const char*)cbs->data, cbs->len); | 87 | *out_ptr = strndup((const char *)cbs->data, cbs->len); |
88 | return (*out_ptr != NULL); | 88 | return (*out_ptr != NULL); |
89 | } | 89 | } |
90 | 90 | ||
@@ -251,7 +251,7 @@ CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned *out_tag, | |||
251 | /* Length should have used short-form encoding. */ | 251 | /* Length should have used short-form encoding. */ |
252 | return 0; | 252 | return 0; |
253 | 253 | ||
254 | if ((len32 >> ((num_bytes-1)*8)) == 0) | 254 | if ((len32 >> ((num_bytes - 1) * 8)) == 0) |
255 | /* Length should have been at least one byte shorter. */ | 255 | /* Length should have been at least one byte shorter. */ |
256 | return 0; | 256 | return 0; |
257 | 257 | ||
diff --git a/src/lib/libssl/bytestring.h b/src/lib/libssl/bytestring.h index 93c3df6f10..c2b94c31a2 100644 --- a/src/lib/libssl/bytestring.h +++ b/src/lib/libssl/bytestring.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bytestring.h,v 1.4 2015/02/07 06:10:32 doug Exp $ */ | 1 | /* $OpenBSD: bytestring.h,v 1.5 2015/04/29 02:11:09 doug Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -68,8 +68,8 @@ size_t CBS_len(const CBS *cbs); | |||
68 | /* | 68 | /* |
69 | * CBS_stow copies the current contents of |cbs| into |*out_ptr| and | 69 | * CBS_stow copies the current contents of |cbs| into |*out_ptr| and |
70 | * |*out_len|. If |*out_ptr| is not NULL, the contents are freed with | 70 | * |*out_len|. If |*out_ptr| is not NULL, the contents are freed with |
71 | * OPENSSL_free. It returns one on success and zero on allocation failure. On | 71 | * free. It returns one on success and zero on allocation failure. On |
72 | * success, |*out_ptr| should be freed with OPENSSL_free. If |cbs| is empty, | 72 | * success, |*out_ptr| should be freed with free. If |cbs| is empty, |
73 | * |*out_ptr| will be NULL. | 73 | * |*out_ptr| will be NULL. |
74 | */ | 74 | */ |
75 | int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len); | 75 | int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len); |
@@ -77,8 +77,8 @@ int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len); | |||
77 | /* | 77 | /* |
78 | * CBS_strdup copies the current contents of |cbs| into |*out_ptr| as a | 78 | * CBS_strdup copies the current contents of |cbs| into |*out_ptr| as a |
79 | * NUL-terminated C string. If |*out_ptr| is not NULL, the contents are freed | 79 | * NUL-terminated C string. If |*out_ptr| is not NULL, the contents are freed |
80 | * with OPENSSL_free. It returns one on success and zero on allocation | 80 | * with free. It returns one on success and zero on allocation |
81 | * failure. On success, |*out_ptr| should be freed with OPENSSL_free. | 81 | * failure. On success, |*out_ptr| should be freed with free. |
82 | * | 82 | * |
83 | * NOTE: If |cbs| contains NUL bytes, the string will be truncated. Call | 83 | * NOTE: If |cbs| contains NUL bytes, the string will be truncated. Call |
84 | * |CBS_contains_zero_byte(cbs)| to check for NUL bytes. | 84 | * |CBS_contains_zero_byte(cbs)| to check for NUL bytes. |
@@ -335,7 +335,7 @@ void CBB_cleanup(CBB *cbb); | |||
335 | * CBB_finish completes any pending length prefix and sets |*out_data| to a | 335 | * CBB_finish completes any pending length prefix and sets |*out_data| to a |
336 | * malloced buffer and |*out_len| to the length of that buffer. The caller | 336 | * malloced buffer and |*out_len| to the length of that buffer. The caller |
337 | * takes ownership of the buffer and, unless the buffer was fixed with | 337 | * takes ownership of the buffer and, unless the buffer was fixed with |
338 | * |CBB_init_fixed|, must call |OPENSSL_free| when done. | 338 | * |CBB_init_fixed|, must call |free| when done. |
339 | * | 339 | * |
340 | * It can only be called on a "top level" |CBB|, i.e. one initialised with | 340 | * It can only be called on a "top level" |CBB|, i.e. one initialised with |
341 | * |CBB_init| or |CBB_init_fixed|. It returns one on success and zero on | 341 | * |CBB_init| or |CBB_init_fixed|. It returns one on success and zero on |
diff --git a/src/lib/libssl/src/ssl/bs_ber.c b/src/lib/libssl/src/ssl/bs_ber.c index 1dde38264e..2ec91fc800 100644 --- a/src/lib/libssl/src/ssl/bs_ber.c +++ b/src/lib/libssl/src/ssl/bs_ber.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bs_ber.c,v 1.3 2015/04/29 01:31:39 doug Exp $ */ | 1 | /* $OpenBSD: bs_ber.c,v 1.4 2015/04/29 02:11:09 doug Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -54,7 +54,7 @@ cbs_find_ber(CBS *orig_in, char *ber_found, unsigned depth) | |||
54 | return 0; | 54 | return 0; |
55 | 55 | ||
56 | if (CBS_len(&contents) == header_len && header_len > 0 && | 56 | if (CBS_len(&contents) == header_len && header_len > 0 && |
57 | CBS_data(&contents)[header_len-1] == 0x80) { | 57 | CBS_data(&contents)[header_len - 1] == 0x80) { |
58 | *ber_found = 1; | 58 | *ber_found = 1; |
59 | return 1; | 59 | return 1; |
60 | } | 60 | } |
diff --git a/src/lib/libssl/src/ssl/bs_cbs.c b/src/lib/libssl/src/ssl/bs_cbs.c index 0237f73681..4c1bfa3288 100644 --- a/src/lib/libssl/src/ssl/bs_cbs.c +++ b/src/lib/libssl/src/ssl/bs_cbs.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bs_cbs.c,v 1.6 2015/04/29 01:27:34 doug Exp $ */ | 1 | /* $OpenBSD: bs_cbs.c,v 1.7 2015/04/29 02:11:09 doug Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -84,7 +84,7 @@ int | |||
84 | CBS_strdup(const CBS *cbs, char **out_ptr) | 84 | CBS_strdup(const CBS *cbs, char **out_ptr) |
85 | { | 85 | { |
86 | free(*out_ptr); | 86 | free(*out_ptr); |
87 | *out_ptr = strndup((const char*)cbs->data, cbs->len); | 87 | *out_ptr = strndup((const char *)cbs->data, cbs->len); |
88 | return (*out_ptr != NULL); | 88 | return (*out_ptr != NULL); |
89 | } | 89 | } |
90 | 90 | ||
@@ -251,7 +251,7 @@ CBS_get_any_asn1_element(CBS *cbs, CBS *out, unsigned *out_tag, | |||
251 | /* Length should have used short-form encoding. */ | 251 | /* Length should have used short-form encoding. */ |
252 | return 0; | 252 | return 0; |
253 | 253 | ||
254 | if ((len32 >> ((num_bytes-1)*8)) == 0) | 254 | if ((len32 >> ((num_bytes - 1) * 8)) == 0) |
255 | /* Length should have been at least one byte shorter. */ | 255 | /* Length should have been at least one byte shorter. */ |
256 | return 0; | 256 | return 0; |
257 | 257 | ||
diff --git a/src/lib/libssl/src/ssl/bytestring.h b/src/lib/libssl/src/ssl/bytestring.h index 93c3df6f10..c2b94c31a2 100644 --- a/src/lib/libssl/src/ssl/bytestring.h +++ b/src/lib/libssl/src/ssl/bytestring.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bytestring.h,v 1.4 2015/02/07 06:10:32 doug Exp $ */ | 1 | /* $OpenBSD: bytestring.h,v 1.5 2015/04/29 02:11:09 doug Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -68,8 +68,8 @@ size_t CBS_len(const CBS *cbs); | |||
68 | /* | 68 | /* |
69 | * CBS_stow copies the current contents of |cbs| into |*out_ptr| and | 69 | * CBS_stow copies the current contents of |cbs| into |*out_ptr| and |
70 | * |*out_len|. If |*out_ptr| is not NULL, the contents are freed with | 70 | * |*out_len|. If |*out_ptr| is not NULL, the contents are freed with |
71 | * OPENSSL_free. It returns one on success and zero on allocation failure. On | 71 | * free. It returns one on success and zero on allocation failure. On |
72 | * success, |*out_ptr| should be freed with OPENSSL_free. If |cbs| is empty, | 72 | * success, |*out_ptr| should be freed with free. If |cbs| is empty, |
73 | * |*out_ptr| will be NULL. | 73 | * |*out_ptr| will be NULL. |
74 | */ | 74 | */ |
75 | int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len); | 75 | int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len); |
@@ -77,8 +77,8 @@ int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len); | |||
77 | /* | 77 | /* |
78 | * CBS_strdup copies the current contents of |cbs| into |*out_ptr| as a | 78 | * CBS_strdup copies the current contents of |cbs| into |*out_ptr| as a |
79 | * NUL-terminated C string. If |*out_ptr| is not NULL, the contents are freed | 79 | * NUL-terminated C string. If |*out_ptr| is not NULL, the contents are freed |
80 | * with OPENSSL_free. It returns one on success and zero on allocation | 80 | * with free. It returns one on success and zero on allocation |
81 | * failure. On success, |*out_ptr| should be freed with OPENSSL_free. | 81 | * failure. On success, |*out_ptr| should be freed with free. |
82 | * | 82 | * |
83 | * NOTE: If |cbs| contains NUL bytes, the string will be truncated. Call | 83 | * NOTE: If |cbs| contains NUL bytes, the string will be truncated. Call |
84 | * |CBS_contains_zero_byte(cbs)| to check for NUL bytes. | 84 | * |CBS_contains_zero_byte(cbs)| to check for NUL bytes. |
@@ -335,7 +335,7 @@ void CBB_cleanup(CBB *cbb); | |||
335 | * CBB_finish completes any pending length prefix and sets |*out_data| to a | 335 | * CBB_finish completes any pending length prefix and sets |*out_data| to a |
336 | * malloced buffer and |*out_len| to the length of that buffer. The caller | 336 | * malloced buffer and |*out_len| to the length of that buffer. The caller |
337 | * takes ownership of the buffer and, unless the buffer was fixed with | 337 | * takes ownership of the buffer and, unless the buffer was fixed with |
338 | * |CBB_init_fixed|, must call |OPENSSL_free| when done. | 338 | * |CBB_init_fixed|, must call |free| when done. |
339 | * | 339 | * |
340 | * It can only be called on a "top level" |CBB|, i.e. one initialised with | 340 | * It can only be called on a "top level" |CBB|, i.e. one initialised with |
341 | * |CBB_init| or |CBB_init_fixed|. It returns one on success and zero on | 341 | * |CBB_init| or |CBB_init_fixed|. It returns one on success and zero on |