| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 5 |
<title>pkcs11: GnuTLS API Reference Manual</title> |
| 6 |
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> |
| 7 |
<link rel="home" href="index.html" title="GnuTLS API Reference Manual"> |
| 8 |
<link rel="up" href="intro.html" title="GnuTLS API Reference Manual"> |
| 9 |
<link rel="prev" href="gnutls-crypto.html" title="crypto"> |
| 10 |
<link rel="next" href="gnutls-pkcs12.html" title="pkcs12"> |
| 11 |
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)"> |
| 12 |
<link rel="stylesheet" href="style.css" type="text/css"> |
| 13 |
</head> |
| 14 |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| 15 |
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> |
| 16 |
<td width="100%" align="left" class="shortcuts"> |
| 17 |
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> |
| 18 |
<a href="#gnutls-pkcs11.description" class="shortcut">Description</a></span> |
| 19 |
</td> |
| 20 |
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
| 21 |
<td><a accesskey="u" href="intro.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
| 22 |
<td><a accesskey="p" href="gnutls-crypto.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
| 23 |
<td><a accesskey="n" href="gnutls-pkcs12.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
| 24 |
</tr></table> |
| 25 |
<div class="refentry"> |
| 26 |
<a name="gnutls-pkcs11"></a><div class="titlepage"></div> |
| 27 |
<div class="refnamediv"><table width="100%"><tr> |
| 28 |
<td valign="top"> |
| 29 |
<h2><span class="refentrytitle"><a name="gnutls-pkcs11.top_of_page"></a>pkcs11</span></h2> |
| 30 |
<p>pkcs11</p> |
| 31 |
</td> |
| 32 |
<td class="gallery_image" valign="top" align="right"></td> |
| 33 |
</tr></table></div> |
| 34 |
<div class="refsect1"> |
| 35 |
<a name="gnutls-pkcs11.functions"></a><h2>Functions</h2> |
| 36 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 37 |
<colgroup> |
| 38 |
<col width="150px" class="functions_proto_type"> |
| 39 |
<col class="functions_proto_name"> |
| 40 |
</colgroup> |
| 41 |
<tbody> |
| 42 |
<tr> |
| 43 |
<td class="function_type"> |
| 44 |
<span class="returnvalue">int</span> |
| 45 |
</td> |
| 46 |
<td class="function_name"> |
| 47 |
<span class="c_punctuation">(</span><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-token-callback-t" title="gnutls_pkcs11_token_callback_t ()">*gnutls_pkcs11_token_callback_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> |
| 48 |
</td> |
| 49 |
</tr> |
| 50 |
<tr> |
| 51 |
<td class="function_type"> |
| 52 |
<span class="returnvalue">int</span> |
| 53 |
</td> |
| 54 |
<td class="function_name"> |
| 55 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-init" title="gnutls_pkcs11_init ()">gnutls_pkcs11_init</a> <span class="c_punctuation">()</span> |
| 56 |
</td> |
| 57 |
</tr> |
| 58 |
<tr> |
| 59 |
<td class="function_type"> |
| 60 |
<span class="returnvalue">int</span> |
| 61 |
</td> |
| 62 |
<td class="function_name"> |
| 63 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-reinit" title="gnutls_pkcs11_reinit ()">gnutls_pkcs11_reinit</a> <span class="c_punctuation">()</span> |
| 64 |
</td> |
| 65 |
</tr> |
| 66 |
<tr> |
| 67 |
<td class="function_type"> |
| 68 |
<span class="returnvalue">void</span> |
| 69 |
</td> |
| 70 |
<td class="function_name"> |
| 71 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-deinit" title="gnutls_pkcs11_deinit ()">gnutls_pkcs11_deinit</a> <span class="c_punctuation">()</span> |
| 72 |
</td> |
| 73 |
</tr> |
| 74 |
<tr> |
| 75 |
<td class="function_type"> |
| 76 |
<span class="returnvalue">void</span> |
| 77 |
</td> |
| 78 |
<td class="function_name"> |
| 79 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-set-token-function" title="gnutls_pkcs11_set_token_function ()">gnutls_pkcs11_set_token_function</a> <span class="c_punctuation">()</span> |
| 80 |
</td> |
| 81 |
</tr> |
| 82 |
<tr> |
| 83 |
<td class="function_type"> |
| 84 |
<span class="returnvalue">void</span> |
| 85 |
</td> |
| 86 |
<td class="function_name"> |
| 87 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-set-pin-function" title="gnutls_pkcs11_set_pin_function ()">gnutls_pkcs11_set_pin_function</a> <span class="c_punctuation">()</span> |
| 88 |
</td> |
| 89 |
</tr> |
| 90 |
<tr> |
| 91 |
<td class="function_type"> |
| 92 |
<a class="link" href="gnutls-gnutls.html#gnutls-pin-callback-t" title="gnutls_pin_callback_t ()"><span class="returnvalue">gnutls_pin_callback_t</span></a> |
| 93 |
</td> |
| 94 |
<td class="function_name"> |
| 95 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-get-pin-function" title="gnutls_pkcs11_get_pin_function ()">gnutls_pkcs11_get_pin_function</a> <span class="c_punctuation">()</span> |
| 96 |
</td> |
| 97 |
</tr> |
| 98 |
<tr> |
| 99 |
<td class="function_type"> |
| 100 |
<span class="returnvalue">int</span> |
| 101 |
</td> |
| 102 |
<td class="function_name"> |
| 103 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-add-provider" title="gnutls_pkcs11_add_provider ()">gnutls_pkcs11_add_provider</a> <span class="c_punctuation">()</span> |
| 104 |
</td> |
| 105 |
</tr> |
| 106 |
<tr> |
| 107 |
<td class="function_type"> |
| 108 |
<span class="returnvalue">int</span> |
| 109 |
</td> |
| 110 |
<td class="function_name"> |
| 111 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-init" title="gnutls_pkcs11_obj_init ()">gnutls_pkcs11_obj_init</a> <span class="c_punctuation">()</span> |
| 112 |
</td> |
| 113 |
</tr> |
| 114 |
<tr> |
| 115 |
<td class="function_type"> |
| 116 |
<span class="returnvalue">void</span> |
| 117 |
</td> |
| 118 |
<td class="function_name"> |
| 119 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-set-pin-function" title="gnutls_pkcs11_obj_set_pin_function ()">gnutls_pkcs11_obj_set_pin_function</a> <span class="c_punctuation">()</span> |
| 120 |
</td> |
| 121 |
</tr> |
| 122 |
<tr> |
| 123 |
<td class="function_type"> |
| 124 |
<span class="returnvalue">int</span> |
| 125 |
</td> |
| 126 |
<td class="function_name"> |
| 127 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-import-url" title="gnutls_pkcs11_obj_import_url ()">gnutls_pkcs11_obj_import_url</a> <span class="c_punctuation">()</span> |
| 128 |
</td> |
| 129 |
</tr> |
| 130 |
<tr> |
| 131 |
<td class="function_type"> |
| 132 |
<span class="returnvalue">int</span> |
| 133 |
</td> |
| 134 |
<td class="function_name"> |
| 135 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-export-url" title="gnutls_pkcs11_obj_export_url ()">gnutls_pkcs11_obj_export_url</a> <span class="c_punctuation">()</span> |
| 136 |
</td> |
| 137 |
</tr> |
| 138 |
<tr> |
| 139 |
<td class="function_type"> |
| 140 |
<span class="returnvalue">void</span> |
| 141 |
</td> |
| 142 |
<td class="function_name"> |
| 143 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-deinit" title="gnutls_pkcs11_obj_deinit ()">gnutls_pkcs11_obj_deinit</a> <span class="c_punctuation">()</span> |
| 144 |
</td> |
| 145 |
</tr> |
| 146 |
<tr> |
| 147 |
<td class="function_type"> |
| 148 |
<span class="returnvalue">int</span> |
| 149 |
</td> |
| 150 |
<td class="function_name"> |
| 151 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-export" title="gnutls_pkcs11_obj_export ()">gnutls_pkcs11_obj_export</a> <span class="c_punctuation">()</span> |
| 152 |
</td> |
| 153 |
</tr> |
| 154 |
<tr> |
| 155 |
<td class="function_type"> |
| 156 |
<span class="returnvalue">int</span> |
| 157 |
</td> |
| 158 |
<td class="function_name"> |
| 159 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-export2" title="gnutls_pkcs11_obj_export2 ()">gnutls_pkcs11_obj_export2</a> <span class="c_punctuation">()</span> |
| 160 |
</td> |
| 161 |
</tr> |
| 162 |
<tr> |
| 163 |
<td class="function_type"> |
| 164 |
<span class="returnvalue">int</span> |
| 165 |
</td> |
| 166 |
<td class="function_name"> |
| 167 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-export3" title="gnutls_pkcs11_obj_export3 ()">gnutls_pkcs11_obj_export3</a> <span class="c_punctuation">()</span> |
| 168 |
</td> |
| 169 |
</tr> |
| 170 |
<tr> |
| 171 |
<td class="function_type"> |
| 172 |
<span class="returnvalue">int</span> |
| 173 |
</td> |
| 174 |
<td class="function_name"> |
| 175 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-get-raw-issuer" title="gnutls_pkcs11_get_raw_issuer ()">gnutls_pkcs11_get_raw_issuer</a> <span class="c_punctuation">()</span> |
| 176 |
</td> |
| 177 |
</tr> |
| 178 |
<tr> |
| 179 |
<td class="function_type"> |
| 180 |
<span class="returnvalue">int</span> |
| 181 |
</td> |
| 182 |
<td class="function_name"> |
| 183 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-get-raw-issuer-by-dn" title="gnutls_pkcs11_get_raw_issuer_by_dn ()">gnutls_pkcs11_get_raw_issuer_by_dn</a> <span class="c_punctuation">()</span> |
| 184 |
</td> |
| 185 |
</tr> |
| 186 |
<tr> |
| 187 |
<td class="function_type"> |
| 188 |
<span class="returnvalue">int</span> |
| 189 |
</td> |
| 190 |
<td class="function_name"> |
| 191 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-get-raw-issuer-by-subject-key-id" title="gnutls_pkcs11_get_raw_issuer_by_subject_key_id ()">gnutls_pkcs11_get_raw_issuer_by_subject_key_id</a> <span class="c_punctuation">()</span> |
| 192 |
</td> |
| 193 |
</tr> |
| 194 |
<tr> |
| 195 |
<td class="function_type"> |
| 196 |
<span class="returnvalue">unsigned</span> |
| 197 |
</td> |
| 198 |
<td class="function_name"> |
| 199 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-crt-is-known" title="gnutls_pkcs11_crt_is_known ()">gnutls_pkcs11_crt_is_known</a> <span class="c_punctuation">()</span> |
| 200 |
</td> |
| 201 |
</tr> |
| 202 |
<tr> |
| 203 |
<td class="function_type"> |
| 204 |
<span class="returnvalue">int</span> |
| 205 |
</td> |
| 206 |
<td class="function_name"> |
| 207 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-copy-x509-crt" title="gnutls_pkcs11_copy_x509_crt ()">gnutls_pkcs11_copy_x509_crt</a> <span class="c_punctuation">()</span> |
| 208 |
</td> |
| 209 |
</tr> |
| 210 |
<tr> |
| 211 |
<td class="function_type"> |
| 212 |
<span class="returnvalue">int</span> |
| 213 |
</td> |
| 214 |
<td class="function_name"> |
| 215 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-copy-x509-privkey" title="gnutls_pkcs11_copy_x509_privkey ()">gnutls_pkcs11_copy_x509_privkey</a> <span class="c_punctuation">()</span> |
| 216 |
</td> |
| 217 |
</tr> |
| 218 |
<tr> |
| 219 |
<td class="function_type"> |
| 220 |
<span class="returnvalue">int</span> |
| 221 |
</td> |
| 222 |
<td class="function_name"> |
| 223 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-privkey-generate2" title="gnutls_pkcs11_privkey_generate2 ()">gnutls_pkcs11_privkey_generate2</a> <span class="c_punctuation">()</span> |
| 224 |
</td> |
| 225 |
</tr> |
| 226 |
<tr> |
| 227 |
<td class="function_type"> |
| 228 |
<span class="returnvalue">int</span> |
| 229 |
</td> |
| 230 |
<td class="function_name"> |
| 231 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-privkey-generate" title="gnutls_pkcs11_privkey_generate ()">gnutls_pkcs11_privkey_generate</a> <span class="c_punctuation">()</span> |
| 232 |
</td> |
| 233 |
</tr> |
| 234 |
<tr> |
| 235 |
<td class="function_type"> |
| 236 |
<span class="returnvalue">int</span> |
| 237 |
</td> |
| 238 |
<td class="function_name"> |
| 239 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-copy-pubkey" title="gnutls_pkcs11_copy_pubkey ()">gnutls_pkcs11_copy_pubkey</a> <span class="c_punctuation">()</span> |
| 240 |
</td> |
| 241 |
</tr> |
| 242 |
<tr> |
| 243 |
<td class="function_type"> |
| 244 |
<span class="returnvalue">int</span> |
| 245 |
</td> |
| 246 |
<td class="function_name"> |
| 247 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-copy-x509-crt2" title="gnutls_pkcs11_copy_x509_crt2 ()">gnutls_pkcs11_copy_x509_crt2</a> <span class="c_punctuation">()</span> |
| 248 |
</td> |
| 249 |
</tr> |
| 250 |
<tr> |
| 251 |
<td class="function_type"> |
| 252 |
<span class="returnvalue">int</span> |
| 253 |
</td> |
| 254 |
<td class="function_name"> |
| 255 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-copy-x509-privkey2" title="gnutls_pkcs11_copy_x509_privkey2 ()">gnutls_pkcs11_copy_x509_privkey2</a> <span class="c_punctuation">()</span> |
| 256 |
</td> |
| 257 |
</tr> |
| 258 |
<tr> |
| 259 |
<td class="function_type"> |
| 260 |
<span class="returnvalue">int</span> |
| 261 |
</td> |
| 262 |
<td class="function_name"> |
| 263 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-delete-url" title="gnutls_pkcs11_delete_url ()">gnutls_pkcs11_delete_url</a> <span class="c_punctuation">()</span> |
| 264 |
</td> |
| 265 |
</tr> |
| 266 |
<tr> |
| 267 |
<td class="function_type"> |
| 268 |
<span class="returnvalue">int</span> |
| 269 |
</td> |
| 270 |
<td class="function_name"> |
| 271 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-copy-secret-key" title="gnutls_pkcs11_copy_secret_key ()">gnutls_pkcs11_copy_secret_key</a> <span class="c_punctuation">()</span> |
| 272 |
</td> |
| 273 |
</tr> |
| 274 |
<tr> |
| 275 |
<td class="function_type"> |
| 276 |
<span class="returnvalue">int</span> |
| 277 |
</td> |
| 278 |
<td class="function_name"> |
| 279 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-get-ptr" title="gnutls_pkcs11_obj_get_ptr ()">gnutls_pkcs11_obj_get_ptr</a> <span class="c_punctuation">()</span> |
| 280 |
</td> |
| 281 |
</tr> |
| 282 |
<tr> |
| 283 |
<td class="function_type"> |
| 284 |
<span class="returnvalue">int</span> |
| 285 |
</td> |
| 286 |
<td class="function_name"> |
| 287 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-get-info" title="gnutls_pkcs11_obj_get_info ()">gnutls_pkcs11_obj_get_info</a> <span class="c_punctuation">()</span> |
| 288 |
</td> |
| 289 |
</tr> |
| 290 |
<tr> |
| 291 |
<td class="function_type"> |
| 292 |
<span class="returnvalue">int</span> |
| 293 |
</td> |
| 294 |
<td class="function_name"> |
| 295 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-set-info" title="gnutls_pkcs11_obj_set_info ()">gnutls_pkcs11_obj_set_info</a> <span class="c_punctuation">()</span> |
| 296 |
</td> |
| 297 |
</tr> |
| 298 |
<tr> |
| 299 |
<td class="function_type"> |
| 300 |
<span class="returnvalue">int</span> |
| 301 |
</td> |
| 302 |
<td class="function_name"> |
| 303 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-token-init" title="gnutls_pkcs11_token_init ()">gnutls_pkcs11_token_init</a> <span class="c_punctuation">()</span> |
| 304 |
</td> |
| 305 |
</tr> |
| 306 |
<tr> |
| 307 |
<td class="function_type"> |
| 308 |
<span class="returnvalue">int</span> |
| 309 |
</td> |
| 310 |
<td class="function_name"> |
| 311 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-token-get-ptr" title="gnutls_pkcs11_token_get_ptr ()">gnutls_pkcs11_token_get_ptr</a> <span class="c_punctuation">()</span> |
| 312 |
</td> |
| 313 |
</tr> |
| 314 |
<tr> |
| 315 |
<td class="function_type"> |
| 316 |
<span class="returnvalue">int</span> |
| 317 |
</td> |
| 318 |
<td class="function_name"> |
| 319 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-token-get-mechanism" title="gnutls_pkcs11_token_get_mechanism ()">gnutls_pkcs11_token_get_mechanism</a> <span class="c_punctuation">()</span> |
| 320 |
</td> |
| 321 |
</tr> |
| 322 |
<tr> |
| 323 |
<td class="function_type"> |
| 324 |
<span class="returnvalue">unsigned</span> |
| 325 |
</td> |
| 326 |
<td class="function_name"> |
| 327 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-token-check-mechanism" title="gnutls_pkcs11_token_check_mechanism ()">gnutls_pkcs11_token_check_mechanism</a> <span class="c_punctuation">()</span> |
| 328 |
</td> |
| 329 |
</tr> |
| 330 |
<tr> |
| 331 |
<td class="function_type"> |
| 332 |
<span class="returnvalue">int</span> |
| 333 |
</td> |
| 334 |
<td class="function_name"> |
| 335 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-token-set-pin" title="gnutls_pkcs11_token_set_pin ()">gnutls_pkcs11_token_set_pin</a> <span class="c_punctuation">()</span> |
| 336 |
</td> |
| 337 |
</tr> |
| 338 |
<tr> |
| 339 |
<td class="function_type"> |
| 340 |
<span class="returnvalue">int</span> |
| 341 |
</td> |
| 342 |
<td class="function_name"> |
| 343 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-token-get-url" title="gnutls_pkcs11_token_get_url ()">gnutls_pkcs11_token_get_url</a> <span class="c_punctuation">()</span> |
| 344 |
</td> |
| 345 |
</tr> |
| 346 |
<tr> |
| 347 |
<td class="function_type"> |
| 348 |
<span class="returnvalue">int</span> |
| 349 |
</td> |
| 350 |
<td class="function_name"> |
| 351 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-token-get-info" title="gnutls_pkcs11_token_get_info ()">gnutls_pkcs11_token_get_info</a> <span class="c_punctuation">()</span> |
| 352 |
</td> |
| 353 |
</tr> |
| 354 |
<tr> |
| 355 |
<td class="function_type"> |
| 356 |
<span class="returnvalue">int</span> |
| 357 |
</td> |
| 358 |
<td class="function_name"> |
| 359 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-token-get-flags" title="gnutls_pkcs11_token_get_flags ()">gnutls_pkcs11_token_get_flags</a> <span class="c_punctuation">()</span> |
| 360 |
</td> |
| 361 |
</tr> |
| 362 |
<tr> |
| 363 |
<td class="define_keyword">#define</td> |
| 364 |
<td class="function_name"> |
| 365 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-list-import-url" title="gnutls_pkcs11_obj_list_import_url()">gnutls_pkcs11_obj_list_import_url</a><span class="c_punctuation">()</span> |
| 366 |
</td> |
| 367 |
</tr> |
| 368 |
<tr> |
| 369 |
<td class="define_keyword">#define</td> |
| 370 |
<td class="function_name"> |
| 371 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-list-import-url2" title="gnutls_pkcs11_obj_list_import_url2()">gnutls_pkcs11_obj_list_import_url2</a><span class="c_punctuation">()</span> |
| 372 |
</td> |
| 373 |
</tr> |
| 374 |
<tr> |
| 375 |
<td class="function_type"> |
| 376 |
<span class="returnvalue">int</span> |
| 377 |
</td> |
| 378 |
<td class="function_name"> |
| 379 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-list-import-url3" title="gnutls_pkcs11_obj_list_import_url3 ()">gnutls_pkcs11_obj_list_import_url3</a> <span class="c_punctuation">()</span> |
| 380 |
</td> |
| 381 |
</tr> |
| 382 |
<tr> |
| 383 |
<td class="function_type"> |
| 384 |
<span class="returnvalue">int</span> |
| 385 |
</td> |
| 386 |
<td class="function_name"> |
| 387 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-list-import-url4" title="gnutls_pkcs11_obj_list_import_url4 ()">gnutls_pkcs11_obj_list_import_url4</a> <span class="c_punctuation">()</span> |
| 388 |
</td> |
| 389 |
</tr> |
| 390 |
<tr> |
| 391 |
<td class="function_type"> |
| 392 |
<span class="returnvalue">int</span> |
| 393 |
</td> |
| 394 |
<td class="function_name"> |
| 395 |
<a class="link" href="gnutls-pkcs11.html#gnutls-x509-crt-import-pkcs11" title="gnutls_x509_crt_import_pkcs11 ()">gnutls_x509_crt_import_pkcs11</a> <span class="c_punctuation">()</span> |
| 396 |
</td> |
| 397 |
</tr> |
| 398 |
<tr> |
| 399 |
<td class="function_type">const <span class="returnvalue">char</span> * |
| 400 |
</td> |
| 401 |
<td class="function_name"> |
| 402 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-type-get-name" title="gnutls_pkcs11_type_get_name ()">gnutls_pkcs11_type_get_name</a> <span class="c_punctuation">()</span> |
| 403 |
</td> |
| 404 |
</tr> |
| 405 |
<tr> |
| 406 |
<td class="function_type"> |
| 407 |
<span class="returnvalue">int</span> |
| 408 |
</td> |
| 409 |
<td class="function_name"> |
| 410 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-get-exts" title="gnutls_pkcs11_obj_get_exts ()">gnutls_pkcs11_obj_get_exts</a> <span class="c_punctuation">()</span> |
| 411 |
</td> |
| 412 |
</tr> |
| 413 |
<tr> |
| 414 |
<td class="function_type"> |
| 415 |
<span class="returnvalue">int</span> |
| 416 |
</td> |
| 417 |
<td class="function_name"> |
| 418 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-get-flags" title="gnutls_pkcs11_obj_get_flags ()">gnutls_pkcs11_obj_get_flags</a> <span class="c_punctuation">()</span> |
| 419 |
</td> |
| 420 |
</tr> |
| 421 |
<tr> |
| 422 |
<td class="function_type"> |
| 423 |
<span class="returnvalue">char</span> * |
| 424 |
</td> |
| 425 |
<td class="function_name"> |
| 426 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-flags-get-str" title="gnutls_pkcs11_obj_flags_get_str ()">gnutls_pkcs11_obj_flags_get_str</a> <span class="c_punctuation">()</span> |
| 427 |
</td> |
| 428 |
</tr> |
| 429 |
<tr> |
| 430 |
<td class="function_type"> |
| 431 |
<span class="returnvalue">int</span> |
| 432 |
</td> |
| 433 |
<td class="function_name"> |
| 434 |
<a class="link" href="gnutls-pkcs11.html#gnutls-x509-crt-list-import-pkcs11" title="gnutls_x509_crt_list_import_pkcs11 ()">gnutls_x509_crt_list_import_pkcs11</a> <span class="c_punctuation">()</span> |
| 435 |
</td> |
| 436 |
</tr> |
| 437 |
<tr> |
| 438 |
<td class="function_type"> |
| 439 |
<span class="returnvalue">int</span> |
| 440 |
</td> |
| 441 |
<td class="function_name"> |
| 442 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-privkey-init" title="gnutls_pkcs11_privkey_init ()">gnutls_pkcs11_privkey_init</a> <span class="c_punctuation">()</span> |
| 443 |
</td> |
| 444 |
</tr> |
| 445 |
<tr> |
| 446 |
<td class="function_type"> |
| 447 |
<span class="returnvalue">int</span> |
| 448 |
</td> |
| 449 |
<td class="function_name"> |
| 450 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-privkey-cpy" title="gnutls_pkcs11_privkey_cpy ()">gnutls_pkcs11_privkey_cpy</a> <span class="c_punctuation">()</span> |
| 451 |
</td> |
| 452 |
</tr> |
| 453 |
<tr> |
| 454 |
<td class="function_type"> |
| 455 |
<span class="returnvalue">void</span> |
| 456 |
</td> |
| 457 |
<td class="function_name"> |
| 458 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-privkey-set-pin-function" title="gnutls_pkcs11_privkey_set_pin_function ()">gnutls_pkcs11_privkey_set_pin_function</a> <span class="c_punctuation">()</span> |
| 459 |
</td> |
| 460 |
</tr> |
| 461 |
<tr> |
| 462 |
<td class="function_type"> |
| 463 |
<span class="returnvalue">void</span> |
| 464 |
</td> |
| 465 |
<td class="function_name"> |
| 466 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-privkey-deinit" title="gnutls_pkcs11_privkey_deinit ()">gnutls_pkcs11_privkey_deinit</a> <span class="c_punctuation">()</span> |
| 467 |
</td> |
| 468 |
</tr> |
| 469 |
<tr> |
| 470 |
<td class="function_type"> |
| 471 |
<span class="returnvalue">int</span> |
| 472 |
</td> |
| 473 |
<td class="function_name"> |
| 474 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-privkey-get-pk-algorithm" title="gnutls_pkcs11_privkey_get_pk_algorithm ()">gnutls_pkcs11_privkey_get_pk_algorithm</a> <span class="c_punctuation">()</span> |
| 475 |
</td> |
| 476 |
</tr> |
| 477 |
<tr> |
| 478 |
<td class="function_type"> |
| 479 |
<span class="returnvalue">int</span> |
| 480 |
</td> |
| 481 |
<td class="function_name"> |
| 482 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-privkey-get-info" title="gnutls_pkcs11_privkey_get_info ()">gnutls_pkcs11_privkey_get_info</a> <span class="c_punctuation">()</span> |
| 483 |
</td> |
| 484 |
</tr> |
| 485 |
<tr> |
| 486 |
<td class="function_type"> |
| 487 |
<span class="returnvalue">int</span> |
| 488 |
</td> |
| 489 |
<td class="function_name"> |
| 490 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-privkey-import-url" title="gnutls_pkcs11_privkey_import_url ()">gnutls_pkcs11_privkey_import_url</a> <span class="c_punctuation">()</span> |
| 491 |
</td> |
| 492 |
</tr> |
| 493 |
<tr> |
| 494 |
<td class="function_type"> |
| 495 |
<span class="returnvalue">int</span> |
| 496 |
</td> |
| 497 |
<td class="function_name"> |
| 498 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-privkey-export-url" title="gnutls_pkcs11_privkey_export_url ()">gnutls_pkcs11_privkey_export_url</a> <span class="c_punctuation">()</span> |
| 499 |
</td> |
| 500 |
</tr> |
| 501 |
<tr> |
| 502 |
<td class="function_type"> |
| 503 |
<span class="returnvalue">unsigned</span> |
| 504 |
</td> |
| 505 |
<td class="function_name"> |
| 506 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-privkey-status" title="gnutls_pkcs11_privkey_status ()">gnutls_pkcs11_privkey_status</a> <span class="c_punctuation">()</span> |
| 507 |
</td> |
| 508 |
</tr> |
| 509 |
<tr> |
| 510 |
<td class="function_type"> |
| 511 |
<span class="returnvalue">int</span> |
| 512 |
</td> |
| 513 |
<td class="function_name"> |
| 514 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-privkey-generate3" title="gnutls_pkcs11_privkey_generate3 ()">gnutls_pkcs11_privkey_generate3</a> <span class="c_punctuation">()</span> |
| 515 |
</td> |
| 516 |
</tr> |
| 517 |
<tr> |
| 518 |
<td class="function_type"> |
| 519 |
<span class="returnvalue">int</span> |
| 520 |
</td> |
| 521 |
<td class="function_name"> |
| 522 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-privkey-export-pubkey" title="gnutls_pkcs11_privkey_export_pubkey ()">gnutls_pkcs11_privkey_export_pubkey</a> <span class="c_punctuation">()</span> |
| 523 |
</td> |
| 524 |
</tr> |
| 525 |
<tr> |
| 526 |
<td class="function_type"> |
| 527 |
<span class="returnvalue">int</span> |
| 528 |
</td> |
| 529 |
<td class="function_name"> |
| 530 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-token-get-random" title="gnutls_pkcs11_token_get_random ()">gnutls_pkcs11_token_get_random</a> <span class="c_punctuation">()</span> |
| 531 |
</td> |
| 532 |
</tr> |
| 533 |
<tr> |
| 534 |
<td class="function_type"> |
| 535 |
<span class="returnvalue">int</span> |
| 536 |
</td> |
| 537 |
<td class="function_name"> |
| 538 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-copy-attached-extension" title="gnutls_pkcs11_copy_attached_extension ()">gnutls_pkcs11_copy_attached_extension</a> <span class="c_punctuation">()</span> |
| 539 |
</td> |
| 540 |
</tr> |
| 541 |
<tr> |
| 542 |
<td class="function_type"> |
| 543 |
<span class="returnvalue">int</span> |
| 544 |
</td> |
| 545 |
<td class="function_name"> |
| 546 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-get-pk-algorithm" title="gnutls_pkcs11_obj_get_pk_algorithm ()">gnutls_pkcs11_obj_get_pk_algorithm</a> <span class="c_punctuation">()</span> |
| 547 |
</td> |
| 548 |
</tr> |
| 549 |
</tbody> |
| 550 |
</table></div> |
| 551 |
</div> |
| 552 |
<div class="refsect1"> |
| 553 |
<a name="gnutls-pkcs11.other"></a><h2>Types and Values</h2> |
| 554 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 555 |
<colgroup> |
| 556 |
<col width="150px" class="other_proto_type"> |
| 557 |
<col class="other_proto_name"> |
| 558 |
</colgroup> |
| 559 |
<tbody> |
| 560 |
<tr> |
| 561 |
<td class="define_keyword">#define</td> |
| 562 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-MAX-PIN-LEN:CAPS" title="GNUTLS_PKCS11_MAX_PIN_LEN">GNUTLS_PKCS11_MAX_PIN_LEN</a></td> |
| 563 |
</tr> |
| 564 |
<tr> |
| 565 |
<td class="typedef_keyword">typedef</td> |
| 566 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t">gnutls_pkcs11_obj_t</a></td> |
| 567 |
</tr> |
| 568 |
<tr> |
| 569 |
<td class="define_keyword">#define</td> |
| 570 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-FLAG-MANUAL:CAPS" title="GNUTLS_PKCS11_FLAG_MANUAL">GNUTLS_PKCS11_FLAG_MANUAL</a></td> |
| 571 |
</tr> |
| 572 |
<tr> |
| 573 |
<td class="define_keyword">#define</td> |
| 574 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-FLAG-AUTO:CAPS" title="GNUTLS_PKCS11_FLAG_AUTO">GNUTLS_PKCS11_FLAG_AUTO</a></td> |
| 575 |
</tr> |
| 576 |
<tr> |
| 577 |
<td class="define_keyword">#define</td> |
| 578 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-FLAG-AUTO-TRUSTED:CAPS" title="GNUTLS_PKCS11_FLAG_AUTO_TRUSTED">GNUTLS_PKCS11_FLAG_AUTO_TRUSTED</a></td> |
| 579 |
</tr> |
| 580 |
<tr> |
| 581 |
<td class="datatype_keyword">enum</td> |
| 582 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-flags" title="enum gnutls_pkcs11_obj_flags">gnutls_pkcs11_obj_flags</a></td> |
| 583 |
</tr> |
| 584 |
<tr> |
| 585 |
<td class="define_keyword">#define</td> |
| 586 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-attr-t" title="gnutls_pkcs11_obj_attr_t">gnutls_pkcs11_obj_attr_t</a></td> |
| 587 |
</tr> |
| 588 |
<tr> |
| 589 |
<td class="datatype_keyword">enum</td> |
| 590 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-url-type-t" title="enum gnutls_pkcs11_url_type_t">gnutls_pkcs11_url_type_t</a></td> |
| 591 |
</tr> |
| 592 |
<tr> |
| 593 |
<td class="datatype_keyword">enum</td> |
| 594 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-info-t" title="enum gnutls_pkcs11_obj_info_t">gnutls_pkcs11_obj_info_t</a></td> |
| 595 |
</tr> |
| 596 |
<tr> |
| 597 |
<td class="define_keyword">#define</td> |
| 598 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-ATTR-CRT-ALL:CAPS" title="GNUTLS_PKCS11_OBJ_ATTR_CRT_ALL">GNUTLS_PKCS11_OBJ_ATTR_CRT_ALL</a></td> |
| 599 |
</tr> |
| 600 |
<tr> |
| 601 |
<td class="define_keyword">#define</td> |
| 602 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-ATTR-MATCH:CAPS" title="GNUTLS_PKCS11_OBJ_ATTR_MATCH">GNUTLS_PKCS11_OBJ_ATTR_MATCH</a></td> |
| 603 |
</tr> |
| 604 |
<tr> |
| 605 |
<td class="define_keyword">#define</td> |
| 606 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-ATTR-ALL:CAPS" title="GNUTLS_PKCS11_OBJ_ATTR_ALL">GNUTLS_PKCS11_OBJ_ATTR_ALL</a></td> |
| 607 |
</tr> |
| 608 |
<tr> |
| 609 |
<td class="define_keyword">#define</td> |
| 610 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-ATTR-CRT-TRUSTED:CAPS" title="GNUTLS_PKCS11_OBJ_ATTR_CRT_TRUSTED">GNUTLS_PKCS11_OBJ_ATTR_CRT_TRUSTED</a></td> |
| 611 |
</tr> |
| 612 |
<tr> |
| 613 |
<td class="define_keyword">#define</td> |
| 614 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-ATTR-CRT-WITH-PRIVKEY:CAPS" title="GNUTLS_PKCS11_OBJ_ATTR_CRT_WITH_PRIVKEY">GNUTLS_PKCS11_OBJ_ATTR_CRT_WITH_PRIVKEY</a></td> |
| 615 |
</tr> |
| 616 |
<tr> |
| 617 |
<td class="define_keyword">#define</td> |
| 618 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-ATTR-CRT-TRUSTED-CA:CAPS" title="GNUTLS_PKCS11_OBJ_ATTR_CRT_TRUSTED_CA">GNUTLS_PKCS11_OBJ_ATTR_CRT_TRUSTED_CA</a></td> |
| 619 |
</tr> |
| 620 |
<tr> |
| 621 |
<td class="define_keyword">#define</td> |
| 622 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-ATTR-PUBKEY:CAPS" title="GNUTLS_PKCS11_OBJ_ATTR_PUBKEY">GNUTLS_PKCS11_OBJ_ATTR_PUBKEY</a></td> |
| 623 |
</tr> |
| 624 |
<tr> |
| 625 |
<td class="define_keyword">#define</td> |
| 626 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-ATTR-PRIVKEY:CAPS" title="GNUTLS_PKCS11_OBJ_ATTR_PRIVKEY">GNUTLS_PKCS11_OBJ_ATTR_PRIVKEY</a></td> |
| 627 |
</tr> |
| 628 |
<tr> |
| 629 |
<td class="datatype_keyword">enum</td> |
| 630 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-token-info-t" title="enum gnutls_pkcs11_token_info_t">gnutls_pkcs11_token_info_t</a></td> |
| 631 |
</tr> |
| 632 |
<tr> |
| 633 |
<td class="datatype_keyword">enum</td> |
| 634 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-type-t" title="enum gnutls_pkcs11_obj_type_t">gnutls_pkcs11_obj_type_t</a></td> |
| 635 |
</tr> |
| 636 |
<tr> |
| 637 |
<td class="define_keyword">#define</td> |
| 638 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-HW:CAPS" title="GNUTLS_PKCS11_TOKEN_HW">GNUTLS_PKCS11_TOKEN_HW</a></td> |
| 639 |
</tr> |
| 640 |
<tr> |
| 641 |
<td class="define_keyword">#define</td> |
| 642 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-TRUSTED:CAPS" title="GNUTLS_PKCS11_TOKEN_TRUSTED">GNUTLS_PKCS11_TOKEN_TRUSTED</a></td> |
| 643 |
</tr> |
| 644 |
<tr> |
| 645 |
<td class="define_keyword">#define</td> |
| 646 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-RNG:CAPS" title="GNUTLS_PKCS11_TOKEN_RNG">GNUTLS_PKCS11_TOKEN_RNG</a></td> |
| 647 |
</tr> |
| 648 |
<tr> |
| 649 |
<td class="define_keyword">#define</td> |
| 650 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-LOGIN-REQUIRED:CAPS" title="GNUTLS_PKCS11_TOKEN_LOGIN_REQUIRED">GNUTLS_PKCS11_TOKEN_LOGIN_REQUIRED</a></td> |
| 651 |
</tr> |
| 652 |
<tr> |
| 653 |
<td class="define_keyword">#define</td> |
| 654 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-PROTECTED-AUTHENTICATION-PATH:CAPS" title="GNUTLS_PKCS11_TOKEN_PROTECTED_AUTHENTICATION_PATH">GNUTLS_PKCS11_TOKEN_PROTECTED_AUTHENTICATION_PATH</a></td> |
| 655 |
</tr> |
| 656 |
<tr> |
| 657 |
<td class="define_keyword">#define</td> |
| 658 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-INITIALIZED:CAPS" title="GNUTLS_PKCS11_TOKEN_INITIALIZED">GNUTLS_PKCS11_TOKEN_INITIALIZED</a></td> |
| 659 |
</tr> |
| 660 |
<tr> |
| 661 |
<td class="define_keyword">#define</td> |
| 662 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-USER-PIN-COUNT-LOW:CAPS" title="GNUTLS_PKCS11_TOKEN_USER_PIN_COUNT_LOW">GNUTLS_PKCS11_TOKEN_USER_PIN_COUNT_LOW</a></td> |
| 663 |
</tr> |
| 664 |
<tr> |
| 665 |
<td class="define_keyword">#define</td> |
| 666 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-USER-PIN-FINAL-TRY:CAPS" title="GNUTLS_PKCS11_TOKEN_USER_PIN_FINAL_TRY">GNUTLS_PKCS11_TOKEN_USER_PIN_FINAL_TRY</a></td> |
| 667 |
</tr> |
| 668 |
<tr> |
| 669 |
<td class="define_keyword">#define</td> |
| 670 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-USER-PIN-LOCKED:CAPS" title="GNUTLS_PKCS11_TOKEN_USER_PIN_LOCKED">GNUTLS_PKCS11_TOKEN_USER_PIN_LOCKED</a></td> |
| 671 |
</tr> |
| 672 |
<tr> |
| 673 |
<td class="define_keyword">#define</td> |
| 674 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-SO-PIN-COUNT-LOW:CAPS" title="GNUTLS_PKCS11_TOKEN_SO_PIN_COUNT_LOW">GNUTLS_PKCS11_TOKEN_SO_PIN_COUNT_LOW</a></td> |
| 675 |
</tr> |
| 676 |
<tr> |
| 677 |
<td class="define_keyword">#define</td> |
| 678 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-SO-PIN-FINAL-TRY:CAPS" title="GNUTLS_PKCS11_TOKEN_SO_PIN_FINAL_TRY">GNUTLS_PKCS11_TOKEN_SO_PIN_FINAL_TRY</a></td> |
| 679 |
</tr> |
| 680 |
<tr> |
| 681 |
<td class="define_keyword">#define</td> |
| 682 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-SO-PIN-LOCKED:CAPS" title="GNUTLS_PKCS11_TOKEN_SO_PIN_LOCKED">GNUTLS_PKCS11_TOKEN_SO_PIN_LOCKED</a></td> |
| 683 |
</tr> |
| 684 |
<tr> |
| 685 |
<td class="define_keyword">#define</td> |
| 686 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-USER-PIN-INITIALIZED:CAPS" title="GNUTLS_PKCS11_TOKEN_USER_PIN_INITIALIZED">GNUTLS_PKCS11_TOKEN_USER_PIN_INITIALIZED</a></td> |
| 687 |
</tr> |
| 688 |
<tr> |
| 689 |
<td class="define_keyword">#define</td> |
| 690 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-ERROR-STATE:CAPS" title="GNUTLS_PKCS11_TOKEN_ERROR_STATE">GNUTLS_PKCS11_TOKEN_ERROR_STATE</a></td> |
| 691 |
</tr> |
| 692 |
<tr> |
| 693 |
<td class="define_keyword">#define</td> |
| 694 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#gnutls-x509-crt-import-pkcs11-url" title="gnutls_x509_crt_import_pkcs11_url">gnutls_x509_crt_import_pkcs11_url</a></td> |
| 695 |
</tr> |
| 696 |
<tr> |
| 697 |
<td class="datatype_keyword">struct</td> |
| 698 |
<td class="function_name"><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-st" title="struct gnutls_pkcs11_obj_st">gnutls_pkcs11_obj_st</a></td> |
| 699 |
</tr> |
| 700 |
</tbody> |
| 701 |
</table></div> |
| 702 |
</div> |
| 703 |
<div class="refsect1"> |
| 704 |
<a name="gnutls-pkcs11.description"></a><h2>Description</h2> |
| 705 |
</div> |
| 706 |
<div class="refsect1"> |
| 707 |
<a name="gnutls-pkcs11.functions_details"></a><h2>Functions</h2> |
| 708 |
<div class="refsect2"> |
| 709 |
<a name="gnutls-pkcs11-token-callback-t"></a><h3>gnutls_pkcs11_token_callback_t ()</h3> |
| 710 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 711 |
<span class="c_punctuation">(</span>*gnutls_pkcs11_token_callback_t<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span> *const userdata</code></em>, |
| 712 |
<em class="parameter"><code>const <span class="type">char</span> *const label</code></em>, |
| 713 |
<em class="parameter"><code><span class="type">unsigned </span> retry</code></em>);</pre> |
| 714 |
<p>Token callback function. The callback will be used to ask the user |
| 715 |
to re-insert the token with given (null terminated) label. The |
| 716 |
callback should return zero if token has been inserted by user and |
| 717 |
a negative error code otherwise. It might be called multiple times |
| 718 |
if the token is not detected and the retry counter will be |
| 719 |
increased.</p> |
| 720 |
<div class="refsect3"> |
| 721 |
<a name="gnutls-pkcs11-token-callback-t.parameters"></a><h4>Parameters</h4> |
| 722 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 723 |
<colgroup> |
| 724 |
<col width="150px" class="parameters_name"> |
| 725 |
<col class="parameters_description"> |
| 726 |
<col width="200px" class="parameters_annotations"> |
| 727 |
</colgroup> |
| 728 |
<tbody> |
| 729 |
<tr> |
| 730 |
<td class="parameter_name"><p>userdata</p></td> |
| 731 |
<td class="parameter_description"><p>user-controlled data from <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-set-token-function" title="gnutls_pkcs11_set_token_function ()"><code class="function">gnutls_pkcs11_set_token_function()</code></a>.</p></td> |
| 732 |
<td class="parameter_annotations"> </td> |
| 733 |
</tr> |
| 734 |
<tr> |
| 735 |
<td class="parameter_name"><p>label</p></td> |
| 736 |
<td class="parameter_description"><p>token label.</p></td> |
| 737 |
<td class="parameter_annotations"> </td> |
| 738 |
</tr> |
| 739 |
<tr> |
| 740 |
<td class="parameter_name"><p>retry</p></td> |
| 741 |
<td class="parameter_description"><p>retry counter, initially 0.</p></td> |
| 742 |
<td class="parameter_annotations"> </td> |
| 743 |
</tr> |
| 744 |
</tbody> |
| 745 |
</table></div> |
| 746 |
</div> |
| 747 |
<div class="refsect3"> |
| 748 |
<a name="gnutls-pkcs11-token-callback-t.returns"></a><h4>Returns</h4> |
| 749 |
<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success or a negative error code |
| 750 |
on error.</p> |
| 751 |
</div> |
| 752 |
<p class="since">Since: 2.12.0</p> |
| 753 |
</div> |
| 754 |
<hr> |
| 755 |
<div class="refsect2"> |
| 756 |
<a name="gnutls-pkcs11-init"></a><h3>gnutls_pkcs11_init ()</h3> |
| 757 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 758 |
gnutls_pkcs11_init (<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>, |
| 759 |
<em class="parameter"><code>const <span class="type">char</span> *deprecated_config_file</code></em>);</pre> |
| 760 |
<p>This function will initialize the PKCS 11 subsystem in gnutls. It will |
| 761 |
read configuration files if <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-FLAG-AUTO:CAPS" title="GNUTLS_PKCS11_FLAG_AUTO"><code class="literal">GNUTLS_PKCS11_FLAG_AUTO</code></a> is used or allow |
| 762 |
you to independently load PKCS 11 modules using <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-add-provider" title="gnutls_pkcs11_add_provider ()"><code class="function">gnutls_pkcs11_add_provider()</code></a> |
| 763 |
if <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-FLAG-MANUAL:CAPS" title="GNUTLS_PKCS11_FLAG_MANUAL"><code class="literal">GNUTLS_PKCS11_FLAG_MANUAL</code></a> is specified.</p> |
| 764 |
<p>You don't need to call this function since GnuTLS 3.3.0 because it is being called |
| 765 |
during the first request PKCS 11 operation. That call will assume the <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-FLAG-AUTO:CAPS" title="GNUTLS_PKCS11_FLAG_AUTO"><code class="literal">GNUTLS_PKCS11_FLAG_AUTO</code></a> |
| 766 |
flag. If another flags are required then it must be called independently |
| 767 |
prior to any PKCS 11 operation.</p> |
| 768 |
<div class="refsect3"> |
| 769 |
<a name="gnutls-pkcs11-init.parameters"></a><h4>Parameters</h4> |
| 770 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 771 |
<colgroup> |
| 772 |
<col width="150px" class="parameters_name"> |
| 773 |
<col class="parameters_description"> |
| 774 |
<col width="200px" class="parameters_annotations"> |
| 775 |
</colgroup> |
| 776 |
<tbody> |
| 777 |
<tr> |
| 778 |
<td class="parameter_name"><p>flags</p></td> |
| 779 |
<td class="parameter_description"><p>An ORed sequence of <code class="literal">GNUTLS_PKCS11_FLAG_</code>*</p></td> |
| 780 |
<td class="parameter_annotations"> </td> |
| 781 |
</tr> |
| 782 |
<tr> |
| 783 |
<td class="parameter_name"><p>deprecated_config_file</p></td> |
| 784 |
<td class="parameter_description"><p>either NULL or the location of a deprecated |
| 785 |
configuration file</p></td> |
| 786 |
<td class="parameter_annotations"> </td> |
| 787 |
</tr> |
| 788 |
</tbody> |
| 789 |
</table></div> |
| 790 |
</div> |
| 791 |
<div class="refsect3"> |
| 792 |
<a name="gnutls-pkcs11-init.returns"></a><h4>Returns</h4> |
| 793 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 794 |
negative error value.</p> |
| 795 |
</div> |
| 796 |
<p class="since">Since: 2.12.0</p> |
| 797 |
</div> |
| 798 |
<hr> |
| 799 |
<div class="refsect2"> |
| 800 |
<a name="gnutls-pkcs11-reinit"></a><h3>gnutls_pkcs11_reinit ()</h3> |
| 801 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 802 |
gnutls_pkcs11_reinit (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> |
| 803 |
<p>This function will reinitialize the PKCS 11 subsystem in gnutls. |
| 804 |
This is required by PKCS 11 when an application uses <code class="function">fork()</code>. The |
| 805 |
reinitialization function must be called on the child.</p> |
| 806 |
<p>Note that since GnuTLS 3.3.0, the reinitialization of the PKCS <span class="type">11</span> |
| 807 |
subsystem occurs automatically after fork.</p> |
| 808 |
<div class="refsect3"> |
| 809 |
<a name="gnutls-pkcs11-reinit.returns"></a><h4>Returns</h4> |
| 810 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 811 |
negative error value.</p> |
| 812 |
</div> |
| 813 |
<p class="since">Since: 3.0</p> |
| 814 |
</div> |
| 815 |
<hr> |
| 816 |
<div class="refsect2"> |
| 817 |
<a name="gnutls-pkcs11-deinit"></a><h3>gnutls_pkcs11_deinit ()</h3> |
| 818 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 819 |
gnutls_pkcs11_deinit (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> |
| 820 |
<p>This function will deinitialize the PKCS 11 subsystem in gnutls. |
| 821 |
This function is only needed if you need to deinitialize the |
| 822 |
subsystem without calling <a class="link" href="gnutls-gnutls.html#gnutls-global-deinit" title="gnutls_global_deinit ()"><code class="function">gnutls_global_deinit()</code></a>.</p> |
| 823 |
<p class="since">Since: 2.12.0</p> |
| 824 |
</div> |
| 825 |
<hr> |
| 826 |
<div class="refsect2"> |
| 827 |
<a name="gnutls-pkcs11-set-token-function"></a><h3>gnutls_pkcs11_set_token_function ()</h3> |
| 828 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 829 |
gnutls_pkcs11_set_token_function (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-token-callback-t" title="gnutls_pkcs11_token_callback_t ()"><span class="type">gnutls_pkcs11_token_callback_t</span></a> fn</code></em>, |
| 830 |
<em class="parameter"><code><span class="type">void</span> *userdata</code></em>);</pre> |
| 831 |
<p>This function will set a callback function to be used when a token |
| 832 |
needs to be inserted to continue PKCS 11 operations.</p> |
| 833 |
<div class="refsect3"> |
| 834 |
<a name="gnutls-pkcs11-set-token-function.parameters"></a><h4>Parameters</h4> |
| 835 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 836 |
<colgroup> |
| 837 |
<col width="150px" class="parameters_name"> |
| 838 |
<col class="parameters_description"> |
| 839 |
<col width="200px" class="parameters_annotations"> |
| 840 |
</colgroup> |
| 841 |
<tbody> |
| 842 |
<tr> |
| 843 |
<td class="parameter_name"><p>fn</p></td> |
| 844 |
<td class="parameter_description"><p>The token callback</p></td> |
| 845 |
<td class="parameter_annotations"> </td> |
| 846 |
</tr> |
| 847 |
<tr> |
| 848 |
<td class="parameter_name"><p>userdata</p></td> |
| 849 |
<td class="parameter_description"><p>data to be supplied to callback</p></td> |
| 850 |
<td class="parameter_annotations"> </td> |
| 851 |
</tr> |
| 852 |
</tbody> |
| 853 |
</table></div> |
| 854 |
</div> |
| 855 |
<p class="since">Since: 2.12.0</p> |
| 856 |
</div> |
| 857 |
<hr> |
| 858 |
<div class="refsect2"> |
| 859 |
<a name="gnutls-pkcs11-set-pin-function"></a><h3>gnutls_pkcs11_set_pin_function ()</h3> |
| 860 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 861 |
gnutls_pkcs11_set_pin_function (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pin-callback-t" title="gnutls_pin_callback_t ()"><span class="type">gnutls_pin_callback_t</span></a> fn</code></em>, |
| 862 |
<em class="parameter"><code><span class="type">void</span> *userdata</code></em>);</pre> |
| 863 |
<p>This function will set a callback function to be used when a PIN is |
| 864 |
required for PKCS 11 operations. See |
| 865 |
<a class="link" href="gnutls-gnutls.html#gnutls-pin-callback-t" title="gnutls_pin_callback_t ()"><code class="function">gnutls_pin_callback_t()</code></a> on how the callback should behave.</p> |
| 866 |
<div class="refsect3"> |
| 867 |
<a name="gnutls-pkcs11-set-pin-function.parameters"></a><h4>Parameters</h4> |
| 868 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 869 |
<colgroup> |
| 870 |
<col width="150px" class="parameters_name"> |
| 871 |
<col class="parameters_description"> |
| 872 |
<col width="200px" class="parameters_annotations"> |
| 873 |
</colgroup> |
| 874 |
<tbody> |
| 875 |
<tr> |
| 876 |
<td class="parameter_name"><p>fn</p></td> |
| 877 |
<td class="parameter_description"><p>The PIN callback, a <a class="link" href="gnutls-gnutls.html#gnutls-pin-callback-t" title="gnutls_pin_callback_t ()"><code class="function">gnutls_pin_callback_t()</code></a> function.</p></td> |
| 878 |
<td class="parameter_annotations"> </td> |
| 879 |
</tr> |
| 880 |
<tr> |
| 881 |
<td class="parameter_name"><p>userdata</p></td> |
| 882 |
<td class="parameter_description"><p>data to be supplied to callback</p></td> |
| 883 |
<td class="parameter_annotations"> </td> |
| 884 |
</tr> |
| 885 |
</tbody> |
| 886 |
</table></div> |
| 887 |
</div> |
| 888 |
<p class="since">Since: 2.12.0</p> |
| 889 |
</div> |
| 890 |
<hr> |
| 891 |
<div class="refsect2"> |
| 892 |
<a name="gnutls-pkcs11-get-pin-function"></a><h3>gnutls_pkcs11_get_pin_function ()</h3> |
| 893 |
<pre class="programlisting"><a class="link" href="gnutls-gnutls.html#gnutls-pin-callback-t" title="gnutls_pin_callback_t ()"><span class="returnvalue">gnutls_pin_callback_t</span></a> |
| 894 |
gnutls_pkcs11_get_pin_function (<em class="parameter"><code><span class="type">void</span> **userdata</code></em>);</pre> |
| 895 |
<p>This function will return the callback function set using |
| 896 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-set-pin-function" title="gnutls_pkcs11_set_pin_function ()"><code class="function">gnutls_pkcs11_set_pin_function()</code></a>.</p> |
| 897 |
<div class="refsect3"> |
| 898 |
<a name="gnutls-pkcs11-get-pin-function.parameters"></a><h4>Parameters</h4> |
| 899 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 900 |
<colgroup> |
| 901 |
<col width="150px" class="parameters_name"> |
| 902 |
<col class="parameters_description"> |
| 903 |
<col width="200px" class="parameters_annotations"> |
| 904 |
</colgroup> |
| 905 |
<tbody><tr> |
| 906 |
<td class="parameter_name"><p>userdata</p></td> |
| 907 |
<td class="parameter_description"><p>data to be supplied to callback</p></td> |
| 908 |
<td class="parameter_annotations"> </td> |
| 909 |
</tr></tbody> |
| 910 |
</table></div> |
| 911 |
</div> |
| 912 |
<div class="refsect3"> |
| 913 |
<a name="gnutls-pkcs11-get-pin-function.returns"></a><h4>Returns</h4> |
| 914 |
<p> The function set or NULL otherwise.</p> |
| 915 |
</div> |
| 916 |
<p class="since">Since: 3.1.0</p> |
| 917 |
</div> |
| 918 |
<hr> |
| 919 |
<div class="refsect2"> |
| 920 |
<a name="gnutls-pkcs11-add-provider"></a><h3>gnutls_pkcs11_add_provider ()</h3> |
| 921 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 922 |
gnutls_pkcs11_add_provider (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>, |
| 923 |
<em class="parameter"><code>const <span class="type">char</span> *params</code></em>);</pre> |
| 924 |
<p>This function will load and add a PKCS 11 module to the module |
| 925 |
list used in gnutls. After this function is called the module will |
| 926 |
be used for PKCS 11 operations.</p> |
| 927 |
<p>When loading a module to be used for certificate verification, |
| 928 |
use the string 'trusted' as <em class="parameter"><code>params</code></em> |
| 929 |
.</p> |
| 930 |
<p>Note that this function is not thread safe.</p> |
| 931 |
<div class="refsect3"> |
| 932 |
<a name="gnutls-pkcs11-add-provider.parameters"></a><h4>Parameters</h4> |
| 933 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 934 |
<colgroup> |
| 935 |
<col width="150px" class="parameters_name"> |
| 936 |
<col class="parameters_description"> |
| 937 |
<col width="200px" class="parameters_annotations"> |
| 938 |
</colgroup> |
| 939 |
<tbody> |
| 940 |
<tr> |
| 941 |
<td class="parameter_name"><p>name</p></td> |
| 942 |
<td class="parameter_description"><p>The filename of the module</p></td> |
| 943 |
<td class="parameter_annotations"> </td> |
| 944 |
</tr> |
| 945 |
<tr> |
| 946 |
<td class="parameter_name"><p>params</p></td> |
| 947 |
<td class="parameter_description"><p>should be NULL or a known string (see description)</p></td> |
| 948 |
<td class="parameter_annotations"> </td> |
| 949 |
</tr> |
| 950 |
</tbody> |
| 951 |
</table></div> |
| 952 |
</div> |
| 953 |
<div class="refsect3"> |
| 954 |
<a name="gnutls-pkcs11-add-provider.returns"></a><h4>Returns</h4> |
| 955 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 956 |
negative error value.</p> |
| 957 |
</div> |
| 958 |
<p class="since">Since: 2.12.0</p> |
| 959 |
</div> |
| 960 |
<hr> |
| 961 |
<div class="refsect2"> |
| 962 |
<a name="gnutls-pkcs11-obj-init"></a><h3>gnutls_pkcs11_obj_init ()</h3> |
| 963 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 964 |
gnutls_pkcs11_obj_init (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> *obj</code></em>);</pre> |
| 965 |
<p>This function will initialize a pkcs11 certificate structure.</p> |
| 966 |
<div class="refsect3"> |
| 967 |
<a name="gnutls-pkcs11-obj-init.parameters"></a><h4>Parameters</h4> |
| 968 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 969 |
<colgroup> |
| 970 |
<col width="150px" class="parameters_name"> |
| 971 |
<col class="parameters_description"> |
| 972 |
<col width="200px" class="parameters_annotations"> |
| 973 |
</colgroup> |
| 974 |
<tbody><tr> |
| 975 |
<td class="parameter_name"><p>obj</p></td> |
| 976 |
<td class="parameter_description"><p>A pointer to the type to be initialized</p></td> |
| 977 |
<td class="parameter_annotations"> </td> |
| 978 |
</tr></tbody> |
| 979 |
</table></div> |
| 980 |
</div> |
| 981 |
<div class="refsect3"> |
| 982 |
<a name="gnutls-pkcs11-obj-init.returns"></a><h4>Returns</h4> |
| 983 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 984 |
negative error value.</p> |
| 985 |
</div> |
| 986 |
<p class="since">Since: 2.12.0</p> |
| 987 |
</div> |
| 988 |
<hr> |
| 989 |
<div class="refsect2"> |
| 990 |
<a name="gnutls-pkcs11-obj-set-pin-function"></a><h3>gnutls_pkcs11_obj_set_pin_function ()</h3> |
| 991 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 992 |
gnutls_pkcs11_obj_set_pin_function (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> obj</code></em>, |
| 993 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pin-callback-t" title="gnutls_pin_callback_t ()"><span class="type">gnutls_pin_callback_t</span></a> fn</code></em>, |
| 994 |
<em class="parameter"><code><span class="type">void</span> *userdata</code></em>);</pre> |
| 995 |
<p>This function will set a callback function to be used when |
| 996 |
required to access the object. This function overrides the global |
| 997 |
set using <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-set-pin-function" title="gnutls_pkcs11_set_pin_function ()"><code class="function">gnutls_pkcs11_set_pin_function()</code></a>.</p> |
| 998 |
<div class="refsect3"> |
| 999 |
<a name="gnutls-pkcs11-obj-set-pin-function.parameters"></a><h4>Parameters</h4> |
| 1000 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1001 |
<colgroup> |
| 1002 |
<col width="150px" class="parameters_name"> |
| 1003 |
<col class="parameters_description"> |
| 1004 |
<col width="200px" class="parameters_annotations"> |
| 1005 |
</colgroup> |
| 1006 |
<tbody> |
| 1007 |
<tr> |
| 1008 |
<td class="parameter_name"><p>obj</p></td> |
| 1009 |
<td class="parameter_description"><p>The object structure</p></td> |
| 1010 |
<td class="parameter_annotations"> </td> |
| 1011 |
</tr> |
| 1012 |
<tr> |
| 1013 |
<td class="parameter_name"><p>fn</p></td> |
| 1014 |
<td class="parameter_description"><p>the callback</p></td> |
| 1015 |
<td class="parameter_annotations"> </td> |
| 1016 |
</tr> |
| 1017 |
<tr> |
| 1018 |
<td class="parameter_name"><p>userdata</p></td> |
| 1019 |
<td class="parameter_description"><p>data associated with the callback</p></td> |
| 1020 |
<td class="parameter_annotations"> </td> |
| 1021 |
</tr> |
| 1022 |
</tbody> |
| 1023 |
</table></div> |
| 1024 |
</div> |
| 1025 |
<p class="since">Since: 3.1.0</p> |
| 1026 |
</div> |
| 1027 |
<hr> |
| 1028 |
<div class="refsect2"> |
| 1029 |
<a name="gnutls-pkcs11-obj-import-url"></a><h3>gnutls_pkcs11_obj_import_url ()</h3> |
| 1030 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1031 |
gnutls_pkcs11_obj_import_url (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> obj</code></em>, |
| 1032 |
<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 1033 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 1034 |
<p>This function will "import" a PKCS 11 URL identifying an object (e.g. certificate) |
| 1035 |
to the <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> type. This does not involve any |
| 1036 |
parsing (such as X.509 or OpenPGP) since the <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> is |
| 1037 |
format agnostic. Only data are transferred.</p> |
| 1038 |
<p>If the flag <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-OVERWRITE-TRUSTMOD-EXT:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_OVERWRITE_TRUSTMOD_EXT</code></a> is specified |
| 1039 |
any certificate read, will have its extensions overwritten by any |
| 1040 |
stapled extensions in the trust module.</p> |
| 1041 |
<div class="refsect3"> |
| 1042 |
<a name="gnutls-pkcs11-obj-import-url.parameters"></a><h4>Parameters</h4> |
| 1043 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1044 |
<colgroup> |
| 1045 |
<col width="150px" class="parameters_name"> |
| 1046 |
<col class="parameters_description"> |
| 1047 |
<col width="200px" class="parameters_annotations"> |
| 1048 |
</colgroup> |
| 1049 |
<tbody> |
| 1050 |
<tr> |
| 1051 |
<td class="parameter_name"><p>obj</p></td> |
| 1052 |
<td class="parameter_description"><p>The structure to store the object</p></td> |
| 1053 |
<td class="parameter_annotations"> </td> |
| 1054 |
</tr> |
| 1055 |
<tr> |
| 1056 |
<td class="parameter_name"><p>url</p></td> |
| 1057 |
<td class="parameter_description"><p>a PKCS 11 url identifying the key</p></td> |
| 1058 |
<td class="parameter_annotations"> </td> |
| 1059 |
</tr> |
| 1060 |
<tr> |
| 1061 |
<td class="parameter_name"><p>flags</p></td> |
| 1062 |
<td class="parameter_description"><p>Or sequence of GNUTLS_PKCS11_OBJ_* flags</p></td> |
| 1063 |
<td class="parameter_annotations"> </td> |
| 1064 |
</tr> |
| 1065 |
</tbody> |
| 1066 |
</table></div> |
| 1067 |
</div> |
| 1068 |
<div class="refsect3"> |
| 1069 |
<a name="gnutls-pkcs11-obj-import-url.returns"></a><h4>Returns</h4> |
| 1070 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 1071 |
negative error value.</p> |
| 1072 |
</div> |
| 1073 |
<p class="since">Since: 2.12.0</p> |
| 1074 |
</div> |
| 1075 |
<hr> |
| 1076 |
<div class="refsect2"> |
| 1077 |
<a name="gnutls-pkcs11-obj-export-url"></a><h3>gnutls_pkcs11_obj_export_url ()</h3> |
| 1078 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1079 |
gnutls_pkcs11_obj_export_url (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> obj</code></em>, |
| 1080 |
<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-url-type-t" title="enum gnutls_pkcs11_url_type_t"><span class="type">gnutls_pkcs11_url_type_t</span></a> detailed</code></em>, |
| 1081 |
<em class="parameter"><code><span class="type">char</span> **url</code></em>);</pre> |
| 1082 |
<p>This function will export a URL identifying the given object.</p> |
| 1083 |
<div class="refsect3"> |
| 1084 |
<a name="gnutls-pkcs11-obj-export-url.parameters"></a><h4>Parameters</h4> |
| 1085 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1086 |
<colgroup> |
| 1087 |
<col width="150px" class="parameters_name"> |
| 1088 |
<col class="parameters_description"> |
| 1089 |
<col width="200px" class="parameters_annotations"> |
| 1090 |
</colgroup> |
| 1091 |
<tbody> |
| 1092 |
<tr> |
| 1093 |
<td class="parameter_name"><p>obj</p></td> |
| 1094 |
<td class="parameter_description"><p>Holds the PKCS 11 certificate</p></td> |
| 1095 |
<td class="parameter_annotations"> </td> |
| 1096 |
</tr> |
| 1097 |
<tr> |
| 1098 |
<td class="parameter_name"><p>detailed</p></td> |
| 1099 |
<td class="parameter_description"><p>non zero if a detailed URL is required</p></td> |
| 1100 |
<td class="parameter_annotations"> </td> |
| 1101 |
</tr> |
| 1102 |
<tr> |
| 1103 |
<td class="parameter_name"><p>url</p></td> |
| 1104 |
<td class="parameter_description"><p>will contain an allocated url</p></td> |
| 1105 |
<td class="parameter_annotations"> </td> |
| 1106 |
</tr> |
| 1107 |
</tbody> |
| 1108 |
</table></div> |
| 1109 |
</div> |
| 1110 |
<div class="refsect3"> |
| 1111 |
<a name="gnutls-pkcs11-obj-export-url.returns"></a><h4>Returns</h4> |
| 1112 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 1113 |
negative error value.</p> |
| 1114 |
</div> |
| 1115 |
<p class="since">Since: 2.12.0</p> |
| 1116 |
</div> |
| 1117 |
<hr> |
| 1118 |
<div class="refsect2"> |
| 1119 |
<a name="gnutls-pkcs11-obj-deinit"></a><h3>gnutls_pkcs11_obj_deinit ()</h3> |
| 1120 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 1121 |
gnutls_pkcs11_obj_deinit (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> obj</code></em>);</pre> |
| 1122 |
<p>This function will deinitialize a certificate structure.</p> |
| 1123 |
<div class="refsect3"> |
| 1124 |
<a name="gnutls-pkcs11-obj-deinit.parameters"></a><h4>Parameters</h4> |
| 1125 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1126 |
<colgroup> |
| 1127 |
<col width="150px" class="parameters_name"> |
| 1128 |
<col class="parameters_description"> |
| 1129 |
<col width="200px" class="parameters_annotations"> |
| 1130 |
</colgroup> |
| 1131 |
<tbody><tr> |
| 1132 |
<td class="parameter_name"><p>obj</p></td> |
| 1133 |
<td class="parameter_description"><p>The type to be deinitialized</p></td> |
| 1134 |
<td class="parameter_annotations"> </td> |
| 1135 |
</tr></tbody> |
| 1136 |
</table></div> |
| 1137 |
</div> |
| 1138 |
<p class="since">Since: 2.12.0</p> |
| 1139 |
</div> |
| 1140 |
<hr> |
| 1141 |
<div class="refsect2"> |
| 1142 |
<a name="gnutls-pkcs11-obj-export"></a><h3>gnutls_pkcs11_obj_export ()</h3> |
| 1143 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1144 |
gnutls_pkcs11_obj_export (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> obj</code></em>, |
| 1145 |
<em class="parameter"><code><span class="type">void</span> *output_data</code></em>, |
| 1146 |
<em class="parameter"><code><span class="type">size_t</span> *output_data_size</code></em>);</pre> |
| 1147 |
<p>This function will export the PKCS11 object data. It is normal for |
| 1148 |
data to be inaccessible and in that case <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a> |
| 1149 |
will be returned.</p> |
| 1150 |
<p>If the buffer provided is not long enough to hold the output, then |
| 1151 |
*output_data_size is updated and GNUTLS_E_SHORT_MEMORY_BUFFER will |
| 1152 |
be returned.</p> |
| 1153 |
<div class="refsect3"> |
| 1154 |
<a name="gnutls-pkcs11-obj-export.parameters"></a><h4>Parameters</h4> |
| 1155 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1156 |
<colgroup> |
| 1157 |
<col width="150px" class="parameters_name"> |
| 1158 |
<col class="parameters_description"> |
| 1159 |
<col width="200px" class="parameters_annotations"> |
| 1160 |
</colgroup> |
| 1161 |
<tbody> |
| 1162 |
<tr> |
| 1163 |
<td class="parameter_name"><p>obj</p></td> |
| 1164 |
<td class="parameter_description"><p>Holds the object</p></td> |
| 1165 |
<td class="parameter_annotations"> </td> |
| 1166 |
</tr> |
| 1167 |
<tr> |
| 1168 |
<td class="parameter_name"><p>output_data</p></td> |
| 1169 |
<td class="parameter_description"><p>will contain the object data</p></td> |
| 1170 |
<td class="parameter_annotations"> </td> |
| 1171 |
</tr> |
| 1172 |
<tr> |
| 1173 |
<td class="parameter_name"><p>output_data_size</p></td> |
| 1174 |
<td class="parameter_description"><p>holds the size of output_data (and will be |
| 1175 |
replaced by the actual size of parameters)</p></td> |
| 1176 |
<td class="parameter_annotations"> </td> |
| 1177 |
</tr> |
| 1178 |
</tbody> |
| 1179 |
</table></div> |
| 1180 |
</div> |
| 1181 |
<div class="refsect3"> |
| 1182 |
<a name="gnutls-pkcs11-obj-export.returns"></a><h4>Returns</h4> |
| 1183 |
<p> In case of failure a negative error code will be |
| 1184 |
returned, and <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success.</p> |
| 1185 |
</div> |
| 1186 |
<p class="since">Since: 2.12.0</p> |
| 1187 |
</div> |
| 1188 |
<hr> |
| 1189 |
<div class="refsect2"> |
| 1190 |
<a name="gnutls-pkcs11-obj-export2"></a><h3>gnutls_pkcs11_obj_export2 ()</h3> |
| 1191 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1192 |
gnutls_pkcs11_obj_export2 (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> obj</code></em>, |
| 1193 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>);</pre> |
| 1194 |
<p>This function will export the PKCS11 object data. It is normal for |
| 1195 |
data to be inaccessible and in that case <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a> |
| 1196 |
will be returned.</p> |
| 1197 |
<p>The output buffer is allocated using <code class="function">gnutls_malloc()</code>.</p> |
| 1198 |
<div class="refsect3"> |
| 1199 |
<a name="gnutls-pkcs11-obj-export2.parameters"></a><h4>Parameters</h4> |
| 1200 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1201 |
<colgroup> |
| 1202 |
<col width="150px" class="parameters_name"> |
| 1203 |
<col class="parameters_description"> |
| 1204 |
<col width="200px" class="parameters_annotations"> |
| 1205 |
</colgroup> |
| 1206 |
<tbody> |
| 1207 |
<tr> |
| 1208 |
<td class="parameter_name"><p>obj</p></td> |
| 1209 |
<td class="parameter_description"><p>Holds the object</p></td> |
| 1210 |
<td class="parameter_annotations"> </td> |
| 1211 |
</tr> |
| 1212 |
<tr> |
| 1213 |
<td class="parameter_name"><p>out</p></td> |
| 1214 |
<td class="parameter_description"><p>will contain the object data</p></td> |
| 1215 |
<td class="parameter_annotations"> </td> |
| 1216 |
</tr> |
| 1217 |
</tbody> |
| 1218 |
</table></div> |
| 1219 |
</div> |
| 1220 |
<div class="refsect3"> |
| 1221 |
<a name="gnutls-pkcs11-obj-export2.returns"></a><h4>Returns</h4> |
| 1222 |
<p> In case of failure a negative error code will be |
| 1223 |
returned, and <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success.</p> |
| 1224 |
</div> |
| 1225 |
<p class="since">Since: 3.1.3</p> |
| 1226 |
</div> |
| 1227 |
<hr> |
| 1228 |
<div class="refsect2"> |
| 1229 |
<a name="gnutls-pkcs11-obj-export3"></a><h3>gnutls_pkcs11_obj_export3 ()</h3> |
| 1230 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1231 |
gnutls_pkcs11_obj_export3 (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> obj</code></em>, |
| 1232 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> fmt</code></em>, |
| 1233 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *out</code></em>);</pre> |
| 1234 |
<p>This function will export the PKCS11 object data. It is normal for |
| 1235 |
data to be inaccessible and in that case <a class="link" href="gnutls-gnutls.html#GNUTLS-E-INVALID-REQUEST:CAPS" title="GNUTLS_E_INVALID_REQUEST"><code class="literal">GNUTLS_E_INVALID_REQUEST</code></a> |
| 1236 |
will be returned.</p> |
| 1237 |
<p>The output buffer is allocated using <code class="function">gnutls_malloc()</code>.</p> |
| 1238 |
<div class="refsect3"> |
| 1239 |
<a name="gnutls-pkcs11-obj-export3.parameters"></a><h4>Parameters</h4> |
| 1240 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1241 |
<colgroup> |
| 1242 |
<col width="150px" class="parameters_name"> |
| 1243 |
<col class="parameters_description"> |
| 1244 |
<col width="200px" class="parameters_annotations"> |
| 1245 |
</colgroup> |
| 1246 |
<tbody> |
| 1247 |
<tr> |
| 1248 |
<td class="parameter_name"><p>obj</p></td> |
| 1249 |
<td class="parameter_description"><p>Holds the object</p></td> |
| 1250 |
<td class="parameter_annotations"> </td> |
| 1251 |
</tr> |
| 1252 |
<tr> |
| 1253 |
<td class="parameter_name"><p>out</p></td> |
| 1254 |
<td class="parameter_description"><p>will contain the object data</p></td> |
| 1255 |
<td class="parameter_annotations"> </td> |
| 1256 |
</tr> |
| 1257 |
<tr> |
| 1258 |
<td class="parameter_name"><p>fmt</p></td> |
| 1259 |
<td class="parameter_description"><p>The format of the exported data</p></td> |
| 1260 |
<td class="parameter_annotations"> </td> |
| 1261 |
</tr> |
| 1262 |
</tbody> |
| 1263 |
</table></div> |
| 1264 |
</div> |
| 1265 |
<div class="refsect3"> |
| 1266 |
<a name="gnutls-pkcs11-obj-export3.returns"></a><h4>Returns</h4> |
| 1267 |
<p> In case of failure a negative error code will be |
| 1268 |
returned, and <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success.</p> |
| 1269 |
</div> |
| 1270 |
<p class="since">Since: 3.2.7</p> |
| 1271 |
</div> |
| 1272 |
<hr> |
| 1273 |
<div class="refsect2"> |
| 1274 |
<a name="gnutls-pkcs11-get-raw-issuer"></a><h3>gnutls_pkcs11_get_raw_issuer ()</h3> |
| 1275 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1276 |
gnutls_pkcs11_get_raw_issuer (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 1277 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>, |
| 1278 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *issuer</code></em>, |
| 1279 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> fmt</code></em>, |
| 1280 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 1281 |
<p>This function will return the issuer of a given certificate, if it |
| 1282 |
is stored in the token. By default only marked as trusted issuers |
| 1283 |
are returned. If any issuer should be returned specify |
| 1284 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-RETRIEVE-ANY:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_ANY</code></a> in <em class="parameter"><code>flags</code></em> |
| 1285 |
.</p> |
| 1286 |
<div class="refsect3"> |
| 1287 |
<a name="gnutls-pkcs11-get-raw-issuer.parameters"></a><h4>Parameters</h4> |
| 1288 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1289 |
<colgroup> |
| 1290 |
<col width="150px" class="parameters_name"> |
| 1291 |
<col class="parameters_description"> |
| 1292 |
<col width="200px" class="parameters_annotations"> |
| 1293 |
</colgroup> |
| 1294 |
<tbody> |
| 1295 |
<tr> |
| 1296 |
<td class="parameter_name"><p>url</p></td> |
| 1297 |
<td class="parameter_description"><p>A PKCS 11 url identifying a token</p></td> |
| 1298 |
<td class="parameter_annotations"> </td> |
| 1299 |
</tr> |
| 1300 |
<tr> |
| 1301 |
<td class="parameter_name"><p>cert</p></td> |
| 1302 |
<td class="parameter_description"><p>is the certificate to find issuer for</p></td> |
| 1303 |
<td class="parameter_annotations"> </td> |
| 1304 |
</tr> |
| 1305 |
<tr> |
| 1306 |
<td class="parameter_name"><p>issuer</p></td> |
| 1307 |
<td class="parameter_description"><p>Will hold the issuer if any in an allocated buffer.</p></td> |
| 1308 |
<td class="parameter_annotations"> </td> |
| 1309 |
</tr> |
| 1310 |
<tr> |
| 1311 |
<td class="parameter_name"><p>fmt</p></td> |
| 1312 |
<td class="parameter_description"><p>The format of the exported issuer.</p></td> |
| 1313 |
<td class="parameter_annotations"> </td> |
| 1314 |
</tr> |
| 1315 |
<tr> |
| 1316 |
<td class="parameter_name"><p>flags</p></td> |
| 1317 |
<td class="parameter_description"><p>Use zero or flags from <code class="literal">GNUTLS_PKCS11_OBJ_FLAG</code>.</p></td> |
| 1318 |
<td class="parameter_annotations"> </td> |
| 1319 |
</tr> |
| 1320 |
</tbody> |
| 1321 |
</table></div> |
| 1322 |
</div> |
| 1323 |
<div class="refsect3"> |
| 1324 |
<a name="gnutls-pkcs11-get-raw-issuer.returns"></a><h4>Returns</h4> |
| 1325 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 1326 |
negative error value.</p> |
| 1327 |
</div> |
| 1328 |
<p class="since">Since: 3.2.7</p> |
| 1329 |
</div> |
| 1330 |
<hr> |
| 1331 |
<div class="refsect2"> |
| 1332 |
<a name="gnutls-pkcs11-get-raw-issuer-by-dn"></a><h3>gnutls_pkcs11_get_raw_issuer_by_dn ()</h3> |
| 1333 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1334 |
gnutls_pkcs11_get_raw_issuer_by_dn (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 1335 |
<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *dn</code></em>, |
| 1336 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *issuer</code></em>, |
| 1337 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> fmt</code></em>, |
| 1338 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 1339 |
<p>This function will return the certificate with the given DN, if it |
| 1340 |
is stored in the token. By default only marked as trusted issuers |
| 1341 |
are returned. If any issuer should be returned specify |
| 1342 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-RETRIEVE-ANY:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_ANY</code></a> in <em class="parameter"><code>flags</code></em> |
| 1343 |
.</p> |
| 1344 |
<p>The name of the function includes issuer because it can |
| 1345 |
be used to discover issuers of certificates.</p> |
| 1346 |
<div class="refsect3"> |
| 1347 |
<a name="gnutls-pkcs11-get-raw-issuer-by-dn.parameters"></a><h4>Parameters</h4> |
| 1348 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1349 |
<colgroup> |
| 1350 |
<col width="150px" class="parameters_name"> |
| 1351 |
<col class="parameters_description"> |
| 1352 |
<col width="200px" class="parameters_annotations"> |
| 1353 |
</colgroup> |
| 1354 |
<tbody> |
| 1355 |
<tr> |
| 1356 |
<td class="parameter_name"><p>url</p></td> |
| 1357 |
<td class="parameter_description"><p>A PKCS 11 url identifying a token</p></td> |
| 1358 |
<td class="parameter_annotations"> </td> |
| 1359 |
</tr> |
| 1360 |
<tr> |
| 1361 |
<td class="parameter_name"><p>dn</p></td> |
| 1362 |
<td class="parameter_description"><p>is the DN to search for</p></td> |
| 1363 |
<td class="parameter_annotations"> </td> |
| 1364 |
</tr> |
| 1365 |
<tr> |
| 1366 |
<td class="parameter_name"><p>issuer</p></td> |
| 1367 |
<td class="parameter_description"><p>Will hold the issuer if any in an allocated buffer.</p></td> |
| 1368 |
<td class="parameter_annotations"> </td> |
| 1369 |
</tr> |
| 1370 |
<tr> |
| 1371 |
<td class="parameter_name"><p>fmt</p></td> |
| 1372 |
<td class="parameter_description"><p>The format of the exported issuer.</p></td> |
| 1373 |
<td class="parameter_annotations"> </td> |
| 1374 |
</tr> |
| 1375 |
<tr> |
| 1376 |
<td class="parameter_name"><p>flags</p></td> |
| 1377 |
<td class="parameter_description"><p>Use zero or flags from <code class="literal">GNUTLS_PKCS11_OBJ_FLAG</code>.</p></td> |
| 1378 |
<td class="parameter_annotations"> </td> |
| 1379 |
</tr> |
| 1380 |
</tbody> |
| 1381 |
</table></div> |
| 1382 |
</div> |
| 1383 |
<div class="refsect3"> |
| 1384 |
<a name="gnutls-pkcs11-get-raw-issuer-by-dn.returns"></a><h4>Returns</h4> |
| 1385 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 1386 |
negative error value.</p> |
| 1387 |
</div> |
| 1388 |
<p class="since">Since: 3.4.0</p> |
| 1389 |
</div> |
| 1390 |
<hr> |
| 1391 |
<div class="refsect2"> |
| 1392 |
<a name="gnutls-pkcs11-get-raw-issuer-by-subject-key-id"></a><h3>gnutls_pkcs11_get_raw_issuer_by_subject_key_id ()</h3> |
| 1393 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1394 |
gnutls_pkcs11_get_raw_issuer_by_subject_key_id |
| 1395 |
(<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 1396 |
<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *dn</code></em>, |
| 1397 |
<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *spki</code></em>, |
| 1398 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *issuer</code></em>, |
| 1399 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> fmt</code></em>, |
| 1400 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 1401 |
<p>This function will return the certificate with the given DN and <em class="parameter"><code>spki</code></em> |
| 1402 |
, if it |
| 1403 |
is stored in the token. By default only marked as trusted issuers |
| 1404 |
are returned. If any issuer should be returned specify |
| 1405 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-RETRIEVE-ANY:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_ANY</code></a> in <em class="parameter"><code>flags</code></em> |
| 1406 |
.</p> |
| 1407 |
<p>The name of the function includes issuer because it can |
| 1408 |
be used to discover issuers of certificates.</p> |
| 1409 |
<div class="refsect3"> |
| 1410 |
<a name="gnutls-pkcs11-get-raw-issuer-by-subject-key-id.parameters"></a><h4>Parameters</h4> |
| 1411 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1412 |
<colgroup> |
| 1413 |
<col width="150px" class="parameters_name"> |
| 1414 |
<col class="parameters_description"> |
| 1415 |
<col width="200px" class="parameters_annotations"> |
| 1416 |
</colgroup> |
| 1417 |
<tbody> |
| 1418 |
<tr> |
| 1419 |
<td class="parameter_name"><p>url</p></td> |
| 1420 |
<td class="parameter_description"><p>A PKCS 11 url identifying a token</p></td> |
| 1421 |
<td class="parameter_annotations"> </td> |
| 1422 |
</tr> |
| 1423 |
<tr> |
| 1424 |
<td class="parameter_name"><p>dn</p></td> |
| 1425 |
<td class="parameter_description"><p>is the DN to search for (may be <code class="literal">NULL</code>)</p></td> |
| 1426 |
<td class="parameter_annotations"> </td> |
| 1427 |
</tr> |
| 1428 |
<tr> |
| 1429 |
<td class="parameter_name"><p>spki</p></td> |
| 1430 |
<td class="parameter_description"><p>is the subject key ID to search for</p></td> |
| 1431 |
<td class="parameter_annotations"> </td> |
| 1432 |
</tr> |
| 1433 |
<tr> |
| 1434 |
<td class="parameter_name"><p>issuer</p></td> |
| 1435 |
<td class="parameter_description"><p>Will hold the issuer if any in an allocated buffer.</p></td> |
| 1436 |
<td class="parameter_annotations"> </td> |
| 1437 |
</tr> |
| 1438 |
<tr> |
| 1439 |
<td class="parameter_name"><p>fmt</p></td> |
| 1440 |
<td class="parameter_description"><p>The format of the exported issuer.</p></td> |
| 1441 |
<td class="parameter_annotations"> </td> |
| 1442 |
</tr> |
| 1443 |
<tr> |
| 1444 |
<td class="parameter_name"><p>flags</p></td> |
| 1445 |
<td class="parameter_description"><p>Use zero or flags from <code class="literal">GNUTLS_PKCS11_OBJ_FLAG</code>.</p></td> |
| 1446 |
<td class="parameter_annotations"> </td> |
| 1447 |
</tr> |
| 1448 |
</tbody> |
| 1449 |
</table></div> |
| 1450 |
</div> |
| 1451 |
<div class="refsect3"> |
| 1452 |
<a name="gnutls-pkcs11-get-raw-issuer-by-subject-key-id.returns"></a><h4>Returns</h4> |
| 1453 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 1454 |
negative error value.</p> |
| 1455 |
</div> |
| 1456 |
<p class="since">Since: 3.4.2</p> |
| 1457 |
</div> |
| 1458 |
<hr> |
| 1459 |
<div class="refsect2"> |
| 1460 |
<a name="gnutls-pkcs11-crt-is-known"></a><h3>gnutls_pkcs11_crt_is_known ()</h3> |
| 1461 |
<pre class="programlisting"><span class="returnvalue">unsigned</span> |
| 1462 |
gnutls_pkcs11_crt_is_known (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 1463 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> cert</code></em>, |
| 1464 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 1465 |
<p>This function will check whether the provided certificate is stored |
| 1466 |
in the specified token. This is useful in combination with |
| 1467 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-RETRIEVE-TRUSTED:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_TRUSTED</code></a> or |
| 1468 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-RETRIEVE-DISTRUSTED:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_DISTRUSTED</code></a>, |
| 1469 |
to check whether a CA is present or a certificate is distrusted in |
| 1470 |
a trust PKCS <span class="type">11</span> module.</p> |
| 1471 |
<p>This function can be used with a <em class="parameter"><code>url</code></em> |
| 1472 |
of "pkcs11:", and in that case all modules |
| 1473 |
will be searched. To restrict the modules to the marked as trusted in p11-kit |
| 1474 |
use the <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-PRESENT-IN-TRUSTED-MODULE:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_PRESENT_IN_TRUSTED_MODULE</code></a> flag.</p> |
| 1475 |
<p>Note that the flag <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-RETRIEVE-DISTRUSTED:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_DISTRUSTED</code></a> is |
| 1476 |
specific to p11-kit trust modules.</p> |
| 1477 |
<div class="refsect3"> |
| 1478 |
<a name="gnutls-pkcs11-crt-is-known.parameters"></a><h4>Parameters</h4> |
| 1479 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1480 |
<colgroup> |
| 1481 |
<col width="150px" class="parameters_name"> |
| 1482 |
<col class="parameters_description"> |
| 1483 |
<col width="200px" class="parameters_annotations"> |
| 1484 |
</colgroup> |
| 1485 |
<tbody> |
| 1486 |
<tr> |
| 1487 |
<td class="parameter_name"><p>url</p></td> |
| 1488 |
<td class="parameter_description"><p>A PKCS 11 url identifying a token</p></td> |
| 1489 |
<td class="parameter_annotations"> </td> |
| 1490 |
</tr> |
| 1491 |
<tr> |
| 1492 |
<td class="parameter_name"><p>cert</p></td> |
| 1493 |
<td class="parameter_description"><p>is the certificate to find issuer for</p></td> |
| 1494 |
<td class="parameter_annotations"> </td> |
| 1495 |
</tr> |
| 1496 |
<tr> |
| 1497 |
<td class="parameter_name"><p>flags</p></td> |
| 1498 |
<td class="parameter_description"><p>Use zero or flags from <code class="literal">GNUTLS_PKCS11_OBJ_FLAG</code>.</p></td> |
| 1499 |
<td class="parameter_annotations"> </td> |
| 1500 |
</tr> |
| 1501 |
</tbody> |
| 1502 |
</table></div> |
| 1503 |
</div> |
| 1504 |
<div class="refsect3"> |
| 1505 |
<a name="gnutls-pkcs11-crt-is-known.returns"></a><h4>Returns</h4> |
| 1506 |
<p> If the certificate exists non-zero is returned, otherwise zero.</p> |
| 1507 |
</div> |
| 1508 |
<p class="since">Since: 3.3.0</p> |
| 1509 |
</div> |
| 1510 |
<hr> |
| 1511 |
<div class="refsect2"> |
| 1512 |
<a name="gnutls-pkcs11-copy-x509-crt"></a><h3>gnutls_pkcs11_copy_x509_crt ()</h3> |
| 1513 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1514 |
gnutls_pkcs11_copy_x509_crt (<em class="parameter"><code>const <span class="type">char</span> *token_url</code></em>, |
| 1515 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>, |
| 1516 |
<em class="parameter"><code>const <span class="type">char</span> *label</code></em>, |
| 1517 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 1518 |
<p>This function will copy a certificate into a PKCS <span class="type">11</span> token specified by |
| 1519 |
a URL. The certificate can be marked as trusted or not.</p> |
| 1520 |
<div class="refsect3"> |
| 1521 |
<a name="gnutls-pkcs11-copy-x509-crt.parameters"></a><h4>Parameters</h4> |
| 1522 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1523 |
<colgroup> |
| 1524 |
<col width="150px" class="parameters_name"> |
| 1525 |
<col class="parameters_description"> |
| 1526 |
<col width="200px" class="parameters_annotations"> |
| 1527 |
</colgroup> |
| 1528 |
<tbody> |
| 1529 |
<tr> |
| 1530 |
<td class="parameter_name"><p>token_url</p></td> |
| 1531 |
<td class="parameter_description"><p>A PKCS <span class="type">11</span> URL specifying a token</p></td> |
| 1532 |
<td class="parameter_annotations"> </td> |
| 1533 |
</tr> |
| 1534 |
<tr> |
| 1535 |
<td class="parameter_name"><p>crt</p></td> |
| 1536 |
<td class="parameter_description"><p>A certificate</p></td> |
| 1537 |
<td class="parameter_annotations"> </td> |
| 1538 |
</tr> |
| 1539 |
<tr> |
| 1540 |
<td class="parameter_name"><p>label</p></td> |
| 1541 |
<td class="parameter_description"><p>A name to be used for the stored data</p></td> |
| 1542 |
<td class="parameter_annotations"> </td> |
| 1543 |
</tr> |
| 1544 |
<tr> |
| 1545 |
<td class="parameter_name"><p>flags</p></td> |
| 1546 |
<td class="parameter_description"><p>One of GNUTLS_PKCS11_OBJ_FLAG_*</p></td> |
| 1547 |
<td class="parameter_annotations"> </td> |
| 1548 |
</tr> |
| 1549 |
</tbody> |
| 1550 |
</table></div> |
| 1551 |
</div> |
| 1552 |
<div class="refsect3"> |
| 1553 |
<a name="gnutls-pkcs11-copy-x509-crt.returns"></a><h4>Returns</h4> |
| 1554 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 1555 |
negative error value.</p> |
| 1556 |
</div> |
| 1557 |
<p class="since">Since: 2.12.0</p> |
| 1558 |
</div> |
| 1559 |
<hr> |
| 1560 |
<div class="refsect2"> |
| 1561 |
<a name="gnutls-pkcs11-copy-x509-privkey"></a><h3>gnutls_pkcs11_copy_x509_privkey ()</h3> |
| 1562 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1563 |
gnutls_pkcs11_copy_x509_privkey (<em class="parameter"><code>const <span class="type">char</span> *token_url</code></em>, |
| 1564 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>, |
| 1565 |
<em class="parameter"><code>const <span class="type">char</span> *label</code></em>, |
| 1566 |
<em class="parameter"><code>unsigned <span class="type">int</span> key_usage</code></em>, |
| 1567 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 1568 |
<p>This function will copy a private key into a PKCS <span class="type">11</span> token specified by |
| 1569 |
a URL.</p> |
| 1570 |
<p>Since 3.6.3 the objects are marked as sensitive by default unless |
| 1571 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-NOT-SENSITIVE:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_NOT_SENSITIVE</code></a> is specified.</p> |
| 1572 |
<div class="refsect3"> |
| 1573 |
<a name="gnutls-pkcs11-copy-x509-privkey.parameters"></a><h4>Parameters</h4> |
| 1574 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1575 |
<colgroup> |
| 1576 |
<col width="150px" class="parameters_name"> |
| 1577 |
<col class="parameters_description"> |
| 1578 |
<col width="200px" class="parameters_annotations"> |
| 1579 |
</colgroup> |
| 1580 |
<tbody> |
| 1581 |
<tr> |
| 1582 |
<td class="parameter_name"><p>token_url</p></td> |
| 1583 |
<td class="parameter_description"><p>A PKCS <span class="type">11</span> URL specifying a token</p></td> |
| 1584 |
<td class="parameter_annotations"> </td> |
| 1585 |
</tr> |
| 1586 |
<tr> |
| 1587 |
<td class="parameter_name"><p>key</p></td> |
| 1588 |
<td class="parameter_description"><p>A private key</p></td> |
| 1589 |
<td class="parameter_annotations"> </td> |
| 1590 |
</tr> |
| 1591 |
<tr> |
| 1592 |
<td class="parameter_name"><p>label</p></td> |
| 1593 |
<td class="parameter_description"><p>A name to be used for the stored data</p></td> |
| 1594 |
<td class="parameter_annotations"> </td> |
| 1595 |
</tr> |
| 1596 |
<tr> |
| 1597 |
<td class="parameter_name"><p>key_usage</p></td> |
| 1598 |
<td class="parameter_description"><p>One of GNUTLS_KEY_*</p></td> |
| 1599 |
<td class="parameter_annotations"> </td> |
| 1600 |
</tr> |
| 1601 |
<tr> |
| 1602 |
<td class="parameter_name"><p>flags</p></td> |
| 1603 |
<td class="parameter_description"><p>One of GNUTLS_PKCS11_OBJ_* flags</p></td> |
| 1604 |
<td class="parameter_annotations"> </td> |
| 1605 |
</tr> |
| 1606 |
</tbody> |
| 1607 |
</table></div> |
| 1608 |
</div> |
| 1609 |
<div class="refsect3"> |
| 1610 |
<a name="gnutls-pkcs11-copy-x509-privkey.returns"></a><h4>Returns</h4> |
| 1611 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 1612 |
negative error value.</p> |
| 1613 |
</div> |
| 1614 |
<p class="since">Since: 2.12.0</p> |
| 1615 |
</div> |
| 1616 |
<hr> |
| 1617 |
<div class="refsect2"> |
| 1618 |
<a name="gnutls-pkcs11-privkey-generate2"></a><h3>gnutls_pkcs11_privkey_generate2 ()</h3> |
| 1619 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1620 |
gnutls_pkcs11_privkey_generate2 (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 1621 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a> pk</code></em>, |
| 1622 |
<em class="parameter"><code>unsigned <span class="type">int</span> bits</code></em>, |
| 1623 |
<em class="parameter"><code>const <span class="type">char</span> *label</code></em>, |
| 1624 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> fmt</code></em>, |
| 1625 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *pubkey</code></em>, |
| 1626 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 1627 |
<p>This function will generate a private key in the specified |
| 1628 |
by the <em class="parameter"><code>url</code></em> |
| 1629 |
token. The private key will be generate within |
| 1630 |
the token and will not be exportable. This function will |
| 1631 |
store the DER-encoded public key in the SubjectPublicKeyInfo format |
| 1632 |
in <em class="parameter"><code>pubkey</code></em> |
| 1633 |
. The <em class="parameter"><code>pubkey</code></em> |
| 1634 |
should be deinitialized using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p> |
| 1635 |
<p>Note that when generating an elliptic curve key, the curve |
| 1636 |
can be substituted in the place of the bits parameter using the |
| 1637 |
<a class="link" href="gnutls-gnutls.html#GNUTLS-CURVE-TO-BITS:CAPS" title="GNUTLS_CURVE_TO_BITS()"><code class="function">GNUTLS_CURVE_TO_BITS()</code></a> macro.</p> |
| 1638 |
<div class="refsect3"> |
| 1639 |
<a name="gnutls-pkcs11-privkey-generate2.parameters"></a><h4>Parameters</h4> |
| 1640 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1641 |
<colgroup> |
| 1642 |
<col width="150px" class="parameters_name"> |
| 1643 |
<col class="parameters_description"> |
| 1644 |
<col width="200px" class="parameters_annotations"> |
| 1645 |
</colgroup> |
| 1646 |
<tbody> |
| 1647 |
<tr> |
| 1648 |
<td class="parameter_name"><p>url</p></td> |
| 1649 |
<td class="parameter_description"><p>a token URL</p></td> |
| 1650 |
<td class="parameter_annotations"> </td> |
| 1651 |
</tr> |
| 1652 |
<tr> |
| 1653 |
<td class="parameter_name"><p>pk</p></td> |
| 1654 |
<td class="parameter_description"><p>the public key algorithm</p></td> |
| 1655 |
<td class="parameter_annotations"> </td> |
| 1656 |
</tr> |
| 1657 |
<tr> |
| 1658 |
<td class="parameter_name"><p>bits</p></td> |
| 1659 |
<td class="parameter_description"><p>the security bits</p></td> |
| 1660 |
<td class="parameter_annotations"> </td> |
| 1661 |
</tr> |
| 1662 |
<tr> |
| 1663 |
<td class="parameter_name"><p>label</p></td> |
| 1664 |
<td class="parameter_description"><p>a label</p></td> |
| 1665 |
<td class="parameter_annotations"> </td> |
| 1666 |
</tr> |
| 1667 |
<tr> |
| 1668 |
<td class="parameter_name"><p>fmt</p></td> |
| 1669 |
<td class="parameter_description"><p>the format of output params. PEM or DER</p></td> |
| 1670 |
<td class="parameter_annotations"> </td> |
| 1671 |
</tr> |
| 1672 |
<tr> |
| 1673 |
<td class="parameter_name"><p>pubkey</p></td> |
| 1674 |
<td class="parameter_description"><p>will hold the public key (may be <code class="literal">NULL</code>)</p></td> |
| 1675 |
<td class="parameter_annotations"> </td> |
| 1676 |
</tr> |
| 1677 |
<tr> |
| 1678 |
<td class="parameter_name"><p>flags</p></td> |
| 1679 |
<td class="parameter_description"><p>zero or an OR'ed sequence of <code class="literal">GNUTLS_PKCS11_OBJ_FLAGs</code></p></td> |
| 1680 |
<td class="parameter_annotations"> </td> |
| 1681 |
</tr> |
| 1682 |
</tbody> |
| 1683 |
</table></div> |
| 1684 |
</div> |
| 1685 |
<div class="refsect3"> |
| 1686 |
<a name="gnutls-pkcs11-privkey-generate2.returns"></a><h4>Returns</h4> |
| 1687 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 1688 |
negative error value.</p> |
| 1689 |
</div> |
| 1690 |
<p class="since">Since: 3.1.5</p> |
| 1691 |
</div> |
| 1692 |
<hr> |
| 1693 |
<div class="refsect2"> |
| 1694 |
<a name="gnutls-pkcs11-privkey-generate"></a><h3>gnutls_pkcs11_privkey_generate ()</h3> |
| 1695 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1696 |
gnutls_pkcs11_privkey_generate (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 1697 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a> pk</code></em>, |
| 1698 |
<em class="parameter"><code>unsigned <span class="type">int</span> bits</code></em>, |
| 1699 |
<em class="parameter"><code>const <span class="type">char</span> *label</code></em>, |
| 1700 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 1701 |
<p>This function will generate a private key in the specified |
| 1702 |
by the <em class="parameter"><code>url</code></em> |
| 1703 |
token. The private key will be generate within |
| 1704 |
the token and will not be exportable.</p> |
| 1705 |
<div class="refsect3"> |
| 1706 |
<a name="gnutls-pkcs11-privkey-generate.parameters"></a><h4>Parameters</h4> |
| 1707 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1708 |
<colgroup> |
| 1709 |
<col width="150px" class="parameters_name"> |
| 1710 |
<col class="parameters_description"> |
| 1711 |
<col width="200px" class="parameters_annotations"> |
| 1712 |
</colgroup> |
| 1713 |
<tbody> |
| 1714 |
<tr> |
| 1715 |
<td class="parameter_name"><p>url</p></td> |
| 1716 |
<td class="parameter_description"><p>a token URL</p></td> |
| 1717 |
<td class="parameter_annotations"> </td> |
| 1718 |
</tr> |
| 1719 |
<tr> |
| 1720 |
<td class="parameter_name"><p>pk</p></td> |
| 1721 |
<td class="parameter_description"><p>the public key algorithm</p></td> |
| 1722 |
<td class="parameter_annotations"> </td> |
| 1723 |
</tr> |
| 1724 |
<tr> |
| 1725 |
<td class="parameter_name"><p>bits</p></td> |
| 1726 |
<td class="parameter_description"><p>the security bits</p></td> |
| 1727 |
<td class="parameter_annotations"> </td> |
| 1728 |
</tr> |
| 1729 |
<tr> |
| 1730 |
<td class="parameter_name"><p>label</p></td> |
| 1731 |
<td class="parameter_description"><p>a label</p></td> |
| 1732 |
<td class="parameter_annotations"> </td> |
| 1733 |
</tr> |
| 1734 |
<tr> |
| 1735 |
<td class="parameter_name"><p>flags</p></td> |
| 1736 |
<td class="parameter_description"><p>should be zero</p></td> |
| 1737 |
<td class="parameter_annotations"> </td> |
| 1738 |
</tr> |
| 1739 |
</tbody> |
| 1740 |
</table></div> |
| 1741 |
</div> |
| 1742 |
<div class="refsect3"> |
| 1743 |
<a name="gnutls-pkcs11-privkey-generate.returns"></a><h4>Returns</h4> |
| 1744 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 1745 |
negative error value.</p> |
| 1746 |
</div> |
| 1747 |
<p class="since">Since: 3.0</p> |
| 1748 |
</div> |
| 1749 |
<hr> |
| 1750 |
<div class="refsect2"> |
| 1751 |
<a name="gnutls-pkcs11-copy-pubkey"></a><h3>gnutls_pkcs11_copy_pubkey ()</h3> |
| 1752 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1753 |
gnutls_pkcs11_copy_pubkey (<em class="parameter"><code>const <span class="type">char</span> *token_url</code></em>, |
| 1754 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pubkey-t" title="gnutls_pubkey_t"><span class="type">gnutls_pubkey_t</span></a> crt</code></em>, |
| 1755 |
<em class="parameter"><code>const <span class="type">char</span> *label</code></em>, |
| 1756 |
<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *cid</code></em>, |
| 1757 |
<em class="parameter"><code>unsigned <span class="type">int</span> key_usage</code></em>, |
| 1758 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 1759 |
<p>This function will copy a public key object into a PKCS <span class="type">11</span> token specified by |
| 1760 |
a URL. Valid flags to mark the key: <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-TRUSTED:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED</code></a>, |
| 1761 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-PRIVATE:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_PRIVATE</code></a>, <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-CA:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_CA</code></a>, |
| 1762 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-ALWAYS-AUTH:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_ALWAYS_AUTH</code></a>.</p> |
| 1763 |
<div class="refsect3"> |
| 1764 |
<a name="gnutls-pkcs11-copy-pubkey.parameters"></a><h4>Parameters</h4> |
| 1765 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1766 |
<colgroup> |
| 1767 |
<col width="150px" class="parameters_name"> |
| 1768 |
<col class="parameters_description"> |
| 1769 |
<col width="200px" class="parameters_annotations"> |
| 1770 |
</colgroup> |
| 1771 |
<tbody> |
| 1772 |
<tr> |
| 1773 |
<td class="parameter_name"><p>token_url</p></td> |
| 1774 |
<td class="parameter_description"><p>A PKCS <span class="type">11</span> URL specifying a token</p></td> |
| 1775 |
<td class="parameter_annotations"> </td> |
| 1776 |
</tr> |
| 1777 |
<tr> |
| 1778 |
<td class="parameter_name"><p>pubkey</p></td> |
| 1779 |
<td class="parameter_description"><p>The public key to copy</p></td> |
| 1780 |
<td class="parameter_annotations"> </td> |
| 1781 |
</tr> |
| 1782 |
<tr> |
| 1783 |
<td class="parameter_name"><p>label</p></td> |
| 1784 |
<td class="parameter_description"><p>The name to be used for the stored data</p></td> |
| 1785 |
<td class="parameter_annotations"> </td> |
| 1786 |
</tr> |
| 1787 |
<tr> |
| 1788 |
<td class="parameter_name"><p>cid</p></td> |
| 1789 |
<td class="parameter_description"><p>The CKA_ID to set for the object -if NULL, the ID will be derived from the public key</p></td> |
| 1790 |
<td class="parameter_annotations"> </td> |
| 1791 |
</tr> |
| 1792 |
<tr> |
| 1793 |
<td class="parameter_name"><p>key_usage</p></td> |
| 1794 |
<td class="parameter_description"><p>One of GNUTLS_KEY_*</p></td> |
| 1795 |
<td class="parameter_annotations"> </td> |
| 1796 |
</tr> |
| 1797 |
<tr> |
| 1798 |
<td class="parameter_name"><p>flags</p></td> |
| 1799 |
<td class="parameter_description"><p>One of GNUTLS_PKCS11_OBJ_FLAG_*</p></td> |
| 1800 |
<td class="parameter_annotations"> </td> |
| 1801 |
</tr> |
| 1802 |
</tbody> |
| 1803 |
</table></div> |
| 1804 |
</div> |
| 1805 |
<div class="refsect3"> |
| 1806 |
<a name="gnutls-pkcs11-copy-pubkey.returns"></a><h4>Returns</h4> |
| 1807 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 1808 |
negative error value.</p> |
| 1809 |
</div> |
| 1810 |
<p class="since">Since: 3.4.6</p> |
| 1811 |
</div> |
| 1812 |
<hr> |
| 1813 |
<div class="refsect2"> |
| 1814 |
<a name="gnutls-pkcs11-copy-x509-crt2"></a><h3>gnutls_pkcs11_copy_x509_crt2 ()</h3> |
| 1815 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1816 |
gnutls_pkcs11_copy_x509_crt2 (<em class="parameter"><code>const <span class="type">char</span> *token_url</code></em>, |
| 1817 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>, |
| 1818 |
<em class="parameter"><code>const <span class="type">char</span> *label</code></em>, |
| 1819 |
<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *id</code></em>, |
| 1820 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 1821 |
<p>This function will copy a certificate into a PKCS <span class="type">11</span> token specified by |
| 1822 |
a URL. Valid flags to mark the certificate: <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-TRUSTED:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED</code></a>, |
| 1823 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-PRIVATE:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_PRIVATE</code></a>, <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-CA:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_CA</code></a>, |
| 1824 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-ALWAYS-AUTH:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_ALWAYS_AUTH</code></a>.</p> |
| 1825 |
<div class="refsect3"> |
| 1826 |
<a name="gnutls-pkcs11-copy-x509-crt2.parameters"></a><h4>Parameters</h4> |
| 1827 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1828 |
<colgroup> |
| 1829 |
<col width="150px" class="parameters_name"> |
| 1830 |
<col class="parameters_description"> |
| 1831 |
<col width="200px" class="parameters_annotations"> |
| 1832 |
</colgroup> |
| 1833 |
<tbody> |
| 1834 |
<tr> |
| 1835 |
<td class="parameter_name"><p>token_url</p></td> |
| 1836 |
<td class="parameter_description"><p>A PKCS <span class="type">11</span> URL specifying a token</p></td> |
| 1837 |
<td class="parameter_annotations"> </td> |
| 1838 |
</tr> |
| 1839 |
<tr> |
| 1840 |
<td class="parameter_name"><p>crt</p></td> |
| 1841 |
<td class="parameter_description"><p>The certificate to copy</p></td> |
| 1842 |
<td class="parameter_annotations"> </td> |
| 1843 |
</tr> |
| 1844 |
<tr> |
| 1845 |
<td class="parameter_name"><p>label</p></td> |
| 1846 |
<td class="parameter_description"><p>The name to be used for the stored data</p></td> |
| 1847 |
<td class="parameter_annotations"> </td> |
| 1848 |
</tr> |
| 1849 |
<tr> |
| 1850 |
<td class="parameter_name"><p>cid</p></td> |
| 1851 |
<td class="parameter_description"><p>The CKA_ID to set for the object -if NULL, the ID will be derived from the public key</p></td> |
| 1852 |
<td class="parameter_annotations"> </td> |
| 1853 |
</tr> |
| 1854 |
<tr> |
| 1855 |
<td class="parameter_name"><p>flags</p></td> |
| 1856 |
<td class="parameter_description"><p>One of GNUTLS_PKCS11_OBJ_FLAG_*</p></td> |
| 1857 |
<td class="parameter_annotations"> </td> |
| 1858 |
</tr> |
| 1859 |
</tbody> |
| 1860 |
</table></div> |
| 1861 |
</div> |
| 1862 |
<div class="refsect3"> |
| 1863 |
<a name="gnutls-pkcs11-copy-x509-crt2.returns"></a><h4>Returns</h4> |
| 1864 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 1865 |
negative error value.</p> |
| 1866 |
</div> |
| 1867 |
<p class="since">Since: 3.4.0</p> |
| 1868 |
</div> |
| 1869 |
<hr> |
| 1870 |
<div class="refsect2"> |
| 1871 |
<a name="gnutls-pkcs11-copy-x509-privkey2"></a><h3>gnutls_pkcs11_copy_x509_privkey2 ()</h3> |
| 1872 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1873 |
gnutls_pkcs11_copy_x509_privkey2 (<em class="parameter"><code>const <span class="type">char</span> *token_url</code></em>, |
| 1874 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-privkey-t" title="gnutls_x509_privkey_t"><span class="type">gnutls_x509_privkey_t</span></a> key</code></em>, |
| 1875 |
<em class="parameter"><code>const <span class="type">char</span> *label</code></em>, |
| 1876 |
<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *cid</code></em>, |
| 1877 |
<em class="parameter"><code>unsigned <span class="type">int</span> key_usage</code></em>, |
| 1878 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 1879 |
<p>This function will copy a private key into a PKCS <span class="type">11</span> token specified by |
| 1880 |
a URL.</p> |
| 1881 |
<p>Since 3.6.3 the objects are marked as sensitive by default unless |
| 1882 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-NOT-SENSITIVE:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_NOT_SENSITIVE</code></a> is specified.</p> |
| 1883 |
<div class="refsect3"> |
| 1884 |
<a name="gnutls-pkcs11-copy-x509-privkey2.parameters"></a><h4>Parameters</h4> |
| 1885 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1886 |
<colgroup> |
| 1887 |
<col width="150px" class="parameters_name"> |
| 1888 |
<col class="parameters_description"> |
| 1889 |
<col width="200px" class="parameters_annotations"> |
| 1890 |
</colgroup> |
| 1891 |
<tbody> |
| 1892 |
<tr> |
| 1893 |
<td class="parameter_name"><p>token_url</p></td> |
| 1894 |
<td class="parameter_description"><p>A PKCS <span class="type">11</span> URL specifying a token</p></td> |
| 1895 |
<td class="parameter_annotations"> </td> |
| 1896 |
</tr> |
| 1897 |
<tr> |
| 1898 |
<td class="parameter_name"><p>key</p></td> |
| 1899 |
<td class="parameter_description"><p>A private key</p></td> |
| 1900 |
<td class="parameter_annotations"> </td> |
| 1901 |
</tr> |
| 1902 |
<tr> |
| 1903 |
<td class="parameter_name"><p>label</p></td> |
| 1904 |
<td class="parameter_description"><p>A name to be used for the stored data</p></td> |
| 1905 |
<td class="parameter_annotations"> </td> |
| 1906 |
</tr> |
| 1907 |
<tr> |
| 1908 |
<td class="parameter_name"><p>cid</p></td> |
| 1909 |
<td class="parameter_description"><p>The CKA_ID to set for the object -if NULL, the ID will be derived from the public key</p></td> |
| 1910 |
<td class="parameter_annotations"> </td> |
| 1911 |
</tr> |
| 1912 |
<tr> |
| 1913 |
<td class="parameter_name"><p>key_usage</p></td> |
| 1914 |
<td class="parameter_description"><p>One of GNUTLS_KEY_*</p></td> |
| 1915 |
<td class="parameter_annotations"> </td> |
| 1916 |
</tr> |
| 1917 |
<tr> |
| 1918 |
<td class="parameter_name"><p>flags</p></td> |
| 1919 |
<td class="parameter_description"><p>One of GNUTLS_PKCS11_OBJ_* flags</p></td> |
| 1920 |
<td class="parameter_annotations"> </td> |
| 1921 |
</tr> |
| 1922 |
</tbody> |
| 1923 |
</table></div> |
| 1924 |
</div> |
| 1925 |
<div class="refsect3"> |
| 1926 |
<a name="gnutls-pkcs11-copy-x509-privkey2.returns"></a><h4>Returns</h4> |
| 1927 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 1928 |
negative error value.</p> |
| 1929 |
</div> |
| 1930 |
<p class="since">Since: 3.4.0</p> |
| 1931 |
</div> |
| 1932 |
<hr> |
| 1933 |
<div class="refsect2"> |
| 1934 |
<a name="gnutls-pkcs11-delete-url"></a><h3>gnutls_pkcs11_delete_url ()</h3> |
| 1935 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1936 |
gnutls_pkcs11_delete_url (<em class="parameter"><code>const <span class="type">char</span> *object_url</code></em>, |
| 1937 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 1938 |
<p>This function will delete objects matching the given URL. |
| 1939 |
Note that not all tokens support the delete operation.</p> |
| 1940 |
<div class="refsect3"> |
| 1941 |
<a name="gnutls-pkcs11-delete-url.parameters"></a><h4>Parameters</h4> |
| 1942 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1943 |
<colgroup> |
| 1944 |
<col width="150px" class="parameters_name"> |
| 1945 |
<col class="parameters_description"> |
| 1946 |
<col width="200px" class="parameters_annotations"> |
| 1947 |
</colgroup> |
| 1948 |
<tbody> |
| 1949 |
<tr> |
| 1950 |
<td class="parameter_name"><p>object_url</p></td> |
| 1951 |
<td class="parameter_description"><p>The URL of the object to delete.</p></td> |
| 1952 |
<td class="parameter_annotations"> </td> |
| 1953 |
</tr> |
| 1954 |
<tr> |
| 1955 |
<td class="parameter_name"><p>flags</p></td> |
| 1956 |
<td class="parameter_description"><p>One of GNUTLS_PKCS11_OBJ_* flags</p></td> |
| 1957 |
<td class="parameter_annotations"> </td> |
| 1958 |
</tr> |
| 1959 |
</tbody> |
| 1960 |
</table></div> |
| 1961 |
</div> |
| 1962 |
<div class="refsect3"> |
| 1963 |
<a name="gnutls-pkcs11-delete-url.returns"></a><h4>Returns</h4> |
| 1964 |
<p> On success, the number of objects deleted is returned, otherwise a |
| 1965 |
negative error value.</p> |
| 1966 |
</div> |
| 1967 |
<p class="since">Since: 2.12.0</p> |
| 1968 |
</div> |
| 1969 |
<hr> |
| 1970 |
<div class="refsect2"> |
| 1971 |
<a name="gnutls-pkcs11-copy-secret-key"></a><h3>gnutls_pkcs11_copy_secret_key ()</h3> |
| 1972 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1973 |
gnutls_pkcs11_copy_secret_key (<em class="parameter"><code>const <span class="type">char</span> *token_url</code></em>, |
| 1974 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *key</code></em>, |
| 1975 |
<em class="parameter"><code>const <span class="type">char</span> *label</code></em>, |
| 1976 |
<em class="parameter"><code>unsigned <span class="type">int</span> key_usage</code></em>, |
| 1977 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 1978 |
<p>This function will copy a raw secret (symmetric) key into a PKCS <span class="type">11</span> |
| 1979 |
token specified by a URL. The key can be marked as sensitive or not.</p> |
| 1980 |
<div class="refsect3"> |
| 1981 |
<a name="gnutls-pkcs11-copy-secret-key.parameters"></a><h4>Parameters</h4> |
| 1982 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1983 |
<colgroup> |
| 1984 |
<col width="150px" class="parameters_name"> |
| 1985 |
<col class="parameters_description"> |
| 1986 |
<col width="200px" class="parameters_annotations"> |
| 1987 |
</colgroup> |
| 1988 |
<tbody> |
| 1989 |
<tr> |
| 1990 |
<td class="parameter_name"><p>token_url</p></td> |
| 1991 |
<td class="parameter_description"><p>A PKCS <span class="type">11</span> URL specifying a token</p></td> |
| 1992 |
<td class="parameter_annotations"> </td> |
| 1993 |
</tr> |
| 1994 |
<tr> |
| 1995 |
<td class="parameter_name"><p>key</p></td> |
| 1996 |
<td class="parameter_description"><p>The raw key</p></td> |
| 1997 |
<td class="parameter_annotations"> </td> |
| 1998 |
</tr> |
| 1999 |
<tr> |
| 2000 |
<td class="parameter_name"><p>label</p></td> |
| 2001 |
<td class="parameter_description"><p>A name to be used for the stored data</p></td> |
| 2002 |
<td class="parameter_annotations"> </td> |
| 2003 |
</tr> |
| 2004 |
<tr> |
| 2005 |
<td class="parameter_name"><p>key_usage</p></td> |
| 2006 |
<td class="parameter_description"><p>One of GNUTLS_KEY_*</p></td> |
| 2007 |
<td class="parameter_annotations"> </td> |
| 2008 |
</tr> |
| 2009 |
<tr> |
| 2010 |
<td class="parameter_name"><p>flags</p></td> |
| 2011 |
<td class="parameter_description"><p>One of GNUTLS_PKCS11_OBJ_FLAG_*</p></td> |
| 2012 |
<td class="parameter_annotations"> </td> |
| 2013 |
</tr> |
| 2014 |
</tbody> |
| 2015 |
</table></div> |
| 2016 |
</div> |
| 2017 |
<div class="refsect3"> |
| 2018 |
<a name="gnutls-pkcs11-copy-secret-key.returns"></a><h4>Returns</h4> |
| 2019 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 2020 |
negative error value.</p> |
| 2021 |
</div> |
| 2022 |
<p class="since">Since: 2.12.0</p> |
| 2023 |
</div> |
| 2024 |
<hr> |
| 2025 |
<div class="refsect2"> |
| 2026 |
<a name="gnutls-pkcs11-obj-get-ptr"></a><h3>gnutls_pkcs11_obj_get_ptr ()</h3> |
| 2027 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2028 |
gnutls_pkcs11_obj_get_ptr (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> obj</code></em>, |
| 2029 |
<em class="parameter"><code><span class="type">void</span> **ptr</code></em>, |
| 2030 |
<em class="parameter"><code><span class="type">void</span> **session</code></em>, |
| 2031 |
<em class="parameter"><code><span class="type">void</span> **ohandle</code></em>, |
| 2032 |
<em class="parameter"><code>unsigned <span class="type">long</span> *slot_id</code></em>, |
| 2033 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 2034 |
<p>Obtains the PKCS<span class="type">11</span> session handles of an object. <em class="parameter"><code>session</code></em> |
| 2035 |
and <em class="parameter"><code>ohandle</code></em> |
| 2036 |
|
| 2037 |
must be deinitialized by the caller. The returned pointers are |
| 2038 |
independent of the <em class="parameter"><code>obj</code></em> |
| 2039 |
lifetime.</p> |
| 2040 |
<div class="refsect3"> |
| 2041 |
<a name="gnutls-pkcs11-obj-get-ptr.parameters"></a><h4>Parameters</h4> |
| 2042 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2043 |
<colgroup> |
| 2044 |
<col width="150px" class="parameters_name"> |
| 2045 |
<col class="parameters_description"> |
| 2046 |
<col width="200px" class="parameters_annotations"> |
| 2047 |
</colgroup> |
| 2048 |
<tbody> |
| 2049 |
<tr> |
| 2050 |
<td class="parameter_name"><p>obj</p></td> |
| 2051 |
<td class="parameter_description"><p>should contain a <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> type</p></td> |
| 2052 |
<td class="parameter_annotations"> </td> |
| 2053 |
</tr> |
| 2054 |
<tr> |
| 2055 |
<td class="parameter_name"><p>ptr</p></td> |
| 2056 |
<td class="parameter_description"><p>will contain the CK_FUNCTION_LIST_PTR pointer (may be <code class="literal">NULL</code>)</p></td> |
| 2057 |
<td class="parameter_annotations"> </td> |
| 2058 |
</tr> |
| 2059 |
<tr> |
| 2060 |
<td class="parameter_name"><p>session</p></td> |
| 2061 |
<td class="parameter_description"><p>will contain the CK_SESSION_HANDLE of the object</p></td> |
| 2062 |
<td class="parameter_annotations"> </td> |
| 2063 |
</tr> |
| 2064 |
<tr> |
| 2065 |
<td class="parameter_name"><p>ohandle</p></td> |
| 2066 |
<td class="parameter_description"><p>will contain the CK_OBJECT_HANDLE of the object</p></td> |
| 2067 |
<td class="parameter_annotations"> </td> |
| 2068 |
</tr> |
| 2069 |
<tr> |
| 2070 |
<td class="parameter_name"><p>slot_id</p></td> |
| 2071 |
<td class="parameter_description"><p>the identifier of the slot (may be <code class="literal">NULL</code>)</p></td> |
| 2072 |
<td class="parameter_annotations"> </td> |
| 2073 |
</tr> |
| 2074 |
<tr> |
| 2075 |
<td class="parameter_name"><p>flags</p></td> |
| 2076 |
<td class="parameter_description"><p>Or sequence of GNUTLS_PKCS11_OBJ_* flags</p></td> |
| 2077 |
<td class="parameter_annotations"> </td> |
| 2078 |
</tr> |
| 2079 |
</tbody> |
| 2080 |
</table></div> |
| 2081 |
</div> |
| 2082 |
<div class="refsect3"> |
| 2083 |
<a name="gnutls-pkcs11-obj-get-ptr.returns"></a><h4>Returns</h4> |
| 2084 |
<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success or a negative error code |
| 2085 |
on error.</p> |
| 2086 |
</div> |
| 2087 |
<p class="since">Since: 3.6.3</p> |
| 2088 |
</div> |
| 2089 |
<hr> |
| 2090 |
<div class="refsect2"> |
| 2091 |
<a name="gnutls-pkcs11-obj-get-info"></a><h3>gnutls_pkcs11_obj_get_info ()</h3> |
| 2092 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2093 |
gnutls_pkcs11_obj_get_info (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> obj</code></em>, |
| 2094 |
<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-info-t" title="enum gnutls_pkcs11_obj_info_t"><span class="type">gnutls_pkcs11_obj_info_t</span></a> itype</code></em>, |
| 2095 |
<em class="parameter"><code><span class="type">void</span> *output</code></em>, |
| 2096 |
<em class="parameter"><code><span class="type">size_t</span> *output_size</code></em>);</pre> |
| 2097 |
<p>This function will return information about the PKCS11 certificate |
| 2098 |
such as the label, id as well as token information where the key is |
| 2099 |
stored.</p> |
| 2100 |
<p>When output is text, a null terminated string is written to <em class="parameter"><code>output</code></em> |
| 2101 |
and its |
| 2102 |
string length is written to <em class="parameter"><code>output_size</code></em> |
| 2103 |
(without null terminator). If the |
| 2104 |
buffer is too small, <em class="parameter"><code>output_size</code></em> |
| 2105 |
will contain the expected buffer size |
| 2106 |
(with null terminator for text) and return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a>.</p> |
| 2107 |
<p>In versions previously to 3.6.0 this function included the null terminator |
| 2108 |
to <em class="parameter"><code>output_size</code></em> |
| 2109 |
. After 3.6.0 the output size doesn't include the terminator character.</p> |
| 2110 |
<div class="refsect3"> |
| 2111 |
<a name="gnutls-pkcs11-obj-get-info.parameters"></a><h4>Parameters</h4> |
| 2112 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2113 |
<colgroup> |
| 2114 |
<col width="150px" class="parameters_name"> |
| 2115 |
<col class="parameters_description"> |
| 2116 |
<col width="200px" class="parameters_annotations"> |
| 2117 |
</colgroup> |
| 2118 |
<tbody> |
| 2119 |
<tr> |
| 2120 |
<td class="parameter_name"><p>obj</p></td> |
| 2121 |
<td class="parameter_description"><p>should contain a <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> type</p></td> |
| 2122 |
<td class="parameter_annotations"> </td> |
| 2123 |
</tr> |
| 2124 |
<tr> |
| 2125 |
<td class="parameter_name"><p>itype</p></td> |
| 2126 |
<td class="parameter_description"><p>Denotes the type of information requested</p></td> |
| 2127 |
<td class="parameter_annotations"> </td> |
| 2128 |
</tr> |
| 2129 |
<tr> |
| 2130 |
<td class="parameter_name"><p>output</p></td> |
| 2131 |
<td class="parameter_description"><p>where output will be stored</p></td> |
| 2132 |
<td class="parameter_annotations"> </td> |
| 2133 |
</tr> |
| 2134 |
<tr> |
| 2135 |
<td class="parameter_name"><p>output_size</p></td> |
| 2136 |
<td class="parameter_description"><p>contains the maximum size of the output buffer and will be |
| 2137 |
overwritten with the actual size.</p></td> |
| 2138 |
<td class="parameter_annotations"> </td> |
| 2139 |
</tr> |
| 2140 |
</tbody> |
| 2141 |
</table></div> |
| 2142 |
</div> |
| 2143 |
<div class="refsect3"> |
| 2144 |
<a name="gnutls-pkcs11-obj-get-info.returns"></a><h4>Returns</h4> |
| 2145 |
<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success or a negative error code on error.</p> |
| 2146 |
</div> |
| 2147 |
<p class="since">Since: 2.12.0</p> |
| 2148 |
</div> |
| 2149 |
<hr> |
| 2150 |
<div class="refsect2"> |
| 2151 |
<a name="gnutls-pkcs11-obj-set-info"></a><h3>gnutls_pkcs11_obj_set_info ()</h3> |
| 2152 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2153 |
gnutls_pkcs11_obj_set_info (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> obj</code></em>, |
| 2154 |
<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-info-t" title="enum gnutls_pkcs11_obj_info_t"><span class="type">gnutls_pkcs11_obj_info_t</span></a> itype</code></em>, |
| 2155 |
<em class="parameter"><code>const <span class="type">void</span> *data</code></em>, |
| 2156 |
<em class="parameter"><code><span class="type">size_t</span> data_size</code></em>, |
| 2157 |
<em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> |
| 2158 |
<p>This function will set attributes on the provided object. |
| 2159 |
Available options for <em class="parameter"><code>itype</code></em> |
| 2160 |
are <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-LABEL:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_LABEL</code></a>, |
| 2161 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-ID-HEX:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_ID_HEX</code></a>, and <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-ID:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_ID</code></a>.</p> |
| 2162 |
<div class="refsect3"> |
| 2163 |
<a name="gnutls-pkcs11-obj-set-info.parameters"></a><h4>Parameters</h4> |
| 2164 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2165 |
<colgroup> |
| 2166 |
<col width="150px" class="parameters_name"> |
| 2167 |
<col class="parameters_description"> |
| 2168 |
<col width="200px" class="parameters_annotations"> |
| 2169 |
</colgroup> |
| 2170 |
<tbody> |
| 2171 |
<tr> |
| 2172 |
<td class="parameter_name"><p>obj</p></td> |
| 2173 |
<td class="parameter_description"><p>should contain a <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> type</p></td> |
| 2174 |
<td class="parameter_annotations"> </td> |
| 2175 |
</tr> |
| 2176 |
<tr> |
| 2177 |
<td class="parameter_name"><p>itype</p></td> |
| 2178 |
<td class="parameter_description"><p>Denotes the type of information to be set</p></td> |
| 2179 |
<td class="parameter_annotations"> </td> |
| 2180 |
</tr> |
| 2181 |
<tr> |
| 2182 |
<td class="parameter_name"><p>data</p></td> |
| 2183 |
<td class="parameter_description"><p>the data to set</p></td> |
| 2184 |
<td class="parameter_annotations"> </td> |
| 2185 |
</tr> |
| 2186 |
<tr> |
| 2187 |
<td class="parameter_name"><p>data_size</p></td> |
| 2188 |
<td class="parameter_description"><p>the size of data</p></td> |
| 2189 |
<td class="parameter_annotations"> </td> |
| 2190 |
</tr> |
| 2191 |
<tr> |
| 2192 |
<td class="parameter_name"><p>flags</p></td> |
| 2193 |
<td class="parameter_description"><p>Or sequence of GNUTLS_PKCS11_OBJ_* flags</p></td> |
| 2194 |
<td class="parameter_annotations"> </td> |
| 2195 |
</tr> |
| 2196 |
</tbody> |
| 2197 |
</table></div> |
| 2198 |
</div> |
| 2199 |
<div class="refsect3"> |
| 2200 |
<a name="gnutls-pkcs11-obj-set-info.returns"></a><h4>Returns</h4> |
| 2201 |
<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success or a negative error code on error.</p> |
| 2202 |
</div> |
| 2203 |
<p class="since">Since: 3.4.0</p> |
| 2204 |
</div> |
| 2205 |
<hr> |
| 2206 |
<div class="refsect2"> |
| 2207 |
<a name="gnutls-pkcs11-token-init"></a><h3>gnutls_pkcs11_token_init ()</h3> |
| 2208 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2209 |
gnutls_pkcs11_token_init (<em class="parameter"><code>const <span class="type">char</span> *token_url</code></em>, |
| 2210 |
<em class="parameter"><code>const <span class="type">char</span> *so_pin</code></em>, |
| 2211 |
<em class="parameter"><code>const <span class="type">char</span> *label</code></em>);</pre> |
| 2212 |
<p>This function will initialize (format) a token. If the token is |
| 2213 |
at a factory defaults state the security officer's PIN given will be |
| 2214 |
set to be the default. Otherwise it should match the officer's PIN.</p> |
| 2215 |
<div class="refsect3"> |
| 2216 |
<a name="gnutls-pkcs11-token-init.parameters"></a><h4>Parameters</h4> |
| 2217 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2218 |
<colgroup> |
| 2219 |
<col width="150px" class="parameters_name"> |
| 2220 |
<col class="parameters_description"> |
| 2221 |
<col width="200px" class="parameters_annotations"> |
| 2222 |
</colgroup> |
| 2223 |
<tbody> |
| 2224 |
<tr> |
| 2225 |
<td class="parameter_name"><p>token_url</p></td> |
| 2226 |
<td class="parameter_description"><p>A PKCS <span class="type">11</span> URL specifying a token</p></td> |
| 2227 |
<td class="parameter_annotations"> </td> |
| 2228 |
</tr> |
| 2229 |
<tr> |
| 2230 |
<td class="parameter_name"><p>so_pin</p></td> |
| 2231 |
<td class="parameter_description"><p>Security Officer's PIN</p></td> |
| 2232 |
<td class="parameter_annotations"> </td> |
| 2233 |
</tr> |
| 2234 |
<tr> |
| 2235 |
<td class="parameter_name"><p>label</p></td> |
| 2236 |
<td class="parameter_description"><p>A name to be used for the token, at most 32 characters</p></td> |
| 2237 |
<td class="parameter_annotations"> </td> |
| 2238 |
</tr> |
| 2239 |
</tbody> |
| 2240 |
</table></div> |
| 2241 |
</div> |
| 2242 |
<div class="refsect3"> |
| 2243 |
<a name="gnutls-pkcs11-token-init.returns"></a><h4>Returns</h4> |
| 2244 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 2245 |
negative error value.</p> |
| 2246 |
</div> |
| 2247 |
</div> |
| 2248 |
<hr> |
| 2249 |
<div class="refsect2"> |
| 2250 |
<a name="gnutls-pkcs11-token-get-ptr"></a><h3>gnutls_pkcs11_token_get_ptr ()</h3> |
| 2251 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2252 |
gnutls_pkcs11_token_get_ptr (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 2253 |
<em class="parameter"><code><span class="type">void</span> **ptr</code></em>, |
| 2254 |
<em class="parameter"><code>unsigned <span class="type">long</span> *slot_id</code></em>, |
| 2255 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 2256 |
<p>This function will return the function pointer of the specified |
| 2257 |
token by the URL. The returned pointers are valid until |
| 2258 |
gnutls is deinitialized, c.f. <code class="function">_global_deinit()</code>.</p> |
| 2259 |
<div class="refsect3"> |
| 2260 |
<a name="gnutls-pkcs11-token-get-ptr.parameters"></a><h4>Parameters</h4> |
| 2261 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2262 |
<colgroup> |
| 2263 |
<col width="150px" class="parameters_name"> |
| 2264 |
<col class="parameters_description"> |
| 2265 |
<col width="200px" class="parameters_annotations"> |
| 2266 |
</colgroup> |
| 2267 |
<tbody> |
| 2268 |
<tr> |
| 2269 |
<td class="parameter_name"><p>url</p></td> |
| 2270 |
<td class="parameter_description"><p>should contain a PKCS<span class="type">11</span> URL identifying a token</p></td> |
| 2271 |
<td class="parameter_annotations"> </td> |
| 2272 |
</tr> |
| 2273 |
<tr> |
| 2274 |
<td class="parameter_name"><p>ptr</p></td> |
| 2275 |
<td class="parameter_description"><p>will contain the CK_FUNCTION_LIST_PTR pointer</p></td> |
| 2276 |
<td class="parameter_annotations"> </td> |
| 2277 |
</tr> |
| 2278 |
<tr> |
| 2279 |
<td class="parameter_name"><p>slot_id</p></td> |
| 2280 |
<td class="parameter_description"><p>will contain the slot_id (may be <code class="literal">NULL</code>)</p></td> |
| 2281 |
<td class="parameter_annotations"> </td> |
| 2282 |
</tr> |
| 2283 |
<tr> |
| 2284 |
<td class="parameter_name"><p>flags</p></td> |
| 2285 |
<td class="parameter_description"><p>should be zero</p></td> |
| 2286 |
<td class="parameter_annotations"> </td> |
| 2287 |
</tr> |
| 2288 |
</tbody> |
| 2289 |
</table></div> |
| 2290 |
</div> |
| 2291 |
<div class="refsect3"> |
| 2292 |
<a name="gnutls-pkcs11-token-get-ptr.returns"></a><h4>Returns</h4> |
| 2293 |
<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success or a negative error code |
| 2294 |
on error.</p> |
| 2295 |
</div> |
| 2296 |
<p class="since">Since: 3.6.3</p> |
| 2297 |
</div> |
| 2298 |
<hr> |
| 2299 |
<div class="refsect2"> |
| 2300 |
<a name="gnutls-pkcs11-token-get-mechanism"></a><h3>gnutls_pkcs11_token_get_mechanism ()</h3> |
| 2301 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2302 |
gnutls_pkcs11_token_get_mechanism (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 2303 |
<em class="parameter"><code>unsigned <span class="type">int</span> idx</code></em>, |
| 2304 |
<em class="parameter"><code>unsigned <span class="type">long</span> *mechanism</code></em>);</pre> |
| 2305 |
<p>This function will return the names of the supported mechanisms |
| 2306 |
by the token. It should be called with an increasing index until |
| 2307 |
it return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE.</p> |
| 2308 |
<div class="refsect3"> |
| 2309 |
<a name="gnutls-pkcs11-token-get-mechanism.parameters"></a><h4>Parameters</h4> |
| 2310 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2311 |
<colgroup> |
| 2312 |
<col width="150px" class="parameters_name"> |
| 2313 |
<col class="parameters_description"> |
| 2314 |
<col width="200px" class="parameters_annotations"> |
| 2315 |
</colgroup> |
| 2316 |
<tbody> |
| 2317 |
<tr> |
| 2318 |
<td class="parameter_name"><p>url</p></td> |
| 2319 |
<td class="parameter_description"><p>should contain a PKCS 11 URL</p></td> |
| 2320 |
<td class="parameter_annotations"> </td> |
| 2321 |
</tr> |
| 2322 |
<tr> |
| 2323 |
<td class="parameter_name"><p>idx</p></td> |
| 2324 |
<td class="parameter_description"><p>The index of the mechanism</p></td> |
| 2325 |
<td class="parameter_annotations"> </td> |
| 2326 |
</tr> |
| 2327 |
<tr> |
| 2328 |
<td class="parameter_name"><p>mechanism</p></td> |
| 2329 |
<td class="parameter_description"><p>The PKCS <span class="type">11</span> mechanism ID</p></td> |
| 2330 |
<td class="parameter_annotations"> </td> |
| 2331 |
</tr> |
| 2332 |
</tbody> |
| 2333 |
</table></div> |
| 2334 |
</div> |
| 2335 |
<div class="refsect3"> |
| 2336 |
<a name="gnutls-pkcs11-token-get-mechanism.returns"></a><h4>Returns</h4> |
| 2337 |
<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success or a negative error code on error.</p> |
| 2338 |
</div> |
| 2339 |
<p class="since">Since: 2.12.0</p> |
| 2340 |
</div> |
| 2341 |
<hr> |
| 2342 |
<div class="refsect2"> |
| 2343 |
<a name="gnutls-pkcs11-token-check-mechanism"></a><h3>gnutls_pkcs11_token_check_mechanism ()</h3> |
| 2344 |
<pre class="programlisting"><span class="returnvalue">unsigned</span> |
| 2345 |
gnutls_pkcs11_token_check_mechanism (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 2346 |
<em class="parameter"><code><span class="type">unsigned long </span> mechanism</code></em>, |
| 2347 |
<em class="parameter"><code><span class="type">void</span> *ptr</code></em>, |
| 2348 |
<em class="parameter"><code><span class="type">unsigned </span> psize</code></em>, |
| 2349 |
<em class="parameter"><code><span class="type">unsigned </span> flags</code></em>);</pre> |
| 2350 |
<p>This function will return whether a mechanism is supported |
| 2351 |
by the given token. If the mechanism is supported and |
| 2352 |
<em class="parameter"><code>ptr</code></em> |
| 2353 |
is set, it will be updated with the token information.</p> |
| 2354 |
<div class="refsect3"> |
| 2355 |
<a name="gnutls-pkcs11-token-check-mechanism.parameters"></a><h4>Parameters</h4> |
| 2356 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2357 |
<colgroup> |
| 2358 |
<col width="150px" class="parameters_name"> |
| 2359 |
<col class="parameters_description"> |
| 2360 |
<col width="200px" class="parameters_annotations"> |
| 2361 |
</colgroup> |
| 2362 |
<tbody> |
| 2363 |
<tr> |
| 2364 |
<td class="parameter_name"><p>url</p></td> |
| 2365 |
<td class="parameter_description"><p>should contain a PKCS 11 URL</p></td> |
| 2366 |
<td class="parameter_annotations"> </td> |
| 2367 |
</tr> |
| 2368 |
<tr> |
| 2369 |
<td class="parameter_name"><p>mechanism</p></td> |
| 2370 |
<td class="parameter_description"><p>The PKCS <span class="type">11</span> mechanism ID</p></td> |
| 2371 |
<td class="parameter_annotations"> </td> |
| 2372 |
</tr> |
| 2373 |
<tr> |
| 2374 |
<td class="parameter_name"><p>ptr</p></td> |
| 2375 |
<td class="parameter_description"><p>if set it should point to a CK_MECHANISM_INFO struct</p></td> |
| 2376 |
<td class="parameter_annotations"> </td> |
| 2377 |
</tr> |
| 2378 |
<tr> |
| 2379 |
<td class="parameter_name"><p>psize</p></td> |
| 2380 |
<td class="parameter_description"><p>the size of CK_MECHANISM_INFO struct (for safety)</p></td> |
| 2381 |
<td class="parameter_annotations"> </td> |
| 2382 |
</tr> |
| 2383 |
<tr> |
| 2384 |
<td class="parameter_name"><p>flags</p></td> |
| 2385 |
<td class="parameter_description"><p>must be zero</p></td> |
| 2386 |
<td class="parameter_annotations"> </td> |
| 2387 |
</tr> |
| 2388 |
</tbody> |
| 2389 |
</table></div> |
| 2390 |
</div> |
| 2391 |
<div class="refsect3"> |
| 2392 |
<a name="gnutls-pkcs11-token-check-mechanism.returns"></a><h4>Returns</h4> |
| 2393 |
<p> Non-zero if the mechanism is supported or zero otherwise.</p> |
| 2394 |
</div> |
| 2395 |
<p class="since">Since: 3.6.0</p> |
| 2396 |
</div> |
| 2397 |
<hr> |
| 2398 |
<div class="refsect2"> |
| 2399 |
<a name="gnutls-pkcs11-token-set-pin"></a><h3>gnutls_pkcs11_token_set_pin ()</h3> |
| 2400 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2401 |
gnutls_pkcs11_token_set_pin (<em class="parameter"><code>const <span class="type">char</span> *token_url</code></em>, |
| 2402 |
<em class="parameter"><code>const <span class="type">char</span> *oldpin</code></em>, |
| 2403 |
<em class="parameter"><code>const <span class="type">char</span> *newpin</code></em>, |
| 2404 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 2405 |
<p>This function will modify or set a user or administrator's PIN for |
| 2406 |
the given token. If it is called to set a PIN for first time |
| 2407 |
the oldpin must be <code class="literal">NULL</code>. When setting the admin's PIN with the |
| 2408 |
<a class="link" href="gnutls-gnutls.html#GNUTLS-PIN-SO:CAPS"><code class="literal">GNUTLS_PIN_SO</code></a> flag, the <em class="parameter"><code>oldpin</code></em> |
| 2409 |
value must be provided (this requirement |
| 2410 |
is relaxed after GnuTLS 3.6.5 since which the PIN will be requested if missing).</p> |
| 2411 |
<div class="refsect3"> |
| 2412 |
<a name="gnutls-pkcs11-token-set-pin.parameters"></a><h4>Parameters</h4> |
| 2413 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2414 |
<colgroup> |
| 2415 |
<col width="150px" class="parameters_name"> |
| 2416 |
<col class="parameters_description"> |
| 2417 |
<col width="200px" class="parameters_annotations"> |
| 2418 |
</colgroup> |
| 2419 |
<tbody> |
| 2420 |
<tr> |
| 2421 |
<td class="parameter_name"><p>token_url</p></td> |
| 2422 |
<td class="parameter_description"><p>A PKCS <span class="type">11</span> URL specifying a token</p></td> |
| 2423 |
<td class="parameter_annotations"> </td> |
| 2424 |
</tr> |
| 2425 |
<tr> |
| 2426 |
<td class="parameter_name"><p>oldpin</p></td> |
| 2427 |
<td class="parameter_description"><p>old user's PIN</p></td> |
| 2428 |
<td class="parameter_annotations"> </td> |
| 2429 |
</tr> |
| 2430 |
<tr> |
| 2431 |
<td class="parameter_name"><p>newpin</p></td> |
| 2432 |
<td class="parameter_description"><p>new user's PIN</p></td> |
| 2433 |
<td class="parameter_annotations"> </td> |
| 2434 |
</tr> |
| 2435 |
<tr> |
| 2436 |
<td class="parameter_name"><p>flags</p></td> |
| 2437 |
<td class="parameter_description"><p>one of <a class="link" href="gnutls-gnutls.html#gnutls-pin-flag-t" title="enum gnutls_pin_flag_t"><span class="type">gnutls_pin_flag_t</span></a>.</p></td> |
| 2438 |
<td class="parameter_annotations"> </td> |
| 2439 |
</tr> |
| 2440 |
</tbody> |
| 2441 |
</table></div> |
| 2442 |
</div> |
| 2443 |
<div class="refsect3"> |
| 2444 |
<a name="gnutls-pkcs11-token-set-pin.returns"></a><h4>Returns</h4> |
| 2445 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 2446 |
negative error value.</p> |
| 2447 |
</div> |
| 2448 |
</div> |
| 2449 |
<hr> |
| 2450 |
<div class="refsect2"> |
| 2451 |
<a name="gnutls-pkcs11-token-get-url"></a><h3>gnutls_pkcs11_token_get_url ()</h3> |
| 2452 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2453 |
gnutls_pkcs11_token_get_url (<em class="parameter"><code>unsigned <span class="type">int</span> seq</code></em>, |
| 2454 |
<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-url-type-t" title="enum gnutls_pkcs11_url_type_t"><span class="type">gnutls_pkcs11_url_type_t</span></a> detailed</code></em>, |
| 2455 |
<em class="parameter"><code><span class="type">char</span> **url</code></em>);</pre> |
| 2456 |
<p>This function will return the URL for each token available |
| 2457 |
in system. The url has to be released using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a></p> |
| 2458 |
<div class="refsect3"> |
| 2459 |
<a name="gnutls-pkcs11-token-get-url.parameters"></a><h4>Parameters</h4> |
| 2460 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2461 |
<colgroup> |
| 2462 |
<col width="150px" class="parameters_name"> |
| 2463 |
<col class="parameters_description"> |
| 2464 |
<col width="200px" class="parameters_annotations"> |
| 2465 |
</colgroup> |
| 2466 |
<tbody> |
| 2467 |
<tr> |
| 2468 |
<td class="parameter_name"><p>seq</p></td> |
| 2469 |
<td class="parameter_description"><p>sequence number starting from 0</p></td> |
| 2470 |
<td class="parameter_annotations"> </td> |
| 2471 |
</tr> |
| 2472 |
<tr> |
| 2473 |
<td class="parameter_name"><p>detailed</p></td> |
| 2474 |
<td class="parameter_description"><p>non zero if a detailed URL is required</p></td> |
| 2475 |
<td class="parameter_annotations"> </td> |
| 2476 |
</tr> |
| 2477 |
<tr> |
| 2478 |
<td class="parameter_name"><p>url</p></td> |
| 2479 |
<td class="parameter_description"><p>will contain an allocated url</p></td> |
| 2480 |
<td class="parameter_annotations"> </td> |
| 2481 |
</tr> |
| 2482 |
</tbody> |
| 2483 |
</table></div> |
| 2484 |
</div> |
| 2485 |
<div class="refsect3"> |
| 2486 |
<a name="gnutls-pkcs11-token-get-url.returns"></a><h4>Returns</h4> |
| 2487 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, |
| 2488 |
<a class="link" href="gnutls-gnutls.html#GNUTLS-E-REQUESTED-DATA-NOT-AVAILABLE:CAPS" title="GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE"><code class="literal">GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE</code></a> if the sequence number |
| 2489 |
exceeds the available tokens, otherwise a negative error value.</p> |
| 2490 |
</div> |
| 2491 |
<p class="since">Since: 2.12.0</p> |
| 2492 |
</div> |
| 2493 |
<hr> |
| 2494 |
<div class="refsect2"> |
| 2495 |
<a name="gnutls-pkcs11-token-get-info"></a><h3>gnutls_pkcs11_token_get_info ()</h3> |
| 2496 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2497 |
gnutls_pkcs11_token_get_info (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 2498 |
<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-token-info-t" title="enum gnutls_pkcs11_token_info_t"><span class="type">gnutls_pkcs11_token_info_t</span></a> ttype</code></em>, |
| 2499 |
<em class="parameter"><code><span class="type">void</span> *output</code></em>, |
| 2500 |
<em class="parameter"><code><span class="type">size_t</span> *output_size</code></em>);</pre> |
| 2501 |
<p>This function will return information about the PKCS 11 token such |
| 2502 |
as the label, id, etc.</p> |
| 2503 |
<p>When output is text, a null terminated string is written to <em class="parameter"><code>output</code></em> |
| 2504 |
and its |
| 2505 |
string length is written to <em class="parameter"><code>output_size</code></em> |
| 2506 |
(without null terminator). If the |
| 2507 |
buffer is too small, <em class="parameter"><code>output_size</code></em> |
| 2508 |
will contain the expected buffer size |
| 2509 |
(with null terminator for text) and return <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SHORT-MEMORY-BUFFER:CAPS" title="GNUTLS_E_SHORT_MEMORY_BUFFER"><code class="literal">GNUTLS_E_SHORT_MEMORY_BUFFER</code></a>.</p> |
| 2510 |
<div class="refsect3"> |
| 2511 |
<a name="gnutls-pkcs11-token-get-info.parameters"></a><h4>Parameters</h4> |
| 2512 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2513 |
<colgroup> |
| 2514 |
<col width="150px" class="parameters_name"> |
| 2515 |
<col class="parameters_description"> |
| 2516 |
<col width="200px" class="parameters_annotations"> |
| 2517 |
</colgroup> |
| 2518 |
<tbody> |
| 2519 |
<tr> |
| 2520 |
<td class="parameter_name"><p>url</p></td> |
| 2521 |
<td class="parameter_description"><p>should contain a PKCS 11 URL</p></td> |
| 2522 |
<td class="parameter_annotations"> </td> |
| 2523 |
</tr> |
| 2524 |
<tr> |
| 2525 |
<td class="parameter_name"><p>ttype</p></td> |
| 2526 |
<td class="parameter_description"><p>Denotes the type of information requested</p></td> |
| 2527 |
<td class="parameter_annotations"> </td> |
| 2528 |
</tr> |
| 2529 |
<tr> |
| 2530 |
<td class="parameter_name"><p>output</p></td> |
| 2531 |
<td class="parameter_description"><p>where output will be stored</p></td> |
| 2532 |
<td class="parameter_annotations"> </td> |
| 2533 |
</tr> |
| 2534 |
<tr> |
| 2535 |
<td class="parameter_name"><p>output_size</p></td> |
| 2536 |
<td class="parameter_description"><p>contains the maximum size of the output buffer and will be |
| 2537 |
overwritten with the actual size.</p></td> |
| 2538 |
<td class="parameter_annotations"> </td> |
| 2539 |
</tr> |
| 2540 |
</tbody> |
| 2541 |
</table></div> |
| 2542 |
</div> |
| 2543 |
<div class="refsect3"> |
| 2544 |
<a name="gnutls-pkcs11-token-get-info.returns"></a><h4>Returns</h4> |
| 2545 |
<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success or a negative error code |
| 2546 |
on error.</p> |
| 2547 |
</div> |
| 2548 |
<p class="since">Since: 2.12.0</p> |
| 2549 |
</div> |
| 2550 |
<hr> |
| 2551 |
<div class="refsect2"> |
| 2552 |
<a name="gnutls-pkcs11-token-get-flags"></a><h3>gnutls_pkcs11_token_get_flags ()</h3> |
| 2553 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2554 |
gnutls_pkcs11_token_get_flags (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 2555 |
<em class="parameter"><code>unsigned <span class="type">int</span> *flags</code></em>);</pre> |
| 2556 |
<p>This function will return information about the PKCS 11 token flags.</p> |
| 2557 |
<p>The supported flags are: <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-HW:CAPS" title="GNUTLS_PKCS11_TOKEN_HW"><code class="literal">GNUTLS_PKCS11_TOKEN_HW</code></a> and <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-TOKEN-TRUSTED:CAPS" title="GNUTLS_PKCS11_TOKEN_TRUSTED"><code class="literal">GNUTLS_PKCS11_TOKEN_TRUSTED</code></a>.</p> |
| 2558 |
<div class="refsect3"> |
| 2559 |
<a name="gnutls-pkcs11-token-get-flags.parameters"></a><h4>Parameters</h4> |
| 2560 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2561 |
<colgroup> |
| 2562 |
<col width="150px" class="parameters_name"> |
| 2563 |
<col class="parameters_description"> |
| 2564 |
<col width="200px" class="parameters_annotations"> |
| 2565 |
</colgroup> |
| 2566 |
<tbody> |
| 2567 |
<tr> |
| 2568 |
<td class="parameter_name"><p>url</p></td> |
| 2569 |
<td class="parameter_description"><p>should contain a PKCS 11 URL</p></td> |
| 2570 |
<td class="parameter_annotations"> </td> |
| 2571 |
</tr> |
| 2572 |
<tr> |
| 2573 |
<td class="parameter_name"><p>flags</p></td> |
| 2574 |
<td class="parameter_description"><p>The output flags (GNUTLS_PKCS11_TOKEN_*)</p></td> |
| 2575 |
<td class="parameter_annotations"> </td> |
| 2576 |
</tr> |
| 2577 |
</tbody> |
| 2578 |
</table></div> |
| 2579 |
</div> |
| 2580 |
<div class="refsect3"> |
| 2581 |
<a name="gnutls-pkcs11-token-get-flags.returns"></a><h4>Returns</h4> |
| 2582 |
<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success or a negative error code on error.</p> |
| 2583 |
</div> |
| 2584 |
<p class="since">Since: 2.12.0</p> |
| 2585 |
</div> |
| 2586 |
<hr> |
| 2587 |
<div class="refsect2"> |
| 2588 |
<a name="gnutls-pkcs11-obj-list-import-url"></a><h3>gnutls_pkcs11_obj_list_import_url()</h3> |
| 2589 |
<pre class="programlisting">#define gnutls_pkcs11_obj_list_import_url(p_list, n_list, url, attrs, flags)</pre> |
| 2590 |
</div> |
| 2591 |
<hr> |
| 2592 |
<div class="refsect2"> |
| 2593 |
<a name="gnutls-pkcs11-obj-list-import-url2"></a><h3>gnutls_pkcs11_obj_list_import_url2()</h3> |
| 2594 |
<pre class="programlisting">#define gnutls_pkcs11_obj_list_import_url2(p_list, n_list, url, attrs, flags)</pre> |
| 2595 |
</div> |
| 2596 |
<hr> |
| 2597 |
<div class="refsect2"> |
| 2598 |
<a name="gnutls-pkcs11-obj-list-import-url3"></a><h3>gnutls_pkcs11_obj_list_import_url3 ()</h3> |
| 2599 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2600 |
gnutls_pkcs11_obj_list_import_url3 (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> *p_list</code></em>, |
| 2601 |
<em class="parameter"><code>unsigned <span class="type">int</span> *const n_list</code></em>, |
| 2602 |
<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 2603 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 2604 |
<p>This function will initialize and set values to an object list |
| 2605 |
by using all objects identified by a PKCS 11 URL.</p> |
| 2606 |
<p>This function will enumerate all the objects specified by the PKCS<span class="type">11</span> URL |
| 2607 |
provided. It expects an already allocated <em class="parameter"><code>p_list</code></em> |
| 2608 |
which has *<em class="parameter"><code>n_list</code></em> |
| 2609 |
elements, |
| 2610 |
and that value will be updated to the actual number of present objects. The |
| 2611 |
<em class="parameter"><code>p_list</code></em> |
| 2612 |
objects will be initialized and set by this function. |
| 2613 |
To obtain a list of all available objects use a <em class="parameter"><code>url</code></em> |
| 2614 |
of 'pkcs11:'.</p> |
| 2615 |
<p>All returned objects must be deinitialized using <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-deinit" title="gnutls_pkcs11_obj_deinit ()"><code class="function">gnutls_pkcs11_obj_deinit()</code></a>.</p> |
| 2616 |
<p>The supported in this function <em class="parameter"><code>flags</code></em> |
| 2617 |
are <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-LOGIN:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_LOGIN</code></a>, |
| 2618 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-LOGIN-SO:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO</code></a>, <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-PRESENT-IN-TRUSTED-MODULE:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_PRESENT_IN_TRUSTED_MODULE</code></a>, |
| 2619 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-CRT:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_CRT</code></a>, <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-PUBKEY:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_PUBKEY</code></a>, <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-PRIVKEY:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_PRIVKEY</code></a>, |
| 2620 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-WITH-PRIVKEY:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_WITH_PRIVKEY</code></a>, <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-CA:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_CA</code></a>, |
| 2621 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-TRUSTED:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED</code></a>, and since 3.5.1 the <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-OVERWRITE-TRUSTMOD-EXT:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_OVERWRITE_TRUSTMOD_EXT</code></a>.</p> |
| 2622 |
<p>On versions of GnuTLS prior to 3.4.0 the equivalent function was |
| 2623 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-list-import-url" title="gnutls_pkcs11_obj_list_import_url()"><code class="function">gnutls_pkcs11_obj_list_import_url()</code></a>. That is also available on this version |
| 2624 |
as a macro which maps to this function.</p> |
| 2625 |
<div class="refsect3"> |
| 2626 |
<a name="gnutls-pkcs11-obj-list-import-url3.parameters"></a><h4>Parameters</h4> |
| 2627 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2628 |
<colgroup> |
| 2629 |
<col width="150px" class="parameters_name"> |
| 2630 |
<col class="parameters_description"> |
| 2631 |
<col width="200px" class="parameters_annotations"> |
| 2632 |
</colgroup> |
| 2633 |
<tbody> |
| 2634 |
<tr> |
| 2635 |
<td class="parameter_name"><p>p_list</p></td> |
| 2636 |
<td class="parameter_description"><p>An uninitialized object list (may be <code class="literal">NULL</code>)</p></td> |
| 2637 |
<td class="parameter_annotations"> </td> |
| 2638 |
</tr> |
| 2639 |
<tr> |
| 2640 |
<td class="parameter_name"><p>n_list</p></td> |
| 2641 |
<td class="parameter_description"><p>Initially should hold the maximum size of the list. Will contain the actual size.</p></td> |
| 2642 |
<td class="parameter_annotations"> </td> |
| 2643 |
</tr> |
| 2644 |
<tr> |
| 2645 |
<td class="parameter_name"><p>url</p></td> |
| 2646 |
<td class="parameter_description"><p>A PKCS 11 url identifying a set of objects</p></td> |
| 2647 |
<td class="parameter_annotations"> </td> |
| 2648 |
</tr> |
| 2649 |
<tr> |
| 2650 |
<td class="parameter_name"><p>flags</p></td> |
| 2651 |
<td class="parameter_description"><p>Or sequence of GNUTLS_PKCS11_OBJ_* flags</p></td> |
| 2652 |
<td class="parameter_annotations"> </td> |
| 2653 |
</tr> |
| 2654 |
</tbody> |
| 2655 |
</table></div> |
| 2656 |
</div> |
| 2657 |
<div class="refsect3"> |
| 2658 |
<a name="gnutls-pkcs11-obj-list-import-url3.returns"></a><h4>Returns</h4> |
| 2659 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 2660 |
negative error value.</p> |
| 2661 |
</div> |
| 2662 |
<p class="since">Since: 3.4.0</p> |
| 2663 |
</div> |
| 2664 |
<hr> |
| 2665 |
<div class="refsect2"> |
| 2666 |
<a name="gnutls-pkcs11-obj-list-import-url4"></a><h3>gnutls_pkcs11_obj_list_import_url4 ()</h3> |
| 2667 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2668 |
gnutls_pkcs11_obj_list_import_url4 (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> **p_list</code></em>, |
| 2669 |
<em class="parameter"><code>unsigned <span class="type">int</span> *n_list</code></em>, |
| 2670 |
<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 2671 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 2672 |
<p>This function will enumerate all the objects specified by the PKCS<span class="type">11</span> URL |
| 2673 |
provided. It will initialize and set values to the object pointer list (<em class="parameter"><code>p_list</code></em> |
| 2674 |
) |
| 2675 |
provided. To obtain a list of all available objects use a <em class="parameter"><code>url</code></em> |
| 2676 |
of 'pkcs11:'.</p> |
| 2677 |
<p>All returned objects must be deinitialized using <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-deinit" title="gnutls_pkcs11_obj_deinit ()"><code class="function">gnutls_pkcs11_obj_deinit()</code></a>, |
| 2678 |
and <em class="parameter"><code>p_list</code></em> |
| 2679 |
must be deinitialized using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p> |
| 2680 |
<p>The supported in this function <em class="parameter"><code>flags</code></em> |
| 2681 |
are <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-LOGIN:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_LOGIN</code></a>, |
| 2682 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-LOGIN-SO:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO</code></a>, <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-PRESENT-IN-TRUSTED-MODULE:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_PRESENT_IN_TRUSTED_MODULE</code></a>, |
| 2683 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-CRT:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_CRT</code></a>, <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-PUBKEY:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_PUBKEY</code></a>, <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-PRIVKEY:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_PRIVKEY</code></a>, |
| 2684 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-WITH-PRIVKEY:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_WITH_PRIVKEY</code></a>, <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-CA:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_CA</code></a>, |
| 2685 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-TRUSTED:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED</code></a>, and since 3.5.1 the <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-OVERWRITE-TRUSTMOD-EXT:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_OVERWRITE_TRUSTMOD_EXT</code></a>.</p> |
| 2686 |
<p>On versions of GnuTLS prior to 3.4.0 the equivalent function was |
| 2687 |
<a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-list-import-url2" title="gnutls_pkcs11_obj_list_import_url2()"><code class="function">gnutls_pkcs11_obj_list_import_url2()</code></a>. That is also available on this version |
| 2688 |
as a macro which maps to this function.</p> |
| 2689 |
<div class="refsect3"> |
| 2690 |
<a name="gnutls-pkcs11-obj-list-import-url4.parameters"></a><h4>Parameters</h4> |
| 2691 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2692 |
<colgroup> |
| 2693 |
<col width="150px" class="parameters_name"> |
| 2694 |
<col class="parameters_description"> |
| 2695 |
<col width="200px" class="parameters_annotations"> |
| 2696 |
</colgroup> |
| 2697 |
<tbody> |
| 2698 |
<tr> |
| 2699 |
<td class="parameter_name"><p>p_list</p></td> |
| 2700 |
<td class="parameter_description"><p>An uninitialized object list (may be NULL)</p></td> |
| 2701 |
<td class="parameter_annotations"> </td> |
| 2702 |
</tr> |
| 2703 |
<tr> |
| 2704 |
<td class="parameter_name"><p>n_list</p></td> |
| 2705 |
<td class="parameter_description"><p>It will contain the size of the list.</p></td> |
| 2706 |
<td class="parameter_annotations"> </td> |
| 2707 |
</tr> |
| 2708 |
<tr> |
| 2709 |
<td class="parameter_name"><p>url</p></td> |
| 2710 |
<td class="parameter_description"><p>A PKCS 11 url identifying a set of objects</p></td> |
| 2711 |
<td class="parameter_annotations"> </td> |
| 2712 |
</tr> |
| 2713 |
<tr> |
| 2714 |
<td class="parameter_name"><p>flags</p></td> |
| 2715 |
<td class="parameter_description"><p>Or sequence of GNUTLS_PKCS11_OBJ_* flags</p></td> |
| 2716 |
<td class="parameter_annotations"> </td> |
| 2717 |
</tr> |
| 2718 |
</tbody> |
| 2719 |
</table></div> |
| 2720 |
</div> |
| 2721 |
<div class="refsect3"> |
| 2722 |
<a name="gnutls-pkcs11-obj-list-import-url4.returns"></a><h4>Returns</h4> |
| 2723 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 2724 |
negative error value.</p> |
| 2725 |
</div> |
| 2726 |
<p class="since">Since: 3.4.0</p> |
| 2727 |
</div> |
| 2728 |
<hr> |
| 2729 |
<div class="refsect2"> |
| 2730 |
<a name="gnutls-x509-crt-import-pkcs11"></a><h3>gnutls_x509_crt_import_pkcs11 ()</h3> |
| 2731 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2732 |
gnutls_x509_crt_import_pkcs11 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>, |
| 2733 |
<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> pkcs11_crt</code></em>);</pre> |
| 2734 |
<p>This function will import a PKCS 11 certificate to a <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> |
| 2735 |
structure.</p> |
| 2736 |
<div class="refsect3"> |
| 2737 |
<a name="gnutls-x509-crt-import-pkcs11.parameters"></a><h4>Parameters</h4> |
| 2738 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2739 |
<colgroup> |
| 2740 |
<col width="150px" class="parameters_name"> |
| 2741 |
<col class="parameters_description"> |
| 2742 |
<col width="200px" class="parameters_annotations"> |
| 2743 |
</colgroup> |
| 2744 |
<tbody> |
| 2745 |
<tr> |
| 2746 |
<td class="parameter_name"><p>crt</p></td> |
| 2747 |
<td class="parameter_description"><p>A certificate of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td> |
| 2748 |
<td class="parameter_annotations"> </td> |
| 2749 |
</tr> |
| 2750 |
<tr> |
| 2751 |
<td class="parameter_name"><p>pkcs11_crt</p></td> |
| 2752 |
<td class="parameter_description"><p>A PKCS 11 object that contains a certificate</p></td> |
| 2753 |
<td class="parameter_annotations"> </td> |
| 2754 |
</tr> |
| 2755 |
</tbody> |
| 2756 |
</table></div> |
| 2757 |
</div> |
| 2758 |
<div class="refsect3"> |
| 2759 |
<a name="gnutls-x509-crt-import-pkcs11.returns"></a><h4>Returns</h4> |
| 2760 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 2761 |
negative error value.</p> |
| 2762 |
</div> |
| 2763 |
<p class="since">Since: 2.12.0</p> |
| 2764 |
</div> |
| 2765 |
<hr> |
| 2766 |
<div class="refsect2"> |
| 2767 |
<a name="gnutls-pkcs11-type-get-name"></a><h3>gnutls_pkcs11_type_get_name ()</h3> |
| 2768 |
<pre class="programlisting">const <span class="returnvalue">char</span> * |
| 2769 |
gnutls_pkcs11_type_get_name (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-type-t" title="enum gnutls_pkcs11_obj_type_t"><span class="type">gnutls_pkcs11_obj_type_t</span></a> type</code></em>);</pre> |
| 2770 |
<p>This function will return a human readable description of the |
| 2771 |
PKCS11 object type <em class="parameter"><code>obj</code></em> |
| 2772 |
. It will return "Unknown" for unknown |
| 2773 |
types.</p> |
| 2774 |
<div class="refsect3"> |
| 2775 |
<a name="gnutls-pkcs11-type-get-name.parameters"></a><h4>Parameters</h4> |
| 2776 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2777 |
<colgroup> |
| 2778 |
<col width="150px" class="parameters_name"> |
| 2779 |
<col class="parameters_description"> |
| 2780 |
<col width="200px" class="parameters_annotations"> |
| 2781 |
</colgroup> |
| 2782 |
<tbody><tr> |
| 2783 |
<td class="parameter_name"><p>type</p></td> |
| 2784 |
<td class="parameter_description"><p>Holds the PKCS 11 object type, a <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-type-t" title="enum gnutls_pkcs11_obj_type_t"><span class="type">gnutls_pkcs11_obj_type_t</span></a>.</p></td> |
| 2785 |
<td class="parameter_annotations"> </td> |
| 2786 |
</tr></tbody> |
| 2787 |
</table></div> |
| 2788 |
</div> |
| 2789 |
<div class="refsect3"> |
| 2790 |
<a name="gnutls-pkcs11-type-get-name.returns"></a><h4>Returns</h4> |
| 2791 |
<p> human readable string labeling the PKCS11 object type |
| 2792 |
<em class="parameter"><code>type</code></em> |
| 2793 |
.</p> |
| 2794 |
</div> |
| 2795 |
<p class="since">Since: 2.12.0</p> |
| 2796 |
</div> |
| 2797 |
<hr> |
| 2798 |
<div class="refsect2"> |
| 2799 |
<a name="gnutls-pkcs11-obj-get-exts"></a><h3>gnutls_pkcs11_obj_get_exts ()</h3> |
| 2800 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2801 |
gnutls_pkcs11_obj_get_exts (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> obj</code></em>, |
| 2802 |
<em class="parameter"><code><span class="type">struct gnutls_x509_ext_st</span> **exts</code></em>, |
| 2803 |
<em class="parameter"><code>unsigned <span class="type">int</span> *exts_size</code></em>, |
| 2804 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 2805 |
<p>This function will return information about attached extensions |
| 2806 |
that associate to the provided object (which should be a certificate). |
| 2807 |
The extensions are the attached p11-kit trust module extensions.</p> |
| 2808 |
<p>Each element of <em class="parameter"><code>exts</code></em> |
| 2809 |
must be deinitialized using <a class="link" href="gnutls-x509.html#gnutls-x509-ext-deinit" title="gnutls_x509_ext_deinit ()"><code class="function">gnutls_x509_ext_deinit()</code></a> |
| 2810 |
while <em class="parameter"><code>exts</code></em> |
| 2811 |
should be deallocated using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p> |
| 2812 |
<div class="refsect3"> |
| 2813 |
<a name="gnutls-pkcs11-obj-get-exts.parameters"></a><h4>Parameters</h4> |
| 2814 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2815 |
<colgroup> |
| 2816 |
<col width="150px" class="parameters_name"> |
| 2817 |
<col class="parameters_description"> |
| 2818 |
<col width="200px" class="parameters_annotations"> |
| 2819 |
</colgroup> |
| 2820 |
<tbody> |
| 2821 |
<tr> |
| 2822 |
<td class="parameter_name"><p>obj</p></td> |
| 2823 |
<td class="parameter_description"><p>should contain a <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> type</p></td> |
| 2824 |
<td class="parameter_annotations"> </td> |
| 2825 |
</tr> |
| 2826 |
<tr> |
| 2827 |
<td class="parameter_name"><p>exts</p></td> |
| 2828 |
<td class="parameter_description"><p>a pointer to a <a class="link" href="gnutls-x509.html#gnutls-x509-ext-st" title="gnutls_x509_ext_st"><code class="literal">gnutls_x509_ext_st</code></a> pointer</p></td> |
| 2829 |
<td class="parameter_annotations"> </td> |
| 2830 |
</tr> |
| 2831 |
<tr> |
| 2832 |
<td class="parameter_name"><p>exts_size</p></td> |
| 2833 |
<td class="parameter_description"><p>will be updated with the number of <em class="parameter"><code>exts</code></em> |
| 2834 |
</p></td> |
| 2835 |
<td class="parameter_annotations"> </td> |
| 2836 |
</tr> |
| 2837 |
<tr> |
| 2838 |
<td class="parameter_name"><p>flags</p></td> |
| 2839 |
<td class="parameter_description"><p>Or sequence of <code class="literal">GNUTLS_PKCS11_OBJ_</code>* flags </p></td> |
| 2840 |
<td class="parameter_annotations"> </td> |
| 2841 |
</tr> |
| 2842 |
</tbody> |
| 2843 |
</table></div> |
| 2844 |
</div> |
| 2845 |
<div class="refsect3"> |
| 2846 |
<a name="gnutls-pkcs11-obj-get-exts.returns"></a><h4>Returns</h4> |
| 2847 |
<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success or a negative error code on error.</p> |
| 2848 |
</div> |
| 2849 |
<p class="since">Since: 3.3.8</p> |
| 2850 |
</div> |
| 2851 |
<hr> |
| 2852 |
<div class="refsect2"> |
| 2853 |
<a name="gnutls-pkcs11-obj-get-flags"></a><h3>gnutls_pkcs11_obj_get_flags ()</h3> |
| 2854 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2855 |
gnutls_pkcs11_obj_get_flags (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> obj</code></em>, |
| 2856 |
<em class="parameter"><code>unsigned <span class="type">int</span> *oflags</code></em>);</pre> |
| 2857 |
<p>This function will return the flags of the object. |
| 2858 |
The <em class="parameter"><code>oflags</code></em> |
| 2859 |
will be flags from <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-flags" title="enum gnutls_pkcs11_obj_flags"><code class="literal">gnutls_pkcs11_obj_flags</code></a>. That is, |
| 2860 |
the <code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_</code>* flags.</p> |
| 2861 |
<div class="refsect3"> |
| 2862 |
<a name="gnutls-pkcs11-obj-get-flags.parameters"></a><h4>Parameters</h4> |
| 2863 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2864 |
<colgroup> |
| 2865 |
<col width="150px" class="parameters_name"> |
| 2866 |
<col class="parameters_description"> |
| 2867 |
<col width="200px" class="parameters_annotations"> |
| 2868 |
</colgroup> |
| 2869 |
<tbody> |
| 2870 |
<tr> |
| 2871 |
<td class="parameter_name"><p>obj</p></td> |
| 2872 |
<td class="parameter_description"><p>The pkcs11 object</p></td> |
| 2873 |
<td class="parameter_annotations"> </td> |
| 2874 |
</tr> |
| 2875 |
<tr> |
| 2876 |
<td class="parameter_name"><p>oflags</p></td> |
| 2877 |
<td class="parameter_description"><p>Will hold the output flags</p></td> |
| 2878 |
<td class="parameter_annotations"> </td> |
| 2879 |
</tr> |
| 2880 |
</tbody> |
| 2881 |
</table></div> |
| 2882 |
</div> |
| 2883 |
<div class="refsect3"> |
| 2884 |
<a name="gnutls-pkcs11-obj-get-flags.returns"></a><h4>Returns</h4> |
| 2885 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 2886 |
negative error value.</p> |
| 2887 |
</div> |
| 2888 |
<p class="since">Since: 3.3.7</p> |
| 2889 |
</div> |
| 2890 |
<hr> |
| 2891 |
<div class="refsect2"> |
| 2892 |
<a name="gnutls-pkcs11-obj-flags-get-str"></a><h3>gnutls_pkcs11_obj_flags_get_str ()</h3> |
| 2893 |
<pre class="programlisting"><span class="returnvalue">char</span> * |
| 2894 |
gnutls_pkcs11_obj_flags_get_str (<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 2895 |
<p>This function given an or-sequence of <code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK</code>, |
| 2896 |
will return an allocated string with its description. The string |
| 2897 |
needs to be deallocated using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p> |
| 2898 |
<div class="refsect3"> |
| 2899 |
<a name="gnutls-pkcs11-obj-flags-get-str.parameters"></a><h4>Parameters</h4> |
| 2900 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2901 |
<colgroup> |
| 2902 |
<col width="150px" class="parameters_name"> |
| 2903 |
<col class="parameters_description"> |
| 2904 |
<col width="200px" class="parameters_annotations"> |
| 2905 |
</colgroup> |
| 2906 |
<tbody><tr> |
| 2907 |
<td class="parameter_name"><p>flags</p></td> |
| 2908 |
<td class="parameter_description"><p>holds the flags</p></td> |
| 2909 |
<td class="parameter_annotations"> </td> |
| 2910 |
</tr></tbody> |
| 2911 |
</table></div> |
| 2912 |
</div> |
| 2913 |
<div class="refsect3"> |
| 2914 |
<a name="gnutls-pkcs11-obj-flags-get-str.returns"></a><h4>Returns</h4> |
| 2915 |
<p> If flags is zero <code class="literal">NULL</code> is returned, otherwise an allocated string.</p> |
| 2916 |
</div> |
| 2917 |
<p class="since">Since: 3.3.7</p> |
| 2918 |
</div> |
| 2919 |
<hr> |
| 2920 |
<div class="refsect2"> |
| 2921 |
<a name="gnutls-x509-crt-list-import-pkcs11"></a><h3>gnutls_x509_crt_list_import_pkcs11 ()</h3> |
| 2922 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2923 |
gnutls_x509_crt_list_import_pkcs11 (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> *certs</code></em>, |
| 2924 |
<em class="parameter"><code>unsigned <span class="type">int</span> cert_max</code></em>, |
| 2925 |
<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> *const objs</code></em>, |
| 2926 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 2927 |
<p>This function will import a PKCS 11 certificate list to a list of |
| 2928 |
<a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> type. These must not be initialized.</p> |
| 2929 |
<div class="refsect3"> |
| 2930 |
<a name="gnutls-x509-crt-list-import-pkcs11.parameters"></a><h4>Parameters</h4> |
| 2931 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2932 |
<colgroup> |
| 2933 |
<col width="150px" class="parameters_name"> |
| 2934 |
<col class="parameters_description"> |
| 2935 |
<col width="200px" class="parameters_annotations"> |
| 2936 |
</colgroup> |
| 2937 |
<tbody> |
| 2938 |
<tr> |
| 2939 |
<td class="parameter_name"><p>certs</p></td> |
| 2940 |
<td class="parameter_description"><p>A list of certificates of type <a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a></p></td> |
| 2941 |
<td class="parameter_annotations"> </td> |
| 2942 |
</tr> |
| 2943 |
<tr> |
| 2944 |
<td class="parameter_name"><p>cert_max</p></td> |
| 2945 |
<td class="parameter_description"><p>The maximum size of the list</p></td> |
| 2946 |
<td class="parameter_annotations"> </td> |
| 2947 |
</tr> |
| 2948 |
<tr> |
| 2949 |
<td class="parameter_name"><p>objs</p></td> |
| 2950 |
<td class="parameter_description"><p>A list of PKCS 11 objects</p></td> |
| 2951 |
<td class="parameter_annotations"> </td> |
| 2952 |
</tr> |
| 2953 |
<tr> |
| 2954 |
<td class="parameter_name"><p>flags</p></td> |
| 2955 |
<td class="parameter_description"><p>0 for now</p></td> |
| 2956 |
<td class="parameter_annotations"> </td> |
| 2957 |
</tr> |
| 2958 |
</tbody> |
| 2959 |
</table></div> |
| 2960 |
</div> |
| 2961 |
<div class="refsect3"> |
| 2962 |
<a name="gnutls-x509-crt-list-import-pkcs11.returns"></a><h4>Returns</h4> |
| 2963 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 2964 |
negative error value.</p> |
| 2965 |
</div> |
| 2966 |
<p class="since">Since: 2.12.0</p> |
| 2967 |
</div> |
| 2968 |
<hr> |
| 2969 |
<div class="refsect2"> |
| 2970 |
<a name="gnutls-pkcs11-privkey-init"></a><h3>gnutls_pkcs11_privkey_init ()</h3> |
| 2971 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 2972 |
gnutls_pkcs11_privkey_init (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a> *key</code></em>);</pre> |
| 2973 |
<p>This function will initialize an private key structure. This |
| 2974 |
structure can be used for accessing an underlying PKCS<span class="type">11</span> object.</p> |
| 2975 |
<p>In versions of GnuTLS later than 3.5.11 the object is protected |
| 2976 |
using locks and a single <a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><code class="literal">gnutls_pkcs11_privkey_t</code></a> can be re-used |
| 2977 |
by many threads. However, for performance it is recommended to utilize |
| 2978 |
one object per key per thread.</p> |
| 2979 |
<div class="refsect3"> |
| 2980 |
<a name="gnutls-pkcs11-privkey-init.parameters"></a><h4>Parameters</h4> |
| 2981 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 2982 |
<colgroup> |
| 2983 |
<col width="150px" class="parameters_name"> |
| 2984 |
<col class="parameters_description"> |
| 2985 |
<col width="200px" class="parameters_annotations"> |
| 2986 |
</colgroup> |
| 2987 |
<tbody><tr> |
| 2988 |
<td class="parameter_name"><p>key</p></td> |
| 2989 |
<td class="parameter_description"><p>A pointer to the type to be initialized</p></td> |
| 2990 |
<td class="parameter_annotations"> </td> |
| 2991 |
</tr></tbody> |
| 2992 |
</table></div> |
| 2993 |
</div> |
| 2994 |
<div class="refsect3"> |
| 2995 |
<a name="gnutls-pkcs11-privkey-init.returns"></a><h4>Returns</h4> |
| 2996 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 2997 |
negative error value.</p> |
| 2998 |
</div> |
| 2999 |
</div> |
| 3000 |
<hr> |
| 3001 |
<div class="refsect2"> |
| 3002 |
<a name="gnutls-pkcs11-privkey-cpy"></a><h3>gnutls_pkcs11_privkey_cpy ()</h3> |
| 3003 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 3004 |
gnutls_pkcs11_privkey_cpy (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a> dst</code></em>, |
| 3005 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a> src</code></em>);</pre> |
| 3006 |
<p>This function will copy a private key from source to destination |
| 3007 |
key. Destination has to be initialized.</p> |
| 3008 |
<div class="refsect3"> |
| 3009 |
<a name="gnutls-pkcs11-privkey-cpy.parameters"></a><h4>Parameters</h4> |
| 3010 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3011 |
<colgroup> |
| 3012 |
<col width="150px" class="parameters_name"> |
| 3013 |
<col class="parameters_description"> |
| 3014 |
<col width="200px" class="parameters_annotations"> |
| 3015 |
</colgroup> |
| 3016 |
<tbody> |
| 3017 |
<tr> |
| 3018 |
<td class="parameter_name"><p>dst</p></td> |
| 3019 |
<td class="parameter_description"><p>The destination key, which should be initialized.</p></td> |
| 3020 |
<td class="parameter_annotations"> </td> |
| 3021 |
</tr> |
| 3022 |
<tr> |
| 3023 |
<td class="parameter_name"><p>src</p></td> |
| 3024 |
<td class="parameter_description"><p>The source key</p></td> |
| 3025 |
<td class="parameter_annotations"> </td> |
| 3026 |
</tr> |
| 3027 |
</tbody> |
| 3028 |
</table></div> |
| 3029 |
</div> |
| 3030 |
<div class="refsect3"> |
| 3031 |
<a name="gnutls-pkcs11-privkey-cpy.returns"></a><h4>Returns</h4> |
| 3032 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 3033 |
negative error value.</p> |
| 3034 |
</div> |
| 3035 |
<p class="since">Since: 3.4.0</p> |
| 3036 |
</div> |
| 3037 |
<hr> |
| 3038 |
<div class="refsect2"> |
| 3039 |
<a name="gnutls-pkcs11-privkey-set-pin-function"></a><h3>gnutls_pkcs11_privkey_set_pin_function ()</h3> |
| 3040 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 3041 |
gnutls_pkcs11_privkey_set_pin_function |
| 3042 |
(<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a> key</code></em>, |
| 3043 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pin-callback-t" title="gnutls_pin_callback_t ()"><span class="type">gnutls_pin_callback_t</span></a> fn</code></em>, |
| 3044 |
<em class="parameter"><code><span class="type">void</span> *userdata</code></em>);</pre> |
| 3045 |
<p>This function will set a callback function to be used when |
| 3046 |
required to access the object. This function overrides the global |
| 3047 |
set using <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-set-pin-function" title="gnutls_pkcs11_set_pin_function ()"><code class="function">gnutls_pkcs11_set_pin_function()</code></a>.</p> |
| 3048 |
<div class="refsect3"> |
| 3049 |
<a name="gnutls-pkcs11-privkey-set-pin-function.parameters"></a><h4>Parameters</h4> |
| 3050 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3051 |
<colgroup> |
| 3052 |
<col width="150px" class="parameters_name"> |
| 3053 |
<col class="parameters_description"> |
| 3054 |
<col width="200px" class="parameters_annotations"> |
| 3055 |
</colgroup> |
| 3056 |
<tbody> |
| 3057 |
<tr> |
| 3058 |
<td class="parameter_name"><p>key</p></td> |
| 3059 |
<td class="parameter_description"><p>The private key</p></td> |
| 3060 |
<td class="parameter_annotations"> </td> |
| 3061 |
</tr> |
| 3062 |
<tr> |
| 3063 |
<td class="parameter_name"><p>fn</p></td> |
| 3064 |
<td class="parameter_description"><p>the callback</p></td> |
| 3065 |
<td class="parameter_annotations"> </td> |
| 3066 |
</tr> |
| 3067 |
<tr> |
| 3068 |
<td class="parameter_name"><p>userdata</p></td> |
| 3069 |
<td class="parameter_description"><p>data associated with the callback</p></td> |
| 3070 |
<td class="parameter_annotations"> </td> |
| 3071 |
</tr> |
| 3072 |
</tbody> |
| 3073 |
</table></div> |
| 3074 |
</div> |
| 3075 |
<p class="since">Since: 3.1.0</p> |
| 3076 |
</div> |
| 3077 |
<hr> |
| 3078 |
<div class="refsect2"> |
| 3079 |
<a name="gnutls-pkcs11-privkey-deinit"></a><h3>gnutls_pkcs11_privkey_deinit ()</h3> |
| 3080 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 3081 |
gnutls_pkcs11_privkey_deinit (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a> key</code></em>);</pre> |
| 3082 |
<p>This function will deinitialize a private key structure.</p> |
| 3083 |
<div class="refsect3"> |
| 3084 |
<a name="gnutls-pkcs11-privkey-deinit.parameters"></a><h4>Parameters</h4> |
| 3085 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3086 |
<colgroup> |
| 3087 |
<col width="150px" class="parameters_name"> |
| 3088 |
<col class="parameters_description"> |
| 3089 |
<col width="200px" class="parameters_annotations"> |
| 3090 |
</colgroup> |
| 3091 |
<tbody><tr> |
| 3092 |
<td class="parameter_name"><p>key</p></td> |
| 3093 |
<td class="parameter_description"><p>the key to be deinitialized</p></td> |
| 3094 |
<td class="parameter_annotations"> </td> |
| 3095 |
</tr></tbody> |
| 3096 |
</table></div> |
| 3097 |
</div> |
| 3098 |
</div> |
| 3099 |
<hr> |
| 3100 |
<div class="refsect2"> |
| 3101 |
<a name="gnutls-pkcs11-privkey-get-pk-algorithm"></a><h3>gnutls_pkcs11_privkey_get_pk_algorithm ()</h3> |
| 3102 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 3103 |
gnutls_pkcs11_privkey_get_pk_algorithm |
| 3104 |
(<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a> key</code></em>, |
| 3105 |
<em class="parameter"><code>unsigned <span class="type">int</span> *bits</code></em>);</pre> |
| 3106 |
<p>This function will return the public key algorithm of a private |
| 3107 |
key.</p> |
| 3108 |
<div class="refsect3"> |
| 3109 |
<a name="gnutls-pkcs11-privkey-get-pk-algorithm.parameters"></a><h4>Parameters</h4> |
| 3110 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3111 |
<colgroup> |
| 3112 |
<col width="150px" class="parameters_name"> |
| 3113 |
<col class="parameters_description"> |
| 3114 |
<col width="200px" class="parameters_annotations"> |
| 3115 |
</colgroup> |
| 3116 |
<tbody> |
| 3117 |
<tr> |
| 3118 |
<td class="parameter_name"><p>key</p></td> |
| 3119 |
<td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a> type</p></td> |
| 3120 |
<td class="parameter_annotations"> </td> |
| 3121 |
</tr> |
| 3122 |
<tr> |
| 3123 |
<td class="parameter_name"><p>bits</p></td> |
| 3124 |
<td class="parameter_description"><p>if bits is non null it will hold the size of the parameters' in bits</p></td> |
| 3125 |
<td class="parameter_annotations"> </td> |
| 3126 |
</tr> |
| 3127 |
</tbody> |
| 3128 |
</table></div> |
| 3129 |
</div> |
| 3130 |
<div class="refsect3"> |
| 3131 |
<a name="gnutls-pkcs11-privkey-get-pk-algorithm.returns"></a><h4>Returns</h4> |
| 3132 |
<p> a member of the <a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a> enumeration on |
| 3133 |
success, or a negative error code on error.</p> |
| 3134 |
</div> |
| 3135 |
</div> |
| 3136 |
<hr> |
| 3137 |
<div class="refsect2"> |
| 3138 |
<a name="gnutls-pkcs11-privkey-get-info"></a><h3>gnutls_pkcs11_privkey_get_info ()</h3> |
| 3139 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 3140 |
gnutls_pkcs11_privkey_get_info (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a> pkey</code></em>, |
| 3141 |
<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-info-t" title="enum gnutls_pkcs11_obj_info_t"><span class="type">gnutls_pkcs11_obj_info_t</span></a> itype</code></em>, |
| 3142 |
<em class="parameter"><code><span class="type">void</span> *output</code></em>, |
| 3143 |
<em class="parameter"><code><span class="type">size_t</span> *output_size</code></em>);</pre> |
| 3144 |
<p>This function will return information about the PKCS 11 private key such |
| 3145 |
as the label, id as well as token information where the key is stored. When |
| 3146 |
output is text it returns null terminated string although <span class="type">output_size</span> contains |
| 3147 |
the size of the actual data only.</p> |
| 3148 |
<div class="refsect3"> |
| 3149 |
<a name="gnutls-pkcs11-privkey-get-info.parameters"></a><h4>Parameters</h4> |
| 3150 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3151 |
<colgroup> |
| 3152 |
<col width="150px" class="parameters_name"> |
| 3153 |
<col class="parameters_description"> |
| 3154 |
<col width="200px" class="parameters_annotations"> |
| 3155 |
</colgroup> |
| 3156 |
<tbody> |
| 3157 |
<tr> |
| 3158 |
<td class="parameter_name"><p>pkey</p></td> |
| 3159 |
<td class="parameter_description"><p>should contain a <a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a> type</p></td> |
| 3160 |
<td class="parameter_annotations"> </td> |
| 3161 |
</tr> |
| 3162 |
<tr> |
| 3163 |
<td class="parameter_name"><p>itype</p></td> |
| 3164 |
<td class="parameter_description"><p>Denotes the type of information requested</p></td> |
| 3165 |
<td class="parameter_annotations"> </td> |
| 3166 |
</tr> |
| 3167 |
<tr> |
| 3168 |
<td class="parameter_name"><p>output</p></td> |
| 3169 |
<td class="parameter_description"><p>where output will be stored</p></td> |
| 3170 |
<td class="parameter_annotations"> </td> |
| 3171 |
</tr> |
| 3172 |
<tr> |
| 3173 |
<td class="parameter_name"><p>output_size</p></td> |
| 3174 |
<td class="parameter_description"><p>contains the maximum size of the output and will be overwritten with actual</p></td> |
| 3175 |
<td class="parameter_annotations"> </td> |
| 3176 |
</tr> |
| 3177 |
</tbody> |
| 3178 |
</table></div> |
| 3179 |
</div> |
| 3180 |
<div class="refsect3"> |
| 3181 |
<a name="gnutls-pkcs11-privkey-get-info.returns"></a><h4>Returns</h4> |
| 3182 |
<p> <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) on success or a negative error code on error.</p> |
| 3183 |
</div> |
| 3184 |
</div> |
| 3185 |
<hr> |
| 3186 |
<div class="refsect2"> |
| 3187 |
<a name="gnutls-pkcs11-privkey-import-url"></a><h3>gnutls_pkcs11_privkey_import_url ()</h3> |
| 3188 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 3189 |
gnutls_pkcs11_privkey_import_url (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a> pkey</code></em>, |
| 3190 |
<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 3191 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 3192 |
<p>This function will "import" a PKCS 11 URL identifying a private |
| 3193 |
key to the <a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a> type. In reality since |
| 3194 |
in most cases keys cannot be exported, the private key structure |
| 3195 |
is being associated with the available operations on the token.</p> |
| 3196 |
<div class="refsect3"> |
| 3197 |
<a name="gnutls-pkcs11-privkey-import-url.parameters"></a><h4>Parameters</h4> |
| 3198 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3199 |
<colgroup> |
| 3200 |
<col width="150px" class="parameters_name"> |
| 3201 |
<col class="parameters_description"> |
| 3202 |
<col width="200px" class="parameters_annotations"> |
| 3203 |
</colgroup> |
| 3204 |
<tbody> |
| 3205 |
<tr> |
| 3206 |
<td class="parameter_name"><p>pkey</p></td> |
| 3207 |
<td class="parameter_description"><p>The private key</p></td> |
| 3208 |
<td class="parameter_annotations"> </td> |
| 3209 |
</tr> |
| 3210 |
<tr> |
| 3211 |
<td class="parameter_name"><p>url</p></td> |
| 3212 |
<td class="parameter_description"><p>a PKCS 11 url identifying the key</p></td> |
| 3213 |
<td class="parameter_annotations"> </td> |
| 3214 |
</tr> |
| 3215 |
<tr> |
| 3216 |
<td class="parameter_name"><p>flags</p></td> |
| 3217 |
<td class="parameter_description"><p>Or sequence of GNUTLS_PKCS11_OBJ_* flags</p></td> |
| 3218 |
<td class="parameter_annotations"> </td> |
| 3219 |
</tr> |
| 3220 |
</tbody> |
| 3221 |
</table></div> |
| 3222 |
</div> |
| 3223 |
<div class="refsect3"> |
| 3224 |
<a name="gnutls-pkcs11-privkey-import-url.returns"></a><h4>Returns</h4> |
| 3225 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 3226 |
negative error value.</p> |
| 3227 |
</div> |
| 3228 |
</div> |
| 3229 |
<hr> |
| 3230 |
<div class="refsect2"> |
| 3231 |
<a name="gnutls-pkcs11-privkey-export-url"></a><h3>gnutls_pkcs11_privkey_export_url ()</h3> |
| 3232 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 3233 |
gnutls_pkcs11_privkey_export_url (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a> key</code></em>, |
| 3234 |
<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-url-type-t" title="enum gnutls_pkcs11_url_type_t"><span class="type">gnutls_pkcs11_url_type_t</span></a> detailed</code></em>, |
| 3235 |
<em class="parameter"><code><span class="type">char</span> **url</code></em>);</pre> |
| 3236 |
<p>This function will export a URL identifying the given key.</p> |
| 3237 |
<div class="refsect3"> |
| 3238 |
<a name="gnutls-pkcs11-privkey-export-url.parameters"></a><h4>Parameters</h4> |
| 3239 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3240 |
<colgroup> |
| 3241 |
<col width="150px" class="parameters_name"> |
| 3242 |
<col class="parameters_description"> |
| 3243 |
<col width="200px" class="parameters_annotations"> |
| 3244 |
</colgroup> |
| 3245 |
<tbody> |
| 3246 |
<tr> |
| 3247 |
<td class="parameter_name"><p>key</p></td> |
| 3248 |
<td class="parameter_description"><p>Holds the PKCS 11 key</p></td> |
| 3249 |
<td class="parameter_annotations"> </td> |
| 3250 |
</tr> |
| 3251 |
<tr> |
| 3252 |
<td class="parameter_name"><p>detailed</p></td> |
| 3253 |
<td class="parameter_description"><p>non zero if a detailed URL is required</p></td> |
| 3254 |
<td class="parameter_annotations"> </td> |
| 3255 |
</tr> |
| 3256 |
<tr> |
| 3257 |
<td class="parameter_name"><p>url</p></td> |
| 3258 |
<td class="parameter_description"><p>will contain an allocated url</p></td> |
| 3259 |
<td class="parameter_annotations"> </td> |
| 3260 |
</tr> |
| 3261 |
</tbody> |
| 3262 |
</table></div> |
| 3263 |
</div> |
| 3264 |
<div class="refsect3"> |
| 3265 |
<a name="gnutls-pkcs11-privkey-export-url.returns"></a><h4>Returns</h4> |
| 3266 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 3267 |
negative error value.</p> |
| 3268 |
</div> |
| 3269 |
</div> |
| 3270 |
<hr> |
| 3271 |
<div class="refsect2"> |
| 3272 |
<a name="gnutls-pkcs11-privkey-status"></a><h3>gnutls_pkcs11_privkey_status ()</h3> |
| 3273 |
<pre class="programlisting"><span class="returnvalue">unsigned</span> |
| 3274 |
gnutls_pkcs11_privkey_status (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a> key</code></em>);</pre> |
| 3275 |
<p>Checks the status of the private key token.</p> |
| 3276 |
<div class="refsect3"> |
| 3277 |
<a name="gnutls-pkcs11-privkey-status.parameters"></a><h4>Parameters</h4> |
| 3278 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3279 |
<colgroup> |
| 3280 |
<col width="150px" class="parameters_name"> |
| 3281 |
<col class="parameters_description"> |
| 3282 |
<col width="200px" class="parameters_annotations"> |
| 3283 |
</colgroup> |
| 3284 |
<tbody><tr> |
| 3285 |
<td class="parameter_name"><p>key</p></td> |
| 3286 |
<td class="parameter_description"><p>Holds the key</p></td> |
| 3287 |
<td class="parameter_annotations"> </td> |
| 3288 |
</tr></tbody> |
| 3289 |
</table></div> |
| 3290 |
</div> |
| 3291 |
<div class="refsect3"> |
| 3292 |
<a name="gnutls-pkcs11-privkey-status.returns"></a><h4>Returns</h4> |
| 3293 |
<p> this function will return non-zero if the token |
| 3294 |
holding the private key is still available (inserted), and zero otherwise.</p> |
| 3295 |
</div> |
| 3296 |
<p class="since">Since: 3.1.9</p> |
| 3297 |
</div> |
| 3298 |
<hr> |
| 3299 |
<div class="refsect2"> |
| 3300 |
<a name="gnutls-pkcs11-privkey-generate3"></a><h3>gnutls_pkcs11_privkey_generate3 ()</h3> |
| 3301 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 3302 |
gnutls_pkcs11_privkey_generate3 (<em class="parameter"><code>const <span class="type">char</span> *url</code></em>, |
| 3303 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pk-algorithm-t" title="enum gnutls_pk_algorithm_t"><span class="type">gnutls_pk_algorithm_t</span></a> pk</code></em>, |
| 3304 |
<em class="parameter"><code>unsigned <span class="type">int</span> bits</code></em>, |
| 3305 |
<em class="parameter"><code>const <span class="type">char</span> *label</code></em>, |
| 3306 |
<em class="parameter"><code>const <a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *cid</code></em>, |
| 3307 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> fmt</code></em>, |
| 3308 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *pubkey</code></em>, |
| 3309 |
<em class="parameter"><code>unsigned <span class="type">int</span> key_usage</code></em>, |
| 3310 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 3311 |
<p>This function will generate a private key in the specified |
| 3312 |
by the <em class="parameter"><code>url</code></em> |
| 3313 |
token. The private key will be generate within |
| 3314 |
the token and will not be exportable. This function will |
| 3315 |
store the DER-encoded public key in the SubjectPublicKeyInfo format |
| 3316 |
in <em class="parameter"><code>pubkey</code></em> |
| 3317 |
. The <em class="parameter"><code>pubkey</code></em> |
| 3318 |
should be deinitialized using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p> |
| 3319 |
<p>Note that when generating an elliptic curve key, the curve |
| 3320 |
can be substituted in the place of the bits parameter using the |
| 3321 |
<a class="link" href="gnutls-gnutls.html#GNUTLS-CURVE-TO-BITS:CAPS" title="GNUTLS_CURVE_TO_BITS()"><code class="function">GNUTLS_CURVE_TO_BITS()</code></a> macro.</p> |
| 3322 |
<p>Since 3.6.3 the objects are marked as sensitive by default unless |
| 3323 |
<a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-NOT-SENSITIVE:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_NOT_SENSITIVE</code></a> is specified.</p> |
| 3324 |
<div class="refsect3"> |
| 3325 |
<a name="gnutls-pkcs11-privkey-generate3.parameters"></a><h4>Parameters</h4> |
| 3326 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3327 |
<colgroup> |
| 3328 |
<col width="150px" class="parameters_name"> |
| 3329 |
<col class="parameters_description"> |
| 3330 |
<col width="200px" class="parameters_annotations"> |
| 3331 |
</colgroup> |
| 3332 |
<tbody> |
| 3333 |
<tr> |
| 3334 |
<td class="parameter_name"><p>url</p></td> |
| 3335 |
<td class="parameter_description"><p>a token URL</p></td> |
| 3336 |
<td class="parameter_annotations"> </td> |
| 3337 |
</tr> |
| 3338 |
<tr> |
| 3339 |
<td class="parameter_name"><p>pk</p></td> |
| 3340 |
<td class="parameter_description"><p>the public key algorithm</p></td> |
| 3341 |
<td class="parameter_annotations"> </td> |
| 3342 |
</tr> |
| 3343 |
<tr> |
| 3344 |
<td class="parameter_name"><p>bits</p></td> |
| 3345 |
<td class="parameter_description"><p>the security bits</p></td> |
| 3346 |
<td class="parameter_annotations"> </td> |
| 3347 |
</tr> |
| 3348 |
<tr> |
| 3349 |
<td class="parameter_name"><p>label</p></td> |
| 3350 |
<td class="parameter_description"><p>a label</p></td> |
| 3351 |
<td class="parameter_annotations"> </td> |
| 3352 |
</tr> |
| 3353 |
<tr> |
| 3354 |
<td class="parameter_name"><p>cid</p></td> |
| 3355 |
<td class="parameter_description"><p>The CKA_ID to use for the new object</p></td> |
| 3356 |
<td class="parameter_annotations"> </td> |
| 3357 |
</tr> |
| 3358 |
<tr> |
| 3359 |
<td class="parameter_name"><p>fmt</p></td> |
| 3360 |
<td class="parameter_description"><p>the format of output params. PEM or DER</p></td> |
| 3361 |
<td class="parameter_annotations"> </td> |
| 3362 |
</tr> |
| 3363 |
<tr> |
| 3364 |
<td class="parameter_name"><p>pubkey</p></td> |
| 3365 |
<td class="parameter_description"><p>will hold the public key (may be <code class="literal">NULL</code>)</p></td> |
| 3366 |
<td class="parameter_annotations"> </td> |
| 3367 |
</tr> |
| 3368 |
<tr> |
| 3369 |
<td class="parameter_name"><p>key_usage</p></td> |
| 3370 |
<td class="parameter_description"><p>One of GNUTLS_KEY_*</p></td> |
| 3371 |
<td class="parameter_annotations"> </td> |
| 3372 |
</tr> |
| 3373 |
<tr> |
| 3374 |
<td class="parameter_name"><p>flags</p></td> |
| 3375 |
<td class="parameter_description"><p>zero or an OR'ed sequence of <code class="literal">GNUTLS_PKCS11_OBJ_FLAGs</code></p></td> |
| 3376 |
<td class="parameter_annotations"> </td> |
| 3377 |
</tr> |
| 3378 |
</tbody> |
| 3379 |
</table></div> |
| 3380 |
</div> |
| 3381 |
<div class="refsect3"> |
| 3382 |
<a name="gnutls-pkcs11-privkey-generate3.returns"></a><h4>Returns</h4> |
| 3383 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 3384 |
negative error value.</p> |
| 3385 |
</div> |
| 3386 |
<p class="since">Since: 3.4.0</p> |
| 3387 |
</div> |
| 3388 |
<hr> |
| 3389 |
<div class="refsect2"> |
| 3390 |
<a name="gnutls-pkcs11-privkey-export-pubkey"></a><h3>gnutls_pkcs11_privkey_export_pubkey ()</h3> |
| 3391 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 3392 |
gnutls_pkcs11_privkey_export_pubkey (<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-pkcs11-privkey-t" title="gnutls_pkcs11_privkey_t"><span class="type">gnutls_pkcs11_privkey_t</span></a> pkey</code></em>, |
| 3393 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-fmt-t" title="enum gnutls_x509_crt_fmt_t"><span class="type">gnutls_x509_crt_fmt_t</span></a> fmt</code></em>, |
| 3394 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *pubkey</code></em>, |
| 3395 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 3396 |
<p>This function will extract the public key (modulus and public |
| 3397 |
exponent) from the private key specified by the <em class="parameter"><code>url</code></em> |
| 3398 |
private key. |
| 3399 |
This public key will be stored in <em class="parameter"><code>pubkey</code></em> |
| 3400 |
in the format specified |
| 3401 |
by <em class="parameter"><code>fmt</code></em> |
| 3402 |
. <em class="parameter"><code>pubkey</code></em> |
| 3403 |
should be deinitialized using <a class="link" href="gnutls-gnutls.html#gnutls-free" title="gnutls_free()"><code class="function">gnutls_free()</code></a>.</p> |
| 3404 |
<div class="refsect3"> |
| 3405 |
<a name="gnutls-pkcs11-privkey-export-pubkey.parameters"></a><h4>Parameters</h4> |
| 3406 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3407 |
<colgroup> |
| 3408 |
<col width="150px" class="parameters_name"> |
| 3409 |
<col class="parameters_description"> |
| 3410 |
<col width="200px" class="parameters_annotations"> |
| 3411 |
</colgroup> |
| 3412 |
<tbody> |
| 3413 |
<tr> |
| 3414 |
<td class="parameter_name"><p>pkey</p></td> |
| 3415 |
<td class="parameter_description"><p>The private key</p></td> |
| 3416 |
<td class="parameter_annotations"> </td> |
| 3417 |
</tr> |
| 3418 |
<tr> |
| 3419 |
<td class="parameter_name"><p>fmt</p></td> |
| 3420 |
<td class="parameter_description"><p>the format of output params. PEM or DER.</p></td> |
| 3421 |
<td class="parameter_annotations"> </td> |
| 3422 |
</tr> |
| 3423 |
<tr> |
| 3424 |
<td class="parameter_name"><p>data</p></td> |
| 3425 |
<td class="parameter_description"><p>will hold the public key</p></td> |
| 3426 |
<td class="parameter_annotations"> </td> |
| 3427 |
</tr> |
| 3428 |
<tr> |
| 3429 |
<td class="parameter_name"><p>flags</p></td> |
| 3430 |
<td class="parameter_description"><p>should be zero</p></td> |
| 3431 |
<td class="parameter_annotations"> </td> |
| 3432 |
</tr> |
| 3433 |
</tbody> |
| 3434 |
</table></div> |
| 3435 |
</div> |
| 3436 |
<div class="refsect3"> |
| 3437 |
<a name="gnutls-pkcs11-privkey-export-pubkey.returns"></a><h4>Returns</h4> |
| 3438 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 3439 |
negative error value.</p> |
| 3440 |
</div> |
| 3441 |
<p class="since">Since: 3.3.7</p> |
| 3442 |
</div> |
| 3443 |
<hr> |
| 3444 |
<div class="refsect2"> |
| 3445 |
<a name="gnutls-pkcs11-token-get-random"></a><h3>gnutls_pkcs11_token_get_random ()</h3> |
| 3446 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 3447 |
gnutls_pkcs11_token_get_random (<em class="parameter"><code>const <span class="type">char</span> *token_url</code></em>, |
| 3448 |
<em class="parameter"><code><span class="type">void</span> *data</code></em>, |
| 3449 |
<em class="parameter"><code><span class="type">size_t</span> len</code></em>);</pre> |
| 3450 |
<p>This function will get random data from the given token. |
| 3451 |
It will store rnddata and fill the memory pointed to by rnddata with |
| 3452 |
len random bytes from the token.</p> |
| 3453 |
<div class="refsect3"> |
| 3454 |
<a name="gnutls-pkcs11-token-get-random.parameters"></a><h4>Parameters</h4> |
| 3455 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3456 |
<colgroup> |
| 3457 |
<col width="150px" class="parameters_name"> |
| 3458 |
<col class="parameters_description"> |
| 3459 |
<col width="200px" class="parameters_annotations"> |
| 3460 |
</colgroup> |
| 3461 |
<tbody> |
| 3462 |
<tr> |
| 3463 |
<td class="parameter_name"><p>token_url</p></td> |
| 3464 |
<td class="parameter_description"><p>A PKCS <span class="type">11</span> URL specifying a token</p></td> |
| 3465 |
<td class="parameter_annotations"> </td> |
| 3466 |
</tr> |
| 3467 |
<tr> |
| 3468 |
<td class="parameter_name"><p>len</p></td> |
| 3469 |
<td class="parameter_description"><p>The number of bytes of randomness to request</p></td> |
| 3470 |
<td class="parameter_annotations"> </td> |
| 3471 |
</tr> |
| 3472 |
<tr> |
| 3473 |
<td class="parameter_name"><p>rnddata</p></td> |
| 3474 |
<td class="parameter_description"><p>A pointer to the memory area to be filled with random data</p></td> |
| 3475 |
<td class="parameter_annotations"> </td> |
| 3476 |
</tr> |
| 3477 |
</tbody> |
| 3478 |
</table></div> |
| 3479 |
</div> |
| 3480 |
<div class="refsect3"> |
| 3481 |
<a name="gnutls-pkcs11-token-get-random.returns"></a><h4>Returns</h4> |
| 3482 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 3483 |
negative error value.</p> |
| 3484 |
</div> |
| 3485 |
</div> |
| 3486 |
<hr> |
| 3487 |
<div class="refsect2"> |
| 3488 |
<a name="gnutls-pkcs11-copy-attached-extension"></a><h3>gnutls_pkcs11_copy_attached_extension ()</h3> |
| 3489 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 3490 |
gnutls_pkcs11_copy_attached_extension (<em class="parameter"><code>const <span class="type">char</span> *token_url</code></em>, |
| 3491 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-x509-crt-t" title="gnutls_x509_crt_t"><span class="type">gnutls_x509_crt_t</span></a> crt</code></em>, |
| 3492 |
<em class="parameter"><code><a class="link" href="gnutls-gnutls.html#gnutls-datum-t" title="gnutls_datum_t"><span class="type">gnutls_datum_t</span></a> *data</code></em>, |
| 3493 |
<em class="parameter"><code>const <span class="type">char</span> *label</code></em>, |
| 3494 |
<em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> |
| 3495 |
<p>This function will copy an the attached extension in <em class="parameter"><code>data</code></em> |
| 3496 |
for |
| 3497 |
the certificate provided in <em class="parameter"><code>crt</code></em> |
| 3498 |
in the PKCS <span class="type">11</span> token specified |
| 3499 |
by the URL (typically a trust module). The extension must be in |
| 3500 |
RFC5280 Extension format.</p> |
| 3501 |
<div class="refsect3"> |
| 3502 |
<a name="gnutls-pkcs11-copy-attached-extension.parameters"></a><h4>Parameters</h4> |
| 3503 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3504 |
<colgroup> |
| 3505 |
<col width="150px" class="parameters_name"> |
| 3506 |
<col class="parameters_description"> |
| 3507 |
<col width="200px" class="parameters_annotations"> |
| 3508 |
</colgroup> |
| 3509 |
<tbody> |
| 3510 |
<tr> |
| 3511 |
<td class="parameter_name"><p>token_url</p></td> |
| 3512 |
<td class="parameter_description"><p>A PKCS <span class="type">11</span> URL specifying a token</p></td> |
| 3513 |
<td class="parameter_annotations"> </td> |
| 3514 |
</tr> |
| 3515 |
<tr> |
| 3516 |
<td class="parameter_name"><p>crt</p></td> |
| 3517 |
<td class="parameter_description"><p>An X.509 certificate object</p></td> |
| 3518 |
<td class="parameter_annotations"> </td> |
| 3519 |
</tr> |
| 3520 |
<tr> |
| 3521 |
<td class="parameter_name"><p>data</p></td> |
| 3522 |
<td class="parameter_description"><p>the attached extension</p></td> |
| 3523 |
<td class="parameter_annotations"> </td> |
| 3524 |
</tr> |
| 3525 |
<tr> |
| 3526 |
<td class="parameter_name"><p>label</p></td> |
| 3527 |
<td class="parameter_description"><p>A name to be used for the attached extension (may be <code class="literal">NULL</code>)</p></td> |
| 3528 |
<td class="parameter_annotations"> </td> |
| 3529 |
</tr> |
| 3530 |
<tr> |
| 3531 |
<td class="parameter_name"><p>flags</p></td> |
| 3532 |
<td class="parameter_description"><p>One of GNUTLS_PKCS11_OBJ_FLAG_*</p></td> |
| 3533 |
<td class="parameter_annotations"> </td> |
| 3534 |
</tr> |
| 3535 |
</tbody> |
| 3536 |
</table></div> |
| 3537 |
</div> |
| 3538 |
<div class="refsect3"> |
| 3539 |
<a name="gnutls-pkcs11-copy-attached-extension.returns"></a><h4>Returns</h4> |
| 3540 |
<p> On success, <a class="link" href="gnutls-gnutls.html#GNUTLS-E-SUCCESS:CAPS" title="GNUTLS_E_SUCCESS"><code class="literal">GNUTLS_E_SUCCESS</code></a> (0) is returned, otherwise a |
| 3541 |
negative error value.</p> |
| 3542 |
</div> |
| 3543 |
<p class="since">Since: 3.3.8</p> |
| 3544 |
</div> |
| 3545 |
<hr> |
| 3546 |
<div class="refsect2"> |
| 3547 |
<a name="gnutls-pkcs11-obj-get-pk-algorithm"></a><h3>gnutls_pkcs11_obj_get_pk_algorithm ()</h3> |
| 3548 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 3549 |
gnutls_pkcs11_obj_get_pk_algorithm (<em class="parameter"><code><a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-obj-t" title="gnutls_pkcs11_obj_t"><span class="type">gnutls_pkcs11_obj_t</span></a> obj</code></em>, |
| 3550 |
<em class="parameter"><code>unsigned <span class="type">int</span> *bits</code></em>);</pre> |
| 3551 |
<p>The return value needs to be checked to determine if bits represents |
| 3552 |
the ecc curve or the number of bits.</p> |
| 3553 |
<div class="refsect3"> |
| 3554 |
<a name="gnutls-pkcs11-obj-get-pk-algorithm.parameters"></a><h4>Parameters</h4> |
| 3555 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3556 |
<colgroup> |
| 3557 |
<col width="150px" class="parameters_name"> |
| 3558 |
<col class="parameters_description"> |
| 3559 |
<col width="200px" class="parameters_annotations"> |
| 3560 |
</colgroup> |
| 3561 |
<tbody> |
| 3562 |
<tr> |
| 3563 |
<td class="parameter_name"><p>obj</p></td> |
| 3564 |
<td class="parameter_description"><p>The pkcs11 object</p></td> |
| 3565 |
<td class="parameter_annotations"> </td> |
| 3566 |
</tr> |
| 3567 |
<tr> |
| 3568 |
<td class="parameter_name"><p>bits</p></td> |
| 3569 |
<td class="parameter_description"><p>Will hold the rsa/dsa bit count or the ecc curve |
| 3570 |
This function given a pkcs11 object with privkey_type initialized, |
| 3571 |
will return the algorithm type on success , and will store the number |
| 3572 |
of bits if the algo type is <a class="link" href="gnutls-gnutls.html#GNUTLS-PK-RSA:CAPS"><code class="literal">GNUTLS_PK_RSA</code></a> or <a class="link" href="gnutls-gnutls.html#GNUTLS-PK-DSA:CAPS"><code class="literal">GNUTLS_PK_DSA</code></a>, or the curve |
| 3573 |
if the algo type is <a class="link" href="gnutls-gnutls.html#GNUTLS-PK-ECDSA:CAPS"><code class="literal">GNUTLS_PK_ECDSA</code></a>.</p></td> |
| 3574 |
<td class="parameter_annotations"> </td> |
| 3575 |
</tr> |
| 3576 |
</tbody> |
| 3577 |
</table></div> |
| 3578 |
</div> |
| 3579 |
<div class="refsect3"> |
| 3580 |
<a name="gnutls-pkcs11-obj-get-pk-algorithm.returns"></a><h4>Returns</h4> |
| 3581 |
<p> The private key algorithm associated with the object on success |
| 3582 |
or a an error code otherwise.</p> |
| 3583 |
</div> |
| 3584 |
<p class="since">Since: 3.8.13</p> |
| 3585 |
</div> |
| 3586 |
</div> |
| 3587 |
<div class="refsect1"> |
| 3588 |
<a name="gnutls-pkcs11.other_details"></a><h2>Types and Values</h2> |
| 3589 |
<div class="refsect2"> |
| 3590 |
<a name="GNUTLS-PKCS11-MAX-PIN-LEN:CAPS"></a><h3>GNUTLS_PKCS11_MAX_PIN_LEN</h3> |
| 3591 |
<pre class="programlisting">#define GNUTLS_PKCS11_MAX_PIN_LEN 256 |
| 3592 |
</pre> |
| 3593 |
</div> |
| 3594 |
<hr> |
| 3595 |
<div class="refsect2"> |
| 3596 |
<a name="gnutls-pkcs11-obj-t"></a><h3>gnutls_pkcs11_obj_t</h3> |
| 3597 |
<pre class="programlisting">typedef struct gnutls_pkcs11_obj_st *gnutls_pkcs11_obj_t; |
| 3598 |
</pre> |
| 3599 |
</div> |
| 3600 |
<hr> |
| 3601 |
<div class="refsect2"> |
| 3602 |
<a name="GNUTLS-PKCS11-FLAG-MANUAL:CAPS"></a><h3>GNUTLS_PKCS11_FLAG_MANUAL</h3> |
| 3603 |
<pre class="programlisting">#define GNUTLS_PKCS11_FLAG_MANUAL 0 /* Manual loading of libraries */ |
| 3604 |
</pre> |
| 3605 |
</div> |
| 3606 |
<hr> |
| 3607 |
<div class="refsect2"> |
| 3608 |
<a name="GNUTLS-PKCS11-FLAG-AUTO:CAPS"></a><h3>GNUTLS_PKCS11_FLAG_AUTO</h3> |
| 3609 |
<pre class="programlisting">#define GNUTLS_PKCS11_FLAG_AUTO</pre> |
| 3610 |
</div> |
| 3611 |
<hr> |
| 3612 |
<div class="refsect2"> |
| 3613 |
<a name="GNUTLS-PKCS11-FLAG-AUTO-TRUSTED:CAPS"></a><h3>GNUTLS_PKCS11_FLAG_AUTO_TRUSTED</h3> |
| 3614 |
<pre class="programlisting">#define GNUTLS_PKCS11_FLAG_AUTO_TRUSTED</pre> |
| 3615 |
</div> |
| 3616 |
<hr> |
| 3617 |
<div class="refsect2"> |
| 3618 |
<a name="gnutls-pkcs11-obj-flags"></a><h3>enum gnutls_pkcs11_obj_flags</h3> |
| 3619 |
<p>Enumeration of different PKCS <span class="type">11</span> object flags. Some flags are used |
| 3620 |
to mark objects when storing, while others are also used while seeking |
| 3621 |
or retrieving objects.</p> |
| 3622 |
<div class="refsect3"> |
| 3623 |
<a name="gnutls-pkcs11-obj-flags.members"></a><h4>Members</h4> |
| 3624 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3625 |
<colgroup> |
| 3626 |
<col width="300px" class="enum_members_name"> |
| 3627 |
<col class="enum_members_description"> |
| 3628 |
<col width="200px" class="enum_members_annotations"> |
| 3629 |
</colgroup> |
| 3630 |
<tbody> |
| 3631 |
<tr> |
| 3632 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-LOGIN:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_LOGIN</p></td> |
| 3633 |
<td class="enum_member_description"> |
| 3634 |
<p>Force login in the token for the operation (seek+store). </p> |
| 3635 |
</td> |
| 3636 |
<td class="enum_member_annotations"> </td> |
| 3637 |
</tr> |
| 3638 |
<tr> |
| 3639 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-MARK-TRUSTED:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED</p></td> |
| 3640 |
<td class="enum_member_description"> |
| 3641 |
<p>object marked as trusted (seek+store).</p> |
| 3642 |
</td> |
| 3643 |
<td class="enum_member_annotations"> </td> |
| 3644 |
</tr> |
| 3645 |
<tr> |
| 3646 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-MARK-SENSITIVE:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_MARK_SENSITIVE</p></td> |
| 3647 |
<td class="enum_member_description"> |
| 3648 |
<p>object is explicitly marked as sensitive -unexportable (store).</p> |
| 3649 |
</td> |
| 3650 |
<td class="enum_member_annotations"> </td> |
| 3651 |
</tr> |
| 3652 |
<tr> |
| 3653 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-LOGIN-SO:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_LOGIN_SO</p></td> |
| 3654 |
<td class="enum_member_description"> |
| 3655 |
<p>force login as a security officer in the token for the operation (seek+store).</p> |
| 3656 |
</td> |
| 3657 |
<td class="enum_member_annotations"> </td> |
| 3658 |
</tr> |
| 3659 |
<tr> |
| 3660 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-MARK-PRIVATE:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_MARK_PRIVATE</p></td> |
| 3661 |
<td class="enum_member_description"> |
| 3662 |
<p>marked as private -requires PIN to access (store).</p> |
| 3663 |
</td> |
| 3664 |
<td class="enum_member_annotations"> </td> |
| 3665 |
</tr> |
| 3666 |
<tr> |
| 3667 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-MARK-NOT-PRIVATE:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_MARK_NOT_PRIVATE</p></td> |
| 3668 |
<td class="enum_member_description"> |
| 3669 |
<p>marked as not private (store).</p> |
| 3670 |
</td> |
| 3671 |
<td class="enum_member_annotations"> </td> |
| 3672 |
</tr> |
| 3673 |
<tr> |
| 3674 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-RETRIEVE-ANY:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_ANY</p></td> |
| 3675 |
<td class="enum_member_description"> |
| 3676 |
<p>When retrieving an object, do not set any requirements (store).</p> |
| 3677 |
</td> |
| 3678 |
<td class="enum_member_annotations"> </td> |
| 3679 |
</tr> |
| 3680 |
<tr> |
| 3681 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-RETRIEVE-TRUSTED:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_TRUSTED</p></td> |
| 3682 |
<td class="enum_member_description"> |
| 3683 |
<p>When retrieving an object, only retrieve the marked as trusted (alias to <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-MARK-TRUSTED:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED</code></a>). |
| 3684 |
In <a class="link" href="gnutls-pkcs11.html#gnutls-pkcs11-crt-is-known" title="gnutls_pkcs11_crt_is_known ()"><code class="function">gnutls_pkcs11_crt_is_known()</code></a> it implies <code class="literal">GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_COMPARE</code> if <a class="link" href="gnutls-pkcs11.html#GNUTLS-PKCS11-OBJ-FLAG-COMPARE-KEY:CAPS"><code class="literal">GNUTLS_PKCS11_OBJ_FLAG_COMPARE_KEY</code></a> is not given.</p> |
| 3685 |
</td> |
| 3686 |
<td class="enum_member_annotations"> </td> |
| 3687 |
</tr> |
| 3688 |
<tr> |
| 3689 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-MARK-DISTRUSTED:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_MARK_DISTRUSTED</p></td> |
| 3690 |
<td class="enum_member_description"> |
| 3691 |
<p>When writing an object, mark it as distrusted (store).</p> |
| 3692 |
</td> |
| 3693 |
<td class="enum_member_annotations"> </td> |
| 3694 |
</tr> |
| 3695 |
<tr> |
| 3696 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-RETRIEVE-DISTRUSTED:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_DISTRUSTED</p></td> |
| 3697 |
<td class="enum_member_description"> |
| 3698 |
<p>When retrieving an object, only retrieve the marked as distrusted (seek).</p> |
| 3699 |
</td> |
| 3700 |
<td class="enum_member_annotations"> </td> |
| 3701 |
</tr> |
| 3702 |
<tr> |
| 3703 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-COMPARE:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_COMPARE</p></td> |
| 3704 |
<td class="enum_member_description"> |
| 3705 |
<p>When checking an object's presence, fully compare it before returning any result (seek).</p> |
| 3706 |
</td> |
| 3707 |
<td class="enum_member_annotations"> </td> |
| 3708 |
</tr> |
| 3709 |
<tr> |
| 3710 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-PRESENT-IN-TRUSTED-MODULE:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_PRESENT_IN_TRUSTED_MODULE</p></td> |
| 3711 |
<td class="enum_member_description"> |
| 3712 |
<p>The object must be present in a marked as trusted module (seek).</p> |
| 3713 |
</td> |
| 3714 |
<td class="enum_member_annotations"> </td> |
| 3715 |
</tr> |
| 3716 |
<tr> |
| 3717 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-MARK-CA:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_MARK_CA</p></td> |
| 3718 |
<td class="enum_member_description"> |
| 3719 |
<p>Mark the object as a CA (seek+store).</p> |
| 3720 |
</td> |
| 3721 |
<td class="enum_member_annotations"> </td> |
| 3722 |
</tr> |
| 3723 |
<tr> |
| 3724 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-MARK-KEY-WRAP:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_MARK_KEY_WRAP</p></td> |
| 3725 |
<td class="enum_member_description"> |
| 3726 |
<p>Mark the generated key pair as wrapping and unwrapping keys (store).</p> |
| 3727 |
</td> |
| 3728 |
<td class="enum_member_annotations"> </td> |
| 3729 |
</tr> |
| 3730 |
<tr> |
| 3731 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-COMPARE-KEY:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_COMPARE_KEY</p></td> |
| 3732 |
<td class="enum_member_description"> |
| 3733 |
<p>When checking an object's presence, compare the key before returning any result (seek).</p> |
| 3734 |
</td> |
| 3735 |
<td class="enum_member_annotations"> </td> |
| 3736 |
</tr> |
| 3737 |
<tr> |
| 3738 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-OVERWRITE-TRUSTMOD-EXT:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_OVERWRITE_TRUSTMOD_EXT</p></td> |
| 3739 |
<td class="enum_member_description"> |
| 3740 |
<p>When an issuer is requested, override its extensions with the ones present in the trust module (seek).</p> |
| 3741 |
</td> |
| 3742 |
<td class="enum_member_annotations"> </td> |
| 3743 |
</tr> |
| 3744 |
<tr> |
| 3745 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-MARK-ALWAYS-AUTH:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_MARK_ALWAYS_AUTH</p></td> |
| 3746 |
<td class="enum_member_description"> |
| 3747 |
<p>Mark the key pair as requiring authentication (pin entry) before every operation (seek+store).</p> |
| 3748 |
</td> |
| 3749 |
<td class="enum_member_annotations"> </td> |
| 3750 |
</tr> |
| 3751 |
<tr> |
| 3752 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-MARK-EXTRACTABLE:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_MARK_EXTRACTABLE</p></td> |
| 3753 |
<td class="enum_member_description"> |
| 3754 |
<p>Mark the key pair as being extractable (store).</p> |
| 3755 |
</td> |
| 3756 |
<td class="enum_member_annotations"> </td> |
| 3757 |
</tr> |
| 3758 |
<tr> |
| 3759 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-NEVER-EXTRACTABLE:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_NEVER_EXTRACTABLE</p></td> |
| 3760 |
<td class="enum_member_description"> |
| 3761 |
<p>If set, the object was never marked as extractable (store).</p> |
| 3762 |
</td> |
| 3763 |
<td class="enum_member_annotations"> </td> |
| 3764 |
</tr> |
| 3765 |
<tr> |
| 3766 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-CRT:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_CRT</p></td> |
| 3767 |
<td class="enum_member_description"> |
| 3768 |
<p>When searching, restrict to certificates only (seek).</p> |
| 3769 |
</td> |
| 3770 |
<td class="enum_member_annotations"> </td> |
| 3771 |
</tr> |
| 3772 |
<tr> |
| 3773 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-WITH-PRIVKEY:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_WITH_PRIVKEY</p></td> |
| 3774 |
<td> </td> |
| 3775 |
<td> </td> |
| 3776 |
</tr> |
| 3777 |
<tr> |
| 3778 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-PUBKEY:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_PUBKEY</p></td> |
| 3779 |
<td class="enum_member_description"> |
| 3780 |
<p>When searching, restrict to public key objects only (seek).</p> |
| 3781 |
</td> |
| 3782 |
<td class="enum_member_annotations"> </td> |
| 3783 |
</tr> |
| 3784 |
<tr> |
| 3785 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-NO-STORE-PUBKEY:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_NO_STORE_PUBKEY</p></td> |
| 3786 |
<td class="enum_member_description"> |
| 3787 |
<p>When generating a keypair don't store the public key (store).</p> |
| 3788 |
</td> |
| 3789 |
<td class="enum_member_annotations"> </td> |
| 3790 |
</tr> |
| 3791 |
<tr> |
| 3792 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-PRIVKEY:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_PRIVKEY</p></td> |
| 3793 |
<td class="enum_member_description"> |
| 3794 |
<p>When searching, restrict to private key objects only (seek).</p> |
| 3795 |
</td> |
| 3796 |
<td class="enum_member_annotations"> </td> |
| 3797 |
</tr> |
| 3798 |
<tr> |
| 3799 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-FLAG-MARK-NOT-SENSITIVE:CAPS"></a>GNUTLS_PKCS11_OBJ_FLAG_MARK_NOT_SENSITIVE</p></td> |
| 3800 |
<td class="enum_member_description"> |
| 3801 |
<p>object marked as not sensitive -exportable (store).</p> |
| 3802 |
</td> |
| 3803 |
<td class="enum_member_annotations"> </td> |
| 3804 |
</tr> |
| 3805 |
</tbody> |
| 3806 |
</table></div> |
| 3807 |
</div> |
| 3808 |
</div> |
| 3809 |
<hr> |
| 3810 |
<div class="refsect2"> |
| 3811 |
<a name="gnutls-pkcs11-obj-attr-t"></a><h3>gnutls_pkcs11_obj_attr_t</h3> |
| 3812 |
<pre class="programlisting">#define gnutls_pkcs11_obj_attr_t gnutls_pkcs11_obj_flags |
| 3813 |
</pre> |
| 3814 |
</div> |
| 3815 |
<hr> |
| 3816 |
<div class="refsect2"> |
| 3817 |
<a name="gnutls-pkcs11-url-type-t"></a><h3>enum gnutls_pkcs11_url_type_t</h3> |
| 3818 |
<p>Enumeration of different URL extraction flags.</p> |
| 3819 |
<div class="refsect3"> |
| 3820 |
<a name="gnutls-pkcs11-url-type-t.members"></a><h4>Members</h4> |
| 3821 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3822 |
<colgroup> |
| 3823 |
<col width="300px" class="enum_members_name"> |
| 3824 |
<col class="enum_members_description"> |
| 3825 |
<col width="200px" class="enum_members_annotations"> |
| 3826 |
</colgroup> |
| 3827 |
<tbody> |
| 3828 |
<tr> |
| 3829 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-URL-GENERIC:CAPS"></a>GNUTLS_PKCS11_URL_GENERIC</p></td> |
| 3830 |
<td class="enum_member_description"> |
| 3831 |
<p>A generic-purpose URL.</p> |
| 3832 |
</td> |
| 3833 |
<td class="enum_member_annotations"> </td> |
| 3834 |
</tr> |
| 3835 |
<tr> |
| 3836 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-URL-LIB:CAPS"></a>GNUTLS_PKCS11_URL_LIB</p></td> |
| 3837 |
<td class="enum_member_description"> |
| 3838 |
<p>A URL that specifies the library used as well.</p> |
| 3839 |
</td> |
| 3840 |
<td class="enum_member_annotations"> </td> |
| 3841 |
</tr> |
| 3842 |
<tr> |
| 3843 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-URL-LIB-VERSION:CAPS"></a>GNUTLS_PKCS11_URL_LIB_VERSION</p></td> |
| 3844 |
<td class="enum_member_description"> |
| 3845 |
<p>A URL that specifies the library and its version.</p> |
| 3846 |
</td> |
| 3847 |
<td class="enum_member_annotations"> </td> |
| 3848 |
</tr> |
| 3849 |
</tbody> |
| 3850 |
</table></div> |
| 3851 |
</div> |
| 3852 |
</div> |
| 3853 |
<hr> |
| 3854 |
<div class="refsect2"> |
| 3855 |
<a name="gnutls-pkcs11-obj-info-t"></a><h3>enum gnutls_pkcs11_obj_info_t</h3> |
| 3856 |
<p>Enumeration of several object information types.</p> |
| 3857 |
<div class="refsect3"> |
| 3858 |
<a name="gnutls-pkcs11-obj-info-t.members"></a><h4>Members</h4> |
| 3859 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3860 |
<colgroup> |
| 3861 |
<col width="300px" class="enum_members_name"> |
| 3862 |
<col class="enum_members_description"> |
| 3863 |
<col width="200px" class="enum_members_annotations"> |
| 3864 |
</colgroup> |
| 3865 |
<tbody> |
| 3866 |
<tr> |
| 3867 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-ID-HEX:CAPS"></a>GNUTLS_PKCS11_OBJ_ID_HEX</p></td> |
| 3868 |
<td class="enum_member_description"> |
| 3869 |
<p>The object ID in hex. Null-terminated text.</p> |
| 3870 |
</td> |
| 3871 |
<td class="enum_member_annotations"> </td> |
| 3872 |
</tr> |
| 3873 |
<tr> |
| 3874 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-LABEL:CAPS"></a>GNUTLS_PKCS11_OBJ_LABEL</p></td> |
| 3875 |
<td class="enum_member_description"> |
| 3876 |
<p>The object label. Null-terminated text.</p> |
| 3877 |
</td> |
| 3878 |
<td class="enum_member_annotations"> </td> |
| 3879 |
</tr> |
| 3880 |
<tr> |
| 3881 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-TOKEN-LABEL:CAPS"></a>GNUTLS_PKCS11_OBJ_TOKEN_LABEL</p></td> |
| 3882 |
<td class="enum_member_description"> |
| 3883 |
<p>The token's label. Null-terminated text.</p> |
| 3884 |
</td> |
| 3885 |
<td class="enum_member_annotations"> </td> |
| 3886 |
</tr> |
| 3887 |
<tr> |
| 3888 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-TOKEN-SERIAL:CAPS"></a>GNUTLS_PKCS11_OBJ_TOKEN_SERIAL</p></td> |
| 3889 |
<td class="enum_member_description"> |
| 3890 |
<p>The token's serial number. Null-terminated text.</p> |
| 3891 |
</td> |
| 3892 |
<td class="enum_member_annotations"> </td> |
| 3893 |
</tr> |
| 3894 |
<tr> |
| 3895 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-TOKEN-MANUFACTURER:CAPS"></a>GNUTLS_PKCS11_OBJ_TOKEN_MANUFACTURER</p></td> |
| 3896 |
<td class="enum_member_description"> |
| 3897 |
<p>The token's manufacturer. Null-terminated text.</p> |
| 3898 |
</td> |
| 3899 |
<td class="enum_member_annotations"> </td> |
| 3900 |
</tr> |
| 3901 |
<tr> |
| 3902 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-TOKEN-MODEL:CAPS"></a>GNUTLS_PKCS11_OBJ_TOKEN_MODEL</p></td> |
| 3903 |
<td class="enum_member_description"> |
| 3904 |
<p>The token's model. Null-terminated text.</p> |
| 3905 |
</td> |
| 3906 |
<td class="enum_member_annotations"> </td> |
| 3907 |
</tr> |
| 3908 |
<tr> |
| 3909 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-ID:CAPS"></a>GNUTLS_PKCS11_OBJ_ID</p></td> |
| 3910 |
<td class="enum_member_description"> |
| 3911 |
<p>The object ID. Raw bytes.</p> |
| 3912 |
</td> |
| 3913 |
<td class="enum_member_annotations"> </td> |
| 3914 |
</tr> |
| 3915 |
<tr> |
| 3916 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-LIBRARY-VERSION:CAPS"></a>GNUTLS_PKCS11_OBJ_LIBRARY_VERSION</p></td> |
| 3917 |
<td class="enum_member_description"> |
| 3918 |
<p>The library's version. Null-terminated text.</p> |
| 3919 |
</td> |
| 3920 |
<td class="enum_member_annotations"> </td> |
| 3921 |
</tr> |
| 3922 |
<tr> |
| 3923 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-LIBRARY-DESCRIPTION:CAPS"></a>GNUTLS_PKCS11_OBJ_LIBRARY_DESCRIPTION</p></td> |
| 3924 |
<td class="enum_member_description"> |
| 3925 |
<p>The library's description. Null-terminated text.</p> |
| 3926 |
</td> |
| 3927 |
<td class="enum_member_annotations"> </td> |
| 3928 |
</tr> |
| 3929 |
<tr> |
| 3930 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-LIBRARY-MANUFACTURER:CAPS"></a>GNUTLS_PKCS11_OBJ_LIBRARY_MANUFACTURER</p></td> |
| 3931 |
<td class="enum_member_description"> |
| 3932 |
<p>The library's manufacturer name. Null-terminated text.</p> |
| 3933 |
</td> |
| 3934 |
<td class="enum_member_annotations"> </td> |
| 3935 |
</tr> |
| 3936 |
</tbody> |
| 3937 |
</table></div> |
| 3938 |
</div> |
| 3939 |
</div> |
| 3940 |
<hr> |
| 3941 |
<div class="refsect2"> |
| 3942 |
<a name="GNUTLS-PKCS11-OBJ-ATTR-CRT-ALL:CAPS"></a><h3>GNUTLS_PKCS11_OBJ_ATTR_CRT_ALL</h3> |
| 3943 |
<pre class="programlisting">#define GNUTLS_PKCS11_OBJ_ATTR_CRT_ALL GNUTLS_PKCS11_OBJ_FLAG_CRT |
| 3944 |
</pre> |
| 3945 |
</div> |
| 3946 |
<hr> |
| 3947 |
<div class="refsect2"> |
| 3948 |
<a name="GNUTLS-PKCS11-OBJ-ATTR-MATCH:CAPS"></a><h3>GNUTLS_PKCS11_OBJ_ATTR_MATCH</h3> |
| 3949 |
<pre class="programlisting">#define GNUTLS_PKCS11_OBJ_ATTR_MATCH 0 /* always match the given URL */ |
| 3950 |
</pre> |
| 3951 |
</div> |
| 3952 |
<hr> |
| 3953 |
<div class="refsect2"> |
| 3954 |
<a name="GNUTLS-PKCS11-OBJ-ATTR-ALL:CAPS"></a><h3>GNUTLS_PKCS11_OBJ_ATTR_ALL</h3> |
| 3955 |
<pre class="programlisting">#define GNUTLS_PKCS11_OBJ_ATTR_ALL 0 /* match everything! */ |
| 3956 |
</pre> |
| 3957 |
</div> |
| 3958 |
<hr> |
| 3959 |
<div class="refsect2"> |
| 3960 |
<a name="GNUTLS-PKCS11-OBJ-ATTR-CRT-TRUSTED:CAPS"></a><h3>GNUTLS_PKCS11_OBJ_ATTR_CRT_TRUSTED</h3> |
| 3961 |
<pre class="programlisting">#define GNUTLS_PKCS11_OBJ_ATTR_CRT_TRUSTED</pre> |
| 3962 |
</div> |
| 3963 |
<hr> |
| 3964 |
<div class="refsect2"> |
| 3965 |
<a name="GNUTLS-PKCS11-OBJ-ATTR-CRT-WITH-PRIVKEY:CAPS"></a><h3>GNUTLS_PKCS11_OBJ_ATTR_CRT_WITH_PRIVKEY</h3> |
| 3966 |
<pre class="programlisting">#define GNUTLS_PKCS11_OBJ_ATTR_CRT_WITH_PRIVKEY</pre> |
| 3967 |
</div> |
| 3968 |
<hr> |
| 3969 |
<div class="refsect2"> |
| 3970 |
<a name="GNUTLS-PKCS11-OBJ-ATTR-CRT-TRUSTED-CA:CAPS"></a><h3>GNUTLS_PKCS11_OBJ_ATTR_CRT_TRUSTED_CA</h3> |
| 3971 |
<pre class="programlisting">#define GNUTLS_PKCS11_OBJ_ATTR_CRT_TRUSTED_CA</pre> |
| 3972 |
</div> |
| 3973 |
<hr> |
| 3974 |
<div class="refsect2"> |
| 3975 |
<a name="GNUTLS-PKCS11-OBJ-ATTR-PUBKEY:CAPS"></a><h3>GNUTLS_PKCS11_OBJ_ATTR_PUBKEY</h3> |
| 3976 |
<pre class="programlisting">#define GNUTLS_PKCS11_OBJ_ATTR_PUBKEY GNUTLS_PKCS11_OBJ_FLAG_PUBKEY |
| 3977 |
</pre> |
| 3978 |
</div> |
| 3979 |
<hr> |
| 3980 |
<div class="refsect2"> |
| 3981 |
<a name="GNUTLS-PKCS11-OBJ-ATTR-PRIVKEY:CAPS"></a><h3>GNUTLS_PKCS11_OBJ_ATTR_PRIVKEY</h3> |
| 3982 |
<pre class="programlisting">#define GNUTLS_PKCS11_OBJ_ATTR_PRIVKEY GNUTLS_PKCS11_OBJ_FLAG_PRIVKEY |
| 3983 |
</pre> |
| 3984 |
</div> |
| 3985 |
<hr> |
| 3986 |
<div class="refsect2"> |
| 3987 |
<a name="gnutls-pkcs11-token-info-t"></a><h3>enum gnutls_pkcs11_token_info_t</h3> |
| 3988 |
<p>Enumeration of types for retrieving token information.</p> |
| 3989 |
<div class="refsect3"> |
| 3990 |
<a name="gnutls-pkcs11-token-info-t.members"></a><h4>Members</h4> |
| 3991 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 3992 |
<colgroup> |
| 3993 |
<col width="300px" class="enum_members_name"> |
| 3994 |
<col class="enum_members_description"> |
| 3995 |
<col width="200px" class="enum_members_annotations"> |
| 3996 |
</colgroup> |
| 3997 |
<tbody> |
| 3998 |
<tr> |
| 3999 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-TOKEN-LABEL:CAPS"></a>GNUTLS_PKCS11_TOKEN_LABEL</p></td> |
| 4000 |
<td class="enum_member_description"> |
| 4001 |
<p>The token's label (string)</p> |
| 4002 |
</td> |
| 4003 |
<td class="enum_member_annotations"> </td> |
| 4004 |
</tr> |
| 4005 |
<tr> |
| 4006 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-TOKEN-SERIAL:CAPS"></a>GNUTLS_PKCS11_TOKEN_SERIAL</p></td> |
| 4007 |
<td class="enum_member_description"> |
| 4008 |
<p>The token's serial number (string)</p> |
| 4009 |
</td> |
| 4010 |
<td class="enum_member_annotations"> </td> |
| 4011 |
</tr> |
| 4012 |
<tr> |
| 4013 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-TOKEN-MANUFACTURER:CAPS"></a>GNUTLS_PKCS11_TOKEN_MANUFACTURER</p></td> |
| 4014 |
<td class="enum_member_description"> |
| 4015 |
<p>The token's manufacturer (string)</p> |
| 4016 |
</td> |
| 4017 |
<td class="enum_member_annotations"> </td> |
| 4018 |
</tr> |
| 4019 |
<tr> |
| 4020 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-TOKEN-MODEL:CAPS"></a>GNUTLS_PKCS11_TOKEN_MODEL</p></td> |
| 4021 |
<td class="enum_member_description"> |
| 4022 |
<p>The token's model (string)</p> |
| 4023 |
</td> |
| 4024 |
<td class="enum_member_annotations"> </td> |
| 4025 |
</tr> |
| 4026 |
<tr> |
| 4027 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-TOKEN-MODNAME:CAPS"></a>GNUTLS_PKCS11_TOKEN_MODNAME</p></td> |
| 4028 |
<td class="enum_member_description"> |
| 4029 |
<p>The token's module name (string - since 3.4.3). This value is |
| 4030 |
unavailable for providers which were manually loaded.</p> |
| 4031 |
</td> |
| 4032 |
<td class="enum_member_annotations"> </td> |
| 4033 |
</tr> |
| 4034 |
</tbody> |
| 4035 |
</table></div> |
| 4036 |
</div> |
| 4037 |
</div> |
| 4038 |
<hr> |
| 4039 |
<div class="refsect2"> |
| 4040 |
<a name="gnutls-pkcs11-obj-type-t"></a><h3>enum gnutls_pkcs11_obj_type_t</h3> |
| 4041 |
<p>Enumeration of object types.</p> |
| 4042 |
<div class="refsect3"> |
| 4043 |
<a name="gnutls-pkcs11-obj-type-t.members"></a><h4>Members</h4> |
| 4044 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 4045 |
<colgroup> |
| 4046 |
<col width="300px" class="enum_members_name"> |
| 4047 |
<col class="enum_members_description"> |
| 4048 |
<col width="200px" class="enum_members_annotations"> |
| 4049 |
</colgroup> |
| 4050 |
<tbody> |
| 4051 |
<tr> |
| 4052 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-UNKNOWN:CAPS"></a>GNUTLS_PKCS11_OBJ_UNKNOWN</p></td> |
| 4053 |
<td class="enum_member_description"> |
| 4054 |
<p>Unknown PKCS11 object.</p> |
| 4055 |
</td> |
| 4056 |
<td class="enum_member_annotations"> </td> |
| 4057 |
</tr> |
| 4058 |
<tr> |
| 4059 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-X509-CRT:CAPS"></a>GNUTLS_PKCS11_OBJ_X509_CRT</p></td> |
| 4060 |
<td class="enum_member_description"> |
| 4061 |
<p>X.509 certificate.</p> |
| 4062 |
</td> |
| 4063 |
<td class="enum_member_annotations"> </td> |
| 4064 |
</tr> |
| 4065 |
<tr> |
| 4066 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-PUBKEY:CAPS"></a>GNUTLS_PKCS11_OBJ_PUBKEY</p></td> |
| 4067 |
<td class="enum_member_description"> |
| 4068 |
<p>Public key.</p> |
| 4069 |
</td> |
| 4070 |
<td class="enum_member_annotations"> </td> |
| 4071 |
</tr> |
| 4072 |
<tr> |
| 4073 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-PRIVKEY:CAPS"></a>GNUTLS_PKCS11_OBJ_PRIVKEY</p></td> |
| 4074 |
<td class="enum_member_description"> |
| 4075 |
<p>Private key.</p> |
| 4076 |
</td> |
| 4077 |
<td class="enum_member_annotations"> </td> |
| 4078 |
</tr> |
| 4079 |
<tr> |
| 4080 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-SECRET-KEY:CAPS"></a>GNUTLS_PKCS11_OBJ_SECRET_KEY</p></td> |
| 4081 |
<td class="enum_member_description"> |
| 4082 |
<p>Secret key.</p> |
| 4083 |
</td> |
| 4084 |
<td class="enum_member_annotations"> </td> |
| 4085 |
</tr> |
| 4086 |
<tr> |
| 4087 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-DATA:CAPS"></a>GNUTLS_PKCS11_OBJ_DATA</p></td> |
| 4088 |
<td class="enum_member_description"> |
| 4089 |
<p>Data object.</p> |
| 4090 |
</td> |
| 4091 |
<td class="enum_member_annotations"> </td> |
| 4092 |
</tr> |
| 4093 |
<tr> |
| 4094 |
<td class="enum_member_name"><p><a name="GNUTLS-PKCS11-OBJ-X509-CRT-EXTENSION:CAPS"></a>GNUTLS_PKCS11_OBJ_X509_CRT_EXTENSION</p></td> |
| 4095 |
<td class="enum_member_description"> |
| 4096 |
<p>X.509 certificate extension (supported by p11-kit trust module only).</p> |
| 4097 |
</td> |
| 4098 |
<td class="enum_member_annotations"> </td> |
| 4099 |
</tr> |
| 4100 |
</tbody> |
| 4101 |
</table></div> |
| 4102 |
</div> |
| 4103 |
</div> |
| 4104 |
<hr> |
| 4105 |
<div class="refsect2"> |
| 4106 |
<a name="GNUTLS-PKCS11-TOKEN-HW:CAPS"></a><h3>GNUTLS_PKCS11_TOKEN_HW</h3> |
| 4107 |
<pre class="programlisting">#define GNUTLS_PKCS11_TOKEN_HW 1 |
| 4108 |
</pre> |
| 4109 |
</div> |
| 4110 |
<hr> |
| 4111 |
<div class="refsect2"> |
| 4112 |
<a name="GNUTLS-PKCS11-TOKEN-TRUSTED:CAPS"></a><h3>GNUTLS_PKCS11_TOKEN_TRUSTED</h3> |
| 4113 |
<pre class="programlisting">#define GNUTLS_PKCS11_TOKEN_TRUSTED (1 << 1) /* p11-kit trusted */ |
| 4114 |
</pre> |
| 4115 |
</div> |
| 4116 |
<hr> |
| 4117 |
<div class="refsect2"> |
| 4118 |
<a name="GNUTLS-PKCS11-TOKEN-RNG:CAPS"></a><h3>GNUTLS_PKCS11_TOKEN_RNG</h3> |
| 4119 |
<pre class="programlisting">#define GNUTLS_PKCS11_TOKEN_RNG (1 << 2) /* CKF_RNG */ |
| 4120 |
</pre> |
| 4121 |
</div> |
| 4122 |
<hr> |
| 4123 |
<div class="refsect2"> |
| 4124 |
<a name="GNUTLS-PKCS11-TOKEN-LOGIN-REQUIRED:CAPS"></a><h3>GNUTLS_PKCS11_TOKEN_LOGIN_REQUIRED</h3> |
| 4125 |
<pre class="programlisting">#define GNUTLS_PKCS11_TOKEN_LOGIN_REQUIRED (1 << 3) /* CKF_LOGIN_REQUIRED */ |
| 4126 |
</pre> |
| 4127 |
</div> |
| 4128 |
<hr> |
| 4129 |
<div class="refsect2"> |
| 4130 |
<a name="GNUTLS-PKCS11-TOKEN-PROTECTED-AUTHENTICATION-PATH:CAPS"></a><h3>GNUTLS_PKCS11_TOKEN_PROTECTED_AUTHENTICATION_PATH</h3> |
| 4131 |
<pre class="programlisting">#define GNUTLS_PKCS11_TOKEN_PROTECTED_AUTHENTICATION_PATH</pre> |
| 4132 |
</div> |
| 4133 |
<hr> |
| 4134 |
<div class="refsect2"> |
| 4135 |
<a name="GNUTLS-PKCS11-TOKEN-INITIALIZED:CAPS"></a><h3>GNUTLS_PKCS11_TOKEN_INITIALIZED</h3> |
| 4136 |
<pre class="programlisting">#define GNUTLS_PKCS11_TOKEN_INITIALIZED (1 << 5) /* CKF_TOKEN_INITIALIZED */ |
| 4137 |
</pre> |
| 4138 |
</div> |
| 4139 |
<hr> |
| 4140 |
<div class="refsect2"> |
| 4141 |
<a name="GNUTLS-PKCS11-TOKEN-USER-PIN-COUNT-LOW:CAPS"></a><h3>GNUTLS_PKCS11_TOKEN_USER_PIN_COUNT_LOW</h3> |
| 4142 |
<pre class="programlisting">#define GNUTLS_PKCS11_TOKEN_USER_PIN_COUNT_LOW</pre> |
| 4143 |
</div> |
| 4144 |
<hr> |
| 4145 |
<div class="refsect2"> |
| 4146 |
<a name="GNUTLS-PKCS11-TOKEN-USER-PIN-FINAL-TRY:CAPS"></a><h3>GNUTLS_PKCS11_TOKEN_USER_PIN_FINAL_TRY</h3> |
| 4147 |
<pre class="programlisting">#define GNUTLS_PKCS11_TOKEN_USER_PIN_FINAL_TRY</pre> |
| 4148 |
</div> |
| 4149 |
<hr> |
| 4150 |
<div class="refsect2"> |
| 4151 |
<a name="GNUTLS-PKCS11-TOKEN-USER-PIN-LOCKED:CAPS"></a><h3>GNUTLS_PKCS11_TOKEN_USER_PIN_LOCKED</h3> |
| 4152 |
<pre class="programlisting">#define GNUTLS_PKCS11_TOKEN_USER_PIN_LOCKED (1 << 8) /* CKF_USER_PIN_LOCKED */ |
| 4153 |
</pre> |
| 4154 |
</div> |
| 4155 |
<hr> |
| 4156 |
<div class="refsect2"> |
| 4157 |
<a name="GNUTLS-PKCS11-TOKEN-SO-PIN-COUNT-LOW:CAPS"></a><h3>GNUTLS_PKCS11_TOKEN_SO_PIN_COUNT_LOW</h3> |
| 4158 |
<pre class="programlisting">#define GNUTLS_PKCS11_TOKEN_SO_PIN_COUNT_LOW (1 << 9) /* CKF_SO_PIN_COUNT_LOW */ |
| 4159 |
</pre> |
| 4160 |
</div> |
| 4161 |
<hr> |
| 4162 |
<div class="refsect2"> |
| 4163 |
<a name="GNUTLS-PKCS11-TOKEN-SO-PIN-FINAL-TRY:CAPS"></a><h3>GNUTLS_PKCS11_TOKEN_SO_PIN_FINAL_TRY</h3> |
| 4164 |
<pre class="programlisting">#define GNUTLS_PKCS11_TOKEN_SO_PIN_FINAL_TRY</pre> |
| 4165 |
</div> |
| 4166 |
<hr> |
| 4167 |
<div class="refsect2"> |
| 4168 |
<a name="GNUTLS-PKCS11-TOKEN-SO-PIN-LOCKED:CAPS"></a><h3>GNUTLS_PKCS11_TOKEN_SO_PIN_LOCKED</h3> |
| 4169 |
<pre class="programlisting">#define GNUTLS_PKCS11_TOKEN_SO_PIN_LOCKED (1 << 11) /* CKF_SO_PIN_LOCKED */ |
| 4170 |
</pre> |
| 4171 |
</div> |
| 4172 |
<hr> |
| 4173 |
<div class="refsect2"> |
| 4174 |
<a name="GNUTLS-PKCS11-TOKEN-USER-PIN-INITIALIZED:CAPS"></a><h3>GNUTLS_PKCS11_TOKEN_USER_PIN_INITIALIZED</h3> |
| 4175 |
<pre class="programlisting">#define GNUTLS_PKCS11_TOKEN_USER_PIN_INITIALIZED</pre> |
| 4176 |
</div> |
| 4177 |
<hr> |
| 4178 |
<div class="refsect2"> |
| 4179 |
<a name="GNUTLS-PKCS11-TOKEN-ERROR-STATE:CAPS"></a><h3>GNUTLS_PKCS11_TOKEN_ERROR_STATE</h3> |
| 4180 |
<pre class="programlisting">#define GNUTLS_PKCS11_TOKEN_ERROR_STATE (1 << 13) /* CKF_ERROR_STATE */ |
| 4181 |
</pre> |
| 4182 |
</div> |
| 4183 |
<hr> |
| 4184 |
<div class="refsect2"> |
| 4185 |
<a name="gnutls-x509-crt-import-pkcs11-url"></a><h3>gnutls_x509_crt_import_pkcs11_url</h3> |
| 4186 |
<pre class="programlisting">#define gnutls_x509_crt_import_pkcs11_url gnutls_x509_crt_import_url |
| 4187 |
</pre> |
| 4188 |
</div> |
| 4189 |
<hr> |
| 4190 |
<div class="refsect2"> |
| 4191 |
<a name="gnutls-pkcs11-obj-st"></a><h3>struct gnutls_pkcs11_obj_st</h3> |
| 4192 |
<pre class="programlisting">struct gnutls_pkcs11_obj_st { |
| 4193 |
gnutls_datum_t raw; |
| 4194 |
gnutls_pkcs11_obj_type_t type; |
| 4195 |
ck_object_class_t class; |
| 4196 |
|
| 4197 |
unsigned int flags; |
| 4198 |
struct p11_kit_uri *info; |
| 4199 |
|
| 4200 |
/* only when pubkey */ |
| 4201 |
gnutls_datum_t pubkey[MAX_PUBLIC_PARAMS_SIZE]; |
| 4202 |
unsigned pubkey_size; |
| 4203 |
|
| 4204 |
/* only when privkey. |
| 4205 |
* use MAX_PUBLIC_PARAMS_SIZE instead of MAX_PRIV_PARAMS_SIZE |
| 4206 |
* since we only care about the types for now*/ |
| 4207 |
gnutls_datum_t privkey_type[MAX_PUBLIC_PARAMS_SIZE]; |
| 4208 |
unsigned privkey_size; |
| 4209 |
|
| 4210 |
gnutls_pk_algorithm_t pk_algorithm; |
| 4211 |
unsigned int key_usage; |
| 4212 |
|
| 4213 |
struct pin_info_st pin; |
| 4214 |
}; |
| 4215 |
</pre> |
| 4216 |
</div> |
| 4217 |
</div> |
| 4218 |
</div> |
| 4219 |
<div class="footer"> |
| 4220 |
<hr>Generated by GTK-Doc V1.34.0</div> |
| 4221 |
</body> |
| 4222 |
</html> |