From 5245a296c58eb8aba712e94a78d5bcaa2a2f25fb Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sun, 12 Aug 2018 19:40:47 -0400 Subject: Make some x509 functions generic; remove some fields NSS doesn't need --- src/test/test_link_handshake.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/test/test_link_handshake.c') diff --git a/src/test/test_link_handshake.c b/src/test/test_link_handshake.c index e4722b4dfc..6772765993 100644 --- a/src/test/test_link_handshake.c +++ b/src/test/test_link_handshake.c @@ -811,9 +811,11 @@ CERTS_FAIL(expired_rsa_id, /* both */ tor_x509_cert_t *newc; time_t new_end = time(NULL) - 86400 * 10; newc = tor_x509_cert_replace_expiration(idc, new_end, d->key2); - certs_cell_cert_setlen_body(cert, newc->encoded_len); - memcpy(certs_cell_cert_getarray_body(cert), - newc->encoded, newc->encoded_len); + const uint8_t *encoded; + size_t encoded_len; + tor_x509_cert_get_der(newc, &encoded, &encoded_len); + certs_cell_cert_setlen_body(cert, encoded_len); + memcpy(certs_cell_cert_getarray_body(cert), encoded, encoded_len); REENCODE(); tor_x509_cert_free(newc); }) -- cgit v1.2.3-54-g00ecf