조회 수 5367 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

QNetworkAccessManager를 사용하여 https URL을 가져오면 SslHandshakeFailedError 에러와 함께 실패하는 경우가 있다.


the SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted.” 

 

슬롯을 QNetworkReply의 error(QNetworkReply::NetworkError) 신호에 연결하여 이 오류를 잡을(catch) 수 있다. SslHandshakeFailedError 임을 알 수 있다. 이 에러에 대해 이곳에서 자세히 알 수 있다.

 

Qt 응용프로그램에서 이 SslHandshakeFailedError를 수정하려면 2단계를 수행해야 한다.

 

먼저 요청에 대해 피어 확인 모드를 QSslSocket::VerifyNone 으로 설정한다.

QSslConfiguration conf = request.sslConfiguration();
// QSslSocket은 피어로부터 인증서를 요청하지 않는다.
conf.setPeerVerifyMode(QSslSocket::VerifyNone);
request.setSslConfiguration(conf);

 

서버의 인증서를 확인하지 않아도 SSL 오류(QSslError::NoError)가 계속 발생한다. 그래서 다음 단계는 QNetworkReply의 sslErrors(QList<QSslError>) 신호를 ignoreSslErrors() 슬롯에 연결하여 오류를 무시하는 것이다.


  1. No Image notice

    Qt프로그래밍(QtQuick) Beginner를 위한 글 읽는 순서

    Date2019.01.05 CategoryQML and Qt Quick By운영자 Views131086
    read more
  2. No Image

    clazy 로 13개의 시그널, 슬롯 오류 해결

    Date2022.08.23 CategoryGeneral and Desktop Bymakersweb Views8525
    Read More
  3. No Image

    Qt 스마트 포인터 (QSharedPointer, QScopedPointer, QPointer)

    Date2022.08.18 CategoryC++ Class Bymakersweb Views5992
    Read More
  4. Qt 6.4에 추가될 Qt Quick 3D Physics

    Date2022.08.07 CategoryQt 6 Bymakersweb Views4514
    Read More
  5. No Image

    HTTPS URL을 연결할 때 SslHandshakeFailedError 오류

    Date2022.07.31 CategoryC++ Class Bymakersweb Views5367
    Read More
  6. No Image

    단일 인스턴스 Qt 응용 프로그램(Single-instance Application)

    Date2022.06.23 CategoryGeneral and Desktop Bymakersweb Views5971
    Read More
  7. Qt로 작성된 iOS 앱에서 시리얼 통신

    Date2022.04.30 CategoryMobile and Embedded Bymakersweb Views9547
    Read More
  8. No Image

    VirtualKeyboard 스타일 커스터 마이징

    Date2022.03.13 CategoryGeneral and Desktop Bymakersweb Views5762
    Read More
  9. No Image

    성능 고려 및 제안 사항

    Date2022.03.07 Bymakersweb Views4424
    Read More
  10. No Image

    Binding 타입으로 객체 속성 간 묶기

    Date2022.03.04 CategoryQML and Qt Quick Bymakersweb Views6714
    Read More
  11. No Image

    Qt Bluetooth Low Energy 개요

    Date2022.02.13 CategoryMobile and Embedded Bymakersweb Views5696
    Read More
  12. Qt Android 앱에 AdMob 배너달기

    Date2021.12.04 CategoryMobile and Embedded Bymakersweb Views3778
    Read More
  13. No Image

    Qt 6의 C++ 프로퍼티 바인딩 예제

    Date2021.11.01 CategoryQt 6 Bymakersweb Views6813
    Read More
  14. QML에서 앵커(anchors)로 위치 지정

    Date2021.10.05 CategoryQML and Qt Quick Bymakersweb Views10019
    Read More
  15. No Image

    안드로이드용 Qt 6.2

    Date2021.10.02 CategoryQt 6 Bymakersweb Views10110
    Read More
  16. Qt 응용프로그램에서 PDF 문서 렌더링

    Date2021.09.23 CategoryGeneral and Desktop Bymakersweb Views5623
    Read More
  17. QML에서 Websocket 서버와 통신

    Date2021.09.18 CategoryQML and Qt Quick Bymakersweb Views5379
    Read More
  18. No Image

    QML 코딩 규칙

    Date2021.09.05 CategoryQML and Qt Quick Bymakersweb Views9138
    Read More
  19. QML 에서 QR코드 생성

    Date2021.08.20 CategoryQML and Qt Quick Bymakersweb Views5330
    Read More
  20. No Image

    앱을 종료할 때 QML 바인딩 오류를 피하는 방법

    Date2021.08.08 CategoryQML and Qt Quick Bymakersweb Views9781
    Read More
  21. Qt 응용프로그램에서 Lottie Animation사용

    Date2021.05.30 CategoryQML and Qt Quick Bymakersweb Views5557
    Read More
Board Pagination Prev 1 2 3 4 5 9 Next
/ 9