Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-19817

JCE cannot authenticate the provider BC for Windows 7 Slave

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • ssh-agent-plugin
    • Jenkins 1.533 on Centos 6.4, openjdk 1.7.0_25 , windows 7 slave running Java 7 update 40, both are 64 bit machines

      Get the following error when i try to run on windows slave, works fine on Master (centos). A similar issue was raised back in July but for a different configuration, JENKINS-18897.

      [ssh-agent] Using credentials jenkins
      [ssh-agent] Looking for ssh-agent implementation...
      [ssh-agent]   Java/tomcat-native ssh-agent
      ERROR: [ssh-agent] Unable to read key: exception using cipher - please check password and data.
      org.bouncycastle.openssl.EncryptionException: exception using cipher - please check password and data.
      	at org.bouncycastle.openssl.PEMUtilities.crypt(Unknown Source)
      	at org.bouncycastle.openssl.PEMUtilities.crypt(Unknown Source)
      	at org.bouncycastle.openssl.PEMReader$KeyPairParser.readKeyPair(Unknown Source)
      	at org.bouncycastle.openssl.PEMReader$RSAKeyPairParser.parseObject(Unknown Source)
      	at org.bouncycastle.openssl.PEMReader.readObject(Unknown Source)
      	at com.cloudbees.jenkins.plugins.sshagent.mina.MinaRemoteAgent.addIdentity(MinaRemoteAgent.java:93)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:280)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:239)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at hudson.remoting.Engine$1$1.run(Engine.java:63)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.SecurityException: JCE cannot authenticate the provider BC
      	at javax.crypto.Cipher.getInstance(Cipher.java:642)
      	... 22 more
      Caused by: java.util.jar.JarException: Class is on the bootclasspath
      	at javax.crypto.JarVerifier.verify(JarVerifier.java:247)
      	at javax.crypto.JceSecurity.verifyProviderJar(JceSecurity.java:161)
      	at javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:187)
      	at javax.crypto.JceSecurity.getInstance(JceSecurity.java:98)
      	at javax.crypto.KeyAgreement.getInstance(KeyAgreement.java:223)
      	at org.apache.sshd.common.util.SecurityUtils$BouncyCastleRegistration.run(SecurityUtils.java:97)
      	at org.apache.sshd.common.util.SecurityUtils.register(SecurityUtils.java:77)
      	at org.apache.sshd.common.util.SecurityUtils.isBouncyCastleRegistered(SecurityUtils.java:68)
      	at com.cloudbees.jenkins.plugins.sshagent.mina.MinaRemoteAgent.addIdentity(MinaRemoteAgent.java:79)
      	... 16 more
      [ssh-agent] Started.
      

      Anyway help on this would be appreciated, my Java programming is a bit outdated, more of a .net developer nowadays.

          [JENKINS-19817] JCE cannot authenticate the provider BC for Windows 7 Slave

          Just added a comment on https://issues.jenkins-ci.org/browse/JENKINS-18897
          It may help you.

          Thomas Carsuzan added a comment - Just added a comment on https://issues.jenkins-ci.org/browse/JENKINS-18897 It may help you.

          Removing myself as assignee. My current work assignments do not provide sufficient bandwidth to review these issues and in the majority of cases I am only assigned by virtue of being the default assignee. For the credentials-api and scm-api related plugins I have permission to allocate time reviewing changes to these APIs themselves to ensure these APIs remain cohesive, but that can be handled through PR reviews rather than assigning issues in JIRA

          Stephen Connolly added a comment - Removing myself as assignee. My current work assignments do not provide sufficient bandwidth to review these issues and in the majority of cases I am only assigned by virtue of being the default assignee. For the credentials-api and scm-api related plugins I have permission to allocate time reviewing changes to these APIs themselves to ensure these APIs remain cohesive, but that can be handled through PR reviews rather than assigning issues in JIRA

          Jesse Glick added a comment -

          Jesse Glick added a comment - Close if https://github.com/jenkinsci/ssh-agent-plugin/pull/48 is merged.

            Unassigned Unassigned
            sham480 Shamul Rohman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: