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
|
<!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: cert_vfy.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_782c1fcd7529e1a05f3f2af490691324.html">common</a>
</div>
</div>
<div class="contents">
<h1>cert_vfy.h</h1><a href="cert__vfy_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"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span>
<a name="l00007"></a>00007 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
<a name="l00013"></a>00013 <span class="comment"> * Lesser General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * $Id: cert_vfy.h 403 2010-04-07 13:25:49Z ludovic.rousseau $</span>
<a name="l00016"></a>00016 <span class="comment"> */</span>
<a name="l00017"></a>00017
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef __CERT_VFY_H_</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define __CERT_VFY_H_</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="cert__st_8h.html">cert_st.h</a>"</span>
<a name="l00031"></a>00031
<a name="l00032"></a><a class="code" href="cert__vfy_8h.html#ab77df6bf5287800e154be1018542aab8">00032</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00034"></a><a class="code" href="cert__vfy_8h.html#ab77df6bf5287800e154be1018542aab8affcde4b8f007980bd93b94b4c66e2fb3">00034</a> <a class="code" href="cert__vfy_8h.html#ab77df6bf5287800e154be1018542aab8affcde4b8f007980bd93b94b4c66e2fb3" title="Do not perform any CRL verification.">CRLP_NONE</a>,
<a name="l00036"></a><a class="code" href="cert__vfy_8h.html#ab77df6bf5287800e154be1018542aab8a95f4bf39b70f87ab4afcb1ee77f974f2">00036</a> <a class="code" href="cert__vfy_8h.html#ab77df6bf5287800e154be1018542aab8a95f4bf39b70f87ab4afcb1ee77f974f2" title="Retrieve CRL from CA site.">CRLP_ONLINE</a>,
<a name="l00038"></a><a class="code" href="cert__vfy_8h.html#ab77df6bf5287800e154be1018542aab8ab4927411f8e4d31e007a8040f036d713">00038</a> <a class="code" href="cert__vfy_8h.html#ab77df6bf5287800e154be1018542aab8ab4927411f8e4d31e007a8040f036d713" title="Retrieve CRL from local filesystem.">CRLP_OFFLINE</a>,
<a name="l00040"></a><a class="code" href="cert__vfy_8h.html#ab77df6bf5287800e154be1018542aab8aac2d1ab539295c0012e8f77ca8504264">00040</a> <a class="code" href="cert__vfy_8h.html#ab77df6bf5287800e154be1018542aab8aac2d1ab539295c0012e8f77ca8504264" title="Try CRL check online, else ofline, else fail.">CRLP_AUTO</a>
<a name="l00041"></a>00041 } <a class="code" href="cert__vfy_8h.html#ab77df6bf5287800e154be1018542aab8">crl_policy_t</a>;
<a name="l00042"></a>00042
<a name="l00043"></a><a class="code" href="cert__vfy_8h.html#ae1c349e0e76aa063dd7bb358e48c53c5">00043</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00044"></a><a class="code" href="cert__vfy_8h.html#ae1c349e0e76aa063dd7bb358e48c53c5af5419e3493ea2cb3b1c60c657cfe48ff">00044</a> <a class="code" href="cert__vfy_8h.html#ae1c349e0e76aa063dd7bb358e48c53c5af5419e3493ea2cb3b1c60c657cfe48ff">OCSP_NONE</a>,
<a name="l00045"></a><a class="code" href="cert__vfy_8h.html#ae1c349e0e76aa063dd7bb358e48c53c5adb13787add7b772383a0b376cc9df39e">00045</a> <a class="code" href="cert__vfy_8h.html#ae1c349e0e76aa063dd7bb358e48c53c5adb13787add7b772383a0b376cc9df39e">OCSP_ON</a>
<a name="l00046"></a>00046 } <a class="code" href="cert__vfy_8h.html#ae1c349e0e76aa063dd7bb358e48c53c5">ocsp_policy_t</a>;
<a name="l00047"></a>00047
<a name="l00048"></a><a class="code" href="structcert__policy__st.html">00048</a> <span class="keyword">struct </span><a class="code" href="structcert__policy__st.html">cert_policy_st</a> {
<a name="l00049"></a><a class="code" href="structcert__policy__st.html#ae3020b82e38c451708f77b144b9a3f66">00049</a> <span class="keywordtype">int</span> <a class="code" href="structcert__policy__st.html#ae3020b82e38c451708f77b144b9a3f66">ca_policy</a>;
<a name="l00050"></a><a class="code" href="structcert__policy__st.html#a38fcc862c2f7febf4a2df328202807fa">00050</a> <span class="keywordtype">int</span> <a class="code" href="structcert__policy__st.html#a38fcc862c2f7febf4a2df328202807fa">crl_policy</a>;
<a name="l00051"></a><a class="code" href="structcert__policy__st.html#af8c62c98042d78f77e0bf25647957f87">00051</a> <span class="keywordtype">int</span> <a class="code" href="structcert__policy__st.html#af8c62c98042d78f77e0bf25647957f87">signature_policy</a>;
<a name="l00052"></a><a class="code" href="structcert__policy__st.html#a543a7f5cec5587e13bb19583cfca54b1">00052</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structcert__policy__st.html#a543a7f5cec5587e13bb19583cfca54b1">ca_dir</a>;
<a name="l00053"></a><a class="code" href="structcert__policy__st.html#a25db4ed05290154fb24712e8a5495a27">00053</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structcert__policy__st.html#a25db4ed05290154fb24712e8a5495a27">crl_dir</a>;
<a name="l00054"></a><a class="code" href="structcert__policy__st.html#afe1bb14b9d79f31bc1a7e12aa4372572">00054</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structcert__policy__st.html#afe1bb14b9d79f31bc1a7e12aa4372572">nss_dir</a>;
<a name="l00055"></a><a class="code" href="structcert__policy__st.html#a04b039659f36971eb3d935ace803572e">00055</a> <span class="keywordtype">int</span> <a class="code" href="structcert__policy__st.html#a04b039659f36971eb3d935ace803572e">ocsp_policy</a>;
<a name="l00056"></a>00056 };
<a name="l00057"></a>00057
<a name="l00058"></a>00058 <span class="preprocessor">#ifndef __CERT_VFY_C</span>
<a name="l00059"></a><a class="code" href="cert__vfy_8h.html#a4d252cfaa5d28f44e4c09b8cc167cf5c">00059</a> <span class="preprocessor"></span><span class="preprocessor">#define CERTVFY_EXTERN extern</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#define CERTVFY_EXTERN</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span>
<a name="l00070"></a>00070 <a class="code" href="cert__vfy_8h.html#a4d252cfaa5d28f44e4c09b8cc167cf5c">CERTVFY_EXTERN</a> <span class="keywordtype">int</span> <a class="code" href="cert__vfy_8h.html#a71048924d0302ee24e5e026a51c9d7c3" title="Verify provided certificate, and if needed, CRL.">verify_certificate</a>(X509 * x509, <a class="code" href="structcert__policy__st.html">cert_policy</a> *policy);
<a name="l00071"></a>00071
<a name="l00081"></a>00081 <a class="code" href="cert__vfy_8h.html#a4d252cfaa5d28f44e4c09b8cc167cf5c">CERTVFY_EXTERN</a> <span class="keywordtype">int</span> <a class="code" href="cert__vfy_8h.html#ab89748c588a59756c8c3271992c0e789" title="Verify signature of provided data.">verify_signature</a>(X509 * x509, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *data, <span class="keywordtype">int</span> data_length, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *signature, <span class="keywordtype">int</span> signature_length);
<a name="l00082"></a>00082
<a name="l00083"></a>00083 <span class="preprocessor">#undef CERTVFY_EXTERN</span>
<a name="l00084"></a>00084 <span class="preprocessor"></span>
<a name="l00085"></a>00085 <span class="preprocessor">#endif </span><span class="comment">/* __CERT_VFY_H_ */</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>
|