Comments (9)
That's not the point. All sensitive information is masked out. Why the strings are hardcoded ?
` if (!cn.toLowerCase().contains("push")) {
throw new CertificateException("Not a push certificate - " + cn);
}
if (production && cn.toLowerCase().contains("apple development ios push services")) {
throw new CertificateEnvironmentMismatchException("Invalid environment for this certificate");
} else if (!production && cn.toLowerCase().contains("apple production ios push services")) {
throw new CertificateEnvironmentMismatchException("Invalid environment for this certificate");
}
`
The certs need not contain the strings that are hardcoded in the cert validation which is being done.
from apns-http2.
from apns-http2.
CN is like this: CN=APSP:0226d278-d925-4044-af07-a346da05e2c5/C=IN
As you can see this doesn't contain any strings against which validation is being done. For example: "push", "apple development ios push services","apple production ios push services". Please let us know what we can do to get this working. Would be a great help!!
from apns-http2.
@rohitsahay2000 Until now, all the certificates issued by Apple have contained those strings. It validates the certificate and ensures that you don't accidentally try to use your developer certificate (which has happened many times in the past).
I'll issue a new certificate for APNs tomorrow and check the CN on it.
from apns-http2.
@judepereira : Did you check? Have we removed the hardcoding?
from apns-http2.
any update on this?
I just downloaded a production certificate and it has CN=Apple Development IOS Push Services: myBunldleId
I doubled checked. It is the production certificate and it has development in it.
from apns-http2.
java.security.cert.CertificateException: Not a push certificate - VoIP Services: com.test.app
at com.clevertap.apns.CertificateUtils.validateCertificate(CertificateUtils.java:135)
at com.clevertap.apns.clients.SyncOkHttpApnsClient.<init>(SyncOkHttpApnsClient.java:131)
at com.clevertap.apns.clients.AsyncOkHttpApnsClient.<init>(AsyncOkHttpApnsClient.java:72)
at com.clevertap.apns.clients.ApnsClientBuilder.build(ApnsClientBuilder.java:170)
VoIP Push certification not working...
from apns-http2.
hi
I am facing with is bug
how to slove it?
from apns-http2.
It would be great to be able to change behavior with some boolean flag. (include verifying or not)
from apns-http2.
Related Issues (20)
- How to set alert option "subtitle"? HOT 2
- What should be system configuration while using this api
- CertificateUtils should support the VoIP message
- some APS new Dictionary Keys are not supported
- com.clevertap.apns.exceptions.CertificateEnvironmentMismatchException: Invalid environment for this certificate
- unexpected end of stream on okhttp3.Address@2f8c2e51 HOT 2
- ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
- alpn-boot jar causing conflict with jdbc (Oracle) connection
- How to handle socket timeout exception
- failure: NotificationResponse{error=null, httpStatusCode=-1, responseBody='null', cause=java.io.IOException: unexpected end of stream on okhttp3.Address@e9db4294} HOT 3
- Java 11 java.io.IOException: unexpected end of stream on okhttp3.Address
- Confusing release policy: 1.0.3 vs 1.0.5 vs 1.0.7
- Is it possible to get apns topic from cert automatically
- PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target HOT 1
- Ability to omit "alert" in payload
- If jdk8 version > 8u252, does it still need to add Jetty's ALPN JAR dependency? HOT 3
- java.lang.IllegalArgumentException: Unexpected char 0x0d
- unexpected end of stream on Connection {api.sandbox.push.apple.com:443 HOT 3
- apns-http2: v2.0.0 is not pulling in the version of okHttp specified in pom.xml
- Support MDM payload
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apns-http2.