From 33f661cecdad3182ee66b47805fa4bb212e0da6c Mon Sep 17 00:00:00 2001 From: stas Date: Wed, 5 Oct 2011 07:23:29 +0000 Subject: - Import Heimdal 1.5 distribution. --- doc/doxyout/ntlm/html/annotated.html | 39 + doc/doxyout/ntlm/html/doxygen.css | 473 +++++++++++ doc/doxyout/ntlm/html/doxygen.png | Bin 0 -> 1281 bytes doc/doxyout/ntlm/html/examples.html | 30 + doc/doxyout/ntlm/html/functions.html | 78 ++ doc/doxyout/ntlm/html/functions_vars.html | 78 ++ doc/doxyout/ntlm/html/graph_legend.dot | 22 + doc/doxyout/ntlm/html/graph_legend.html | 89 ++ doc/doxyout/ntlm/html/graph_legend.png | Bin 0 -> 4256 bytes doc/doxyout/ntlm/html/group__ntlm__core.html | 936 +++++++++++++++++++++ doc/doxyout/ntlm/html/index.html | 37 + doc/doxyout/ntlm/html/modules.html | 30 + doc/doxyout/ntlm/html/structntlm__buf.html | 82 ++ doc/doxyout/ntlm/html/structntlm__type1.html | 118 +++ doc/doxyout/ntlm/html/structntlm__type2.html | 159 ++++ .../ntlm/html/structntlm__type2__coll__graph.map | 1 + .../ntlm/html/structntlm__type2__coll__graph.md5 | 1 + .../ntlm/html/structntlm__type2__coll__graph.png | Bin 0 -> 821 bytes doc/doxyout/ntlm/html/structntlm__type3.html | 194 +++++ .../ntlm/html/structntlm__type3__coll__graph.map | 1 + .../ntlm/html/structntlm__type3__coll__graph.md5 | 1 + .../ntlm/html/structntlm__type3__coll__graph.png | Bin 0 -> 951 bytes doc/doxyout/ntlm/html/tab_b.gif | Bin 0 -> 35 bytes doc/doxyout/ntlm/html/tab_l.gif | Bin 0 -> 706 bytes doc/doxyout/ntlm/html/tab_r.gif | Bin 0 -> 2585 bytes doc/doxyout/ntlm/html/tabs.css | 102 +++ doc/doxyout/ntlm/html/test__ntlm_8c-example.html | 408 +++++++++ 27 files changed, 2879 insertions(+) create mode 100644 doc/doxyout/ntlm/html/annotated.html create mode 100644 doc/doxyout/ntlm/html/doxygen.css create mode 100644 doc/doxyout/ntlm/html/doxygen.png create mode 100644 doc/doxyout/ntlm/html/examples.html create mode 100644 doc/doxyout/ntlm/html/functions.html create mode 100644 doc/doxyout/ntlm/html/functions_vars.html create mode 100644 doc/doxyout/ntlm/html/graph_legend.dot create mode 100644 doc/doxyout/ntlm/html/graph_legend.html create mode 100644 doc/doxyout/ntlm/html/graph_legend.png create mode 100644 doc/doxyout/ntlm/html/group__ntlm__core.html create mode 100644 doc/doxyout/ntlm/html/index.html create mode 100644 doc/doxyout/ntlm/html/modules.html create mode 100644 doc/doxyout/ntlm/html/structntlm__buf.html create mode 100644 doc/doxyout/ntlm/html/structntlm__type1.html create mode 100644 doc/doxyout/ntlm/html/structntlm__type2.html create mode 100644 doc/doxyout/ntlm/html/structntlm__type2__coll__graph.map create mode 100644 doc/doxyout/ntlm/html/structntlm__type2__coll__graph.md5 create mode 100644 doc/doxyout/ntlm/html/structntlm__type2__coll__graph.png create mode 100644 doc/doxyout/ntlm/html/structntlm__type3.html create mode 100644 doc/doxyout/ntlm/html/structntlm__type3__coll__graph.map create mode 100644 doc/doxyout/ntlm/html/structntlm__type3__coll__graph.md5 create mode 100644 doc/doxyout/ntlm/html/structntlm__type3__coll__graph.png create mode 100644 doc/doxyout/ntlm/html/tab_b.gif create mode 100644 doc/doxyout/ntlm/html/tab_l.gif create mode 100644 doc/doxyout/ntlm/html/tab_r.gif create mode 100644 doc/doxyout/ntlm/html/tabs.css create mode 100644 doc/doxyout/ntlm/html/test__ntlm_8c-example.html (limited to 'doc/doxyout/ntlm/html') diff --git a/doc/doxyout/ntlm/html/annotated.html b/doc/doxyout/ntlm/html/annotated.html new file mode 100644 index 0000000..d6a0354 --- /dev/null +++ b/doc/doxyout/ntlm/html/annotated.html @@ -0,0 +1,39 @@ + + +Heimdalntlmlibrary: Data Structures + + + +

+keyhole logo +

+ + + +
+

Data Structures

