- s - Variable in class it.trento.comune.j4sign.examples.GUITest
-
- s - Variable in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
- saltSource - Variable in class iaik.pkcs.pkcs11.wrapper.CK_PKCS5_PBKD2_PARAMS
-
PKCS#11:
CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE saltSource;
- sAttr - Variable in class it.trento.comune.j4sign.cms.ExternalSignatureSignerInfoGenerator
-
The externally set 'authenticated attributes' to be signed, other than
contentType, messageDigest, signingTime;
currently not used (no setter method).
- save() - Method in class it.trento.comune.j4sign.verification.CertificationAuthorities
-
Save certificates in authorities Salva i certificati in authorities
- saveFile(CMSSignedData, String) - Method in class it.trento.comune.j4sign.examples.CMSServlet
-
Deprecated.
Saves a CMS signed data file on the server file system; the extension
should be ".p7m" according to italian rules.
- SCARD_ABSENT - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_ATTR_ATR_STRING - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_ATTR_ICC_PRESENCE - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_ATTR_VENDOR_IFD_TYPE - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_ATTR_VENDOR_IFD_VERSION - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_ATTR_VENDOR_NAME - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_E_INVALID_HANDLE - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_E_INVALID_PARAMETER - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_E_INVALID_VALUE - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_E_NO_MEMORY - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_E_NOT_READY - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_E_TIMEOUT - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_E_UNSUPPORTED_REQUEST - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_EJECT_CARD - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_LEAVE_CARD - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_POWERED - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_PRESENT - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_PROTOCOL_DEFAULT - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_PROTOCOL_OPTIMAL - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_PROTOCOL_RAW - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_PROTOCOL_T0 - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_PROTOCOL_T1 - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_RESET_CARD - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_S_SUCCESS - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_SCOPE_USER - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_SHARE_DIRECT - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_SHARE_EXCLUSIVE - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_STATE_CHANGED - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_STATE_EMPTY - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_STATE_IGNORE - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_STATE_MUTE - Static variable in class it.trento.comune.j4sign.pcsc.PCSCHelper
-
- SCARD_STATE_PRESENT - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_STATE_PRESENT - Static variable in class it.trento.comune.j4sign.pcsc.PCSCHelper
-
- SCARD_STATE_UNAVAILABLE - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_STATE_UNAWARE - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_STATE_UNKNOWN - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_UNPOWER_CARD - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_W_REMOVED_CARD - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_W_RESET_CARD - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_W_UNPOWERED_CARD - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCARD_W_UNRESPONSIVE_CARD - Static variable in interface com.ibm.opencard.terminal.pcsc10.Pcsc10Constants
-
- SCardConnect(int, String, int, int, Integer) - Method in class com.ibm.opencard.terminal.pcsc10.OCFPCSC1
-
- SCardControl(int, int, byte[]) - Method in class com.ibm.opencard.terminal.pcsc10.OCFPCSC1
-
- SCardDisconnect(int, int) - Method in class com.ibm.opencard.terminal.pcsc10.OCFPCSC1
-
- SCardEstablishContext(int) - Method in class com.ibm.opencard.terminal.pcsc10.OCFPCSC1
-
- SCardGetAttrib(int, int) - Method in class com.ibm.opencard.terminal.pcsc10.OCFPCSC1
-
- SCardGetStatusChange(int, int, PcscReaderState[]) - Method in class com.ibm.opencard.terminal.pcsc10.OCFPCSC1
-
- SCardListReaders(String) - Method in class com.ibm.opencard.terminal.pcsc10.OCFPCSC1
-
- SCardReconnect(int, int, int, int, Integer) - Method in class com.ibm.opencard.terminal.pcsc10.OCFPCSC1
-
- SCardReleaseContext(int) - Method in class com.ibm.opencard.terminal.pcsc10.OCFPCSC1
-
- SCardTransmit(int, byte[]) - Method in class com.ibm.opencard.terminal.pcsc10.OCFPCSC1
-
- sd - Variable in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
- SEARCH_BY_CERTIFICATE_KEY_USAGE - Static variable in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
- SEARCH_BY_PRIVATE_KEY - Static variable in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
- sendSignatureAndCertificate() - Method in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
Implements of the HTTP POST that sends the encrypted digest and the
signer certificate to the server.
- serialNumber - Variable in class iaik.pkcs.pkcs11.wrapper.CK_TOKEN_INFO
-
must be blank padded and only the first 16 chars will be used
PKCS#11:
CK_CHAR serialNumber[16];
- serialNumber - Variable in class it.trento.comune.j4sign.verification.utils.DnWrapper
-
- serialVersionUID - Static variable in class it.trento.comune.j4sign.cms.utils.CMSVerifier
-
- serialVersionUID - Static variable in class it.trento.comune.j4sign.cms.utils.SignedStreamerServlet
-
- sessionHandle - Variable in class it.trento.comune.j4sign.pkcs11.PKCS11Signer
-
The PKCS#11 session identifier returned when a session is opened.
- sessionInfoFlagsToString(long) - Static method in class iaik.pkcs.pkcs11.wrapper.Functions
-
Converts the long value flags to a SessionInfoFlag string.
- sessionStateToString(long) - Static method in class iaik.pkcs.pkcs11.wrapper.Functions
-
Converts the long value state to a SessionState string.
- setAboutToSignStatus() - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
- setAlwaysCRLUpdate(boolean) - Method in class it.trento.comune.j4sign.verification.CertificationAuthorities
-
Set CRL control and update mode.
- setBaseHttpUrl(String) - Method in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
- setCard(CardInfo) - Method in class it.trento.comune.j4sign.pcsc.CardInReaderInfo
-
- setCertBytes(byte[]) - Method in class it.trento.comune.j4sign.cms.utils.CMSBuilder
-
- setCertBytes(String) - Method in class it.trento.comune.j4sign.cms.utils.CMSBuilder
-
- setCertificate(X509Certificate) - Method in class it.trento.comune.j4sign.cms.ExternalSignatureSignerInfoGenerator
-
Sets the signer certificate.
- setCertificate(byte[]) - Method in class it.trento.comune.j4sign.examples.DigestSignTask
-
Inserire qui la descrizione del metodo.
- setCertificate(byte[]) - Method in class it.trento.comune.j4sign.examples.FindCertTask
-
Inserire qui la descrizione del metodo.
- setCertificate(byte[]) - Method in class it.trento.comune.j4sign.examples.GUITest
-
Sets the signer certificate
- setCertificate(byte[]) - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
Setter method
- setCertificate(byte[]) - Method in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
Inserire qui la descrizione del metodo.
- setCerts(ArrayList) - Method in class it.trento.comune.j4sign.pcsc.CardInReaderInfo
-
- setCrlDir(File) - Method in class it.trento.comune.j4sign.verification.RootsVerifier
-
- setCrlDir(File) - Method in class it.trento.comune.j4sign.verification.Verifier
-
- setCryptokiLib(String) - Method in class it.trento.comune.j4sign.examples.CLITest
-
- setCryptokiLib(String) - Method in class it.trento.comune.j4sign.examples.GUITest
-
Sets the cryptoki library name.
- setCryptokiLib(String) - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
Setter method
- setCryptokiLib(String) - Method in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
Sets the native PKCS#11 implementation to use.
- setCryptokiLibrary(String) - Method in class it.trento.comune.j4sign.pkcs11.PKCS11Signer
-
Sets the cryptoky library
- setDataContentType(String) - Method in class it.trento.comune.j4sign.cms.utils.CMSBuilder
-
- setDataFileName(String) - Method in class it.trento.comune.j4sign.cms.utils.CMSBuilder
-
- setDataPath(String) - Method in class it.trento.comune.j4sign.cms.utils.CMSBuilder
-
- setDataStream(InputStream) - Method in class it.trento.comune.j4sign.examples.DigestSignTask
-
- setDataStream(InputStream) - Method in class it.trento.comune.j4sign.examples.FindCertTask
-
- setDebug(boolean) - Method in class it.trento.comune.j4sign.cms.utils.CMSVerifier
-
- setDebug(boolean) - Method in class it.trento.comune.j4sign.verification.CertificationAuthorities
-
Activate or discactivate debug messages
Attiva o disattiva i messaggi di debug
- setDebug(boolean) - Method in class it.trento.comune.j4sign.verification.X509CertRL
-
Activate or discactivate debug messages
Attiva o disattiva i messaggi di debug
- setDigest(byte[]) - Method in class it.trento.comune.j4sign.examples.DigestSignTask
-
Inserire qui la descrizione del metodo.
- setDigest(byte[]) - Method in class it.trento.comune.j4sign.examples.FindCertTask
-
Inserire qui la descrizione del metodo.
- setDigestInfo(byte[]) - Method in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
Sets the digest.
- setDigestPath(String) - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
- setEncodedContentHash(String) - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
- setEncodedDigest(String) - Method in class it.trento.comune.j4sign.examples.GUITest
-
Sets the base64 encoded digest.
- setEncodedDigest(String) - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
Setter method
- setEncryptedDigest(byte[]) - Method in class it.trento.comune.j4sign.examples.DigestSignTask
-
Inserire qui la descrizione del metodo.
- setEncryptedDigest(byte[]) - Method in class it.trento.comune.j4sign.examples.FindCertTask
-
Inserire qui la descrizione del metodo.
- setEncryptedDigest(byte[]) - Method in class it.trento.comune.j4sign.examples.GUITest
-
Sets the private-key encrypted digest
- setEncryptedDigest(byte[]) - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
Setter method
- setEncryptedDigest(byte[]) - Method in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
Sets the encrypted digest.
- setEncryptedDigestPath(String) - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
- setExpired(boolean) - Method in class it.trento.comune.j4sign.verification.CertValidity
-
- setFileToSign(File) - Method in class it.trento.comune.j4sign.examples.GUITest
-
- setIds(ArrayList) - Method in class it.trento.comune.j4sign.pcsc.CardInReaderInfo
-
- setIndexToken(int) - Method in class it.trento.comune.j4sign.pcsc.CardInReaderInfo
-
- setInUse(boolean) - Method in class it.trento.comune.j4sign.verification.CertValidity
-
- setisDownloadCRLForced(boolean) - Method in class it.trento.comune.j4sign.verification.CertValidity
-
- setLib(String) - Method in class it.trento.comune.j4sign.pcsc.CardInReaderInfo
-
- setMechanism(long) - Method in class it.trento.comune.j4sign.examples.DigestSignTask
-
- setMechanism(long) - Method in class it.trento.comune.j4sign.examples.FindCertTask
-
- setMechanism(long, Object) - Method in class it.trento.comune.j4sign.pkcs11.PKCS11Signer
-
- setMechanism(long) - Method in class it.trento.comune.j4sign.pkcs11.PKCS11Signer
-
- setMessage(String) - Method in class it.trento.comune.j4sign.verification.CertificationAuthorities
-
Set the possible error message Memorizza la descrizione dell'ultimo
errore registrato durante la verifica
- setPassed(boolean) - Method in class it.trento.comune.j4sign.verification.CertValidity
-
- setPassed(boolean) - Method in class it.trento.comune.j4sign.verification.VerifyResult
-
- setPassword(char[]) - Method in class it.trento.comune.j4sign.examples.DigestSignTask
-
Inserire qui la descrizione del metodo.
- setPathValid(boolean) - Method in class it.trento.comune.j4sign.verification.CertValidity
-
- setReader(String) - Method in class it.trento.comune.j4sign.pcsc.CardInReaderInfo
-
- setRevoked(boolean) - Method in class it.trento.comune.j4sign.verification.CertValidity
-
- setSession(long) - Method in class it.trento.comune.j4sign.pkcs11.PKCS11Signer
-
Sets the session handle.
- setSignedBytes(byte[]) - Method in class it.trento.comune.j4sign.cms.ExternalSignatureSignerInfoGenerator
-
- setSignerLabel(String) - Method in class it.trento.comune.j4sign.examples.GUITest
-
Sets the label identifiyng the signer objects on the token.
- setSignerLabel(String) - Method in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
The label to use to retrieve signer - related objects on the token.
- setSigningDigestAlgorithmMapping(ASN1ObjectIdentifier, String) - Method in class it.trento.comune.j4sign.verification.utils.DefaultCMSSignatureAlgorithmNameGenerator
-
Set the mapping for the digest algorithm to use in conjunction with a SignedData generation
or interpretation.
- setSigningEncryptionAlgorithmMapping(ASN1ObjectIdentifier, String) - Method in class it.trento.comune.j4sign.verification.utils.DefaultCMSSignatureAlgorithmNameGenerator
-
Set the mapping for the encryption algorithm used in association with a SignedData generation
or interpretation.
- setSigningTime(Date) - Method in class it.trento.comune.j4sign.cms.utils.CMSBuilder
-
- setSingleSignature(boolean) - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
- setSlotId(long) - Method in class it.trento.comune.j4sign.pcsc.CardInReaderInfo
-
- setStatus(int, String, long) - Method in class it.trento.comune.j4sign.examples.DigestSignTask
-
Inserire qui la descrizione del metodo.
- setStatus(int, String) - Method in class it.trento.comune.j4sign.examples.FindCertTask
-
Inserire qui la descrizione del metodo.
- setStatus(int, String) - Method in class it.trento.comune.j4sign.examples.GUITest
-
Sets the current status of the program (shown in the progress bar and
with alerts in case of error.
- setStatus(int, String, String) - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
Updates progress bar value and displays error alerts
- setStatus(int, String) - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
- setStatus(int, String) - Method in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
Manages status messages displayed on the status bar.
- setTokenHandle(long) - Method in class it.trento.comune.j4sign.pkcs11.PKCS11Signer
-
Sets the current token handle.
- setUseproxy(boolean, String, String, String, String) - Method in class it.trento.comune.j4sign.verification.X509CertRL
-
Set proxy connection parameters to download CRL
Imposta i parametri di connessione con il proxy verso Internet per lo
scarico delle CRL
- setValue(Object) - Method in class it.trento.comune.j4sign.examples.SwingWorker
-
Set the value produced by worker thread
- showTwoThirdsOption(String, String, int) - Static method in class it.trento.comune.j4sign.installer.Installer
-
- sig - Variable in class it.trento.comune.j4sign.examples.CMSServlet.SignerInfoGeneratorItem
-
Deprecated.
- sign() - Method in class it.trento.comune.j4sign.examples.GUITest
-
Starts a signing task in a separate thread.
- sign() - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
Initializes and starts the sign task.
- sign() - Method in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
Triggers the digest encryption on the token, using services provided by
PKCS11Signer
class.
- SIGN_CERTIFICATE_INITDATA - Static variable in class it.trento.comune.j4sign.examples.DigestSignTask
-
- SIGN_DONE - Static variable in class it.trento.comune.j4sign.examples.DigestSignTask
-
- SIGN_DONE - Static variable in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
- SIGN_ENCRYPT_DIGEST - Static variable in class it.trento.comune.j4sign.examples.DigestSignTask
-
- SIGN_INIT_SESSION - Static variable in class it.trento.comune.j4sign.examples.DigestSignTask
-
- SIGN_MAXIMUM - Static variable in class it.trento.comune.j4sign.examples.DigestSignTask
-
- signatureMechanism - Variable in class it.trento.comune.j4sign.pkcs11.PKCS11Signer
-
PKCS#11 identifier for the signature algorithm.
- signCert - Variable in class it.trento.comune.j4sign.examples.CLITest
-
- signDataMultiplePart(long, InputStream) - Method in class it.trento.comune.j4sign.pkcs11.PKCS11Signer
-
Sign (here means digesting and encrypting with private key) the provided
data with a multiple-pass operation.
- signDataSinglePart(long, byte[]) - Method in class it.trento.comune.j4sign.pkcs11.PKCS11Signer
-
Sign (here means encrypting with private key) the provided data with a
single operation.
- signDN - Variable in class it.trento.comune.j4sign.examples.CLITest
-
- signedAttr - Variable in class it.trento.comune.j4sign.cms.ExternalSignatureSignerInfoGenerator
-
- signedBytes - Variable in class it.trento.comune.j4sign.cms.ExternalSignatureSignerInfoGenerator
-
- SignedStreamerServlet - Class in it.trento.comune.j4sign.cms.utils
-
- SignedStreamerServlet() - Constructor for class it.trento.comune.j4sign.cms.utils.SignedStreamerServlet
-
- signer - Variable in class it.trento.comune.j4sign.verification.VerifyResult
-
- signerDN - Variable in class it.trento.comune.j4sign.cms.utils.CMSVerifier
-
- signerInfoGenerator - Variable in class it.trento.comune.j4sign.examples.GUITest
-
- signerInfoGeneratorTable - Variable in class it.trento.comune.j4sign.examples.CMSServlet
-
Deprecated.
- signerInfs - Variable in class it.trento.comune.j4sign.cms.ExternalSignatureCMSSignedDataGenerator
-
- signerLabel - Variable in class it.trento.comune.j4sign.examples.DigestSignTask
-
- signerLabel - Variable in class it.trento.comune.j4sign.examples.FindCertTask
-
- signerLabel - Variable in class it.trento.comune.j4sign.examples.GUITest
-
- signerLabel - Variable in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
- signersCertList - Variable in class it.trento.comune.j4sign.examples.GUITest
-
- signersList - Variable in class it.trento.comune.j4sign.verification.Verifier
-
- signingAlgorithmName - Variable in class it.trento.comune.j4sign.verification.VerifyResult
-
- signingTime - Variable in class it.trento.comune.j4sign.cms.utils.CMSBuilder
-
- signingTime - Variable in class it.trento.comune.j4sign.cms.utils.CMSVerifier
-
- signingTime - Variable in class it.trento.comune.j4sign.verification.VerifyResult
-
- signingTimeGMT - Variable in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
- signKP - Variable in class it.trento.comune.j4sign.examples.CLITest
-
- signTask - Variable in class it.trento.comune.j4sign.examples.GUITest
-
- signTimer - Variable in class it.trento.comune.j4sign.examples.GUITest
-
- signVerifyRecoverMechanisms_ - Static variable in class iaik.pkcs.pkcs11.wrapper.Functions
-
This table contains the mechanisms that are sign/verify mechanisms with
message recovery.
- SimpleSignApplet - Class in it.trento.comune.j4sign.examples
-
Deprecated.
This is old code not more maintained; see PKCS11SignApplet
for
replacement.
This is the client side part of the j4sign usage example in a web
environment.
SimpleSignApplet
is simple in the sense that refined
GUI features are avoided (like multiple threads used to correctly implement
the progress bar), in favor to a clear exposition of specific signature
procedures.
The goal was to illustrate an approach in which the client side
encryption, involving cryptographic token management via JNI, is completely
separated from server side CMS message building. This lightens the applet,
which has not to bear the weight of the BouncyCastle classes.
Note that in actual implementation of SimpleSignApplet
digesting is done on the server, and encapsulated in a digestInfo. Only digestInfo
is sent to the applet.
Another feature is the encapsulation of the JNI part (the excellent pkcs11
wrapper developed by IAIK of Graz University of Technology, and the pcsc
wrapper taken from Open Card Framework project), along with the corresponding
native libraries, in a standard Java Extension, named
SmartCardAccess
. See it.trento.comune.j4sign.installer
and Deploying Java Extensions.
The extension is deployed automatically the first time the applet is loaded.
The ultimate dependency for the applet is the cryptoki library, which has to
be provided from the PKCS11 token manufacturer. The
PCSCHelper
class uses the pcsc wrapper
trying to infer the correct library from the ATR string returned from the
token.
Some words about security; all downloaded jars, including the
SmartCardAccess
extension, has to be signed in order to work;
this is needed for tho reasons:
- the applet loads native libraries
- the applet deploys a java extension.
This gives more confidence about signing software integrity.
The entire example, with the
CMSServlet
server side counterpart,
is designed to permit the use of the standard JDK tools. The applet can be
executed with applet viewer tool (no HttpSession in the servlet, nor HTML
forms on the client side are used).
This eases the use of an IDE for test and debugging; we use, and recommend,
the Eclipse) IDE.
N.B.: IN A REAL WORLD WEB APPLICATION SCENARIO, YOU CAN (AND SHOULD) TAKE
ADVANTAGE OF THE FULL SERVLET API, AND HTTP/HTML FEATURES.
Here are the SimpleSignApplet
operations in detail; the applet
talks with the server (servlet) in HTTP:
- The applet initialization method (init()) builds the GUI layout: a text
area in the center, and, in the bottom, a button to load data from server and
a password field.
A detailed log is shown on System out (Java Plugin console).
- When the "Load data" button is pressed, the non repudiation certificate is
searched on the PKCS11 token. If such certificate is found a GET request is generated,
specifiying a
retrieve
parameter with value DATA
;
the server returns the message to sign.
Immediately after, another GET request is sent, specifiying a
retrieve
parameter with value
ENCODED_AUTHENTICATED_ATTRIBUTES
, and a retrieve
parameter
with the certificate as value; the server calculates (using also the certificate)
the Authenticated Attributes data, SHA-256 digests and encapsulates them in a digestInfo.
The digestInfo is returned to the applet.
The message and a textual representation of the authenticated attributes are
presented in the text area.
Note that authenticated attributes includes a timestamp, then even if the
message is the same, the digestInfo to encrypt change every time the
user loads the data from server.
- When the user insert the password in the field and press return, the
signing process starts:
- the PCSC layer is invoked to query for an inserted token, and if one is
found the relative PKCS#11 cryptoki is (hopefully) detected and loaded.
- Then the token is checked for the required signature algorithm
(RSA_PKCS), and queried for a suitable (non repudiation) certificate - private key pair.
- Then the digestInfo is sent to the token for the encryption procedure.
- The signature is sent to the server via HTTP POST, along with the signer
certificate extracted from the token (The same that was already sent before).
- The server acknowledges confirming signature verification and CMS
building and saving.
N.B. note that in this example signature verification only ensures
integrity; a complete verification to ensure non-repudiation requires
checking the full certification path including the CA root certificate, and
CRL verification on the CA side. (Good stuff for a next release ...)
- SimpleSignApplet() - Constructor for class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
- singleOperationEncryptDecryptMechanisms_ - Static variable in class iaik.pkcs.pkcs11.wrapper.Functions
-
This table contains the mechanisms that are single-operation
encrypt/decrypt mechanisms; i.e. mechanisms that do not support the update
functoins.
- singleOperationSignVerifyMechanisms_ - Static variable in class iaik.pkcs.pkcs11.wrapper.Functions
-
This table contains the mechanisms that are single-operation
sign/verify mechanisms; i.e. mechanisms that do not support the update
functoins.
- singleSignature - Variable in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
- sLen - Variable in class iaik.pkcs.pkcs11.wrapper.CK_RSA_PKCS_PSS_PARAMS
-
PKCS#11:
CK_ULONG sLen;
- slotDescription - Variable in class iaik.pkcs.pkcs11.wrapper.CK_SLOT_INFO
-
must be blank padded and only the first 64 chars will be used
PKCS#11:
CK_UTF8CHAR slotDescription[64];
- slotID - Variable in class iaik.pkcs.pkcs11.wrapper.CK_SESSION_INFO
-
PKCS#11:
CK_SLOT_ID slotID;
- slotID - Variable in class it.trento.comune.j4sign.pcsc.CardInReaderInfo
-
- slotInfoFlagsToString(long) - Static method in class iaik.pkcs.pkcs11.wrapper.Functions
-
Converts the long value flags to a SlotInfoFlag string.
- source - Variable in class iaik.pkcs.pkcs11.wrapper.CK_RSA_PKCS_OAEP_PARAMS
-
PKCS#11:
CK_RSA_PKCS_OAEP_SOURCE_TYPE source;
- start() - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
Called to start the applet.
- start() - Method in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
Called to start the applet.
- start() - Method in class it.trento.comune.j4sign.examples.SwingWorker
-
Start the worker thread.
- state - Variable in class iaik.pkcs.pkcs11.wrapper.CK_SESSION_INFO
-
PKCS#11:
CK_STATE state;
- statMessage - Variable in class it.trento.comune.j4sign.examples.DigestSignTask
-
- statMessage - Variable in class it.trento.comune.j4sign.examples.FindCertTask
-
- stop() - Method in class it.trento.comune.j4sign.examples.DigestSignTask
-
- stop() - Method in class it.trento.comune.j4sign.examples.FindCertTask
-
- stop() - Method in class it.trento.comune.j4sign.examples.PasswordMasker.StreamMasker
-
Signals any thread executing run to stop masking and exit run.
- stop() - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
Called to stop the applet.
- stop() - Method in class it.trento.comune.j4sign.examples.SimpleSignApplet
-
Deprecated.
Called to stop the applet.
- storeCRL(X509CRL) - Method in class it.trento.comune.j4sign.verification.X509CertRL
-
- streamAndHashContent(InputStream, OutputStream) - Method in class it.trento.comune.j4sign.cms.utils.CMSBuilder
-
Connects an input stream to an output stream hashing on the fly.
- streamHash - Variable in class it.trento.comune.j4sign.cms.utils.CMSBuilder
-
- submitAfterSigning - Variable in class it.trento.comune.j4sign.examples.GUITest
-
- submitAfterSigning - Variable in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
- submitForm() - Method in class it.trento.comune.j4sign.examples.PKCS11SignApplet
-
Calls the javascript submit function on the embedding page.
- surname - Variable in class it.trento.comune.j4sign.verification.utils.DnWrapper
-
- SwingWorker - Class in it.trento.comune.j4sign.examples
-
This is the 3rd version of SwingWorker (also known as
SwingWorker 3), an abstract class that you subclass to
perform GUI-related work in a dedicated thread.
- SwingWorker() - Constructor for class it.trento.comune.j4sign.examples.SwingWorker
-
Start a thread that will call the construct
method
and then exit.
- SwingWorker.ThreadVar - Class in it.trento.comune.j4sign.examples
-
Class to maintain reference to current worker thread
under separate synchronization control.
- SwingWorker.ThreadVar(Thread) - Constructor for class it.trento.comune.j4sign.examples.SwingWorker.ThreadVar
-