From: Nikos Mavrogiannopoulos Date: Fri, 14 Apr 2000 17:31:28 +0000 (+0000) Subject: Added copyright notices. X-Git-Tag: gnutls0-0-4~69 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ebac8f862575e4899e4f75b04e56465a283bde1c;p=thirdparty%2Fgnutls.git Added copyright notices. --- diff --git a/lib/debug.c b/lib/debug.c index 6eeffabb8f..55801f9cb8 100644 --- a/lib/debug.c +++ b/lib/debug.c @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include #include #include diff --git a/lib/gnutls.c b/lib/gnutls.c index 5495fa0268..6aec640994 100644 --- a/lib/gnutls.c +++ b/lib/gnutls.c @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include #include "gnutls_int.h" #include "gnutls_errors.h" diff --git a/lib/gnutls.h b/lib/gnutls.h index 5efdc12456..9c189a823b 100644 --- a/lib/gnutls.h +++ b/lib/gnutls.h @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + enum ContentType { GNUTLS_APPLICATION_DATA=23 }; typedef enum ContentType ContentType; enum BulkCipherAlgorithm { CIPHER_NULL, CIPHER_3DES = 4 }; diff --git a/lib/gnutls_algorithms.c b/lib/gnutls_algorithms.c index c0811be18b..8fbdbb3125 100644 --- a/lib/gnutls_algorithms.c +++ b/lib/gnutls_algorithms.c @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include #include "gnutls_int.h" #include "gnutls_algorithms.h" diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c index c75ecc1801..08f5f92c98 100644 --- a/lib/gnutls_buffers.c +++ b/lib/gnutls_buffers.c @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include #include "gnutls_int.h" #include "gnutls_errors.h" diff --git a/lib/gnutls_cipher.c b/lib/gnutls_cipher.c index 8c84442652..c824148d1a 100644 --- a/lib/gnutls_cipher.c +++ b/lib/gnutls_cipher.c @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include #include "gnutls_int.h" #include "gnutls_errors.h" diff --git a/lib/gnutls_compress.c b/lib/gnutls_compress.c index 9938da3b5e..971dcfc329 100644 --- a/lib/gnutls_compress.c +++ b/lib/gnutls_compress.c @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include #include "gnutls_int.h" #include "gnutls_compress.h" diff --git a/lib/gnutls_dh.c b/lib/gnutls_dh.c index ebde6f33fb..9b4384ad5e 100644 --- a/lib/gnutls_dh.c +++ b/lib/gnutls_dh.c @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include #include diff --git a/lib/gnutls_errors.c b/lib/gnutls_errors.c index 79e262513d..9f154d2f8a 100644 --- a/lib/gnutls_errors.c +++ b/lib/gnutls_errors.c @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include "defines.h" #include "gnutls_errors.h" diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c index c2e159591f..967be1722b 100644 --- a/lib/gnutls_handshake.c +++ b/lib/gnutls_handshake.c @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include #include "gnutls_int.h" #include "gnutls_errors.h" diff --git a/lib/gnutls_kx.c b/lib/gnutls_kx.c index e87af93ede..a8802bbbc6 100644 --- a/lib/gnutls_kx.c +++ b/lib/gnutls_kx.c @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include "defines.h" #include "gnutls_int.h" #include "gnutls_handshake.h" diff --git a/lib/gnutls_num.c b/lib/gnutls_num.c index 141d43c266..2b78986965 100644 --- a/lib/gnutls_num.c +++ b/lib/gnutls_num.c @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include #include diff --git a/lib/gnutls_plaintext.c b/lib/gnutls_plaintext.c index a5fa4357e8..2f0b4ce4ea 100644 --- a/lib/gnutls_plaintext.c +++ b/lib/gnutls_plaintext.c @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include #include "gnutls_int.h" #include "gnutls_errors.h" diff --git a/src/cli.c b/src/cli.c index 7ce0ba735b..2d093fc23a 100644 --- a/src/cli.c +++ b/src/cli.c @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include #include #include @@ -19,8 +39,8 @@ int main() GNUTLS_STATE state; char buffer[100]; -// signal(SIGPIPE, SIG_IGN); - +// signal(SIGPIPE, SIG_IGN); + sd = socket(AF_INET, SOCK_STREAM, 0); ERR(sd, "socket"); @@ -34,8 +54,8 @@ int main() gnutls_init(&state, GNUTLS_CLIENT); ret = gnutls_handshake(sd, state); - - if (ret<0) { + + if (ret < 0) { fprintf(stderr, "Handshake has failed\n"); gnutls_perror(ret); return 1; @@ -45,25 +65,29 @@ int main() bzero(buffer, sizeof(buffer)); ret = gnutls_recv(sd, state, buffer, 5); - if (gnutls_is_fatal_error(ret)==1) { + if (gnutls_is_fatal_error(ret) == 1) { if (ret == GNUTLS_E_CLOSURE_ALERT_RECEIVED) { - fprintf(stderr, "Peer has closed the GNUTLS connection\n"); + fprintf(stderr, + "Peer has closed the GNUTLS connection\n"); return 0; } else { - fprintf(stderr, "Received corrupted data(%d)\n", ret); + fprintf(stderr, "Received corrupted data(%d)\n", + ret); return 1; } } else { fprintf(stdout, "Received: %s\n", buffer); } - + ret = gnutls_recv(sd, state, buffer, 10); - if (gnutls_is_fatal_error(ret)==1) { + if (gnutls_is_fatal_error(ret) == 1) { if (ret == GNUTLS_E_CLOSURE_ALERT_RECEIVED) { - fprintf(stderr, "Peer has closed the GNUTLS connection\n"); + fprintf(stderr, + "Peer has closed the GNUTLS connection\n"); return 0; } else { - fprintf(stderr, "Received corrupted data(%d)\n", ret); + fprintf(stderr, "Received corrupted data(%d)\n", + ret); return 1; } } else { diff --git a/src/serv.c b/src/serv.c index 3630b55d41..e48b6f8233 100644 --- a/src/serv.c +++ b/src/serv.c @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2000 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + #include #include #include @@ -49,7 +69,7 @@ int main() ret = gnutls_handshake(sd, state); - if (ret<0) { + if (ret < 0) { close(sd); gnutls_deinit(&state); fprintf(stderr, "Handshake has failed\n", ret); @@ -58,8 +78,10 @@ int main() } fprintf(stderr, "Handshake was completed\n"); - ret = gnutls_send(sd, state, "hello world\n", sizeof("hello world\n")); - if (ret<0) { + ret = + gnutls_send(sd, state, "hello world\n", + sizeof("hello world\n")); + if (ret < 0) { close(sd); gnutls_deinit(&state); gnutls_perror(ret);