krb5 commit [krb5-1.18]: Add stubs for some removed replay cache functions
Greg Hudson
ghudson at mit.edu
Thu May 21 16:35:34 EDT 2020
https://github.com/krb5/krb5/commit/a5d504e908836db10946145c245ffa2ccf428ca7
commit a5d504e908836db10946145c245ffa2ccf428ca7
Author: Greg Hudson <ghudson at mit.edu>
Date: Sun May 10 12:59:24 2020 -0400
Add stubs for some removed replay cache functions
Commit dcb853ac32779b173f39e19c0f24b0087de85771 removed some replay
cache functions that haven't been considered part of the libkrb5 API.
Some of these functions were used in OpenSSL (despite the lack of
prototypes) prior to the OpenSSL 1.1 release. Run-time linker errors
can occur if an OpenSSL 1.0.x (or earlier) libssl is used with a 1.18
libkrb5, even though the Kerberos code would likely never be used.
Add stubs for the four functions historically used in OpenSSL.
(cherry picked from commit 58109348cfa70c44b2b36233c18f9bb02a94cf26)
ticket: 8905
version_fixed: 1.18.2
src/lib/krb5/libkrb5.exports | 4 ++++
src/lib/krb5/rcache/rc_base.c | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/src/lib/krb5/libkrb5.exports b/src/lib/krb5/libkrb5.exports
index 5b17d58..5aba29e 100644
--- a/src/lib/krb5/libkrb5.exports
+++ b/src/lib/krb5/libkrb5.exports
@@ -522,6 +522,10 @@ krb5_principal_compare
krb5_principal_compare_any_realm
krb5_principal_compare_flags
krb5_prompter_posix
+krb5_rc_default
+krb5_rc_destroy
+krb5_rc_get_lifespan
+krb5_rc_initialize
krb5_rd_cred
krb5_rd_error
krb5_rd_priv
diff --git a/src/lib/krb5/rcache/rc_base.c b/src/lib/krb5/rcache/rc_base.c
index cbde91f..5f456d1 100644
--- a/src/lib/krb5/rcache/rc_base.c
+++ b/src/lib/krb5/rcache/rc_base.c
@@ -160,3 +160,39 @@ k5_rc_tag_from_ciphertext(krb5_context context, const krb5_enc_data *enc,
*tag_out = make_data(cdata->data + cdata->length - len, len);
return 0;
}
+
+/*
+ * Stub functions for former internal replay cache functions used by OpenSSL
+ * (despite the lack of prototypes) before the OpenSSL 1.1 release.
+ */
+
+krb5_error_code krb5_rc_default(krb5_context, krb5_rcache *);
+krb5_error_code KRB5_CALLCONV krb5_rc_destroy(krb5_context, krb5_rcache);
+krb5_error_code KRB5_CALLCONV krb5_rc_get_lifespan(krb5_context, krb5_rcache,
+ krb5_deltat *);
+krb5_error_code KRB5_CALLCONV krb5_rc_initialize(krb5_context, krb5_rcache,
+ krb5_deltat);
+
+krb5_error_code
+krb5_rc_default(krb5_context context, krb5_rcache *rc)
+{
+ return EINVAL;
+}
+
+krb5_error_code KRB5_CALLCONV
+krb5_rc_destroy(krb5_context context, krb5_rcache rc)
+{
+ return EINVAL;
+}
+
+krb5_error_code KRB5_CALLCONV
+krb5_rc_get_lifespan(krb5_context context, krb5_rcache rc, krb5_deltat *span)
+{
+ return EINVAL;
+}
+
+krb5_error_code KRB5_CALLCONV
+krb5_rc_initialize(krb5_context context, krb5_rcache rc, krb5_deltat span)
+{
+ return EINVAL;
+}
More information about the cvs-krb5
mailing list