Java APNS Certificate Error with “DerInputStream.getLength(): lengthTag=109, too big.”

后端 未结 6 2340
孤街浪徒
孤街浪徒 2020-12-17 15:16

When I try to using java APNS to send the push notification to iOS, I got this error message:

com.notnoop.exceptions.InvalidSSLConfig: java.io.IOException: D

6条回答
  •  独厮守ぢ
    2020-12-17 15:39

    I had the same problem but my solution will help you only if you are using maven.

    Maven resource filtering (that let's you include variables in your resource files) can mess up your binaries - and certificates are especially sensitive to modification.

    In general, binary content shouldn't be filtered. But I couldn't just simply disable resource filtering because I have some .properties files that include variables. So the solution was to exclude .p12 files from filtering.

    
        [...]
        
            
                src/main/resources
                true
                
                    **/*.p12
                
            
            
                src/main/resources
                false
                
                    **/*.p12
                
            
        
        [...]
    
    

    More about maven resource filtering: http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html

提交回复
热议问题