title: java.io.IOException: parseAlgParameters failed: PBE AlgorithmParameters not available, caused when docker container tries to access rabbitmq TLS port
body: <p>I am trying to connect to a RabbitMQ instance through a TLS port from a docker container running a maven spring-boot application client.</p>
  <p>Although I already update <strong>java.security</strong> with the line:</p>
  <p><em>security.provider.10=org.bouncycastle.jce.provider.BouncyCastleProvider</em></p>
  <p>And I also added the jar of the <strong>Bouncy Castle</strong> inside the container and installing it through maven, and also adding the dependency to the parent pom of the project. An exception keeps on popping:</p>
  <pre><code>*java.io.IOException: parseAlgParameters failed: PBE AlgorithmParameters not available*
  
  ...
  
  *Caused by: java.security.NoSuchAlgorithmException: PBE AlgorithmParameters not available*  
  </code></pre>
  <p>Before running the Rabbitmq client through a container I ran it locally on a Ubuntu OS and it works fine. (<a href="https://www.rabbitmq.com/ssl.html" rel="nofollow noreferrer">https://www.rabbitmq.com/ssl.html</a> , Example 2)</p>
  <p>Docker container is a host enabled container that the .p12 and rabbitstore files are successfully delivered inside the container. The container uses jdk1.8 and successfully connects via the non-TLS port of rabbitmq.</p>
  <p>The exception cause is appeared to be in this part of the code:</p>
  <pre><code> *char[] keyPassphrase = &quot;lerum&quot;.toCharArray();*
  
   *KeyStore ks = KeyStore.getInstance(&quot;PKCS12&quot;);*
  
   *ks.load(new FileInputStream(&quot;test.p12&quot;), keyPassphrase);*
  </code></pre>
  <p>Is there anyone know what it could be off?</p>
  <p><strong>Dockerfile:</strong></p>
  <pre><code>FROM maven:3.6.0-jdk-8 AS build
  
  COPY /test.p12 test.p12
  
  COPY /certification.pem certification.pem
  
  COPY /jdk-8u241-linux-x64.tar.gz .
  
  COPY /Scripts/install-java.sh .
  
  COPY /jdk-8u241-linux-x64.tar.gz .
  
  COPY /bcprov-ext-jdk15to18-167.jar /docker-java-home/jre/lib/ext/
  
  COPY /java.security /docker-java-home/jre/lib/security/
  
  #installing java
  
  RUN  yes | /install-java.sh -f /jdk-8u241-linux-x64.tar.gz
  
  #environmental variables
  
  RUN export JAVA_HOME=/docker-java-home/jre/lib/ext:$JAVA_HOME
  
  #Bouncy Castle install
  
  RUN mvn install:install-file -Dfile=bcprov-ext-jdk15to18-167.jar -DgroupId=org.bouncycastle -DartifactId=bcprov-jdk15on -Dversion=1.67 -Dpackaging=jar
  
  RUN printf 'lerum\lerum\nyes' | keytool -import -alias server1 -file certification.pem -keystore rabbitstore
  
  RUN mvn clean install
  
  ENTRYPOINT [&quot;/bin/bash&quot;,&quot;irrelevat.sh&quot;]
  </code></pre>