Skip to content

Commit

Permalink
Update BoringSSL to b819f7e9392d25db6705a6bd3c92be3bb91775e2 (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
glbrntt authored Oct 20, 2022
1 parent b8a78b0 commit 4fb7ead
Show file tree
Hide file tree
Showing 39 changed files with 544 additions and 698 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import class Foundation.ProcessInfo
// Sources/CNIOBoringSSL directory. The source repository is at
// https://boringssl.googlesource.com/boringssl.
//
// BoringSSL Commit: cab31f65f1ad6e6daca62e95b25dd6cd805fce0b
// BoringSSL Commit: b819f7e9392d25db6705a6bd3c92be3bb91775e2

/// This function generates the dependencies we want to express.
///
Expand Down
2 changes: 1 addition & 1 deletion [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import class Foundation.ProcessInfo
// Sources/CNIOBoringSSL directory. The source repository is at
// https://boringssl.googlesource.com/boringssl.
//
// BoringSSL Commit: cab31f65f1ad6e6daca62e95b25dd6cd805fce0b
// BoringSSL Commit: b819f7e9392d25db6705a6bd3c92be3bb91775e2

/// This function generates the dependencies we want to express.
///
Expand Down
17 changes: 11 additions & 6 deletions Sources/CNIOBoringSSL/crypto/asn1/a_strex.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,17 @@ static int do_buf(const unsigned char *buf, int buflen, int encoding,
}
const int is_last = CBS_len(&cbs) == 0;
if (flags & ASN1_STRFLGS_UTF8_CONVERT) {
unsigned char utfbuf[6];
int utflen;
utflen = UTF8_putc(utfbuf, sizeof(utfbuf), c);
for (int i = 0; i < utflen; i++) {
int len = do_esc_char(utfbuf[i], flags, quotes, out, is_first && i == 0,
is_last && i == utflen - 1);
uint8_t utf8_buf[6];
CBB utf8_cbb;
CBB_init_fixed(&utf8_cbb, utf8_buf, sizeof(utf8_buf));
if (!cbb_add_utf8(&utf8_cbb, c)) {
OPENSSL_PUT_ERROR(ASN1, ERR_R_INTERNAL_ERROR);
return 1;
}
size_t utf8_len = CBB_len(&utf8_cbb);
for (size_t i = 0; i < utf8_len; i++) {
int len = do_esc_char(utf8_buf[i], flags, quotes, out,
is_first && i == 0, is_last && i == utf8_len - 1);
if (len < 0) {
return -1;
}
Expand Down
142 changes: 0 additions & 142 deletions Sources/CNIOBoringSSL/crypto/asn1/a_utf8.c

This file was deleted.

2 changes: 0 additions & 2 deletions Sources/CNIOBoringSSL/crypto/asn1/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ OPENSSL_EXPORT int asn1_generalizedtime_to_tm(struct tm *tm,
void asn1_item_combine_free(ASN1_VALUE **pval, const ASN1_ITEM *it,
int combine);

int UTF8_putc(unsigned char *str, int len, uint32_t value);

int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it);
void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it);

Expand Down
3 changes: 2 additions & 1 deletion Sources/CNIOBoringSSL/crypto/bytestring/asn1_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@


int CBB_finish_i2d(CBB *cbb, uint8_t **outp) {
assert(cbb->base->can_resize);
assert(!cbb->is_child);
assert(cbb->u.base.can_resize);

uint8_t *der;
size_t der_len;
Expand Down
Loading

0 comments on commit 4fb7ead

Please sign in to comment.