1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>pam_pkcs11: mapper_mgr.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="dir_55f9682142a78e45196901be32452b47.html">src</a> » <a class="el" href="dir_b1fb60ec93b2cda3cbf5ea3322ab5bc7.html">pam_pkcs11</a>
</div>
</div>
<div class="contents">
<h1>mapper_mgr.h</h1><a href="mapper__mgr_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * PKCS #11 PAM Login Module</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2003 Mario Strasser <mast@gmx.net>,</span>
<a name="l00004"></a>00004 <span class="comment"> * Mapper module copyright (c) 2005 Juan Antonio Martinez <jonsito@teleline.es></span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
<a name="l00007"></a>00007 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span>
<a name="l00008"></a>00008 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00009"></a>00009 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00010"></a>00010 <span class="comment"> *</span>
<a name="l00011"></a>00011 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
<a name="l00012"></a>00012 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00013"></a>00013 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
<a name="l00014"></a>00014 <span class="comment"> * Lesser General Public License for more details.</span>
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * $Id: mapper_mgr.h 358 2008-11-06 14:28:46Z ludovic.rousseau $</span>
<a name="l00017"></a>00017 <span class="comment"> */</span>
<a name="l00018"></a>00018
<a name="l00019"></a>00019 <span class="comment">/*</span>
<a name="l00020"></a>00020 <span class="comment">* this module manages dynamic load of mapping modules</span>
<a name="l00021"></a>00021 <span class="comment">* also is used as entry point for cert matching routines</span>
<a name="l00022"></a>00022 <span class="comment">*/</span>
<a name="l00023"></a>00023
<a name="l00024"></a>00024 <span class="preprocessor">#ifndef _MAPPER_MGR_H_</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define _MAPPER_MGR_H_</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#include <config.h></span>
<a name="l00029"></a>00029 <span class="preprocessor">#endif</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include "../common/cert_st.h"</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include "../scconf/scconf.h"</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include "../mappers/mapper.h"</span>
<a name="l00034"></a>00034
<a name="l00035"></a>00035 <span class="comment">/*</span>
<a name="l00036"></a>00036 <span class="comment">* mapper module descriptor</span>
<a name="l00037"></a>00037 <span class="comment">*/</span>
<a name="l00038"></a><a class="code" href="structmapper__instance.html">00038</a> <span class="keyword">struct </span><a class="code" href="structmapper__instance.html">mapper_instance</a> {
<a name="l00039"></a><a class="code" href="structmapper__instance.html#a336958ee9ec10f18a0a8bd9e2bf21d87">00039</a> <span class="keywordtype">void</span> *<a class="code" href="structmapper__instance.html#a336958ee9ec10f18a0a8bd9e2bf21d87">module_handler</a>;
<a name="l00040"></a><a class="code" href="structmapper__instance.html#a4c2d9327de87c6be0b54f793adc7f1fb">00040</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structmapper__instance.html#a4c2d9327de87c6be0b54f793adc7f1fb">module_name</a>;
<a name="l00041"></a><a class="code" href="structmapper__instance.html#a038f61f874f171e16864d8b9a2bd5df9">00041</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structmapper__instance.html#a038f61f874f171e16864d8b9a2bd5df9">module_path</a>;
<a name="l00042"></a><a class="code" href="structmapper__instance.html#a5932014fc61839cfaf60693fc68f0b11">00042</a> <a class="code" href="structmapper__module__st.html" title="Structure to be filled on mapper module initialization.">mapper_module</a> *<a class="code" href="structmapper__instance.html#a5932014fc61839cfaf60693fc68f0b11">module_data</a>;
<a name="l00043"></a>00043 };
<a name="l00044"></a>00044
<a name="l00045"></a>00045 <span class="comment">/*</span>
<a name="l00046"></a>00046 <span class="comment">* mapper module list</span>
<a name="l00047"></a>00047 <span class="comment">*/</span>
<a name="l00048"></a><a class="code" href="structmapper__listitem.html">00048</a> <span class="keyword">struct </span><a class="code" href="structmapper__listitem.html">mapper_listitem</a> {
<a name="l00049"></a><a class="code" href="structmapper__listitem.html#a1d9f5ff9bfbf6cc2f4e13d837ca6471d">00049</a> <span class="keyword">struct </span><a class="code" href="structmapper__instance.html">mapper_instance</a> *<a class="code" href="structmapper__listitem.html#a1d9f5ff9bfbf6cc2f4e13d837ca6471d">module</a>;
<a name="l00050"></a><a class="code" href="structmapper__listitem.html#a34cd90cb22c15691a3b8e58cb569aa43">00050</a> <span class="keyword">struct </span><a class="code" href="structmapper__listitem.html">mapper_listitem</a> *<a class="code" href="structmapper__listitem.html#a34cd90cb22c15691a3b8e58cb569aa43">next</a>;
<a name="l00051"></a>00051 };
<a name="l00052"></a>00052
<a name="l00053"></a>00053 <span class="comment">/*</span>
<a name="l00054"></a>00054 <span class="comment">* load and initialize a module</span>
<a name="l00055"></a>00055 <span class="comment">* returns descriptor on success, null on fail</span>
<a name="l00056"></a>00056 <span class="comment">*/</span>
<a name="l00057"></a>00057 <span class="keyword">struct </span><a class="code" href="structmapper__instance.html">mapper_instance</a> *<a class="code" href="mapper__mgr_8h.html#a23c5ac810d230c8e7be43c2257fa8ccf">load_module</a>(<a class="code" href="structscconf__context.html">scconf_context</a> *ctx, <span class="keyword">const</span> <span class="keywordtype">char</span> * name);
<a name="l00058"></a>00058
<a name="l00062"></a>00062 <span class="keywordtype">void</span> <a class="code" href="mapper__mgr_8h.html#a3402a94632688ea27a008e4b9a23c2e1" title="Unload a module.">unload_module</a>( <span class="keyword">struct</span> <a class="code" href="structmapper__instance.html">mapper_instance</a> *module );
<a name="l00063"></a>00063
<a name="l00067"></a>00067 <span class="keyword">struct </span><a class="code" href="structmapper__listitem.html">mapper_listitem</a> *<a class="code" href="mapper__mgr_8h.html#aae561e15bf3660fe344dd973987eb957" title="compose mapper module chain">load_mappers</a>( <a class="code" href="structscconf__context.html">scconf_context</a> *ctx );
<a name="l00068"></a>00068
<a name="l00072"></a>00072 <span class="keywordtype">void</span> <a class="code" href="mapper__mgr_8h.html#aa87058f025eb28bdf8ed4da80216d169" title="unload mapper module chain">unload_mappers</a>(<span class="keywordtype">void</span>);
<a name="l00073"></a>00073
<a name="l00074"></a>00074 <span class="comment">/*</span>
<a name="l00075"></a>00075 <span class="comment">* this function search mapper module list until</span>
<a name="l00076"></a>00076 <span class="comment">* find a module that returns a login name for</span>
<a name="l00077"></a>00077 <span class="comment">* provided certificate</span>
<a name="l00078"></a>00078 <span class="comment">*/</span>
<a name="l00079"></a>00079 <span class="keywordtype">char</span> * <a class="code" href="mapper__mgr_8h.html#a9e23baf57d636c8085bd68ec832a515b">find_user</a>(X509 *x509);
<a name="l00080"></a>00080
<a name="l00089"></a>00089 <span class="keywordtype">int</span> <a class="code" href="mapper__mgr_8h.html#ac5b85b8aae0f14885e7e28b087e9aab3" title="This function search mapper module list until find a module that match provided login...">match_user</a>(X509 *x509, <span class="keyword">const</span> <span class="keywordtype">char</span> *login);
<a name="l00090"></a>00090
<a name="l00091"></a>00091 <span class="comment">/*</span>
<a name="l00092"></a>00092 <span class="comment">* This funcions goest throught the mapper list</span>
<a name="l00093"></a>00093 <span class="comment">* and trying to get the certificate strings to be used on each</span>
<a name="l00094"></a>00094 <span class="comment">* module to perform find/match functions.</span>
<a name="l00095"></a>00095 <span class="comment">* No map / match are done: just print found strings on stdout.</span>
<a name="l00096"></a>00096 <span class="comment">* This function is mostly used in pkcert_view toool</span>
<a name="l00097"></a>00097 <span class="comment">*/</span>
<a name="l00098"></a>00098 <span class="keywordtype">void</span> <a class="code" href="mapper__mgr_8h.html#a051d6e314415a06f81ccd74821f031ee">inspect_certificate</a>(X509 *x509);
<a name="l00099"></a>00099
<a name="l00100"></a>00100 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Sat Jun 12 17:28:15 2010 for pam_pkcs11 by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
|