Change |EVP_PKEY_up_ref| to return int.
Upstream have added |EVP_PKEY_up_ref|, but their version returns an int.
Having this function with a different signature like that is dangerous
so this change aligns BoringSSL with upstream. Users of this function in
Chromium and internally should already have been updated.
Change-Id: I0a7aeaf1a1ca3b0f0c635e2ee3826aa100b18157
Reviewed-on: https://boringssl-review.googlesource.com/8736
Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c
index d61f9f5..dead3ba 100644
--- a/ssl/ssl_cert.c
+++ b/ssl/ssl_cert.c
@@ -174,7 +174,8 @@
}
if (cert->privatekey != NULL) {
- ret->privatekey = EVP_PKEY_up_ref(cert->privatekey);
+ EVP_PKEY_up_ref(cert->privatekey);
+ ret->privatekey = cert->privatekey;
}
if (cert->chain) {