diff options
| author | jsing <> | 2022-01-11 18:39:28 +0000 |
|---|---|---|
| committer | jsing <> | 2022-01-11 18:39:28 +0000 |
| commit | 63cfd45b8cd72aee6552ab5469a2864756a42e9a (patch) | |
| tree | cb972e9546005dce58d8452883b2902095510a57 /src/lib/libssl/ssl_asn1.c | |
| parent | 085b1f8d013a9a60b98b92e6dc421d666ad08819 (diff) | |
| download | openbsd-63cfd45b8cd72aee6552ab5469a2864756a42e9a.tar.gz openbsd-63cfd45b8cd72aee6552ab5469a2864756a42e9a.tar.bz2 openbsd-63cfd45b8cd72aee6552ab5469a2864756a42e9a.zip | |
Rename 'peer' to 'peer_cert' in SSL_SESSION.
The 'peer' member of SSL_SESSION is the leaf/end-entity certificate
provided by our peer. Rename it since 'peer' on its own is unhelpful.
ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/ssl_asn1.c')
| -rw-r--r-- | src/lib/libssl/ssl_asn1.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libssl/ssl_asn1.c b/src/lib/libssl/ssl_asn1.c index 2af6834d88..70a50acc5c 100644 --- a/src/lib/libssl/ssl_asn1.c +++ b/src/lib/libssl/ssl_asn1.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_asn1.c,v 1.60 2021/10/23 08:13:02 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_asn1.c,v 1.61 2022/01/11 18:39:28 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2016 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2016 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -113,8 +113,8 @@ SSL_SESSION_encode(SSL_SESSION *s, unsigned char **out, size_t *out_len, | |||
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | /* Peer certificate [3]. */ | 115 | /* Peer certificate [3]. */ |
| 116 | if (s->peer != NULL) { | 116 | if (s->peer_cert != NULL) { |
| 117 | if ((len = i2d_X509(s->peer, &peer_cert_bytes)) <= 0) | 117 | if ((len = i2d_X509(s->peer_cert, &peer_cert_bytes)) <= 0) |
| 118 | goto err; | 118 | goto err; |
| 119 | if (!CBB_add_asn1(&session, &peer_cert, SSLASN1_PEER_CERT_TAG)) | 119 | if (!CBB_add_asn1(&session, &peer_cert, SSLASN1_PEER_CERT_TAG)) |
| 120 | goto err; | 120 | goto err; |
| @@ -332,8 +332,8 @@ d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length) | |||
| 332 | s->timeout = (long)timeout; | 332 | s->timeout = (long)timeout; |
| 333 | 333 | ||
| 334 | /* Peer certificate [3]. */ | 334 | /* Peer certificate [3]. */ |
| 335 | X509_free(s->peer); | 335 | X509_free(s->peer_cert); |
| 336 | s->peer = NULL; | 336 | s->peer_cert = NULL; |
| 337 | if (!CBS_get_optional_asn1(&session, &peer_cert, &present, | 337 | if (!CBS_get_optional_asn1(&session, &peer_cert, &present, |
| 338 | SSLASN1_PEER_CERT_TAG)) | 338 | SSLASN1_PEER_CERT_TAG)) |
| 339 | goto err; | 339 | goto err; |
| @@ -342,7 +342,7 @@ d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length) | |||
| 342 | if (data_len > LONG_MAX) | 342 | if (data_len > LONG_MAX) |
| 343 | goto err; | 343 | goto err; |
| 344 | peer_cert_bytes = CBS_data(&peer_cert); | 344 | peer_cert_bytes = CBS_data(&peer_cert); |
| 345 | if (d2i_X509(&s->peer, &peer_cert_bytes, | 345 | if (d2i_X509(&s->peer_cert, &peer_cert_bytes, |
| 346 | (long)data_len) == NULL) | 346 | (long)data_len) == NULL) |
| 347 | goto err; | 347 | goto err; |
| 348 | } | 348 | } |
