enudler / apple-pay-signature-verification Goto Github PK
View Code? Open in Web Editor NEWImplementation of apple pay signature verification.
Implementation of apple pay signature verification.
From Bouncy Castle java docs :
SignerInformation method verify :
/
* Verify that the given verifier can successfully verify the signature on
* this SignerInformation object.
* @return true if the signer information is verified, false otherwise.
/*
Actual boolean result is ignored in code.
Hi,
i am almost done with the code implementation. but i am facing this issue .Can you please advice me on this exception.
Thanks in advance.
java.lang.NoSuchFieldError
dsa_with_sha224 at org.bouncycastle.cms.CMSSignedHelper.<clinit>(Unknown Source)
Hi There,
i am using the code to verify the apple pay signature and found the line 165 - PKIXCertPathBuilderResult pkixCertPathBuilderResult = (PKIXCertPathBuilderResult) builder.build(pkixParams); is throwing an exception - Exception in thread "main" java.lang.Exception: Failed to validate chain of trust for apple certificates.i am using applePaySignatureExpirationInMs as 1000. Can you please let me know the root cause. Please let me know if you need any other details.
Thanks
Ramakanth
Hi ,
I have given private static final String APPLE_ROOT_CA_G3_CER = "C:/PROJECTS/AppleRootCA-G3.cer"; in ApplePaySignatureVerifier class.
When I execute this , the inputstream value is null. The exception is as below.
Please advice. Thanks for quick response the grate help..
Exception in thread "main" java.security.cert.CertificateException: Missing input stream
at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:88)
at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:339)
at ApplePaySignatureVerifier.validate(ApplePaySignatureVerifier.java:66)
at Main.main(Main.java:52)
Hi ,
I am using bcprov-jdk15on with version 1.56 and i see the given class is not available org.bouncycastle.openssl.PEMReader. Can you please suggest where i can find the class.
HI,
What exactly should i change in my data, to over code this exception and execute my code sucessfully. Please advice.
Exception in thread "main" java.lang.Exception: apple pay signature is too old, the expiration time is: 60000 ms
at ApplePaySignatureVerifier.validateSignatureTime(ApplePaySignatureVerifier.java:136)
at ApplePaySignatureVerifier.validate(ApplePaySignatureVerifier.java:89)
at Main.main(Main.java:52)
Hi while i execute this code, i am getting Exception as mentioned below. please advice.
in thread "main" org.bouncycastle.cms.CMSException: IOException reading content.
at org.bouncycastle.cms.CMSUtils.readContentInfo(Unknown Source)
at org.bouncycastle.cms.CMSUtils.readContentInfo(Unknown Source)
at org.bouncycastle.cms.CMSSignedData.(Unknown Source)
at ApplePaySignatureVerifier.validate(ApplePaySignatureVerifier.java:42)
at Main.main(Main.java:47)
Caused by: java.io.IOException: DER length more than 4 bytes: 76
at org.bouncycastle.asn1.ASN1InputStream.readLength(Unknown Source)
at org.bouncycastle.asn1.ASN1StreamParser.readObject(Unknown Source)
at org.bouncycastle.asn1.ASN1StreamParser.readVector(Unknown Source)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.