diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-04-05 14:26:52 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-04-06 15:15:11 +0200 |
commit | 2232bf101e5d83c8782b4a9e93ed70f5a657e1d3 (patch) | |
tree | 8a3f18c2cdf3caa5e6b17990d926b185150d97a8 | |
parent | 6d63a93dd04f7a5bd77e8928e6288154f45171c2 (diff) | |
download | gnutls-2232bf101e5d83c8782b4a9e93ed70f5a657e1d3.tar.gz |
certtool: fixed newline skip code in smime-to-p7 code
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r-- | src/certtool.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/certtool.c b/src/certtool.c index 38e0ecd61c..c0103f19d8 100644 --- a/src/certtool.c +++ b/src/certtool.c @@ -3781,6 +3781,7 @@ void smime_to_pkcs7(void) } while (strcmp(lineptr, "\r\n") != 0 && strcmp(lineptr, "\n") != 0); + /* skip newlines */ do { len = getline(&lineptr, &linesize, infile); if (len == -1) { @@ -3789,7 +3790,7 @@ void smime_to_pkcs7(void) app_exit(1); } } - while (strcmp(lineptr, "\r\n") == 0 && strcmp(lineptr, "\n") == 0); + while (strcmp(lineptr, "\r\n") == 0 || strcmp(lineptr, "\n") == 0); fprintf(outfile, "%s", "-----BEGIN PKCS7-----\n"); |