The IBM PKCS package, com.ibm.security.pkcs9, consists of a variety of classes to help in the instantiation and manipulation of attributes defined in the PKCS #9 Version 1.1 standard. This package also includes a number of enhancements for the Version 2.0 standard.
The code samples below show you how to create and manipulate representative PKCS #9 single-valued and multi-valued attributes (SigningTime and UnstructuredName, respectively), and how to use the PKCS9 class to instantiate any PKCS #9 attribute.
Consult the PKCS9SingleValAttr.java file for code samples of how to create and use single-valued attributes.
Consult the PKCS9MultiValAttr.java file for code samples of how to create and use multi-valued attributes.
Consult the PKCS9Pkcs9.java file for code samples of how to create and use the PKCS9 class to create specific attributes.
All the sample .java files can be found within
docs\pkcs\pkcssamples.jar
and on a Unix system in
docs/pkcs/pkcssamples.jar.
Within the jar file there is a
src directory containing the source code for the samples.