When the name of the signing identity given to jpackage references certificates with this name in multiple keychains, and one of them is expired, MacCertificate.isValid() [1] may fail even though the name of a keychain with a valid certificate is specified in `--mac-keychain` CLI option.
This happens because MacCertificate.isValid() method ignores the name of the keychain.
Fix MacCertificate class by adding a member field with the keychain name.
Suggested fix attached.
[1] https://github.com/openjdk/jdk/blob/1b4b317aacbdfc499c28b00aeaf7120790a6c11a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacCertificate.java#L55
This happens because MacCertificate.isValid() method ignores the name of the keychain.
Fix MacCertificate class by adding a member field with the keychain name.
Suggested fix attached.
[1] https://github.com/openjdk/jdk/blob/1b4b317aacbdfc499c28b00aeaf7120790a6c11a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacCertificate.java#L55
- links to
-
Commit(master) openjdk/jdk/47f78a75
-
Review(master) openjdk/jdk/24762