DevelopersVietNam / as3crypto

Automatically exported from code.google.com/p/as3crypto
0 stars 0 forks source link

I DONT KNOW HOW TO HANDLE DER stuff of TYPE 22 #39

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use poco netssl_openssl as server side.
2. Use TLSSocket connect the sever.
3.

What is the expected output? What do you see instead?
In debug mode, trace print:
I DONT KNOW HOW TO HANDLE DER stuff of TYPE 22
I DONT KNOW HOW TO HANDLE DER stuff of TYPE 22
I DONT KNOW HOW TO HANDLE DER stuff of TYPE 22
I DONT KNOW HOW TO HANDLE DER stuff of TYPE 22
TLSEngine shutdown triggered by Error: Cannot verify certificate

What version of the product are you using? On what operating system?
as3crypto 1.0  flex 3.0 
At server side, use SSL 3.0 and TLS 1.0, both version get the same result.

Please provide any additional information below.

Original issue reported on code.google.com by novra...@gmail.com on 20 Apr 2010 at 5:25

GoogleCodeExporter commented 8 years ago
@henrit, could you please comment? looking forward to work together to get this 
issue closed.

Original comment by gretel....@gmail.com on 3 Jun 2010 at 3:43

GoogleCodeExporter commented 8 years ago
Hi,
 i got the above same error when i connect to secure connection.

Below is the error i got when i run the test program in as3crypto  with 
"login.yahoo.com". 

Error: Error #2030: End of file was encountered.
    at flash.utils::ByteArray/readShort()
    at com.hurlant.crypto.tls::TLSEngine/parseHandshakeHello()[E:\Working\crypto\src\com\hurlant\crypto\tls\TLSEngine.as:434]
    at com.hurlant.crypto.tls::TLSEngine/parseHandshake()[E:\Working\crypto\src\com\hurlant\crypto\tls\TLSEngine.as:312]
    at com.hurlant.crypto.tls::TLSEngine/parseOneRecord()[E:\Working\crypto\src\com\hurlant\crypto\tls\TLSEngine.as:228]
    at com.hurlant.crypto.tls::TLSEngine/parseRecord()[E:\Working\crypto\src\com\hurlant\crypto\tls\TLSEngine.as:206]
    at com.hurlant.crypto.tls::TLSEngine/dataAvailable()[E:\Working\crypto\src\com\hurlant\crypto\tls\TLSEngine.as:139]
Response from login.yahoo.com: 0 characters
Time used = 72591ms

Original comment by suresh...@gmail.com on 28 Jun 2010 at 2:02

GoogleCodeExporter commented 8 years ago
Change your com.hurlant.util.der.DER class. in the parse function (around line 
152) add the following case statements to the switch...

// support for type 12
case 0x0C: // V_ASN1_UTF8STRING
    ps = new PrintableString(type, len);
    ps.setString(der.readMultiByte(len, "utf-8"));
    return ps;
// support for type 22
case 0x16: // V_ASN1_IA5STRING
    ps = new PrintableString(type, len);
    ps.setString(der.readMultiByte(len, "x-IA5"));
    return ps;

this will solve you problem.

Original comment by geniusco...@gmail.com on 1 Sep 2010 at 12:45

GoogleCodeExporter commented 8 years ago
I experience the same problem.

Error: Error #2030: End of file was encountered.
    at flash.utils::ByteArray/readShort()
    at com.hurlant.crypto.tls::TLSEngine/parseHandshakeHello()[E:\Working\crypto\src\com\hurlant\crypto\tls\TLSEngine.as:434]

I use as3crypto-1_3_patched.swc

Original comment by lightpos...@gmail.com on 22 Sep 2010 at 6:38

GoogleCodeExporter commented 8 years ago
Error: Error #2030: End of file was encountered.
    at flash.utils::ByteArray/readShort()
    at com.hurlant.crypto.tls::TLSEngine/parseHandshakeHello()[/Users/gabe/Projects/Crypto/com/hurlant/crypto/tls/TLSEngine.as:434]
    at com.hurlant.crypto.tls::TLSEngine/parseHandshake()[/Users/gabe/Projects/Crypto/com/hurlant/crypto/tls/TLSEngine.as:312]
    at com.hurlant.crypto.tls::TLSEngine/parseOneRecord()[/Users/gabe/Projects/Crypto/com/hurlant/crypto/tls/TLSEngine.as:228]
    at com.hurlant.crypto.tls::TLSEngine/parseRecord()[/Users/gabe/Projects/Crypto/com/hurlant/crypto/tls/TLSEngine.as:206]
    at com.hurlant.crypto.tls::TLSEngine/dataAvailable()[/Users/gabe/Projects/Crypto/com/hurlant/crypto/tls/TLSEngine.as:139]

Original comment by lightpos...@gmail.com on 22 Sep 2010 at 6:42