내가 사용할 때 Kakao Link

It happened when I call the kakao “LinkApi.shared.imageUpload” and “LinkApi.shared.defaultLink”:

**Error Domain=NSURLErrorDomain Code=-1200 "
SSL 오류가 발생했으며 이 서버에 오류를 설정할 수 없습니다." UserInfo={NSErrorFailingURLStringKey=https://kapi.kakao.com/v2/api/talk/message/image/upload, NSLocalizedRecoverySuggestion=그래도 이 서버에 연결하시겠습니까?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask

Hi~

Tell me your app ID.
(My Application>App Settings>Summary > ID)

623326

Please tell me the iOS version and the TLS version you called.

My iphone os is 15.1, and tls is 1.2
It’s strange that the kakao link worked normal at August and the iphone os is iOS14.5, but now it work error,because I update my iphone os?

If you iPhone os 15.1 and tls is 1.2, there is no problem.

Please share the code that was used.

I’ll test it.

I retry the iphone os12.4 and iphone os14.5, it works normal
Only On my iphone os 15.0.2, it works error
I use the SDK Sample:
image

I installed 15.0.2 and tested it, but it works normally.

If it’s 1200 error, it’s an SSL connection error.
Please add settings to the info.list and test them.

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
        <true/>
</dict>

or

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>kakao.com</key>
        <dict>
                <key>NSIncludesSubdomains</key>
                    <true/>
                <key>NSExceptionRequiresForwardSecrecy</key>
                    <false/>
        </dict>
    </dict>
</dict>
```

I tried to add the config but it still didn`t work, and I runed the ‘nscurl’ to get the result:

nscurl --ats-diagnostics --verbose https://kapi.kakao.com/v2/api/talk/message/image/upload
Starting ATS Diagnostics

Configuring ATS Info.plist keys and displaying the result of HTTPS loads to https://kapi.kakao.com/v2/api/talk/message/image/upload.
A test will "PASS" if URLSession:task:didCompleteWithError: returns a nil error.
================================================================================

Default ATS Secure Connection
---
ATS Default Connection
ATS Dictionary:
{
}
Result : PASS
---

================================================================================

Allowing Arbitrary Loads

---
Allow All Loads
ATS Dictionary:
{
    NSAllowsArbitraryLoads = true;
}
Result : PASS
---

================================================================================

Configuring TLS exceptions for kapi.kakao.com

---
TLSv1.3
ATS Dictionary:
{
    NSExceptionDomains =     {
        "kapi.kakao.com" =         {
            NSExceptionMinimumTLSVersion = "TLSv1.3";
        };
    };
}
Result : FAIL
Error : Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://kapi.kakao.com/v2/api/talk/message/image/upload, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <4D7CC1F6-5977-4AB1-9BA6-A5B1E7346826>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <4D7CC1F6-5977-4AB1-9BA6-A5B1E7346826>.<1>"
), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://kapi.kakao.com/v2/api/talk/message/image/upload, NSUnderlyingError=0x7fd4f0f11d00 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9824, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9824}}, _kCFStreamErrorCodeKey=-9824}
---

---
TLSv1.2
ATS Dictionary:
{
    NSExceptionDomains =     {
        "kapi.kakao.com" =         {
            NSExceptionMinimumTLSVersion = "TLSv1.2";
        };
    };
}
Result : PASS
---

---
TLSv1.1
ATS Dictionary:
{
    NSExceptionDomains =     {
        "kapi.kakao.com" =         {
            NSExceptionMinimumTLSVersion = "TLSv1.1";
        };
    };
}
Result : PASS
---

---
TLSv1.0
ATS Dictionary:
{
    NSExceptionDomains =     {
        "kapi.kakao.com" =         {
            NSExceptionMinimumTLSVersion = "TLSv1.0";
        };
    };
}
Result : PASS
---

================================================================================

Configuring PFS exceptions for kapi.kakao.com

---
Disabling Perfect Forward Secrecy
ATS Dictionary:
{
    NSExceptionDomains =     {
        "kapi.kakao.com" =         {
            NSExceptionRequiresForwardSecrecy = false;
        };
    };
}
Result : PASS
---

================================================================================

Configuring PFS exceptions and allowing insecure HTTP for kapi.kakao.com

---
Disabling Perfect Forward Secrecy and Allowing Insecure HTTP
ATS Dictionary:
{
    NSExceptionDomains =     {
        "kapi.kakao.com" =         {
            NSExceptionAllowsInsecureHTTPLoads = true;
            NSExceptionRequiresForwardSecrecy = false;
        };
    };
}
Result : PASS
---

================================================================================

Configuring TLS exceptions with PFS disabled for kapi.kakao.com

