summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/rsa')
-rw-r--r--src/lib/libcrypto/rsa/rsa_ameth.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_blinding.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_chk.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_eay.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_gen.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_lib.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_meth.c3
-rw-r--r--src/lib/libcrypto/rsa/rsa_none.c5
-rw-r--r--src/lib/libcrypto/rsa/rsa_oaep.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_pk1.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_pmeth.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_prn.c5
-rw-r--r--src/lib/libcrypto/rsa/rsa_pss.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_saos.c5
-rw-r--r--src/lib/libcrypto/rsa/rsa_sign.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_x931.c5
16 files changed, 35 insertions, 32 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
58int 58int
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
124static int 124static int
diff --git a/src/lib/libcrypto/rsa/rsa_gen.c b/src/lib/libcrypto/rsa/rsa_gen.c
index ff64eb2f0e..ebd0aeffd5 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.31 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,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
69static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb); 69static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb);
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_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
66int 67int
67RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *from, 68RSA_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..9a175f8c55 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.40 2025/05/10 05:54:38 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 *
@@ -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
69int 69int
70RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen, 70RSA_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
65int 66int
66RSA_print_fp(FILE *fp, const RSA *x, int off) 67RSA_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
68int 69int
69RSA_sign_ASN1_OCTET_STRING(int type, const unsigned char *m, unsigned int m_len, 70RSA_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
67int 68int
68RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *from, 69RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *from,
69 int flen) 70 int flen)