OpenBSD CVS

CVS log for src/lib/libssl/bytestring.h


[BACK] Up to [local] / src / lib / libssl

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.24 / (download) - annotate - [select for diffs], Wed Nov 9 23:14:51 2022 UTC (19 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.23: +4 -6 lines
Diff to previous 1.23 (colored)

Sync CBS_strdup() documentation update from libcrypto.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Jan 6 14:30:30 2022 UTC (2 years, 5 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.22: +7 -1 lines
Diff to previous 1.22 (colored)

Provide CBB_add_u64()

Prompted by and ok tb@

Revision 1.22 / (download) - annotate - [select for diffs], Wed Dec 15 17:36:49 2021 UTC (2 years, 5 months ago) by jsing
Branch: MAIN
Changes since 1.21: +30 -0 lines
Diff to previous 1.21 (colored)

Provide various CBS_peek_* functions.

These will be used in libcrypto.

With input from and ok tb@

Revision 1.21 / (download) - annotate - [select for diffs], Wed Dec 15 17:30:20 2021 UTC (2 years, 5 months ago) by jsing
Branch: MAIN
Changes since 1.20: +6 -0 lines
Diff to previous 1.20 (colored)

Provide CBS_get_u64().

This will be used in the libcrypto certificate transparency code.

ok tb@

Revision 1.20 / (download) - annotate - [select for diffs], Wed Dec 15 17:23:34 2021 UTC (2 years, 5 months ago) by jsing
Branch: MAIN
Changes since 1.19: +7 -1 lines
Diff to previous 1.19 (colored)

Provide CBS_get_last_u8().

This will be used in the TLSv1.3 record layer.

From BoringSSL.

ok tb@

Revision 1.19 / (download) - annotate - [select for diffs], Sun May 16 10:58:27 2021 UTC (3 years ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.18: +3 -2 lines
Diff to previous 1.18 (colored)

Fix formatting of multi-line license comment per style(9).

Revision 1.18 / (download) - annotate - [select for diffs], Sun May 16 08:32:49 2021 UTC (3 years ago) by jsing
Branch: MAIN
Changes since 1.17: +1 -3 lines
Diff to previous 1.17 (colored)

Remove unnecessary includes from the bytestring APIs.

The bytestring APIs are self contained, hence including openssl headers
here is unnecessary.

Revision 1.17 / (download) - annotate - [select for diffs], Thu Aug 16 18:39:37 2018 UTC (5 years, 9 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.16: +7 -1 lines
Diff to previous 1.16 (colored)

Provide CBB_add_u32(), as needed for an upcoming conversion.

ok tb@

Revision 1.15.6.1 / (download) - annotate - [select for diffs], Sat Dec 9 13:43:25 2017 UTC (6 years, 6 months ago) by jsing
Branch: OPENBSD_6_2
Changes since 1.15: +7 -1 lines
Diff to previous 1.15 (colored) next main 1.16 (colored)

MFC: Correct TLS extensions handling when no extensions are present.

If no TLS extensions are present in a client hello or server hello, omit
the entire extensions block, rather than including it with a length of
zero.

ok beck@ inoguchi@

Thanks to Eric Elena <eric at voguemerry dot com> for providing packet
captures and testing the fix.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Nov 28 16:34:20 2017 UTC (6 years, 6 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.15: +7 -1 lines
Diff to previous 1.15 (colored)

Add CBB_discard_child(), which allows for a child CBB to be discarded.

Based on BoringSSL.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Nov 4 18:28:58 2016 UTC (7 years, 7 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_1_BASE, OPENBSD_6_1
Branch point for: OPENBSD_6_2
Changes since 1.14: +4 -8 lines
Diff to previous 1.14 (colored)

Add an explict list of exported symbols with just the functions
declared in the public headers, and use __{BEGIN,END}_HIDDEN_DECLS
in the internal headers to optimize internal functions

ok jsing@

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jun 19 00:23:36 2015 UTC (8 years, 11 months ago) by doug
Branch: MAIN
Changes since 1.13: +7 -1 lines
Diff to previous 1.13 (colored)

Add CBS_dup() to initialize a new CBS with the same values.

This is useful for when you need to check the data ahead and then continue
on from the same spot.

input + ok jsing@ miod@

Revision 1.13 / (download) - annotate - [select for diffs], Thu Jun 18 23:25:07 2015 UTC (8 years, 11 months ago) by doug
Branch: MAIN
Changes since 1.12: +5 -5 lines
Diff to previous 1.12 (colored)

Extend the input types for CBB_add_*() to help catch bugs.

While the previous types were correct, they can silently accept bad data
via truncation or signed conversion.  We now take size_t as input for
CBB_add_u*() and do a range check.

discussed with deraadt@
input + ok jsing@ miod@

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jun 17 07:25:56 2015 UTC (8 years, 11 months ago) by doug
Branch: MAIN
Changes since 1.11: +11 -10 lines
Diff to previous 1.11 (colored)

Use explicit int in bs_cbs.c.

ok miod@ jsing@

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jun 17 07:06:22 2015 UTC (8 years, 11 months ago) by doug
Branch: MAIN
Changes since 1.10: +9 -1 lines
Diff to previous 1.10 (colored)

Add CBS_write_bytes() to copy the remaining CBS bytes to the caller.

This is a common operation when dealing with CBS.

ok miod@ jsing@

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jun 17 07:00:22 2015 UTC (8 years, 11 months ago) by doug
Branch: MAIN
Changes since 1.9: +7 -1 lines
Diff to previous 1.9 (colored)

Add a new function CBS_offset() to report the current offset in the data.

"why not" miod@, sure jsing@

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jun 16 06:37:58 2015 UTC (8 years, 11 months ago) by doug
Branch: MAIN
Changes since 1.8: +10 -9 lines
Diff to previous 1.8 (colored)

Be more strict about BER and DER terminology.

bs_ber.c does not convert BER to DER.  It's a hack to convert a DER-like
encoding with one violation (indefinite form) to strict DER.  Rename
the functions to reflect this.

ok miod@ jsing@

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jun 16 06:11:39 2015 UTC (8 years, 11 months ago) by doug
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Simplify cbs_get_any_asn1_element_internal based on comments from jsing@

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jun 15 07:35:49 2015 UTC (8 years, 11 months ago) by doug
Branch: MAIN
Changes since 1.6: +16 -4 lines
Diff to previous 1.6 (colored)

Make CBS_get_any_asn1_element() more compliant with DER encoding.

CBS_get_any_asn1_element violates DER encoding by allowing indefinite
form.  All callers except bs_ber.c expect DER encoding.  The callers
must check to see if it was indefinite or not.

Rather than exposing all callers to this behavior,
cbs_get_any_asn1_element_internal() allows specifying whether you want to
allow the normally forbidden indefinite form.  This is used by
CBS_get_any_asn1_element() for strict DER encoding and by a new static
function in bs_ber.c for the relaxed version.

While I was here, I added comments to differentiate between ASN.1
restrictions and CBS limitations.

ok miod@

Revision 1.6 / (download) - annotate - [select for diffs], Sat Jun 13 09:02:45 2015 UTC (9 years ago) by doug
Branch: MAIN
Changes since 1.5: +42 -11 lines
Diff to previous 1.5 (colored)

Add comments about how the CBS constants are constructed.

Also, introduce a few more #defines to make it obvious.

ok miod@ jsing@

Revision 1.5 / (download) - annotate - [select for diffs], Wed Apr 29 02:11:09 2015 UTC (9 years, 1 month ago) by doug
Branch: MAIN
Changes since 1.4: +6 -6 lines
Diff to previous 1.4 (colored)

Add whitespace and replace OPENSSL_free with free in documentation.

ok jsing@

Revision 1.4 / (download) - annotate - [select for diffs], Sat Feb 7 06:10:32 2015 UTC (9 years, 4 months ago) by doug
Branch: MAIN
Changes since 1.3: +4 -2 lines
Diff to previous 1.3 (colored)

Don't allow tag number 31 in CBB_add_asn1().

Tag 31 is invalid for a short form identifier octet (single byte).
KNF a little more.

Based on BoringSSL commit 5ba305643f55d37a3e45e8388a36d50c1b2d4ff5

ok miod@

Revision 1.3 / (download) - annotate - [select for diffs], Sat Feb 7 02:02:28 2015 UTC (9 years, 4 months ago) by doug
Branch: MAIN
Changes since 1.2: +4 -4 lines
Diff to previous 1.2 (colored)

Fix typo and ASN.1 tag number range comment in bytestring.h.

CBS_get_asn1() and CBS_get_any_asn1_element() only support the single
byte ASN.1 identifier octets (aka short form tags).  Tag number 31 is
the start of the multi-byte long form per X.690 section 8.1.2.4.

From BoringSSL commit 2683af70e73f116e14db2bca6290fa4a010a2ee4

ok miod@

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 6 22:22:33 2015 UTC (9 years, 4 months ago) by doug
Branch: MAIN
Changes since 1.1: +219 -121 lines
Diff to previous 1.1 (colored)

KNF bytestring files.

I checked that this doesn't change anything.  Compiled with clang using
-Wno-pointer-sign -g0  to reduce the differences.  Only difference in the
asm is due to assert(0) line number changes in bs_cbs.c and bs_cbb.c.

miod is ok with the general process.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Feb 6 09:36:16 2015 UTC (9 years, 4 months ago) by doug
Branch: MAIN

Import BoringSSL's crypto bytestring and crypto bytebuilder APIs.

This is imported with as few changes as possible for the initial commit.
I removed OPENSSL_EXPORT, replaced OPENSSL_malloc() etc with malloc()
and changed a few header includes.

BoringSSL has this as part of their public API.  We're leaving it internal
to libssl for now.

Based on BoringSSL's CBB/CBS API as of commit
c5cc15b4f5b1d6e9b9112cb8d30205a638aa2c54.

input + ok jsing@, miod@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.