[ 
https://issues.apache.org/jira/browse/NIFI-3954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16020281#comment-16020281
 ] 

ASF GitHub Bot commented on NIFI-3954:
--------------------------------------

Github user alopresto commented on the issue:

    https://github.com/apache/nifi/pull/1841
  
    Running the (old) application with the [linked 
flow](https://gist.github.com/alopresto/dca35c3758ad09f2eb8e23f2e3204367) would 
get an `SSLPeerUnverifiedException` on the certificate. 
     
    <img width="1920" alt="screen shot 2017-05-22 at 1 26 11 pm" 
src="https://cloud.githubusercontent.com/assets/798465/26330385/7f8fffd2-3f00-11e7-8371-6d0ddd64fc6c.png";>
    
    With the new version of the `httpclient` library, this is corrected and the 
`400` response is received as expected. 
    
    ```
    2017-05-22 15:04:34,339 ERROR [Timer-Driven Process Thread-3] 
o.a.nifi.processors.standard.GetHTTP 
GetHTTP[id=31d14773-015c-1000-ca53-529cf87acf87] received status code 400:Bad 
Request from https://www.googleapis.com/youtube/v3/commentThreads?key=
    ```
    
    I had to explicitly add `httpcore` as a dependency to bring in the 
`@ThreadSafe` annotation. 


> javax.net.SSL.PeerUnverifiedException Hostname www.googleapis.com does the 
> match the certificate subject provided by the peer
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-3954
>                 URL: https://issues.apache.org/jira/browse/NIFI-3954
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.2.0
>            Reporter: Dmitry Lukyanov
>            Assignee: Andy LoPresto
>
> The description taken here:
> https://stackoverflow.com/questions/44112959/apache-nifi-with-youtube-data-api
> Use {{GetHTTP}} processor with url 
> {{https://www.googleapis.com/youtube/v3/commentThreads?key=}}
> Expected response: should receive http error code 400 with json output, but 
> got exception of host name verification
> {code}Hostname www.googleapis.com does the match the certificate subject 
> provided by the peer *.googleapis.com{code}
> And reproduced with java 1.8 and nifi 1.2.0
> Also I found this issue in http client 4.4.x
> https://issues.apache.org/jira/browse/HTTPCLIENT-1613
> And nifi 1.2.0 uses httpclient-4.4.1.jar 
> Seems just need to change version of httpclient to 4.5



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to