diff options
author | Simon Josefsson <simon@josefsson.org> | 2004-08-22 13:15:06 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2004-08-22 13:15:06 +0000 |
commit | fb6452d91a2cd6bf99ae61ae981142bdf9762391 (patch) | |
tree | 6929a3c8b4e92250b0af8fbc041f878471985702 /src | |
parent | c6ea1c3cd8399ff15a862627ad5b8762a0224d4c (diff) | |
download | gnutls-fb6452d91a2cd6bf99ae61ae981142bdf9762391.tar.gz |
(smime_to_pkcs7): Make sure PKCS#7 output use LF EOL.
Diffstat (limited to 'src')
-rw-r--r-- | src/certtool.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/certtool.c b/src/certtool.c index b6166cc5ce..8d312af799 100644 --- a/src/certtool.c +++ b/src/certtool.c @@ -2703,8 +2703,10 @@ void smime_to_pkcs7(void) do { - if (strcmp (lineptr, "\r\n") != 0 && strcmp (lineptr, "\n") != 0) - printf("%s", lineptr); + while (len > 0 && (lineptr[len-1] == '\r' || lineptr[len-1] == '\n')) + lineptr[--len] = '\0'; + if (strcmp (lineptr, "") != 0) + printf("%s\n", lineptr); len = getline (&lineptr, &linesize, infile); } while (len != -1); |