commit 736df1a6f70f93d0023fb56e6099621ed3ec0e85 from: Martijn van Duren date: Thu Dec 15 11:17:03 2022 UTC Remove HAVE_ED25519 now that we have ED25519 in LibreSSL commit - 3082f0981a058b17619c641fe213801660fe5039 commit + 736df1a6f70f93d0023fb56e6099621ed3ec0e85 blob - 7bae5abbdcb0556f822c31364031109be9f2c88a blob + 5d624678a5b36aa0d0c091f0f8b0c6c361bf579d --- Makefile +++ Makefile @@ -7,21 +7,9 @@ MANDIR= ${LOCALBASE}/man/man SRCS+= main.c ltok.c unpack_dns.c -.ifdef HAVE_ED25519 -CFLAGS+= -DHAVE_ED25519 -.endif -.ifdef LIBCRYPTOPC -CRYPT_CFLAGS!= pkg-config --cflags ${LIBCRYPTOPC} -CRYPT_LDFLAGS_L!=pkg-config --libs-only-L ${LIBCRYPTOPC} -CRYPT_LDFLAGS_libdir!=pkg-config --variable libdir ${LIBCRYPTOPC} -CRYPT_LDFLAGS= ${CRYPT_LDFLAGS_L} -CRYPT_LDFLAGS+= -Wl,-rpath,${CRYPT_LDFLAGS_libdir} -CRYPT_LDADD!= pkg-config --libs-only-l ${LIBCRYPTOPC} -.else CRYPT_CFLAGS= CRYPT_LDFLAGS= CRYPT_LDADD= -lcrypto -.endif CFLAGS+= -I${LOCALBASE}/include -I${.CURDIR}/openbsd-compat CFLAGS+= -Wall -I${.CURDIR} blob - 8f324e536ea02ba338e434de491b4f778535a399 blob + 38df5f23e45bd58b4e32f21e38cf7df51bb2c2cc --- main.c +++ main.c @@ -556,12 +556,10 @@ dkim_signature_parse_a(struct signature *sig, const ch start += 4; sig->ak = EVP_PKEY_RSA; sig->sephash = 0; -#if HAVE_ED25519 } else if (strncmp(start, "ed25519-", 8) == 0) { start += 8; sig->ak = EVP_PKEY_ED25519; sig->sephash = 1; -#endif } else { dkim_signature_state(sig, DKIM_NEUTRAL, "Unsuppored a tag k"); return; @@ -1212,10 +1210,8 @@ dkim_key_text_parse(struct signature *sig, const char size_t pkrawlen = 0, pkoff, linelen; int h = 0, k = 0, n = 0, p = 0, s = 0, t = 0, first = 1; BIO *bio; -#ifdef HAVE_ED25519 size_t pklen; int tmp; -#endif key = osmtpd_ltok_skip_fws(key, 1); /* Validate syntax early */ @@ -1287,11 +1283,9 @@ dkim_key_text_parse(struct signature *sig, const char if (strncmp(key, "rsa", end - key) == 0) { if (sig->ak != EVP_PKEY_RSA) return 0; -#if HAVE_ED25519 } else if (strncmp(key, "ed25519", end - key) == 0) { if (sig->ak != EVP_PKEY_ED25519) return 0; -#endif } else return 0; key = end; @@ -1428,7 +1422,6 @@ dkim_key_text_parse(struct signature *sig, const char sig->p = PEM_read_bio_PUBKEY(bio, NULL, NULL, NULL); BIO_free(bio); break; -#if HAVE_ED25519 case EVP_PKEY_ED25519: if ((pkrawlen / 4) * 3 >= sizeof(pkimp)) return 0; @@ -1442,7 +1435,6 @@ dkim_key_text_parse(struct signature *sig, const char sig->p = EVP_PKEY_new_raw_public_key(sig->ak, NULL, pkimp, pklen); break; -#endif } if (sig->p == NULL) { /*