Rename a number of BUF_* functions to OPENSSL_*.
Upstream did this in 7644a9aef8932ed4d1c3f25ed776c997702982be, so align
with them. Add the new OPENSSL_* names and switch all callers witihn the
library to match. Keep the old BUF_* names around for compatibility.
Note there were two functions where we already had an OPENSSL_* version:
OPENSSL_strdup and OPENSSL_strnlen. The former now gains a NULL check to
align with BUF_strdup. The latter gets deduplicated; we had two
implementations.
Change-Id: Ia1cd4527a752fcd62e142ed1e1d7768d323279ba
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/38425
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/ssl/ssl_session.cc b/ssl/ssl_session.cc
index bb04b1a..77d3f4c 100644
--- a/ssl/ssl_session.cc
+++ b/ssl/ssl_session.cc
@@ -208,7 +208,8 @@
// Copy authentication state.
if (session->psk_identity != nullptr) {
- new_session->psk_identity.reset(BUF_strdup(session->psk_identity.get()));
+ new_session->psk_identity.reset(
+ OPENSSL_strdup(session->psk_identity.get()));
if (new_session->psk_identity == nullptr) {
return nullptr;
}