CAFE

보안

TLS Alert protocol

작성자운영자|작성시간16.07.01|조회수2,656 목록 댓글 0

https://en.wikipedia.org/wiki/Transport_Layer_Security#Alert_protocol


Alert protocol

해당 레코드는 일반적으로 핸드쉐이크 수행중 또는 애플리캐이션 교환 시에 전송하지 않습니다. 하지만 이 메시지는 핸드쉐이크가 완료된 시점부터 섹션이 닫혀지기 전사이까지에는 언제든 보내어질 수 있습니다. fatal error(치명적인 에러) 신호를 보내기 위해 이 메시지를 사용하는 경우, 해당 섹션은 즉각 종료 됩니다. 즉 이 레코드는 섹션 종류상의 목적으로 사용되어 집니다. 만약 alert 레벨이 fatal이 아닌 warning 수준으로 설정한 경우, 상대방에 의해 섹션을 종료할지 말지 선택하게 할 수 있습니다.


+Byte +0Byte +1Byte +2Byte +3
Byte
0
21 
Bytes
1..4
VersionLength
(Major)(Minor)02
Bytes
5..6
LevelDescription 
Bytes
7..(p-1)
MAC (optional)
Bytes
p..(q-1)
Padding (block ciphers only)


+

Byte +0

Byte +1

Byte +2

Byte +3

Byte
0





Bytes
1..4





Bytes
5..6





















5번째 바이트는 레벨이 들어가는 필드입니다. 레벨은 alert의 종류를 구분시켜주는 용도로 사용 됩니다. 만약 레벨이 fatal인 경우, alert메시지를 보낸 서버는 해당 섹션을 즉시 종료 시킵니다. 만약 보낸 서바가 해당 섹션을 종료시키지 않았을 경우에는 alert메시지를 받은 서버는 해당 섹션을 스스로 종료시켜야 할 것입니다. Alert records는 옵션이긴하지만 섹션 전에 Alert메시지가 빠진 경우 해당 섹션이 핸드쉐이크에 의해 다시 시작될 수도 있습니다.

일반적으로 SSL/TLS를 통해 데이터 전송을 완료한 후 섹션을 닫는 쪽 단말에서는 Alert 메시지를 보내야 합니다. Alert메시지를 보낼 때, 간단히 레벨은 warning으로 설정하고 code 값은 Close notify에 해당하는 0으로 보냅니다. 이렇게 해야지 섹션이 자동으로 재 시작되는것을 방지하여 안전하고 효과적으로 닫을 수 있습니다.


Alert 레벨 타입

코드

레벨 타입

연결 상태

1

warning

연결 또는 보안이 불안정할 수 있음.

2

fatal

연결 또는 보안이 위태로워 질 수 있거나 회복 불가한 에러가 발생할 수 있음.


아래 필드는 Alert 타입입니다:

odeDescriptionLevel typesNote
0Close notifywarning/fatal
10Unexpected messagefatal
20Bad record MACfatalPossibly a bad SSL implementation, or payload has been tampered with e.g. FTP firewall rule on FTPS server.
21Decryption failedfatalTLS only, reserved
22Record overflowfatalTLS only
30Decompression failurefatal
40Handshake failurefatal
41No certificatewarning/fatalSSL 3.0 only, reserved
42Bad certificatewarning/fatal
43Unsupported certificatewarning/fatale.g. certificate has only Server authentication usage enabled and is presented as a client certificate
44Certificate revokedwarning/fatal
45Certificate expiredwarning/fatalCheck server certificate expire also check no certificate in the chain presented has expired
46Certificate unknownwarning/fatal
47Illegal parameterfatal
48Unknown CA (Certificate authority)fatalTLS only
49Access deniedfatalTLS only – e.g. no client certificate has been presented (TLS: Blank certificate message or SSLv3: No Certificate alert), but server is configured to require one.
50Decode errorfatalTLS only
51Decrypt errorwarning/fatalTLS only
60Export restrictionfatalTLS only, reserved
70Protocol versionfatalTLS only
71Insufficient securityfatalTLS only
80Internal errorfatalTLS only
90User canceledfatalTLS only
100No renegotiationwarningTLS only
110Unsupported extensionwarningTLS only
111Certificate unobtainablewarningTLS only
112Unrecognized namewarning/fatalTLS only; client's Server Name Indicator specified a hostname not supported by the server
113Bad certificate status responsefatalTLS only
114Bad certificate hash valuefatalTLS only
115Unknown PSK identity (used inTLS-PSK and TLS-SRP)fatalTLS only
120No Application ProtocolfatalTLS only, client's ALPN did not contain any server-supported protocols



다음검색
현재 게시글 추가 기능 열기
  • 북마크
  • 공유하기
  • 신고하기

댓글

댓글 리스트
맨위로

카페 검색

카페 검색어 입력폼