]> the.earth.li Git - onak.git/blobdiff - armor.c
Add ability to drop overly large packets
[onak.git] / armor.c
diff --git a/armor.c b/armor.c
index 230510a24ed7fbaecbb3c4e919fa56d37a6b638f..595c4452480b6b1e0df5769f9b90efcbb59a192f 100644 (file)
--- a/armor.c
+++ b/armor.c
  * more details.
  *
  * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
 #include <stdlib.h>
 
 #include "armor.h"
 #include "keystructs.h"
-#include "log.h"
-#include "onak-conf.h"
 #include "parsekey.h"
 #include "version.h"
 
@@ -56,7 +53,7 @@ static unsigned char encode64(unsigned char c) {
        } else if (c == 63) {
                c = '/';
        } else {
-               log_assert(c < 64);
+               c = '?';
        }
 
        return c;
@@ -165,7 +162,6 @@ static int armor_putchar_int(void *ctx, unsigned char c)
        unsigned char t;
        int i;
 
-       log_assert(ctx != NULL);
        state = (struct armor_context *) ctx;
 
        switch (state->curoctet++) {
@@ -210,7 +206,6 @@ static int armor_putchar(void *ctx, size_t count, void *c)
 {
        int i;
 
-       log_assert(c != NULL);
 
        for (i = 0; i < count; i++) {
                armor_putchar_int(ctx, ((char *) c)[i]);
@@ -269,7 +264,6 @@ static int dearmor_getchar(void *ctx, unsigned char *c)
        unsigned char tmpc;
        int i;
 
-       log_assert(ctx != NULL);
        state = (struct dearmor_context *) ctx;
        *c = 0;