Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"Eclipse Public License v1.0" which accompanies this distribution,
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
Nokia Corporation - initial contribution.
Contributors:
-->
<!DOCTYPE concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-88EC0D74-5595-5FA8-B7BA-B914CC8022FB" xml:lang="en"><title>Listing
Contents of Certificate Stores</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>The list command is used to display the content of the certificate store.
It can be used to display the overall content of all certstore implementations,
to display the content of a specific certstore implementation, or to display
details about a specific certificate if its label is known. </p>
<p><b>Listing the content of all certstore implementations </b> </p>
<p>To see all the certificates available on the device, use the command: </p>
<p><userinput>certtool -list</userinput> </p>
<p>The output, depending on the actual certificates present on the device
will look similar to: </p>
<codeblock id="GUID-BB1AB0FA-AE85-50B4-9A9B-2E3EB8A5BAA5" xml:space="preserve">Store Label: Software certificate store
Root5CA is a X509 format which is a Root (CA) type
Store Label: Software certificate store
SymbianDSACA is a X509 format which is a Root (CA) type
Store Label: Software certificate store
SymbianRSACA is a X509 format which is a Root (CA) type</codeblock>
<p><b>Listing the content of a specific certstore implementation </b> </p>
<p>If only the content of a specific certstore implementation is to be retrieved,
you can restrict the list command to that implementation using the –store
option. Suppose the content of the certstore implementation with index 0 (see
the section <xref href="GUID-F6C20181-0F03-5B8A-B548-C81FF8824503.dita">Working
with multiple certstore implementations</xref> for details on how to list
the available certstore implementations) is to be retrieved, issue the command: </p>
<p><userinput>certtool –store 0 –list</userinput> </p>
<p>Depending on the content of the certstore implementation with index 0,
output similar to the following is displayed: </p>
<codeblock id="GUID-B8A8F3E9-AC86-537A-AD96-76B8298BCB13" xml:space="preserve">Symbian OS CertStore Manipulation Tool
Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
Label: TOCSP-Root5-RSA Format: X509 Owner Type: Root (CA)
Issuer Name: TOCSP-Root5-RSA Subject Name: TOCSP-Root5-RSA
Valid From: 13:52:28 Sun 26th Apr 2009 Valid Until: 13:52:28 Wed 25th Apr 2012
Trusted for Applications: SWInstall </codeblock>
<p>If you try to specify a non-existing certstore implementation an error
will occur, as shown: </p>
<codeblock id="GUID-433CCFEE-2AB6-5237-941E-9A8542E3892B" xml:space="preserve">Symbian OS CertStore Manipulation Tool
Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
The specified certstore implementation does not exist.
Error during list!
Error code KErrArgument.</codeblock>
<p><b>Providing certstore list based on owner type </b> </p>
<p>It is possible to display a list of certificates according to an owner
type. To do so, use the following command: </p>
<p><userinput>certtool -owner ca -list</userinput> </p>
<p>The output, depending on the actual certificates present on the device,
will look similar to: </p>
<codeblock id="GUID-E87CF5AA-F53B-586A-AAD0-FBB78CC97A2E" xml:space="preserve">Store Label: Software certificate store
Version: 1.00 Serial Number: 0 Manufacturer: Nokia Corporation Store Type: Read only
Label: Root5CA Format: X509 Owner Type: Root (CA)
Issuer Name: Root5-RSA Subject Name: Root5-RSA
Valid From 16:34:42 Wed 3rd Mar 2004 Valid Until 16:34:42 Sat 1st Mar 2014
Trusted for Applications: SWInstall
Store Label: Software certificate store
Version: 1.00 Serial Number: 0 Manufacturer: Nokia Corporation Store Type: Read only
Label: SymbianTestDSACA Format: X509 Owner Type: Root (CA)
Issuer Name: Nokia - DSA Subject Name: Nokia - DSA
Valid From 14:37:11 Sun 18th Apr 2004 Valid Until 14:37:11 Mon 21st Sep 2020
Trusted for Applications: SWInstall SWInstallOCSP
Store Label: Software certificate store
Version: 1.00 Serial Number: 0 Manufacturer: Nokia Corporation Store Type: Read only
Label: SymbianTestRSACA Format: X509 Owner Type: Root (CA)
Issuer Name: Nokia - RSA Subject Name: Nokia - RSA
Valid From 14:36:14 Sun 18th Apr 2004 Valid Until 14:36:14 Mon 21st Sep 2020
Trusted for Applications: SWInstall SWInstallOCSP </codeblock>
<p><b>Displaying information about a certificate </b> </p>
<p>It is possible to display information about a specific certificate of which
the label is known. To display information about a certificate with label
“…”, issue the command: </p>
<p><userinput>certtool –list “Limited Liability”</userinput> </p>
<p>Remember that labels are case sensitive. The output should be similar to: </p>
<codeblock id="GUID-29C4953A-F015-5EA6-B65A-95739D58525D" xml:space="preserve">Symbian OS CertStore Manipulation Tool
Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
Label: Limited Liability Format: WTLS Owner Type: Root (CA)
Issuer Name: Limited Liability Subject Name: Limited Liability
Valid From: 15:13:18 Tue 29th Feb 2000 Valid Until: 15:43:18 Sat 29th Feb 2020
Trusted for Applications: </codeblock>
<p>If no certificate in the certstore corresponds to the given label, the
following error will occur: </p>
<codeblock id="GUID-33005CEE-8A77-5188-A95C-B9BF95D2E2CB" xml:space="preserve">Symbian OS CertStore Manipulation Tool
Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
Cannot find the specified certificate.</codeblock>
<p><b>Providing detailed output of a certificate </b> </p>
<p>It is possible to display detailed information about a specific certificate
of which the label is known. To do so, use the command: </p>
<p><userinput>certtool –list -d</userinput> </p>
<p>The output, depending on the actual certificates present on the device,
will look similar to: </p>
<codeblock id="GUID-D6A9AB62-6452-51EA-8C3A-F239FF85711C" xml:space="preserve">Store Label: Software certificate store
Version: 1.00 Serial Number: 0 Manufacturer: Nokia Corporation Store Type: Read only
Label: Root5CA Format: X509 Owner Type: Root (CA)
Issuer Name: Root5-RSA Subject Name: Root5-RSA
Valid From 16:34:42 Wed 3rd Mar 2004 Valid Until 16:34:42 Sat 1st Mar 2014
Trusted for Applications: SWInstall
Store Label: Software certificate store
Version: 1.00 Serial Number: 0 Manufacturer: Nokia Corporation Store Type: Read only
Label: SymbianTestDSACA Format: X509 Owner Type: Root (CA)
Issuer Name: Symbian Test - DSA Subject Name: Symbian Test - DSA
Valid From 14:37:11 Sun 18th Apr 2004 Valid Until 14:37:11 Mon 21st Sep 2020
Trusted for Applications: SWInstall SWInstallOCSP </codeblock>
</conbody><related-links>
<link href="GUID-B946BDF0-C5D8-57E2-9D05-7BE134AD032E.dita#GUID-B946BDF0-C5D8-57E2-9D05-7BE134AD032E/GUID-DD7D5D55-A2F1-54FB-AA38-B4A7C920B6A6">
<linktext>Manipulating Applicability and Trust Settings for a Certificate</linktext>
</link>
<link href="GUID-DCC2060B-BFEC-5ECF-8154-5AE9C8513F75.dita"><linktext>Removing
Certificates</linktext></link>
<link href="GUID-6CDB86E4-89BB-5266-8CEC-7353B664D638.dita"><linktext>Importing
Certificates</linktext></link>
</related-links></concept>