summaryrefslogtreecommitdiff
path: root/src/cli.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-03-29 11:38:10 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-03-29 11:38:10 +0000
commit2b822e570ee46e93f43467e262418e3dc6cdc4b4 (patch)
tree4256ac36a7d51aebabab3422a95a27670843400f /src/cli.c
parent7a4b822da5cfa5326199b862793d45a2f6141000 (diff)
downloadgnutls-2b822e570ee46e93f43467e262418e3dc6cdc4b4.tar.gz
added crlf option
Diffstat (limited to 'src/cli.c')
-rw-r--r--src/cli.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cli.c b/src/cli.c
index 268bb5e17e..097fa5afe4 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -53,6 +53,7 @@ char *hostname = NULL;
int port;
int record_max_size;
int fingerprint;
+int crlf;
char *srp_passwd;
char *srp_username;
@@ -439,6 +440,11 @@ int main(int argc, char **argv)
continue;
}
do {
+ if ( crlf != 0) {
+ char* b=strchr( buffer, '\n');
+ strcpy( b, "\r\n");
+ }
+
ret = gnutls_record_send(state, buffer, strlen(buffer));
} while (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED);
if (ret > 0)
@@ -539,6 +545,8 @@ void gaa_parser(int argc, char **argv)
pgp_keyring = info.pgp_keyring;
pgp_trustdb = info.pgp_trustdb;
+
+ crlf = info.crlf;
if (info.nrest_args == 0)
hostname = "localhost";