if ( tlv.getLength() == 0 )
{
LOG.error( I18n.err( I18n.ERR_04066 ) );
// This will generate a PROTOCOL_ERROR
throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
}
// The etype is an integer
BerValue value = tlv.getValue();
EncryptionType etype = null;
ETypeInfo2Entry etypeInfo2Entry = eTypeInfo2EntryContainer.getETypeInfo2Entry();
try
{
int eType = IntegerDecoder.parse( value );
etype = EncryptionType.getTypeByValue( eType );
etypeInfo2Entry.setEType( etype );
if ( IS_DEBUG )
{
LOG.debug( "etype : " + etype );
}
// The next tag is optional, we can end here
eTypeInfo2EntryContainer.setGrammarEndAllowed( true );
}
catch ( IntegerDecoderException ide )
{
LOG.error( I18n.err( I18n.ERR_04070, Strings.dumpBytes( value.getData() ), ide
.getLocalizedMessage() ) );
// This will generate a PROTOCOL_ERROR
throw new DecoderException( ide.getMessage() );
}
}