diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-08-12 19:40:47 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-08-21 12:25:33 -0400 |
commit | 5245a296c58eb8aba712e94a78d5bcaa2a2f25fb (patch) | |
tree | 3c5698c25ebbe6e02799aac9447811f31dd01dc2 /src/test/test_link_handshake.c | |
parent | b9ca8f2356a98630a262951486cd10436963e169 (diff) | |
download | tor-5245a296c58eb8aba712e94a78d5bcaa2a2f25fb.tar.gz tor-5245a296c58eb8aba712e94a78d5bcaa2a2f25fb.zip |
Make some x509 functions generic; remove some fields NSS doesn't need
Diffstat (limited to 'src/test/test_link_handshake.c')
-rw-r--r-- | src/test/test_link_handshake.c | 8 |
1 files changed, 5 insertions, 3 deletions
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); }) |