PassiveX icon indicating copy to clipboard operation
PassiveX copied to clipboard

리눅스에서 Veraport 핸들러가 동작하지 않아요

Open foriequal0 opened this issue 7 years ago • 4 comments

리눅스에서 잘 빌드되고 각 핸들러 스레드가 뜨는데 정상 동작하지 않습니다. 일단 확인한 은행, 핸들러는 하나은행, Veraport 인데, Ubuntu 17.04 Chrome, Firefox 모두

전자금융사기예방서비스를 위한 모듈이 설치되지 않았거나 정상적으로 실행되지 않았습니다.

설치화면으로 이동 합니다. (조치 후에도 계속 메시지가 나오면 고객센터에 문의 바랍니다.)

라면서 보안 프로그램 설치 페이지로 redirect 되더니 통합설치프로그램 Veraport 미설치가 뜹니다.

여기서부터 Chrome, Firefox 동작이 갈리는데요,

Chrome은 다음과 같은 로그를 내고,

[03:29:16] [VeraportHandler] GET /
[03:29:16] Unknown command: getOsInfo
Exception thrown: 'System.Collections.Async.AsyncEnumerationCanceledException' in AsyncEnumerable.dll
Exception thrown: 'System.Threading.Tasks.TaskCanceledException' in System.Private.CoreLib.ni.dll

Firefox는 다음과 같은 로그를 냅니다.

Exception thrown: 'System.IO.IOException' in System.Private.CoreLib.ni.dll
Exception thrown: 'System.IO.IOException' in System.Private.CoreLib.ni.dll
[03:37:45] Exception occured while handling request on VeraportHandler : System.IO.IOException: The decryption operation failed, see inner exception. ---> Interop+OpenSsl+SslException: Decrypt failed with OpenSSL error - SSL_ERROR_SSL. ---> Interop+Crypto+OpenSslCryptographicException: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca
   --- End of inner exception stack trace ---
   at Interop.OpenSsl.Decrypt(SafeSslHandle context, Byte[] outBuffer, Int32 count, SslErrorCode& errorCode)
   at System.Net.Security.SslStreamPal.EncryptDecryptHelper(SafeDeleteContext securityContext, Byte[] input, Int32 offset, Int32 size, Boolean encrypt, Byte[]& output, Int32& resultSize)
   --- End of inner exception stack trace ---
   at System.Net.Security.SslStreamInternal.ProcessReadErrorCode(SecurityStatusPal status, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest, Byte[] extraBuffer)
   at System.Net.Security.SslStreamInternal.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStreamInternal.StartFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStreamInternal.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStreamInternal.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStreamInternal.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, BufferAsyncResult asyncResult)
   at System.Net.Security.SslStream.BeginRead(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback asyncCallback, Object asyncState)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncTrim[TInstance,TArgs](TInstance thisRef, TArgs args, Func`5 beginMethod, Func`3 endMethod)
   at System.IO.Stream.BeginEndReadAsync(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.Stream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
   at System.IO.Stream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.StreamReader.<ReadBufferAsync>d__65.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at System.IO.StreamReader.<ReadLineAsyncInternal>d__59.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at PassiveX.ServiceRunner`1.<>c__DisplayClass11_0.<<HandleHttpRequest>b__0>d.MoveNext() in /home/foriequal0/workspace/PassiveX/PassiveX/ServiceRunner.cs:line 95
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Collections.Async.ForEachAsyncExtensions.<ForEachAsync>d__13`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at PassiveX.ServiceRunner`1.<Run>d__10.MoveNext() in /home/foriequal0/workspace/PassiveX/PassiveX/ServiceRunner.cs:line 71

foriequal0 avatar Jun 27 '17 18:06 foriequal0

https://github.com/dotnet/corefx/issues/10146#issuecomment-297178697 이런 문제 때문인거같아서

pk12util -i ca.pfx -d sql:$HOME/.mozilla/firefox/{...}.default
pk12util -i ca.pfx -d sql:$HOME/.pki/nssdb

해봤는데 여전한데, 잘못한건지도 모르겠네요..

foriequal0 avatar Jun 27 '17 18:06 foriequal0

.NET이 시스템 전역 Certs를 읽기는 한다는 모양이니 http://blog.xelnor.net/firefox-systemcerts/ 이런거라던가... https://github.com/dotnet/corefx/issues/15871#issuecomment-277884403 이런거라던가...

foriequal0 avatar Jun 27 '17 19:06 foriequal0

JS 플러그인들이 OS/브라우져 종류에 따라 동작이 달라지는 경우가 많아서 그런 것 같기도 하네요 (아마?) 일단 전 크롬에서도 UA를 Edge로 바꾸고 작업하고 있습니다. 혹시 리눅스에서도 UA를 Edge로 변경하면 문제 없이 돌아갈지도 모르겠네요. Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10136

Edge는 확장기능 설치나 NPAPI 사용도 불가능하고 ActiveX 설치도 불가능해 무조건 웹 기반 외부 플러그인을 써야 하는 관계로 최대한 특이 케이스를 막을 수 있어 좋습니다. (ex: TouchEnEx의 경우 크롬에서는 exe 설치가 아닌 확장기능 설치를 요구해 PassiveX를 쓸 수 없으나 Edge에서는 exe 웹서버 사용)

devunt avatar Jun 27 '17 19:06 devunt

https://github.com/FiloSottile/mkcert 이런걸 쓰면 좋겠네요

foriequal0 avatar Aug 13 '18 16:08 foriequal0