* Exposed useful sizes MAX_X509_HEADER_SZ and PEM_LINE_SZ

* Refactor the PEM saving code in `test.c`, so its not using large 4K buffer and calculates based on DER.
* Enable ECC key generation test even without `WOLFSSL_KEY_GEN`.
* Added `ECC_KEYGEN_SIZE` macro for ECC key generation testing.
* Refactor ECC DER key generation to use `ECC_BUFSIZE`.
This commit is contained in:
David Garske
2020-04-23 16:11:54 -07:00
parent 81f959336b
commit 28b686a8ca
4 changed files with 89 additions and 159 deletions

View File

@@ -29,6 +29,7 @@
#ifndef NO_CODING
#include <wolfssl/wolfcrypt/coding.h>
#include <wolfssl/wolfcrypt/asn.h> /* For PEM_LINE_SZ */
#include <wolfssl/wolfcrypt/error-crypt.h>
#include <wolfssl/wolfcrypt/logging.h>
@@ -36,7 +37,6 @@
enum {
BAD = 0xFF, /* invalid encoding */
PAD = '=',
PEM_LINE_SZ = 64,
BASE64_MIN = 0x2B,
BASE16_MIN = 0x30,
};