Protocol Error Messages
Protocol error messages are so closely tied to the definition of HEMP that it made sense to define the contents of the data section for protocol error messages in this memo, even though the data section is generally considered application specific.
The data section of all protocol error messages has the same format, which is shown in Figure 10. This format has been chosen to agree with the error message format and ASN.1 type used for language processing errors in RFC-1024, and the error codes have been chosen such that they do not overlap.
ProtocolError ::= [APPLICATION 0] implicit sequence {
protoErrorCode INTEGER,
protoErrorOffset INTEGER,
protoErrorDescribed IA5String,
}
Figure 10: Data Section For Protocol Error Messages
The protoErrorCode is a number which specifies the particular type of error encountered. The defined codes are:
0 - reserved
1 - ASN.1 format error. Some error has been encountered in parsing the message. Examples of such an error are an unknown type or a violation of the ASN.1 syntax.
2 - Wrong HEMP version number. The version number in the common header is invalid. Note that this may be an indication of possible network intrusion and should be logged at sites concerned with security.
3 - Authentication error. Authentication has failed. This error code is defined for completeness, but implementations are strongly discouraged from using it. Returning authentication failure information may aid intruders in cracking the authentication system. It is recommended that authentication errors be logged as possible security problems.
4 - ReplyEncryption type not supported. The entity does not support the encryption method requested in the ReplyEncryption section.
5 - Decryption failed. The entity could not decrypt the encrypted message. Note that this means that the entity could not read the CommonHeader to find the messageId for the reply. In this case, the messageId field should be set to 0.
6 - Application Failed. Some application failure made it impossible to process the message.
The protoErrorOffset is the number of the octet in which the error was discovered. The first octet in the message is octet number 0.
The protoErrorDescribed field is a string which describes the particular error. This description is expected to give a more detailed description of the particular error encountered.