Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > 0c0756de82b9bb61e9713cceb885975f > files > 48

pkcs11-helper-devel-1.07-4.fc12.i686.rpm

<!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/html;charset=UTF-8"/>
<title>pkcs11-helper: pkcs11-helper-1.0/pkcs11h-certificate.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.0 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>pkcs11-helper-1.0/pkcs11h-certificate.h</h1><a href="pkcs11h-certificate_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"> * Copyright (c) 2005-2008 Alon Bar-Lev &lt;alon.barlev@gmail.com&gt;</span>
<a name="l00003"></a>00003 <span class="comment"> * All rights reserved.</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * This software is available to you under a choice of one of two</span>
<a name="l00006"></a>00006 <span class="comment"> * licenses.  You may choose to be licensed under the terms of the GNU</span>
<a name="l00007"></a>00007 <span class="comment"> * General Public License (GPL) Version 2, or the BSD license.</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * GNU General Public License (GPL) Version 2</span>
<a name="l00010"></a>00010 <span class="comment"> * ===========================================</span>
<a name="l00011"></a>00011 <span class="comment"> * This program is free software; you can redistribute it and/or modify</span>
<a name="l00012"></a>00012 <span class="comment"> * it under the terms of the GNU General Public License version 2</span>
<a name="l00013"></a>00013 <span class="comment"> * as published by the Free Software Foundation.</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * This program is distributed in the hope that it will be useful,</span>
<a name="l00016"></a>00016 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00017"></a>00017 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00018"></a>00018 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00019"></a>00019 <span class="comment"> *</span>
<a name="l00020"></a>00020 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00021"></a>00021 <span class="comment"> * along with this program (see the file COPYING.GPL included with this</span>
<a name="l00022"></a>00022 <span class="comment"> * distribution); if not, write to the Free Software Foundation, Inc.,</span>
<a name="l00023"></a>00023 <span class="comment"> * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.</span>
<a name="l00024"></a>00024 <span class="comment"> *</span>
<a name="l00025"></a>00025 <span class="comment"> * BSD License</span>
<a name="l00026"></a>00026 <span class="comment"> * ============</span>
<a name="l00027"></a>00027 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
<a name="l00028"></a>00028 <span class="comment"> * modification, are permitted provided that the following conditions are met:</span>
<a name="l00029"></a>00029 <span class="comment"> *</span>
<a name="l00030"></a>00030 <span class="comment"> *     o Redistributions of source code must retain the above copyright notice,</span>
<a name="l00031"></a>00031 <span class="comment"> *       this list of conditions and the following disclaimer.</span>
<a name="l00032"></a>00032 <span class="comment"> *     o Redistributions in binary form must reproduce the above copyright</span>
<a name="l00033"></a>00033 <span class="comment"> *       notice, this list of conditions and the following disclaimer in the</span>
<a name="l00034"></a>00034 <span class="comment"> *       documentation and/or other materials provided with the distribution.</span>
<a name="l00035"></a>00035 <span class="comment"> *     o Neither the name of the &lt;ORGANIZATION&gt; nor the names of its</span>
<a name="l00036"></a>00036 <span class="comment"> *       contributors may be used to endorse or promote products derived from</span>
<a name="l00037"></a>00037 <span class="comment"> *       this software without specific prior written permission.</span>
<a name="l00038"></a>00038 <span class="comment"> *</span>
<a name="l00039"></a>00039 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span>
<a name="l00040"></a>00040 <span class="comment"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span>
<a name="l00041"></a>00041 <span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span>
<a name="l00042"></a>00042 <span class="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span>
<a name="l00043"></a>00043 <span class="comment"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span>
<a name="l00044"></a>00044 <span class="comment"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span>
<a name="l00045"></a>00045 <span class="comment"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span>
<a name="l00046"></a>00046 <span class="comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span>
<a name="l00047"></a>00047 <span class="comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span>
<a name="l00048"></a>00048 <span class="comment"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span>
<a name="l00049"></a>00049 <span class="comment"> * POSSIBILITY OF SUCH DAMAGE.</span>
<a name="l00050"></a>00050 <span class="comment"> */</span>
<a name="l00051"></a>00051 
<a name="l00073"></a>00073 <span class="preprocessor">#ifndef __PKCS11H_CERTIFICATE_H</span>
<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#define __PKCS11H_CERTIFICATE_H</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span>
<a name="l00076"></a>00076 <span class="preprocessor">#include &lt;<a class="code" href="pkcs11h-core_8h.html" title="pkcs11-helper core.">pkcs11-helper-1.0/pkcs11h-core.h</a>&gt;</span>
<a name="l00077"></a>00077 
<a name="l00078"></a>00078 <span class="preprocessor">#if defined(__cplusplus)</span>
<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00080"></a>00080 <span class="preprocessor">#endif</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span>
<a name="l00082"></a>00082 <span class="keyword">struct </span><a class="code" href="structpkcs11h__certificate__id__s.html" title="Certificate id reference.">pkcs11h_certificate_id_s</a>;
<a name="l00083"></a>00083 <span class="keyword">struct </span>pkcs11h_certificate_s;
<a name="l00084"></a>00084 
<a name="l00088"></a><a class="code" href="group__pkcs11h__certificate.html#ga1083c61909a3632877369dc24bda1821">00088</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structpkcs11h__certificate__id__s.html" title="Certificate id reference.">pkcs11h_certificate_id_s</a> *<a class="code" href="structpkcs11h__certificate__id__s.html" title="Certificate id reference.">pkcs11h_certificate_id_t</a>;
<a name="l00089"></a>00089 
<a name="l00093"></a><a class="code" href="group__pkcs11h__certificate.html#ga7cb08e46261d4454b2330c7173db88b6">00093</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>pkcs11h_certificate_s *<a class="code" href="group__pkcs11h__certificate.html#ga7cb08e46261d4454b2330c7173db88b6" title="Certificate object.">pkcs11h_certificate_t</a>;
<a name="l00094"></a>00094 
<a name="l00095"></a>00095 <span class="keyword">struct </span><a class="code" href="structpkcs11h__certificate__id__list__s.html" title="Certificate id list.">pkcs11h_certificate_id_list_s</a>;
<a name="l00096"></a>00096 
<a name="l00100"></a><a class="code" href="group__pkcs11h__certificate.html#gac3d61ea33c4e863445b2e1ff2811ae95">00100</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structpkcs11h__certificate__id__list__s.html" title="Certificate id list.">pkcs11h_certificate_id_list_s</a> *<a class="code" href="structpkcs11h__certificate__id__list__s.html" title="Certificate id list.">pkcs11h_certificate_id_list_t</a>;
<a name="l00101"></a>00101 
<a name="l00105"></a><a class="code" href="structpkcs11h__certificate__id__s.html">00105</a> <span class="keyword">struct </span><a class="code" href="structpkcs11h__certificate__id__s.html" title="Certificate id reference.">pkcs11h_certificate_id_s</a> {
<a name="l00107"></a><a class="code" href="structpkcs11h__certificate__id__s.html#a0e0188e1533d648c2fa93f43dd3e3559">00107</a>         <a class="code" href="structpkcs11h__token__id__s.html" title="Token identifier.">pkcs11h_token_id_t</a> <a class="code" href="structpkcs11h__certificate__id__s.html#a0e0188e1533d648c2fa93f43dd3e3559">token_id</a>;
<a name="l00108"></a>00108 
<a name="l00110"></a><a class="code" href="structpkcs11h__certificate__id__s.html#a1ac177f82bd643444be011aa8a63d293">00110</a>         <span class="keywordtype">char</span> <a class="code" href="structpkcs11h__certificate__id__s.html#a1ac177f82bd643444be011aa8a63d293">displayName</a>[1024];
<a name="l00112"></a><a class="code" href="structpkcs11h__certificate__id__s.html#ab7817b8a25faef62c9bd698273e43557">00112</a>         CK_BYTE_PTR <a class="code" href="structpkcs11h__certificate__id__s.html#ab7817b8a25faef62c9bd698273e43557">attrCKA_ID</a>;
<a name="l00114"></a><a class="code" href="structpkcs11h__certificate__id__s.html#a96319aafa7c663f71c4c0f74ef2f80d3">00114</a>         <span class="keywordtype">size_t</span> <a class="code" href="structpkcs11h__certificate__id__s.html#a96319aafa7c663f71c4c0f74ef2f80d3">attrCKA_ID_size</a>;
<a name="l00115"></a>00115 
<a name="l00117"></a><a class="code" href="structpkcs11h__certificate__id__s.html#a4f33a370afc970906680945a107f0b2e">00117</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="structpkcs11h__certificate__id__s.html#a4f33a370afc970906680945a107f0b2e">certificate_blob</a>;
<a name="l00119"></a><a class="code" href="structpkcs11h__certificate__id__s.html#ae2441365714ddfff4138b68bc72df187">00119</a>         <span class="keywordtype">size_t</span> <a class="code" href="structpkcs11h__certificate__id__s.html#ae2441365714ddfff4138b68bc72df187">certificate_blob_size</a>;
<a name="l00120"></a>00120 };
<a name="l00121"></a>00121 
<a name="l00125"></a><a class="code" href="structpkcs11h__certificate__id__list__s.html">00125</a> <span class="keyword">struct </span><a class="code" href="structpkcs11h__certificate__id__list__s.html" title="Certificate id list.">pkcs11h_certificate_id_list_s</a> {
<a name="l00127"></a><a class="code" href="structpkcs11h__certificate__id__list__s.html#a0888d51da64bb2c1e8294e172a7c6ae2">00127</a>         pkcs11h_certificate_id_list_t <a class="code" href="structpkcs11h__certificate__id__list__s.html#a0888d51da64bb2c1e8294e172a7c6ae2">next</a>;
<a name="l00129"></a><a class="code" href="structpkcs11h__certificate__id__list__s.html#aa2300aa280361671c9d951b669415e7e">00129</a>         pkcs11h_certificate_id_t <a class="code" href="structpkcs11h__certificate__id__list__s.html#aa2300aa280361671c9d951b669415e7e">certificate_id</a>;
<a name="l00130"></a>00130 };
<a name="l00131"></a>00131 
<a name="l00137"></a>00137 CK_RV
<a name="l00138"></a>00138 <a class="code" href="group__pkcs11h__certificate.html#ga90148440146c44a0bc34320990bc9324" title="Free certificate_id object.">pkcs11h_certificate_freeCertificateId</a> (
<a name="l00139"></a>00139         IN pkcs11h_certificate_id_t certificate_id
<a name="l00140"></a>00140 );
<a name="l00141"></a>00141 
<a name="l00150"></a>00150 CK_RV
<a name="l00151"></a>00151 <a class="code" href="group__pkcs11h__certificate.html#gab55b1cc715b67dac35e6251b6949e2ed" title="Duplicate certificate_id object.">pkcs11h_certificate_duplicateCertificateId</a> (
<a name="l00152"></a>00152         OUT pkcs11h_certificate_id_t * <span class="keyword">const</span> to,
<a name="l00153"></a>00153         IN <span class="keyword">const</span> pkcs11h_certificate_id_t from
<a name="l00154"></a>00154 );
<a name="l00155"></a>00155 
<a name="l00165"></a>00165 CK_RV
<a name="l00166"></a>00166 <a class="code" href="group__pkcs11h__certificate.html#gad2b6ef5f77d7b80c38d78ac8e77c288c" title="Sets internal certificate_id blob.">pkcs11h_certificate_setCertificateIdCertificateBlob</a> (
<a name="l00167"></a>00167         IN <span class="keyword">const</span> pkcs11h_certificate_id_t certificate_id,
<a name="l00168"></a>00168         IN <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> blob,
<a name="l00169"></a>00169         IN <span class="keyword">const</span> <span class="keywordtype">size_t</span> blob_size
<a name="l00170"></a>00170 );
<a name="l00171"></a>00171 
<a name="l00177"></a>00177 CK_RV
<a name="l00178"></a>00178 <a class="code" href="group__pkcs11h__certificate.html#gad75e25a67234b34e0101ba0d21206820" title="Free certificate object.">pkcs11h_certificate_freeCertificate</a> (
<a name="l00179"></a>00179         IN pkcs11h_certificate_t certificate
<a name="l00180"></a>00180 );
<a name="l00181"></a>00181 
<a name="l00194"></a>00194 CK_RV
<a name="l00195"></a>00195 <a class="code" href="group__pkcs11h__certificate.html#ga822d9d402b27c6e4218d90c3b0645936" title="Create a certificate object out of certificate_id.">pkcs11h_certificate_create</a> (
<a name="l00196"></a>00196         IN <span class="keyword">const</span> pkcs11h_certificate_id_t certificate_id,
<a name="l00197"></a>00197         IN <span class="keywordtype">void</span> * <span class="keyword">const</span> user_data,
<a name="l00198"></a>00198         IN <span class="keyword">const</span> <span class="keywordtype">unsigned</span> mask_prompt,
<a name="l00199"></a>00199         IN <span class="keyword">const</span> <span class="keywordtype">int</span> pin_cache_period,
<a name="l00200"></a>00200         OUT pkcs11h_certificate_t * <span class="keyword">const</span> p_certificate
<a name="l00201"></a>00201 );
<a name="l00202"></a>00202 
<a name="l00208"></a>00208 <span class="keywordtype">unsigned</span>
<a name="l00209"></a>00209 <a class="code" href="group__pkcs11h__certificate.html#ga0263a20909fd1d0ef0c7b773aeabe5e7" title="Extract user data out of certificate.">pkcs11h_certificate_getPromptMask</a> (
<a name="l00210"></a>00210         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate
<a name="l00211"></a>00211 );
<a name="l00212"></a>00212 
<a name="l00218"></a>00218 <span class="keywordtype">void</span>
<a name="l00219"></a>00219 <a class="code" href="group__pkcs11h__certificate.html#ga978ba4f6a8574b1cf55adbafcebb0585" title="Extract user data out of certificate.">pkcs11h_certificate_setPromptMask</a> (
<a name="l00220"></a>00220         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate,
<a name="l00221"></a>00221         IN <span class="keyword">const</span> <span class="keywordtype">unsigned</span> mask_prompt
<a name="l00222"></a>00222 );
<a name="l00223"></a>00223 
<a name="l00229"></a>00229 <span class="keywordtype">void</span> *
<a name="l00230"></a>00230 <a class="code" href="group__pkcs11h__certificate.html#ga70ca903795764bbf0366ba9b64057705" title="Extract user data out of certificate.">pkcs11h_certificate_getUserData</a> (
<a name="l00231"></a>00231         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate
<a name="l00232"></a>00232 );
<a name="l00233"></a>00233 
<a name="l00239"></a>00239 <span class="keywordtype">void</span>
<a name="l00240"></a>00240 <a class="code" href="group__pkcs11h__certificate.html#ga935d5c8fb641723783061d3cdee0ead5" title="Extract user data out of certificate.">pkcs11h_certificate_setUserData</a> (
<a name="l00241"></a>00241         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate,
<a name="l00242"></a>00242         IN <span class="keywordtype">void</span> * <span class="keyword">const</span> user_data
<a name="l00243"></a>00243 );
<a name="l00244"></a>00244 
<a name="l00253"></a>00253 CK_RV
<a name="l00254"></a>00254 <a class="code" href="group__pkcs11h__certificate.html#gaacb49067c57239fd7090dd908be16f2f" title="Get certifiate id object out of a certifiate.">pkcs11h_certificate_getCertificateId</a> (
<a name="l00255"></a>00255         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate,
<a name="l00256"></a>00256         OUT pkcs11h_certificate_id_t * <span class="keyword">const</span> p_certificate_id
<a name="l00257"></a>00257 );
<a name="l00258"></a>00258 
<a name="l00267"></a>00267 CK_RV
<a name="l00268"></a>00268 <a class="code" href="group__pkcs11h__certificate.html#gaa1dc1e528bccfb33ca5284124e93fa56" title="Get the certificate blob out of the certificate object.">pkcs11h_certificate_getCertificateBlob</a> (
<a name="l00269"></a>00269         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate,
<a name="l00270"></a>00270         OUT <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> certificate_blob,
<a name="l00271"></a>00271         IN OUT <span class="keywordtype">size_t</span> * <span class="keyword">const</span> p_certificate_blob_size
<a name="l00272"></a>00272 );
<a name="l00273"></a>00273 
<a name="l00282"></a>00282 CK_RV
<a name="l00283"></a>00283 <a class="code" href="group__pkcs11h__certificate.html#gaa0ca330ab07be6fb42e454e87a514e64" title="Serialize certificate_id into a string.">pkcs11h_certificate_serializeCertificateId</a> (
<a name="l00284"></a>00284         OUT <span class="keywordtype">char</span> * <span class="keyword">const</span> sz,
<a name="l00285"></a>00285         IN OUT <span class="keywordtype">size_t</span> *max,
<a name="l00286"></a>00286         IN <span class="keyword">const</span> pkcs11h_certificate_id_t certificate_id
<a name="l00287"></a>00287 );
<a name="l00288"></a>00288 
<a name="l00297"></a>00297 CK_RV
<a name="l00298"></a>00298 <a class="code" href="group__pkcs11h__certificate.html#ga3902be4f775839d121324c3239923aa3" title="Deserialize certificate_id out of string.">pkcs11h_certificate_deserializeCertificateId</a> (
<a name="l00299"></a>00299         OUT pkcs11h_certificate_id_t * <span class="keyword">const</span> p_certificate_id,
<a name="l00300"></a>00300         IN <span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> sz
<a name="l00301"></a>00301 );
<a name="l00302"></a>00302 
<a name="l00308"></a>00308 CK_RV
<a name="l00309"></a>00309 <a class="code" href="group__pkcs11h__certificate.html#gaa3a990db0a84067ff09d152e632a8e6f" title="Ensure certificate is accessible.">pkcs11h_certificate_ensureCertificateAccess</a> (
<a name="l00310"></a>00310         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate
<a name="l00311"></a>00311 );
<a name="l00312"></a>00312 
<a name="l00318"></a>00318 CK_RV
<a name="l00319"></a>00319 <a class="code" href="group__pkcs11h__certificate.html#gab50752c5fc26181eea30e1bf499fa0e0" title="Ensure key is accessible.">pkcs11h_certificate_ensureKeyAccess</a> (
<a name="l00320"></a>00320         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate
<a name="l00321"></a>00321 );
<a name="l00322"></a>00322 
<a name="l00337"></a>00337 CK_RV
<a name="l00338"></a>00338 <a class="code" href="group__pkcs11h__certificate.html#gaf8ba828e440353d963953bb758ca9b90" title="Lock session for threded environment.">pkcs11h_certificate_lockSession</a> (
<a name="l00339"></a>00339         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate
<a name="l00340"></a>00340 );
<a name="l00341"></a>00341 
<a name="l00348"></a>00348 CK_RV
<a name="l00349"></a>00349 <a class="code" href="group__pkcs11h__certificate.html#ga4534e579fdd21c5a4b5a4c315b96f297" title="Releases session lock.">pkcs11h_certificate_releaseSession</a> (
<a name="l00350"></a>00350         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate
<a name="l00351"></a>00351 );
<a name="l00352"></a>00352 
<a name="l00367"></a>00367 CK_RV
<a name="l00368"></a>00368 <a class="code" href="group__pkcs11h__certificate.html#gad239cf8d4c37fe8fa30524c132fdf844" title="Sign data.">pkcs11h_certificate_sign</a> (
<a name="l00369"></a>00369         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate,
<a name="l00370"></a>00370         IN <span class="keyword">const</span> CK_MECHANISM_TYPE mech_type,
<a name="l00371"></a>00371         IN <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> source,
<a name="l00372"></a>00372         IN <span class="keyword">const</span> <span class="keywordtype">size_t</span> source_size,
<a name="l00373"></a>00373         OUT <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> target,
<a name="l00374"></a>00374         IN OUT <span class="keywordtype">size_t</span> * <span class="keyword">const</span> p_target_size
<a name="l00375"></a>00375 );
<a name="l00376"></a>00376 
<a name="l00391"></a>00391 CK_RV
<a name="l00392"></a>00392 <a class="code" href="group__pkcs11h__certificate.html#gaa2e1944f12d98e58b7bfd7466a88148b" title="Sign data.">pkcs11h_certificate_signRecover</a> (
<a name="l00393"></a>00393         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate,
<a name="l00394"></a>00394         IN <span class="keyword">const</span> CK_MECHANISM_TYPE mech_type,
<a name="l00395"></a>00395         IN <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> source,
<a name="l00396"></a>00396         IN <span class="keyword">const</span> <span class="keywordtype">size_t</span> source_size,
<a name="l00397"></a>00397         OUT <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> target,
<a name="l00398"></a>00398         IN OUT <span class="keywordtype">size_t</span> * <span class="keyword">const</span> p_target_size
<a name="l00399"></a>00399 );
<a name="l00400"></a>00400 
<a name="l00414"></a>00414 CK_RV
<a name="l00415"></a>00415 <a class="code" href="group__pkcs11h__certificate.html#gaf5932bca5a0306b9c06f270aff7ed42a" title="Decrypt data.">pkcs11h_certificate_decrypt</a> (
<a name="l00416"></a>00416         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate,
<a name="l00417"></a>00417         IN <span class="keyword">const</span> CK_MECHANISM_TYPE mech_type,
<a name="l00418"></a>00418         IN <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> source,
<a name="l00419"></a>00419         IN <span class="keyword">const</span> <span class="keywordtype">size_t</span> source_size,
<a name="l00420"></a>00420         OUT <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> target,
<a name="l00421"></a>00421         IN OUT <span class="keywordtype">size_t</span> * <span class="keyword">const</span> p_target_size
<a name="l00422"></a>00422 );
<a name="l00423"></a>00423 
<a name="l00437"></a>00437 CK_RV
<a name="l00438"></a>00438 <a class="code" href="group__pkcs11h__certificate.html#ga4a8fea6b3f744408cb7371462fcaf53d" title="Decrypt data.">pkcs11h_certificate_unwrap</a> (
<a name="l00439"></a>00439         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate,
<a name="l00440"></a>00440         IN <span class="keyword">const</span> CK_MECHANISM_TYPE mech_type,
<a name="l00441"></a>00441         IN <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> source,
<a name="l00442"></a>00442         IN <span class="keyword">const</span> <span class="keywordtype">size_t</span> source_size,
<a name="l00443"></a>00443         OUT <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> target,
<a name="l00444"></a>00444         IN OUT <span class="keywordtype">size_t</span> * <span class="keyword">const</span> p_target_size
<a name="l00445"></a>00445 );
<a name="l00446"></a>00446 
<a name="l00460"></a>00460 CK_RV
<a name="l00461"></a>00461 <a class="code" href="group__pkcs11h__certificate.html#ga29e0a4ec9ec5b65f2dd5f9418ce44d01" title="Sign data mechanism determined by key attributes.">pkcs11h_certificate_signAny</a> (
<a name="l00462"></a>00462         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate,
<a name="l00463"></a>00463         IN <span class="keyword">const</span> CK_MECHANISM_TYPE mech_type,
<a name="l00464"></a>00464         IN <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> source,
<a name="l00465"></a>00465         IN <span class="keyword">const</span> <span class="keywordtype">size_t</span> source_size,
<a name="l00466"></a>00466         OUT <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> target,
<a name="l00467"></a>00467         IN OUT <span class="keywordtype">size_t</span> * <span class="keyword">const</span> p_target_size
<a name="l00468"></a>00468 );
<a name="l00469"></a>00469 
<a name="l00483"></a>00483 CK_RV
<a name="l00484"></a>00484 <a class="code" href="group__pkcs11h__certificate.html#gab438e5f11160e5ea7fe0a2b4b38644a3" title="Decrypt data mechanism determined by key attributes.">pkcs11h_certificate_decryptAny</a> (
<a name="l00485"></a>00485         IN <span class="keyword">const</span> pkcs11h_certificate_t certificate,
<a name="l00486"></a>00486         IN <span class="keyword">const</span> CK_MECHANISM_TYPE mech_type,
<a name="l00487"></a>00487         IN <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> source,
<a name="l00488"></a>00488         IN <span class="keyword">const</span> <span class="keywordtype">size_t</span> source_size,
<a name="l00489"></a>00489         OUT <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> target,
<a name="l00490"></a>00490         IN OUT <span class="keywordtype">size_t</span> * <span class="keyword">const</span> p_target_size
<a name="l00491"></a>00491 );
<a name="l00492"></a>00492 
<a name="l00498"></a>00498 CK_RV
<a name="l00499"></a>00499 <a class="code" href="group__pkcs11h__certificate.html#ga636c90a50362697fdff26c6f7dcb12d7" title="Free certificate_id list.">pkcs11h_certificate_freeCertificateIdList</a> (
<a name="l00500"></a>00500         IN <span class="keyword">const</span> pkcs11h_certificate_id_list_t cert_id_list
<a name="l00501"></a>00501 );
<a name="l00502"></a>00502 
<a name="l00517"></a>00517 CK_RV
<a name="l00518"></a>00518 <a class="code" href="group__pkcs11h__certificate.html#gad4b5312400d48e7e3e3e0c806383aa51" title="Enumerate available certificates on specific token.">pkcs11h_certificate_enumTokenCertificateIds</a> (
<a name="l00519"></a>00519         IN <span class="keyword">const</span> <a class="code" href="structpkcs11h__token__id__s.html" title="Token identifier.">pkcs11h_token_id_t</a> token_id,
<a name="l00520"></a>00520         IN <span class="keyword">const</span> <span class="keywordtype">unsigned</span> method,
<a name="l00521"></a>00521         IN <span class="keywordtype">void</span> * <span class="keyword">const</span> user_data,
<a name="l00522"></a>00522         IN <span class="keyword">const</span> <span class="keywordtype">unsigned</span> mask_prompt,
<a name="l00523"></a>00523         OUT pkcs11h_certificate_id_list_t * <span class="keyword">const</span> p_cert_id_issuers_list,
<a name="l00524"></a>00524         OUT pkcs11h_certificate_id_list_t * <span class="keyword">const</span> p_cert_id_end_list
<a name="l00525"></a>00525 );
<a name="l00526"></a>00526 
<a name="l00539"></a>00539 CK_RV
<a name="l00540"></a>00540 <a class="code" href="group__pkcs11h__certificate.html#ga201b7a5e7d223dbc8a92f7fa9740f7bd" title="Enumerate available certificates.">pkcs11h_certificate_enumCertificateIds</a> (
<a name="l00541"></a>00541         IN <span class="keyword">const</span> <span class="keywordtype">unsigned</span> method,
<a name="l00542"></a>00542         IN <span class="keywordtype">void</span> * <span class="keyword">const</span> user_data,
<a name="l00543"></a>00543         IN <span class="keyword">const</span> <span class="keywordtype">unsigned</span> mask_prompt,
<a name="l00544"></a>00544         OUT pkcs11h_certificate_id_list_t * <span class="keyword">const</span> p_cert_id_issuers_list,
<a name="l00545"></a>00545         OUT pkcs11h_certificate_id_list_t * <span class="keyword">const</span> p_cert_id_end_list
<a name="l00546"></a>00546 );
<a name="l00547"></a>00547 
<a name="l00548"></a>00548 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00549"></a>00549 <span class="preprocessor"></span>}
<a name="l00550"></a>00550 <span class="preprocessor">#endif</span>
<a name="l00551"></a>00551 <span class="preprocessor"></span>
<a name="l00554"></a>00554 <span class="preprocessor">#endif                          </span><span class="comment">/* __PKCS11H_CERTIFICATE_H */</span>
</pre></div></div>
<hr>
<table width="100%"><tr><td>pkcs11-helper, Copyright (C) Alon Bar-Lev &lt;alon.barlev@gmail.com&gt;</td><td align="right"><a href="http://www.opensc-project.org"><img src="opensc-logo.gif" alt="OpenSC-Project.org Logo" border="0"/></a></td></tr></table>