[Pkg-wmaker-commits] [wmbiff] 37/84: indent run

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 20 03:01:53 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to tag wmbiff_0_4_10
in repository wmbiff.

commit 77183333e81b2c40ca9aff470ebd8e36dfab45f9
Author: bluehal <bluehal>
Date:   Mon Jun 24 07:15:59 2002 +0000

    indent run
---
 wmbiff/gnutls-common.c | 57 +++++++++++++++++++++++++++-----------------------
 wmbiff/gnutls-common.h |  2 +-
 2 files changed, 32 insertions(+), 27 deletions(-)

diff --git a/wmbiff/gnutls-common.c b/wmbiff/gnutls-common.c
index d37287c..8dcb130 100644
--- a/wmbiff/gnutls-common.c
+++ b/wmbiff/gnutls-common.c
@@ -1,6 +1,8 @@
 /* taken from gnutls 0.4.3's distribution, tiny edit 
-   for including the system gnutls. */
-#define EXTRA_BROKEN 
+   for including the system gnutls.  define EXTRA_BROKEN
+   so long as it's inconvenient to include gnutls-extra.h 
+   and link with -lgnutls-extra */
+#define EXTRA_BROKEN
 #include <stdio.h>
 #include <gnutls.h>
 #ifndef EXTRA_BROKEN
@@ -19,14 +21,15 @@
 #define PRINT_PGP_NAME(X) PRINTX( "NAME:", X.name); \
 	PRINTX( "EMAIL:", X.email)
 
-static const char* my_ctime( time_t* tv) {
-static char buf[256];
-struct tm* tp;
+static const char *my_ctime(time_t * tv)
+{
+	static char buf[256];
+	struct tm *tp;
 
-tp = localtime(tv);
-strftime(buf, sizeof buf, "%a %b %e %H:%M:%S %Z %Y\n", tp);
+	tp = localtime(tv);
+	strftime(buf, sizeof buf, "%a %b %e %H:%M:%S %Z %Y\n", tp);
 
-return buf;
+	return buf;
 
 }
 
@@ -55,13 +58,13 @@ void print_x509_info(GNUTLS_STATE state)
 
 	printf(" - Certificate info:\n");
 
-	printf(" # Certificate is valid since: %s", my_ctime( &activet));
-	printf(" # Certificate expires: %s", my_ctime( &expiret));
+	printf(" # Certificate is valid since: %s", my_ctime(&activet));
+	printf(" # Certificate expires: %s", my_ctime(&expiret));
 
 	/* Print the fingerprint of the certificate
 	 */
 	if (gnutls_x509_fingerprint
-	    (GNUTLS_DIG_MD5, &cert_list[0], digest, &digest_size) >= 0) {
+		(GNUTLS_DIG_MD5, &cert_list[0], digest, &digest_size) >= 0) {
 		print = printable;
 		for (i = 0; i < digest_size; i++) {
 			sprintf(print, "%.2x ", (unsigned char) digest[i]);
@@ -74,7 +77,7 @@ void print_x509_info(GNUTLS_STATE state)
 	 */
 
 	if (gnutls_x509_extract_certificate_serial
-	    (&cert_list[0], serial, &serial_size) >= 0) {
+		(&cert_list[0], serial, &serial_size) >= 0) {
 		print = printable;
 		for (i = 0; i < serial_size; i++) {
 			sprintf(print, "%.2x ", (unsigned char) serial[i]);
@@ -87,15 +90,16 @@ void print_x509_info(GNUTLS_STATE state)
 	 * certificate.
 	 */
 	printf(" # Certificate version: #%d\n",
-	       gnutls_x509_extract_certificate_version(&cert_list[0]));
+		   gnutls_x509_extract_certificate_version(&cert_list[0]));
 
-	algo = gnutls_x509_extract_certificate_pk_algorithm( &cert_list[0], &bits);
+	algo =
+		gnutls_x509_extract_certificate_pk_algorithm(&cert_list[0], &bits);
 	printf(" # Certificate public key algorithm: ");
 
-	if (algo==GNUTLS_PK_RSA) {
+	if (algo == GNUTLS_PK_RSA) {
 		printf("RSA\n");
 		printf(" #   Modulus: %d bits\n", bits);
-	} else if (algo==GNUTLS_PK_DSA) {
+	} else if (algo == GNUTLS_PK_DSA) {
 		printf("DSA\n");
 		printf(" #   Exponent: %d bits\n", bits);
 	} else {
@@ -154,9 +158,10 @@ int print_info(GNUTLS_STATE state)
 	switch (cred) {
 	case GNUTLS_CRD_ANON:
 		printf("- Anonymous DH using prime of %d bits, secret key "
-			"of %d bits, and peer's public key is %d bits.\n",
-		       gnutls_dh_get_prime_bits(state), gnutls_dh_get_secret_bits(state),
-		       gnutls_dh_get_peers_public_bits(state));
+			   "of %d bits, and peer's public key is %d bits.\n",
+			   gnutls_dh_get_prime_bits(state),
+			   gnutls_dh_get_secret_bits(state),
+			   gnutls_dh_get_peers_public_bits(state));
 		break;
 	case GNUTLS_CRD_SRP:
 #ifndef EXTRA_BROKEN
@@ -165,21 +170,20 @@ int print_info(GNUTLS_STATE state)
 		 */
 		if (gnutls_srp_server_get_username(state) != NULL)
 			printf("- SRP authentication. Connected as '%s'\n",
-			       gnutls_srp_server_get_username(state));
+				   gnutls_srp_server_get_username(state));
 #endif
 		break;
 	case GNUTLS_CRD_CERTIFICATE:
 		switch (gnutls_cert_type_get(state)) {
 		case GNUTLS_CRT_X509:
-			printf
-			    ("- Peer requested X.509 certificate authentication.\n");
+			printf("- Peer requested X.509 certificate authentication.\n");
 
 			print_x509_info(state);
 
 			break;
 		case GNUTLS_CRT_OPENPGP:{
 				printf
-				    ("- Peer requested OpenPGP certificate authentication.\n");
+					("- Peer requested OpenPGP certificate authentication.\n");
 
 				/* print_openpgp_info(state); */
 
@@ -193,9 +197,10 @@ int print_info(GNUTLS_STATE state)
 		 */
 		if (kx == GNUTLS_KX_DHE_RSA || kx == GNUTLS_KX_DHE_DSS) {
 			printf("- Ephemeral DH using prime of %d bits, secret key "
-				"of %d bits, and peer's public key is %d bits.\n",
-			       gnutls_dh_get_prime_bits(state), gnutls_dh_get_secret_bits(state),
-			       gnutls_dh_get_peers_public_bits(state));
+				   "of %d bits, and peer's public key is %d bits.\n",
+				   gnutls_dh_get_prime_bits(state),
+				   gnutls_dh_get_secret_bits(state),
+				   gnutls_dh_get_peers_public_bits(state));
 		}
 	}
 
diff --git a/wmbiff/gnutls-common.h b/wmbiff/gnutls-common.h
index 8541ecb..c52c304 100644
--- a/wmbiff/gnutls-common.h
+++ b/wmbiff/gnutls-common.h
@@ -2,5 +2,5 @@
    for including the system gnutls. */
 #include <gnutls.h>
 
-int print_info( GNUTLS_STATE state);
+int print_info(GNUTLS_STATE state);
 int print_list(void);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbiff.git



More information about the Pkg-wmaker-commits mailing list