]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Generate guarded bn_prime.h
authorBob Beck <beck@openssl.org>
Tue, 28 Apr 2026 01:23:48 +0000 (19:23 -0600)
committerNorbert Pocs <norbertp@openssl.org>
Wed, 6 May 2026 11:35:41 +0000 (13:35 +0200)
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Wed May  6 11:36:00 2026
(Merged from https://github.com/openssl/openssl/pull/31001)

crypto/bn/bn_prime.h
crypto/bn/bn_prime.pl

index 8a859ac02e266b03de98a24695fd762c332d4bcc..4038d99b6abe5b43bd02bf6bbd7a0501e54d90fd 100644 (file)
@@ -2,7 +2,7 @@
  * WARNING: do not edit!
  * Generated by crypto/bn/bn_prime.pl
  *
- * Copyright 1998-2021 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1998-2026 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the Apache License 2.0 (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_BN_BN_PRIME_H)
+#define OSSL_LIBCRYPTO_BN_BN_PRIME_H
+
+/* clang-format off */
 typedef unsigned short prime_t;
 # define NUMPRIMES 2048
 
@@ -271,3 +275,6 @@ static const prime_t primes[2048] = {
     17707, 17713, 17729, 17737, 17747, 17749, 17761, 17783,
     17789, 17791, 17807, 17827, 17837, 17839, 17851, 17863,
 };
+/* clang-format on */
+
+#endif /* !defined(OSSL_LIBCRYPTO_BN_BN_PRIME_H) */
index a7a764627b94f69f3d3578657628a25579334873..3d9722d0088a68a0f27e8ef4c92da84a4ef641a1 100644 (file)
@@ -25,6 +25,10 @@ print <<"EOF";
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_BN_BN_PRIME_H)
+#define OSSL_LIBCRYPTO_BN_BN_PRIME_H
+
+/* clang-format off */
 EOF
 
 
@@ -50,3 +54,5 @@ for (my $i = 0; $i <= $#primes; $i++) {
     printf " %5d,", $primes[$i];
 }
 print "\n};\n";
+print "/* clang-format on */\n";
+print "\n#endif /* !defined(OSSL_LIBCRYPTO_BN_BN_PRIME_H) */\n"