it.sistematica.isharedoc.service.keyring
Interface KeyringFactory

All Known Implementing Classes:
KeyringIsdFactoryImpl

public interface KeyringFactory

A factory for creating Keyring objects.


Method Summary
 java.util.Enumeration<java.lang.String> getAliases(java.security.KeyStore ks)
          Gets the aliases.
 java.security.cert.X509Certificate getCertificateEntry(java.security.KeyStore ks, java.lang.String alias)
          Gets the certificate entry.
 java.util.Enumeration<java.lang.String> getCertificateEntryAliases(java.security.KeyStore ks)
          Gets the certificate entry aliases.
 java.security.KeyStore.Entry getEntry(java.security.KeyStore ks, java.lang.String alias, java.lang.String keyStorePassword)
          Gets the entry.
 java.util.Enumeration<java.lang.String> getKeyAndPasswordEntryAliases(java.security.KeyStore ks)
          Gets the key and password entry aliases.
 java.security.PrivateKey getKeyEntry(java.security.KeyStore ks, java.lang.String alias, java.lang.String keyStorePassword)
          Gets the key entry.
 java.lang.String getPasswordEntry(java.security.KeyStore ks, java.lang.String alias, java.lang.String keyStorePassword)
          Gets the password entry.
 java.lang.String getProvider()
          Gets the provider.
 java.lang.String getVersion()
          Gets the version.
 it.neverworks.security.signature.DigSig pdfSign(java.security.KeyStore ks, java.io.InputStream in, java.lang.String certAlias, java.lang.String keyPassword)
          Pdf sign.
 it.neverworks.security.signature.DigSig pkcs7AddSign(java.security.KeyStore ks, java.io.InputStream in, java.lang.String certAlias, java.lang.String keyPassword, boolean detached)
          Pkcs7 add sign.
 it.neverworks.security.signature.DigSig pkcs7Sign(java.security.KeyStore ks, java.io.InputStream in, java.lang.String certAlias, java.lang.String keyPassword, boolean detached)
          Pkcs7 sign.
 void updatePasswordEntry(java.security.KeyStore ks, java.lang.String oldAlias, java.lang.String newAlias, java.lang.String password, java.lang.String keyStorePassword)
          Update password entry.
 

Method Detail

getVersion

java.lang.String getVersion()
Gets the version.

Returns:
the version

getProvider

java.lang.String getProvider()
Gets the provider.

Returns:
the provider

getAliases

java.util.Enumeration<java.lang.String> getAliases(java.security.KeyStore ks)
Gets the aliases.

Parameters:
ks - the ks
Returns:
the aliases

getCertificateEntryAliases

java.util.Enumeration<java.lang.String> getCertificateEntryAliases(java.security.KeyStore ks)
Gets the certificate entry aliases.

Parameters:
ks - the ks
Returns:
the certificate entry aliases

getKeyAndPasswordEntryAliases

java.util.Enumeration<java.lang.String> getKeyAndPasswordEntryAliases(java.security.KeyStore ks)
Gets the key and password entry aliases.

Parameters:
ks - the ks
Returns:
the key and password entry aliases

getCertificateEntry

java.security.cert.X509Certificate getCertificateEntry(java.security.KeyStore ks,
                                                       java.lang.String alias)
Gets the certificate entry.

Parameters:
ks - the ks
alias - the alias
Returns:
the certificate entry

getKeyEntry

java.security.PrivateKey getKeyEntry(java.security.KeyStore ks,
                                     java.lang.String alias,
                                     java.lang.String keyStorePassword)
Gets the key entry.

Parameters:
ks - the ks
alias - the alias
keyStorePassword - the key store password
Returns:
the key entry

getPasswordEntry

java.lang.String getPasswordEntry(java.security.KeyStore ks,
                                  java.lang.String alias,
                                  java.lang.String keyStorePassword)
Gets the password entry.

Parameters:
ks - the ks
alias - the alias
keyStorePassword - the key store password
Returns:
the password entry

getEntry

java.security.KeyStore.Entry getEntry(java.security.KeyStore ks,
                                      java.lang.String alias,
                                      java.lang.String keyStorePassword)
Gets the entry.

Parameters:
ks - the ks
alias - the alias
keyStorePassword - the key store password
Returns:
the entry

updatePasswordEntry

void updatePasswordEntry(java.security.KeyStore ks,
                         java.lang.String oldAlias,
                         java.lang.String newAlias,
                         java.lang.String password,
                         java.lang.String keyStorePassword)
Update password entry.

Parameters:
ks - the ks
oldAlias - the old alias
newAlias - the new alias
password - the password
keyStorePassword - the key store password

pkcs7Sign

it.neverworks.security.signature.DigSig pkcs7Sign(java.security.KeyStore ks,
                                                  java.io.InputStream in,
                                                  java.lang.String certAlias,
                                                  java.lang.String keyPassword,
                                                  boolean detached)
Pkcs7 sign.

Parameters:
ks - the ks
in - the in
certAlias - the cert alias
keyPassword - the key password
detached - the detached
Returns:
the dig sig

pkcs7AddSign

it.neverworks.security.signature.DigSig pkcs7AddSign(java.security.KeyStore ks,
                                                     java.io.InputStream in,
                                                     java.lang.String certAlias,
                                                     java.lang.String keyPassword,
                                                     boolean detached)
Pkcs7 add sign.

Parameters:
ks - the ks
in - the in
certAlias - the cert alias
keyPassword - the key password
detached - the detached
Returns:
the dig sig

pdfSign

it.neverworks.security.signature.DigSig pdfSign(java.security.KeyStore ks,
                                                java.io.InputStream in,
                                                java.lang.String certAlias,
                                                java.lang.String keyPassword)
Pdf sign.

Parameters:
ks - the ks
in - the in
certAlias - the cert alias
keyPassword - the key password
Returns:
the dig sig