From 3f07cbd1943c604984fc0d0bd3a528862ef4f1be Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 1 Mar 2016 14:02:47 -0800 Subject: [PATCH] io.sockets.secure.openssl: Nuke RSA. --- .../io/sockets/secure/openssl/openssl.factor | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/basis/io/sockets/secure/openssl/openssl.factor b/basis/io/sockets/secure/openssl/openssl.factor index c8e3570b27..fc64c02448 100644 --- a/basis/io/sockets/secure/openssl/openssl.factor +++ b/basis/io/sockets/secure/openssl/openssl.factor @@ -117,28 +117,6 @@ M: bio dispose* handle>> BIO_free ssl-error ; SSL_CTX_set_tmp_dh ssl-error ] [ drop ] if ; -TUPLE: rsa < disposable handle ; - -: ( handle -- rsa ) rsa new-disposable swap >>handle ; - -M: rsa dispose* handle>> RSA_free ; - -: needs-rsa-key ( ctx -- ? ) - handle>> SSL_CTX_need_tmp_rsa 0 = not ; inline - -: generate-eph-rsa-key ( ctx -- ) - dup needs-rsa-key [ - [ handle>> ] - [| ctx | - RSA_new :> rsa-struct - rsa-struct - ctx config>> ephemeral-key-bits>> - RSA_F4 number>bn &BN_clear_free - f RSA_generate_key_ex - ssl-error rsa-struct &dispose handle>> - ] bi - SSL_CTX_set_tmp_rsa ssl-error ] [ drop ] if ; - : ( config ctx -- context ) openssl-context new-disposable swap >>handle @@ -159,7 +137,6 @@ M: openssl ( config -- context ) [ load-verify-locations ] [ set-verify-depth ] [ load-dh-params ] - [ generate-eph-rsa-key ] [ ] } cleave ] with-destructors ;