Hide Forgot
Description of problem: It is mentionned in the changelog that Fedora's Bouncycastle package doesn't rely on gcj anymore. But as part as post install and post uninstall procedure, a file provided by libgcj is edited. This is an issue, as you're doing something useless (no file found, nothing done), and you should edit the matching file in the installed jvm: /usr/lib64/jvm/jre-1.6.0-sun/lib/security/java.security for Sun JDK, same name but different path for OpenJDK... Version-Release number of selected component (if applicable): 1.45, 1.46 How reproducible: Always Steps to Reproduce: Just look at the bouncycastle.spec file: - "Drop gcj" in changelog 1.45 and no gcj as BuildRequires / Requires - /usr/lib64/security/classpath.security mentionned in %post and %postun Actual results: Java API relying on this can throw exception like this one: org.bouncycastle.openssl.PEMException: problem parsing ENCRYPTED PRIVATE KEY: java.lang.SecurityException: JCE cannot authenticate the provider BC Expected results: Additional info: I found out this error with an issue on my project under OpenSUSE, whose bouncycastle is inspired from Fedora's package, related here: https://sourceforge.net/apps/mantisbt/xtreemos/view.php?id=366
Alexander, could you take a look at this? You might have a better grasp since you made the conversion for this package. Thanks.
By the way, bouncycastle is actually providing jar with the name bcprov-jdkXX-version.jar Maybe it would be a good idea to update it in your package too, it's still bcprov-version.jar See http://www.bouncycastle.org/latest_releases.html for latest BC releases.
(In reply to comment #0) > Description of problem: > It is mentionned in the changelog that Fedora's Bouncycastle package doesn't > rely on gcj anymore. But as part as post install and post uninstall procedure, > a file provided by libgcj is edited. > This is an issue, as you're doing something useless (no file found, nothing > done), and you should edit the matching file in the installed jvm: > /usr/lib64/jvm/jre-1.6.0-sun/lib/security/java.security for Sun JDK, same name > but different path for OpenJDK... Well, it is setting things properly for gcj(if it is installed) so it's not useless. There is a missing part setting up properly for openjdk (Sun/Oracle JDK is out of question for Fedora rpms). But we still have a problem because if one installs bouncycastle with gcj and install openjdk after that, openjdk will still be broken. So there is no way to fix that 100% in the bouncycastle package. Btw, there is /etc/java/security/security.d but I don't know how/how much openjdk makes use of it. Have you tried this on Fedora system? /usr/lib64/jvm tells me that this is not run on fedora and I don't believe 100% compatible systems. If you provide a patch against Fedora git to edit openjdk's security file I'll apply your patch. > > > > Version-Release number of selected component (if applicable): > 1.45, 1.46 > > > > How reproducible: > Always > > > > Steps to Reproduce: > Just look at the bouncycastle.spec file: > - "Drop gcj" in changelog 1.45 and no gcj as BuildRequires / Requires > - /usr/lib64/security/classpath.security mentionned in %post and %postun > > > > Actual results: > Java API relying on this can throw exception like this one: > org.bouncycastle.openssl.PEMException: problem parsing ENCRYPTED PRIVATE KEY: > java.lang.SecurityException: JCE cannot authenticate the provider BC Isn't this fixable by simply adding bouncycastle to the classpath? > > > > Expected results: > > > > Additional info: > I found out this error with an issue on my project under OpenSUSE, whose > bouncycastle is inspired from Fedora's package, related here: > https://sourceforge.net/apps/mantisbt/xtreemos/view.php?id=366
> Well, it is setting things properly for gcj(if it is installed) so it's not > useless. I agree it's a valuable knowledge. But your package depends on java-devel and java, libgcj doesn't satisfy this dependencie and won't be installed automatically, so it's irrelevant (no offense meant here) for my goal, a functionnal out of the box installation. > There is a missing part setting up properly for openjdk (Sun/Oracle JDK is out of question for Fedora rpms). But we still have a problem because if one installs bouncycastle with gcj and install openjdk after that, openjdk will still be broken. So there is no way to fix that 100% in the bouncycastle package. In my opinion, you should have both setting up part behind a "if setting file exist" like you have actually for gcj. Your package would work for openjdk out of the box, and same for gcj if already installed before bouncycastle, as it's the case actually because you don't requires it. > Btw, there is /etc/java/security/security.d but I don't know how/how > much openjdk makes use of it. Have you tried this on Fedora system? /usr/lib64/jvm tells me that this is not run on fedora and I don't believe 100% compatible systems. I focus on OpenSUSE for now, I'll give a try porting my project on Fedora somedays but not yet. So no test on Fedora for now. > If you provide a patch against Fedora git to edit openjdk's security file I'll apply your patch. If you don't fix it here, I'll give it a shot to fix it regarding my issue on OpenSUSE. Then I can submit it wherever you need. But I'm far from being an expert regarding bouncycastle / java security, so I can't give any guarantee of reliability outside of my own little case.
What about the fix that puts bouncycastle on the classpath? Does it work?
I'm not aware of such a fix, but from what you tell me I guess it won't be enough: the issue isn't about being in the java classpath or not, it's about being recognized as a legitimate security provider. Example from my app, it's using build-classpath to get bcprov (bouncycastle jar) in the command lines, without needing environment variable.
I don't plan doing anything on this because I don't have time for it.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
This message is a notice that Fedora 19 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 19. It is Fedora's policy to close all bug reports from releases that are no longer maintained. Approximately 4 (four) weeks from now this bug will be closed as EOL if it remains open with a Fedora 'version' of '19'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 19 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.