Please take a look at http://cr.openjdk.java.net/~weijun/8138766/webrev.00/ Now both jarsigner and keytool use AlgorithmId::getDefaultSigAlgForKey to decide what the default sigalg should be. Thanks Max