zte's code,first commit
Change-Id: I9a04da59e459a9bc0d67f101f700d9d7dc8d681b
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/asn1.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/asn1.h
new file mode 100644
index 0000000..35be23f
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/asn1.h
@@ -0,0 +1,3 @@
+/* asn1.h for openssl */
+
+#include <wolfssl/openssl/asn1.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/bio.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/bio.h
new file mode 100644
index 0000000..8f52983
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/bio.h
@@ -0,0 +1,4 @@
+/* bio.h for openssl */
+
+#include <wolfssl/openssl/bio.h>
+
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/bn.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/bn.h
new file mode 100644
index 0000000..e14f4e2
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/bn.h
@@ -0,0 +1,3 @@
+/* bn.h for openssl */
+
+#include <wolfssl/openssl/bn.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/conf.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/conf.h
new file mode 100644
index 0000000..4005ea9
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/conf.h
@@ -0,0 +1,3 @@
+/* conf.h for openssl */
+
+#include <wolfssl/openssl/conf.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/crypto.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/crypto.h
new file mode 100644
index 0000000..32e1108
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/crypto.h
@@ -0,0 +1,4 @@
+/* crypto.h for openSSL */
+
+#include <wolfssl/openssl/crypto.h>
+
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/des.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/des.h
new file mode 100644
index 0000000..79a06b7
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/des.h
@@ -0,0 +1,28 @@
+/* des.h
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+
+
+/* des.h defines mini des openssl compatibility layer
+ *
+ */
+
+#include <wolfssl/openssl/des.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/dh.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/dh.h
new file mode 100644
index 0000000..6fd8e36
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/dh.h
@@ -0,0 +1,4 @@
+/* dh.h for openSSL */
+
+
+#include <wolfssl/openssl/dh.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/dsa.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/dsa.h
new file mode 100644
index 0000000..39ddf8c
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/dsa.h
@@ -0,0 +1,12 @@
+/* dsa.h for openSSL */
+
+#ifndef CYASSL_OPENSSL_DSA
+#define CYASSL_OPENSSL_DSA
+
+#define CyaSSL_DSA_LoadDer wolfSSL_DSA_LoadDer
+#define CyaSSL_DSA_do_sign wolfSSL_DSA_do_sign
+
+#include <cyassl/openssl/ssl.h>
+#include <wolfssl/openssl/dsa.h>
+#endif
+
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/ec.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/ec.h
new file mode 100644
index 0000000..1ce8aa9
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/ec.h
@@ -0,0 +1,3 @@
+/* ec.h for openssl */
+
+#include <wolfssl/openssl/ec.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/ec25519.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/ec25519.h
new file mode 100644
index 0000000..6ee8945
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/ec25519.h
@@ -0,0 +1,3 @@
+/* ec25519.h */
+
+#include <wolfssl/openssl/ec25519.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/ec448.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/ec448.h
new file mode 100644
index 0000000..c3fe4c3
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/ec448.h
@@ -0,0 +1,3 @@
+/* ec448.h */
+
+#include <wolfssl/openssl/ec448.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/ecdh.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/ecdh.h
new file mode 100644
index 0000000..b774bf0
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/ecdh.h
@@ -0,0 +1,3 @@
+/* ecdh.h for openssl */
+
+#include <wolfssl/openssl/ecdh.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/ecdsa.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/ecdsa.h
new file mode 100644
index 0000000..9a1c02b
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/ecdsa.h
@@ -0,0 +1,3 @@
+/* ecdsa.h for openssl */
+
+#include <wolfssl/openssl/ecdsa.h>
\ No newline at end of file
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/ed25519.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/ed25519.h
new file mode 100644
index 0000000..240cbca
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/ed25519.h
@@ -0,0 +1,3 @@
+/* ed25519.h */
+
+#include <wolfssl/openssl/ed25519.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/ed448.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/ed448.h
new file mode 100644
index 0000000..ebb9c61
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/ed448.h
@@ -0,0 +1,3 @@
+/* ed448.h */
+
+#include <wolfssl/openssl/ed448.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/engine.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/engine.h
new file mode 100644
index 0000000..fcce4bd
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/engine.h
@@ -0,0 +1,5 @@
+/* engine.h for libcurl */
+
+#include <wolfssl/openssl/engine.h>
+
+
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/err.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/err.h
new file mode 100644
index 0000000..3611117
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/err.h
@@ -0,0 +1,3 @@
+/* err.h for openssl */
+
+#include <wolfssl/openssl/err.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/evp.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/evp.h
new file mode 100644
index 0000000..af81c10
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/evp.h
@@ -0,0 +1,41 @@
+/* evp.h
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+
+
+/* evp.h defines mini evp openssl compatibility layer
+ *
+ */
+
+#ifndef CYASSL_OPENSSL_EVP
+#define CYASSL_OPENSSL_EVP
+
+#define CyaSSL_StoreExternalIV wolfSSL_StoreExternalIV
+#define CyaSSL_SetInternalIV wolfSSL_SetInternalIV
+#define CYASSL_EVP_MD WOLFSSL_EVP_MD
+#define CyaSSL_EVP_X_STATE wolfSSL_EVP_X_STATE
+#define CyaSSL_EVP_X_STATE_LEN wolfSSL_EVP_X_STATE_LEN
+#define CyaSSL_3des_iv wolfSSL_3des_iv
+#define CyaSSL_aes_ctr_iv wolfSSL_aes_ctr_iv
+
+#include <wolfssl/openssl/evp.h>
+#endif
+
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/hmac.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/hmac.h
new file mode 100644
index 0000000..c93ef8d
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/hmac.h
@@ -0,0 +1,28 @@
+/* hmac.h
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+
+
+/* hmac.h defines mini hamc openssl compatibility layer
+ *
+ */
+
+#include <wolfssl/openssl/hmac.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/lhash.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/lhash.h
new file mode 100644
index 0000000..6285f6a
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/lhash.h
@@ -0,0 +1,3 @@
+/* lhash.h for openSSL */
+
+#include <wolfssl/openssl/lhash.h>
\ No newline at end of file
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/md4.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/md4.h
new file mode 100644
index 0000000..fb0d437
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/md4.h
@@ -0,0 +1,3 @@
+/* md4.h for libcurl */
+
+#include <wolfssl/openssl/md4.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/md5.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/md5.h
new file mode 100644
index 0000000..f3dd4e4
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/md5.h
@@ -0,0 +1,5 @@
+/* md5.h for openssl */
+
+
+#include <wolfssl/openssl/md5.h>
+
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/ocsp.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/ocsp.h
new file mode 100644
index 0000000..8c0f468
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/ocsp.h
@@ -0,0 +1,3 @@
+/* ocsp.h for libcurl */
+
+#include <wolfssl/openssl/ocsp.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/opensslconf.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/opensslconf.h
new file mode 100644
index 0000000..7f21cd9
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/opensslconf.h
@@ -0,0 +1,3 @@
+/* opensslconf.h for openSSL */
+
+#include <wolfssl/openssl/opensslconf.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/opensslv.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/opensslv.h
new file mode 100644
index 0000000..d119f82
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/opensslv.h
@@ -0,0 +1,3 @@
+/* opensslv.h compatibility */
+
+#include <wolfssl/openssl/opensslv.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/ossl_typ.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/ossl_typ.h
new file mode 100644
index 0000000..5e6e627
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/ossl_typ.h
@@ -0,0 +1,3 @@
+/* ossl_typ.h for openssl */
+
+#include <wolfssl/openssl/ossl_typ.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/pem.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/pem.h
new file mode 100644
index 0000000..a07b912
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/pem.h
@@ -0,0 +1,3 @@
+/* pem.h for openssl */
+
+#include <wolfssl/openssl/pem.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/pkcs12.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/pkcs12.h
new file mode 100644
index 0000000..1fb089f
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/pkcs12.h
@@ -0,0 +1,3 @@
+/* pkcs12.h for openssl */
+
+#include <wolfssl/openssl/pkcs12.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/rand.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/rand.h
new file mode 100644
index 0000000..5bd77b6
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/rand.h
@@ -0,0 +1,3 @@
+/* rand.h for openSSL */
+
+#include <wolfssl/openssl/ssl.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/ripemd.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/ripemd.h
new file mode 100644
index 0000000..b25de78
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/ripemd.h
@@ -0,0 +1,3 @@
+/* ripemd.h for openssl */
+
+#include <wolfssl/openssl/ripemd.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/rsa.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/rsa.h
new file mode 100644
index 0000000..f4f24b8
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/rsa.h
@@ -0,0 +1,12 @@
+/* rsa.h for openSSL */
+
+#ifndef CYASSL_OPENSSL_RSA
+#define CYASSL_OPENSSL_RSA
+
+#define CyaSSL_RSA_GenAdd wolfSSL_RSA_GenAdd
+#define CyaSSL_RSA_LoadDer wolfSSL_RSA_LoadDer
+
+#include <cyassl/openssl/ssl.h>
+#include <wolfssl/openssl/rsa.h>
+#endif
+
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/sha.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/sha.h
new file mode 100644
index 0000000..ced3ca1
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/sha.h
@@ -0,0 +1,3 @@
+/* sha.h for openssl */
+
+#include <wolfssl/openssl/sha.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/ssl.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/ssl.h
new file mode 100644
index 0000000..3f2f3e3
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/ssl.h
@@ -0,0 +1,34 @@
+/* ssl.h
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+
+
+/* ssl.h defines openssl compatibility layer
+ *
+ */
+#ifndef CYASSL_OPENSSL_H_
+#define CYASSL_OPENSSL_H_
+
+#include <cyassl/ssl.h>
+#include <wolfssl/openssl/ssl.h>
+
+#endif
+
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/ssl23.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/ssl23.h
new file mode 100644
index 0000000..a91524b
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/ssl23.h
@@ -0,0 +1,3 @@
+/* ssl23.h for openssl */
+
+#include <wolfssl/openssl/ssl23.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/stack.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/stack.h
new file mode 100644
index 0000000..831502f
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/stack.h
@@ -0,0 +1,3 @@
+/* stack.h for openssl */
+
+#include <wolfssl/openssl/stack.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/ui.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/ui.h
new file mode 100644
index 0000000..b1f4042
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/ui.h
@@ -0,0 +1,3 @@
+/* ui.h for openssl */
+
+#include <wolfssl/openssl/ui.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/x509.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/x509.h
new file mode 100644
index 0000000..9d13002
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/x509.h
@@ -0,0 +1,3 @@
+/* x509.h for openssl */
+
+#include <wolfssl/openssl/ssl.h>
diff --git a/ap/lib/libwolfssl/install/include/cyassl/openssl/x509v3.h b/ap/lib/libwolfssl/install/include/cyassl/openssl/x509v3.h
new file mode 100644
index 0000000..2a5240d
--- /dev/null
+++ b/ap/lib/libwolfssl/install/include/cyassl/openssl/x509v3.h
@@ -0,0 +1,3 @@
+/* x509v3.h for openssl */
+
+#include <wolfssl/openssl/x509v3.h>