summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2023-03-06 13:05:32 +0000
committertb <>2023-03-06 13:05:32 +0000
commit60f3b019f88a06afce268ea0da7cc9f543fbc898 (patch)
treed0342d61f950263bb9a15191b84e1074168a5d0d /src
parentde31bc5ff1a6f2187a998c7febfb7a19e7950c31 (diff)
downloadopenbsd-60f3b019f88a06afce268ea0da7cc9f543fbc898.tar.gz
openbsd-60f3b019f88a06afce268ea0da7cc9f543fbc898.tar.bz2
openbsd-60f3b019f88a06afce268ea0da7cc9f543fbc898.zip
Document RSA_get0_* for individual RSA members.
Loosely based on OpenSSL commit 6692ff77. Prodded by job
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/RSA_get0_key.3109
1 files changed, 106 insertions, 3 deletions
diff --git a/src/lib/libcrypto/man/RSA_get0_key.3 b/src/lib/libcrypto/man/RSA_get0_key.3
index 9b58fad899..3fb74b19bc 100644
--- a/src/lib/libcrypto/man/RSA_get0_key.3
+++ b/src/lib/libcrypto/man/RSA_get0_key.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: RSA_get0_key.3,v 1.6 2019/07/13 17:26:38 schwarze Exp $ 1.\" $OpenBSD: RSA_get0_key.3,v 1.7 2023/03/06 13:05:32 tb Exp $
2.\" selective merge up to: OpenSSL 665d899f Aug 2 02:19:43 2017 +0800 2.\" selective merge up to: OpenSSL 665d899f Aug 2 02:19:43 2017 +0800
3.\" 3.\"
4.\" This file is a derived work. 4.\" This file is a derived work.
@@ -65,15 +65,23 @@
65.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 65.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
66.\" OF THE POSSIBILITY OF SUCH DAMAGE. 66.\" OF THE POSSIBILITY OF SUCH DAMAGE.
67.\" 67.\"
68.Dd $Mdocdate: July 13 2019 $ 68.Dd $Mdocdate: March 6 2023 $
69.Dt RSA_GET0_KEY 3 69.Dt RSA_GET0_KEY 3
70.Os 70.Os
71.Sh NAME 71.Sh NAME
72.Nm RSA_get0_key , 72.Nm RSA_get0_key ,
73.Nm RSA_get0_n ,
74.Nm RSA_get0_e ,
75.Nm RSA_get0_d ,
73.Nm RSA_set0_key , 76.Nm RSA_set0_key ,
74.Nm RSA_get0_factors , 77.Nm RSA_get0_factors ,
78.Nm RSA_get0_p ,
79.Nm RSA_get0_q ,
75.Nm RSA_set0_factors , 80.Nm RSA_set0_factors ,
76.Nm RSA_get0_crt_params , 81.Nm RSA_get0_crt_params ,
82.Nm RSA_get0_dmp1 ,
83.Nm RSA_get0_dmq1 ,
84.Nm RSA_get0_iqmp ,
77.Nm RSA_set0_crt_params , 85.Nm RSA_set0_crt_params ,
78.Nm RSA_clear_flags , 86.Nm RSA_clear_flags ,
79.Nm RSA_test_flags , 87.Nm RSA_test_flags ,
@@ -88,6 +96,18 @@
88.Fa "const BIGNUM **e" 96.Fa "const BIGNUM **e"
89.Fa "const BIGNUM **d" 97.Fa "const BIGNUM **d"
90.Fc 98.Fc
99.Ft "const BIGNUM *"
100.Fo RSA_get0_n
101.Fa "const RSA *r"
102.Fc
103.Ft "const BIGNUM *"
104.Fo RSA_get0_e
105.Fa "const RSA *r"
106.Fc
107.Ft "const BIGNUM *"
108.Fo RSA_get0_d
109.Fa "const RSA *r"
110.Fc
91.Ft int 111.Ft int
92.Fo RSA_set0_key 112.Fo RSA_set0_key
93.Fa "RSA *r" 113.Fa "RSA *r"
@@ -101,6 +121,14 @@
101.Fa "const BIGNUM **p" 121.Fa "const BIGNUM **p"
102.Fa "const BIGNUM **q" 122.Fa "const BIGNUM **q"
103.Fc 123.Fc
124.Ft "const BIGNUM *"
125.Fo RSA_get0_p
126.Fa "const RSA *r"
127.Fc
128.Ft "const BIGNUM *"
129.Fo RSA_get0_q
130.Fa "const RSA *r"
131.Fc
104.Ft int 132.Ft int
105.Fo RSA_set0_factors 133.Fo RSA_set0_factors
106.Fa "RSA *r" 134.Fa "RSA *r"
@@ -114,6 +142,18 @@
114.Fa "const BIGNUM **dmq1" 142.Fa "const BIGNUM **dmq1"
115.Fa "const BIGNUM **iqmp" 143.Fa "const BIGNUM **iqmp"
116.Fc 144.Fc
145.Ft "const BIGNUM *"
146.Fo RSA_get0_dmp1
147.Fa "const RSA *r"
148.Fc
149.Ft "const BIGNUM *"
150.Fo RSA_get0_dmq1
151.Fa "const RSA *r"
152.Fc
153.Ft "const BIGNUM *"
154.Fo RSA_get0_iqmp
155.Fa "const RSA *r"
156.Fc
117.Ft int 157.Ft int
118.Fo RSA_set0_crt_params 158.Fo RSA_set0_crt_params
119.Fa "RSA *r" 159.Fa "RSA *r"
@@ -263,6 +303,31 @@ If needed, duplicate the received value using
263.Xr BN_dup 3 303.Xr BN_dup 3
264and pass the duplicate. 304and pass the duplicate.
265.Pp 305.Pp
306Any of the values
307.Fa n ,
308.Fa e ,
309.Fa d ,
310.Fa p ,
311.Fa q ,
312.Fa dmp1 ,
313.Fa dmq1 ,
314and
315.Fa iqmp
316can also be retrieved separately by the corresponding functions
317.Fn RSA_get0_n ,
318.Fn RSA_get0_e ,
319.Fn RSA_get0_d ,
320.Fn RSA_get0_p ,
321.Fn RSA_get0_q ,
322.Fn RSA_get0_dmp1 ,
323.Fn RSA_get0_dmq1 ,
324and
325.Fn RSA_get0_iqmp ,
326respectively.
327The pointers are owned by the
328.Vt RSA
329object.
330.Pp
266.Fn RSA_clear_flags 331.Fn RSA_clear_flags
267clears the specified 332clears the specified
268.Fa flags 333.Fa flags
@@ -338,6 +403,21 @@ and
338.Dv RSA_FLAG_THREAD_SAFE 403.Dv RSA_FLAG_THREAD_SAFE
339are defined for compatibility with existing code but have no effect. 404are defined for compatibility with existing code but have no effect.
340.Sh RETURN VALUES 405.Sh RETURN VALUES
406.Fn RSA_get0_n ,
407.Fn RSA_get0_e ,
408.Fn RSA_get0_d ,
409.Fn RSA_get0_p ,
410.Fn RSA_get0_q ,
411.Fn RSA_get0_dmp1 ,
412.Fn RSA_get0_dmq1 ,
413and
414.Fn RSA_get0_iqmp
415return a pointer owned by the
416.Vt RSA
417object if the corresponding value has been set,
418otherwise they return
419.Dv NULL .
420.Pp
341.Fn RSA_set0_key , 421.Fn RSA_set0_key ,
342.Fn RSA_set0_factors , 422.Fn RSA_set0_factors ,
343and 423and
@@ -359,6 +439,29 @@ are set.
359.Xr RSA_print 3 , 439.Xr RSA_print 3 ,
360.Xr RSA_size 3 440.Xr RSA_size 3
361.Sh HISTORY 441.Sh HISTORY
362These functions first appeared in OpenSSL 1.1.0 442.Fn RSA_get0_key ,
443.Fn RSA_set0_key ,
444.Fn RSA_get0_factors ,
445.Fn RSA_set0_factors ,
446.Fn RSA_get0_crt_params ,
447.Fn RSA_set0_crt_params ,
448.Fn RSA_clear_flags ,
449.Fn RSA_test_flags ,
450and
451.Fn RSA_set_flags
452first appeared in OpenSSL 1.1.0
363and have been available since 453and have been available since
364.Ox 6.3 . 454.Ox 6.3 .
455.Pp
456.Fn RSA_get0_n ,
457.Fn RSA_get0_e ,
458.Fn RSA_get0_d ,
459.Fn RSA_get0_p ,
460.Fn RSA_get0_q ,
461.Fn RSA_get0_dmp1 ,
462.Fn RSA_get0_dmq1 ,
463and
464.Fn RSA_get0_iqmp
465first appeared in OpenSSL 1.1.1
466and have been available since
467.Ox 7.1 .