Here are the data structures with brief descriptions: + + + + +
ntlm_buf
ntlm_type1
ntlm_type2
ntlm_type3
+
+
+Generated on Sat Jul 30 13:45:40 2011 for Heimdalntlmlibrary by doxygen 1.5.6
+ + diff --git a/doc/doxyout/ntlm/html/doxygen.css b/doc/doxyout/ntlm/html/doxygen.css new file mode 100644 index 0000000..22c4843 --- /dev/null +++ b/doc/doxyout/ntlm/html/doxygen.css @@ -0,0 +1,473 @@ +BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { + font-family: Geneva, Arial, Helvetica, sans-serif; +} +BODY,TD { + font-size: 90%; +} +H1 { + text-align: center; + font-size: 160%; +} +H2 { + font-size: 120%; +} +H3 { + font-size: 100%; +} +CAPTION { + font-weight: bold +} +DIV.qindex { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navpath { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navtab { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +TD.navtab { + font-size: 70%; +} +A.qindex { + text-decoration: none; + font-weight: bold; + color: #1A419D; +} +A.qindex:visited { + text-decoration: none; + font-weight: bold; + color: #1A419D +} +A.qindex:hover { + text-decoration: none; + background-color: #ddddff; +} +A.qindexHL { + text-decoration: none; + font-weight: bold; + background-color: #6666cc; + color: #ffffff; + border: 1px double #9295C2; +} +A.qindexHL:hover { + text-decoration: none; + background-color: #6666cc; + color: #ffffff; +} +A.qindexHL:visited { + text-decoration: none; + background-color: #6666cc; + color: #ffffff +} +A.el { + text-decoration: none; + font-weight: bold +} +A.elRef { + font-weight: bold +} +A.code:link { + text-decoration: none; + font-weight: normal; + color: #0000FF +} +A.code:visited { + text-decoration: none; + font-weight: normal; + color: #0000FF +} +A.codeRef:link { + font-weight: normal; + color: #0000FF +} +A.codeRef:visited { + font-weight: normal; + color: #0000FF +} +A:hover { + text-decoration: none; + background-color: #f2f2ff +} +DL.el { + margin-left: -1cm +} +.fragment { + font-family: monospace, fixed; + font-size: 95%; +} +PRE.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + margin-top: 4px; + margin-bottom: 4px; + margin-left: 2px; + margin-right: 8px; + padding-left: 6px; + padding-right: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +DIV.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px +} + +DIV.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; +} +DIV.groupText { + margin-left: 16px; + font-style: italic; + font-size: 90% +} +BODY { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} +TD.indexkey { + background-color: #e8eef2; + font-weight: bold; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TD.indexvalue { + background-color: #e8eef2; + font-style: italic; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TR.memlist { + background-color: #f0f0f0; +} +P.formulaDsp { + text-align: center; +} +IMG.formulaDsp { +} +IMG.formulaInl { + vertical-align: middle; +} +SPAN.keyword { color: #008000 } +SPAN.keywordtype { color: #604020 } +SPAN.keywordflow { color: #e08000 } +SPAN.comment { color: #800000 } +SPAN.preprocessor { color: #806020 } +SPAN.stringliteral { color: #002080 } +SPAN.charliteral { color: #008080 } +SPAN.vhdldigit { color: #ff00ff } +SPAN.vhdlchar { color: #000000 } +SPAN.vhdlkeyword { color: #700070 } +SPAN.vhdllogic { color: #ff0000 } + +.mdescLeft { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.mdescRight { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplParams { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + color: #606060; + background-color: #FAFAFA; + font-size: 80%; +} +.search { + color: #003399; + font-weight: bold; +} +FORM.search { + margin-bottom: 0px; + margin-top: 0px; +} +INPUT.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +TD.tiny { + font-size: 75%; +} +a { + color: #1A41A8; +} +a:visited { + color: #2A3798; +} +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #84b0c7; +} +TH.dirtab { + background: #e8eef2; + font-weight: bold; +} +HR { + height: 1px; + border: none; + border-top: 1px solid black; +} + +/* Style for detailed member documentation */ +.memtemplate { + font-size: 80%; + color: #606060; + font-weight: normal; + margin-left: 3px; +} +.memnav { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +.memitem { + padding: 4px; + background-color: #eef3f5; + border-width: 1px; + border-style: solid; + border-color: #dedeee; + -moz-border-radius: 8px 8px 8px 8px; +} +.memname { + white-space: nowrap; + font-weight: bold; +} +.memdoc{ + padding-left: 10px; +} +.memproto { + background-color: #d5e1e8; + width: 100%; + border-width: 1px; + border-style: solid; + border-color: #84b0c7; + font-weight: bold; + -moz-border-radius: 8px 8px 8px 8px; +} +.paramkey { + text-align: right; +} +.paramtype { + white-space: nowrap; +} +.paramname { + color: #602020; + font-style: italic; + white-space: nowrap; +} +/* End Styling for detailed member documentation */ + +/* for the tree view */ +.ftvtree { + font-family: sans-serif; + margin:0.5em; +} +/* these are for tree view when used as main index */ +.directory { + font-size: 9pt; + font-weight: bold; +} +.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +/* The following two styles can be used to replace the root node title */ +/* with an image of your choice. Simply uncomment the next two styles, */ +/* specify the name of your image and be sure to set 'height' to the */ +/* proper pixel height of your image. */ + +/* .directory h3.swap { */ +/* height: 61px; */ +/* background-repeat: no-repeat; */ +/* background-image: url("yourimage.gif"); */ +/* } */ +/* .directory h3.swap span { */ +/* display: none; */ +/* } */ + +.directory > h3 { + margin-top: 0; +} +.directory p { + margin: 0px; + white-space: nowrap; +} +.directory div { + display: none; + margin: 0px; +} +.directory img { + vertical-align: -30%; +} +/* these are for tree view when not used as main index */ +.directory-alt { + font-size: 100%; + font-weight: bold; +} +.directory-alt h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} +.directory-alt > h3 { + margin-top: 0; +} +.directory-alt p { + margin: 0px; + white-space: nowrap; +} +.directory-alt div { + display: none; + margin: 0px; +} +.directory-alt img { + vertical-align: -30%; +} + diff --git a/doc/doxyout/ntlm/html/doxygen.png b/doc/doxyout/ntlm/html/doxygen.png new file mode 100644 index 0000000..f0a274b Binary files /dev/null and b/doc/doxyout/ntlm/html/doxygen.png differ diff --git a/doc/doxyout/ntlm/html/examples.html b/doc/doxyout/ntlm/html/examples.html new file mode 100644 index 0000000..4382552 --- /dev/null +++ b/doc/doxyout/ntlm/html/examples.html @@ -0,0 +1,30 @@ + + +Heimdalntlmlibrary: Examples + + + +

+keyhole logo +

+ + + +
+

Examples

Here is a list of all examples: +
+
+Generated on Sat Jul 30 13:45:40 2011 for Heimdalntlmlibrary by doxygen 1.5.6
+ + diff --git a/doc/doxyout/ntlm/html/functions.html b/doc/doxyout/ntlm/html/functions.html new file mode 100644 index 0000000..89a8428 --- /dev/null +++ b/doc/doxyout/ntlm/html/functions.html @@ -0,0 +1,78 @@ + + +Heimdalntlmlibrary: Data Fields + + + +

+keyhole logo +

+ + + +
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +

+

+
+
+Generated on Sat Jul 30 13:45:40 2011 for Heimdalntlmlibrary by doxygen 1.5.6
+ + diff --git a/doc/doxyout/ntlm/html/functions_vars.html b/doc/doxyout/ntlm/html/functions_vars.html new file mode 100644 index 0000000..7452b71 --- /dev/null +++ b/doc/doxyout/ntlm/html/functions_vars.html @@ -0,0 +1,78 @@ + + +Heimdalntlmlibrary: Data Fields - Variables + + + +

+keyhole logo +

+ + + +
+  +

+

+
+
+Generated on Sat Jul 30 13:45:40 2011 for Heimdalntlmlibrary by doxygen 1.5.6
+ + diff --git a/doc/doxyout/ntlm/html/graph_legend.dot b/doc/doxyout/ntlm/html/graph_legend.dot new file mode 100644 index 0000000..4df0f1a --- /dev/null +++ b/doc/doxyout/ntlm/html/graph_legend.dot @@ -0,0 +1,22 @@ +digraph G +{ + edge [fontname="FreeSans",fontsize=10,labelfontname="FreeSans",labelfontsize=10]; + node [fontname="FreeSans",fontsize=10,shape=record]; + Node9 [shape="box",label="Inherited",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",fillcolor="grey75",style="filled" fontcolor="black"]; + Node10 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; + Node10 [shape="box",label="PublicBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPublicBase.html"]; + Node11 -> Node10 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; + Node11 [shape="box",label="Truncated",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="red",URL="$classTruncated.html"]; + Node13 -> Node9 [dir=back,color="darkgreen",fontsize=10,style="solid",fontname="FreeSans"]; + Node13 [shape="box",label="ProtectedBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classProtectedBase.html"]; + Node14 -> Node9 [dir=back,color="firebrick4",fontsize=10,style="solid",fontname="FreeSans"]; + Node14 [shape="box",label="PrivateBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPrivateBase.html"]; + Node15 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; + Node15 [shape="box",label="Undocumented",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="grey75"]; + Node16 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; + Node16 [shape="box",label="Templ< int >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; + Node17 -> Node16 [dir=back,color="orange",fontsize=10,style="dashed",label="< int >",fontname="FreeSans"]; + Node17 [shape="box",label="Templ< T >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; + Node18 -> Node9 [dir=back,color="darkorchid3",fontsize=10,style="dashed",label="m_usedClass",fontname="FreeSans"]; + Node18 [shape="box",label="Used",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classUsed.html"]; +} diff --git a/doc/doxyout/ntlm/html/graph_legend.html b/doc/doxyout/ntlm/html/graph_legend.html new file mode 100644 index 0000000..d4b7360 --- /dev/null +++ b/doc/doxyout/ntlm/html/graph_legend.html @@ -0,0 +1,89 @@ + + +Heimdalntlmlibrary: Graph Legend + + + +

+keyhole logo +

+ + + +
+

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

+Consider the following example:

/*! Invisible class because of truncation */
+class Invisible { };
+
+/*! Truncated class, inheritance relation is hidden */
+class Truncated : public Invisible { };
+
+/* Class not documented with doxygen comments */
+class Undocumented { };
+
+/*! Class that is inherited using public inheritance */
+class PublicBase : public Truncated { };
+
+/*! A template class */
+template<class T> class Templ { };
+
+/*! Class that is inherited using protected inheritance */
+class ProtectedBase { };
+
+/*! Class that is inherited using private inheritance */
+class PrivateBase { };
+
+/*! Class that is used by the Inherited class */
+class Used { };
+
+/*! Super class that inherits a number of other classes */
+class Inherited : public PublicBase,
+                  protected ProtectedBase,
+                  private PrivateBase,
+                  public Undocumented,
+                  public Templ<int>
+{
+  private:
+    Used *m_usedClass;
+};
+
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

+

+graph_legend.png +
+

+The boxes in the above graph have the following meaning:

+The arrows have the following meaning: +
+
+Generated on Sat Jul 30 13:45:40 2011 for Heimdalntlmlibrary by doxygen 1.5.6
+ + diff --git a/doc/doxyout/ntlm/html/graph_legend.png b/doc/doxyout/ntlm/html/graph_legend.png new file mode 100644 index 0000000..9b96937 Binary files /dev/null and b/doc/doxyout/ntlm/html/graph_legend.png differ diff --git a/doc/doxyout/ntlm/html/group__ntlm__core.html b/doc/doxyout/ntlm/html/group__ntlm__core.html new file mode 100644 index 0000000..99a1449 --- /dev/null +++ b/doc/doxyout/ntlm/html/group__ntlm__core.html @@ -0,0 +1,936 @@ + + +Heimdalntlmlibrary: Heimdal NTLM library + + + +

+keyhole logo +

+ + + +
+

Heimdal NTLM library

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

void heim_ntlm_free_buf (struct ntlm_buf *p)
void heim_ntlm_free_targetinfo (struct ntlm_targetinfo *ti)
int heim_ntlm_encode_targetinfo (const struct ntlm_targetinfo *ti, int ucs2, struct ntlm_buf *data)
int heim_ntlm_decode_targetinfo (const struct ntlm_buf *data, int ucs2, struct ntlm_targetinfo *ti)
void heim_ntlm_free_type1 (struct ntlm_type1 *data)
int heim_ntlm_encode_type1 (const struct ntlm_type1 *type1, struct ntlm_buf *data)
void heim_ntlm_free_type2 (struct ntlm_type2 *data)
int heim_ntlm_encode_type2 (const struct ntlm_type2 *type2, struct ntlm_buf *data)
void heim_ntlm_free_type3 (struct ntlm_type3 *data)
int heim_ntlm_encode_type3 (const struct ntlm_type3 *type3, struct ntlm_buf *data)
int heim_ntlm_nt_key (const char *password, struct ntlm_buf *key)
int heim_ntlm_calculate_ntlm1 (void *key, size_t len, unsigned char challenge[8], struct ntlm_buf *answer)
int heim_ntlm_build_ntlm1_master (void *key, size_t len, struct ntlm_buf *session, struct ntlm_buf *master)
int heim_ntlm_build_ntlm2_master (void *key, size_t len, struct ntlm_buf *blob, struct ntlm_buf *session, struct ntlm_buf *master)
int heim_ntlm_keyex_unwrap (struct ntlm_buf *baseKey, struct ntlm_buf *encryptedSession, struct ntlm_buf *session)
int heim_ntlm_ntlmv2_key (const void *key, size_t len, const char *username, const char *target, unsigned char ntlmv2[16])
int heim_ntlm_calculate_lm2 (const void *key, size_t len, const char *username, const char *target, const unsigned char serverchallenge[8], unsigned char ntlmv2[16], struct ntlm_buf *answer)
int heim_ntlm_calculate_ntlm2 (const void *key, size_t len, const char *username, const char *target, const unsigned char serverchallenge[8], const struct ntlm_buf *infotarget, unsigned char ntlmv2[16], struct ntlm_buf *answer)
int heim_ntlm_verify_ntlm2 (const void *key, size_t len, const char *username, const char *target, time_t now, const unsigned char serverchallenge[8], const struct ntlm_buf *answer, struct ntlm_buf *infotarget, unsigned char ntlmv2[16])
+

Detailed Description

+The NTLM core functions implement the string2key generation function, message encode and decode function, and the hash function functions.

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int heim_ntlm_build_ntlm1_master (void *  key,
size_t  len,
struct ntlm_buf session,
struct ntlm_buf master 
)
+
+
+ +

+Generates an NTLMv1 session random with assosited session master key.

+

Parameters:
+ + + + + +
key the ntlm v1 key
len length of key
session generated session nonce, should be freed with heim_ntlm_free_buf().
master calculated session master key, should be freed with heim_ntlm_free_buf().
+
+
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int heim_ntlm_build_ntlm2_master (void *  key,
size_t  len,
struct ntlm_buf blob,
struct ntlm_buf session,
struct ntlm_buf master 
)
+
+
+ +

+Generates an NTLMv2 session random with associated session master key.

+

Parameters:
+ + + + + + +
key the NTLMv2 key
len length of key
blob the NTLMv2 "blob"
session generated session nonce, should be freed with heim_ntlm_free_buf().
master calculated session master key, should be freed with heim_ntlm_free_buf().
+
+
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int heim_ntlm_calculate_lm2 (const void *  key,
size_t  len,
const char *  username,
const char *  target,
const unsigned char  serverchallenge[8],
unsigned char  ntlmv2[16],
struct ntlm_buf answer 
)
+
+
+ +

+Calculate LMv2 response

+

Parameters:
+ + + + + + + + +
key the ntlm key
len length of key
username name of the user, as sent in the message, assumed to be in UTF8.
target the name of the target, assumed to be in UTF8.
serverchallenge challenge as sent by the server in the type2 message.
ntlmv2 calculated session key
answer ntlm response answer, should be freed with heim_ntlm_free_buf().
+
+
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int heim_ntlm_calculate_ntlm1 (void *  key,
size_t  len,
unsigned char  challenge[8],
struct ntlm_buf answer 
)
+
+
+ +

+Calculate NTLMv1 response hash

+

Parameters:
+ + + + + +
key the ntlm v1 key
len length of key
challenge sent by the server
answer calculated answer, should be freed with heim_ntlm_free_buf().
+
+
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int heim_ntlm_calculate_ntlm2 (const void *  key,
size_t  len,
const char *  username,
const char *  target,
const unsigned char  serverchallenge[8],
const struct ntlm_buf infotarget,
unsigned char  ntlmv2[16],
struct ntlm_buf answer 
)
+
+
+ +

+Calculate NTLMv2 response

+

Parameters:
+ + + + + + + + + +
key the ntlm key
len length of key
username name of the user, as sent in the message, assumed to be in UTF8.
target the name of the target, assumed to be in UTF8.
serverchallenge challenge as sent by the server in the type2 message.
infotarget infotarget as sent by the server in the type2 message.
ntlmv2 calculated session key
answer ntlm response answer, should be freed with heim_ntlm_free_buf().
+
+
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int heim_ntlm_decode_targetinfo (const struct ntlm_buf data,
int  ucs2,
struct ntlm_targetinfo *  ti 
)
+
+
+ +

+Decodes an NTLM targetinfo message

+

Parameters:
+ + + + +
data input data buffer with the encode NTLM targetinfo message
ucs2 if the strings should be encoded with ucs2 (selected by flag in message).
ti the decoded target info, should be freed with heim_ntlm_free_targetinfo().
+
+
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int heim_ntlm_encode_targetinfo (const struct ntlm_targetinfo *  ti,
int  ucs2,
struct ntlm_buf data 
)
+
+
+ +

+Encodes a ntlm_targetinfo message.

+

Parameters:
+ + + + +
ti the ntlm_targetinfo message to encode.
ucs2 ignored
data is the return buffer with the encoded message, should be freed with heim_ntlm_free_buf().
+
+
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int heim_ntlm_encode_type1 (const struct ntlm_type1 type1,
struct ntlm_buf data 
)
+
+
+ +

+Encodes an ntlm_type1 message.

+

Parameters:
+ + + +
type1 the ntlm_type1 message to encode.
data is the return buffer with the encoded message, should be freed with heim_ntlm_free_buf().
+
+
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int heim_ntlm_encode_type2 (const struct ntlm_type2 type2,
struct ntlm_buf data 
)
+
+
+ +

+Encodes an ntlm_type2 message.

+

Parameters:
+ + + +
type2 the ntlm_type2 message to encode.
data is the return buffer with the encoded message, should be freed with heim_ntlm_free_buf().
+
+
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int heim_ntlm_encode_type3 (const struct ntlm_type3 type3,
struct ntlm_buf data 
)
+
+
+ +

+Encodes an ntlm_type3 message.

+

Parameters:
+ + + +
type3 the ntlm_type3 message to encode.
data is the return buffer with the encoded message, should be freed with heim_ntlm_free_buf().
+
+
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
+ +
+

+ +

+
+ + + + + + + + + +
void heim_ntlm_free_buf (struct ntlm_buf p  ) 
+
+
+ +

+heim_ntlm_free_buf frees the ntlm buffer

+

Parameters:
+ + +
p buffer to be freed
+
+ +
+

+ +

+
+ + + + + + + + + +
void heim_ntlm_free_targetinfo (struct ntlm_targetinfo *  ti  ) 
+
+
+ +

+Frees the ntlm_targetinfo message

+

Parameters:
+ + +
ti targetinfo to be freed
+
+ +
+

+ +

+
+ + + + + + + + + +
void heim_ntlm_free_type1 (struct ntlm_type1 data  ) 
+
+
+ +

+Frees the ntlm_type1 message

+

Parameters:
+ + +
data message to be freed
+
+ +
+

+ +

+
+ + + + + + + + + +
void heim_ntlm_free_type2 (struct ntlm_type2 data  ) 
+
+
+ +

+Frees the ntlm_type2 message

+

Parameters:
+ + +
data message to be freed
+
+ +
+

+ +

+
+ + + + + + + + + +
void heim_ntlm_free_type3 (struct ntlm_type3 data  ) 
+
+
+ +

+Frees the ntlm_type3 message

+

Parameters:
+ + +
data message to be freed
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int heim_ntlm_keyex_unwrap (struct ntlm_buf baseKey,
struct ntlm_buf encryptedSession,
struct ntlm_buf session 
)
+
+
+ +

+Given a key and encrypted session, unwrap the session key

+

Parameters:
+ + + + +
baseKey the sessionBaseKey
encryptedSession encrypted session, type3.session field.
session generated session nonce, should be freed with heim_ntlm_free_buf().
+
+
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int heim_ntlm_nt_key (const char *  password,
struct ntlm_buf key 
)
+
+
+ +

+Calculate the NTLM key, the password is assumed to be in UTF8.

+

Parameters:
+ + + +
password password to calcute the key for.
key calcuted key, should be freed with heim_ntlm_free_buf().
+
+
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int heim_ntlm_ntlmv2_key (const void *  key,
size_t  len,
const char *  username,
const char *  target,
unsigned char  ntlmv2[16] 
)
+
+
+ +

+Generates an NTLMv2 session key.

+

Parameters:
+ + + + + + +
key the ntlm key
len length of key
username name of the user, as sent in the message, assumed to be in UTF8.
target the name of the target, assumed to be in UTF8.
ntlmv2 the ntlmv2 session key
+
+
Returns:
0 on success, or an error code on failure.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int heim_ntlm_verify_ntlm2 (const void *  key,
size_t  len,
const char *  username,
const char *  target,
time_t  now,
const unsigned char  serverchallenge[8],
const struct ntlm_buf answer,
struct ntlm_buf infotarget,
unsigned char  ntlmv2[16] 
)
+
+
+ +

+Verify NTLMv2 response.

+

Parameters:
+ + + + + + + + + + +
key the ntlm key
len length of key
username name of the user, as sent in the message, assumed to be in UTF8.
target the name of the target, assumed to be in UTF8.
now the time now (0 if the library should pick it up itself)
serverchallenge challenge as sent by the server in the type2 message.
answer ntlm response answer, should be freed with heim_ntlm_free_buf().
infotarget infotarget as sent by the server in the type2 message.
ntlmv2 calculated session key
+
+
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
+ +
+

+

+
+Generated on Sat Jul 30 13:45:40 2011 for Heimdalntlmlibrary by doxygen 1.5.6
+ + diff --git a/doc/doxyout/ntlm/html/index.html b/doc/doxyout/ntlm/html/index.html new file mode 100644 index 0000000..4e45d31 --- /dev/null +++ b/doc/doxyout/ntlm/html/index.html @@ -0,0 +1,37 @@ + + +Heimdalntlmlibrary: Heimdal NTLM library + + + +

+keyhole logo +

+ + + +
+

Heimdal NTLM library

+

+

1.5

+Introduction

+Heimdal libheimntlm library is a implementation of the NTLM protocol, both version 1 and 2. The GSS-API mech that uses this library adds support for transport encryption and integrity checking.

+NTLM is a protocol for mutual authentication, its still used in many protocol where Kerberos is not support, one example is EAP/X802.1x mechanism LEAP from Microsoft and Cisco.

+This is a support library for the core protocol, its used in Heimdal to implement and GSS-API mechanism. There is also support in the KDC to do remote digest authenticiation, this to allow services to authenticate users w/o direct access to the users ntlm hashes (same as Kerberos arcfour enctype keys).

+More information about the NTLM protocol can found here http://davenport.sourceforge.net/ntlm.html .

+The Heimdal projects web page: http://www.h5l.org/

+NTLM Example

+Example to to use test_ntlm::c .
+
+Generated on Sat Jul 30 13:45:40 2011 for Heimdalntlmlibrary by doxygen 1.5.6
+ + diff --git a/doc/doxyout/ntlm/html/modules.html b/doc/doxyout/ntlm/html/modules.html new file mode 100644 index 0000000..1baf0fa --- /dev/null +++ b/doc/doxyout/ntlm/html/modules.html @@ -0,0 +1,30 @@ + + +Heimdalntlmlibrary: Module Index + + + +

+keyhole logo +

+ + + +
+

Modules

Here is a list of all modules: +
+
+Generated on Sat Jul 30 13:45:40 2011 for Heimdalntlmlibrary by doxygen 1.5.6
+ + diff --git a/doc/doxyout/ntlm/html/structntlm__buf.html b/doc/doxyout/ntlm/html/structntlm__buf.html new file mode 100644 index 0000000..5474527 --- /dev/null +++ b/doc/doxyout/ntlm/html/structntlm__buf.html @@ -0,0 +1,82 @@ + + +Heimdalntlmlibrary: ntlm_buf Struct Reference + + + +

+keyhole logo +

+ + + +
+

ntlm_buf Struct Reference

#include <heimntlm.h> +

+ + + + + + + +

Data Fields

size_t length
void * data
+


Detailed Description

+Buffer for storing data in the NTLM library. When filled in by the library it should be freed with heim_ntlm_free_buf().
Examples:
+ +

+test_ntlm.c.


Field Documentation

+ +
+
+ + + + +
size_t ntlm_buf::length
+
+
+ +

+length buffer data

Examples:
+test_ntlm.c.
+
+

+ +

+
+ + + + +
void* ntlm_buf::data
+
+
+ +

+pointer to the data itself

Examples:
+test_ntlm.c.
+
+

+


The documentation for this struct was generated from the following file: +
+
+Generated on Sat Jul 30 13:45:40 2011 for Heimdalntlmlibrary by doxygen 1.5.6
+ + diff --git a/doc/doxyout/ntlm/html/structntlm__type1.html b/doc/doxyout/ntlm/html/structntlm__type1.html new file mode 100644 index 0000000..ea8cef3 --- /dev/null +++ b/doc/doxyout/ntlm/html/structntlm__type1.html @@ -0,0 +1,118 @@ + + +Heimdalntlmlibrary: ntlm_type1 Struct Reference + + + +

+keyhole logo +

+ + + +
+

ntlm_type1 Struct Reference

#include <heimntlm.h> +

+ + + + + + + + + + + +

Data Fields

uint32_t flags
char * domain
char * hostname
uint32_t os [2]
+


Detailed Description

+Struct for the NTLM type1 message info, the strings is assumed to be in UTF8. When filled in by the library it should be freed with heim_ntlm_free_type1().
Examples:
+ +

+test_ntlm.c.


Field Documentation

+ +
+
+ + + + +
uint32_t ntlm_type1::flags
+
+
+ +

+

Examples:
+test_ntlm.c.
+
+

+ +

+
+ + + + +
char* ntlm_type1::domain
+
+
+ +

+

Examples:
+test_ntlm.c.
+
+

+ +

+
+ + + + +
char* ntlm_type1::hostname
+
+
+ +

+

Examples:
+test_ntlm.c.
+
+

+ +

+
+ + + + +
uint32_t ntlm_type1::os[2]
+
+
+ +

+

Examples:
+test_ntlm.c.
+
+

+


The documentation for this struct was generated from the following file: +
+
+Generated on Sat Jul 30 13:45:40 2011 for Heimdalntlmlibrary by doxygen 1.5.6
+ + diff --git a/doc/doxyout/ntlm/html/structntlm__type2.html b/doc/doxyout/ntlm/html/structntlm__type2.html new file mode 100644 index 0000000..f301e41 --- /dev/null +++ b/doc/doxyout/ntlm/html/structntlm__type2.html @@ -0,0 +1,159 @@ + + +Heimdalntlmlibrary: ntlm_type2 Struct Reference + + + +

+keyhole logo +

+ + + +
+

ntlm_type2 Struct Reference

#include <heimntlm.h> +

+

+Collaboration diagram for ntlm_type2:
+
+

Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + +

Data Fields

uint32_t flags
char * targetname
struct ntlm_buf targetinfo
unsigned char challenge [8]
uint32_t context [2]
uint32_t os [2]
+

Detailed Description

+Struct for the NTLM type2 message info, the strings is assumed to be in UTF8. When filled in by the library it should be freed with heim_ntlm_free_type2().
Examples:
+ +

+test_ntlm.c.


Field Documentation

+ +
+
+ + + + +
uint32_t ntlm_type2::flags
+
+
+ +

+

Examples:
+test_ntlm.c.
+
+

+ +

+
+ + + + +
char* ntlm_type2::targetname
+
+
+ +

+

Examples:
+test_ntlm.c.
+
+

+ +

+
+ + + + +
struct ntlm_buf ntlm_type2::targetinfo [read]
+
+
+ +

+

Examples:
+test_ntlm.c.
+
+

+ +

+
+ + + + +
unsigned char ntlm_type2::challenge[8]
+
+
+ +

+

Examples:
+test_ntlm.c.
+
+

+ +

+
+ + + + +
uint32_t ntlm_type2::context[2]
+
+
+ +

+ +

+

+ +

+
+ + + + +
uint32_t ntlm_type2::os[2]
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
+
+Generated on Sat Jul 30 13:45:40 2011 for Heimdalntlmlibrary by doxygen 1.5.6
+ + diff --git a/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.map b/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.map new file mode 100644 index 0000000..9e6cd72 --- /dev/null +++ b/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.map @@ -0,0 +1 @@ + diff --git a/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.md5 b/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.md5 new file mode 100644 index 0000000..4340819 --- /dev/null +++ b/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.md5 @@ -0,0 +1 @@ +b5989391473842dda9191d0175c17177 \ No newline at end of file diff --git a/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.png b/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.png new file mode 100644 index 0000000..14c79b4 Binary files /dev/null and b/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.png differ diff --git a/doc/doxyout/ntlm/html/structntlm__type3.html b/doc/doxyout/ntlm/html/structntlm__type3.html new file mode 100644 index 0000000..210b469 --- /dev/null +++ b/doc/doxyout/ntlm/html/structntlm__type3.html @@ -0,0 +1,194 @@ + + +Heimdalntlmlibrary: ntlm_type3 Struct Reference + + + +

+keyhole logo +

+ + + +
+

ntlm_type3 Struct Reference

#include <heimntlm.h> +

+

+Collaboration diagram for ntlm_type3:
+
+

Collaboration graph
+ + +
[legend]
+ + + + + + + + + + + + + + + + + + + +

Data Fields

uint32_t flags
char * username
char * targetname
struct ntlm_buf lm
struct ntlm_buf ntlm
struct ntlm_buf sessionkey
char * ws
uint32_t os [2]
+

Detailed Description

+Struct for the NTLM type3 message info, the strings is assumed to be in UTF8. When filled in by the library it should be freed with heim_ntlm_free_type3().
Examples:
+ +

+test_ntlm.c.


Field Documentation

+ +
+
+ + + + +
uint32_t ntlm_type3::flags
+
+
+ +

+

Examples:
+test_ntlm.c.
+
+

+ +

+
+ + + + +
char* ntlm_type3::username
+
+
+ +

+

Examples:
+test_ntlm.c.
+
+

+ +

+
+ + + + +
char* ntlm_type3::targetname
+
+
+ +

+

Examples:
+test_ntlm.c.
+
+

+ +

+
+ + + + +
struct ntlm_buf ntlm_type3::lm [read]
+
+
+ +

+ +

+

+ +

+
+ + + + +
struct ntlm_buf ntlm_type3::ntlm [read]
+
+
+ +

+

Examples:
+test_ntlm.c.
+
+

+ +

+
+ + + + +
struct ntlm_buf ntlm_type3::sessionkey [read]
+
+
+ +

+ +

+

+ +

+
+ + + + +
char* ntlm_type3::ws
+
+
+ +

+

Examples:
+test_ntlm.c.
+
+

+ +

+
+ + + + +
uint32_t ntlm_type3::os[2]
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
+
+Generated on Sat Jul 30 13:45:40 2011 for Heimdalntlmlibrary by doxygen 1.5.6
+ + diff --git a/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.map b/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.map new file mode 100644 index 0000000..9e6cd72 --- /dev/null +++ b/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.map @@ -0,0 +1 @@ + diff --git a/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.md5 b/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.md5 new file mode 100644 index 0000000..1c9e723 --- /dev/null +++ b/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.md5 @@ -0,0 +1 @@ +e51b24543271b5e19333877ec8086fcd \ No newline at end of file diff --git a/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.png b/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.png new file mode 100644 index 0000000..6553470 Binary files /dev/null and b/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.png differ diff --git a/doc/doxyout/ntlm/html/tab_b.gif b/doc/doxyout/ntlm/html/tab_b.gif new file mode 100644 index 0000000..0d62348 Binary files /dev/null and b/doc/doxyout/ntlm/html/tab_b.gif differ diff --git a/doc/doxyout/ntlm/html/tab_l.gif b/doc/doxyout/ntlm/html/tab_l.gif new file mode 100644 index 0000000..9b1e633 Binary files /dev/null and b/doc/doxyout/ntlm/html/tab_l.gif differ diff --git a/doc/doxyout/ntlm/html/tab_r.gif b/doc/doxyout/ntlm/html/tab_r.gif new file mode 100644 index 0000000..ce9dd9f Binary files /dev/null and b/doc/doxyout/ntlm/html/tab_r.gif differ diff --git a/doc/doxyout/ntlm/html/tabs.css b/doc/doxyout/ntlm/html/tabs.css new file mode 100644 index 0000000..95f00a9 --- /dev/null +++ b/doc/doxyout/ntlm/html/tabs.css @@ -0,0 +1,102 @@ +/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ + +DIV.tabs +{ + float : left; + width : 100%; + background : url("tab_b.gif") repeat-x bottom; + margin-bottom : 4px; +} + +DIV.tabs UL +{ + margin : 0px; + padding-left : 10px; + list-style : none; +} + +DIV.tabs LI, DIV.tabs FORM +{ + display : inline; + margin : 0px; + padding : 0px; +} + +DIV.tabs FORM +{ + float : right; +} + +DIV.tabs A +{ + float : left; + background : url("tab_r.gif") no-repeat right top; + border-bottom : 1px solid #84B0C7; + font-size : x-small; + font-weight : bold; + text-decoration : none; +} + +DIV.tabs A:hover +{ + background-position: 100% -150px; +} + +DIV.tabs A:link, DIV.tabs A:visited, +DIV.tabs A:active, DIV.tabs A:hover +{ + color: #1A419D; +} + +DIV.tabs SPAN +{ + float : left; + display : block; + background : url("tab_l.gif") no-repeat left top; + padding : 5px 9px; + white-space : nowrap; +} + +DIV.tabs INPUT +{ + float : right; + display : inline; + font-size : 1em; +} + +DIV.tabs TD +{ + font-size : x-small; + font-weight : bold; + text-decoration : none; +} + + + +/* Commented Backslash Hack hides rule from IE5-Mac \*/ +DIV.tabs SPAN {float : none;} +/* End IE5-Mac hack */ + +DIV.tabs A:hover SPAN +{ + background-position: 0% -150px; +} + +DIV.tabs LI.current A +{ + background-position: 100% -150px; + border-width : 0px; +} + +DIV.tabs LI.current SPAN +{ + background-position: 0% -150px; + padding-bottom : 6px; +} + +DIV.navpath +{ + background : none; + border : none; + border-bottom : 1px solid #84B0C7; +} diff --git a/doc/doxyout/ntlm/html/test__ntlm_8c-example.html b/doc/doxyout/ntlm/html/test__ntlm_8c-example.html new file mode 100644 index 0000000..a64fdad --- /dev/null +++ b/doc/doxyout/ntlm/html/test__ntlm_8c-example.html @@ -0,0 +1,408 @@ + + +Heimdalntlmlibrary: test_ntlm.c + + + +

+keyhole logo +

+ + + +
+

test_ntlm.c

Example how to use the NTLM primitives.

+

/*
+ * Copyright (c) 2006 - 2007 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of KTH nor the names of its contributors may be
+ *    used to endorse or promote products derived from this software without
+ *    specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include <stdio.h>
+#include <err.h>
+#include <roken.h>
+#include <getarg.h>
+
+#include <krb5-types.h> /* or <inttypes.h> */
+#include <heimntlm.h>
+
+static int
+test_parse(void)
+{
+    const char *user = "foo",
+        *domain = "mydomain",
+        *password = "digestpassword",
+        *target = "DOMAIN";
+    struct ntlm_type1 type1;
+    struct ntlm_type2 type2;
+    struct ntlm_type3 type3;
+    struct ntlm_buf data;
+    int ret, flags;
+
+    memset(&type1, 0, sizeof(type1));
+
+    type1.flags = NTLM_NEG_UNICODE|NTLM_NEG_TARGET|NTLM_NEG_NTLM;
+    type1.domain = rk_UNCONST(domain);
+    type1.hostname = NULL;
+    type1.os[0] = 0;
+    type1.os[1] = 0;
+
+    ret = heim_ntlm_encode_type1(&type1, &data);
+    if (ret)
+        errx(1, "heim_ntlm_encode_type1");
+
+    memset(&type1, 0, sizeof(type1));
+
+    ret = heim_ntlm_decode_type1(&data, &type1);
+    free(data.data);
+    if (ret)
+        errx(1, "heim_ntlm_encode_type1");
+
+    heim_ntlm_free_type1(&type1);
+
+    /*
+     *
+     */
+
+    memset(&type2, 0, sizeof(type2));
+
+    flags = NTLM_NEG_UNICODE | NTLM_NEG_NTLM | NTLM_TARGET_DOMAIN;
+    type2.flags = flags;
+
+    memset(type2.challenge, 0x7f, sizeof(type2.challenge));
+    type2.targetname = rk_UNCONST(target);
+    type2.targetinfo.data = NULL;
+    type2.targetinfo.length = 0;
+
+    ret = heim_ntlm_encode_type2(&type2, &data);
+    if (ret)
+        errx(1, "heim_ntlm_encode_type2");
+
+    memset(&type2, 0, sizeof(type2));
+
+    ret = heim_ntlm_decode_type2(&data, &type2);
+    free(data.data);
+    if (ret)
+        errx(1, "heim_ntlm_decode_type2");
+
+    heim_ntlm_free_type2(&type2);
+
+    /*
+     *
+     */
+
+    memset(&type3, 0, sizeof(type3));
+
+    type3.flags = flags;
+    type3.username = rk_UNCONST(user);
+    type3.targetname = rk_UNCONST(target);
+    type3.ws = rk_UNCONST("workstation");
+
+    {
+        struct ntlm_buf key;
+        heim_ntlm_nt_key(password, &key);
+
+        heim_ntlm_calculate_ntlm1(key.data, key.length,
+                                  type2.challenge,
+                                  &type3.ntlm);
+        free(key.data);
+    }
+
+    ret = heim_ntlm_encode_type3(&type3, &data);
+    if (ret)
+        errx(1, "heim_ntlm_encode_type3");
+
+    free(type3.ntlm.data);
+
+    memset(&type3, 0, sizeof(type3));
+
+    ret = heim_ntlm_decode_type3(&data, 1, &type3);
+    free(data.data);
+    if (ret)
+        errx(1, "heim_ntlm_decode_type3");
+
+    if (strcmp("workstation", type3.ws) != 0)
+        errx(1, "type3 ws wrong");
+
+    if (strcmp(target, type3.targetname) != 0)
+        errx(1, "type3 targetname wrong");
+
+    if (strcmp(user, type3.username) != 0)
+        errx(1, "type3 username wrong");
+
+
+    heim_ntlm_free_type3(&type3);
+
+    /*
+     * NTLMv2
+     */
+
+    memset(&type2, 0, sizeof(type2));
+
+    flags = NTLM_NEG_UNICODE | NTLM_NEG_NTLM | NTLM_TARGET_DOMAIN;
+    type2.flags = flags;
+
+    memset(type2.challenge, 0x7f, sizeof(type2.challenge));
+    type2.targetname = rk_UNCONST(target);
+    type2.targetinfo.data = "\x00\x00";
+    type2.targetinfo.length = 2;
+
+    ret = heim_ntlm_encode_type2(&type2, &data);
+    if (ret)
+        errx(1, "heim_ntlm_encode_type2");
+
+    memset(&type2, 0, sizeof(type2));
+
+    ret = heim_ntlm_decode_type2(&data, &type2);
+    free(data.data);
+    if (ret)
+        errx(1, "heim_ntlm_decode_type2");
+
+    heim_ntlm_free_type2(&type2);
+
+    return 0;
+}
+
+static int
+test_keys(void)
+{
+    const char
+        *username = "test",
+        *password = "test1234",
+        *target = "TESTNT";
+    const unsigned char
+        serverchallenge[8] = "\x67\x7f\x1c\x55\x7a\x5e\xe9\x6c";
+    struct ntlm_buf infotarget, infotarget2, answer, key;
+    unsigned char ntlmv2[16], ntlmv2_1[16];
+    int ret;
+
+    infotarget.length = 70;
+    infotarget.data =
+        "\x02\x00\x0c\x00\x54\x00\x45\x00\x53\x00\x54\x00\x4e\x00\x54\x00"
+        "\x01\x00\x0c\x00\x4d\x00\x45\x00\x4d\x00\x42\x00\x45\x00\x52\x00"
+        "\x03\x00\x1e\x00\x6d\x00\x65\x00\x6d\x00\x62\x00\x65\x00\x72\x00"
+            "\x2e\x00\x74\x00\x65\x00\x73\x00\x74\x00\x2e\x00\x63\x00\x6f"
+            "\x00\x6d\x00"
+        "\x00\x00\x00\x00";
+
+    answer.length = 0;
+    answer.data = NULL;
+
+    heim_ntlm_nt_key(password, &key);
+
+    ret = heim_ntlm_calculate_ntlm2(key.data,
+                                    key.length,
+                                    username,
+                                    target,
+                                    serverchallenge,
+                                    &infotarget,
+                                    ntlmv2,
+                                    &answer);
+    if (ret)
+        errx(1, "heim_ntlm_calculate_ntlm2");
+
+    ret = heim_ntlm_verify_ntlm2(key.data,
+                                 key.length,
+                                 username,
+                                 target,
+                                 0,
+                                 serverchallenge,
+                                 &answer,
+                                 &infotarget2,
+                                 ntlmv2_1);
+    if (ret)
+        errx(1, "heim_ntlm_verify_ntlm2");
+
+    if (memcmp(ntlmv2, ntlmv2_1, sizeof(ntlmv2)) != 0)
+        errx(1, "ntlm master key not same");
+
+    if (infotarget.length > infotarget2.length)
+        errx(1, "infotarget length");
+
+    if (memcmp(infotarget.data, infotarget2.data, infotarget.length) != 0)
+        errx(1, "infotarget not the same");
+
+    free(key.data);
+    free(answer.data);
+    free(infotarget2.data);
+
+    return 0;
+}
+
+static int
+test_ntlm2_session_resp(void)
+{
+    int ret;
+    struct ntlm_buf lm, ntlm;
+
+    const unsigned char lm_resp[24] =
+        "\xff\xff\xff\x00\x11\x22\x33\x44"
+        "\x00\x00\x00\x00\x00\x00\x00\x00"
+        "\x00\x00\x00\x00\x00\x00\x00\x00";
+    const unsigned char ntlm2_sess_resp[24] =
+        "\x10\xd5\x50\x83\x2d\x12\xb2\xcc"
+        "\xb7\x9d\x5a\xd1\xf4\xee\xd3\xdf"
+        "\x82\xac\xa4\xc3\x68\x1d\xd4\x55";
+
+    const unsigned char client_nonce[8] =
+        "\xff\xff\xff\x00\x11\x22\x33\x44";
+    const unsigned char server_challenge[8] =
+        "\x01\x23\x45\x67\x89\xab\xcd\xef";
+
+    const unsigned char ntlm_hash[16] =
+        "\xcd\x06\xca\x7c\x7e\x10\xc9\x9b"
+        "\x1d\x33\xb7\x48\x5a\x2e\xd8\x08";
+
+    ret = heim_ntlm_calculate_ntlm2_sess(client_nonce,
+                                         server_challenge,
+                                         ntlm_hash,
+                                         &lm,
+                                         &ntlm);
+    if (ret)
+        errx(1, "heim_ntlm_calculate_ntlm2_sess_resp");
+
+    if (lm.length != 24 || memcmp(lm.data, lm_resp, 24) != 0)
+        errx(1, "lm_resp wrong");
+    if (ntlm.length != 24 || memcmp(ntlm.data, ntlm2_sess_resp, 24) != 0)
+        errx(1, "ntlm2_sess_resp wrong");
+
+    free(lm.data);
+    free(ntlm.data);
+
+
+    return 0;
+}
+
+static int
+test_targetinfo(void)
+{
+    struct ntlm_targetinfo ti;
+    struct ntlm_buf buf;
+    const char *dnsservername = "dnsservername";
+    int ret;
+
+    memset(&ti, 0, sizeof(ti));
+
+    ti.dnsservername = rk_UNCONST(dnsservername);
+    ti.avflags = 1;
+    ret = heim_ntlm_encode_targetinfo(&ti, 1, &buf);
+    if (ret)
+        return ret;
+
+    memset(&ti, 0, sizeof(ti));
+
+    ret = heim_ntlm_decode_targetinfo(&buf, 1, &ti);
+    if (ret)
+        return ret;
+
+    if (ti.dnsservername == NULL ||
+        strcmp(ti.dnsservername, dnsservername) != 0)
+        errx(1, "ti.dnshostname != %s", dnsservername);
+    if (ti.avflags != 1)
+        errx(1, "ti.avflags != 1");
+
+    heim_ntlm_free_targetinfo(&ti);
+
+    return 0;
+}
+
+static int verbose_flag = 0;
+static int version_flag = 0;
+static int help_flag    = 0;
+
+static struct getargs args[] = {
+    {"verbose", 0,      arg_flag,       &verbose_flag, "verbose printing", NULL },
+    {"version", 0,      arg_flag,       &version_flag, "print version", NULL },
+    {"help",    0,      arg_flag,       &help_flag,  NULL, NULL }
+};
+
+static void
+usage (int ret)
+{
+    arg_printusage (args, sizeof(args)/sizeof(*args),
+                    NULL, "");
+    exit (ret);
+}
+
+int
+main(int argc, char **argv)
+{
+    int ret = 0, optind = 0;
+
+    setprogname(argv[0]);
+
+    if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind))
+        usage(1);
+
+    if (help_flag)
+        usage (0);
+
+    if(version_flag){
+        print_version(NULL);
+        exit(0);
+    }
+
+    argc -= optind;
+    argv += optind;
+
+    if (verbose_flag)
+        printf("test_parse\n");
+
+    ret += test_parse();
+    if (verbose_flag)
+        printf("test_keys\n");
+
+    ret += test_keys();
+    if (verbose_flag)
+        printf("test_ntlm2_session_resp\n");
+    ret += test_ntlm2_session_resp();
+
+    if (verbose_flag)
+        printf("test_targetinfo\n");
+    ret += test_targetinfo();
+
+    return ret;
+}
+
+
+Generated on Sat Jul 30 13:45:40 2011 for Heimdalntlmlibrary by doxygen 1.5.6
+ + -- cgit v1.1