This file is indexed.

/usr/share/gtk-doc/html/p11-kit/p11-kit-URIs.html is in libp11-kit-dev 0.23.9-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>URIs: p11-kit</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="p11-kit">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="p11-kit-Modules.html" title="Modules">
<link rel="next" href="p11-kit-PIN-Callbacks.html" title="PIN Callbacks">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#p11-kit-URIs.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="p11-kit-Modules.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="p11-kit-PIN-Callbacks.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="p11-kit-URIs"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="p11-kit-URIs.top_of_page"></a>URIs</span></h2>
<p>URIs — Parsing and formatting PKCS#11 URIs</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="p11-kit-URIs.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="returnvalue">P11KitUri</span></a> *
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-new" title="p11_kit_uri_new ()">p11_kit_uri_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">CK_INFO_PTR</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-get-module-info" title="p11_kit_uri_get_module_info ()">p11_kit_uri_get_module_info</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-match-module-info" title="p11_kit_uri_match_module_info ()">p11_kit_uri_match_module_info</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">CK_SLOT_INFO_PTR</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-get-slot-info" title="p11_kit_uri_get_slot_info ()">p11_kit_uri_get_slot_info</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-match-slot-info" title="p11_kit_uri_match_slot_info ()">p11_kit_uri_match_slot_info</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">CK_SLOT_ID</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-get-slot-id" title="p11_kit_uri_get_slot_id ()">p11_kit_uri_get_slot_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-set-slot-id" title="p11_kit_uri_set_slot_id ()">p11_kit_uri_set_slot_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">CK_TOKEN_INFO_PTR</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-get-token-info" title="p11_kit_uri_get_token_info ()">p11_kit_uri_get_token_info</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-match-token-info" title="p11_kit_uri_match_token_info ()">p11_kit_uri_match_token_info</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">CK_ATTRIBUTE_PTR</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-get-attributes" title="p11_kit_uri_get_attributes ()">p11_kit_uri_get_attributes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-set-attributes" title="p11_kit_uri_set_attributes ()">p11_kit_uri_set_attributes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-clear-attributes" title="p11_kit_uri_clear_attributes ()">p11_kit_uri_clear_attributes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-match-attributes" title="p11_kit_uri_match_attributes ()">p11_kit_uri_match_attributes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">CK_ATTRIBUTE_PTR</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-get-attribute" title="p11_kit_uri_get_attribute ()">p11_kit_uri_get_attribute</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-set-attribute" title="p11_kit_uri_set_attribute ()">p11_kit_uri_set_attribute</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-clear-attribute" title="p11_kit_uri_clear_attribute ()">p11_kit_uri_clear_attribute</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-set-unrecognized" title="p11_kit_uri_set_unrecognized ()">p11_kit_uri_set_unrecognized</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-any-unrecognized" title="p11_kit_uri_any_unrecognized ()">p11_kit_uri_any_unrecognized</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-get-pin-value" title="p11_kit_uri_get_pin_value ()">p11_kit_uri_get_pin_value</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-set-pin-value" title="p11_kit_uri_set_pin_value ()">p11_kit_uri_set_pin_value</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-get-pin-source" title="p11_kit_uri_get_pin_source ()">p11_kit_uri_get_pin_source</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-set-pin-source" title="p11_kit_uri_set_pin_source ()">p11_kit_uri_set_pin_source</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-get-pinfile" title="p11_kit_uri_get_pinfile ()">p11_kit_uri_get_pinfile</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-set-pinfile" title="p11_kit_uri_set_pinfile ()">p11_kit_uri_set_pinfile</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-get-module-name" title="p11_kit_uri_get_module_name ()">p11_kit_uri_get_module_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-set-module-name" title="p11_kit_uri_set_module_name ()">p11_kit_uri_set_module_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-get-module-path" title="p11_kit_uri_get_module_path ()">p11_kit_uri_get_module_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-set-module-path" title="p11_kit_uri_set_module_path ()">p11_kit_uri_set_module_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-get-vendor-query" title="p11_kit_uri_get_vendor_query ()">p11_kit_uri_get_vendor_query</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-set-vendor-query" title="p11_kit_uri_set_vendor_query ()">p11_kit_uri_set_vendor_query</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-format" title="p11_kit_uri_format ()">p11_kit_uri_format</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-parse" title="p11_kit_uri_parse ()">p11_kit_uri_parse</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-free" title="p11_kit_uri_free ()">p11_kit_uri_free</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-message" title="p11_kit_uri_message ()">p11_kit_uri_message</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="p11-kit-URIs.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="p11-kit-URIs.html#P11-KIT-URI-SCHEME:CAPS" title="P11_KIT_URI_SCHEME">P11_KIT_URI_SCHEME</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="p11-kit-URIs.html#P11-KIT-URI-SCHEME-LEN:CAPS" title="P11_KIT_URI_SCHEME_LEN">P11_KIT_URI_SCHEME_LEN</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="p11-kit-URIs.html#P11KitUriType" title="enum P11KitUriType">P11KitUriType</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="p11-kit-URIs.html#P11KitUriResult" title="enum P11KitUriResult">P11KitUriResult</a></td>
</tr>
<tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri">P11KitUri</a></td>
</tr>
<tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><a class="link" href="p11-kit-URIs.html#p11-kit-uri" title="p11_kit_uri">p11_kit_uri</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="p11-kit-URIs.html#P11-KIT-URI-NO-MEMORY:CAPS" title="P11_KIT_URI_NO_MEMORY">P11_KIT_URI_NO_MEMORY</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="p11-kit-URIs.description"></a><h2>Description</h2>
<p>PKCS#11 URIs can be used in configuration files or applications to represent
PKCS#11 modules, tokens or objects. An example of a URI might be:</p>
<code class="code"><div class="literallayout"><p><br>
     pkcs11:token=The%20Software%20PKCS#11%20softtoken;<br>
         manufacturer=Snake%20Oil,%20Inc.;serial=;object=my-certificate;<br>
         model=1.0;type=cert;id=%69%95%3e%5c%f4%bd%ec%91<br>
