我有一个简单的方法getSigner,它返回新的Signer(XadesSigner对象)。 相同的方法适用于简单的控制台java应用程序,但在Android中抛出XadesProfileResolutiionException。 有人帮我吗?
private XadesSigner getSigner(String pfxPath, String password) throws SigningKeyException {
try {
KeyingDataProvider keyingProvider = getKeyingDataProvider(pfxPath, password);
XadesSigningProfile p = new XadesBesSigningProfile(keyingProvider);
return p.newSigner();
} catch (KeyStoreException ex) {
throw new SigningKeyException("Keystore Problem", ex);
} catch (SigningCertChainException ex) {
throw new SigningKeyException("Signer Cert Chain Problem", ex);
} catch (UnexpectedJCAException ex) {
throw new SigningKeyException("JCA Problem", ex);
} catch (XadesProfileResolutionException ex) {
throw new SigningKeyException("XadesProfileResolutionException Problem", ex);
}
}