<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
<!ENTITY chapter-compiling-and-linking 	SYSTEM "chapters/compiling-and-linking.sgml">
<!ENTITY chapter-init-and-shutdown 	SYSTEM "chapters/init-and-shutdown.sgml">
<!ENTITY chapter-sign-and-encrypt 	SYSTEM "chapters/sign-and-encrypt.sgml">
<!ENTITY chapter-verify-and-decrypt 	SYSTEM "chapters/verify-and-decrypt.sgml">
<!ENTITY chapter-creating-templates 	SYSTEM "chapters/creating-templates.sgml">
<!ENTITY chapter-using-keys		SYSTEM "chapters/using-keys.sgml">
<!ENTITY chapter-using-keysmngr 	SYSTEM "chapters/using-keysmngr.sgml">
<!ENTITY chapter-using-x509-certs	SYSTEM "chapters/using-x509-certs.sgml">
<!ENTITY chapter-using-transforms	SYSTEM "chapters/using-transforms.sgml">
<!ENTITY chapter-using-contexts		SYSTEM "chapters/using-contexts.sgml">
<!ENTITY chapter-new-crypto		SYSTEM "chapters/new-crypto.sgml">
<!ENTITY chapter-examples		SYSTEM "chapters/examples.sgml">

<!ENTITY xmlsec-index 			SYSTEM "xmlsec-index.sgml">

<!ENTITY xmlsec-app 			SYSTEM "sgml/app.sgml">
<!ENTITY xmlsec-base64 			SYSTEM "sgml/base64.sgml">
<!ENTITY xmlsec-bn 			SYSTEM "sgml/bn.sgml">
<!ENTITY xmlsec-buffer 			SYSTEM "sgml/buffer.sgml">
<!ENTITY xmlsec-dl 			SYSTEM "sgml/dl.sgml">
<!ENTITY xmlsec-errors 			SYSTEM "sgml/errors.sgml">
<!ENTITY xmlsec-io 			SYSTEM "sgml/io.sgml">
<!ENTITY xmlsec-keyinfo 		SYSTEM "sgml/keyinfo.sgml">
<!ENTITY xmlsec-keysdata 		SYSTEM "sgml/keysdata.sgml">
<!ENTITY xmlsec-keys 			SYSTEM "sgml/keys.sgml">
<!ENTITY xmlsec-keysmngr 		SYSTEM "sgml/keysmngr.sgml">
<!ENTITY xmlsec-list 			SYSTEM "sgml/list.sgml">
<!ENTITY xmlsec-membuf 			SYSTEM "sgml/membuf.sgml">
<!ENTITY xmlsec-nodeset 		SYSTEM "sgml/nodeset.sgml">
<!ENTITY xmlsec-parser 			SYSTEM "sgml/parser.sgml">
<!ENTITY xmlsec-templates 		SYSTEM "sgml/templates.sgml">
<!ENTITY xmlsec-transforms 		SYSTEM "sgml/transforms.sgml">
<!ENTITY xmlsec-version 		SYSTEM "sgml/version.sgml">
<!ENTITY xmlsec-xmldsig 		SYSTEM "sgml/xmldsig.sgml">
<!ENTITY xmlsec-xmlenc 			SYSTEM "sgml/xmlenc.sgml">
<!ENTITY xmlsec-xmlsec 			SYSTEM "sgml/xmlsec.sgml">
<!ENTITY xmlsec-xmltree 		SYSTEM "sgml/xmltree.sgml">
<!ENTITY xmlsec-x509 			SYSTEM "sgml/x509.sgml">

<!ENTITY xmlsec-openssl-app 		SYSTEM "sgml/openssl/app.sgml">
<!ENTITY xmlsec-openssl-bn 		SYSTEM "sgml/openssl/bn.sgml">
<!ENTITY xmlsec-openssl-ciphers		SYSTEM "sgml/openssl/ciphers.sgml">
<!ENTITY xmlsec-openssl-crypto		SYSTEM "sgml/openssl/crypto.sgml">
<!ENTITY xmlsec-openssl-evp 		SYSTEM "sgml/openssl/evp.sgml">
<!ENTITY xmlsec-openssl-x509 		SYSTEM "sgml/openssl/x509.sgml">