---
TLSv1.3 with PFS disabled
ATS Dictionary:
{
    NSExceptionDomains =     {
        "kapi.kakao.com" =         {
            NSExceptionMinimumTLSVersion = "TLSv1.3";
            NSExceptionRequiresForwardSecrecy = false;
        };
    };
}
Result : FAIL
Error : Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://kapi.kakao.com/v2/api/talk/message/image/upload, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <CF978CF3-5FE9-4F5C-AB3B-A1AE66A27255>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <CF978CF3-5FE9-4F5C-AB3B-A1AE66A27255>.<1>"
), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://kapi.kakao.com/v2/api/talk/message/image/upload, NSUnderlyingError=0x7fd4f0c3f1e0 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9824, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9824}}, _kCFStreamErrorCodeKey=-9824}
---

---
TLSv1.2 with PFS disabled
ATS Dictionary:
{
    NSExceptionDomains =     {
        "kapi.kakao.com" =         {
            NSExceptionMinimumTLSVersion = "TLSv1.2";
            NSExceptionRequiresForwardSecrecy = false;
        };
    };
}
Result : PASS
---

---
TLSv1.1 with PFS disabled
ATS Dictionary:
{
    NSExceptionDomains =     {
        "kapi.kakao.com" =         {
            NSExceptionMinimumTLSVersion = "TLSv1.1";
            NSExceptionRequiresForwardSecrecy = false;
        };
    };
}
Result : PASS
---

---
TLSv1.0 with PFS disabled
ATS Dictionary:
{
    NSExceptionDomains =     {
        "kapi.kakao.com" =         {
            NSExceptionMinimumTLSVersion = "TLSv1.0";
            NSExceptionRequiresForwardSecrecy = false;
        };
    };
}
Result : PASS
---

================================================================================

Configuring TLS exceptions with PFS disabled and insecure HTTP allowed for kapi.kakao.com

---
TLSv1.3 with PFS disabled and insecure HTTP allowed
ATS Dictionary:
{
    NSExceptionDomains =     {
        "kapi.kakao.com" =         {
            NSExceptionAllowsInsecureHTTPLoads = true;
            NSExceptionMinimumTLSVersion = "TLSv1.3";
            NSExceptionRequiresForwardSecrecy = false;
        };
    };
}
Result : FAIL
Error : Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://kapi.kakao.com/v2/api/talk/message/image/upload, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <FF858F90-039D-409A-BEE6-046362252B1C>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <FF858F90-039D-409A-BEE6-046362252B1C>.<1>"
), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://kapi.kakao.com/v2/api/talk/message/image/upload, NSUnderlyingError=0x7fd4f0d66840 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9824, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9824}}, _kCFStreamErrorCodeKey=-9824}
---

---
TLSv1.2 with PFS disabled and insecure HTTP allowed
ATS Dictionary:
{
    NSExceptionDomains =     {
        "kapi.kakao.com" =         {
            NSExceptionAllowsInsecureHTTPLoads = true;
            NSExceptionMinimumTLSVersion = "TLSv1.2";
            NSExceptionRequiresForwardSecrecy = false;
        };
    };
}
Result : PASS
---

---
TLSv1.1 with PFS disabled and insecure HTTP allowed
ATS Dictionary:
{
    NSExceptionDomains =     {
        "kapi.kakao.com" =         {
            NSExceptionAllowsInsecureHTTPLoads = true;
            NSExceptionMinimumTLSVersion = "TLSv1.1";
            NSExceptionRequiresForwardSecrecy = false;
        };
    };
}
Result : PASS
---

---
TLSv1.0 with PFS disabled and insecure HTTP allowed
ATS Dictionary:
{
    NSExceptionDomains =     {
        "kapi.kakao.com" =         {
            NSExceptionAllowsInsecureHTTPLoads = true;
            NSExceptionMinimumTLSVersion = "TLSv1.0";
            NSExceptionRequiresForwardSecrecy = false;
        };
    };
}
Result : PASS
---

================================================================================

I guess that it is because my iphone os use the tlsv1.3?
I open the kakao.com in my phone and the error occurs
and I connect the phone and my computer with Charles, and I can open the kakao.com(my computer call with TLSv1.2)

TLS 1.3 is not supported.

Did you change the iPhone setting to operate only TLS 1.3?

I didn`t change any Setting, I just updated my iphone os
Can you tell me how can I change the TLS setting?

I also updated to os 15.0.2 while testing this time, but it works normally.

I think you should ask Apple about TLS settings.
(I’ll look for it, too)

OK,thanks

Can I ask a question?
Do you have plan to adapt to TLS1.3?

Yes, I reported the current situation.

I think it will be applied sequentially from kauth.kakao.com.

The exact schedule has not been released yet.

ok, thanks for your answer