summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-14 13:34:29 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-14 13:34:29 +0200
commita6f36af0db13198afc6af17a27fec0561a180d91 (patch)
treeaaf20f7016cf19cf4b2a5d0e926566e6218fbe98
parent298fd6bf83b584345f0ba67f92fd3c232039b70a (diff)
clang format fixesmeson
-rw-r--r--.clang-format2
-rw-r--r--src/qmail-pw2u.c2
-rw-r--r--tests/openssl_get_subj_alt_dns.c39
3 files changed, 22 insertions, 21 deletions
diff --git a/.clang-format b/.clang-format
index fde5d8f..cae18c8 100644
--- a/.clang-format
+++ b/.clang-format
@@ -117,7 +117,7 @@ IncludeCategories:
Priority: 6
SortPriority: 0
CaseSensitive: true
- - Regex: '^<openssl/[a-z_/]+\.h>$'
+ - Regex: '^<openssl/[0-9a-z_/]+\.h>$'
Priority: 5
SortPriority: 0
CaseSensitive: true
diff --git a/src/qmail-pw2u.c b/src/qmail-pw2u.c
index 0be600a..5edb376 100644
--- a/src/qmail-pw2u.c
+++ b/src/qmail-pw2u.c
@@ -5,8 +5,8 @@
#include "buffer.h"
#include "byte.h"
#include "constmap.h"
-#include "exit.h"
#include "error.h"
+#include "exit.h"
#include "getln.h"
#include "getoptb.h"
#include "open.h"
diff --git a/tests/openssl_get_subj_alt_dns.c b/tests/openssl_get_subj_alt_dns.c
index 29cd111..00969aa 100644
--- a/tests/openssl_get_subj_alt_dns.c
+++ b/tests/openssl_get_subj_alt_dns.c
@@ -33,25 +33,26 @@ int main()
const GENERAL_NAME *current_name = sk_GENERAL_NAME_value(san, i);
switch (current_name->type) {
- case GEN_DNS:
- printf("DNS: %s\n", ASN1_STRING_get0_data(current_name->d.dNSName));
- break;
- case GEN_EMAIL:
- printf("Email: %s\n", ASN1_STRING_get0_data(current_name->d.rfc822Name));
- break;
- case GEN_URI:
- printf("URI: %s\n", ASN1_STRING_get0_data(current_name->d.uniformResourceIdentifier));
- break;
- case GEN_IPADD:
- int len = ASN1_STRING_length(current_name->d.iPAddress);
- if (len != 4) {
- fprintf(stderr, "Length mismatch in ip\n");
- return 1;
- }
- const unsigned char *data = ASN1_STRING_get0_data(current_name->d.iPAddress);
- printf("IP Address: %d.%d.%d.%d\n", data[0], data[1], data[2], data[3]);
- break;
- // Add more types if needed
+ case GEN_DNS:
+ // these are alternative host names
+ printf("DNS: %s\n", ASN1_STRING_get0_data(current_name->d.dNSName));
+ break;
+ case GEN_EMAIL:
+ printf("Email: %s\n", ASN1_STRING_get0_data(current_name->d.rfc822Name));
+ break;
+ case GEN_URI:
+ printf("URI: %s\n", ASN1_STRING_get0_data(current_name->d.uniformResourceIdentifier));
+ break;
+ case GEN_IPADD:
+ int len = ASN1_STRING_length(current_name->d.iPAddress);
+ if (len != 4) {
+ fprintf(stderr, "Length mismatch in ip\n");
+ return 1;
+ }
+ const unsigned char *data = ASN1_STRING_get0_data(current_name->d.iPAddress);
+ printf("IP Address: %d.%d.%d.%d\n", data[0], data[1], data[2], data[3]);
+ break;
+ // Add more types if needed
}
}
GENERAL_NAMES_free(san);