<!ENTITY xmlsec-gnutls-app 		SYSTEM "sgml/gnutls/app.sgml">
<!ENTITY xmlsec-gnutls-crypto 		SYSTEM "sgml/gnutls/crypto.sgml">

<!ENTITY xmlsec-nss-app 		SYSTEM "sgml/nss/app.sgml">
<!ENTITY xmlsec-nss-bignum		SYSTEM "sgml/nss/bignum.sgml">
<!ENTITY xmlsec-nss-crypto 		SYSTEM "sgml/nss/crypto.sgml">
<!ENTITY xmlsec-nss-keysstore		SYSTEM "sgml/nss/keysstore.sgml">
<!ENTITY xmlsec-nss-pkikeys		SYSTEM "sgml/nss/pkikeys.sgml">
<!ENTITY xmlsec-nss-x509		SYSTEM "sgml/nss/x509.sgml">

<!ENTITY xmlsec-mscrypto-app 		SYSTEM "sgml/mscrypto/app.sgml">
<!ENTITY xmlsec-mscrypto-certkeys	SYSTEM "sgml/mscrypto/certkeys.sgml">
<!ENTITY xmlsec-mscrypto-crypto 	SYSTEM "sgml/mscrypto/crypto.sgml">
<!ENTITY xmlsec-mscrypto-keysstore	SYSTEM "sgml/mscrypto/keysstore.sgml">
<!ENTITY xmlsec-mscrypto-x509		SYSTEM "sgml/mscrypto/x509.sgml">

<!ENTITY xmlsec-example-sign1 		SYSTEM "examples/sign1.sgml">
<!ENTITY xmlsec-example-sign2 		SYSTEM "examples/sign2.sgml">
<!ENTITY xmlsec-example-sign3 		SYSTEM "examples/sign3.sgml">

<!ENTITY xmlsec-example-verify1 	SYSTEM "examples/verify1.sgml">
<!ENTITY xmlsec-example-verify2 	SYSTEM "examples/verify2.sgml">
<!ENTITY xmlsec-example-verify3 	SYSTEM "examples/verify3.sgml">
<!ENTITY xmlsec-example-verify4 	SYSTEM "examples/verify4.sgml">

<!ENTITY xmlsec-example-encrypt1 	SYSTEM "examples/encrypt1.sgml">
<!ENTITY xmlsec-example-encrypt2 	SYSTEM "examples/encrypt2.sgml">
<!ENTITY xmlsec-example-encrypt3 	SYSTEM "examples/encrypt3.sgml">

<!ENTITY xmlsec-example-decrypt1 	SYSTEM "examples/decrypt1.sgml">
<!ENTITY xmlsec-example-decrypt2 	SYSTEM "examples/decrypt2.sgml">
<!ENTITY xmlsec-example-decrypt3 	SYSTEM "examples/decrypt3.sgml">

<!ENTITY xmlsec-example-sign1-tmpl	SYSTEM "examples/sign1-tmpl.sgml">
<!ENTITY xmlsec-example-sign1-res	SYSTEM "examples/sign1-res.sgml">
<!ENTITY xmlsec-example-sign2-doc	SYSTEM "examples/sign2-doc.sgml">
<!ENTITY xmlsec-example-sign2-res	SYSTEM "examples/sign2-res.sgml">
<!ENTITY xmlsec-example-sign3-doc	SYSTEM "examples/sign3-doc.sgml">
<!ENTITY xmlsec-example-sign3-res	SYSTEM "examples/sign3-res.sgml">
<!ENTITY xmlsec-example-verify4-res 	SYSTEM "examples/verify4-res.sgml">
<!ENTITY xmlsec-example-verify4-tmpl 	SYSTEM "examples/verify4-tmpl.sgml">
<!ENTITY xmlsec-example-verify4-bad-res  SYSTEM "examples/verify4-bad-res.sgml">
<!ENTITY xmlsec-example-verify4-bad-tmpl SYSTEM "examples/verify4-bad-tmpl.sgml">

