diff options
Diffstat (limited to 'src/lib/libcrypto/rsa')
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_ameth.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_blinding.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_chk.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_eay.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_gen.c | 24 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_lib.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_local.h | 7 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_meth.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_none.c | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_oaep.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_pk1.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_pmeth.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_prn.c | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_pss.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_saos.c | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_sign.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_x931.c | 5 |
17 files changed, 60 insertions, 36 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_ameth.c b/src/lib/libcrypto/rsa/rsa_ameth.c index 5a87522289..00fa6afb3d 100644 --- a/src/lib/libcrypto/rsa/rsa_ameth.c +++ b/src/lib/libcrypto/rsa/rsa_ameth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_ameth.c,v 1.62 2024/11/02 07:11:14 tb Exp $ */ | 1 | /* $OpenBSD: rsa_ameth.c,v 1.63 2025/05/10 05:54:38 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -66,7 +66,6 @@ | |||
| 66 | #include <openssl/bio.h> | 66 | #include <openssl/bio.h> |
| 67 | #include <openssl/bn.h> | 67 | #include <openssl/bn.h> |
| 68 | #include <openssl/cms.h> | 68 | #include <openssl/cms.h> |
| 69 | #include <openssl/err.h> | ||
| 70 | #include <openssl/evp.h> | 69 | #include <openssl/evp.h> |
| 71 | #include <openssl/objects.h> | 70 | #include <openssl/objects.h> |
| 72 | #include <openssl/pkcs7.h> | 71 | #include <openssl/pkcs7.h> |
| @@ -76,6 +75,7 @@ | |||
| 76 | 75 | ||
| 77 | #include "asn1_local.h" | 76 | #include "asn1_local.h" |
| 78 | #include "bn_local.h" | 77 | #include "bn_local.h" |
| 78 | #include "err_local.h" | ||
| 79 | #include "evp_local.h" | 79 | #include "evp_local.h" |
| 80 | #include "rsa_local.h" | 80 | #include "rsa_local.h" |
| 81 | #include "x509_local.h" | 81 | #include "x509_local.h" |
diff --git a/src/lib/libcrypto/rsa/rsa_blinding.c b/src/lib/libcrypto/rsa/rsa_blinding.c index cac5bd91d2..590b45f5a1 100644 --- a/src/lib/libcrypto/rsa/rsa_blinding.c +++ b/src/lib/libcrypto/rsa/rsa_blinding.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_blinding.c,v 1.3 2023/08/09 12:09:06 tb Exp $ */ | 1 | /* $OpenBSD: rsa_blinding.c,v 1.4 2025/05/10 05:54:38 tb Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -114,10 +114,10 @@ | |||
| 114 | 114 | ||
| 115 | #include <openssl/opensslconf.h> | 115 | #include <openssl/opensslconf.h> |
| 116 | 116 | ||
| 117 | #include <openssl/err.h> | ||
| 118 | #include <openssl/rsa.h> | 117 | #include <openssl/rsa.h> |
| 119 | 118 | ||
| 120 | #include "bn_local.h" | 119 | #include "bn_local.h" |
| 120 | #include "err_local.h" | ||
| 121 | #include "rsa_local.h" | 121 | #include "rsa_local.h" |
| 122 | 122 | ||
| 123 | #define BN_BLINDING_COUNTER 32 | 123 | #define BN_BLINDING_COUNTER 32 |
diff --git a/src/lib/libcrypto/rsa/rsa_chk.c b/src/lib/libcrypto/rsa/rsa_chk.c index b7666e0fed..87d261f88e 100644 --- a/src/lib/libcrypto/rsa/rsa_chk.c +++ b/src/lib/libcrypto/rsa/rsa_chk.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_chk.c,v 1.18 2023/07/08 12:26:45 beck Exp $ */ | 1 | /* $OpenBSD: rsa_chk.c,v 1.19 2025/05/10 05:54:38 tb Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -49,10 +49,10 @@ | |||
| 49 | */ | 49 | */ |
| 50 | 50 | ||
| 51 | #include <openssl/bn.h> | 51 | #include <openssl/bn.h> |
| 52 | #include <openssl/err.h> | ||
| 53 | #include <openssl/rsa.h> | 52 | #include <openssl/rsa.h> |
| 54 | 53 | ||
| 55 | #include "bn_local.h" | 54 | #include "bn_local.h" |
| 55 | #include "err_local.h" | ||
| 56 | #include "rsa_local.h" | 56 | #include "rsa_local.h" |
| 57 | 57 | ||
| 58 | int | 58 | int |
diff --git a/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c index c2e1e22f9a..65ccfc35e1 100644 --- a/src/lib/libcrypto/rsa/rsa_eay.c +++ b/src/lib/libcrypto/rsa/rsa_eay.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_eay.c,v 1.65 2023/08/09 12:09:06 tb Exp $ */ | 1 | /* $OpenBSD: rsa_eay.c,v 1.66 2025/05/10 05:54:38 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -115,10 +115,10 @@ | |||
| 115 | #include <openssl/opensslconf.h> | 115 | #include <openssl/opensslconf.h> |
| 116 | 116 | ||
| 117 | #include <openssl/bn.h> | 117 | #include <openssl/bn.h> |
| 118 | #include <openssl/err.h> | ||
| 119 | #include <openssl/rsa.h> | 118 | #include <openssl/rsa.h> |
| 120 | 119 | ||
| 121 | #include "bn_local.h" | 120 | #include "bn_local.h" |
| 121 | #include "err_local.h" | ||
| 122 | #include "rsa_local.h" | 122 | #include "rsa_local.h" |
| 123 | 123 | ||
| 124 | static int | 124 | static int |
diff --git a/src/lib/libcrypto/rsa/rsa_gen.c b/src/lib/libcrypto/rsa/rsa_gen.c index ff64eb2f0e..6a8bd08160 100644 --- a/src/lib/libcrypto/rsa/rsa_gen.c +++ b/src/lib/libcrypto/rsa/rsa_gen.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_gen.c,v 1.30 2023/07/08 12:26:45 beck Exp $ */ | 1 | /* $OpenBSD: rsa_gen.c,v 1.32 2025/09/29 08:46:15 jan Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -60,10 +60,10 @@ | |||
| 60 | #include <time.h> | 60 | #include <time.h> |
| 61 | 61 | ||
| 62 | #include <openssl/bn.h> | 62 | #include <openssl/bn.h> |
| 63 | #include <openssl/err.h> | ||
| 64 | #include <openssl/rsa.h> | 63 | #include <openssl/rsa.h> |
| 65 | 64 | ||
| 66 | #include "bn_local.h" | 65 | #include "bn_local.h" |
| 66 | #include "err_local.h" | ||
| 67 | #include "rsa_local.h" | 67 | #include "rsa_local.h" |
| 68 | 68 | ||
| 69 | static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb); | 69 | static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb); |
| @@ -84,6 +84,7 @@ rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) | |||
| 84 | BIGNUM pr0, d, p; | 84 | BIGNUM pr0, d, p; |
| 85 | int bitsp, bitsq, ok = -1, n = 0; | 85 | int bitsp, bitsq, ok = -1, n = 0; |
| 86 | BN_CTX *ctx = NULL; | 86 | BN_CTX *ctx = NULL; |
| 87 | BIGNUM *diff, *mindiff; | ||
| 87 | 88 | ||
| 88 | ctx = BN_CTX_new(); | 89 | ctx = BN_CTX_new(); |
| 89 | if (ctx == NULL) | 90 | if (ctx == NULL) |
| @@ -97,10 +98,24 @@ rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) | |||
| 97 | goto err; | 98 | goto err; |
| 98 | if ((r3 = BN_CTX_get(ctx)) == NULL) | 99 | if ((r3 = BN_CTX_get(ctx)) == NULL) |
| 99 | goto err; | 100 | goto err; |
| 101 | if ((diff = BN_CTX_get(ctx)) == NULL) | ||
| 102 | goto err; | ||
| 103 | if ((mindiff = BN_CTX_get(ctx)) == NULL) | ||
| 104 | goto err; | ||
| 100 | 105 | ||
| 101 | bitsp = (bits + 1) / 2; | 106 | bitsp = (bits + 1) / 2; |
| 102 | bitsq = bits - bitsp; | 107 | bitsq = bits - bitsp; |
| 103 | 108 | ||
| 109 | /* | ||
| 110 | * To guarantee a minimum distance of 2^(bits/2 - 100) between p and q. | ||
| 111 | * | ||
| 112 | * NIST SP 800-56B, section 6.2.1, 3.c | ||
| 113 | */ | ||
| 114 | if (bits < 200) | ||
| 115 | goto err; | ||
| 116 | if (!BN_set_bit(mindiff, bits/2 - 100)) | ||
| 117 | goto err; | ||
| 118 | |||
| 104 | /* We need the RSA components non-NULL */ | 119 | /* We need the RSA components non-NULL */ |
| 105 | if (!rsa->n && ((rsa->n = BN_new()) == NULL)) | 120 | if (!rsa->n && ((rsa->n = BN_new()) == NULL)) |
| 106 | goto err; | 121 | goto err; |
| @@ -148,8 +163,9 @@ rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) | |||
| 148 | if (!BN_generate_prime_ex(rsa->q, bitsq, 0, NULL, NULL, | 163 | if (!BN_generate_prime_ex(rsa->q, bitsq, 0, NULL, NULL, |
| 149 | cb)) | 164 | cb)) |
| 150 | goto err; | 165 | goto err; |
| 151 | } while (BN_cmp(rsa->p, rsa->q) == 0 && | 166 | if (!BN_sub(diff, rsa->p, rsa->q)) |
| 152 | ++degenerate < 3); | 167 | goto err; |
| 168 | } while (BN_ucmp(diff, mindiff) <= 0 && ++degenerate < 3); | ||
| 153 | if (degenerate == 3) { | 169 | if (degenerate == 3) { |
| 154 | ok = 0; /* we set our own err */ | 170 | ok = 0; /* we set our own err */ |
| 155 | RSAerror(RSA_R_KEY_SIZE_TOO_SMALL); | 171 | RSAerror(RSA_R_KEY_SIZE_TOO_SMALL); |
diff --git a/src/lib/libcrypto/rsa/rsa_lib.c b/src/lib/libcrypto/rsa/rsa_lib.c index 91f4938ec9..7b8babdf52 100644 --- a/src/lib/libcrypto/rsa/rsa_lib.c +++ b/src/lib/libcrypto/rsa/rsa_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_lib.c,v 1.50 2024/03/27 01:22:30 tb Exp $ */ | 1 | /* $OpenBSD: rsa_lib.c,v 1.51 2025/05/10 05:54:38 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -62,12 +62,12 @@ | |||
| 62 | 62 | ||
| 63 | #include <openssl/bn.h> | 63 | #include <openssl/bn.h> |
| 64 | #include <openssl/crypto.h> | 64 | #include <openssl/crypto.h> |
| 65 | #include <openssl/err.h> | ||
| 66 | #include <openssl/evp.h> | 65 | #include <openssl/evp.h> |
| 67 | #include <openssl/lhash.h> | 66 | #include <openssl/lhash.h> |
| 68 | #include <openssl/rsa.h> | 67 | #include <openssl/rsa.h> |
| 69 | 68 | ||
| 70 | #include "bn_local.h" | 69 | #include "bn_local.h" |
| 70 | #include "err_local.h" | ||
| 71 | #include "evp_local.h" | 71 | #include "evp_local.h" |
| 72 | #include "rsa_local.h" | 72 | #include "rsa_local.h" |
| 73 | 73 | ||
diff --git a/src/lib/libcrypto/rsa/rsa_local.h b/src/lib/libcrypto/rsa/rsa_local.h index 3f88b952a2..a026a488b6 100644 --- a/src/lib/libcrypto/rsa/rsa_local.h +++ b/src/lib/libcrypto/rsa/rsa_local.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_local.h,v 1.10 2025/01/05 15:39:12 tb Exp $ */ | 1 | /* $OpenBSD: rsa_local.h,v 1.11 2025/11/26 10:19:57 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -56,6 +56,9 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #ifndef HEADER_RSA_LOCAL_H | ||
| 60 | #define HEADER_RSA_LOCAL_H | ||
| 61 | |||
| 59 | __BEGIN_HIDDEN_DECLS | 62 | __BEGIN_HIDDEN_DECLS |
| 60 | 63 | ||
| 61 | #define RSA_MIN_MODULUS_BITS 512 | 64 | #define RSA_MIN_MODULUS_BITS 512 |
| @@ -152,3 +155,5 @@ int BN_BLINDING_is_local(BN_BLINDING *b); | |||
| 152 | BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx); | 155 | BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx); |
| 153 | 156 | ||
| 154 | __END_HIDDEN_DECLS | 157 | __END_HIDDEN_DECLS |
| 158 | |||
| 159 | #endif /* HEADER_RSA_LOCAL_H */ | ||
diff --git a/src/lib/libcrypto/rsa/rsa_meth.c b/src/lib/libcrypto/rsa/rsa_meth.c index 71608caa01..131c4484ab 100644 --- a/src/lib/libcrypto/rsa/rsa_meth.c +++ b/src/lib/libcrypto/rsa/rsa_meth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_meth.c,v 1.7 2023/07/08 12:26:45 beck Exp $ */ | 1 | /* $OpenBSD: rsa_meth.c,v 1.8 2025/05/10 05:54:38 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> |
| 4 | * | 4 | * |
| @@ -18,7 +18,6 @@ | |||
| 18 | #include <stdlib.h> | 18 | #include <stdlib.h> |
| 19 | #include <string.h> | 19 | #include <string.h> |
| 20 | 20 | ||
| 21 | #include <openssl/err.h> | ||
| 22 | #include <openssl/rsa.h> | 21 | #include <openssl/rsa.h> |
| 23 | 22 | ||
| 24 | #include "rsa_local.h" | 23 | #include "rsa_local.h" |
diff --git a/src/lib/libcrypto/rsa/rsa_none.c b/src/lib/libcrypto/rsa/rsa_none.c index 9c53dcf595..b8764d54ef 100644 --- a/src/lib/libcrypto/rsa/rsa_none.c +++ b/src/lib/libcrypto/rsa/rsa_none.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_none.c,v 1.12 2023/07/08 12:26:45 beck Exp $ */ | 1 | /* $OpenBSD: rsa_none.c,v 1.13 2025/05/10 05:54:38 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -60,9 +60,10 @@ | |||
| 60 | #include <string.h> | 60 | #include <string.h> |
| 61 | 61 | ||
| 62 | #include <openssl/bn.h> | 62 | #include <openssl/bn.h> |
| 63 | #include <openssl/err.h> | ||
| 64 | #include <openssl/rsa.h> | 63 | #include <openssl/rsa.h> |
| 65 | 64 | ||
| 65 | #include "err_local.h" | ||
| 66 | |||
| 66 | int | 67 | int |
| 67 | RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *from, | 68 | RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *from, |
| 68 | int flen) | 69 | int flen) |
diff --git a/src/lib/libcrypto/rsa/rsa_oaep.c b/src/lib/libcrypto/rsa/rsa_oaep.c index d1e138c299..af7131704b 100644 --- a/src/lib/libcrypto/rsa/rsa_oaep.c +++ b/src/lib/libcrypto/rsa/rsa_oaep.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_oaep.c,v 1.39 2024/03/26 05:37:28 joshua Exp $ */ | 1 | /* $OpenBSD: rsa_oaep.c,v 1.41 2025/08/25 18:47:39 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. | 3 | * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. |
| 4 | * | 4 | * |
| @@ -7,7 +7,7 @@ | |||
| 7 | * are met: | 7 | * are met: |
| 8 | * | 8 | * |
| 9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. |
| 11 | * | 11 | * |
| 12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
| 13 | * notice, this list of conditions and the following disclaimer in | 13 | * notice, this list of conditions and the following disclaimer in |
| @@ -74,12 +74,12 @@ | |||
| 74 | #include <string.h> | 74 | #include <string.h> |
| 75 | 75 | ||
| 76 | #include <openssl/bn.h> | 76 | #include <openssl/bn.h> |
| 77 | #include <openssl/err.h> | ||
| 78 | #include <openssl/evp.h> | 77 | #include <openssl/evp.h> |
| 79 | #include <openssl/rsa.h> | 78 | #include <openssl/rsa.h> |
| 80 | #include <openssl/sha.h> | 79 | #include <openssl/sha.h> |
| 81 | 80 | ||
| 82 | #include "constant_time.h" | 81 | #include "constant_time.h" |
| 82 | #include "err_local.h" | ||
| 83 | #include "evp_local.h" | 83 | #include "evp_local.h" |
| 84 | #include "rsa_local.h" | 84 | #include "rsa_local.h" |
| 85 | 85 | ||
diff --git a/src/lib/libcrypto/rsa/rsa_pk1.c b/src/lib/libcrypto/rsa/rsa_pk1.c index 8e56a8c4cd..554e00e8f8 100644 --- a/src/lib/libcrypto/rsa/rsa_pk1.c +++ b/src/lib/libcrypto/rsa/rsa_pk1.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_pk1.c,v 1.17 2024/03/30 04:34:17 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_pk1.c,v 1.18 2025/05/10 05:54:38 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -61,10 +61,10 @@ | |||
| 61 | #include <string.h> | 61 | #include <string.h> |
| 62 | 62 | ||
| 63 | #include <openssl/bn.h> | 63 | #include <openssl/bn.h> |
| 64 | #include <openssl/err.h> | ||
| 65 | #include <openssl/rsa.h> | 64 | #include <openssl/rsa.h> |
| 66 | 65 | ||
| 67 | #include "bytestring.h" | 66 | #include "bytestring.h" |
| 67 | #include "err_local.h" | ||
| 68 | 68 | ||
| 69 | int | 69 | int |
| 70 | RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen, | 70 | RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen, |
diff --git a/src/lib/libcrypto/rsa/rsa_pmeth.c b/src/lib/libcrypto/rsa/rsa_pmeth.c index 453570cf74..518b077dbc 100644 --- a/src/lib/libcrypto/rsa/rsa_pmeth.c +++ b/src/lib/libcrypto/rsa/rsa_pmeth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_pmeth.c,v 1.43 2025/01/17 15:39:19 tb Exp $ */ | 1 | /* $OpenBSD: rsa_pmeth.c,v 1.44 2025/05/10 05:54:38 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -65,13 +65,13 @@ | |||
| 65 | 65 | ||
| 66 | #include <openssl/asn1t.h> | 66 | #include <openssl/asn1t.h> |
| 67 | #include <openssl/bn.h> | 67 | #include <openssl/bn.h> |
| 68 | #include <openssl/err.h> | ||
| 69 | #include <openssl/evp.h> | 68 | #include <openssl/evp.h> |
| 70 | #include <openssl/rsa.h> | 69 | #include <openssl/rsa.h> |
| 71 | #include <openssl/x509.h> | 70 | #include <openssl/x509.h> |
| 72 | #include <openssl/x509v3.h> | 71 | #include <openssl/x509v3.h> |
| 73 | 72 | ||
| 74 | #include "bn_local.h" | 73 | #include "bn_local.h" |
| 74 | #include "err_local.h" | ||
| 75 | #include "evp_local.h" | 75 | #include "evp_local.h" |
| 76 | #include "rsa_local.h" | 76 | #include "rsa_local.h" |
| 77 | 77 | ||
diff --git a/src/lib/libcrypto/rsa/rsa_prn.c b/src/lib/libcrypto/rsa/rsa_prn.c index 1783563661..ef08f76249 100644 --- a/src/lib/libcrypto/rsa/rsa_prn.c +++ b/src/lib/libcrypto/rsa/rsa_prn.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_prn.c,v 1.10 2023/07/08 12:26:45 beck Exp $ */ | 1 | /* $OpenBSD: rsa_prn.c,v 1.11 2025/05/10 05:54:38 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -58,10 +58,11 @@ | |||
| 58 | 58 | ||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | 60 | ||
| 61 | #include <openssl/err.h> | ||
| 62 | #include <openssl/evp.h> | 61 | #include <openssl/evp.h> |
| 63 | #include <openssl/rsa.h> | 62 | #include <openssl/rsa.h> |
| 64 | 63 | ||
| 64 | #include "err_local.h" | ||
| 65 | |||
| 65 | int | 66 | int |
| 66 | RSA_print_fp(FILE *fp, const RSA *x, int off) | 67 | RSA_print_fp(FILE *fp, const RSA *x, int off) |
| 67 | { | 68 | { |
diff --git a/src/lib/libcrypto/rsa/rsa_pss.c b/src/lib/libcrypto/rsa/rsa_pss.c index 610ae7c928..72e252ef06 100644 --- a/src/lib/libcrypto/rsa/rsa_pss.c +++ b/src/lib/libcrypto/rsa/rsa_pss.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_pss.c,v 1.19 2024/03/26 05:26:27 joshua Exp $ */ | 1 | /* $OpenBSD: rsa_pss.c,v 1.20 2025/05/10 05:54:38 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2005. | 3 | * project 2005. |
| 4 | */ | 4 | */ |
| @@ -61,11 +61,11 @@ | |||
| 61 | #include <string.h> | 61 | #include <string.h> |
| 62 | 62 | ||
| 63 | #include <openssl/bn.h> | 63 | #include <openssl/bn.h> |
| 64 | #include <openssl/err.h> | ||
| 65 | #include <openssl/evp.h> | 64 | #include <openssl/evp.h> |
| 66 | #include <openssl/rsa.h> | 65 | #include <openssl/rsa.h> |
| 67 | #include <openssl/sha.h> | 66 | #include <openssl/sha.h> |
| 68 | 67 | ||
| 68 | #include "err_local.h" | ||
| 69 | #include "evp_local.h" | 69 | #include "evp_local.h" |
| 70 | #include "rsa_local.h" | 70 | #include "rsa_local.h" |
| 71 | 71 | ||
diff --git a/src/lib/libcrypto/rsa/rsa_saos.c b/src/lib/libcrypto/rsa/rsa_saos.c index 07a4f5d659..3052fa912f 100644 --- a/src/lib/libcrypto/rsa/rsa_saos.c +++ b/src/lib/libcrypto/rsa/rsa_saos.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_saos.c,v 1.25 2023/07/08 12:26:45 beck Exp $ */ | 1 | /* $OpenBSD: rsa_saos.c,v 1.26 2025/05/10 05:54:38 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -60,11 +60,12 @@ | |||
| 60 | #include <string.h> | 60 | #include <string.h> |
| 61 | 61 | ||
| 62 | #include <openssl/bn.h> | 62 | #include <openssl/bn.h> |
| 63 | #include <openssl/err.h> | ||
| 64 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
| 65 | #include <openssl/rsa.h> | 64 | #include <openssl/rsa.h> |
| 66 | #include <openssl/x509.h> | 65 | #include <openssl/x509.h> |
| 67 | 66 | ||
| 67 | #include "err_local.h" | ||
| 68 | |||
| 68 | int | 69 | int |
| 69 | RSA_sign_ASN1_OCTET_STRING(int type, const unsigned char *m, unsigned int m_len, | 70 | RSA_sign_ASN1_OCTET_STRING(int type, const unsigned char *m, unsigned int m_len, |
| 70 | unsigned char *sigret, unsigned int *siglen, RSA *rsa) | 71 | unsigned char *sigret, unsigned int *siglen, RSA *rsa) |
diff --git a/src/lib/libcrypto/rsa/rsa_sign.c b/src/lib/libcrypto/rsa/rsa_sign.c index 6edd20626d..09e6972293 100644 --- a/src/lib/libcrypto/rsa/rsa_sign.c +++ b/src/lib/libcrypto/rsa/rsa_sign.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_sign.c,v 1.37 2025/01/05 15:39:12 tb Exp $ */ | 1 | /* $OpenBSD: rsa_sign.c,v 1.38 2025/05/10 05:54:38 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -60,12 +60,12 @@ | |||
| 60 | #include <string.h> | 60 | #include <string.h> |
| 61 | 61 | ||
| 62 | #include <openssl/bn.h> | 62 | #include <openssl/bn.h> |
| 63 | #include <openssl/err.h> | ||
| 64 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
| 65 | #include <openssl/rsa.h> | 64 | #include <openssl/rsa.h> |
| 66 | #include <openssl/x509.h> | 65 | #include <openssl/x509.h> |
| 67 | 66 | ||
| 68 | #include "asn1_local.h" | 67 | #include "asn1_local.h" |
| 68 | #include "err_local.h" | ||
| 69 | #include "rsa_local.h" | 69 | #include "rsa_local.h" |
| 70 | #include "x509_local.h" | 70 | #include "x509_local.h" |
| 71 | 71 | ||
diff --git a/src/lib/libcrypto/rsa/rsa_x931.c b/src/lib/libcrypto/rsa/rsa_x931.c index 52f3f803b2..8a0190d7fe 100644 --- a/src/lib/libcrypto/rsa/rsa_x931.c +++ b/src/lib/libcrypto/rsa/rsa_x931.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_x931.c,v 1.12 2023/05/05 12:19:37 tb Exp $ */ | 1 | /* $OpenBSD: rsa_x931.c,v 1.13 2025/05/10 05:54:38 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2005. | 3 | * project 2005. |
| 4 | */ | 4 | */ |
| @@ -60,10 +60,11 @@ | |||
| 60 | #include <string.h> | 60 | #include <string.h> |
| 61 | 61 | ||
| 62 | #include <openssl/bn.h> | 62 | #include <openssl/bn.h> |
| 63 | #include <openssl/err.h> | ||
| 64 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
| 65 | #include <openssl/rsa.h> | 64 | #include <openssl/rsa.h> |
| 66 | 65 | ||
| 66 | #include "err_local.h" | ||
| 67 | |||
| 67 | int | 68 | int |
| 68 | RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *from, | 69 | RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *from, |
| 69 | int flen) | 70 | int flen) |
