[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
shishi/lib tkt.c
From: |
shishi-commit |
Subject: |
shishi/lib tkt.c |
Date: |
Thu, 27 Nov 2003 14:04:21 -0500 |
CVSROOT: /cvsroot/shishi
Module name: shishi
Branch:
Changes by: Simon Josefsson <address@hidden> 03/11/27 14:04:20
Modified files:
lib : tkt.c
Log message:
(shishi_tkt_keytype_fast): New.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/shishi/shishi/lib/tkt.c.diff?tr1=1.28&tr2=1.29&r1=text&r2=text
Patches:
Index: shishi/lib/tkt.c
diff -u shishi/lib/tkt.c:1.28 shishi/lib/tkt.c:1.29
--- shishi/lib/tkt.c:1.28 Wed Nov 26 12:44:31 2003
+++ shishi/lib/tkt.c Thu Nov 27 14:04:20 2003
@@ -938,6 +938,29 @@
}
/**
+ * shishi_tkt_keytype_fast:
+ * @tkt: input variable with ticket info.
+ *
+ * Extract encryption type of key in ticket (really EncKDCRepPart).
+ *
+ * Return value: Returns encryption type of session key in ticket
+ * (really EncKDCRepPart), or -1 on error.
+ **/
+int32_t
+shishi_tkt_keytype_fast (Shishi_tkt * tkt)
+{
+ int32_t etype = -1;
+ int res;
+
+ res = shishi_asn1_read_int32 (tkt->handle, tkt->enckdcreppart,
+ "key.keytype", &etype);
+ if (res != SHISHI_OK)
+ return -1;
+
+ return etype;
+}
+
+/**
* shishi_tkt_keytype_p:
* @tkt: input variable with ticket info.
* @etype: encryption type, see Shishi_etype.