<!ENTITY xmlsec-example-encrypt1-tmpl	SYSTEM "examples/encrypt1-tmpl.sgml">
<!ENTITY xmlsec-example-encrypt1-res	SYSTEM "examples/encrypt1-res.sgml">
<!ENTITY xmlsec-example-encrypt2-doc	SYSTEM "examples/encrypt2-doc.sgml">
<!ENTITY xmlsec-example-encrypt2-res	SYSTEM "examples/encrypt2-res.sgml">
<!ENTITY xmlsec-example-encrypt3-doc	SYSTEM "examples/encrypt3-doc.sgml">
<!ENTITY xmlsec-example-encrypt3-res	SYSTEM "examples/encrypt3-res.sgml">
]>
<book id="index">
  <bookinfo>
    <title>XML Security Library Reference Manual</title>
    <authorgroup>
      <author>
        <firstname>Aleksey</firstname>
        <surname>Sanin</surname>
        <affiliation>
	  <address>
	    <email>aleksey@aleksey.com</email>
	  </address>
        </affiliation>
      </author>
    </authorgroup>
    <copyright>
      <year>2002-2003</year>
      <holder>Aleksey Sanin</holder>
    </copyright>	
    <legalnotice>
      <para>Permission is granted to make and distribute verbatim
      copies of this manual provided the copyright notice and this
      permission notice are preserved on all copies.</para>
      <para>Permission is granted to copy and distribute modified
      versions of this manual under the conditions for verbatim
      copying, provided also that the entire resulting derived work is
      distributed under the terms of a permission notice identical to
      this one.</para>
      
      <para>Permission is granted to copy and distribute translations
      of this manual into another language, under the above conditions
      for modified versions.</para>
    </legalnotice>

    <abstract>
      <para>This manual documents the interfaces of the xmlsec
      library and has some short notes to help get you up to speed
      with using the library.</para>
    </abstract>
  </bookinfo>

  <part id="xmlsec-notes">
    <title>XML Security Library Tutorial</title>
    <chapter id="xmlsec-notes-overview">
	<title>Overview.</title>
	<para>XML Security Library provides support for XML Digital Signature 
	and XML Encryption. It is based on LibXML/LibXSLT and can use
	practicaly any crypto library (currently there is "out of the box" 
	support for OpenSSL, GnuTLS and NSS).
	</para>
    </chapter>
    <chapter id="xmlsec-notes-structure">
	<title>XML Security Library Structure.</title>
	<para>In order to provide the an ability to use different crypto engines, 
	the XML Security Library is splitted in two parts: core library (xmlsec)
	and crypto library (xmlsec-openssl, xmlsec-gnutls, xmlsec-nss, ...). 
	<figure>
	    <title>The library structure and dependencies.</title>
	    <graphic fileref="images/structure.png" align="center"></graphic>
	</figure>	 
	</para>
	<para>The core library has no dependency on any crypto library and provides 
	implementation of all the engines as well as support for all the non 
	crypto transforms (xml parser, c14n transforms, xpath and xslt 
	transforms,...). The XML Security Crypto library provides 
	implementations for crypto transforms, crypto keys data and key 
	data stores. Application is linked with particular XML Security 
	Crypto library (or even libraries), but the actual application 
	code might be general enough so switching crypto engine would be 
	a matter of changing several #include directives.</para>
    </chapter>
    
    &chapter-compiling-and-linking;
    &chapter-init-and-shutdown;
    &chapter-sign-and-encrypt;
    &chapter-creating-templates;
    &chapter-verify-and-decrypt;
    &chapter-using-keys;
    &chapter-using-keysmngr;
    &chapter-using-x509-certs;
    &chapter-using-transforms;
    &chapter-using-contexts;
    &chapter-new-crypto;
    &chapter-examples;
    
    <chapter id="xmlsec-signature-klasses">
    <title>APPENDIX A. XML Security Library Signature Klasses.</title>
	<figure>
	    <title>XML Security Library Signature Klasses.</title>
	    <graphic fileref="images/signature-structure.png" align="center"></graphic>
	</figure>	 
    </chapter>

    <chapter id="xmlsec-encryption-klasses">
    <title>APPENDIX B. XML Security Library Encryption Klasses.</title>
	<figure>
	    <title>XML Security Library Encryption Klasses.</title>
	    <graphic fileref="images/encryption-structure.png" align="center"></graphic>
	</figure>	 
    </chapter>
  </part>

  <part id="xmlsec-reference">
    <title>XML Security Library API Reference.</title>
    
    <chapter id="xmlsec-ref">
    <title>XML Security Core Library API Reference.</title>
    <para>This section contains the API reference for xmlsec. All
    the public interfaces are documented here. This reference guide is
    build by extracting comments from the code sources. </para>

    &xmlsec-app;
    &xmlsec-base64;
    &xmlsec-bn;
    &xmlsec-buffer;
    &xmlsec-dl;
    &xmlsec-errors;
    &xmlsec-io;
    &xmlsec-keyinfo;
    &xmlsec-keysdata;
    &xmlsec-keys;
    &xmlsec-keysmngr;
    &xmlsec-list;
    &xmlsec-membuf;
    &xmlsec-nodeset;
    &xmlsec-parser;
    &xmlsec-templates;
    &xmlsec-transforms;
    &xmlsec-version;
    &xmlsec-xmldsig;
    &xmlsec-xmlenc;
    &xmlsec-xmlsec;
    &xmlsec-xmltree;
    &xmlsec-x509;
    </chapter>

    <chapter id="xmlsec-openssl-ref">
    <title>XML Security Library for OpenSLL API Reference.</title>
    <para>This section contains the API reference for xmlsec-openssl. All
    the public interfaces are documented here. This reference guide is
    build by extracting comments from the code sources. </para>

    &xmlsec-openssl-app;
    &xmlsec-openssl-bn;
    &xmlsec-openssl-crypto;
    &xmlsec-openssl-evp;
    &xmlsec-openssl-x509;
    </chapter>

    <chapter id="xmlsec-gnutls-ref">
    <title>XML Security Library for GnuTLS API Reference.</title>
    <para>This section contains the API reference for xmlsec-gnutls. All
    the public interfaces are documented here. This reference guide is
    build by extracting comments from the code sources. </para>

    &xmlsec-gnutls-app;
    &xmlsec-gnutls-crypto;
    </chapter>

    <chapter id="xmlsec-nss-ref">
    <title>XML Security Library for NSS API Reference.</title>
    <para>This section contains the API reference for xmlsec-nss. All
    the public interfaces are documented here. This reference guide is
    build by extracting comments from the code sources. </para>

    &xmlsec-nss-app;
    &xmlsec-nss-bignum;
    &xmlsec-nss-crypto;
    &xmlsec-nss-keysstore;
    &xmlsec-nss-pkikeys;
    &xmlsec-nss-x509;
    </chapter>

    <chapter id="xmlsec-mscrypto-ref">
    <title>XML Security Library for MSCrypto API Reference.</title>
    <para>This section contains the API reference for xmlsec-mscrypto. All
    the public interfaces are documented here. This reference guide is
    build by extracting comments from the code sources. </para>

    &xmlsec-mscrypto-app;
    &xmlsec-mscrypto-certkeys;
    &xmlsec-mscrypto-crypto;
    &xmlsec-mscrypto-keysstore;
    &xmlsec-mscrypto-x509;
    </chapter>
    
    <chapter id="xmlsec-index">
    <title>XML Security Library Reference Index</title>
    <para>
	<itemizedlist>
	&xmlsec-index;
	</itemizedlist>
    </para>	
    </chapter>
  </part>
</book>
