Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-7548

Cannot create a crypto token with token label as slot reference

    Details

    • Sprint:
      EJBCA Team Bob - 2018 w48

      Description

      I cannot create keys in a PKCS11 Crypto Token with token label as slot reference. I am using SoftHSM 2. The error message when creating a key is:

      java.lang.IllegalStateException: SunPKCS11-libsofthsm2.so-slot1098322444 was not found as a provider.
      

      I can generate keys without problems if I use slot index as slot reference.

      Client Toolbox works with both slot index and token label.

      > sudo -u wildfly ./ejbcaClientToolBox.sh PKCS11HSMKeyTool generate /usr/local/lib/softhsm/libsofthsm2.so 1024 testKey0002 SLOT_LABEL:TEST_SLOT
      Using Slot Reference Type: Slot Label.
      PKCS11 Token [SunPKCS11-libsofthsm2.so-slot1098322444] Password: 
      2018-11-27 18:47:42,374 INFO  [org.cesecore.keys.util.SignWithWorkingAlgorithm] Signature algorithm 'SHA1WithRSA' working for provider 'SunPKCS11-libsofthsm2.so-slot1098322444 version 1.8'.
      Created certificate with entry testKey0002.
      

      After deleting the crypto token in EJBCA, restarting Wildfly and creating a new crypto token with the same parameters (SoftHSM 2 and token label is TEST_SLOT) I get the following in the log:

      2018-11-27 18:57:38,075 DEBUG [org.cesecore.keys.token.p11.Pkcs11SlotLabel] (default task-14) Found numer of slots:	2
      2018-11-27 18:57:38,075 DEBUG [org.cesecore.keys.token.p11.Pkcs11SlotLabel] (default task-14) 0: Found token label:	TEST_SLOT	id=1098322444
      2018-11-27 18:57:38,075 DEBUG [org.cesecore.keys.token.p11.Pkcs11SlotLabel] (default task-14) 1: Found token label:		id=1
      2018-11-27 18:57:38,075 DEBUG [org.cesecore.keys.token.p11.Pkcs11SlotLabel] (default task-14) Found numer of slots:	2
      2018-11-27 18:57:38,075 DEBUG [org.cesecore.keys.token.p11.Pkcs11SlotLabel] (default task-14) 0: Found token label:	TEST_SLOT	id=1098322444
      2018-11-27 18:57:38,075 DEBUG [org.cesecore.keys.token.p11.Pkcs11SlotLabel] (default task-14) 1: Found token label:		id=1
      2018-11-27 18:57:38,080 INFO  [org.ejbca.ui.web.admin.cryptotoken.CryptoTokenMBean] (default task-14) Checking if slot is already used
      2018-11-27 18:57:38,090 DEBUG [org.cesecore.keys.token.CryptoTokenSessionBean] (default task-14) CryptoToken with ID -1704814577 will be checked for updates.
      2018-11-27 18:57:38,092 DEBUG [org.cesecore.internal.CommonCacheBase] (default task-14) Update not needed SoftCryptoToken in cache. Digest was 2077701053, cacheEntry digest was 2077701053
      2018-11-27 18:57:38,092 DEBUG [org.cesecore.util.CryptoProviderTools] (default task-14) MaxAllowedKeyLength for DES is: 2147483647
      2018-11-27 18:57:38,093 DEBUG [org.cesecore.util.StringTools] (default task-14) Using encrypted autoactivation pin
      2018-11-27 18:57:38,093 DEBUG [org.cesecore.keys.token.CryptoTokenSessionBean] (default task-14) CryptoToken with ID -1094895885 will be checked for updates.
      2018-11-27 18:57:38,094 DEBUG [org.cesecore.internal.CommonCacheBase] (default task-14) Update not needed SoftCryptoToken in cache. Digest was 1182141245, cacheEntry digest was 1182141245
      2018-11-27 18:57:38,095 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) Not using autoactivation pin
      2018-11-27 18:57:38,095 DEBUG [org.cesecore.keys.token.CryptoTokenSessionBean] (default task-14) CryptoToken with ID -904470563 will be checked for updates.
      2018-11-27 18:57:38,097 DEBUG [org.cesecore.internal.CommonCacheBase] (default task-14) Update not needed SoftCryptoToken in cache. Digest was 1897830892, cacheEntry digest was 1897830892
      2018-11-27 18:57:38,098 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) Not using autoactivation pin
      2018-11-27 18:57:38,099 DEBUG [org.cesecore.keys.token.CryptoTokenSessionBean] (default task-14) CryptoToken with ID -167039638 will be checked for updates.
      2018-11-27 18:57:38,102 DEBUG [org.cesecore.internal.CommonCacheBase] (default task-14) Update not needed SoftCryptoToken in cache. Digest was -1973442615, cacheEntry digest was -1973442615
      2018-11-27 18:57:38,102 DEBUG [org.cesecore.util.CryptoProviderTools] (default task-14) MaxAllowedKeyLength for DES is: 2147483647
      2018-11-27 18:57:38,103 DEBUG [org.cesecore.util.StringTools] (default task-14) Using encrypted autoactivation pin
      2018-11-27 18:57:38,103 DEBUG [org.cesecore.keys.token.CryptoTokenSessionBean] (default task-14) CryptoToken with ID 91813804 will be checked for updates.
      2018-11-27 18:57:38,104 DEBUG [org.cesecore.internal.CommonCacheBase] (default task-14) Update not needed SoftCryptoToken in cache. Digest was -1422033780, cacheEntry digest was -1422033780
      2018-11-27 18:57:38,107 DEBUG [org.cesecore.util.CryptoProviderTools] (default task-14) MaxAllowedKeyLength for DES is: 2147483647
      2018-11-27 18:57:38,108 DEBUG [org.cesecore.util.StringTools] (default task-14) Using encrypted autoactivation pin
      2018-11-27 18:57:38,108 DEBUG [org.cesecore.keys.token.CryptoTokenSessionBean] (default task-14) CryptoToken with ID 142803148 will be checked for updates.
      2018-11-27 18:57:38,110 DEBUG [org.cesecore.internal.CommonCacheBase] (default task-14) Update not needed SoftCryptoToken in cache. Digest was 1063589569, cacheEntry digest was 1063589569
      2018-11-27 18:57:38,110 DEBUG [org.cesecore.util.CryptoProviderTools] (default task-14) MaxAllowedKeyLength for DES is: 2147483647
      2018-11-27 18:57:38,111 DEBUG [org.cesecore.util.StringTools] (default task-14) Using encrypted autoactivation pin
      2018-11-27 18:57:38,115 DEBUG [org.cesecore.keys.token.CryptoTokenSessionBean] (default task-14) CryptoToken with ID 393556071 will be checked for updates.
      2018-11-27 18:57:38,120 DEBUG [org.cesecore.internal.CommonCacheBase] (default task-14) Update not needed SoftCryptoToken in cache. Digest was -1150938984, cacheEntry digest was -1150938984
      2018-11-27 18:57:38,121 DEBUG [org.cesecore.util.CryptoProviderTools] (default task-14) MaxAllowedKeyLength for DES is: 2147483647
      2018-11-27 18:57:38,121 DEBUG [org.cesecore.util.StringTools] (default task-14) Using encrypted autoactivation pin
      2018-11-27 18:57:38,122 DEBUG [org.cesecore.keys.token.CryptoTokenSessionBean] (default task-14) CryptoToken with ID 426928868 will be checked for updates.
      2018-11-27 18:57:38,124 DEBUG [org.cesecore.internal.CommonCacheBase] (default task-14) Update not needed SoftCryptoToken in cache. Digest was 945253497, cacheEntry digest was 945253497
      2018-11-27 18:57:38,124 DEBUG [org.cesecore.util.CryptoProviderTools] (default task-14) MaxAllowedKeyLength for DES is: 2147483647
      2018-11-27 18:57:38,124 DEBUG [org.cesecore.util.StringTools] (default task-14) Using encrypted autoactivation pin
      2018-11-27 18:57:38,124 DEBUG [org.cesecore.keys.token.CryptoTokenSessionBean] (default task-14) CryptoToken with ID 746025384 will be checked for updates.
      2018-11-27 18:57:38,126 DEBUG [org.cesecore.internal.CommonCacheBase] (default task-14) Update not needed SoftCryptoToken in cache. Digest was -1264188847, cacheEntry digest was -1264188847
      2018-11-27 18:57:38,131 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) Not using autoactivation pin
      2018-11-27 18:57:38,132 DEBUG [org.cesecore.keys.token.CryptoTokenSessionBean] (default task-14) CryptoToken with ID 852853628 will be checked for updates.
      2018-11-27 18:57:38,134 DEBUG [org.cesecore.internal.CommonCacheBase] (default task-14) Update not needed SoftCryptoToken in cache. Digest was -1685748358, cacheEntry digest was -1685748358
      2018-11-27 18:57:38,134 DEBUG [org.cesecore.util.CryptoProviderTools] (default task-14) MaxAllowedKeyLength for DES is: 2147483647
      2018-11-27 18:57:38,135 DEBUG [org.cesecore.util.CryptoProviderTools] (default task-14) MaxAllowedKeyLength for DES is: 2147483647
      2018-11-27 18:57:38,135 DEBUG [org.cesecore.util.StringTools] (default task-14) Using cleartext autoactivation pin
      2018-11-27 18:57:38,136 DEBUG [org.cesecore.keys.token.CryptoTokenSessionBean] (default task-14) CryptoToken with ID 1120678484 will be checked for updates.
      2018-11-27 18:57:38,137 DEBUG [org.cesecore.internal.CommonCacheBase] (default task-14) Update not needed SoftCryptoToken in cache. Digest was -2140256647, cacheEntry digest was -2140256647
      2018-11-27 18:57:38,138 DEBUG [org.cesecore.util.CryptoProviderTools] (default task-14) MaxAllowedKeyLength for DES is: 2147483647
      2018-11-27 18:57:38,138 DEBUG [org.cesecore.util.StringTools] (default task-14) Using encrypted autoactivation pin
      2018-11-27 18:57:38,142 DEBUG [org.cesecore.keys.token.PKCS11CryptoToken] (default task-14) >init: id=-1
      2018-11-27 18:57:38,143 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) Properties: {slotLabelType=SLOT_LABEL, doNotAddP11Provider=true, sharedLibrary=/usr/local/lib/softhsm/libsofthsm2.so, slotLabelValue=TEST_SLOT}
      2018-11-27 18:57:38,143 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) Not using autoactivation pin
      2018-11-27 18:57:38,143 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) >init: doAutoActivate=false
      2018-11-27 18:57:38,143 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) Properties: {slotLabelType=SLOT_LABEL, doNotAddP11Provider=true, sharedLibrary=/usr/local/lib/softhsm/libsofthsm2.so, slotLabelValue=TEST_SLOT}
      2018-11-27 18:57:38,143 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) Not using autoactivation pin
      2018-11-27 18:57:38,143 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) <init: doAutoActivate=false
      2018-11-27 18:57:38,145 DEBUG [org.cesecore.keys.token.p11.P11Slot] (default task-14) P11Slot.getInstance(): Slot Label'TEST_SLOT', '/usr/local/lib/softhsm/libsofthsm2.so', , 'null', -1
      2018-11-27 18:57:38,151 DEBUG [org.cesecore.keys.token.p11.Pkcs11SlotLabel] (default task-14) slot spec: Slot type: 'Slot Label'. Slot value: 'TEST_SLOT'.
      2018-11-27 18:57:38,151 DEBUG [org.cesecore.keys.token.p11.Pkcs11SlotLabel] (default task-14) Searching for token label:	TEST_SLOT
      2018-11-27 18:57:38,151 DEBUG [org.cesecore.keys.token.p11.Pkcs11SlotLabel] (default task-14) Candidate token label:	TEST_SLOT
      2018-11-27 18:57:38,151 DEBUG [org.cesecore.keys.token.p11.Pkcs11SlotLabel] (default task-14) Label 'TEST_SLOT' found. The slot ID is:	1098322444
      2018-11-27 18:57:38,151 DEBUG [org.cesecore.keys.token.p11.Pkcs11SlotLabel] (default task-14) {SLOT_ID=1098322444, PKCS11_NATIVE_MODULE=/usr/local/lib/softhsm/libsofthsm2.so}
      2018-11-27 18:57:38,152 DEBUG [org.cesecore.keys.token.p11.Pkcs11SlotLabel] (default task-14) >getSunP11ProviderInputStream: 1098322444, /usr/local/lib/softhsm/libsofthsm2.so, Slot Label, null, null
      2018-11-27 18:57:38,152 DEBUG [org.cesecore.keys.token.p11.Pkcs11SlotLabel] (default task-14) name = libsofthsm2.so-slot1098322444
      library = /usr/local/lib/softhsm/libsofthsm2.so
      slot = 1098322444
      attributes(*, CKO_PUBLIC_KEY, *) = {
        CKA_TOKEN = false
        CKA_ENCRYPT = true
        CKA_VERIFY = true
        CKA_WRAP = true
      }
      attributes(*, CKO_PRIVATE_KEY, *) = {
        CKA_DERIVE = false
      --
        CKA_SENSITIVE = true
        CKA_EXTRACTABLE = false
        CKA_ENCRYPT = true
        CKA_DECRYPT = true
        CKA_SIGN = true
        CKA_VERIFY = true
        CKA_WRAP = true
        CKA_UNWRAP = true
      }
      
      2018-11-27 18:57:38,153 DEBUG [org.cesecore.keys.token.p11.Pkcs11SlotLabel] (default task-14) Using SUN PKCS11 provider: sun.security.pkcs11.SunPKCS11
      2018-11-27 18:57:38,156 INFO  [org.cesecore.keys.token.p11.P11Slot] (default task-14) Did not find an existing PKCS#11 Provider while activating Crypto Token, but was configured to not add one either: SunPKCS11-libsofthsm2.so-slot1098322444
      2018-11-27 18:57:38,157 INFO  [org.cesecore.keys.token.PKCS11CryptoToken] (default task-14) Configured to not add PKCS#11 Provider: SunPKCS11-libsofthsm2.so-slot1098322444
      2018-11-27 18:57:38,157 DEBUG [org.cesecore.keys.token.PKCS11CryptoToken] (default task-14) <init: id=-1
      2018-11-27 18:57:38,157 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Created provider (without installing) to check for collisions: SunPKCS11-libsofthsm2.so-slot1098322444
      2018-11-27 18:57:38,157 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Provider name to check for: SunPKCS11-libsofthsm2.so-slot1098322444
      2018-11-27 18:57:38,158 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Checking installed provider: SUN
      2018-11-27 18:57:38,158 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Checking installed provider: ApacheXMLDSig
      2018-11-27 18:57:38,158 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Checking installed provider: SunRsaSign
      2018-11-27 18:57:38,158 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Checking installed provider: SunEC
      2018-11-27 18:57:38,158 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Checking installed provider: SunJSSE
      2018-11-27 18:57:38,158 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Checking installed provider: SunJCE
      2018-11-27 18:57:38,158 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Checking installed provider: SunJGSS
      2018-11-27 18:57:38,158 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Checking installed provider: SunSASL
      2018-11-27 18:57:38,158 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Checking installed provider: XMLDSig
      2018-11-27 18:57:38,158 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Checking installed provider: TLSP
      2018-11-27 18:57:38,158 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Checking installed provider: SunPCSC
      2018-11-27 18:57:38,158 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Checking installed provider: BC
      2018-11-27 18:57:38,158 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) isCryptoTokenUsed: Checking installed provider: CVC
      2018-11-27 18:57:38,164 INFO  [org.cesecore.audit.impl.log4j.Log4jDevice] (default task-14) 2018-11-27 18:57:38+01:00;ACCESS_CONTROL;SUCCESS;ACCESSCONTROL;CORE;CN=Administrator 1,Name=Access to test installation,OU=Engineering,O=PrimeKey Solutions AB,C=SE;;;;resource0=/cryptotoken/modify
      2018-11-27 18:57:38,165 DEBUG [org.cesecore.audit.log.InternalSecurityEventsLoggerSessionBean] (default task-14) LogDevice: Log4jDevice Proc: 2
      2018-11-27 18:57:38,178 DEBUG [org.cesecore.audit.log.InternalSecurityEventsLoggerSessionBean] (default task-14) LogDevice: IntegrityProtectedDevice Proc: 13
      2018-11-27 18:57:38,178 DEBUG [org.cesecore.keys.token.PKCS11CryptoToken] (default task-14) >init: id=2101077836
      2018-11-27 18:57:38,178 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) Properties: {slotLabelType=SLOT_LABEL, doNotAddP11Provider=true, sharedLibrary=/usr/local/lib/softhsm/libsofthsm2.so, slotLabelValue=TEST_SLOT, tokenName=TEST_SLOT}
      2018-11-27 18:57:38,178 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) Not using autoactivation pin
      2018-11-27 18:57:38,178 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) >init: doAutoActivate=false
      2018-11-27 18:57:38,178 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) Properties: {slotLabelType=SLOT_LABEL, doNotAddP11Provider=true, sharedLibrary=/usr/local/lib/softhsm/libsofthsm2.so, slotLabelValue=TEST_SLOT, tokenName=TEST_SLOT}
      2018-11-27 18:57:38,178 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) Not using autoactivation pin
      2018-11-27 18:57:38,178 DEBUG [org.cesecore.keys.token.BaseCryptoToken] (default task-14) <init: doAutoActivate=false
      2018-11-27 18:57:38,178 DEBUG [org.cesecore.keys.token.p11.P11Slot] (default task-14) P11Slot.getInstance(): Slot Label'TEST_SLOT', '/usr/local/lib/softhsm/libsofthsm2.so', , 'null', 2101077836
      2018-11-27 18:57:38,178 INFO  [org.cesecore.keys.token.PKCS11CryptoToken] (default task-14) Configured to not add PKCS#11 Provider: SunPKCS11-libsofthsm2.so-slot1098322444
      2018-11-27 18:57:38,178 DEBUG [org.cesecore.keys.token.PKCS11CryptoToken] (default task-14) <init: id=2101077836
      2018-11-27 18:57:38,178 DEBUG [org.cesecore.keys.token.CryptoTokenManagementSessionBean] (default task-14) Activating new crypto token using supplied authentication code.
      2018-11-27 18:57:38,183 DEBUG [org.cesecore.keys.token.PKCS11CryptoToken] (default task-14) Loading key from slot 'TEST_SLOT' using pin.
      2018-11-27 18:57:38,191 DEBUG [org.cesecore.keys.token.CachingKeyStoreWrapper] (default task-14) cachingEnabled: true
      2018-11-27 18:57:38,200 DEBUG [org.cesecore.keys.token.CachingKeyStoreWrapper] (default task-14) KeyStore has alias: testKey0002
      2018-11-27 18:57:38,200 INFO  [org.cesecore.keys.token.PKCS11CryptoToken] (default task-14) Activated Crypto Token with ID 2101077836.
      2018-11-27 18:57:38,210 DEBUG [org.cesecore.internal.CommonCacheBase] (default task-14) Updated PKCS11CryptoToken cache. Digest was -1221927623, cacheEntry digest was null
      2018-11-27 18:57:38,211 INFO  [org.cesecore.audit.impl.log4j.Log4jDevice] (default task-14) 2018-11-27 18:57:38+01:00;CRYPTOTOKEN_CREATE;SUCCESS;CRYPTOTOKEN;CORE;CN=Administrator 1,Name=Access to test installation,OU=Engineering,O=PrimeKey Solutions AB,C=SE;2101077836;;;msg=Created CryptoToken with id 2101077836;name=TEST_SLOT;encProviderName=SunPKCS11-libsofthsm2.so-slot1098322444;signProviderName=SunPKCS11-libsofthsm2.so-slot1098322444;added:slotLabelType=SLOT_LABEL;added:doNotAddP11Provider=true;added:sharedLibrary=/usr/local/lib/softhsm/libsofthsm2.so;added:slotLabelValue=TEST_SLOT;added:tokenName=TEST_SLOT
      

      What stands out here is the boolean doNotAddProvider which is set to true. I have no other crypto token (database protection or other PKCS11 tokens with SoftHSM), so the Sun PKCS11 provider is never installed?

      The key testKey0002 created with ClientToolBox earlier is visible in the crypto token. When testing testKey0002 in EJBCA, I get the error message "Result from signing is null.". Again, from the log:

      Testing key of type RSA key:
        modulus: ccc159dcec25bc75a38fb16d93ab800c730e7729cbd79ccb5492f6f6debb210cd0d2a153268f4b42eb5061ae9163374d1ba14eaa391737b3eb51a5a04417f399a0f7a0c023f5ba7718009115dcfbbb22f1820393ba07eb5969fd093ae61d41b0bd29b1be6683275415c2685d087c87da9b636093c39e7bb89794def0a11cd77f
        public exponent: 10001
      
      2018-11-27 19:04:33,776 DEBUG [org.cesecore.keys.util.KeyTools] (default task-30) Testing a key:
      	Testing keys with algorithm: RSA
      	provider: SunPKCS11-libsofthsm2.so-slot1098322444
      	privateKey: SunPKCS11-libsofthsm2.so-slot1098322444 RSA private key, 1024 bits (id 3, token object, sensitive, unextractable)
      	privateKey class: sun.security.pkcs11.P11Key$P11PrivateKey
      	publicKey: Sun RSA public key, 1024 bits
        modulus: 143784045546526799763251283658113549138214174486060894973786337383018571333297795008764585174558156106127344597391971131091754829105003974709284779808548108070789268758436258763526733388761403558379747098991238155886497208065090586442191740309534929714859919202089395171724247447675306282446617769326222825343
        public exponent: 65537
      	publicKey class: sun.security.rsa.RSAPublicKeyImpl
      
      2018-11-27 19:04:33,776 INFO  [org.cesecore.keys.util.SignWithWorkingAlgorithm] (default task-30) Signature algorithm 'SHA1WithRSA' not working for provider 'BC version 1.6'. Exception: Signing of data failed: Supplied key (sun.security.pkcs11.P11Key$P11PrivateKey) is not a RSAPrivateKey instance
      2018-11-27 19:04:33,776 INFO  [org.cesecore.keys.util.SignWithWorkingAlgorithm] (default task-30) Signature algorithm 'SHA1withRSAandMGF1' not working for provider 'BC version 1.6'. Exception: Signing of data failed: Supplied key is not a RSAPrivateKey instance
      2018-11-27 19:04:33,777 INFO  [org.cesecore.keys.util.SignWithWorkingAlgorithm] (default task-30) Signature algorithm 'SHA256WithRSA' not working for provider 'BC version 1.6'. Exception: Signing of data failed: Supplied key (sun.security.pkcs11.P11Key$P11PrivateKey) is not a RSAPrivateKey instance
      2018-11-27 19:04:33,777 INFO  [org.cesecore.keys.util.SignWithWorkingAlgorithm] (default task-30) Signature algorithm 'SHA256withRSAandMGF1' not working for provider 'BC version 1.6'. Exception: Signing of data failed: Supplied key is not a RSAPrivateKey instance
      2018-11-27 19:04:33,777 INFO  [org.cesecore.keys.util.SignWithWorkingAlgorithm] (default task-30) Signature algorithm 'SHA384withRSAandMGF1' not working for provider 'BC version 1.6'. Exception: Signing of data failed: Supplied key is not a RSAPrivateKey instance
      2018-11-27 19:04:33,777 INFO  [org.cesecore.keys.util.SignWithWorkingAlgorithm] (default task-30) Signature algorithm 'SHA512withRSAandMGF1' not working for provider 'BC version 1.6'. Exception: Signing of data failed: Supplied key is not a RSAPrivateKey instance
      2018-11-27 19:04:33,777 INFO  [org.cesecore.keys.util.SignWithWorkingAlgorithm] (default task-30) Signature algorithm 'SHA384WithRSA' not working for provider 'BC version 1.6'. Exception: Signing of data failed: Supplied key (sun.security.pkcs11.P11Key$P11PrivateKey) is not a RSAPrivateKey instance
      2018-11-27 19:04:33,777 INFO  [org.cesecore.keys.util.SignWithWorkingAlgorithm] (default task-30) Signature algorithm 'SHA512WithRSA' not working for provider 'BC version 1.6'. Exception: Signing of data failed: Supplied key (sun.security.pkcs11.P11Key$P11PrivateKey) is not a RSAPrivateKey instance
      2018-11-27 19:04:33,777 INFO  [org.cesecore.keys.util.SignWithWorkingAlgorithm] (default task-30) Signature algorithm 'SHA3-256withRSA' not working for provider 'BC version 1.6'. Exception: Signing of data failed: Supplied key (sun.security.pkcs11.P11Key$P11PrivateKey) is not a RSAPrivateKey instance
      2018-11-27 19:04:33,777 INFO  [org.cesecore.keys.util.SignWithWorkingAlgorithm] (default task-30) Signature algorithm 'SHA3-384withRSA' not working for provider 'BC version 1.6'. Exception: Signing of data failed: Supplied key (sun.security.pkcs11.P11Key$P11PrivateKey) is not a RSAPrivateKey instance
      2018-11-27 19:04:33,777 INFO  [org.cesecore.keys.util.SignWithWorkingAlgorithm] (default task-30) Signature algorithm 'SHA3-512withRSA' not working for provider 'BC version 1.6'. Exception: Signing of data failed: Supplied key (sun.security.pkcs11.P11Key$P11PrivateKey) is not a RSAPrivateKey instance
      2018-11-27 19:04:33,777 INFO  [org.cesecore.keys.util.SignWithWorkingAlgorithm] (default task-30) No valid signing algorithm found for the provider 'BC version 1.6'.
      

      Deleting the key works.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tomas Tomas Gustavsson
              Reporter:
              bastianf Bastian Fredriksson
              Verified by:
              Mike Agrenius Kushner
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Time Spent - 1 hour Remaining Estimate - 1 day, 7 hours
                  1d 7h
                  Logged:
                  Time Spent - 1 hour Remaining Estimate - 1 day, 7 hours
                  1h