</p></div></code><p>You can use <a class="link" href="p11-kit-URIs.html#p11-kit-uri-parse" title="p11_kit_uri_parse ()"><code class="function">p11_kit_uri_parse()</code></a> to parse such a URI, and <a class="link" href="p11-kit-URIs.html#p11-kit-uri-format" title="p11_kit_uri_format ()"><code class="function">p11_kit_uri_format()</code></a>
to build one. URIs are represented by the <a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> structure. You can match
a parsed URI against PKCS#11 tokens with <a class="link" href="p11-kit-URIs.html#p11-kit-uri-match-token-info" title="p11_kit_uri_match_token_info ()"><code class="function">p11_kit_uri_match_token_info()</code></a>
or attributes with <a class="link" href="p11-kit-URIs.html#p11-kit-uri-match-attributes" title="p11_kit_uri_match_attributes ()"><code class="function">p11_kit_uri_match_attributes()</code></a>.</p>
<p>Since URIs can represent different sorts of things, when parsing or formatting
a URI a 'context' can be used to indicate which sort of URI is expected.</p>
<p>URIs have an <code class="code">unrecognized</code> flag. This flag is set during parsing
if any parts of the URI are not recognized. This may be because the part is
from a newer version of the PKCS#11 spec or because that part was not valid
inside of the desired context used when parsing.</p>
</div>
<div class="refsect1">
<a name="p11-kit-URIs.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="p11-kit-uri-new"></a><h3>p11_kit_uri_new ()</h3>
<pre class="programlisting"><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="returnvalue">P11KitUri</span></a> *
p11_kit_uri_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Create a new blank PKCS#11 URI.</p>
<p>The new URI is in the right state to parse a string into. All relevant fields
are zeroed out. Formatting this URI will produce a valid but empty URI.</p>
<div class="refsect3">
<a name="p11-kit-uri-new.returns"></a><h4>Returns</h4>
<p> A newly allocated URI. This should be freed with <a class="link" href="p11-kit-URIs.html#p11-kit-uri-free" title="p11_kit_uri_free ()"><code class="function">p11_kit_uri_free()</code></a>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-get-module-info"></a><h3>p11_kit_uri_get_module_info ()</h3>
<pre class="programlisting"><span class="returnvalue">CK_INFO_PTR</span>
p11_kit_uri_get_module_info (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>);</pre>
<p>Get the <code class="code">CK_INFO</code> structure associated with this URI.</p>
<p>If this is a parsed URI, then the fields corresponding to library parts of
the URI will be filled in. Any library URI parts that were missing will have
their fields filled with zeros.</p>
<p>If the caller wishes to setup information for building a URI, then relevant
fields should be filled in. Fields that should not appear as parts in the
resulting URI should be filled with zeros.</p>
<div class="refsect3">
<a name="p11-kit-uri-get-module-info.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>the URI</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-get-module-info.returns"></a><h4>Returns</h4>
<p> A pointer to the <code class="code">CK_INFO</code> structure.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-match-module-info"></a><h3>p11_kit_uri_match_module_info ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
p11_kit_uri_match_module_info (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                               <em class="parameter"><code><span class="type">CK_INFO_PTR</span> info</code></em>);</pre>
<p>Match a <code class="code">CK_INFO</code> structure against the library parts of this URI.</p>
<p>Only the fields of the <code class="code">CK_INFO</code> structure that are valid for use
in a URI will be matched. A URI part that was not specified in the URI will
match any value in the structure. If during the URI parsing any unrecognized
parts were encountered then this match will fail.</p>
<div class="refsect3">
<a name="p11-kit-uri-match-module-info.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>the URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p>the structure to match against the URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-match-module-info.returns"></a><h4>Returns</h4>
<p> 1 if the URI matches, 0 if not.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-get-slot-info"></a><h3>p11_kit_uri_get_slot_info ()</h3>
<pre class="programlisting"><span class="returnvalue">CK_SLOT_INFO_PTR</span>
p11_kit_uri_get_slot_info (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>);</pre>
<p>Get the <code class="code">CK_SLOT_INFO</code> structure associated with this URI.</p>
<p>If this is a parsed URI, then the fields corresponding to slot parts of
the URI will be filled in. Any slot URI parts that were missing will have
their fields filled with zeros.</p>
<p>If the caller wishes to setup information for building a URI, then relevant
fields should be filled in. Fields that should not appear as parts in the
resulting URI should be filled with zeros.</p>
<div class="refsect3">
<a name="p11-kit-uri-get-slot-info.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>the URI</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-get-slot-info.returns"></a><h4>Returns</h4>
<p> A pointer to the <code class="code">CK_INFO</code> structure.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-match-slot-info"></a><h3>p11_kit_uri_match_slot_info ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
p11_kit_uri_match_slot_info (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                             <em class="parameter"><code><span class="type">CK_SLOT_INFO_PTR</span> slot_info</code></em>);</pre>
<p>Match a <code class="code">CK_SLOT_INFO</code> structure against the slot parts of this
URI.</p>
<p>Only the fields of the <code class="code">CK_SLOT_INFO</code> structure that are valid
for use in a URI will be matched. A URI part that was not specified in the
URI will match any value in the structure. If during the URI parsing any
unrecognized parts were encountered then this match will fail.</p>
<div class="refsect3">
<a name="p11-kit-uri-match-slot-info.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>the URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>slot_info</p></td>
<td class="parameter_description"><p>the structure to match against the URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-match-slot-info.returns"></a><h4>Returns</h4>
<p> 1 if the URI matches, 0 if not.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-get-slot-id"></a><h3>p11_kit_uri_get_slot_id ()</h3>
<pre class="programlisting"><span class="returnvalue">CK_SLOT_ID</span>
p11_kit_uri_get_slot_id (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>);</pre>
<p>Get the 'slot-id' part of the URI.</p>
<div class="refsect3">
<a name="p11-kit-uri-get-slot-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-get-slot-id.returns"></a><h4>Returns</h4>
<p> The slot-id or <code class="code">(CK_SLOT_ID)-1</code> if not set.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-set-slot-id"></a><h3>p11_kit_uri_set_slot_id ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
p11_kit_uri_set_slot_id (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                         <em class="parameter"><code><span class="type">CK_SLOT_ID</span> slot_id</code></em>);</pre>
<p>Set the 'slot-id' part of the URI.</p>
<div class="refsect3">
<a name="p11-kit-uri-set-slot-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>slot_id</p></td>
<td class="parameter_description"><p>The new slot-id</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-get-token-info"></a><h3>p11_kit_uri_get_token_info ()</h3>
<pre class="programlisting"><span class="returnvalue">CK_TOKEN_INFO_PTR</span>
p11_kit_uri_get_token_info (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>);</pre>
<p>Get the <code class="code">CK_TOKEN_INFO</code> structure associated with this URI.</p>
<p>If this is a parsed URI, then the fields corresponding to token parts of
the URI will be filled in. Any token URI parts that were missing will have
their fields filled with zeros.</p>
<p>If the caller wishes to setup information for building a URI, then relevant
fields should be filled in. Fields that should not appear as parts in the
resulting URI should be filled with zeros.</p>
<div class="refsect3">
<a name="p11-kit-uri-get-token-info.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>the URI</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-get-token-info.returns"></a><h4>Returns</h4>
<p> A pointer to the <code class="code">CK_INFO</code> structure.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-match-token-info"></a><h3>p11_kit_uri_match_token_info ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
p11_kit_uri_match_token_info (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                              <em class="parameter"><code><span class="type">CK_TOKEN_INFO_PTR</span> token_info</code></em>);</pre>
<p>Match a <code class="code">CK_TOKEN_INFO</code> structure against the token parts of this
URI.</p>
<p>Only the fields of the <code class="code">CK_TOKEN_INFO</code> structure that are valid
for use in a URI will be matched. A URI part that was not specified in the
URI will match any value in the structure. If during the URI parsing any
unrecognized parts were encountered then this match will fail.</p>
<div class="refsect3">
<a name="p11-kit-uri-match-token-info.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>the URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>token_info</p></td>
<td class="parameter_description"><p>the structure to match against the URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-match-token-info.returns"></a><h4>Returns</h4>
<p> 1 if the URI matches, 0 if not.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-get-attributes"></a><h3>p11_kit_uri_get_attributes ()</h3>
<pre class="programlisting"><span class="returnvalue">CK_ATTRIBUTE_PTR</span>
p11_kit_uri_get_attributes (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                            <em class="parameter"><code><span class="type">CK_ULONG</span> *n_attrs</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-set-attributes"></a><h3>p11_kit_uri_set_attributes ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
p11_kit_uri_set_attributes (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                            <em class="parameter"><code><span class="type">CK_ATTRIBUTE_PTR</span> attrs</code></em>,
                            <em class="parameter"><code><span class="type">CK_ULONG</span> n_attrs</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-clear-attributes"></a><h3>p11_kit_uri_clear_attributes ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
p11_kit_uri_clear_attributes (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-match-attributes"></a><h3>p11_kit_uri_match_attributes ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
p11_kit_uri_match_attributes (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                              <em class="parameter"><code><span class="type">CK_ATTRIBUTE_PTR</span> attrs</code></em>,
                              <em class="parameter"><code><span class="type">CK_ULONG</span> n_attrs</code></em>);</pre>
<p>Match a attributes against the object parts of this URI.</p>
<p>Only the attributes that are valid for use in a URI will be matched. A URI
part that was not specified in the URI will match any attribute value. If
during the URI parsing any unrecognized parts were encountered then this
match will fail.</p>
<div class="refsect3">
<a name="p11-kit-uri-match-attributes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>attrs</p></td>
<td class="parameter_description"><p>The attributes to match</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_attrs</p></td>
<td class="parameter_description"><p>The number of attributes</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-match-attributes.returns"></a><h4>Returns</h4>
<p> 1 if the URI matches, 0 if not.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-get-attribute"></a><h3>p11_kit_uri_get_attribute ()</h3>
<pre class="programlisting"><span class="returnvalue">CK_ATTRIBUTE_PTR</span>
p11_kit_uri_get_attribute (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                           <em class="parameter"><code><span class="type">CK_ATTRIBUTE_TYPE</span> attr_type</code></em>);</pre>
<p>Get a pointer to an attribute present in this URI.</p>
<div class="refsect3">
<a name="p11-kit-uri-get-attribute.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>attr_type</p></td>
<td class="parameter_description"><p>The attribute type</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-get-attribute.returns"></a><h4>Returns</h4>
<p> A pointer to the attribute, or <code class="code">NULL</code> if not present.
The attribute is owned by the URI and should not be freed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-set-attribute"></a><h3>p11_kit_uri_set_attribute ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
p11_kit_uri_set_attribute (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                           <em class="parameter"><code><span class="type">CK_ATTRIBUTE_PTR</span> attr</code></em>);</pre>
<p>Set an attribute on the URI.</p>
<p>Only attributes that map to parts in a PKCS#11 URI will be accepted.</p>
<div class="refsect3">
<a name="p11-kit-uri-set-attribute.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>attr</p></td>
<td class="parameter_description"><p>The attribute to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-set-attribute.returns"></a><h4>Returns</h4>
<p> <a class="link" href="p11-kit-URIs.html#P11-KIT-URI-OK:CAPS"><code class="literal">P11_KIT_URI_OK</code></a> if the attribute was successfully set.
<a class="link" href="p11-kit-URIs.html#P11-KIT-URI-NOT-FOUND:CAPS"><code class="literal">P11_KIT_URI_NOT_FOUND</code></a> if the attribute was not valid for a URI.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-clear-attribute"></a><h3>p11_kit_uri_clear_attribute ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
p11_kit_uri_clear_attribute (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                             <em class="parameter"><code><span class="type">CK_ATTRIBUTE_TYPE</span> attr_type</code></em>);</pre>
<p>Clear an attribute on the URI.</p>
<p>Only attributes that map to parts in a PKCS#11 URI will be accepted.</p>
<div class="refsect3">
<a name="p11-kit-uri-clear-attribute.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>attr_type</p></td>
<td class="parameter_description"><p>The type of the attribute to clear</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-clear-attribute.returns"></a><h4>Returns</h4>
<p> <a class="link" href="p11-kit-URIs.html#P11-KIT-URI-OK:CAPS"><code class="literal">P11_KIT_URI_OK</code></a> if the attribute was successfully cleared.
<a class="link" href="p11-kit-URIs.html#P11-KIT-URI-NOT-FOUND:CAPS"><code class="literal">P11_KIT_URI_NOT_FOUND</code></a> if the attribute was not valid for a URI.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-set-unrecognized"></a><h3>p11_kit_uri_set_unrecognized ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
p11_kit_uri_set_unrecognized (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                              <em class="parameter"><code><span class="type">int</span> unrecognized</code></em>);</pre>
<p>Set the unrecognized flag on this URI.</p>
<p>The unrecognized flag is automatically set to 1 when during parsing any part
of the URI is unrecognized. If the unrecognized flag is set to 1, then
matching against this URI will always fail.</p>
<div class="refsect3">
<a name="p11-kit-uri-set-unrecognized.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>unrecognized</p></td>
<td class="parameter_description"><p>The new unregognized flag value</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-any-unrecognized"></a><h3>p11_kit_uri_any_unrecognized ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
p11_kit_uri_any_unrecognized (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>);</pre>
<p>Get the unrecognized flag for this URI.</p>
<p>The unrecognized flag is automatically set to 1 when during parsing any part
of the URI is unrecognized. If the unrecognized flag is set to 1, then
matching against this URI will always fail.</p>
<div class="refsect3">
<a name="p11-kit-uri-any-unrecognized.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-any-unrecognized.returns"></a><h4>Returns</h4>
<p> 1 if unrecognized flag is set, 0 otherwise.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-get-pin-value"></a><h3>p11_kit_uri_get_pin_value ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
p11_kit_uri_get_pin_value (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>);</pre>
<p>Get the 'pin-value' part of the URI. This is used by some applications to
read the PIN for logging into a PKCS#11 token.</p>
<div class="refsect3">
<a name="p11-kit-uri-get-pin-value.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-get-pin-value.returns"></a><h4>Returns</h4>
<p> The pin-value or <code class="literal">NULL</code> if not present.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-set-pin-value"></a><h3>p11_kit_uri_set_pin_value ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
p11_kit_uri_set_pin_value (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                           <em class="parameter"><code>const <span class="type">char</span> *pin</code></em>);</pre>
<p>Set the 'pin-value' part of the URI. This is used by some applications to
specify the PIN for logging into a PKCS#11 token.</p>
<div class="refsect3">
<a name="p11-kit-uri-set-pin-value.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pin</p></td>
<td class="parameter_description"><p>The new pin-value</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-get-pin-source"></a><h3>p11_kit_uri_get_pin_source ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
p11_kit_uri_get_pin_source (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>);</pre>
<p>Get the 'pin-source' part of the URI. This is used by some applications to
lookup a PIN for logging into a PKCS#11 token.</p>
<div class="refsect3">
<a name="p11-kit-uri-get-pin-source.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-get-pin-source.returns"></a><h4>Returns</h4>
<p> The pin-source or <code class="literal">NULL</code> if not present.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-set-pin-source"></a><h3>p11_kit_uri_set_pin_source ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
p11_kit_uri_set_pin_source (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                            <em class="parameter"><code>const <span class="type">char</span> *pin_source</code></em>);</pre>
<p>Set the 'pin-source' part of the URI. This is used by some applications to
lookup a PIN for logging into a PKCS#11 token.</p>
<div class="refsect3">
<a name="p11-kit-uri-set-pin-source.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pin_source</p></td>
<td class="parameter_description"><p>The new pin-source</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-get-pinfile"></a><h3>p11_kit_uri_get_pinfile ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
p11_kit_uri_get_pinfile (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>);</pre>
<div class="warning">
<p><code class="literal">p11_kit_uri_get_pinfile</code> is deprecated and should not be used in newly-written code.</p>
<p>use <a class="link" href="p11-kit-URIs.html#p11-kit-uri-get-pin-source" title="p11_kit_uri_get_pin_source ()"><code class="function">p11_kit_uri_get_pin_source()</code></a>.</p>
</div>
<div class="refsect3">
<a name="p11-kit-uri-get-pinfile.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-set-pinfile"></a><h3>p11_kit_uri_set_pinfile ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
p11_kit_uri_set_pinfile (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                         <em class="parameter"><code>const <span class="type">char</span> *pinfile</code></em>);</pre>
<div class="warning">
<p><code class="literal">p11_kit_uri_set_pinfile</code> is deprecated and should not be used in newly-written code.</p>
<p>use <a class="link" href="p11-kit-URIs.html#p11-kit-uri-set-pin-source" title="p11_kit_uri_set_pin_source ()"><code class="function">p11_kit_uri_set_pin_source()</code></a>.</p>
</div>
<div class="refsect3">
<a name="p11-kit-uri-set-pinfile.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pinfile</p></td>
<td class="parameter_description"><p>The pinfile</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-get-module-name"></a><h3>p11_kit_uri_get_module_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
p11_kit_uri_get_module_name (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>);</pre>
<div class="warning"><p><code class="literal">p11_kit_uri_get_module_name</code> is deprecated and should not be used in newly-written code.</p></div>
<p>Get the 'module-name' part of the URI. This is used by some
applications to explicitly specify the name of a PKCS#11 module.</p>
<div class="refsect3">
<a name="p11-kit-uri-get-module-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-get-module-name.returns"></a><h4>Returns</h4>
<p> The module-name or <code class="literal">NULL</code> if not present.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-set-module-name"></a><h3>p11_kit_uri_set_module_name ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
p11_kit_uri_set_module_name (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                             <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
<p>Set the 'module-name' part of the URI. This is used by some
applications to explicitly specify the name of a PKCS#11 module.</p>
<div class="refsect3">
<a name="p11-kit-uri-set-module-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The new module-name</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-get-module-path"></a><h3>p11_kit_uri_get_module_path ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
p11_kit_uri_get_module_path (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>);</pre>
<p>Get the 'module-path' part of the URI. This is used by some
applications to explicitly specify the path of a PKCS#11 module.</p>
<div class="refsect3">
<a name="p11-kit-uri-get-module-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-get-module-path.returns"></a><h4>Returns</h4>
<p> The module-path or <code class="literal">NULL</code> if not present.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-set-module-path"></a><h3>p11_kit_uri_set_module_path ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
p11_kit_uri_set_module_path (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                             <em class="parameter"><code>const <span class="type">char</span> *path</code></em>);</pre>
<p>Set the 'module-path' part of the URI. This is used by some
applications to explicitly specify the path of a PKCS#11 module.</p>
<div class="refsect3">
<a name="p11-kit-uri-set-module-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>The new module-path</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-get-vendor-query"></a><h3>p11_kit_uri_get_vendor_query ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
p11_kit_uri_get_vendor_query (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                              <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
<p>Get the vendor query part of the URI, identified by <em class="parameter"><code>name</code></em>
. This is
used by some applications to explicitly specify the path of a
PKCS#11 module.</p>
<div class="refsect3">
<a name="p11-kit-uri-get-vendor-query.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The name of vendor query</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-get-vendor-query.returns"></a><h4>Returns</h4>
<p> The value of vendor query or <code class="literal">NULL</code> if not present.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-set-vendor-query"></a><h3>p11_kit_uri_set_vendor_query ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
p11_kit_uri_set_vendor_query (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                              <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                              <em class="parameter"><code>const <span class="type">char</span> *value</code></em>);</pre>
<p>Set the vendor query part of the URI, identified by <em class="parameter"><code>name</code></em>
. This is
used by some applications to explicitly specify the path of a
PKCS#11 module.</p>
<div class="refsect3">
<a name="p11-kit-uri-set-vendor-query.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The name of vendor query</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p> The value of vendor query. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-set-vendor-query.returns"></a><h4>Returns</h4>
<p> 1 if the vendor query is set or removed, 0 if not.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-format"></a><h3>p11_kit_uri_format ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
p11_kit_uri_format (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>,
                    <em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUriType" title="enum P11KitUriType"><span class="type">P11KitUriType</span></a> uri_type</code></em>,
                    <em class="parameter"><code><span class="type">char</span> **string</code></em>);</pre>
<p>Format a PKCS#11 URI into a string.</p>
<p>Fields which are zeroed out will not be included in the resulting string.
Attributes which are not present will also not be included.</p>
<p>The uri_type of URI specified limits the different parts of the resulting
URI. To format a URI containing all possible information use
<a class="link" href="p11-kit-URIs.html#P11-KIT-URI-FOR-ANY:CAPS"><code class="literal">P11_KIT_URI_FOR_ANY</code></a></p>
<p>It's up to the caller to guarantee that the attributes set in <em class="parameter"><code>uri</code></em>
 are
those appropriate for inclusion in a URI, specifically:
<code class="literal">CKA_ID</code>, <code class="literal">CKA_LABEL</code>
and <code class="literal">CKA_CLASS</code>. The class must be one of
<code class="literal">CKO_DATA</code>, <code class="literal">CKO_SECRET_KEY</code>,
<code class="literal">CKO_CERTIFICATE</code>, <code class="literal">CKO_PUBLIC_KEY</code>,
<code class="literal">CKO_PRIVATE_KEY</code>.</p>
<p>The resulting string should be freed with <code class="function">free()</code>.</p>
<div class="refsect3">
<a name="p11-kit-uri-format.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri_type</p></td>
<td class="parameter_description"><p>The type of URI that should be produced.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>string</p></td>
<td class="parameter_description"><p>Location to store a newly allocated string.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-format.returns"></a><h4>Returns</h4>
<p> <a class="link" href="p11-kit-URIs.html#P11-KIT-URI-OK:CAPS"><code class="literal">P11_KIT_URI_OK</code></a> if the URI was formatted successfully,
<a class="link" href="p11-kit-URIs.html#P11-KIT-URI-UNEXPECTED:CAPS"><code class="literal">P11_KIT_URI_UNEXPECTED</code></a> if the data in <em class="parameter"><code>uri</code></em>
is invalid for a URI.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-parse"></a><h3>p11_kit_uri_parse ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
p11_kit_uri_parse (<em class="parameter"><code>const <span class="type">char</span> *string</code></em>,
                   <em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUriType" title="enum P11KitUriType"><span class="type">P11KitUriType</span></a> uri_type</code></em>,
                   <em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>);</pre>
<p>Parse a PKCS#11 URI string.</p>
<p>PKCS#11 URIs can represent tokens, objects or modules. The uri_type argument
allows the caller to specify what type of URI is expected and the sorts of
things the URI should match. <a class="link" href="p11-kit-URIs.html#P11-KIT-URI-FOR-ANY:CAPS"><code class="literal">P11_KIT_URI_FOR_ANY</code></a> can be used to parse a URI
for any context. It's then up to the caller to make sense of the way that
it is used.</p>
<p>If the PKCS#11 URI contains unrecognized URI parts or parts not applicable
to the specified context, then the unrecognized flag will be set. This will
prevent the URI from matching using the various match functions.</p>
<div class="refsect3">
<a name="p11-kit-uri-parse.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>string</p></td>
<td class="parameter_description"><p>The string to parse</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri_type</p></td>
<td class="parameter_description"><p>The type of URI that is expected</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The blank URI to parse the values into</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-parse.returns"></a><h4>Returns</h4>
<p> <a class="link" href="p11-kit-URIs.html#P11-KIT-URI-OK:CAPS"><code class="literal">P11_KIT_URI_OK</code></a> if the URI was parsed successfully.
<a class="link" href="p11-kit-URIs.html#P11-KIT-URI-BAD-SCHEME:CAPS"><code class="literal">P11_KIT_URI_BAD_SCHEME</code></a> if this was not a PKCS#11 URI.
<a class="link" href="p11-kit-URIs.html#P11-KIT-URI-BAD-SYNTAX:CAPS"><code class="literal">P11_KIT_URI_BAD_SYNTAX</code></a> if the URI syntax was bad.
<a class="link" href="p11-kit-URIs.html#P11-KIT-URI-BAD-VERSION:CAPS"><code class="literal">P11_KIT_URI_BAD_VERSION</code></a> if a version number was bad.
<a class="link" href="p11-kit-URIs.html#P11-KIT-URI-BAD-ENCODING:CAPS"><code class="literal">P11_KIT_URI_BAD_ENCODING</code></a> if the URI encoding was invalid.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-free"></a><h3>p11_kit_uri_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
p11_kit_uri_free (<em class="parameter"><code><a class="link" href="p11-kit-URIs.html#P11KitUri" title="P11KitUri"><span class="type">P11KitUri</span></a> *uri</code></em>);</pre>
<p>Free a PKCS#11 URI.</p>
<div class="refsect3">
<a name="p11-kit-uri-free.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The URI</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri-message"></a><h3>p11_kit_uri_message ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
p11_kit_uri_message (<em class="parameter"><code><span class="type">int</span> code</code></em>);</pre>
<p>Lookup a message for the uri error code. These codes are the P11_KIT_URI_XXX
error codes that can be returned from <a class="link" href="p11-kit-URIs.html#p11-kit-uri-parse" title="p11_kit_uri_parse ()"><code class="function">p11_kit_uri_parse()</code></a> or
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-format" title="p11_kit_uri_format ()"><code class="function">p11_kit_uri_format()</code></a>. As a special case <code class="literal">NULL</code>, will be returned for
<a class="link" href="p11-kit-URIs.html#P11-KIT-URI-OK:CAPS"><code class="literal">P11_KIT_URI_OK</code></a>.</p>
<div class="refsect3">
<a name="p11-kit-uri-message.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>code</p></td>
<td class="parameter_description"><p>The error code</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="p11-kit-uri-message.returns"></a><h4>Returns</h4>
<p> The message for the error code. This string is owned by the p11-kit
library.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="p11-kit-URIs.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="P11-KIT-URI-SCHEME:CAPS"></a><h3>P11_KIT_URI_SCHEME</h3>
<pre class="programlisting">#define P11_KIT_URI_SCHEME "pkcs11"
</pre>
<p>String of URI scheme for PKCS#11 URIs.</p>
</div>
<hr>
<div class="refsect2">
<a name="P11-KIT-URI-SCHEME-LEN:CAPS"></a><h3>P11_KIT_URI_SCHEME_LEN</h3>
<pre class="programlisting">#define P11_KIT_URI_SCHEME_LEN 6
</pre>
<p>Length of <a class="link" href="p11-kit-URIs.html#P11-KIT-URI-SCHEME:CAPS" title="P11_KIT_URI_SCHEME"><code class="literal">P11_KIT_URI_SCHEME</code></a>.</p>
</div>
<hr>
<div class="refsect2">
<a name="P11KitUriType"></a><h3>enum P11KitUriType</h3>
<p>A PKCS#11 URI can represent different kinds of things. This flag is used by
<a class="link" href="p11-kit-URIs.html#p11-kit-uri-parse" title="p11_kit_uri_parse ()"><code class="function">p11_kit_uri_parse()</code></a> to denote in what context the URI will be used.</p>
<p>The various types can be combined.</p>
<div class="refsect3">
<a name="P11KitUriType.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-FOR-OBJECT:CAPS"></a>P11_KIT_URI_FOR_OBJECT</p></td>
<td class="enum_member_description">
<p>The URI represents one or more objects</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-FOR-TOKEN:CAPS"></a>P11_KIT_URI_FOR_TOKEN</p></td>
<td class="enum_member_description">
<p>The URI represents one or more tokens</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-FOR-SLOT:CAPS"></a>P11_KIT_URI_FOR_SLOT</p></td>
<td class="enum_member_description">
<p>The URI represents one or more slots</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-FOR-MODULE:CAPS"></a>P11_KIT_URI_FOR_MODULE</p></td>
<td class="enum_member_description">
<p>The URI represents one or more modules</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-FOR-MODULE-WITH-VERSION:CAPS"></a>P11_KIT_URI_FOR_MODULE_WITH_VERSION</p></td>
<td class="enum_member_description">
<p>The URI represents a module with
    a specific version.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-FOR-OBJECT-ON-TOKEN:CAPS"></a>P11_KIT_URI_FOR_OBJECT_ON_TOKEN</p></td>
<td class="enum_member_description">
<p>The URI represents one or more objects
    that are present on a specific token.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-FOR-OBJECT-ON-TOKEN-AND-MODULE:CAPS"></a>P11_KIT_URI_FOR_OBJECT_ON_TOKEN_AND_MODULE</p></td>
<td class="enum_member_description">
<p>The URI represents one or more
    objects that are present on a specific token, being used with a certain
    module.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-FOR-ANY:CAPS"></a>P11_KIT_URI_FOR_ANY</p></td>
<td class="enum_member_description">
<p>The URI can represent anything</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="P11KitUriResult"></a><h3>enum P11KitUriResult</h3>
<p>Error codes returned by various functions. The functions each clearly state
which error codes they are capable of returning.</p>
<div class="refsect3">
<a name="P11KitUriResult.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-OK:CAPS"></a>P11_KIT_URI_OK</p></td>
<td class="enum_member_description">
<p>Success</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-UNEXPECTED:CAPS"></a>P11_KIT_URI_UNEXPECTED</p></td>
<td class="enum_member_description">
<p>Unexpected or internal system error</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-BAD-SCHEME:CAPS"></a>P11_KIT_URI_BAD_SCHEME</p></td>
<td class="enum_member_description">
<p>The URI had a bad scheme</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-BAD-ENCODING:CAPS"></a>P11_KIT_URI_BAD_ENCODING</p></td>
<td class="enum_member_description">
<p>The URI had a bad encoding</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-BAD-SYNTAX:CAPS"></a>P11_KIT_URI_BAD_SYNTAX</p></td>
<td class="enum_member_description">
<p>The URI had a bad syntax</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-BAD-VERSION:CAPS"></a>P11_KIT_URI_BAD_VERSION</p></td>
<td class="enum_member_description">
<p>The URI contained a bad version number</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="P11-KIT-URI-NOT-FOUND:CAPS"></a>P11_KIT_URI_NOT_FOUND</p></td>
<td class="enum_member_description">
<p>A requested part of the URI was not found</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="P11KitUri"></a><h3>P11KitUri</h3>
<pre class="programlisting">typedef struct p11_kit_uri P11KitUri;
</pre>
<p>A structure representing a PKCS#11 URI. There are no public fields
visible in this structure. Use the various accessor functions.</p>
</div>
<hr>
<div class="refsect2">
<a name="p11-kit-uri"></a><h3>p11_kit_uri</h3>
<pre class="programlisting">typedef struct p11_kit_uri p11_kit_uri;
</pre>
</div>
<hr>
<div class="refsect2">
<a name="P11-KIT-URI-NO-MEMORY:CAPS"></a><h3>P11_KIT_URI_NO_MEMORY</h3>
<pre class="programlisting">#define P11_KIT_URI_NO_MEMORY P11_KIT_URI_UNEXPECTED
</pre>
<p>Unexpected memory allocation failure result. Same as <a class="link" href="p11-kit-URIs.html#P11-KIT-URI-UNEXPECTED:CAPS"><span class="type">P11_KIT_URI_UNEXPECTED</span></a>.</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>