From 0ce9a0587d8c5ff155bbe510a088b27cae82a088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Obernd=C3=B6rfer?= Date: Tue, 19 Jun 2012 17:22:37 +0200 Subject: [PATCH] Cleanup: bring tag type blocks in read_message() in order (non-functional) --- src/openpgp.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/openpgp.js b/src/openpgp.js index b18d4495..b4b9818f 100644 --- a/src/openpgp.js +++ b/src/openpgp.js @@ -219,12 +219,6 @@ function _openpgp () { if (first_packet.tagType == 8) { util.print_error("A directly compressed message is currently not supported"); break; - } else - // Literal Message - // TODO: needs to be implemented. From a security perspective: this message is plaintext anyway. - if (first_packet.tagType == 11) { - util.print_error("A direct literal message is currently not supported."); - break; } else // Marker Packet (Obsolete Literal Packet) (Tag 10) // "Such a packet MUST be ignored when received." see http://tools.ietf.org/html/rfc4880#section-5.8 @@ -234,6 +228,12 @@ function _openpgp () { // continue with next packet mypos += first_packet.packetLength + first_packet.headerLength; l -= (first_packet.packetLength + first_packet.headerLength); + } else + // Literal Message + // TODO: needs to be implemented. From a security perspective: this message is plaintext anyway. + if (first_packet.tagType == 11) { + util.print_error("A direct literal message is currently not supported."); + break; } } else { util.print_error('no message found!');