svn commit: lorikeet r456 - in trunk/heimdal/lib/gssapi: .
abartlet at samba.org
abartlet at samba.org
Wed Sep 7 22:05:31 GMT 2005
Author: abartlet
Date: 2005-09-07 22:05:31 +0000 (Wed, 07 Sep 2005)
New Revision: 456
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=456
Log:
A new function, required for the PAC verification, to extract the
authtime from a ticket. Not sure if this is better or worse than
getting out the whole ticket, but it seems more implementation
independent...
Andrew Bartlett
Modified:
trunk/heimdal/lib/gssapi/copy_ccache.c
Changeset:
Modified: trunk/heimdal/lib/gssapi/copy_ccache.c
===================================================================
--- trunk/heimdal/lib/gssapi/copy_ccache.c 2005-09-07 22:04:11 UTC (rev 455)
+++ trunk/heimdal/lib/gssapi/copy_ccache.c 2005-09-07 22:05:31 UTC (rev 456)
@@ -105,6 +105,25 @@
return GSS_S_COMPLETE;
}
+OM_uint32
+gsskrb5_extract_authtime_from_sec_context(OM_uint32 *minor_status,
+ gss_ctx_id_t context_handle,
+ time_t *authtime)
+{
+ HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
+ if (context_handle->ticket == NULL) {
+ HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
+ *minor_status = EINVAL;
+ return GSS_S_FAILURE;
+ }
+
+ *authtime = context_handle->ticket->ticket.authtime;
+ HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
+
+ *minor_status = 0;
+ return GSS_S_COMPLETE;
+}
+
OM_uint32 gss_krb5_copy_service_keyblock
(OM_uint32 *minor_status,
gss_ctx_id_t context_handle,
More information about the samba-cvs
mailing list