Bladeren bron

Split out mbedtls crypto parts.

Brucey 3 jaren geleden
bovenliggende
commit
2053729777

+ 3 - 1
libssh2.mod/include_unix/libssh2_config.h

@@ -50,7 +50,9 @@
 /* #undef HAVE_LIBGCRYPT */
 
 /* Define if you have the ssl library. */
-#define HAVE_LIBSSL 1
+/* #undef HAVE_LIBSSL */
+
+#define LIBSSH2_MBEDTLS 1
 
 //#define HAVE_BCRYPT_PBKDF 1
 

+ 3 - 1
mbedtls.mod/common.bmx

@@ -1,5 +1,5 @@
 ' 
-' Copyright 2018-2021 Bruce A Henderson
+' Copyright 2018-2022 Bruce A Henderson
 ' 
 ' Licensed under the Apache License, Version 2.0 (the "License");
 ' you may not use this file except in compliance with the License.
@@ -15,6 +15,8 @@
 ' 
 SuperStrict
 
+Import Net.mbedtlscrypto
+
 ?win32
 Import "-lws2_32"
 ?

+ 1 - 1
mbedtls.mod/glue.c

@@ -1,5 +1,5 @@
 /*
-  Copyright 2018-2021 Bruce A Henderson
+  Copyright 2018-2022 Bruce A Henderson
   
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.

+ 5 - 3
mbedtls.mod/mbedtls.bmx

@@ -1,5 +1,5 @@
 ' 
-' Copyright 2018-2021 Bruce A Henderson
+' Copyright 2018-2022 Bruce A Henderson
 ' 
 ' Licensed under the Apache License, Version 2.0 (the "License");
 ' you may not use this file except in compliance with the License.
@@ -20,10 +20,12 @@ bbdoc: mbed TLS SSL library.
 End Rem
 Module Net.mbedtls
 
-ModuleInfo "Version: 1.05"
+ModuleInfo "Version: 1.06"
 ModuleInfo "License: Apache 2.0"
-ModuleInfo "Copyright: Wrapper - 2018-2021 Bruce A Henderson"
+ModuleInfo "Copyright: Wrapper - 2018-2022 Bruce A Henderson"
 
+ModuleInfo "History: 1.06"
+ModuleInfo "History: Split crypto functions into net.mbedtlscrypto"
 ModuleInfo "History: 1.05"
 ModuleInfo "History: Update to mbedtls 3.0.0.74217ee"
 ModuleInfo "History: 1.04"

+ 1 - 25
mbedtls.mod/source.bmx

@@ -1,5 +1,5 @@
 ' 
-' Copyright 2018-2021 Bruce A Henderson
+' Copyright 2018-2022 Bruce A Henderson
 ' 
 ' Licensed under the Apache License, Version 2.0 (the "License");
 ' you may not use this file except in compliance with the License.
@@ -17,23 +17,11 @@ SuperStrict
 
 Import "mbedtls/include/*.h"
 
-Import "mbedtls/library/aes.c"
 Import "mbedtls/library/aesni.c"
-Import "mbedtls/library/aria.c"
-Import "mbedtls/library/asn1parse.c"
 Import "mbedtls/library/asn1write.c"
 Import "mbedtls/library/base64.c"
-Import "mbedtls/library/bignum.c"
-Import "mbedtls/library/camellia.c"
-Import "mbedtls/library/ccm.c"
-Import "mbedtls/library/chacha20.c"
-Import "mbedtls/library/chachapoly.c"
-Import "mbedtls/library/cipher.c"
-Import "mbedtls/library/cipher_wrap.c"
-Import "mbedtls/library/constant_time.c"
 Import "mbedtls/library/ctr_drbg.c"
 Import "mbedtls/library/debug.c"
-Import "mbedtls/library/des.c"
 Import "mbedtls/library/dhm.c"
 Import "mbedtls/library/ecdh.c"
 Import "mbedtls/library/ecdsa.c"
@@ -42,29 +30,17 @@ Import "mbedtls/library/ecp_curves.c"
 Import "mbedtls/library/entropy.c"
 Import "mbedtls/library/entropy_poll.c"
 Import "mbedtls/library/error.c"
-Import "mbedtls/library/gcm.c"
 Import "mbedtls/library/hmac_drbg.c"
-Import "mbedtls/library/md.c"
-Import "mbedtls/library/md5.c"
 Import "mbedtls/library/net_sockets.c"
-Import "mbedtls/library/nist_kw.c"
-Import "mbedtls/library/oid.c"
 Import "mbedtls/library/pem.c"
 Import "mbedtls/library/pk.c"
 Import "mbedtls/library/pk_wrap.c"
 Import "mbedtls/library/pkcs12.c"
-Import "mbedtls/library/pkcs5.c"
 Import "mbedtls/library/pkparse.c"
 Import "mbedtls/library/pkwrite.c"
 Import "mbedtls/library/platform.c"
-Import "mbedtls/library/platform_util.c"
-Import "mbedtls/library/poly1305.c"
-Import "mbedtls/library/ripemd160.c"
 Import "mbedtls/library/rsa.c"
 Import "mbedtls/library/rsa_alt_helpers.c"
-Import "mbedtls/library/sha1.c"
-Import "mbedtls/library/sha256.c"
-Import "mbedtls/library/sha512.c"
 Import "mbedtls/library/ssl_ciphersuites.c"
 Import "mbedtls/library/ssl_cli.c"
 Import "mbedtls/library/ssl_msg.c"

+ 18 - 0
mbedtlscrypto.mod/common.bmx

@@ -0,0 +1,18 @@
+' 
+' Copyright 2018-2022 Bruce A Henderson
+' 
+' Licensed under the Apache License, Version 2.0 (the "License");
+' you may not use this file except in compliance with the License.
+' You may obtain a copy of the License at
+' 
+'     http://www.apache.org/licenses/LICENSE-2.0
+' 
+' Unless required by applicable law or agreed to in writing, software
+' distributed under the License is distributed on an "AS IS" BASIS,
+' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+' See the License for the specific language governing permissions and
+' limitations under the License.
+' 
+SuperStrict
+
+Import "source.bmx"

+ 22 - 0
mbedtlscrypto.mod/mbedtlscrypto.bmx

@@ -0,0 +1,22 @@
+' 
+' Copyright 2018-2022 Bruce A Henderson
+' 
+' Licensed under the Apache License, Version 2.0 (the "License");
+' you may not use this file except in compliance with the License.
+' You may obtain a copy of the License at
+' 
+'     http://www.apache.org/licenses/LICENSE-2.0
+' 
+' Unless required by applicable law or agreed to in writing, software
+' distributed under the License is distributed on an "AS IS" BASIS,
+' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+' See the License for the specific language governing permissions and
+' limitations under the License.
+' 
+SuperStrict
+
+Module Net.mbedtlsCrypto
+
+
+Import "common.bmx"
+

+ 43 - 0
mbedtlscrypto.mod/source.bmx

@@ -0,0 +1,43 @@
+' 
+' Copyright 2018-2022 Bruce A Henderson
+' 
+' Licensed under the Apache License, Version 2.0 (the "License");
+' you may not use this file except in compliance with the License.
+' You may obtain a copy of the License at
+' 
+'     http://www.apache.org/licenses/LICENSE-2.0
+' 
+' Unless required by applicable law or agreed to in writing, software
+' distributed under the License is distributed on an "AS IS" BASIS,
+' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+' See the License for the specific language governing permissions and
+' limitations under the License.
+' 
+SuperStrict
+
+Import "../mbedtls.mod/mbedtls/include/*.h"
+
+Import "../mbedtls.mod/mbedtls/library/aes.c"
+Import "../mbedtls.mod/mbedtls/library/aria.c"
+Import "../mbedtls.mod/mbedtls/library/asn1parse.c"
+Import "../mbedtls.mod/mbedtls/library/bignum.c"
+Import "../mbedtls.mod/mbedtls/library/camellia.c"
+Import "../mbedtls.mod/mbedtls/library/ccm.c"
+Import "../mbedtls.mod/mbedtls/library/chacha20.c"
+Import "../mbedtls.mod/mbedtls/library/chachapoly.c"
+Import "../mbedtls.mod/mbedtls/library/cipher.c"
+Import "../mbedtls.mod/mbedtls/library/cipher_wrap.c"
+Import "../mbedtls.mod/mbedtls/library/constant_time.c"
+Import "../mbedtls.mod/mbedtls/library/des.c"
+Import "../mbedtls.mod/mbedtls/library/gcm.c"
+Import "../mbedtls.mod/mbedtls/library/md.c"
+Import "../mbedtls.mod/mbedtls/library/md5.c"
+Import "../mbedtls.mod/mbedtls/library/nist_kw.c"
+Import "../mbedtls.mod/mbedtls/library/oid.c"
+Import "../mbedtls.mod/mbedtls/library/pkcs5.c"
+Import "../mbedtls.mod/mbedtls/library/platform_util.c"
+Import "../mbedtls.mod/mbedtls/library/poly1305.c"
+Import "../mbedtls.mod/mbedtls/library/ripemd160.c"
+Import "../mbedtls.mod/mbedtls/library/sha1.c"
+Import "../mbedtls.mod/mbedtls/library/sha256.c"
+Import "../mbedtls.mod/mbedtls/library/sha512.c"