What prevents Java from verifying signed jars with multiple signature algorithms

后端 未结 3 1633
挽巷
挽巷 2021-02-12 18:05

Quick background: We release a webstart application, which includes our own application jars and numerous third-party jars. Webstart requires that all distrib

3条回答
  •  借酒劲吻你
    2021-02-12 18:35

    I know this is a bit late - but we are going thru this now. Our problem was the "MD2withRSA" signing issue. I resolved the problem in a couple steps:

    1) Worked with Verisign to remove the 'old' algorithm from our certificate - so the MD2withRSA algorithm was no longer used to sign our jars.

    2) We also have a pile of 3rd party jars and we just re-sign them with out our certificate. We encountered the 'not all jars signed with the same certificate' when both the SHA1 and SHA-256 algorithms were listed in the MANIFEST.MF. This was just a small subset of the jars - so for those, we removed the bottom half of the MANIFEST.MF file; that part with the Name: class and the algorithm spec. That data is re-generated in the last part of our process. We unzip, exclude the old signing info and re-jar. Last step is to re-sign the jars. We found that in some cases, if the old Name: entry with the SHA1 entry was in the MANIFEST.MF, that the signing did not replace it with the SHA-256 - so we manually handle those jars (for now). Working on updating our Ant tasks to handle this.

    Sorry - can't speak to why web start doesn't handle/allow it - just figured out how to make it work!

    Good Luck!

提交回复
热议问题