Java Doc for KeyHolder.java in  » Net » james-2.3.1 » org » apache » james » security » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » james 2.3.1 » org.apache.james.security 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.james.security.KeyHolder

KeyHolder
public class KeyHolder (Code)

Loads a java.security.KeyStore in memory and keeps it ready for the cryptographic activity.

It has the role of being a simpler intermediate to the crypto libraries. Uses specifically the Legion of the Bouncy Castle libraries, particularly for the SMIME activity.


version:
   CVS $Revision: 494012 $ $Date: 2007-01-08 11:23:58 +0100 (Mo, 08 Jan 2007) $
since:
   2.2.1



Constructor Summary
public  KeyHolder(String keyStoreFileName, String keyStorePassword, String keyAlias, String keyAliasPassword, String keyStoreType)
     Creates a new instance of KeyHolder using java.security.KeyStore related parameters.
Parameters:
  keyStoreFileName - The (absolute) file name of the .keystore file to load the keystore from.
Parameters:
  keyStorePassword - The (optional) password used to check the integrity of the keystore.If given, it is used to check the integrity of the keystore data,otherwise, if null, the integrity of the keystore is not checked.
Parameters:
  keyAlias - The alias name of the key.If missing (is null) and if there is only one key in the keystore, will default to it.
Parameters:
  keyAliasPassword - The password of the alias for recovering the key.If missing (is null) will default to keyStorePassword.

Method Summary
public  SMIMESignedGeneratorcreateGenerator()
     Creates an SMIMESignedGenerator.
public  MimeMultipartgenerate(MimeMessage message)
     Generates a signed MimeMultipart from a MimeMessage.
Parameters:
  message - The message to sign.
public  MimeMultipartgenerate(MimeBodyPart content)
     Generates a signed MimeMultipart from a MimeBodyPart.
Parameters:
  content - The content to sign.
public  CertStoregetCertStore()
     Getter for property certStore.
public  X509CertificategetCertificate()
     Getter for property certificate.
public static  StringgetDefaultType()
     Returns the default keystore type as specified in the Java security properties file, or the string "jks" (acronym for "Java keystore") if no such property exists.
public  PrivateKeygetPrivateKey()
     Getter for property privateKey.
public static  StringgetSignerAddress(X509Certificate certificate)
     Extracts the signer email address (EMAILADDRESS=) from an X509Certificate distinguished name.
Parameters:
  certificate - The certificate to extract the information from.
public  StringgetSignerAddress()
     Getter for property signerAddress.
public static  StringgetSignerCN(X509Certificate certificate)
     Extracts the signer common name (CN=) from an X509Certificate distinguished name.
Parameters:
  certificate - The certificate to extract the information from.
public  StringgetSignerCN()
     Getter for property signerCN.
public static  StringgetSignerDistinguishedName(X509Certificate certificate)
     Extracts the signer distinguished name (DN) from an X509Certificate.
Parameters:
  certificate - The certificate to extract the information from.
public  StringgetSignerDistinguishedName()
     Getter for property signerDistinguishedName.


Constructor Detail
KeyHolder
public KeyHolder(String keyStoreFileName, String keyStorePassword, String keyAlias, String keyAliasPassword, String keyStoreType) throws KeyStoreException, FileNotFoundException, IOException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, CertificateException, UnrecoverableKeyException, NoSuchProviderException(Code)
Creates a new instance of KeyHolder using java.security.KeyStore related parameters.
Parameters:
  keyStoreFileName - The (absolute) file name of the .keystore file to load the keystore from.
Parameters:
  keyStorePassword - The (optional) password used to check the integrity of the keystore.If given, it is used to check the integrity of the keystore data,otherwise, if null, the integrity of the keystore is not checked.
Parameters:
  keyAlias - The alias name of the key.If missing (is null) and if there is only one key in the keystore, will default to it.
Parameters:
  keyAliasPassword - The password of the alias for recovering the key.If missing (is null) will default to keyStorePassword. At least one of the passwords must be provided.
Parameters:
  keyStoreType - The type of keystore.If missing (is null) will default to the keystore type as specified in the Java security properties file,or the string "jks" (acronym for "Java keystore") if no such property exists.
throws:
  java.security.KeyStoreException - Thrown when the keyAlias is specified and not found,or is not specified and either no alias is found or more than one is found.
See Also:   java.security.KeyStore.getDefaultType
See Also:   java.security.KeyStore.getInstance(String)
See Also:   java.security.KeyStore.load
See Also:   java.security.KeyStore.getKey
See Also:   java.security.KeyStore.getCertificate




Method Detail
createGenerator
public SMIMESignedGenerator createGenerator() throws CertStoreException, SMIMEException(Code)
Creates an SMIMESignedGenerator. Includes a signer private key and certificate, and a pool of certs and cerls (if any) to go with the signature. The generated SMIMESignedGenerator.



generate
public MimeMultipart generate(MimeMessage message) throws CertStoreException, NoSuchAlgorithmException, NoSuchProviderException, SMIMEException(Code)
Generates a signed MimeMultipart from a MimeMessage.
Parameters:
  message - The message to sign. The signed MimeMultipart.



generate
public MimeMultipart generate(MimeBodyPart content) throws CertStoreException, NoSuchAlgorithmException, NoSuchProviderException, SMIMEException(Code)
Generates a signed MimeMultipart from a MimeBodyPart.
Parameters:
  content - The content to sign. The signed MimeMultipart.



getCertStore
public CertStore getCertStore()(Code)
Getter for property certStore. Value of property certStore.



getCertificate
public X509Certificate getCertificate()(Code)
Getter for property certificate. Value of property certificate.



getDefaultType
public static String getDefaultType()(Code)
Returns the default keystore type as specified in the Java security properties file, or the string "jks" (acronym for "Java keystore") if no such property exists. The defaultType, issuing a KeyStore.getDefaultType().



getPrivateKey
public PrivateKey getPrivateKey()(Code)
Getter for property privateKey. Value of property privateKey.



getSignerAddress
public static String getSignerAddress(X509Certificate certificate)(Code)
Extracts the signer email address (EMAILADDRESS=) from an X509Certificate distinguished name.
Parameters:
  certificate - The certificate to extract the information from. The requested information.
See Also:    getSignerDistinguishedName(X509Certificate)



getSignerAddress
public String getSignerAddress()(Code)
Getter for property signerAddress. Value of property signerMailAddress.
See Also:    getSignerAddress(X509Certificate)



getSignerCN
public static String getSignerCN(X509Certificate certificate)(Code)
Extracts the signer common name (CN=) from an X509Certificate distinguished name.
Parameters:
  certificate - The certificate to extract the information from. The requested information.
See Also:    getSignerDistinguishedName(X509Certificate)



getSignerCN
public String getSignerCN()(Code)
Getter for property signerCN. Value of property signerCN.
See Also:    getSignerCN(X509Certificate)



getSignerDistinguishedName
public static String getSignerDistinguishedName(X509Certificate certificate)(Code)
Extracts the signer distinguished name (DN) from an X509Certificate.
Parameters:
  certificate - The certificate to extract the information from. The requested information.



getSignerDistinguishedName
public String getSignerDistinguishedName()(Code)
Getter for property signerDistinguishedName. Value of property signerDistinguishedName.
See Also:    getSignerDistinguishedName(X509Certificate)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.