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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="Apache Forrest" name="Generator">
<meta name="Forrest-version" content="0.6">
<meta name="Forrest-skin-name" content="pelt">
<title>Frequently Asked Questions - C++</title>
<link type="text/css" href="../skin/basic.css" rel="stylesheet">
<link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
<link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
<link type="text/css" href="../skin/profile.css" rel="stylesheet">
<script src="../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../skin/fontsize.js" language="javascript" type="text/javascript"></script>
</head>
<body onload="init()">
<script type="text/javascript">ndeSetTextSize();</script>
<div id="top">
<!--+
|breadtrail
+-->
<div class="breadtrail">
<a href="http://www.apache.org/">apache</a> > <a href="http://xml.apache.org/">xml.apache</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
</div>
<!--+
|header
+-->
<div class="header">
<!--+
|start group logo
+-->
<div class="grouplogo">
<a href="http:///xml.apache.org"><img class="logoImage" alt="Apache XML" src="../images/group-logo.gif"></a>
</div>
<!--+
|end group logo
+-->
<!--+
|start Project Logo
+-->
<div class="projectlogo">
<a href="http://xml.apache.org/security"><img class="logoImage" alt="Apache XML Security" src="../images/project-logo.gif"></a>
</div>
<!--+
|end Project Logo
+-->
<!--+
|start Search
+-->
<div class="searchbox">
<form action="http://www.google.com/search" method="get" class="roundtopsmall">
<input value="xml.apache.org/security" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google:');" value="Search the site with google:" size="25" name="q" id="query" type="text">
<input name="Search" value="Search" type="submit">
</form>
</div>
<!--+
|end search
+-->
<!--+
|start Tabs
+-->
<ul id="tabs">
<li>
<a class="base-not-selected" href="../index.html">Home</a>
</li>
<li>
<a class="base-not-selected" href="../Java/index.html">Java</a>
</li>
<li class="current">
<a class="base-selected" href="../c/index.html">C++</a>
</li>
</ul>
<!--+
|end Tabs
+-->
</div>
</div>
<div id="main">
<div id="publishedStrip">
<!--+
|start Subtabs
+-->
<div id="level2tabs"></div>
<!--+
|end Endtabs
+-->
<script type="text/javascript" language="JavaScript"><!--
document.write("Published: " + document.lastModified);
// --></script>
</div>
<!--+
|breadtrail
+-->
<div class="breadtrail">
</div>
<!--+
|start Menu, mainarea
+-->
<!--+
|start Menu
+-->
<div id="menu">
<div onclick="SwitchMenu('menu_selected_1.1', '../skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">C++</div>
<div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
<div class="menuitem">
<a title="" href="../c/index.html">Index</a>
</div>
<div class="menuitem">
<a title="" href="../c/installation.html">Installation</a>
</div>
<div class="menupage">
<div class="menupagetitle">FAQs</div>
</div>
<div class="menuitem">
<a title="" href="../c/apiDocs/index.html">API Docs</a>
</div>
<div class="menuitem">
<a title="" href="http://nagoya.apache.org/~blautenb/xml-security-c/apiDocs/">Nightly API build</a>
</div>
<div class="menuitem">
<a title="" href="../c/tools.html">Tools</a>
</div>
<div class="menuitem">
<a title="" href="../c/releases.html">Release Information</a>
</div>
<div class="menuitem">
<a title="" href="../c/credits.html">Credits</a>
</div>
<div class="menuitem">
<a title="" href="../c/interop.html">Interoperability</a>
</div>
</div>
<div onclick="SwitchMenu('menu_1.2', '../skin/')" id="menu_1.2Title" class="menutitle">Programming</div>
<div id="menu_1.2" class="menuitemgroup">
<div class="menuitem">
<a title="" href="../c/programming.html">Signatures</a>
</div>
<div class="menuitem">
<a title="" href="../c/prog_enc.html">Encryption</a>
</div>
</div>
<div id="credit"></div>
<div id="roundbottom">
<img style="display: none" class="corner" height="15" width="15" alt="" src="../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
<!--+
|alternative credits
+-->
</div>
<!--+
|end Menu
+-->
<!--+
|start content
+-->
<div id="content">
<div id="skinconf-txtlink"></div>
<h1>Frequently Asked Questions - C++</h1>
<a name="N10008"></a><a name="Questions"></a>
<h2 class="h3">Questions</h2>
<div class="section">
<a name="N1000C"></a><a name="general_c"></a>
<h3 class="h4">1. Compiling and Using the Library</h3>
<a name="N10010"></a><a name="openssl_c"></a>
<h4 class="faq">1.1.
Is OpenSSL required?
</h4>
<div align="right">
<a href="#openssl_c-menu">^</a>
</div>
<div style="margin-left: 15px">
<p>
The main development work for the library is done using OpenSSL, so
this is the recommended option. However, a Windows
Crypto API interface is also now provided.
</p>
<p>
It is also possible to implement interfaces for other cryptographic
libraries and pass them into the xml-security-c library during
initialisation (via the <em>XSECPlatformUtils::Initialise()</em>
call).
</p>
</div>
<a name="N1001E"></a><a name="openssl2_c"></a>
<h4 class="faq">1.2.
Does the library provide a full C++ wrapper for OpenSSL?
</h4>
<div align="right">
<a href="#openssl2_c-menu">^</a>
</div>
<div style="margin-left: 15px">
<p>
The C++ crypto interface layer provided for the library provides only
the smallest subset of cryptographic functions necessary for the
library to make calls to the provided library. Applications will
need to work directly with OpenSSL (or other libraries) to read and
manipulate encryption keys that should then be wrapped in XSECCrypto*
objects and passed into the library.
</p>
</div>
<a name="N10026"></a><a name="wincapi_c"></a>
<h4 class="faq">1.3.
What is WinCAPI?
</h4>
<div align="right">
<a href="#wincapi_c-menu">^</a>
</div>
<div style="margin-left: 15px">
<p>
WinCAPI is the developmental interface being built to give
users of the library access to the Windows Cryptographic library.
</p>
<p>
It is <em>not</em> a C API wrapper for the overall library.
</p>
</div>
<a name="N10034"></a><a name="xalan_c"></a>
<h4 class="faq">1.4.
Is Xalan required?
</h4>
<div align="right">
<a href="#xalan_c-menu">^</a>
</div>
<div style="margin-left: 15px">
<p>
The library can be compiled without linking to Xalan-c. However
doing so will disable support for XPath and XSLT transformations.
</p>
<p>
To disable Xalan-c support either use --without-xalan when running
configure on UNIX, or use the VC++ "without Xalan" settings.
</p>
</div>
<a name="N1003F"></a><a name="oldXalanC"></a>
<h4 class="faq">1.5.
Are versions of Xalan prior to 1.6 supported?
</h4>
<div align="right">
<a href="#oldXalanC-menu">^</a>
</div>
<div style="margin-left: 15px">
<p>
No. Whilst the functionality required is available in prior
versions, the location of include files changed in 1.6. A
decision was made in version 1.0.0 of xml-security-c to
update the source to support these new locations.
</p>
</div>
<a name="N10047"></a><a name="elementorder"></a>
<h4 class="faq">1.6.
I sign a document and when I try to verify using the same key, it fails
</h4>
<div align="right">
<a href="#elementorder-menu">^</a>
</div>
<div style="margin-left: 15px">
<p>
After you have created the XMLSignature object, before you sign the
document, you <em>must</em> embed the signature element in the owning
document (which is returned by the call to
<span class="codefrag">DSIGSignature::createBlankSignature(...)</span>) before
calling the <span class="codefrag">DSIGSignature::sign()</span> method,
</p>
<p>
During canonicalisation of the SignedInfo element, the library looks
at the parent and ancestor nodes of the Signature element to find
any namespaces that the SignedInfo node has inherited. Any that are
found are embedded in the canonical form of the SignedInfo. (This
is not true when Exclusive Canonicalisation is used, but it is still
good practice to insert the element node prior to the sign()
method being called).
</p>
<p>
If you have not embedded the signature node in the document, it will
not have any parent or ancestor nodes, so it will not inherit their
namespaces. If you then embed it in the document and call <span class="codefrag">
verify()</span>, the namespaces will be found and the canonical
form of SignedInfo will be different to that generated during
<span class="codefrag">sign()</span>.
</p>
</div>
<a name="N10064"></a><a name="ids"></a>
<h4 class="faq">1.7.
How does the library identify Id attributes?
</h4>
<div align="right">
<a href="#ids-menu">^</a>
</div>
<div style="margin-left: 15px">
<p>
During a signing operation, finding the correct Id attribute is
vital. Should the wrong Id Attribute be used, the wrong
part of the document will be identified, and what the user signs
will not be what they expect to sign.
</p>
<p>
The preferred method (and the method the library uses first) of
finding an Id is via the DOM Level 2 call
<em>DOMDocument::getElementById()</em>. This indicates to the
library that the Id has been explicitly identified via a schema,
DTD or during document building. However, if this call fails, the
library will then search the document for attributes named "Id" or
"id" with the appropriate value. The first one found will be used
as document fragment identifier.
</p>
<p>
As of version 1.2, the library also provides methods to allow
callers to set additional Id attribute names. This can be
done in one of two ways.
<em>DSIGSignature::registerIdAttributeName()</em> will register
a new name that will not be matched to a namespace.
<em>DSIGDSignature::registerIdAttribiteNameNS()</em> will
register an attribute name together with the namespace in
which the attribute resides.
</p>
<p>
As this is a potential security exposure, this behaviour can be
disabled using a call to
<em>DISGSignatures::setIdByAttributeName(false)</em>. There are
also methods provided to modify the list of attributes that will
be searched. However it is recommended that these methods not be
used, and DOM attributes of Type=ID be used.
</p>
<div class="frame warning">
<div class="label">Warning</div>
<div class="content">
In version 1.1 and above, the library defaults to searching for Id
attributes by name if a search by Id fails. As this is a potential
security risk, this behaviour may be changed in a future version
of the library.
</div>
</div>
</div>
<a name="N10084"></a><a name="xkms_support"></a>
<h4 class="faq">1.8.
What parts of the XKMS specification does the library support?
</h4>
<div align="right">
<a href="#xkms_support-menu">^</a>
</div>
<div style="margin-left: 15px">
<p>
The library currently supports X-KISS (XML Key Information
Service Specification) message generation and processing.
Support for X-KRSS (XML Key Registration Service Specification)
will be provided in version 1.3 of the library.
</p>
</div>
<a name="N1008C"></a><a name="xkms_client"></a>
<h4 class="faq">1.9.
Does the library provide a programmatic XKMS client?
</h4>
<div align="right">
<a href="#xkms_client-menu">^</a>
</div>
<div style="margin-left: 15px">
<p>
Not yet. A command line tool <em>xklient</em> is provided for
generating and processing messages. This can be used as an
example for processing XKMS messages.
</p>
<p>
A programmatic client will be provided in version 1.3 of the C++
library.
</p>
</div>
</div>
</div>
<!--+
|end content
+-->
<div class="clearboth"> </div>
</div>
<div id="footer">
<!--+
|start bottomstrip
+-->
<div class="lastmodified">
<script type="text/javascript"><!--
document.write("Last Published: " + document.lastModified);
// --></script>
</div>
<div class="copyright">
Copyright © 2002-2005 The Apache Software Foundation.</div>
<!--+
|end bottomstrip
+-->
</div>
</body>
</html>
|